@arsedizioni/ars-utils 21.2.324 → 21.2.326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-core.mjs","sources":["../../../projects/ars-utils/core/directives/autoFocusDirective.ts","../../../projects/ars-utils/core/definitions.ts","../../../projects/ars-utils/core/system.ts","../../../projects/ars-utils/core/directives/changeDateIntervalDirective.ts","../../../projects/ars-utils/core/directives/copyClipboardDirective.ts","../../../projects/ars-utils/core/directives/validatorDirective.ts","../../../projects/ars-utils/core/directives/validIfDirective.ts","../../../projects/ars-utils/core/directives/equalsValidatorDirective.ts","../../../projects/ars-utils/core/directives/notEqualValidatorDirective.ts","../../../projects/ars-utils/core/directives/emailsValidatorDirective.ts","../../../projects/ars-utils/core/directives/guidValidatorDirective.ts","../../../projects/ars-utils/core/directives/sqlDateValidatorDirective.ts","../../../projects/ars-utils/core/directives/notFutureValidatorDirective.ts","../../../projects/ars-utils/core/directives/urlValidatorDirective.ts","../../../projects/ars-utils/core/directives/fileSizeValidatorDirective.ts","../../../projects/ars-utils/core/directives/maxTermsValidatorDirective.ts","../../../projects/ars-utils/core/directives/passwordValidatorDirective.ts","../../../projects/ars-utils/core/directives/timeValidatorDirective.ts","../../../projects/ars-utils/core/directives/notEmptyValidatorDirective.ts","../../../projects/ars-utils/core/pipes/format.pipe.ts","../../../projects/ars-utils/core/pipes/replace.pipe.ts","../../../projects/ars-utils/core/pipes/safe-html.pipe.ts","../../../projects/ars-utils/core/pipes/safe-url.pipe.ts","../../../projects/ars-utils/core/pipes/search-callback.pipe.ts","../../../projects/ars-utils/core/pipes/search-filter.pipe.ts","../../../projects/ars-utils/core/pipes/format-html.pipe.ts","../../../projects/ars-utils/core/breakpoints.ts","../../../projects/ars-utils/core/messages.ts","../../../projects/ars-utils/core/selectable.ts","../../../projects/ars-utils/core/services/broadcastChannelManager.ts","../../../projects/ars-utils/core/services/broadcast.service.ts","../../../projects/ars-utils/core/services/environment.service.ts","../../../projects/ars-utils/core/services/screen.service.ts","../../../projects/ars-utils/core/services/theme.service.ts","../../../projects/ars-utils/core/core.module.ts","../../../projects/ars-utils/core/dateFnsAdapter.module.ts","../../../projects/ars-utils/core/directives/removeFocusDirective.ts","../../../projects/ars-utils/core/pipes/format-markdown.pipe.ts","../../../projects/ars-utils/core/public_api.ts","../../../projects/ars-utils/core/arsedizioni-ars-utils-core.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\r\n\r\n/**\r\n * Directive that moves browser focus to the host element after the first render cycle.\r\n * Apply `autoFocus` to any focusable element to set focus automatically on initialisation.\r\n */\r\n@Directive({\r\n selector: '[autoFocus]',\r\n standalone: true\r\n})\r\nexport class AutoFocusDirective {\r\n\r\n private readonly elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n this.elementRef.nativeElement?.focus();\r\n });\r\n }\r\n}\r\n","import { INode } from './system';\r\n\r\nexport interface DoneResult<T> {\r\n isNew?: boolean;\r\n data?: T;\r\n}\r\n\r\nexport interface ApiResponse {\r\n success: boolean;\r\n message: string;\r\n}\r\n\r\nexport interface ApiResult<T> extends ApiResponse {\r\n value: T;\r\n}\r\n\r\nexport interface Folder extends INode {\r\n teamId?: string;\r\n parentId?: string;\r\n position?: number;\r\n isPrivate?: boolean;\r\n itemsCount?: number;\r\n subItemsCount?: number;\r\n\r\n}\r\n\r\nexport interface FolderTree extends Folder {\r\n children?: Folder[];\r\n path?: string;\r\n}\r\n\r\nexport interface File<T> {\r\n ownerId?: T;\r\n id?: number;\r\n fileName: string;\r\n fileData: unknown;\r\n}\r\n\r\nexport interface Validated {\r\n isValid(): boolean;\r\n}\r\n\r\nexport class FileInfo implements Validated {\r\n file: any;\r\n valid!: boolean;\r\n\r\n isValid(): boolean {\r\n return this.valid;\r\n }\r\n}\r\n\r\nexport interface ErrorInfo {\r\n invalidateSession?: boolean;\r\n title?: string;\r\n message?: string;\r\n errorStatus?: number;\r\n service?: string;\r\n}\r\n\r\nexport interface NameValueItem<T> {\r\n name: string;\r\n value: T;\r\n shortName?: string;\r\n parentName?: string;\r\n parentValue?: T;\r\n header?: string;\r\n bag?: any;\r\n bagInfo?: string;\r\n disabled?: boolean;\r\n selected?: boolean;\r\n}\r\n\r\nexport interface Checkable {\r\n checked?: boolean;\r\n bag: unknown;\r\n getId(): unknown;\r\n}\r\n\r\n\r\nexport class ValueModel<T> {\r\n value: T;\r\n}\r\nexport class IDModel<T = number> {\r\n id: T;\r\n}\r\nexport class GroupModel<T = number> {\r\n ids: T[];\r\n}\r\n\r\nexport class DeleteModel<T = number> extends GroupModel<T> {\r\n mode?: number;\r\n parentId?: T;\r\n}\r\n\r\nexport interface DeleteResultModel<T> {\r\n items?: T[],\r\n deleted: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport class RelationModel<T = number> {\r\n id: T;\r\n parentId: T;\r\n}\r\n\r\nexport class UpdateRelationsModel<T = number> {\r\n id: T;\r\n relatedIds: T[];\r\n}\r\n\r\nexport class QueryModel {\r\n any?: string;\r\n sortBy?: string;\r\n sortDescending?: boolean;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface QueryResultModel<T> {\r\n interval?: string;\r\n items: T[];\r\n total: number;\r\n}\r\n\r\nexport interface UpdateModel<T = number> {\r\n parentId?: T;\r\n ids: T[];\r\n}\r\n\r\nexport interface UpdateResultModel<T> {\r\n items?: T[];\r\n updated: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport interface AddModel<T> extends UpdateModel<T> {\r\n\r\n}\r\n\r\nexport interface AddResultModel<T> {\r\n items?: T[];\r\n added: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport class ImportModel {\r\n origin: string;\r\n dataFile: FileInfo;\r\n jumpFirstLine?: boolean;\r\n map?: unknown;\r\n}\r\n\r\nexport interface EnableDisableModel {\r\n value: boolean;\r\n}\r\n\r\nexport interface SendToModel {\r\n sendToRecipients?: string;\r\n sendToSubject?: string;\r\n sendToText?: string;\r\n}\r\n\r\nexport interface SearchBag {\r\n name: string;\r\n}\r\n\r\nexport interface Searchable {\r\n searchBag: SearchBag;\r\n}\r\n\r\nexport interface SearchFilterMetadata {\r\n total: number; // totale elementi\r\n count: number; // conteggio filtrati\r\n}\r\n\r\nexport class DateInterval {\r\n from?: Date;\r\n to?: Date;\r\n get fromAsDate(): Date | undefined {\r\n if (this.from) {\r\n if (!(this.from instanceof Date)) {\r\n this.from = new Date(this.from);\r\n }\r\n if (this.from) {\r\n return new Date(\r\n this.from.getFullYear(),\r\n this.from.getMonth(),\r\n this.from.getDate(),\r\n 2,\r\n 0,\r\n 0\r\n )\r\n }\r\n }\r\n return undefined;\r\n }\r\n get toAsDate(): Date {\r\n if (this.to) {\r\n if (!(this.to instanceof Date)) {\r\n this.to = new Date(this.to);\r\n }\r\n if (this.to) {\r\n return new Date(\r\n this.to.getFullYear(),\r\n this.to.getMonth(),\r\n this.to.getDate(),\r\n 2,\r\n 0,\r\n 0\r\n )\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n constructor(from?: Date, to?: Date) {\r\n this.from = from;\r\n this.to = to;\r\n }\r\n\r\n clear(): void {\r\n this.from = undefined;\r\n this.to = undefined;\r\n }\r\n}\r\n\r\nexport interface LoginResult<T> extends ApiResult<boolean> {\r\n context: T;\r\n oauth?: number;\r\n requiresMfa?: boolean;\r\n}\r\n","import { HttpParams } from \"@angular/common/http\";\r\nimport { DateInterval } from './definitions';\r\nimport { format, Locale, parse, parseISO } from 'date-fns';\r\nimport { it } from 'date-fns/locale';\r\nimport { TZDate } from '@date-fns/tz';\r\n\r\nexport interface INode {\r\n id: string;\r\n name?: string;\r\n count?: number;\r\n children?: INode[];\r\n subFolders?: INode[];\r\n parent?: INode;\r\n bag?: unknown;\r\n}\r\n\r\n\r\nexport enum DateFormat {\r\n Short = 1, // dd/mm/yyyy\r\n Long = 2, // d mmmm yyyy\r\n LongWithShortMonth = 3, // d mmm yyyy\r\n LongWithWeekDay = 4, // wwww, d mmmm yyyy\r\n LongWithShortWeekDay = 5, // www, d mmmm yyyy\r\n MonthAndYear = 6, // mmm yyyy\r\n LongMonthAndYear = 7, // mmmm yyyy\r\n WeekDay = 8, // www d\r\n LongWeekDay = 9, // wwww d\r\n DayAndMonth = 10, // d mmmm\r\n ShortUS = 11, // mm/dd/yyyy\r\n ShortISO8601 = 12 // yyyy-mm-dd\r\n}\r\n\r\nexport interface PasswordStrength {\r\n score: number;\r\n label?: string;\r\n color?: string;\r\n suggestions?: string[];\r\n isValid: boolean;\r\n}\r\n\r\ninterface MarkdownListState {\r\n type: 'ul' | 'ol' | null;\r\n items: string[];\r\n}\r\n\r\nexport class SystemUtils {\r\n /**\r\n * Array find by key\r\n * @param array : the array to scan\r\n * @param key : key name\r\n * @param value : the value to search for\r\n * @returns : the property value or null\r\n */\r\n static arrayFindByKey<T>(array: T[] | undefined, key: string, value: unknown): T | undefined {\r\n if (!array) return undefined;\r\n for (const item of array) {\r\n if ((item as any)[key] === value) {\r\n return item;\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Array find index by key\r\n * @param array : the array to scan\r\n * @param key : the key name\r\n * @param value : the value to search for\r\n * @returns : the array index or -1 if not found\r\n */\r\n static arrayFindIndexByKey<T>(array: T[] | undefined, key: string, value: unknown): number {\r\n if (!array) return -1;\r\n for (let i = 0; i < array.length; i++) {\r\n if ((array[i] as any)[key] === value) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Get a value from and array made of name|value items\r\n * @param array : the array to scan\r\n * @param value : the value to search for\r\n * @returns : the property value or null if not found\r\n */\r\n static arrayGetValue<T>(array: T[] | undefined, value: unknown): unknown {\r\n if (!array) return undefined;\r\n for (const item of array) {\r\n const i = item as Record<string, unknown>;\r\n if (i['value'] === value) {\r\n return i['name'] ?? i['id'];\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Convert items to nodes into a tree structure\r\n * @param items : list of nodes\r\n * @param parent : parent node\r\n * @returns : an array of INode objects\r\n */\r\n static arrayToNodes(items: INode[], parent?: INode): INode[] {\r\n const nodes: INode[] = [];\r\n items.forEach(n => {\r\n const node: INode = {\r\n id: n.id.toString(),\r\n name: n.name,\r\n count: n.count ? n.count : 0,\r\n children: undefined,\r\n parent,\r\n bag: n,\r\n };\r\n nodes.push(node);\r\n node.children =\r\n n.children && n.children.length > 0\r\n ? this.arrayToNodes(n.children, node)\r\n : [];\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Comparator factory for sorting arrays of objects by a given property key.\r\n * @param key - Name of the property to sort by.\r\n * @param order - Sort direction: `'asc'` (default) or `'desc'`.\r\n * @returns A comparator function that returns `0`, `1`, or `-1`.\r\n */\r\n static arraySortCompare(\r\n key: string,\r\n order: string = 'asc'\r\n ): (a: Record<string, unknown>, b: Record<string, unknown>) => number {\r\n return function innerSort(a: Record<string, unknown>, b: Record<string, unknown>): number {\r\n if (!Object.prototype.hasOwnProperty.call(a, key) || !Object.prototype.hasOwnProperty.call(b, key)) {\r\n return 0;\r\n }\r\n const varA = typeof a[key] === 'string' ? (a[key] as string).toUpperCase() : a[key];\r\n const varB = typeof b[key] === 'string' ? (b[key] as string).toUpperCase() : b[key];\r\n let comparison = 0;\r\n if (varA > varB) comparison = 1;\r\n else if (varA < varB) comparison = -1;\r\n return order === 'desc' ? comparison * -1 : comparison;\r\n };\r\n }\r\n\r\n /**\r\n * Format weight\r\n * @param gr : grams\r\n * @returns : the formatted string\r\n */\r\n static formatWeight(gr: number): string {\r\n if (gr > 1000000) return `${(gr / 1000000).toFixed(2)} t`;\r\n else if (gr > 100000) return `${(gr / 100000).toFixed(2)} q`;\r\n else if (gr > 1000) return `${(gr / 1000).toFixed(2)} kg`;\r\n else return `${gr} gr`;\r\n }\r\n\r\n /**\r\n * Format file size\r\n * @param bytes : number of bytes\r\n * @returns : the formatted string\r\n */\r\n static formatFileSize(bytes: number): string {\r\n if (bytes > 1024000) return `${(bytes / 1024000).toFixed(1)} MB`;\r\n if (bytes > 1024) return `${(bytes / 1024).toFixed(1)} Kb`;\r\n return `${bytes} byte`;\r\n }\r\n\r\n /**\r\n * Compare two string\r\n * @param a : string a\r\n * @param b : string b\r\n * @returns : 0 if equals, 1 if bigger, -1 if lower\r\n */\r\n static compareString(a?: string, b?: string): number {\r\n if ((a ?? \"\").toLowerCase() > (b ?? \"\").toLowerCase()) return 1;\r\n if ((a ?? \"\").toLowerCase() < (b ?? \"\").toLowerCase()) return -1;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Capitalize a string\r\n * @param s : the string to capitalize\r\n * @returns : the capitalized string \r\n */\r\n static capitalize(s?: string): string | undefined {\r\n if (!s) return undefined;\r\n let b = \"\";\r\n let cap = true;\r\n for (const char of s) {\r\n if (char === \" \") {\r\n b += char;\r\n cap = true;\r\n } else if (cap) {\r\n b += char.toUpperCase();\r\n cap = false;\r\n } else {\r\n b += char.toLowerCase();\r\n }\r\n }\r\n return b;\r\n }\r\n\r\n /**\r\n * Truncate a string\r\n * @param s : the string to truncate\r\n * @param max : the max number of chars\r\n * @returns : the truncated string\r\n */\r\n static truncate(s?: string, max: number = 500): string | undefined {\r\n if (!s) return undefined;\r\n if (s.length < max) return s;\r\n let i = max - 1;\r\n while (i > 0) {\r\n if (s[i] === ' ') return s.slice(0, i);\r\n i--;\r\n }\r\n return s;\r\n }\r\n\r\n /**\r\n * Join a list of strings\r\n * @param items : the list of strings\r\n * @param sep : the separator string\r\n * @param max : the maximum resulting string\r\n * @returns : the joined string\r\n */\r\n static join(items?: string[], sep: string = \" \", max: number = 350): string | undefined {\r\n if (!items || items.length === 0) return undefined;\r\n if (items.length > 1) {\r\n let l = 0;\r\n let s = \"\"\r\n while (s.length < max && items.length > l) {\r\n if (l > 0) {\r\n s += sep;\r\n }\r\n s += items[l++];\r\n }\r\n if (items.length > l) {\r\n s += \"...\";\r\n }\r\n return s;\r\n }\r\n return items[0];\r\n }\r\n\r\n /**\r\n * Wraps bare URLs in the given string with `<a>` anchor tags.\r\n * @param s - The plain-text or HTML string to process.\r\n * @returns The string with URLs replaced by clickable links, or `''` when `s` is falsy.\r\n */\r\n static replaceAsHtml(s?: string): string {\r\n if (!s) return '';\r\n const regex = /https?:\\/\\/.*[^\\s]/ig;\r\n const m = regex.exec(s);\r\n if (!m || m.length === 0) return s;\r\n let result = s;\r\n for (const v of m) {\r\n result = result.replace(v, `<a href=\"${v}\" target=\"_blank\">${v}</a>`);\r\n }\r\n return result;\r\n }\r\n\r\n\r\n\r\n\r\n /**\r\n * Convert markdown to html\r\n * @param markdown : the markdown data\r\n * @param escapeEntities : true to escape entities. Default is false\r\n * @returns the html\r\n */\r\n static markdownToHtml(markdown: string, escapeEntities: boolean = false): string {\r\n let html = markdown;\r\n\r\n //1. Escape HTML entities \r\n if (escapeEntities) {\r\n html = html.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\r\n }\r\n\r\n // 2. Code blocks \r\n html = html.replace(/```(\\w+)?\\n([\\s\\S]*?)```/g, (_match, lang, code) => {\r\n const langClass = lang ? ` class=\"language-${lang}\"` : '';\r\n return `<pre><code${langClass}>${code.trim()}</code></pre>`;\r\n });\r\n\r\n // 3. Inline code\r\n html = html.replace(/`([^`]+)`/g, '<code>$1</code>');\r\n\r\n // 4. Headers \r\n html = html.replace(/^##### (.*$)/gim, '<h5>$1</h5>');\r\n html = html.replace(/^#### (.*$)/gim, '<h4>$1</h4>');\r\n html = html.replace(/^### (.*$)/gim, '<h3>$1</h3>');\r\n html = html.replace(/^## (.*$)/gim, '<h2>$1</h2>');\r\n html = html.replace(/^# (.*$)/gim, '<h1>$1</h1>');\r\n\r\n // 5. Horizontal rules\r\n html = html.replace(/^---+$/gim, '<hr>');\r\n html = html.replace(/^\\*\\*\\*+$/gim, '<hr>');\r\n\r\n // 6. Links \r\n html = html.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, '<a href=\"$2\">$1</a>');\r\n\r\n // 7. Images\r\n html = html.replace(/!\\[([^\\]]*)\\]\\(([^)]+)\\)/g, '<img src=\"$2\" alt=\"$1\">');\r\n\r\n // 8. Bold e Italic \r\n html = html.replace(/\\*\\*\\*([^*]+)\\*\\*\\*/gim, '<strong><em>$1</em></strong>');\r\n html = html.replace(/___([^_]+)___/gim, '<strong><em>$1</em></strong>');\r\n html = html.replace(/\\*\\*([^*]+)\\*\\*/gim, '<strong>$1</strong>');\r\n html = html.replace(/__([^_]+)__/gim, '<strong>$1</strong>');\r\n html = html.replace(/\\*([^*]+)\\*/gim, '<em>$1</em>');\r\n html = html.replace(/_([^_]+)_/gim, '<em>$1</em>');\r\n\r\n // 9. Strikethrough\r\n html = html.replace(/~~([^~]+)~~/gim, '<del>$1</del>');\r\n\r\n // 10. Blockquotes\r\n html = html.replace(/^> (.*$)/gim, '<blockquote>$1</blockquote>');\r\n\r\n // 11. Tables\r\n html = this.markdownConvertTables(html);\r\n\r\n // 12. Lists \r\n html = this.markdownConvertLists(html);\r\n\r\n // 13. Line breaks\r\n html = html.replace(/ $/gm, '<br>');\r\n\r\n // 14. Paragrafi (ultimo step per non interferire con altri elementi)\r\n html = this.markdownConvertParagraphs(html);\r\n\r\n // 15. Clean up extra newlines\r\n html = html.replace(/\\`\\`\\`markdown/g, '');\r\n html = html.replace(/\\*\\*/g, '');\r\n html = html.replace(/\\n{3,}/g, '\\n\\n');\r\n\r\n\r\n return html.trim();\r\n }\r\n\r\n /**\r\n * Convert markdown table to html\r\n * @param markdown: the markdown string\r\n * @returns : the html\r\n */\r\n private static markdownConvertTables(markdown: string): string {\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n let inTable = false;\r\n let tableRows: string[] = [];\r\n let headerProcessed = false;\r\n\r\n for (let i = 0; i < lines.length; i++) {\r\n const line = lines[i].trim();\r\n if (line.includes('|') && line.length > 1) {\r\n const nextLine = i + 1 < lines.length ? lines[i + 1].trim() : '';\r\n const isHeaderSeparator = /^\\|?[\\s\\-:|]+\\|?$/.test(nextLine);\r\n if (!inTable) {\r\n inTable = true;\r\n headerProcessed = false;\r\n tableRows = [];\r\n }\r\n if (isHeaderSeparator && !headerProcessed) {\r\n tableRows.push(this.markdownConvertTableRow(line, true));\r\n headerProcessed = true;\r\n i++;\r\n } else if (!isHeaderSeparator) {\r\n tableRows.push(this.markdownConvertTableRow(line, false));\r\n }\r\n } else {\r\n if (inTable && tableRows.length > 0) {\r\n result.push('<table>');\r\n result.push(...tableRows);\r\n result.push('</table>');\r\n tableRows = [];\r\n inTable = false;\r\n }\r\n result.push(line);\r\n }\r\n }\r\n if (inTable && tableRows.length > 0) {\r\n result.push('<table>');\r\n result.push(...tableRows);\r\n result.push('</table>');\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n /**\r\n * Convert a markdown table row to html\r\n * @param row : the markdown row\r\n * @param isHeader : true if is header\r\n * @returns the html\r\n */\r\n private static markdownConvertTableRow(row: string, isHeader: boolean): string {\r\n const cells = row.split('|').map(cell => cell.trim()).filter(cell => cell !== '');\r\n const tag = isHeader ? 'th' : 'td';\r\n const cellsHtml = cells.map(cell => ` <${tag}>${cell}</${tag}>`).join('\\n');\r\n return ` <tr>\\n${cellsHtml}\\n </tr>`;\r\n }\r\n\r\n\r\n /**\r\n * Convert a markdown list to html\r\n * @param markdown : the markdown list\r\n * @returns the html\r\n */\r\n private static markdownConvertLists(markdown: string): string {\r\n markdown = markdown.replace(/^\\* (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^- (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^\\+ (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^\\d+\\. (.*$)/gim, '<li data-type=\"ol\">$1</li>');\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n let currentList: MarkdownListState = { type: null, items: [] };\r\n for (const line of lines) {\r\n const ulMatch = line.match(/^<li data-type=\"ul\">(.*)<\\/li>$/);\r\n const olMatch = line.match(/^<li data-type=\"ol\">(.*)<\\/li>$/);\r\n if (ulMatch) {\r\n if (currentList.type !== 'ul') {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n currentList = { type: 'ul', items: [ulMatch[1]] };\r\n } else {\r\n currentList.items.push(ulMatch[1]);\r\n }\r\n } else if (olMatch) {\r\n if (currentList.type !== 'ol') {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n currentList = { type: 'ol', items: [olMatch[1]] };\r\n } else {\r\n currentList.items.push(olMatch[1]);\r\n }\r\n } else {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n currentList = { type: null, items: [] };\r\n }\r\n result.push(line);\r\n }\r\n }\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n /**\r\n * Wrap a list\r\n * @param type: the list type \r\n * @param items : the item list\r\n * @returns the html\r\n */\r\n private static markdownWrapList(type: 'ul' | 'ol', items: string[]): string {\r\n const listItems = items.map(item => ` <li>${item}</li>`).join('\\n');\r\n return `<${type}>\\n${listItems}\\n</${type}>`;\r\n }\r\n\r\n /**\r\n * Convert markdown paragraphs to html\r\n * @param markdown : the markdown paragraphs\r\n * @returns the html\r\n */\r\n private static markdownConvertParagraphs(markdown: string): string {\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n for (const line of lines) {\r\n const trimmed = line.trim();\r\n if (!trimmed) {\r\n result.push('');\r\n continue;\r\n }\r\n if (trimmed.startsWith('<') && trimmed.endsWith('>')) {\r\n result.push(line);\r\n continue;\r\n }\r\n if (trimmed.startsWith('<') || trimmed.endsWith('>')) {\r\n result.push(line);\r\n continue;\r\n }\r\n result.push(`<p>${trimmed}</p>`);\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n\r\n\r\n /**\r\n * Compare two names\r\n * @param a : name a\r\n * @param b : name b\r\n * @returns : true if a equals b\r\n */\r\n static compareNames(a?: string, b?: string): boolean {\r\n if (a) a = a.trim();\r\n if (b) b = b.trim();\r\n if (a && b && a.length !== b.length) return false;\r\n if (this.compareString(a, b) === 0) return true;\r\n const p1 = (a ?? '').split(' ');\r\n const p2 = (b ?? '').split(' ');\r\n if (p1.length !== p2.length) return false;\r\n let matches = p1.length;\r\n for (const s1 of p1) {\r\n for (const s2 of p2) {\r\n if (this.compareString(s1, s2) === 0) {\r\n matches--;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return matches === 0;\r\n }\r\n\r\n /**\r\n * Cipher a text\r\n * @param text : the text\r\n * @param key : the key\r\n * @param reverse : true to decode, false to encode\r\n * @returns :the ciphered text\r\n */\r\n static cipher(text: string, key: string, reverse: boolean = false): string | undefined {\r\n // Surrogate pair limit\r\n const bound = 0x10000;\r\n\r\n // Create string from character codes\r\n return String.fromCharCode.apply(\r\n null,\r\n // Turn string to character codes\r\n text.split('').map((v: string, i: number) => {\r\n // Get rotation from key\r\n let rotation = key.charCodeAt(i % key.length);\r\n\r\n // Are we decrypting?\r\n if (reverse) rotation = -rotation;\r\n\r\n // Return current character code + rotation\r\n return (v.charCodeAt(0) + rotation + bound) % bound;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Clone an object using JSON\r\n * @param obj : the oblect to clone\r\n * @returns : a new object\r\n */\r\n static clone<T>(obj: T): T {\r\n if (!obj) return {} as T;\r\n return JSON.parse(JSON.stringify(obj)) as T;\r\n }\r\n\r\n /**\r\n * Creates a deep clone of an object by recursively copying all own properties.\r\n * @param obj - The source object to clone.\r\n * @param dest - Optional pre-allocated destination object; a new instance is created when omitted.\r\n * @returns A deep copy of `obj`.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static deepClone<T extends object>(obj: T, dest?: T): T {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const cloneObj: any = dest ?? (obj as any).constructor();\r\n for (const attribute of Object.keys(obj)) {\r\n const property = (obj as Record<string, unknown>)[attribute];\r\n if (typeof property === 'object' && property !== null) {\r\n cloneObj[attribute] = this.deepClone(property as object);\r\n } else {\r\n cloneObj[attribute] = property;\r\n }\r\n }\r\n return cloneObj as T;\r\n }\r\n\r\n\r\n /**\r\n * Returns `true` when `value` is a syntactically valid UUID string.\r\n * @param value - The string to validate.\r\n */\r\n static parseUUID(value?: string): boolean {\r\n const regex = /^({|()?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(}|))?$/;\r\n return !!value && value.length > 0 && regex.test(value);\r\n }\r\n\r\n /**\r\n * Returns `true` when `value` is a valid, non-empty (non-zero) UUID.\r\n * @param value - The string to validate.\r\n */\r\n static parseUUIDNotEmpty(value?: string): boolean {\r\n const regex = /^({|()?0{8}-(0{4}-){3}0{12}(}|))?$/;\r\n return this.parseUUID(value) && !regex.test(value ?? '');\r\n }\r\n\r\n /**\r\n * Return an empty UUID\r\n * @returns : the empty UUID\r\n */\r\n static emptyUUID(): string { return \"00000000-0000-0000-0000-000000000000\" };\r\n\r\n /**\r\n * Create a new UUID\r\n * @returns : the string UUID\r\n */\r\n static generateUUID(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = (Math.random() * 16) | 0;\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n /**\r\n * Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.\r\n * @param value : 32-character hex string\r\n * @returns : the formatted UUID or the original string if it doesn't match the expected format\r\n */\r\n static inflateUUID(value: string): string {\r\n const s = value.trim();\r\n if (s.length !== 32) return s;\r\n return `${s.slice(0, 8)}-${s.slice(8, 12)}-${s.slice(12, 16)}-${s.slice(16, 20)}-${s.slice(20)}`;\r\n }\r\n\r\n /**\r\n * Parse a text and return true if is a valid email or null\r\n * @param value : email\r\n * @returns : true if the email is valid or empty\r\n */\r\n static parseEmail(value?: string): boolean {\r\n if (!value) return true;\r\n const regex = /(?:[a-z0-9+!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/gi\r\n return regex.test(value.trim().toLowerCase());\r\n }\r\n\r\n /**\r\n * Parse a text and return true if is a valid url or null\r\n * @param value : the url to parse\r\n * @returns : true if the url is valid or empty\r\n */\r\n static parseUrl(value?: string): boolean {\r\n if (!value) return true;\r\n const regex = new RegExp(\r\n \"(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?\"\r\n );\r\n return regex.test(value.trim().toLowerCase());\r\n }\r\n\r\n /**\r\n * Get date parts from a string value\r\n * @param value : the string to parse\r\n * @returns : an array of numbers with year, month, day\r\n */\r\n static getDateParts(value?: string): number[] | undefined {\r\n if (!value) return undefined;\r\n let parts: number[] = [];\r\n if (value.indexOf(\"-\") !== -1) {\r\n const p = value.split(\"-\");\r\n if (p.length !== 3) return undefined;\r\n parts = [parseInt(p[0]), parseInt(p[1]) - 1, parseInt(p[2])];\r\n } else if (value.indexOf(\"/\") !== -1) {\r\n const p = value.split(\"/\");\r\n if (p.length !== 3) return undefined;\r\n parts = [parseInt(p[2]), parseInt(p[1]) - 1, parseInt(p[0])];\r\n }\r\n return parts;\r\n }\r\n\r\n /**\r\n * Parse a date\r\n * @param value : the value to check\r\n * @param locale : the locale to use\r\n * @returns : a valid Date object or null\r\n */\r\n static parseDate(value?: string | Date, locale: Locale = it): Date | undefined {\r\n // No value at all\r\n if (!value) return undefined;\r\n // A Date value\r\n if (value instanceof Date && value.getTime()) return value;\r\n // Parse known formats using date-fns\r\n let d = parseISO(value as string);\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n d = parse(value as string, 'dd/MM/yyyy', new Date(), { locale: locale });\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n d = parse(value as string, 'yyyy-MM-dd', new Date(), { locale: locale });\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n // Parse values manually\r\n const parts = this.getDateParts(value as string);\r\n if (!parts) return undefined;\r\n if (parts[0] < 100) parts[0] += 2000;\r\n if (isNaN(parts[0]) || parts[0] < 0 || parts[0] < 1750) return undefined;\r\n if (isNaN(parts[1]) || parts[1] < 0) return undefined;\r\n if (isNaN(parts[2]) || parts[2] < 0) return undefined;\r\n if (parts[1] > 11) return undefined;\r\n if (parts[1] === 1 && parts[2] > 29) return undefined;\r\n else if (parts[1] !== 1 && parts[2] > 31) return undefined;\r\n return new TZDate(parts[0], parts[1], parts[2], 12);\r\n }\r\n\r\n /**\r\n * Format a date\r\n * @param value : the date or string to format\r\n * @param fmt : the DateFormat to use or the string pattern\r\n * @param locale : the locale to use (default is IT)\r\n * @returns : the formatted string\r\n */\r\n static formatDate(\r\n value?: Date | string,\r\n fmt: DateFormat | string = DateFormat.Short,\r\n locale: Locale = it): string {\r\n // No value at all\r\n if (!value) return '';\r\n // A string\r\n if (typeof value === 'string' || value instanceof String)\r\n value = this.parseDate(value as string);\r\n // Not a date\r\n if (!(value instanceof Date && value.getTime()))\r\n return '';\r\n // Format\r\n switch (fmt) {\r\n case DateFormat.Short: return format(value, \"dd/MM/yyyy\", { locale: locale });\r\n case DateFormat.Long: return format(value, \"d MMMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithShortMonth: return format(value, \"d MMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithWeekDay: return format(value, \"EEEE, d MMMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithShortWeekDay: return format(value, \"EEE, d MMMM yyyy\", { locale: locale });\r\n case DateFormat.MonthAndYear: return format(value, \"MMM yyyy\", { locale: locale });\r\n case DateFormat.LongMonthAndYear: return format(value, \"MMMM yyyy\", { locale: locale });\r\n case DateFormat.WeekDay: return format(value, \"EEE, d\", { locale: locale });\r\n case DateFormat.LongWeekDay: return format(value, \"EEEE, d\", { locale: locale });\r\n case DateFormat.DayAndMonth: return format(value, \"d MMMM\", { locale: locale });\r\n case DateFormat.ShortUS: return format(value, \"MM/dd/yyyy\", { locale: locale });\r\n case DateFormat.ShortISO8601: return format(value, \"yyyy-MM-dd\", { locale: locale });\r\n default:\r\n return format(value, fmt, { locale: locale });\r\n }\r\n }\r\n\r\n /**\r\n * Return an italian local date\r\n * @param value : the date\r\n * @returns : the new date\r\n */\r\n static toLocalDate(value?: Date | string): Date | undefined {\r\n // No value at all\r\n if (!value) return undefined;\r\n // A string\r\n if (typeof value === 'string' || value instanceof String)\r\n value = this.parseDate(value as string);\r\n // Not a date\r\n if (!(value instanceof Date && value.getTime())) return undefined;\r\n // Update date\r\n return new TZDate(value, \"Europe/Rome\");\r\n }\r\n\r\n /**\r\n * Update a DateInterval object according to a string\r\n * @param value : string value\r\n * @param interval : DateInterval value to update\r\n * @param end : true if must be updated the first or the end value \r\n * @param copy : copy the same value (works only if not end element)\r\n */\r\n static changeDateInterval(value: string, interval: DateInterval, end: boolean = false, copy: boolean = false): void {\r\n if (value) {\r\n let year = -1;\r\n if (value.length === 4 && (year = parseInt(value)) > 1750) {\r\n if (!end) {\r\n interval.from = new TZDate(new Date(year, 0, 1), 'Europe/Rome');\r\n interval.to = new TZDate(new Date(year, 11, 31), 'Europe/Rome');\r\n } else\r\n interval.to = new Date(year, 11, 31);\r\n } else {\r\n let parts = this.getDateParts(value);\r\n if (!parts || isNaN(parts[0]) || parts[0] < 0 || parts[0] < 1750) return;\r\n const d = new TZDate(new Date(parts[0], parts[1], parts[2]), 'Europe/Rome');\r\n if (end)\r\n interval.to = d;\r\n else if (copy) {\r\n interval.from = d;\r\n interval.to = d;\r\n } else\r\n interval.from = d;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Formats a number using `Intl.NumberFormat`.\r\n * @param value - The number to format.\r\n * @param decimals - Maximum decimal places (default: `2`).\r\n * @param locale - BCP 47 locale tag (default: `'it-IT'`).\r\n * @returns The formatted number string.\r\n */\r\n static formatNumber(value: number, decimals: number = 2, locale: string = 'it-IT'): string {\r\n return Intl.NumberFormat(locale, { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: decimals }).format(value);\r\n }\r\n\r\n /**\r\n * Formats a number as a currency string using `Intl.NumberFormat`.\r\n * @param value - The number to format.\r\n * @param currency - ISO 4217 currency code (default: `'EUR'`).\r\n * @param decimals - Maximum decimal places (default: `2`).\r\n * @param locale - BCP 47 locale tag (default: `'it-IT'`).\r\n * @returns The formatted currency string.\r\n */\r\n static formatCurrency(value: number, currency: string = 'EUR', decimals: number = 2, locale: string = 'it-IT'): string {\r\n return Intl.NumberFormat(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: decimals }).format(value);\r\n }\r\n\r\n /**\r\n * Percent-encodes a string for safe inclusion in a URL.\r\n * @param value - The string to encode.\r\n * @returns The encoded string, or `undefined` when `value` is empty.\r\n */\r\n static urlEncode(value: string): string | undefined {\r\n return value.length > 0\r\n ? encodeURIComponent(value)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Decodes a percent-encoded URL string, treating `+` as a space.\r\n * @param value - The encoded string to decode.\r\n * @returns The decoded string, or `undefined` when `value` is empty or absent.\r\n */\r\n static urlDecode(value?: string): string | undefined {\r\n return value && value.length > 0\r\n ? decodeURIComponent(value.replace(/\\+/g, '%20'))\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Reads a query string parameter value from the current page URL.\r\n * @param name - The parameter name to look up.\r\n * @returns The decoded parameter value, or `undefined` when absent or running server-side.\r\n */\r\n static getQueryStringValueByName(name: string): string | undefined {\r\n if (!this.isBrowser()) return undefined;\r\n const url = window.location.href;\r\n if (url.includes('?')) {\r\n const httpParams = new HttpParams({ fromString: url.split('?')[1] });\r\n const raw = httpParams.get(name);\r\n if (!raw) return undefined;\r\n const v = decodeURIComponent(raw);\r\n return v && v !== 'null' ? v : undefined;\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Generate a password\r\n * @returns : the password string\r\n */\r\n static generatePassword(): string {\r\n const random = \"$\" + Math.random().toString(36).slice(-11);\r\n let password = \"\";\r\n let hasUpperCase = false;\r\n for (const rnd of random) {\r\n if (!hasUpperCase && \"abcdefghjilmnopqrstuvywxz\".includes(rnd)) {\r\n password += rnd.toUpperCase();\r\n hasUpperCase = true;\r\n } else {\r\n password += rnd;\r\n }\r\n }\r\n if (!hasUpperCase)\r\n password = password.substring(0, 11) + \"M\";\r\n return password;\r\n }\r\n\r\n /**\r\n * Calculate password strength\r\n * @param password: the password to evaluate\r\n * @returns the password strength info\r\n */\r\n static calculatePasswordStrength(password?: string): PasswordStrength {\r\n if (password && password.length > 0) {\r\n let score = 0;\r\n const suggestions: string[] = [];\r\n\r\n // Length\r\n if (password.length >= 10) score++;\r\n else suggestions.push('Usa almeno 10 caratteri.');\r\n if (password.length >= 12) score++;\r\n else if (password.length >= 10) suggestions.push('Considera di usare più di 12 caratteri.');\r\n\r\n // Lowercase letters\r\n if (/[a-z]/.test(password)) score++;\r\n else suggestions.push('Aggiungi lettere minuscole.');\r\n\r\n // Uppercase letters\r\n if (/[A-Z]/.test(password)) score++;\r\n else suggestions.push('Aggiungi lettere maiuscole.');\r\n\r\n // Numbers\r\n if (/\\d/.test(password)) score++;\r\n else suggestions.push('Aggiungi numeri.');\r\n\r\n // Special characters\r\n if (/[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]/.test(password)) score++;\r\n else suggestions.push('Aggiungi caratteri speciali (!@#$%^&*).');\r\n\r\n // Common patterns\r\n if (/(.)\\1{2,}/.test(password)) {\r\n score = Math.max(0, score - 1);\r\n suggestions.push('Evita di ripetere lo stesso carattere.');\r\n }\r\n if (/123|abc|qwe/i.test(password)) {\r\n score = Math.max(0, score - 1);\r\n suggestions.push('Evita sequenze comuni (123, abc, qwe).');\r\n }\r\n\r\n // Label and color\r\n let label: string;\r\n let color: string;\r\n let isValid: boolean;\r\n if (score <= 2) {\r\n label = 'Molto debole';\r\n color = '#f44336';\r\n isValid = false;\r\n } else if (score <= 3) {\r\n label = 'Debole';\r\n color = '#ff9800';\r\n isValid = false;\r\n } else if (score <= 4) {\r\n label = 'Media';\r\n color = '#ffc107';\r\n isValid = true;\r\n } else if (score <= 5) {\r\n label = 'Forte';\r\n color = '#8bc34a';\r\n isValid = true;\r\n } else {\r\n label = 'Molto forte';\r\n color = '#4caf50';\r\n isValid = true;\r\n }\r\n\r\n return { score, label, color, suggestions, isValid };\r\n } else\r\n return {\r\n score: 0,\r\n isValid: false,\r\n suggestions: []\r\n };\r\n\r\n }\r\n\r\n\r\n /**\r\n * Check if current browser supports touch\r\n * @returns : true if the display is touchable\r\n */\r\n static isTouchable(): boolean {\r\n return (\r\n this.isBrowser() && (\r\n \"ontouchstart\" in window ||\r\n navigator.maxTouchPoints > 0)\r\n );\r\n }\r\n\r\n /**\r\n * This check will prevent 'window' logic to be executed\r\n * while executing the server rendering\r\n * @returns : true if using the browser\r\n */\r\n static isBrowser(): boolean {\r\n return typeof (window) !== 'undefined';\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the subfolders group or null to root\r\n * @returns : a node list\r\n */\r\n static toNodes(folders: INode[]): INode[] {\r\n return this._toNodes(folders, undefined);\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the children group or null to root\r\n * @param parent : the parent node\r\n * @returns : a node list \r\n */\r\n private static _toNodes(folders: INode[], parent?: INode): INode[] {\r\n const nodes: INode[] = [];\r\n folders.forEach((n: INode) => {\r\n const node: INode = {\r\n id: n.id,\r\n name: n.name,\r\n count: n.count,\r\n parent: parent,\r\n children: undefined,\r\n bag: n,\r\n };\r\n const children = n.children ?? n.subFolders ?? [];\r\n if (children.length > 0) {\r\n node.children = this._toNodes(children, node);\r\n }\r\n nodes.push(node);\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Returns an array of individual power-of-2 flag values that are set in `value`.\r\n * @param value - The bitmask to decompose.\r\n * @param max - Upper-bound exponent: checks flags from `1` up to `1 << max` (default: `30`).\r\n * @returns Array of set flag values, or an empty array when `value` is `0`.\r\n */\r\n static getFlags(value: number, max: number = 30): number[] {\r\n if (value !== 0) {\r\n const items: number[] = [];\r\n let v = 1;\r\n const m = 1 << max;\r\n while (v < m) {\r\n if ((value & v) === v) items.push(v);\r\n v = v << 1;\r\n }\r\n return items;\r\n } else return [];\r\n }\r\n\r\n /**\r\n * Check if a color is light or dark\r\n * @param color : the color\r\n * @param minimumLuminance : the lumimance to consider\r\n * @returns true if the color is light\r\n */\r\n static isColorLight(color: string, minimumLuminance: number = 186): boolean {\r\n const tempDiv = document.createElement('div');\r\n tempDiv.style.color = color;\r\n document.body.appendChild(tempDiv);\r\n const rgb = getComputedStyle(tempDiv).color;\r\n document.body.removeChild(tempDiv);\r\n const result = rgb.match(/\\d+/g);\r\n if (!result || result.length < 3) return true; // fallback\r\n const r = parseInt(result[0], 10);\r\n const g = parseInt(result[1], 10);\r\n const b = parseInt(result[2], 10);\r\n const luminance = 0.299 * r + 0.587 * g + 0.114 * b;\r\n return luminance > minimumLuminance;\r\n }\r\n\r\n}\r\n","import { DestroyRef, Directive, HostListener, inject, input } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { DateInterval } from '../definitions';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Directive that listens to `keyup` events on a date input and debounces changes\r\n * into a {@link DateInterval} model, converting shorthand strings (e.g. \"d/m\") to dates.\r\n * Apply `[dateIntervalChange]=\"interval\"` to the host `<input>` element.\r\n */\r\n@Directive({\r\n selector: '[dateIntervalChange]',\r\n standalone: true,\r\n})\r\nexport class DateIntervalChangeDirective {\r\n\r\n /** The date interval model to update when the input value changes. */\r\n readonly dateIntervalChange = input<DateInterval>(new DateInterval(null, null));\r\n\r\n /** When `true`, the directive updates the interval's end date; otherwise the start date. */\r\n readonly end = input<boolean>(false);\r\n\r\n private readonly subject = new Subject<KeyboardEvent>();\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n constructor() {\r\n this.subject\r\n .pipe(debounceTime(100), takeUntilDestroyed(this.destroyRef))\r\n .subscribe((e: KeyboardEvent) => {\r\n const value = (e.target as HTMLInputElement)?.value;\r\n if (value !== undefined) {\r\n SystemUtils.changeDateInterval(value, this.dateIntervalChange(), this.end(), e.key === ' ');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Handles `keyup` events on the host element.\r\n * Prevents default browser behaviour for the space key and forwards the event to the debounce pipeline.\r\n * @param e - The keyboard event emitted by the host input.\r\n */\r\n @HostListener('keyup', ['$event'])\r\n public onKeyup(e: KeyboardEvent): void {\r\n if (e.key === ' ') {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n this.subject.next(e);\r\n }\r\n}\r\n","import {\r\n Directive,\r\n HostListener,\r\n input,\r\n output\r\n} from '@angular/core';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Directive that copies a string payload to the clipboard when the host element is clicked.\r\n * Bind `[copyClipboard]=\"text\"` to provide the content to copy and listen to `(copied)` for confirmation.\r\n */\r\n@Directive({\r\n selector: '[copyClipboard]',\r\n standalone: true\r\n})\r\nexport class CopyClipboardDirective {\r\n\r\n /** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */\r\n readonly payload = input<string | undefined>(undefined, { alias: 'copyClipboard' });\r\n\r\n /** Emits the copied text after a successful copy operation. */\r\n readonly copied = output<string>({ alias: 'copied' });\r\n\r\n /**\r\n * Handles click events on the host element and copies the payload to the clipboard.\r\n * Emits `copied` with the copied text on success.\r\n * @param e - The mouse click event.\r\n */\r\n @HostListener('click', ['$event'])\r\n public onClick(e: MouseEvent): void {\r\n e.preventDefault();\r\n const payload = this.payload();\r\n if (!payload) return;\r\n\r\n if (SystemUtils.isBrowser()) {\r\n const listener = (clipEvent: ClipboardEvent) => {\r\n clipEvent.clipboardData?.setData('text/html', payload);\r\n clipEvent.preventDefault();\r\n this.copied.emit(payload);\r\n };\r\n\r\n document.addEventListener('copy', listener, false);\r\n document.execCommand('copy');\r\n document.removeEventListener('copy', listener, false);\r\n }\r\n }\r\n}\r\n","import { Directive, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that delegates validation to an externally provided validator function.\r\n * Bind `[validator]=\"myFn\"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.\r\n */\r\n@Directive({\r\n selector: '[validator]',\r\n providers: [{ provide: NG_VALIDATORS, useExisting: ValidatorDirective, multi: true }],\r\n standalone: true,\r\n})\r\nexport class ValidatorDirective implements Validator {\r\n\r\n /** The custom validator function to apply. */\r\n readonly validator = input<((control: AbstractControl) => ValidationErrors | null) | undefined>(undefined);\r\n\r\n /**\r\n * Invokes the provided validator function against the given control.\r\n * Returns `null` (valid) when no function is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const fn = this.validator();\r\n return fn ? fn(control) : null;\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { Validated } from '../definitions';\r\n\r\n/**\r\n * Directive that validates a control using the host object's `isValid()` method\r\n * or a boolean expression passed via `[validIf]`.\r\n */\r\n@Directive({\r\n selector: \"[validIf]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => ValidIfDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class ValidIfDirective implements Validator {\r\n\r\n /** When `true`, the control is considered valid regardless of the bound value. */\r\n readonly validIf = input<boolean>(false);\r\n\r\n /**\r\n * Validates the control value against a boolean flag or the value's own `isValid()` method.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n let isValid = false;\r\n const c = control.value ? (control.value as Validated) : null;\r\n if (!c) {\r\n isValid = this.validIf() === true;\r\n } else {\r\n try {\r\n isValid = c.isValid();\r\n } catch { }\r\n }\r\n return isValid ? null : { validIf: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that the host control's value equals the value of another control.\r\n * Bind `[equals]=\"otherControl\"`.\r\n */\r\n@Directive({\r\n selector: \"[equals]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EqualsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EqualsValidatorDirective implements Validator {\r\n\r\n /** The control whose value must match the host control's value. */\r\n readonly equals = input<AbstractControl | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the host control value equals the bound control's value.\r\n * Returns `null` (valid) when no control is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const eq = this.equals();\r\n if (!eq) return null;\r\n return eq.value === control.value ? null : { equals: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that the host control's value is different from another control's value.\r\n * Bind `[notEqual]=\"otherControl\"`.\r\n */\r\n@Directive({\r\n selector: \"[notEqual]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotEqualValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotEqualValidatorDirective implements Validator {\r\n\r\n /** The control whose value must differ from the host control's value. */\r\n readonly notEqual = input<AbstractControl | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the host control value is not equal to the bound control's value.\r\n * Also clears the `notequal` error on the other control when the host becomes valid.\r\n * Returns `null` (valid) when no control is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const notEqual = this.notEqual();\r\n if (!notEqual) return null;\r\n\r\n const isValid = (!notEqual.value && !control.value) || (notEqual.value !== control.value);\r\n const errors: ValidationErrors | null = isValid ? null : { notequal: true };\r\n\r\n if (errors) {\r\n control.markAsTouched();\r\n } else if (notEqual.hasError('notequal')) {\r\n notEqual.setErrors({ notequal: null });\r\n notEqual.updateValueAndValidity({ onlySelf: true, emitEvent: false });\r\n notEqual.markAsTouched();\r\n notEqual.markAsDirty();\r\n }\r\n return errors;\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a semicolon-separated list of email addresses.\r\n * Apply `emails` to a text input containing one or more addresses separated by `;`.\r\n */\r\n@Directive({\r\n selector: \"[emails]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EmailsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EmailsValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates each address in a semicolon-separated email list.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\r\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\r\n return isValid ? null : { emails: \"Elenco non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a GUID / UUID string.\r\n * Apply `guid` to a text input that expects a valid UUID.\r\n */\r\n@Directive({\r\n selector: \"[guid]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => GuidValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class GuidValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed GUID / UUID.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUUID(input) ? null : { guid: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { endOfDay } from 'date-fns';\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a parseable SQL-compatible date string.\r\n * Apply `sqlDate` to a text input that expects a date after year 1750.\r\n */\r\n@Directive({\r\n selector: \"[sqlDate]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => SqlDateValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class SqlDateValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value can be parsed as a date after 1750.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const d = endOfDay(SystemUtils.parseDate(input));\r\n return d.getFullYear() > 1750 ? null : { sqlDate: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { endOfDay } from 'date-fns';\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates that a control value is not a future date.\r\n * Apply `notFuture` to a text input that expects a date on or before today.\r\n */\r\n@Directive({\r\n selector: \"[notFuture]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotFutureValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotFutureValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value represents a date that is not in the future.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const today = endOfDay(new Date());\r\n const d = endOfDay(SystemUtils.parseDate(input));\r\n return d <= today ? null : { notFuture: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a well-formed URL.\r\n * Apply `url` to a text input that expects a URL.\r\n */\r\n@Directive({\r\n selector: \"[url]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => UrlValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class UrlValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed URL.\r\n * Returns `null` (valid) when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUrl(input) ? null : { url: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a file size against configurable minimum and maximum bounds.\r\n * Bind `[fileSize]` together with `[size]=\"fileSizeInMb\"`, `[maxSizeMb]`, and `[minSizeMb]`.\r\n */\r\n@Directive({\r\n selector: \"[fileSize]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => FileSizeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class FileSizeValidatorDirective implements Validator {\r\n\r\n /** Maximum allowed file size in megabytes. Defaults to 5. */\r\n readonly maxSizeMb = input<number>(5);\r\n\r\n /** Minimum required file size in megabytes. Defaults to 0. */\r\n readonly minSizeMb = input<number>(0);\r\n\r\n /** The actual file size in megabytes to validate against the bounds. */\r\n readonly size = input<number | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the bound file size falls within the configured min/max range.\r\n * Returns `null` when no control value is present.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control.value;\r\n if (!input) return null;\r\n const s = this.size() ?? 0;\r\n const isValid = s <= this.maxSizeMb() && s >= this.minSizeMb();\r\n return isValid ? null : { fileSize: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a control value does not exceed a maximum word count.\r\n * Bind `[maxTerms]=\"10\"` to allow at most 10 whitespace-separated terms.\r\n */\r\n@Directive({\r\n selector: \"[maxTerms]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => MaxTermsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class MaxTermsValidatorDirective implements Validator {\r\n\r\n /** The maximum number of whitespace-separated terms allowed. */\r\n readonly maxTerms = input<number>(0);\r\n\r\n /**\r\n * Validates that the control value contains no more than the configured number of terms.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input) return null;\r\n const terms = input.match(/\\S+/g)?.length ?? 0;\r\n return terms <= this.maxTerms() ? null : { maxTerms: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a sufficiently strong password.\r\n * Apply `password` to a password input.\r\n */\r\n@Directive({\r\n selector: \"[password]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => PasswordValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class PasswordValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value meets the minimum password-strength requirements.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value ?? '';\r\n const strength = SystemUtils.calculatePasswordStrength(input);\r\n return strength.isValid ? null : { password: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a time string against optional allowed time slot ranges.\r\n * Bind `[time]` and optionally `[slots]=\"'08:00-12:00|14:00-18:00'\"` (pipe-separated ranges).\r\n */\r\n@Directive({\r\n selector: \"[time]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => TimeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class TimeValidatorDirective implements Validator {\r\n\r\n /** Optional pipe-separated list of allowed time ranges, e.g. `\"08:00-12:00|14:00-18:00\"`. */\r\n readonly slots = input<string | undefined>(undefined);\r\n\r\n /**\r\n * Parses a `\"HH:MM\"` time string into a comparable integer (e.g. `\"09:30\"` -> `930`).\r\n * Returns `-1` when the string is not a valid time.\r\n * @param value - The time string to parse.\r\n */\r\n private getTime(value: string): number {\r\n const p = value.split(':');\r\n if (p.length !== 2) return -1;\r\n const hh = parseInt(p[0]);\r\n if (hh < 0 || hh > 23) return -1;\r\n const mm = parseInt(p[1]);\r\n if (mm < 0 || mm > 59) return -1;\r\n return parseInt(p[0] + p[1]);\r\n }\r\n\r\n /**\r\n * Validates that the control value is a valid time string and, when slots are configured,\r\n * that it falls within at least one of the allowed ranges.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n\r\n const t = this.getTime(input);\r\n if (t === -1) return { time: \"Non valido.\" };\r\n\r\n const slotsValue = this.slots();\r\n if (slotsValue) {\r\n const isValid = slotsValue.split('|').some(s => {\r\n const t1 = this.getTime(s.substring(0, 5));\r\n const t2 = this.getTime(s.substring(6));\r\n return t1 !== -1 && t2 !== -1 && t1 <= t && t2 >= t;\r\n });\r\n return isValid ? null : { time: \"Non valido.\" };\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a string control value is not blank (whitespace-only).\r\n * Apply `notEmpty` to a text input where non-blank content is required.\r\n */\r\n@Directive({\r\n selector: \"[notEmpty]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotEmptyValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotEmptyValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a non-blank string.\r\n * Returns `null` when the control is empty or not a string.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control?.value;\r\n if (!input || typeof input !== 'string' || input.length === 0) return null;\r\n return input.trim().length > 0 ? null : { notEmpty: true };\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { format } from 'date-fns';\r\nimport { it } from 'date-fns/locale';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * General-purpose formatting pipe that converts a raw value to a locale-aware string\r\n * based on the specified format type.\r\n *\r\n * Supported types: `'date'` / `'D'`, `'currency'` / `'C'`, `'number'` / `'N'`,\r\n * `'number0'` / `'N0'`, `'percentage'` / `'P'`.\r\n *\r\n * Usage: `{{ value | format:'currency' }}`\r\n */\r\n@Pipe({\r\n name: 'format',\r\n standalone: true\r\n})\r\nexport class FormatPipe implements PipeTransform {\r\n\r\n /**\r\n * Formats a value according to the specified type and optional pattern.\r\n * Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.\r\n * @param value - The raw value to format.\r\n * @param type - The format type identifier (default: `'date'`).\r\n * @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).\r\n * @returns A formatted string, or `undefined` when the value cannot be formatted.\r\n */\r\n transform(\r\n value?: unknown,\r\n type: string = 'date',\r\n pattern: string = 'dd/MM/yyyy'): string | undefined {\r\n\r\n if (value === undefined || value === null) return undefined;\r\n\r\n switch (type) {\r\n case 'D':\r\n case 'date': {\r\n const d = SystemUtils.parseDate(value as string | Date, it);\r\n if (d) return format(d, pattern, { locale: it });\r\n break;\r\n }\r\n case 'C':\r\n case 'currency':\r\n return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR' }).format(value as number);\r\n case 'N':\r\n case 'number':\r\n return new Intl.NumberFormat('it-IT', { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 2 }).format(value as number);\r\n case 'N0':\r\n case 'number0':\r\n return new Intl.NumberFormat('it-IT', { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 0 }).format(value as number);\r\n case 'P':\r\n case 'percentage':\r\n return new Intl.NumberFormat('it-IT', { style: 'percent', minimumFractionDigits: 0, maximumFractionDigits: 0 }).format(value as number);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that applies a global regex replacement on a string and returns the result\r\n * as sanitized HTML. When `regexValue` is `'\\n'` and no `replaceValue` is given,\r\n * newlines are replaced with `<br>` tags.\r\n *\r\n * Usage: `{{ text | replace:'\\n':'' }}`\r\n */\r\n@Pipe({\r\n name: 'replace',\r\n standalone: true\r\n})\r\nexport class ReplacePipe implements PipeTransform {\r\n\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Replaces all occurrences of `regexValue` in `value` with `replaceValue`.\r\n * Returns `undefined` when `value` is empty or `undefined`.\r\n * @param value - The source string to process.\r\n * @param regexValue - The regex pattern string to match (applied with the global flag).\r\n * @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\\n'` and this is falsy.\r\n * @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.\r\n */\r\n transform(value: string | undefined, regexValue: string, replaceValue: string): SafeHtml | undefined {\r\n if (!value) return undefined;\r\n const replacement = (regexValue === '\\n' && !replaceValue) ? '<br>' : replaceValue;\r\n return this.sanitizer.bypassSecurityTrustHtml(value.replace(new RegExp(regexValue, 'g'), replacement));\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that marks an HTML string as trusted so Angular does not escape it when\r\n * bound via `[innerHTML]`.\r\n *\r\n * Usage: `<div [innerHTML]=\"html | safeHtml\"></div>`\r\n */\r\n@Pipe({\r\n name: 'safeHtml',\r\n standalone: true\r\n})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Bypasses Angular's HTML sanitization and returns a `SafeHtml` instance.\r\n * @param value - The raw HTML string to trust. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be bound to `[innerHTML]` without escaping.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml(value ?? '');\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that marks a URL string as a trusted resource URL so Angular does not block it\r\n * when bound to attributes such as `[src]` or `[href]` on iframes, objects, or embeds.\r\n *\r\n * Usage: `<iframe [src]=\"url | safeUrl\"></iframe>`\r\n */\r\n@Pipe({\r\n name: 'safeUrl',\r\n standalone: true\r\n})\r\nexport class SafeUrlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Bypasses Angular's resource-URL sanitization and returns a `SafeResourceUrl` instance.\r\n * @param value - The URL string to trust. Treated as an empty string when `undefined`.\r\n * @returns A `SafeResourceUrl` that can be bound to resource URL attributes without blocking.\r\n */\r\n transform(value?: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(value ?? '');\r\n }\r\n}\r\n\r\n","import { PipeTransform, Pipe } from '@angular/core';\r\n\r\n/**\r\n * Impure pipe that filters an array using a caller-provided predicate function.\r\n * Because the pipe is impure it re-evaluates on every change-detection cycle,\r\n * which is necessary when the predicate's captured state changes.\r\n *\r\n * Usage: `*ngFor=\"let item of items | callback:myFilter\"`\r\n */\r\n@Pipe({\r\n name: 'callback',\r\n pure: false,\r\n standalone: true\r\n})\r\nexport class SearchCallbackPipe implements PipeTransform {\r\n\r\n /**\r\n * Filters `items` by applying `callback` to each element.\r\n * Returns the original array unchanged when either argument is falsy.\r\n * @param items - The source array to filter. May be `undefined`.\r\n * @param callback - A predicate function that returns `true` for items to keep.\r\n * @returns A new filtered array, the original array when no callback is provided,\r\n * or `undefined` when `items` is `undefined`.\r\n */\r\n transform<T>(items: T[] | undefined, callback: ((item: T) => boolean) | undefined): T[] | undefined {\r\n if (!items || !callback) return items;\r\n return items.filter(item => callback(item));\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { SearchFilterMetadata } from '../definitions';\r\n\r\n/**\r\n * Impure pipe that filters an array of searchable items against a text query.\r\n *\r\n * Each item is matched either via its `searchBag.name` property (when present)\r\n * or by converting the item itself to a lowercase string. The optional `metadata`\r\n * argument is updated in-place with the total item count and the filtered count,\r\n * making it usable in the template alongside `*ngFor`.\r\n *\r\n * Usage:\r\n * ```html\r\n * <div *ngFor=\"let item of items | search:filterText:meta\">...</div>\r\n * <div>Showing {{ meta.count }} of {{ meta.total }}</div>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'search',\r\n standalone: true\r\n})\r\nexport class SearchFilterPipe implements PipeTransform {\r\n\r\n /**\r\n * Filters `items` by performing a case-insensitive substring match against `value`.\r\n * When `items` or `value` is falsy the original array is returned unfiltered.\r\n * @param items - The source array to filter. May be `undefined`.\r\n * @param value - The search text to match against each item. May be `undefined`.\r\n * @param metadata - Optional object that is updated with `total` and `count` after filtering.\r\n * @returns The filtered array, the original array when no filter text is given,\r\n * or `undefined` when `items` is `undefined`.\r\n */\r\n transform(items?: any[], value?: string, metadata?: SearchFilterMetadata): any[] | undefined {\r\n metadata ??= { total: 0, count: 0 };\r\n\r\n if (!items || !value) return items;\r\n\r\n const query = value.toLowerCase();\r\n const result = items.filter(item => {\r\n if (!item) return false;\r\n const text: string | undefined = item.searchBag?.name ?? (typeof item === 'string' ? item : undefined);\r\n return text?.toLowerCase().includes(query) ?? false;\r\n });\r\n\r\n metadata.total = items.length;\r\n metadata.count = result.length;\r\n\r\n return result;\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that converts plain-text newlines (`\\r\\n`, `\\r`, `\\n`) to HTML `<br>` tags\r\n * and marks the result as trusted HTML so Angular does not escape it.\r\n *\r\n * Usage: `{{ text | formatHtml }}`\r\n */\r\n@Pipe({\r\n name: 'formatHtml',\r\n standalone: true\r\n})\r\nexport class FormatHtmlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Transforms a plain-text string into sanitized HTML by replacing newline characters\r\n * with `<br>` tags.\r\n * @param value - The input string to transform. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml((value ?? '').replaceAll(/(?:\\r\\n|\\r|\\n)/g, '<br>'));\r\n }\r\n}\r\n","export const Breakpoints = {\r\n XXSmall: '(max-width: 349.98px)',\r\n XSmall: '(max-width: 599.98px)',\r\n Small: '(min-width: 600px) and (max-width: 959.98px)',\r\n SmallMedium: '(min-width: 600px) and (max-width: 1059.98px)', \r\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\r\n MediumLarge: '(min-width: 960px) and (max-width: 1459.98px)',\r\n Large: '(min-width: 1460px) and (max-width: 1919.98px)'\r\n};","export const UtilsMessages = {\r\n /**\r\n * Messages\r\n */\r\n\r\n\r\n // Select dialog\r\n UTILS_DIALOGS_SELECT_OPTIONS_CHANGED: '§utils-dialogs-select-options-changed'\r\n};\r\n","import { computed, EventEmitter, signal } from '@angular/core';\r\nimport { SelectionModel } from \"@angular/cdk/collections\";\r\nimport { SystemUtils } from \"./system\";\r\n\r\n/**\r\n * Generic selection model that tracks a set of selected items identified by a lookup field.\r\n * Wraps Angular CDK's `SelectionModel` and adds lookup-based add/remove logic.\r\n *\r\n * @typeParam T - The item type held in the selection.\r\n * @typeParam V - The type of the lookup key used to identify items.\r\n */\r\nexport class SelectableModel<T, V> {\r\n\r\n /**\r\n * Emits whenever the selection changes.\r\n * Carries the affected item, or `undefined` when the whole selection is cleared.\r\n */\r\n readonly changed = new EventEmitter<T | undefined>();\r\n\r\n private readonly _all = signal<T[]>([]);\r\n\r\n /**\r\n * Snapshot of all items currently tracked by this model (selected or previously toggled).\r\n * Backed by a signal — reads are always up to date.\r\n */\r\n get all(): T[] {\r\n return this._all();\r\n }\r\n\r\n private readonly _current: SelectionModel<T>;\r\n\r\n /** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */\r\n get current(): SelectionModel<T> {\r\n return this._current;\r\n }\r\n\r\n private readonly _lookupFieldName: string;\r\n\r\n /** Signal that is `true` when at least one item is selected. */\r\n readonly hasValue = computed(() => this._all().length > 0);\r\n\r\n /**\r\n * @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.\r\n * @param lookupFieldName - Name of the note used as the unique key when searching the internal list (default: `'id'`).\r\n */\r\n constructor(\r\n allowMultiSelect: boolean = true,\r\n lookupFieldName: string = 'id'\r\n ) {\r\n this._current = new SelectionModel<T>(allowMultiSelect, []);\r\n this._lookupFieldName = lookupFieldName;\r\n }\r\n\r\n /**\r\n * Toggles the CDK selection state of an item that already exists in the tracked list.\r\n * Has no effect when `lookupValue` does not match any tracked item.\r\n * @param item - The item whose selection state should be toggled.\r\n * @param lookupValue - The key value used to locate the item in the internal list.\r\n */\r\n updateCurrent(item: T, lookupValue: V): void {\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p !== -1) {\r\n this._current.toggle(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n\r\n /**\r\n * Toggles an item in both the internal list and the CDK selection.\r\n * Adds the item when it is not yet tracked; removes it when it is.\r\n * @param item - The item to toggle.\r\n * @param lookupValue - The key value used to locate or register the item.\r\n */\r\n toggle(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p === -1) {\r\n this._all.update(arr => [...arr, item]);\r\n } else {\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n }\r\n this._current.toggle(item);\r\n this.changed.emit(item);\r\n }\r\n\r\n /**\r\n * Adds an item to the internal list (when not already present) and marks it as selected.\r\n * @param item - The item to select.\r\n * @param lookupValue - The key value used to locate or register the item.\r\n */\r\n select(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p === -1) {\r\n this._all.update(arr => [...arr, item]);\r\n }\r\n this._current.select(item);\r\n this.changed.emit(item);\r\n }\r\n\r\n /**\r\n * Removes an item from the internal list and deselects it in the CDK model.\r\n * Has no effect when the item is not currently tracked.\r\n * @param item - The item to deselect.\r\n * @param lookupValue - The key value used to locate the item in the internal list.\r\n */\r\n deselect(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p !== -1) {\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n this._current.deselect(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n\r\n /**\r\n * Deselects all items whose lookup key is contained in `lookupValues`.\r\n * @param lookupValues - Array of key values identifying the items to deselect.\r\n */\r\n deselectByValues(lookupValues: V[]): void {\r\n if (lookupValues.length === 0) return;\r\n for (const key of lookupValues) {\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, key);\r\n if (p !== -1) {\r\n const item = this._all()[p];\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n this._current.deselect(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Runs `clearFunc` against every currently selected item, then clears the CDK selection.\r\n * The internal tracked list is **not** affected; only the CDK selection is cleared.\r\n * @param clearFunc - Callback invoked for each currently selected item before clearing.\r\n */\r\n clearCurrent(clearFunc: (item: T) => void): void {\r\n for (const item of this._current.selected) {\r\n clearFunc(item);\r\n }\r\n this._current.clear();\r\n this.changed.emit(undefined);\r\n }\r\n\r\n /**\r\n * Clears both the internal tracked list and the CDK selection.\r\n */\r\n clear(): void {\r\n this._all.set([]);\r\n this._current.clear();\r\n this.changed.emit(undefined);\r\n }\r\n\r\n /**\r\n * Returns `true` when the item identified by `lookupValue` is present in the tracked list.\r\n * @param lookupValue - The key value to look up.\r\n */\r\n isSelected(lookupValue?: V): boolean {\r\n return (\r\n lookupValue !== undefined &&\r\n SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue) !== -1\r\n );\r\n }\r\n}\r\n","/**\r\n * Standard Broadcast Messages Manager\r\n * https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\r\n */\r\n\r\nimport { Subject } from 'rxjs';\r\n\r\n/** The typed message payload exchanged over the broadcast channel. */\r\nexport interface BroadcastChannelMessageBag<T> {\r\n /** Unique identifier for the message type. */\r\n messageId: string;\r\n /** Identifier of the sender. */\r\n sender: string;\r\n /** Optional typed data attached to the message. */\r\n data?: T;\r\n}\r\n\r\n/** Subscription descriptor that pairs a message type identifier with its handler. */\r\nexport interface BroadcastChannelSubscriberInfo<T> {\r\n /** The message type identifier to listen for. */\r\n messageId: string;\r\n /** Callback invoked with the full message bag when a matching message is received. */\r\n action: (bag: BroadcastChannelMessageBag<T>) => void;\r\n}\r\n\r\n/**\r\n * Wrapper around the native Web `BroadcastChannel` API that adds typed messaging,\r\n * multiple named subscriptions, and a graceful disposal mechanism.\r\n *\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\r\n */\r\nexport class BroadcastChannelManager {\r\n private channel?: BroadcastChannel;\r\n private readonly subject = new Subject<BroadcastChannelMessageBag<unknown>>();\r\n private subscriptions: BroadcastChannelSubscriberInfo<unknown>[] = [];\r\n\r\n /**\r\n * The name of the underlying `BroadcastChannel`, or `undefined` when the API\r\n * is not supported by the current browser.\r\n */\r\n public get currentBus(): string | undefined {\r\n return this.channel?.name;\r\n }\r\n\r\n /**\r\n * Opens a `BroadcastChannel` with the given name (when the API is available).\r\n * @param bus - The channel name to open (default: `'ARS-CHANNEL'`).\r\n */\r\n constructor(bus: string = 'ARS-CHANNEL') {\r\n if ('BroadcastChannel' in window) {\r\n this.channel = new BroadcastChannel(bus);\r\n\r\n this.channel.onmessageerror = (e: Event) => {\r\n console.error('[BroadcastChannelManager] Message receive error', e);\r\n };\r\n\r\n this.channel.onmessage = (e: MessageEvent) => {\r\n const bag = e.data as BroadcastChannelMessageBag<unknown> | undefined;\r\n if (!bag) return;\r\n this.subject.next(bag);\r\n const info = this.subscriptions.find(m => m.messageId === bag.messageId);\r\n info?.action(bag);\r\n };\r\n } else {\r\n console.error('[BroadcastChannelManager] BroadcastChannel API is not supported in this browser');\r\n }\r\n }\r\n\r\n /**\r\n * Closes the underlying channel and completes the internal subject after a short delay\r\n * to allow any in-flight messages to be delivered.\r\n */\r\n dispose(): void {\r\n setTimeout(() => {\r\n this.subscriptions = [];\r\n this.channel?.close();\r\n this.channel = undefined;\r\n this.subject.complete();\r\n }, 1000);\r\n }\r\n\r\n /**\r\n * Sends a typed message bag immediately.\r\n * @param bag - The message bag to send.\r\n * @example\r\n * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value });\r\n */\r\n sendMessage<T>(bag: BroadcastChannelMessageBag<T>): void;\r\n /**\r\n * Sends a typed message bag after an optional delay.\r\n * @param bag - The message bag to send.\r\n * @param delay - Milliseconds to wait before posting the message.\r\n * @example\r\n * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value }, 250);\r\n */\r\n sendMessage<T>(bag: BroadcastChannelMessageBag<T>, delay?: number): void;\r\n /**\r\n * Sends a message identified by a string ID with optional data.\r\n * @param messageId - The message type identifier.\r\n * @param data - Optional typed payload.\r\n * @example\r\n * channel.sendMessage('my-message', value);\r\n */\r\n sendMessage<T>(messageId: string, data?: T): void;\r\n /**\r\n * Sends a message identified by a string ID with optional data after an optional delay.\r\n * @param messageId - The message type identifier.\r\n * @param data - Optional typed payload.\r\n * @param delay - Milliseconds to wait before posting the message.\r\n * @example\r\n * channel.sendMessage('my-message', value, 250);\r\n */\r\n sendMessage<T>(messageId: string, data?: T, delay?: number): void;\r\n\r\n /** @internal Implementation that handles all overloads. */\r\n sendMessage<T>(messageIdOrBag: string | BroadcastChannelMessageBag<T>, dataOrDelay?: T | number, delay?: number): void {\r\n const effectiveDelay = (typeof dataOrDelay === 'number' ? dataOrDelay : delay) ?? 0;\r\n setTimeout(() => {\r\n if (typeof messageIdOrBag === 'string') {\r\n this.channel?.postMessage({ messageId: messageIdOrBag, data: dataOrDelay } as BroadcastChannelMessageBag<T>);\r\n } else {\r\n this.channel?.postMessage(messageIdOrBag);\r\n }\r\n }, effectiveDelay);\r\n }\r\n\r\n /**\r\n * Registers a handler for messages with the given `messageId`.\r\n * If a handler for the same `messageId` is already registered it is replaced.\r\n * @param args - The subscription descriptor containing the message ID and handler.\r\n */\r\n subscribe<T>(args: BroadcastChannelSubscriberInfo<T>): void {\r\n const i = this.subscriptions.findIndex(m => m.messageId === args.messageId);\r\n if (i === -1) {\r\n this.subscriptions.push(args as BroadcastChannelSubscriberInfo<unknown>);\r\n } else {\r\n this.subscriptions[i].action = args.action as (bag: BroadcastChannelMessageBag<unknown>) => void;\r\n }\r\n }\r\n\r\n /**\r\n * Removes the subscription for the given message ID, if one exists.\r\n * @param messageId - The message type identifier whose subscription should be removed.\r\n */\r\n unsubscribe(messageId: string): void {\r\n const i = this.subscriptions.findIndex(m => m.messageId === messageId);\r\n if (i !== -1) {\r\n this.subscriptions.splice(i, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all registered subscriptions.\r\n */\r\n unsubscribeAll(): void {\r\n this.subscriptions = [];\r\n }\r\n}\r\n\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { BroadcastChannelManager, BroadcastChannelMessageBag } from './broadcastChannelManager';\r\n\r\n/** Payload carried by every in-process broadcast message. */\r\nexport interface BroadcastMessageInfo {\r\n /** Unique identifier for the message type. */\r\n id: string;\r\n /** Optional data attached to the message. */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data?: any;\r\n}\r\n\r\n/**\r\n * Application-level messaging service that combines two transports:\r\n * - An in-process RxJS `Subject` for same-tab communication (`sendMessage` / `getMessage`).\r\n * - A native `BroadcastChannel` for cross-tab communication (`sendChannelMessage` / `subscribeChannelMessage`).\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BroadcastService implements OnDestroy {\r\n private readonly subject = new Subject<BroadcastMessageInfo>();\r\n private readonly channel = new BroadcastChannelManager('ARS-CHANNEL');\r\n\r\n /**\r\n * Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.\r\n * Useful when a caller needs direct channel access outside the service.\r\n * @returns A new `BroadcastChannelManager` connected to `'ARS-CHANNEL'`.\r\n */\r\n static GetChannel(): BroadcastChannelManager {\r\n return new BroadcastChannelManager('ARS-CHANNEL');\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.channel?.dispose();\r\n }\r\n\r\n /**\r\n * Publishes a message to the in-process subject, optionally after a delay.\r\n * @param id - The message type identifier.\r\n * @param data - Optional payload to attach to the message.\r\n * @param delay - Milliseconds to wait before publishing (default: `0`).\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sendMessage(id: string, data?: any, delay: number = 0): void {\r\n setTimeout(() => {\r\n this.subject.next({ id, data });\r\n }, delay);\r\n }\r\n\r\n /**\r\n * Publishes a typed message over the native `BroadcastChannel` (cross-tab), optionally after a delay.\r\n * @param id - The message type identifier.\r\n * @param data - Optional typed payload to send.\r\n * @param delay - Milliseconds to wait before sending (forwarded to the channel manager).\r\n */\r\n sendChannelMessage<T>(id: string, data?: T, delay?: number): void {\r\n this.channel.sendMessage(id, data, delay);\r\n }\r\n\r\n /**\r\n * Registers a handler that is invoked whenever a channel message with the given `id` is received.\r\n * @param id - The message type identifier to listen for.\r\n * @param action - Callback invoked with the full `BroadcastChannelMessageBag` when a matching message arrives.\r\n */\r\n subscribeChannelMessage<T>(id: string, action: (bag: BroadcastChannelMessageBag<T>) => void): void {\r\n this.channel.subscribe({ messageId: id, action });\r\n }\r\n\r\n /**\r\n * Returns an `Observable` that emits every in-process message published via `sendMessage`.\r\n * @returns An observable stream of `BroadcastMessageInfo` objects.\r\n */\r\n getMessage(): Observable<BroadcastMessageInfo> {\r\n return this.subject.asObservable();\r\n }\r\n}\r\n\r\n","import { Injectable, computed, signal } from '@angular/core';\r\n\r\n/**\r\n * Application-wide environment configuration service.\r\n * Exposes writable signals for the base URIs used throughout the application.\r\n * Values should be set once during application bootstrap (e.g. in `APP_INITIALIZER`).\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EnvironmentService {\r\n\r\n /** Writable signal holding the base URI of the frontend application (e.g. `https://app.example.com`). */\r\n readonly appUriSignal = signal<string>('');\r\n\r\n /** Writable signal holding the base URI of the backend API service (e.g. `https://api.example.com`). */\r\n readonly appServiceUriSignal = signal<string>('');\r\n\r\n /**\r\n * Writable signal holding the redirect URI used after login.\r\n * When empty, `appLoginRedirectUri` falls back to `appUri`.\r\n */\r\n readonly appLoginRedirectUriSignal = signal<string>('');\r\n\r\n /**\r\n * Writable signal holding the login endpoint URI of the backend service.\r\n * When empty, `appServiceLoginUri` falls back to `appServiceUri`.\r\n */\r\n readonly appServiceLoginUriSignal = signal<string>('');\r\n\r\n // ── Computed: fallback logic ──────────────────────────────────────────────\r\n\r\n private readonly _effectiveLoginRedirectUri = computed(() =>\r\n this.appLoginRedirectUriSignal() || this.appUriSignal()\r\n );\r\n\r\n private readonly _effectiveServiceLoginUri = computed(() =>\r\n this.appServiceLoginUriSignal() || this.appServiceUriSignal()\r\n );\r\n\r\n // ── Getter / setter API (kept for backward compatibility) ─────────────────\r\n\r\n /** Base URI of the frontend application. */\r\n get appUri(): string { return this.appUriSignal(); }\r\n /** @param value - The base URI of the frontend application. */\r\n set appUri(value: string) { this.appUriSignal.set(value); }\r\n\r\n /** Base URI of the backend API service. */\r\n get appServiceUri(): string { return this.appServiceUriSignal(); }\r\n /** @param value - The base URI of the backend API service. */\r\n set appServiceUri(value: string) { this.appServiceUriSignal.set(value); }\r\n\r\n /**\r\n * Effective login redirect URI.\r\n * Returns the explicitly set value, or falls back to `appUri` when empty.\r\n */\r\n get appLoginRedirectUri(): string { return this._effectiveLoginRedirectUri(); }\r\n /** @param value - The redirect URI to use after login. */\r\n set appLoginRedirectUri(value: string) { this.appLoginRedirectUriSignal.set(value); }\r\n\r\n /**\r\n * Effective service login URI.\r\n * Returns the explicitly set value, or falls back to `appServiceUri` when empty.\r\n */\r\n get appServiceLoginUri(): string { return this._effectiveServiceLoginUri(); }\r\n /** @param value - The login endpoint URI of the backend service. */\r\n set appServiceLoginUri(value: string) { this.appServiceLoginUriSignal.set(value); }\r\n}\r\n\r\n\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Service that exposes reactive screen and device-capability information.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScreenService {\r\n\r\n /**\r\n * Writable signal that holds the current Material breakpoint alias\r\n * (e.g. `'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`).\r\n * Updated externally by the breakpoint observer in the consuming component or module.\r\n */\r\n readonly mq = signal<string>('');\r\n\r\n /**\r\n * Returns `true` when the primary input mechanism can hover over elements\r\n * with coarse pointer precision (i.e. a touch screen).\r\n */\r\n get isTouchable(): boolean {\r\n return SystemUtils.isTouchable();\r\n }\r\n\r\n /**\r\n * Returns `true` when the current browser is Internet Explorer or the legacy Edge (EdgeHTML).\r\n * Modern Chromium-based Edge reports a different user-agent and will return `false`.\r\n */\r\n get isIEOrEdge(): boolean {\r\n return /msie\\s|trident\\/|edge\\//i.test(window.navigator.userAgent);\r\n }\r\n}\r\n\r\n","import { computed, inject, Injectable, OnDestroy, RendererFactory2, Signal, signal } from \"@angular/core\";\r\nimport { BroadcastChannelManager, BroadcastChannelMessageBag } from './broadcastChannelManager';\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\n\r\n/** The three available theme modes: follow system preference, force light, or force dark. */\r\nexport type ThemeType = 'auto' | 'light' | 'dark';\r\n\r\n/** Internal schema that maps each `ThemeType` to its UI representation and the next value in the toggle cycle. */\r\ninterface ThemeInfoRecord {\r\n /** Material icon code for the current theme. */\r\n icon: string;\r\n /** Human-readable label for the current theme. */\r\n name: string;\r\n /** The `ThemeType` that `toggleTheme()` will switch to next. */\r\n next: ThemeType;\r\n /** Tooltip text shown on the toggle button. */\r\n tooltip: string;\r\n}\r\n\r\n/**\r\n * Application-level theme management service.\r\n *\r\n * Responsibilities:\r\n * - Persists the user's preferred theme in `localStorage`.\r\n * - Applies `'light'` or `'dark'` CSS class to `<body>`.\r\n * - Reacts to OS-level colour-scheme changes when the theme is set to `'auto'`.\r\n * - Synchronises theme changes across browser tabs via `BroadcastChannel`.\r\n * - Exposes reactive signals (`themeIcon`, `themeName`, `toggleTooltip`) for the UI.\r\n */\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ThemeService implements OnDestroy {\r\n\r\n private readonly broadcastChannel = new BroadcastChannelManager('THEME-SERVICE');\r\n private readonly broadcastMessage = '$theme-changed';\r\n\r\n private readonly prefersColorSchemeMediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\r\n\r\n /**\r\n * Observable that emits the resolved (`'light'` or `'dark'`) theme whenever it changes.\r\n * Useful for components that cannot consume signals directly (e.g. class-based guards).\r\n * @example\r\n * this.themeService.changed\r\n * .pipe(takeUntilDestroyed(this.destroyRef))\r\n * .subscribe(theme => { ... });\r\n */\r\n public readonly changed: Observable<ThemeType>;\r\n private readonly themeChanged = new BehaviorSubject<ThemeType>('auto');\r\n\r\n private readonly renderFactory2 = inject(RendererFactory2);\r\n private readonly renderer = this.renderFactory2.createRenderer(null, null);\r\n\r\n /** The currently selected `ThemeType` (may be `'auto'`). */\r\n private readonly theme = signal<ThemeType>('light');\r\n\r\n /** `true` when the theme is set to follow the system preference. */\r\n private readonly auto: Signal<boolean> = computed(() => this.theme() === 'auto');\r\n\r\n private readonly themeInfo: Record<ThemeType, ThemeInfoRecord> = {\r\n auto: { icon: 'routine', name: 'Tema di sistema', next: 'light', tooltip: 'Passa a tema chiaro' },\r\n light: { icon: 'light_mode', name: 'Tema chiaro', next: 'dark', tooltip: 'Passa a tema scuro' },\r\n dark: { icon: 'dark_mode', name: 'Tema scuro', next: 'auto', tooltip: 'Passa a tema di sistema' },\r\n };\r\n\r\n /** Reactive Material icon code for the current theme (use with `<mat-icon>`). */\r\n public readonly themeIcon: Signal<string> = computed(() => this.themeInfo[this.theme()].icon);\r\n\r\n /** Reactive human-readable name of the current theme. */\r\n public readonly themeName: Signal<string> = computed(() => this.themeInfo[this.theme()].name);\r\n\r\n /** Reactive tooltip text for the theme toggle button. */\r\n public readonly toggleTooltip: Signal<string> = computed(() => this.themeInfo[this.theme()].tooltip);\r\n\r\n constructor() {\r\n this.changed = this.themeChanged.asObservable();\r\n }\r\n\r\n /**\r\n * Initialises the service: loads the preferred theme, registers OS-change listener,\r\n * and subscribes to cross-tab broadcast messages.\r\n * Call this once during application bootstrap (e.g. in `APP_INITIALIZER`).\r\n * @param theme - The initial theme to apply (defaults to the value stored in `localStorage`).\r\n */\r\n initialize(theme: ThemeType = this.getPreferredTheme()): void {\r\n this.prefersColorSchemeMediaQueryList.onchange = () => {\r\n if (this.auto()) this.setTheme(this.theme());\r\n };\r\n\r\n this.broadcastChannel.subscribe<ThemeType>({\r\n messageId: this.broadcastMessage,\r\n action: (bag: BroadcastChannelMessageBag<ThemeType>) => {\r\n if (bag.data && this.theme() !== bag.data) {\r\n this.setTheme(bag.data);\r\n }\r\n }\r\n });\r\n\r\n this.setTheme(theme);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.broadcastChannel.dispose();\r\n }\r\n\r\n /**\r\n * Advances the theme through the cycle: `auto` → `light` → `dark` → `auto`.\r\n */\r\n public toggleTheme(): void {\r\n this.setTheme(this.themeInfo[this.theme()].next);\r\n }\r\n\r\n /**\r\n * Returns the resolved effective theme (`'light'` or `'dark'`), taking the OS preference\r\n * into account when the current mode is `'auto'`.\r\n * @returns `'light'` or `'dark'` — never `'auto'`.\r\n */\r\n public getTheme(): ThemeType {\r\n if (this.auto()) {\r\n return this.prefersColorSchemeMediaQueryList.matches ? 'dark' : 'light';\r\n }\r\n return this.getPreferredTheme();\r\n }\r\n\r\n /**\r\n * Reads the theme stored in `localStorage` and validates it.\r\n * Falls back to `'auto'` when the stored value is missing or invalid.\r\n * @returns The persisted `ThemeType`, or `'auto'` as default.\r\n */\r\n private getPreferredTheme(): ThemeType {\r\n const stored = localStorage.getItem('preferred-theme');\r\n return stored && this.isTheme(stored) ? stored : 'auto';\r\n }\r\n\r\n /**\r\n * Returns `true` when `value` is a valid `ThemeType` string.\r\n * Acts as a TypeScript type guard.\r\n * @param value - The string to check.\r\n */\r\n private isTheme(value: string): value is ThemeType {\r\n return value === 'auto' || value === 'light' || value === 'dark';\r\n }\r\n\r\n /**\r\n * Applies the given theme to `<body>` (CSS class), persists it to `localStorage`,\r\n * notifies the `changed` observable, and broadcasts the change to other tabs.\r\n * @param theme - The `ThemeType` to apply (defaults to `'auto'`).\r\n */\r\n private setTheme(theme: ThemeType = 'auto'): void {\r\n this.renderer.removeClass(document.body, 'light');\r\n this.renderer.removeClass(document.body, 'dark');\r\n this.theme.set(theme);\r\n localStorage.setItem('preferred-theme', theme);\r\n const effectiveClass = this.auto()\r\n ? (this.prefersColorSchemeMediaQueryList.matches ? 'dark' : 'light')\r\n : theme;\r\n this.renderer.addClass(document.body, effectiveClass);\r\n this.themeChanged.next(this.getTheme());\r\n this.broadcastChannel.sendMessage(this.broadcastMessage, theme);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AutoFocusDirective } from './directives/autoFocusDirective';\r\nimport { DateIntervalChangeDirective } from './directives/changeDateIntervalDirective';\r\nimport { CopyClipboardDirective } from './directives/copyClipboardDirective';\r\nimport { EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SqlDateValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective } from './directives/validators';\r\nimport { FormatPipe } from './pipes/format.pipe';\r\nimport { ReplacePipe } from './pipes/replace.pipe';\r\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\r\nimport { SafeUrlPipe } from './pipes/safe-url.pipe';\r\nimport { SearchCallbackPipe } from './pipes/search-callback.pipe';\r\nimport { SearchFilterPipe } from './pipes/search-filter.pipe';\r\nimport { FormatHtmlPipe } from './pipes/format-html.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n FileSizeValidatorDirective,\r\n ValidIfDirective,\r\n ValidatorDirective,\r\n EqualsValidatorDirective,\r\n GuidValidatorDirective,\r\n EmailsValidatorDirective,\r\n UrlValidatorDirective,\r\n NotFutureValidatorDirective,\r\n NotEmptyValidatorDirective,\r\n PasswordValidatorDirective,\r\n DateIntervalChangeDirective,\r\n SqlDateValidatorDirective,\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe,\r\n CopyClipboardDirective,\r\n AutoFocusDirective,\r\n MaxTermsValidatorDirective\r\n ],\r\n exports: [\r\n FileSizeValidatorDirective,\r\n ValidIfDirective,\r\n ValidatorDirective,\r\n EqualsValidatorDirective,\r\n GuidValidatorDirective,\r\n EmailsValidatorDirective,\r\n UrlValidatorDirective,\r\n NotFutureValidatorDirective,\r\n NotEmptyValidatorDirective,\r\n PasswordValidatorDirective,\r\n DateIntervalChangeDirective,\r\n SqlDateValidatorDirective,\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe,\r\n CopyClipboardDirective,\r\n AutoFocusDirective,\r\n MaxTermsValidatorDirective\r\n ],\r\n providers: [\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe\r\n ]\r\n})\r\nexport class ArsCoreModule { }\r\n\r\nexport * from './definitions';\r\nexport * from './breakpoints';\r\nexport * from './messages';\r\nexport * from './selectable';\r\nexport * from './services/broadcast.service';\r\nexport * from './services/environment.service';\r\nexport * from './services/screen.service';\r\nexport * from './services/theme.service';\r\nexport * from './system';\r\n\r\n","import { inject, Injectable, NgModule } from '@angular/core';\r\nimport { DateAdapter, MatDateFormats, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';\r\nimport { TZDate } from '@date-fns/tz';\r\nimport {\r\n Locale,\r\n getMonth,\r\n getYear,\r\n getDate,\r\n getDay,\r\n getDaysInMonth,\r\n formatISO,\r\n addYears,\r\n addMonths,\r\n addDays,\r\n isValid,\r\n isDate,\r\n format,\r\n parseISO,\r\n parse,\r\n} from 'date-fns';\r\n\r\n\r\n/**\r\n * Creates an array of the given length, filling each slot with the result of `valueFunction`.\r\n * @param length - Number of elements to create.\r\n * @param valueFunction - Factory called with each index to produce the element value.\r\n * @returns Typed array of `length` elements.\r\n */\r\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\r\n const valuesArray = Array(length);\r\n for (let i = 0; i < length; i++) {\r\n valuesArray[i] = valueFunction(i);\r\n }\r\n return valuesArray;\r\n}\r\n\r\n// date-fns doesn't have a way to read/print month names or days of the week directly,\r\n// so we get them by formatting a date with a format that produces the desired month/day.\r\nconst MONTH_FORMATS = {\r\n long: 'LLLL',\r\n short: 'LLL',\r\n narrow: 'LLLLL',\r\n};\r\n\r\nconst DAY_OF_WEEK_FORMATS = {\r\n long: 'EEEE',\r\n short: 'EEE',\r\n narrow: 'EEEEE',\r\n};\r\n\r\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\r\n parse: {\r\n dateInput: 'P',\r\n },\r\n display: {\r\n dateInput: 'P',\r\n monthYearLabel: 'LLL uuuu',\r\n dateA11yLabel: 'PP',\r\n monthYearA11yLabel: 'LLLL uuuu',\r\n },\r\n};\r\n\r\n\r\n/**\r\n * date-fns adapter that integrates Angular Material's date picker with the date-fns library,\r\n * applying `Europe/Rome` timezone for all parsed and created dates.\r\n */\r\n@Injectable()\r\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const matDateLocale = inject(MAT_DATE_LOCALE, { optional: true });\r\n if (matDateLocale) {\r\n this.setLocale(matDateLocale as Locale);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the year component of the given date.\r\n * @param date - The source date.\r\n */\r\n getYear(date: Date): number {\r\n return getYear(date);\r\n }\r\n\r\n /**\r\n * Returns the zero-based month index of the given date (0 = January).\r\n * @param date - The source date.\r\n */\r\n getMonth(date: Date): number {\r\n return getMonth(date);\r\n }\r\n\r\n /**\r\n * Returns the day-of-month of the given date (1-based).\r\n * @param date - The source date.\r\n */\r\n getDate(date: Date): number {\r\n return getDate(date);\r\n }\r\n\r\n /**\r\n * Returns the day-of-week of the given date (0 = Sunday).\r\n * @param date - The source date.\r\n */\r\n getDayOfWeek(date: Date): number {\r\n return getDay(date);\r\n }\r\n\r\n /**\r\n * Returns an array of 12 month name strings formatted for the active locale.\r\n * @param style - One of `'long'`, `'short'`, or `'narrow'`.\r\n */\r\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const pattern = MONTH_FORMATS[style];\r\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\r\n }\r\n\r\n /**\r\n * Returns an array of 31 day-of-month label strings formatted using `Intl.DateTimeFormat`\r\n * when available, falling back to plain numeric strings.\r\n */\r\n getDateNames(): string[] {\r\n const dtf =\r\n typeof Intl !== 'undefined'\r\n ? new Intl.DateTimeFormat(this.locale?.code, {\r\n day: 'numeric',\r\n timeZone: 'utc',\r\n })\r\n : null;\r\n\r\n return range(31, i => {\r\n if (dtf) {\r\n // date-fns doesn't appear to support this functionality.\r\n // Fall back to `Intl` on supported browsers.\r\n const date = new Date();\r\n date.setUTCFullYear(2017, 0, i + 1);\r\n date.setUTCHours(0, 0, 0, 0);\r\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\r\n }\r\n\r\n return String(i + 1);\r\n });\r\n }\r\n\r\n /**\r\n * Returns an array of 7 day-of-week name strings formatted for the active locale.\r\n * @param style - One of `'long'`, `'short'`, or `'narrow'`.\r\n */\r\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const pattern = DAY_OF_WEEK_FORMATS[style];\r\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\r\n }\r\n\r\n /**\r\n * Returns the four-digit year string for the given date.\r\n * @param date - The source date.\r\n */\r\n getYearName(date: Date): string {\r\n return this.format(date, 'y');\r\n }\r\n\r\n /**\r\n * Returns the first day of the week for the active locale (0 = Sunday, 1 = Monday, …).\r\n */\r\n getFirstDayOfWeek(): number {\r\n return this.locale?.options?.weekStartsOn ?? 0;\r\n }\r\n\r\n /**\r\n * Returns the number of days in the month of the given date.\r\n * @param date - The source date.\r\n */\r\n getNumDaysInMonth(date: Date): number {\r\n return getDaysInMonth(date);\r\n }\r\n\r\n /**\r\n * Creates an independent copy of the given date.\r\n * @param date - The date to clone.\r\n */\r\n clone(date: Date): Date {\r\n return new Date(date.getTime());\r\n }\r\n\r\n /**\r\n * Creates a `Date` in the `Europe/Rome` timezone for the given year, month, and day.\r\n * Throws an `Error` when any component is out of range.\r\n * @param year - Full four-digit year.\r\n * @param month - Zero-based month index (0 = January, 11 = December).\r\n * @param date - Day-of-month (1-based).\r\n */\r\n createDate(year: number, month: number, date: number): Date {\r\n if (month < 0 || month > 11) {\r\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\r\n }\r\n\r\n if (date < 1) {\r\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\r\n }\r\n\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this we use `setFullYear` and `setHours` instead.\r\n const result = new Date();\r\n result.setFullYear(year, month, date);\r\n result.setHours(0, 0, 0, 0);\r\n const result2 = new TZDate(result, 'Europe/Rome');\r\n\r\n if (result2.getMonth() !== month) {\r\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\r\n }\r\n\r\n return result2;\r\n }\r\n\r\n /**\r\n * Returns today's date in the local timezone.\r\n */\r\n today(): Date {\r\n return new Date();\r\n }\r\n\r\n /**\r\n * Parses a value into a `Date`.\r\n * - Strings are first attempted as ISO 8601, then matched against each format in `parseFormat`.\r\n * - Numbers are treated as Unix timestamps (milliseconds).\r\n * - Existing `Date` instances are cloned.\r\n * @param value - The value to parse.\r\n * @param parseFormat - A format string or an array of format strings (date-fns tokens).\r\n * @returns A valid `Date` in `Europe/Rome`, an invalid sentinel, or `null` for unrecognised input.\r\n */\r\n parse(value: unknown, parseFormat: string | string[]): Date | null {\r\n if (typeof value === 'string' && value.length > 0) {\r\n const iso8601Date = parseISO(value);\r\n if (this.isValid(iso8601Date)) {\r\n return new TZDate(iso8601Date, 'Europe/Rome');\r\n }\r\n\r\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\r\n\r\n if (!formats.length) {\r\n throw Error('Formats array must not be empty.');\r\n }\r\n\r\n for (const currentFormat of formats) {\r\n const fromFormat = parse(value, currentFormat, new Date(), { locale: this.locale });\r\n if (this.isValid(fromFormat)) {\r\n return new TZDate(fromFormat, 'Europe/Rome');\r\n }\r\n }\r\n\r\n return this.invalid();\r\n } else if (typeof value === 'number') {\r\n return new Date(value);\r\n } else if (value instanceof Date) {\r\n return this.clone(value);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Formats a `Date` using the given date-fns display format string.\r\n * Throws an `Error` when `date` is not valid.\r\n * @param date - The date to format.\r\n * @param displayFormat - A date-fns format string (e.g. `'P'`, `'LLL uuuu'`).\r\n */\r\n format(date: Date, displayFormat: string): string {\r\n if (!this.isValid(date)) {\r\n throw Error('DateFnsAdapter: Cannot format invalid date.');\r\n }\r\n\r\n return format(date, displayFormat, { locale: this.locale });\r\n }\r\n\r\n /**\r\n * Adds the given number of whole years to a date.\r\n * @param date - The base date.\r\n * @param years - Number of years to add (can be negative).\r\n */\r\n addCalendarYears(date: Date, years: number): Date {\r\n return addYears(date, years);\r\n }\r\n\r\n /**\r\n * Adds the given number of whole months to a date.\r\n * @param date - The base date.\r\n * @param months - Number of months to add (can be negative).\r\n */\r\n addCalendarMonths(date: Date, months: number): Date {\r\n return addMonths(date, months);\r\n }\r\n\r\n /**\r\n * Adds the given number of whole days to a date.\r\n * @param date - The base date.\r\n * @param days - Number of days to add (can be negative).\r\n */\r\n addCalendarDays(date: Date, days: number): Date {\r\n return addDays(date, days);\r\n }\r\n\r\n /**\r\n * Serialises a date to an ISO 8601 date string (`yyyy-MM-dd`).\r\n * @param date - The date to serialise.\r\n */\r\n toIso8601(date: Date): string {\r\n return formatISO(date, { representation: 'date' });\r\n }\r\n\r\n /**\r\n * Returns the given value when it is a valid `Date`, or `null` for an empty string.\r\n * Deserialises valid ISO 8601 strings into `Date` instances.\r\n * Delegates all other values to the base-class implementation.\r\n * @param value - The raw value to deserialise.\r\n */\r\n override deserialize(value: unknown): Date | null {\r\n if (typeof value === 'string') {\r\n if (!value) {\r\n return null;\r\n }\r\n const date = parseISO(value);\r\n if (this.isValid(date)) {\r\n return date;\r\n }\r\n }\r\n return super.deserialize(value);\r\n }\r\n\r\n /**\r\n * Returns `true` when `obj` is an instance of `Date`.\r\n * @param obj - The object to test.\r\n */\r\n isDateInstance(obj: unknown): boolean {\r\n return isDate(obj);\r\n }\r\n\r\n /**\r\n * Returns `true` when `date` represents a valid point in time.\r\n * @param date - The date to validate.\r\n */\r\n isValid(date: Date): boolean {\r\n return isValid(date);\r\n }\r\n\r\n /**\r\n * Returns a sentinel `Date` that represents an invalid date (`new Date(NaN)`).\r\n */\r\n invalid(): Date {\r\n return new Date(NaN);\r\n }\r\n}\r\n\r\n@NgModule({\r\n providers: [\r\n {\r\n provide: DateAdapter,\r\n useClass: DateFnsAdapter,\r\n deps: [MAT_DATE_LOCALE],\r\n },\r\n { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }\r\n ],\r\n})\r\nexport class ArsDateFnsModule { }\r\n","import { Directive, ElementRef, HostListener, inject } from '@angular/core';\r\n\r\n/**\r\n * Directive that removes focus from the host element after it is clicked,\r\n * preventing the browser from keeping a visible focus ring post-interaction.\r\n * Apply `removeFocus` to any focusable element (e.g. a button).\r\n */\r\n@Directive({\r\n selector: '[removeFocus]',\r\n standalone: true\r\n})\r\nexport class RemoveFocusDirective {\r\n\r\n private readonly elementRef = inject(ElementRef);\r\n\r\n /**\r\n * Handles click events on the host element and blurs it on the next event-loop tick\r\n * so that the click action completes before focus is removed.\r\n */\r\n @HostListener('click')\r\n onClick(): void {\r\n const el = this.elementRef.nativeElement;\r\n if (el && typeof el.blur === 'function') {\r\n setTimeout(() => el.blur(), 0);\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Pipe that converts a Markdown string to sanitized HTML using `SystemUtils.markdownToHtml`.\r\n *\r\n * Usage: `{{ text | formatMarkdown }}`\r\n */\r\n@Pipe({\r\n name: 'formatMarkdown',\r\n standalone: true\r\n})\r\nexport class FormatMarkdownPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Transforms a Markdown string into sanitized HTML.\r\n * @param value - The Markdown input to convert. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml(\r\n SystemUtils.markdownToHtml(value ?? ''));\r\n }\r\n}\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './core.module';\r\nexport * from './dateFnsAdapter.module';\r\nexport * from './directives/index';\r\nexport * from './pipes/index';\r\nexport * from './system';\r\nexport * from './definitions';\r\nexport * from './breakpoints';\r\nexport * from './selectable';\r\nexport * from './services/index';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;;;AAGG;MAKU,kBAAkB,CAAA;AAI3B,IAAA,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,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,gBAAgB;AACtB,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACZD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-core.mjs","sources":["../../../projects/ars-utils/core/directives/autoFocusDirective.ts","../../../projects/ars-utils/core/definitions.ts","../../../projects/ars-utils/core/system.ts","../../../projects/ars-utils/core/directives/changeDateIntervalDirective.ts","../../../projects/ars-utils/core/directives/copyClipboardDirective.ts","../../../projects/ars-utils/core/directives/validatorDirective.ts","../../../projects/ars-utils/core/directives/validIfDirective.ts","../../../projects/ars-utils/core/directives/equalsValidatorDirective.ts","../../../projects/ars-utils/core/directives/notEqualValidatorDirective.ts","../../../projects/ars-utils/core/directives/emailsValidatorDirective.ts","../../../projects/ars-utils/core/directives/guidValidatorDirective.ts","../../../projects/ars-utils/core/directives/sqlDateValidatorDirective.ts","../../../projects/ars-utils/core/directives/notFutureValidatorDirective.ts","../../../projects/ars-utils/core/directives/urlValidatorDirective.ts","../../../projects/ars-utils/core/directives/fileSizeValidatorDirective.ts","../../../projects/ars-utils/core/directives/maxTermsValidatorDirective.ts","../../../projects/ars-utils/core/directives/passwordValidatorDirective.ts","../../../projects/ars-utils/core/directives/timeValidatorDirective.ts","../../../projects/ars-utils/core/directives/notEmptyValidatorDirective.ts","../../../projects/ars-utils/core/pipes/format.pipe.ts","../../../projects/ars-utils/core/pipes/replace.pipe.ts","../../../projects/ars-utils/core/pipes/safe-html.pipe.ts","../../../projects/ars-utils/core/pipes/safe-url.pipe.ts","../../../projects/ars-utils/core/pipes/search-callback.pipe.ts","../../../projects/ars-utils/core/pipes/search-filter.pipe.ts","../../../projects/ars-utils/core/pipes/format-html.pipe.ts","../../../projects/ars-utils/core/breakpoints.ts","../../../projects/ars-utils/core/messages.ts","../../../projects/ars-utils/core/selectable.ts","../../../projects/ars-utils/core/services/broadcastChannelManager.ts","../../../projects/ars-utils/core/services/broadcast.service.ts","../../../projects/ars-utils/core/services/environment.service.ts","../../../projects/ars-utils/core/services/screen.service.ts","../../../projects/ars-utils/core/services/theme.service.ts","../../../projects/ars-utils/core/core.module.ts","../../../projects/ars-utils/core/dateFnsAdapter.module.ts","../../../projects/ars-utils/core/directives/removeFocusDirective.ts","../../../projects/ars-utils/core/pipes/format-markdown.pipe.ts","../../../projects/ars-utils/core/public_api.ts","../../../projects/ars-utils/core/arsedizioni-ars-utils-core.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\r\n\r\n/**\r\n * Directive that moves browser focus to the host element after the first render cycle.\r\n * Apply `autoFocus` to any focusable element to set focus automatically on initialisation.\r\n */\r\n@Directive({\r\n selector: '[autoFocus]',\r\n standalone: true\r\n})\r\nexport class AutoFocusDirective {\r\n\r\n private readonly elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n this.elementRef.nativeElement?.focus();\r\n });\r\n }\r\n}\r\n","import { INode } from './system';\r\n\r\nexport interface DoneResult<T> {\r\n isNew?: boolean;\r\n data?: T;\r\n}\r\n\r\nexport interface ApiResponse {\r\n success: boolean;\r\n message: string;\r\n}\r\n\r\nexport interface ApiResult<T> extends ApiResponse {\r\n value: T;\r\n}\r\n\r\nexport interface Folder extends INode {\r\n teamId?: string;\r\n parentId?: string;\r\n position?: number;\r\n isPrivate?: boolean;\r\n itemsCount?: number;\r\n subItemsCount?: number;\r\n\r\n}\r\n\r\nexport interface FolderTree extends Folder {\r\n children?: Folder[];\r\n path?: string;\r\n}\r\n\r\nexport interface File<T> {\r\n ownerId?: T;\r\n id?: number;\r\n fileName: string;\r\n fileData: unknown;\r\n}\r\n\r\nexport interface Validated {\r\n isValid(): boolean;\r\n}\r\n\r\nexport class FileInfo implements Validated {\r\n file: any;\r\n valid!: boolean;\r\n\r\n isValid(): boolean {\r\n return this.valid;\r\n }\r\n}\r\n\r\nexport interface ErrorInfo {\r\n invalidateSession?: boolean;\r\n title?: string;\r\n message?: string;\r\n errorStatus?: number;\r\n service?: string;\r\n}\r\n\r\nexport interface NameValueItem<T> {\r\n name: string;\r\n value: T;\r\n shortName?: string;\r\n parentName?: string;\r\n parentValue?: T;\r\n header?: string;\r\n bag?: any;\r\n bagInfo?: string;\r\n disabled?: boolean;\r\n selected?: boolean;\r\n}\r\n\r\nexport interface Checkable {\r\n checked?: boolean;\r\n bag: unknown;\r\n getId(): unknown;\r\n}\r\n\r\n\r\nexport class ValueModel<T> {\r\n value: T;\r\n}\r\nexport class IDModel<T = number> {\r\n id: T;\r\n}\r\nexport class GroupModel<T = number> {\r\n ids: T[];\r\n}\r\n\r\nexport class DeleteModel<T = number> extends GroupModel<T> {\r\n mode?: number;\r\n parentId?: T;\r\n}\r\n\r\nexport interface DeleteResultModel<T> {\r\n items?: T[],\r\n deleted: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport class RelationModel<T = number> {\r\n id: T;\r\n parentId: T;\r\n}\r\n\r\nexport class UpdateRelationsModel<T = number> {\r\n id: T;\r\n relatedIds: T[];\r\n}\r\n\r\nexport class QueryModel {\r\n any?: string;\r\n sortBy?: string;\r\n sortDescending?: boolean;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface QueryResultModel<T> {\r\n interval?: string;\r\n items: T[];\r\n total: number;\r\n}\r\n\r\nexport interface UpdateModel<T = number> {\r\n parentId?: T;\r\n ids: T[];\r\n}\r\n\r\nexport interface UpdateResultModel<T> {\r\n items?: T[];\r\n updated: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport interface AddModel<T> extends UpdateModel<T> {\r\n\r\n}\r\n\r\nexport interface AddResultModel<T> {\r\n items?: T[];\r\n added: number;\r\n total: number;\r\n log?: string;\r\n}\r\n\r\nexport class ImportModel {\r\n origin: string;\r\n dataFile: FileInfo;\r\n jumpFirstLine?: boolean;\r\n map?: unknown;\r\n}\r\n\r\nexport interface EnableDisableModel {\r\n value: boolean;\r\n}\r\n\r\nexport interface SendToModel {\r\n sendToRecipients?: string;\r\n sendToSubject?: string;\r\n sendToText?: string;\r\n}\r\n\r\nexport interface SearchBag {\r\n name: string;\r\n}\r\n\r\nexport interface Searchable {\r\n searchBag: SearchBag;\r\n}\r\n\r\nexport interface SearchFilterMetadata {\r\n total: number; // totale elementi\r\n count: number; // conteggio filtrati\r\n}\r\n\r\nexport class DateInterval {\r\n from?: Date;\r\n to?: Date;\r\n get fromAsDate(): Date | undefined {\r\n if (this.from) {\r\n if (!(this.from instanceof Date)) {\r\n this.from = new Date(this.from);\r\n }\r\n if (this.from) {\r\n return new Date(\r\n this.from.getFullYear(),\r\n this.from.getMonth(),\r\n this.from.getDate(),\r\n 2,\r\n 0,\r\n 0\r\n )\r\n }\r\n }\r\n return undefined;\r\n }\r\n get toAsDate(): Date {\r\n if (this.to) {\r\n if (!(this.to instanceof Date)) {\r\n this.to = new Date(this.to);\r\n }\r\n if (this.to) {\r\n return new Date(\r\n this.to.getFullYear(),\r\n this.to.getMonth(),\r\n this.to.getDate(),\r\n 2,\r\n 0,\r\n 0\r\n )\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n constructor(from?: Date, to?: Date) {\r\n this.from = from;\r\n this.to = to;\r\n }\r\n\r\n clear(): void {\r\n this.from = undefined;\r\n this.to = undefined;\r\n }\r\n}\r\n\r\nexport interface LoginResult<T> extends ApiResult<boolean> {\r\n context: T;\r\n oauth?: number;\r\n requiresMfa?: boolean;\r\n}\r\n","import { HttpParams } from \"@angular/common/http\";\r\nimport { DateInterval } from './definitions';\r\nimport { format, Locale, parse, parseISO } from 'date-fns';\r\nimport { it } from 'date-fns/locale';\r\nimport { TZDate } from '@date-fns/tz';\r\n\r\nexport interface INode {\r\n id: string;\r\n name?: string;\r\n count?: number;\r\n children?: INode[];\r\n subFolders?: INode[];\r\n parent?: INode;\r\n bag?: unknown;\r\n}\r\n\r\n\r\nexport enum DateFormat {\r\n Short = 1, // dd/mm/yyyy\r\n Long = 2, // d mmmm yyyy\r\n LongWithShortMonth = 3, // d mmm yyyy\r\n LongWithWeekDay = 4, // wwww, d mmmm yyyy\r\n LongWithShortWeekDay = 5, // www, d mmmm yyyy\r\n MonthAndYear = 6, // mmm yyyy\r\n LongMonthAndYear = 7, // mmmm yyyy\r\n WeekDay = 8, // www d\r\n LongWeekDay = 9, // wwww d\r\n DayAndMonth = 10, // d mmmm\r\n ShortUS = 11, // mm/dd/yyyy\r\n ShortISO8601 = 12 // yyyy-mm-dd\r\n}\r\n\r\nexport interface PasswordStrength {\r\n score: number;\r\n label?: string;\r\n color?: string;\r\n suggestions?: string[];\r\n isValid: boolean;\r\n}\r\n\r\ninterface MarkdownListState {\r\n type: 'ul' | 'ol' | null;\r\n items: string[];\r\n}\r\n\r\nexport class SystemUtils {\r\n /**\r\n * Array find by key\r\n * @param array : the array to scan\r\n * @param key : key name\r\n * @param value : the value to search for\r\n * @returns : the property value or null\r\n */\r\n static arrayFindByKey<T>(array: T[] | undefined, key: string, value: unknown): T | undefined {\r\n if (!array) return undefined;\r\n for (const item of array) {\r\n if ((item as any)[key] === value) {\r\n return item;\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Array find index by key\r\n * @param array : the array to scan\r\n * @param key : the key name\r\n * @param value : the value to search for\r\n * @returns : the array index or -1 if not found\r\n */\r\n static arrayFindIndexByKey<T>(array: T[] | undefined, key: string, value: unknown): number {\r\n if (!array) return -1;\r\n for (let i = 0; i < array.length; i++) {\r\n if ((array[i] as any)[key] === value) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Get a value from and array made of name|value items\r\n * @param array : the array to scan\r\n * @param value : the value to search for\r\n * @returns : the property value or null if not found\r\n */\r\n static arrayGetValue<T>(array: T[] | undefined, value: unknown): unknown {\r\n if (!array) return undefined;\r\n for (const item of array) {\r\n const i = item as Record<string, unknown>;\r\n if (i['value'] === value) {\r\n return i['name'] ?? i['id'];\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Convert items to nodes into a tree structure\r\n * @param items : list of nodes\r\n * @param parent : parent node\r\n * @returns : an array of INode objects\r\n */\r\n static arrayToNodes(items: INode[], parent?: INode): INode[] {\r\n const nodes: INode[] = [];\r\n items.forEach(n => {\r\n const node: INode = {\r\n id: n.id.toString(),\r\n name: n.name,\r\n count: n.count ? n.count : 0,\r\n children: undefined,\r\n parent,\r\n bag: n,\r\n };\r\n nodes.push(node);\r\n node.children =\r\n n.children && n.children.length > 0\r\n ? this.arrayToNodes(n.children, node)\r\n : [];\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Comparator factory for sorting arrays of objects by a given property key.\r\n * @param key - Name of the property to sort by.\r\n * @param order - Sort direction: `'asc'` (default) or `'desc'`.\r\n * @returns A comparator function that returns `0`, `1`, or `-1`.\r\n */\r\n static arraySortCompare(\r\n key: string,\r\n order: string = 'asc'\r\n ): (a: Record<string, unknown>, b: Record<string, unknown>) => number {\r\n return function innerSort(a: Record<string, unknown>, b: Record<string, unknown>): number {\r\n if (!Object.prototype.hasOwnProperty.call(a, key) || !Object.prototype.hasOwnProperty.call(b, key)) {\r\n return 0;\r\n }\r\n const varA = typeof a[key] === 'string' ? (a[key] as string).toUpperCase() : a[key];\r\n const varB = typeof b[key] === 'string' ? (b[key] as string).toUpperCase() : b[key];\r\n let comparison = 0;\r\n if (varA > varB) comparison = 1;\r\n else if (varA < varB) comparison = -1;\r\n return order === 'desc' ? comparison * -1 : comparison;\r\n };\r\n }\r\n\r\n /**\r\n * Format weight\r\n * @param gr : grams\r\n * @returns : the formatted string\r\n */\r\n static formatWeight(gr: number): string {\r\n if (gr > 1000000) return `${(gr / 1000000).toFixed(2)} t`;\r\n else if (gr > 100000) return `${(gr / 100000).toFixed(2)} q`;\r\n else if (gr > 1000) return `${(gr / 1000).toFixed(2)} kg`;\r\n else return `${gr} gr`;\r\n }\r\n\r\n /**\r\n * Format file size\r\n * @param bytes : number of bytes\r\n * @returns : the formatted string\r\n */\r\n static formatFileSize(bytes: number): string {\r\n if (bytes > 1024000) return `${(bytes / 1024000).toFixed(1)} MB`;\r\n if (bytes > 1024) return `${(bytes / 1024).toFixed(1)} Kb`;\r\n return `${bytes} byte`;\r\n }\r\n\r\n /**\r\n * Compare two string\r\n * @param a : string a\r\n * @param b : string b\r\n * @returns : 0 if equals, 1 if bigger, -1 if lower\r\n */\r\n static compareString(a?: string, b?: string): number {\r\n if ((a ?? \"\").toLowerCase() > (b ?? \"\").toLowerCase()) return 1;\r\n if ((a ?? \"\").toLowerCase() < (b ?? \"\").toLowerCase()) return -1;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Capitalize a string\r\n * @param s : the string to capitalize\r\n * @returns : the capitalized string \r\n */\r\n static capitalize(s?: string): string | undefined {\r\n if (!s) return undefined;\r\n let b = \"\";\r\n let cap = true;\r\n for (const char of s) {\r\n if (char === \" \") {\r\n b += char;\r\n cap = true;\r\n } else if (cap) {\r\n b += char.toUpperCase();\r\n cap = false;\r\n } else {\r\n b += char.toLowerCase();\r\n }\r\n }\r\n return b;\r\n }\r\n\r\n /**\r\n * Truncate a string\r\n * @param s : the string to truncate\r\n * @param max : the max number of chars\r\n * @returns : the truncated string\r\n */\r\n static truncate(s?: string, max: number = 500): string | undefined {\r\n if (!s) return undefined;\r\n if (s.length < max) return s;\r\n let i = max - 1;\r\n while (i > 0) {\r\n if (s[i] === ' ') return s.slice(0, i);\r\n i--;\r\n }\r\n return s;\r\n }\r\n\r\n /**\r\n * Join a list of strings\r\n * @param items : the list of strings\r\n * @param sep : the separator string\r\n * @param max : the maximum resulting string\r\n * @returns : the joined string\r\n */\r\n static join(items?: string[], sep: string = \" \", max: number = 350): string | undefined {\r\n if (!items || items.length === 0) return undefined;\r\n if (items.length > 1) {\r\n let l = 0;\r\n let s = \"\"\r\n while (s.length < max && items.length > l) {\r\n if (l > 0) {\r\n s += sep;\r\n }\r\n s += items[l++];\r\n }\r\n if (items.length > l) {\r\n s += \"...\";\r\n }\r\n return s;\r\n }\r\n return items[0];\r\n }\r\n\r\n /**\r\n * Normalize a string by converting it to lowercase and removing extra spaces, with special handling for acronyms and camelCase.\r\n * @param s : the string to normalize \r\n * @returns : The normalized string, or `undefined` if the input is falsy.\r\n */\r\n static normalize(s?: string): string | undefined {\r\n if (!s) return s;\r\n return s\r\n .split(' ')\r\n .map((word, wordIndex) => {\r\n if (!word) return word;\r\n\r\n // If the word is all uppercase and contains at least one letter, we assume it's an acronym and leave it as is\r\n if (word === word.toUpperCase() && /[A-Z]/.test(word)) {\r\n return word;\r\n }\r\n\r\n // Otherwise, convert to lowercase letter by letter\r\n const chars = word.split('');\r\n return chars\r\n .map((char, charIndex) => {\r\n if (charIndex === 0 && wordIndex === 0) {\r\n // First letter of the first word:\r\n // remains uppercase only if the first 2 letters are both uppercase\r\n const secondChar = chars[1] ?? '';\r\n const keepUppercase =\r\n char === char.toUpperCase() &&\r\n secondChar === secondChar.toUpperCase() &&\r\n /[A-Z]/.test(char) &&\r\n /[A-Z]/.test(secondChar);\r\n return keepUppercase ? char : char.toLowerCase();\r\n }\r\n return char.toLowerCase();\r\n })\r\n .join('');\r\n })\r\n .join(' ');\r\n }\r\n\r\n /**\r\n * Wraps bare URLs in the given string with `<a>` anchor tags.\r\n * @param s - The plain-text or HTML string to process.\r\n * @returns The string with URLs replaced by clickable links, or `''` when `s` is falsy.\r\n */\r\n static replaceAsHtml(s?: string): string {\r\n if (!s) return '';\r\n const regex = /https?:\\/\\/.*[^\\s]/ig;\r\n const m = regex.exec(s);\r\n if (!m || m.length === 0) return s;\r\n let result = s;\r\n for (const v of m) {\r\n result = result.replace(v, `<a href=\"${v}\" target=\"_blank\">${v}</a>`);\r\n }\r\n return result;\r\n }\r\n\r\n\r\n\r\n\r\n /**\r\n * Convert markdown to html\r\n * @param markdown : the markdown data\r\n * @param escapeEntities : true to escape entities. Default is false\r\n * @returns the html\r\n */\r\n static markdownToHtml(markdown: string, escapeEntities: boolean = false): string {\r\n let html = markdown;\r\n\r\n //1. Escape HTML entities \r\n if (escapeEntities) {\r\n html = html.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\r\n }\r\n\r\n // 2. Code blocks \r\n html = html.replace(/```(\\w+)?\\n([\\s\\S]*?)```/g, (_match, lang, code) => {\r\n const langClass = lang ? ` class=\"language-${lang}\"` : '';\r\n return `<pre><code${langClass}>${code.trim()}</code></pre>`;\r\n });\r\n\r\n // 3. Inline code\r\n html = html.replace(/`([^`]+)`/g, '<code>$1</code>');\r\n\r\n // 4. Headers \r\n html = html.replace(/^##### (.*$)/gim, '<h5>$1</h5>');\r\n html = html.replace(/^#### (.*$)/gim, '<h4>$1</h4>');\r\n html = html.replace(/^### (.*$)/gim, '<h3>$1</h3>');\r\n html = html.replace(/^## (.*$)/gim, '<h2>$1</h2>');\r\n html = html.replace(/^# (.*$)/gim, '<h1>$1</h1>');\r\n\r\n // 5. Horizontal rules\r\n html = html.replace(/^---+$/gim, '<hr>');\r\n html = html.replace(/^\\*\\*\\*+$/gim, '<hr>');\r\n\r\n // 6. Links \r\n html = html.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, '<a href=\"$2\">$1</a>');\r\n\r\n // 7. Images\r\n html = html.replace(/!\\[([^\\]]*)\\]\\(([^)]+)\\)/g, '<img src=\"$2\" alt=\"$1\">');\r\n\r\n // 8. Bold e Italic \r\n html = html.replace(/\\*\\*\\*([^*]+)\\*\\*\\*/gim, '<strong><em>$1</em></strong>');\r\n html = html.replace(/___([^_]+)___/gim, '<strong><em>$1</em></strong>');\r\n html = html.replace(/\\*\\*([^*]+)\\*\\*/gim, '<strong>$1</strong>');\r\n html = html.replace(/__([^_]+)__/gim, '<strong>$1</strong>');\r\n html = html.replace(/\\*([^*]+)\\*/gim, '<em>$1</em>');\r\n html = html.replace(/_([^_]+)_/gim, '<em>$1</em>');\r\n\r\n // 9. Strikethrough\r\n html = html.replace(/~~([^~]+)~~/gim, '<del>$1</del>');\r\n\r\n // 10. Blockquotes\r\n html = html.replace(/^> (.*$)/gim, '<blockquote>$1</blockquote>');\r\n\r\n // 11. Tables\r\n html = this.markdownConvertTables(html);\r\n\r\n // 12. Lists \r\n html = this.markdownConvertLists(html);\r\n\r\n // 13. Line breaks\r\n html = html.replace(/ $/gm, '<br>');\r\n\r\n // 14. Paragrafi (ultimo step per non interferire con altri elementi)\r\n html = this.markdownConvertParagraphs(html);\r\n\r\n // 15. Clean up extra newlines\r\n html = html.replace(/\\`\\`\\`markdown/g, '');\r\n html = html.replace(/\\*\\*/g, '');\r\n html = html.replace(/\\n{3,}/g, '\\n\\n');\r\n\r\n\r\n return html.trim();\r\n }\r\n\r\n /**\r\n * Convert markdown table to html\r\n * @param markdown: the markdown string\r\n * @returns : the html\r\n */\r\n private static markdownConvertTables(markdown: string): string {\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n let inTable = false;\r\n let tableRows: string[] = [];\r\n let headerProcessed = false;\r\n\r\n for (let i = 0; i < lines.length; i++) {\r\n const line = lines[i].trim();\r\n if (line.includes('|') && line.length > 1) {\r\n const nextLine = i + 1 < lines.length ? lines[i + 1].trim() : '';\r\n const isHeaderSeparator = /^\\|?[\\s\\-:|]+\\|?$/.test(nextLine);\r\n if (!inTable) {\r\n inTable = true;\r\n headerProcessed = false;\r\n tableRows = [];\r\n }\r\n if (isHeaderSeparator && !headerProcessed) {\r\n tableRows.push(this.markdownConvertTableRow(line, true));\r\n headerProcessed = true;\r\n i++;\r\n } else if (!isHeaderSeparator) {\r\n tableRows.push(this.markdownConvertTableRow(line, false));\r\n }\r\n } else {\r\n if (inTable && tableRows.length > 0) {\r\n result.push('<table>');\r\n result.push(...tableRows);\r\n result.push('</table>');\r\n tableRows = [];\r\n inTable = false;\r\n }\r\n result.push(line);\r\n }\r\n }\r\n if (inTable && tableRows.length > 0) {\r\n result.push('<table>');\r\n result.push(...tableRows);\r\n result.push('</table>');\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n /**\r\n * Convert a markdown table row to html\r\n * @param row : the markdown row\r\n * @param isHeader : true if is header\r\n * @returns the html\r\n */\r\n private static markdownConvertTableRow(row: string, isHeader: boolean): string {\r\n const cells = row.split('|').map(cell => cell.trim()).filter(cell => cell !== '');\r\n const tag = isHeader ? 'th' : 'td';\r\n const cellsHtml = cells.map(cell => ` <${tag}>${cell}</${tag}>`).join('\\n');\r\n return ` <tr>\\n${cellsHtml}\\n </tr>`;\r\n }\r\n\r\n\r\n /**\r\n * Convert a markdown list to html\r\n * @param markdown : the markdown list\r\n * @returns the html\r\n */\r\n private static markdownConvertLists(markdown: string): string {\r\n markdown = markdown.replace(/^\\* (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^- (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^\\+ (.*$)/gim, '<li data-type=\"ul\">$1</li>');\r\n markdown = markdown.replace(/^\\d+\\. (.*$)/gim, '<li data-type=\"ol\">$1</li>');\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n let currentList: MarkdownListState = { type: null, items: [] };\r\n for (const line of lines) {\r\n const ulMatch = line.match(/^<li data-type=\"ul\">(.*)<\\/li>$/);\r\n const olMatch = line.match(/^<li data-type=\"ol\">(.*)<\\/li>$/);\r\n if (ulMatch) {\r\n if (currentList.type !== 'ul') {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n currentList = { type: 'ul', items: [ulMatch[1]] };\r\n } else {\r\n currentList.items.push(ulMatch[1]);\r\n }\r\n } else if (olMatch) {\r\n if (currentList.type !== 'ol') {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n currentList = { type: 'ol', items: [olMatch[1]] };\r\n } else {\r\n currentList.items.push(olMatch[1]);\r\n }\r\n } else {\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n currentList = { type: null, items: [] };\r\n }\r\n result.push(line);\r\n }\r\n }\r\n if (currentList.type && currentList.items.length > 0) {\r\n result.push(this.markdownWrapList(currentList.type, currentList.items));\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n /**\r\n * Wrap a list\r\n * @param type: the list type \r\n * @param items : the item list\r\n * @returns the html\r\n */\r\n private static markdownWrapList(type: 'ul' | 'ol', items: string[]): string {\r\n const listItems = items.map(item => ` <li>${item}</li>`).join('\\n');\r\n return `<${type}>\\n${listItems}\\n</${type}>`;\r\n }\r\n\r\n /**\r\n * Convert markdown paragraphs to html\r\n * @param markdown : the markdown paragraphs\r\n * @returns the html\r\n */\r\n private static markdownConvertParagraphs(markdown: string): string {\r\n const lines = markdown.split('\\n');\r\n const result: string[] = [];\r\n for (const line of lines) {\r\n const trimmed = line.trim();\r\n if (!trimmed) {\r\n result.push('');\r\n continue;\r\n }\r\n if (trimmed.startsWith('<') && trimmed.endsWith('>')) {\r\n result.push(line);\r\n continue;\r\n }\r\n if (trimmed.startsWith('<') || trimmed.endsWith('>')) {\r\n result.push(line);\r\n continue;\r\n }\r\n result.push(`<p>${trimmed}</p>`);\r\n }\r\n return result.join('\\n');\r\n }\r\n\r\n\r\n\r\n /**\r\n * Compare two names\r\n * @param a : name a\r\n * @param b : name b\r\n * @returns : true if a equals b\r\n */\r\n static compareNames(a?: string, b?: string): boolean {\r\n if (a) a = a.trim();\r\n if (b) b = b.trim();\r\n if (a && b && a.length !== b.length) return false;\r\n if (this.compareString(a, b) === 0) return true;\r\n const p1 = (a ?? '').split(' ');\r\n const p2 = (b ?? '').split(' ');\r\n if (p1.length !== p2.length) return false;\r\n let matches = p1.length;\r\n for (const s1 of p1) {\r\n for (const s2 of p2) {\r\n if (this.compareString(s1, s2) === 0) {\r\n matches--;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return matches === 0;\r\n }\r\n\r\n /**\r\n * Cipher a text\r\n * @param text : the text\r\n * @param key : the key\r\n * @param reverse : true to decode, false to encode\r\n * @returns :the ciphered text\r\n */\r\n static cipher(text: string, key: string, reverse: boolean = false): string | undefined {\r\n // Surrogate pair limit\r\n const bound = 0x10000;\r\n\r\n // Create string from character codes\r\n return String.fromCharCode.apply(\r\n null,\r\n // Turn string to character codes\r\n text.split('').map((v: string, i: number) => {\r\n // Get rotation from key\r\n let rotation = key.charCodeAt(i % key.length);\r\n\r\n // Are we decrypting?\r\n if (reverse) rotation = -rotation;\r\n\r\n // Return current character code + rotation\r\n return (v.charCodeAt(0) + rotation + bound) % bound;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Clone an object using JSON\r\n * @param obj : the oblect to clone\r\n * @returns : a new object\r\n */\r\n static clone<T>(obj: T): T {\r\n if (!obj) return {} as T;\r\n return JSON.parse(JSON.stringify(obj)) as T;\r\n }\r\n\r\n /**\r\n * Creates a deep clone of an object by recursively copying all own properties.\r\n * @param obj - The source object to clone.\r\n * @param dest - Optional pre-allocated destination object; a new instance is created when omitted.\r\n * @returns A deep copy of `obj`.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static deepClone<T extends object>(obj: T, dest?: T): T {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const cloneObj: any = dest ?? (obj as any).constructor();\r\n for (const attribute of Object.keys(obj)) {\r\n const property = (obj as Record<string, unknown>)[attribute];\r\n if (typeof property === 'object' && property !== null) {\r\n cloneObj[attribute] = this.deepClone(property as object);\r\n } else {\r\n cloneObj[attribute] = property;\r\n }\r\n }\r\n return cloneObj as T;\r\n }\r\n\r\n\r\n /**\r\n * Returns `true` when `value` is a syntactically valid UUID string.\r\n * @param value - The string to validate.\r\n */\r\n static parseUUID(value?: string): boolean {\r\n const regex = /^({|()?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(}|))?$/;\r\n return !!value && value.length > 0 && regex.test(value);\r\n }\r\n\r\n /**\r\n * Returns `true` when `value` is a valid, non-empty (non-zero) UUID.\r\n * @param value - The string to validate.\r\n */\r\n static parseUUIDNotEmpty(value?: string): boolean {\r\n const regex = /^({|()?0{8}-(0{4}-){3}0{12}(}|))?$/;\r\n return this.parseUUID(value) && !regex.test(value ?? '');\r\n }\r\n\r\n /**\r\n * Return an empty UUID\r\n * @returns : the empty UUID\r\n */\r\n static emptyUUID(): string { return \"00000000-0000-0000-0000-000000000000\" };\r\n\r\n /**\r\n * Create a new UUID\r\n * @returns : the string UUID\r\n */\r\n static generateUUID(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = (Math.random() * 16) | 0;\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n /**\r\n * Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.\r\n * @param value : 32-character hex string\r\n * @returns : the formatted UUID or the original string if it doesn't match the expected format\r\n */\r\n static inflateUUID(value: string): string {\r\n const s = value.trim();\r\n if (s.length !== 32) return s;\r\n return `${s.slice(0, 8)}-${s.slice(8, 12)}-${s.slice(12, 16)}-${s.slice(16, 20)}-${s.slice(20)}`;\r\n }\r\n\r\n /**\r\n * Parse a text and return true if is a valid email or null\r\n * @param value : email\r\n * @returns : true if the email is valid or empty\r\n */\r\n static parseEmail(value?: string): boolean {\r\n if (!value) return true;\r\n const regex = /(?:[a-z0-9+!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/gi\r\n return regex.test(value.trim().toLowerCase());\r\n }\r\n\r\n /**\r\n * Parse a text and return true if is a valid url or null\r\n * @param value : the url to parse\r\n * @returns : true if the url is valid or empty\r\n */\r\n static parseUrl(value?: string): boolean {\r\n if (!value) return true;\r\n const regex = new RegExp(\r\n \"(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?\"\r\n );\r\n return regex.test(value.trim().toLowerCase());\r\n }\r\n\r\n /**\r\n * Get date parts from a string value\r\n * @param value : the string to parse\r\n * @returns : an array of numbers with year, month, day\r\n */\r\n static getDateParts(value?: string): number[] | undefined {\r\n if (!value) return undefined;\r\n let parts: number[] = [];\r\n if (value.indexOf(\"-\") !== -1) {\r\n const p = value.split(\"-\");\r\n if (p.length !== 3) return undefined;\r\n parts = [parseInt(p[0]), parseInt(p[1]) - 1, parseInt(p[2])];\r\n } else if (value.indexOf(\"/\") !== -1) {\r\n const p = value.split(\"/\");\r\n if (p.length !== 3) return undefined;\r\n parts = [parseInt(p[2]), parseInt(p[1]) - 1, parseInt(p[0])];\r\n }\r\n return parts;\r\n }\r\n\r\n /**\r\n * Parse a date\r\n * @param value : the value to check\r\n * @param locale : the locale to use\r\n * @returns : a valid Date object or null\r\n */\r\n static parseDate(value?: string | Date, locale: Locale = it): Date | undefined {\r\n // No value at all\r\n if (!value) return undefined;\r\n // A Date value\r\n if (value instanceof Date && value.getTime()) return value;\r\n // Parse known formats using date-fns\r\n let d = parseISO(value as string);\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n d = parse(value as string, 'dd/MM/yyyy', new Date(), { locale: locale });\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n d = parse(value as string, 'yyyy-MM-dd', new Date(), { locale: locale });\r\n if (d && d.getTime() && d.getFullYear() > 1750) return d;\r\n // Parse values manually\r\n const parts = this.getDateParts(value as string);\r\n if (!parts) return undefined;\r\n if (parts[0] < 100) parts[0] += 2000;\r\n if (isNaN(parts[0]) || parts[0] < 0 || parts[0] < 1750) return undefined;\r\n if (isNaN(parts[1]) || parts[1] < 0) return undefined;\r\n if (isNaN(parts[2]) || parts[2] < 0) return undefined;\r\n if (parts[1] > 11) return undefined;\r\n if (parts[1] === 1 && parts[2] > 29) return undefined;\r\n else if (parts[1] !== 1 && parts[2] > 31) return undefined;\r\n return new TZDate(parts[0], parts[1], parts[2], 12);\r\n }\r\n\r\n /**\r\n * Format a date\r\n * @param value : the date or string to format\r\n * @param fmt : the DateFormat to use or the string pattern\r\n * @param locale : the locale to use (default is IT)\r\n * @returns : the formatted string\r\n */\r\n static formatDate(\r\n value?: Date | string,\r\n fmt: DateFormat | string = DateFormat.Short,\r\n locale: Locale = it): string {\r\n // No value at all\r\n if (!value) return '';\r\n // A string\r\n if (typeof value === 'string' || value instanceof String)\r\n value = this.parseDate(value as string);\r\n // Not a date\r\n if (!(value instanceof Date && value.getTime()))\r\n return '';\r\n // Format\r\n switch (fmt) {\r\n case DateFormat.Short: return format(value, \"dd/MM/yyyy\", { locale: locale });\r\n case DateFormat.Long: return format(value, \"d MMMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithShortMonth: return format(value, \"d MMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithWeekDay: return format(value, \"EEEE, d MMMM yyyy\", { locale: locale });\r\n case DateFormat.LongWithShortWeekDay: return format(value, \"EEE, d MMMM yyyy\", { locale: locale });\r\n case DateFormat.MonthAndYear: return format(value, \"MMM yyyy\", { locale: locale });\r\n case DateFormat.LongMonthAndYear: return format(value, \"MMMM yyyy\", { locale: locale });\r\n case DateFormat.WeekDay: return format(value, \"EEE, d\", { locale: locale });\r\n case DateFormat.LongWeekDay: return format(value, \"EEEE, d\", { locale: locale });\r\n case DateFormat.DayAndMonth: return format(value, \"d MMMM\", { locale: locale });\r\n case DateFormat.ShortUS: return format(value, \"MM/dd/yyyy\", { locale: locale });\r\n case DateFormat.ShortISO8601: return format(value, \"yyyy-MM-dd\", { locale: locale });\r\n default:\r\n return format(value, fmt, { locale: locale });\r\n }\r\n }\r\n\r\n /**\r\n * Return an italian local date\r\n * @param value : the date\r\n * @returns : the new date\r\n */\r\n static toLocalDate(value?: Date | string): Date | undefined {\r\n // No value at all\r\n if (!value) return undefined;\r\n // A string\r\n if (typeof value === 'string' || value instanceof String)\r\n value = this.parseDate(value as string);\r\n // Not a date\r\n if (!(value instanceof Date && value.getTime())) return undefined;\r\n // Update date\r\n return new TZDate(value, \"Europe/Rome\");\r\n }\r\n\r\n /**\r\n * Update a DateInterval object according to a string\r\n * @param value : string value\r\n * @param interval : DateInterval value to update\r\n * @param end : true if must be updated the first or the end value \r\n * @param copy : copy the same value (works only if not end element)\r\n */\r\n static changeDateInterval(value: string, interval: DateInterval, end: boolean = false, copy: boolean = false): void {\r\n if (value) {\r\n let year = -1;\r\n if (value.length === 4 && (year = parseInt(value)) > 1750) {\r\n if (!end) {\r\n interval.from = new TZDate(new Date(year, 0, 1), 'Europe/Rome');\r\n interval.to = new TZDate(new Date(year, 11, 31), 'Europe/Rome');\r\n } else\r\n interval.to = new Date(year, 11, 31);\r\n } else {\r\n let parts = this.getDateParts(value);\r\n if (!parts || isNaN(parts[0]) || parts[0] < 0 || parts[0] < 1750) return;\r\n const d = new TZDate(new Date(parts[0], parts[1], parts[2]), 'Europe/Rome');\r\n if (end)\r\n interval.to = d;\r\n else if (copy) {\r\n interval.from = d;\r\n interval.to = d;\r\n } else\r\n interval.from = d;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Formats a number using `Intl.NumberFormat`.\r\n * @param value - The number to format.\r\n * @param decimals - Maximum decimal places (default: `2`).\r\n * @param locale - BCP 47 locale tag (default: `'it-IT'`).\r\n * @returns The formatted number string.\r\n */\r\n static formatNumber(value: number, decimals: number = 2, locale: string = 'it-IT'): string {\r\n return Intl.NumberFormat(locale, { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: decimals }).format(value);\r\n }\r\n\r\n /**\r\n * Formats a number as a currency string using `Intl.NumberFormat`.\r\n * @param value - The number to format.\r\n * @param currency - ISO 4217 currency code (default: `'EUR'`).\r\n * @param decimals - Maximum decimal places (default: `2`).\r\n * @param locale - BCP 47 locale tag (default: `'it-IT'`).\r\n * @returns The formatted currency string.\r\n */\r\n static formatCurrency(value: number, currency: string = 'EUR', decimals: number = 2, locale: string = 'it-IT'): string {\r\n return Intl.NumberFormat(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: decimals }).format(value);\r\n }\r\n\r\n /**\r\n * Percent-encodes a string for safe inclusion in a URL.\r\n * @param value - The string to encode.\r\n * @returns The encoded string, or `undefined` when `value` is empty.\r\n */\r\n static urlEncode(value: string): string | undefined {\r\n return value.length > 0\r\n ? encodeURIComponent(value)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Decodes a percent-encoded URL string, treating `+` as a space.\r\n * @param value - The encoded string to decode.\r\n * @returns The decoded string, or `undefined` when `value` is empty or absent.\r\n */\r\n static urlDecode(value?: string): string | undefined {\r\n return value && value.length > 0\r\n ? decodeURIComponent(value.replace(/\\+/g, '%20'))\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Reads a query string parameter value from the current page URL.\r\n * @param name - The parameter name to look up.\r\n * @returns The decoded parameter value, or `undefined` when absent or running server-side.\r\n */\r\n static getQueryStringValueByName(name: string): string | undefined {\r\n if (!this.isBrowser()) return undefined;\r\n const url = window.location.href;\r\n if (url.includes('?')) {\r\n const httpParams = new HttpParams({ fromString: url.split('?')[1] });\r\n const raw = httpParams.get(name);\r\n if (!raw) return undefined;\r\n const v = decodeURIComponent(raw);\r\n return v && v !== 'null' ? v : undefined;\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Generate a password\r\n * @returns : the password string\r\n */\r\n static generatePassword(): string {\r\n const random = \"$\" + Math.random().toString(36).slice(-11);\r\n let password = \"\";\r\n let hasUpperCase = false;\r\n for (const rnd of random) {\r\n if (!hasUpperCase && \"abcdefghjilmnopqrstuvywxz\".includes(rnd)) {\r\n password += rnd.toUpperCase();\r\n hasUpperCase = true;\r\n } else {\r\n password += rnd;\r\n }\r\n }\r\n if (!hasUpperCase)\r\n password = password.substring(0, 11) + \"M\";\r\n return password;\r\n }\r\n\r\n /**\r\n * Calculate password strength\r\n * @param password: the password to evaluate\r\n * @returns the password strength info\r\n */\r\n static calculatePasswordStrength(password?: string): PasswordStrength {\r\n if (password && password.length > 0) {\r\n let score = 0;\r\n const suggestions: string[] = [];\r\n\r\n // Length\r\n if (password.length >= 10) score++;\r\n else suggestions.push('Usa almeno 10 caratteri.');\r\n if (password.length >= 12) score++;\r\n else if (password.length >= 10) suggestions.push('Considera di usare più di 12 caratteri.');\r\n\r\n // Lowercase letters\r\n if (/[a-z]/.test(password)) score++;\r\n else suggestions.push('Aggiungi lettere minuscole.');\r\n\r\n // Uppercase letters\r\n if (/[A-Z]/.test(password)) score++;\r\n else suggestions.push('Aggiungi lettere maiuscole.');\r\n\r\n // Numbers\r\n if (/\\d/.test(password)) score++;\r\n else suggestions.push('Aggiungi numeri.');\r\n\r\n // Special characters\r\n if (/[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]/.test(password)) score++;\r\n else suggestions.push('Aggiungi caratteri speciali (!@#$%^&*).');\r\n\r\n // Common patterns\r\n if (/(.)\\1{2,}/.test(password)) {\r\n score = Math.max(0, score - 1);\r\n suggestions.push('Evita di ripetere lo stesso carattere.');\r\n }\r\n if (/123|abc|qwe/i.test(password)) {\r\n score = Math.max(0, score - 1);\r\n suggestions.push('Evita sequenze comuni (123, abc, qwe).');\r\n }\r\n\r\n // Label and color\r\n let label: string;\r\n let color: string;\r\n let isValid: boolean;\r\n if (score <= 2) {\r\n label = 'Molto debole';\r\n color = '#f44336';\r\n isValid = false;\r\n } else if (score <= 3) {\r\n label = 'Debole';\r\n color = '#ff9800';\r\n isValid = false;\r\n } else if (score <= 4) {\r\n label = 'Media';\r\n color = '#ffc107';\r\n isValid = true;\r\n } else if (score <= 5) {\r\n label = 'Forte';\r\n color = '#8bc34a';\r\n isValid = true;\r\n } else {\r\n label = 'Molto forte';\r\n color = '#4caf50';\r\n isValid = true;\r\n }\r\n\r\n return { score, label, color, suggestions, isValid };\r\n } else\r\n return {\r\n score: 0,\r\n isValid: false,\r\n suggestions: []\r\n };\r\n\r\n }\r\n\r\n\r\n /**\r\n * Check if current browser supports touch\r\n * @returns : true if the display is touchable\r\n */\r\n static isTouchable(): boolean {\r\n return (\r\n this.isBrowser() && (\r\n \"ontouchstart\" in window ||\r\n navigator.maxTouchPoints > 0)\r\n );\r\n }\r\n\r\n /**\r\n * This check will prevent 'window' logic to be executed\r\n * while executing the server rendering\r\n * @returns : true if using the browser\r\n */\r\n static isBrowser(): boolean {\r\n return typeof (window) !== 'undefined';\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the subfolders group or null to root\r\n * @returns : a node list\r\n */\r\n static toNodes(folders: INode[]): INode[] {\r\n return this._toNodes(folders, undefined);\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the children group or null to root\r\n * @param parent : the parent node\r\n * @returns : a node list \r\n */\r\n private static _toNodes(folders: INode[], parent?: INode): INode[] {\r\n const nodes: INode[] = [];\r\n folders.forEach((n: INode) => {\r\n const node: INode = {\r\n id: n.id,\r\n name: n.name,\r\n count: n.count,\r\n parent: parent,\r\n children: undefined,\r\n bag: n,\r\n };\r\n const children = n.children ?? n.subFolders ?? [];\r\n if (children.length > 0) {\r\n node.children = this._toNodes(children, node);\r\n }\r\n nodes.push(node);\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Returns an array of individual power-of-2 flag values that are set in `value`.\r\n * @param value - The bitmask to decompose.\r\n * @param max - Upper-bound exponent: checks flags from `1` up to `1 << max` (default: `30`).\r\n * @returns Array of set flag values, or an empty array when `value` is `0`.\r\n */\r\n static getFlags(value: number, max: number = 30): number[] {\r\n if (value !== 0) {\r\n const items: number[] = [];\r\n let v = 1;\r\n const m = 1 << max;\r\n while (v < m) {\r\n if ((value & v) === v) items.push(v);\r\n v = v << 1;\r\n }\r\n return items;\r\n } else return [];\r\n }\r\n\r\n /**\r\n * Check if a color is light or dark\r\n * @param color : the color\r\n * @param minimumLuminance : the lumimance to consider\r\n * @returns true if the color is light\r\n */\r\n static isColorLight(color: string, minimumLuminance: number = 186): boolean {\r\n const tempDiv = document.createElement('div');\r\n tempDiv.style.color = color;\r\n document.body.appendChild(tempDiv);\r\n const rgb = getComputedStyle(tempDiv).color;\r\n document.body.removeChild(tempDiv);\r\n const result = rgb.match(/\\d+/g);\r\n if (!result || result.length < 3) return true; // fallback\r\n const r = parseInt(result[0], 10);\r\n const g = parseInt(result[1], 10);\r\n const b = parseInt(result[2], 10);\r\n const luminance = 0.299 * r + 0.587 * g + 0.114 * b;\r\n return luminance > minimumLuminance;\r\n }\r\n\r\n}\r\n","import { DestroyRef, Directive, HostListener, inject, input } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { DateInterval } from '../definitions';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Directive that listens to `keyup` events on a date input and debounces changes\r\n * into a {@link DateInterval} model, converting shorthand strings (e.g. \"d/m\") to dates.\r\n * Apply `[dateIntervalChange]=\"interval\"` to the host `<input>` element.\r\n */\r\n@Directive({\r\n selector: '[dateIntervalChange]',\r\n standalone: true,\r\n})\r\nexport class DateIntervalChangeDirective {\r\n\r\n /** The date interval model to update when the input value changes. */\r\n readonly dateIntervalChange = input<DateInterval>(new DateInterval(null, null));\r\n\r\n /** When `true`, the directive updates the interval's end date; otherwise the start date. */\r\n readonly end = input<boolean>(false);\r\n\r\n private readonly subject = new Subject<KeyboardEvent>();\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n constructor() {\r\n this.subject\r\n .pipe(debounceTime(100), takeUntilDestroyed(this.destroyRef))\r\n .subscribe((e: KeyboardEvent) => {\r\n const value = (e.target as HTMLInputElement)?.value;\r\n if (value !== undefined) {\r\n SystemUtils.changeDateInterval(value, this.dateIntervalChange(), this.end(), e.key === ' ');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Handles `keyup` events on the host element.\r\n * Prevents default browser behaviour for the space key and forwards the event to the debounce pipeline.\r\n * @param e - The keyboard event emitted by the host input.\r\n */\r\n @HostListener('keyup', ['$event'])\r\n public onKeyup(e: KeyboardEvent): void {\r\n if (e.key === ' ') {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n this.subject.next(e);\r\n }\r\n}\r\n","import {\r\n Directive,\r\n HostListener,\r\n input,\r\n output\r\n} from '@angular/core';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Directive that copies a string payload to the clipboard when the host element is clicked.\r\n * Bind `[copyClipboard]=\"text\"` to provide the content to copy and listen to `(copied)` for confirmation.\r\n */\r\n@Directive({\r\n selector: '[copyClipboard]',\r\n standalone: true\r\n})\r\nexport class CopyClipboardDirective {\r\n\r\n /** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */\r\n readonly payload = input<string | undefined>(undefined, { alias: 'copyClipboard' });\r\n\r\n /** Emits the copied text after a successful copy operation. */\r\n readonly copied = output<string>({ alias: 'copied' });\r\n\r\n /**\r\n * Handles click events on the host element and copies the payload to the clipboard.\r\n * Emits `copied` with the copied text on success.\r\n * @param e - The mouse click event.\r\n */\r\n @HostListener('click', ['$event'])\r\n public onClick(e: MouseEvent): void {\r\n e.preventDefault();\r\n const payload = this.payload();\r\n if (!payload) return;\r\n\r\n if (SystemUtils.isBrowser()) {\r\n const listener = (clipEvent: ClipboardEvent) => {\r\n clipEvent.clipboardData?.setData('text/html', payload);\r\n clipEvent.preventDefault();\r\n this.copied.emit(payload);\r\n };\r\n\r\n document.addEventListener('copy', listener, false);\r\n document.execCommand('copy');\r\n document.removeEventListener('copy', listener, false);\r\n }\r\n }\r\n}\r\n","import { Directive, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that delegates validation to an externally provided validator function.\r\n * Bind `[validator]=\"myFn\"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.\r\n */\r\n@Directive({\r\n selector: '[validator]',\r\n providers: [{ provide: NG_VALIDATORS, useExisting: ValidatorDirective, multi: true }],\r\n standalone: true,\r\n})\r\nexport class ValidatorDirective implements Validator {\r\n\r\n /** The custom validator function to apply. */\r\n readonly validator = input<((control: AbstractControl) => ValidationErrors | null) | undefined>(undefined);\r\n\r\n /**\r\n * Invokes the provided validator function against the given control.\r\n * Returns `null` (valid) when no function is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const fn = this.validator();\r\n return fn ? fn(control) : null;\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { Validated } from '../definitions';\r\n\r\n/**\r\n * Directive that validates a control using the host object's `isValid()` method\r\n * or a boolean expression passed via `[validIf]`.\r\n */\r\n@Directive({\r\n selector: \"[validIf]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => ValidIfDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class ValidIfDirective implements Validator {\r\n\r\n /** When `true`, the control is considered valid regardless of the bound value. */\r\n readonly validIf = input<boolean>(false);\r\n\r\n /**\r\n * Validates the control value against a boolean flag or the value's own `isValid()` method.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n let isValid = false;\r\n const c = control.value ? (control.value as Validated) : null;\r\n if (!c) {\r\n isValid = this.validIf() === true;\r\n } else {\r\n try {\r\n isValid = c.isValid();\r\n } catch { }\r\n }\r\n return isValid ? null : { validIf: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that the host control's value equals the value of another control.\r\n * Bind `[equals]=\"otherControl\"`.\r\n */\r\n@Directive({\r\n selector: \"[equals]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EqualsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EqualsValidatorDirective implements Validator {\r\n\r\n /** The control whose value must match the host control's value. */\r\n readonly equals = input<AbstractControl | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the host control value equals the bound control's value.\r\n * Returns `null` (valid) when no control is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const eq = this.equals();\r\n if (!eq) return null;\r\n return eq.value === control.value ? null : { equals: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that the host control's value is different from another control's value.\r\n * Bind `[notEqual]=\"otherControl\"`.\r\n */\r\n@Directive({\r\n selector: \"[notEqual]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotEqualValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotEqualValidatorDirective implements Validator {\r\n\r\n /** The control whose value must differ from the host control's value. */\r\n readonly notEqual = input<AbstractControl | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the host control value is not equal to the bound control's value.\r\n * Also clears the `notequal` error on the other control when the host becomes valid.\r\n * Returns `null` (valid) when no control is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const notEqual = this.notEqual();\r\n if (!notEqual) return null;\r\n\r\n const isValid = (!notEqual.value && !control.value) || (notEqual.value !== control.value);\r\n const errors: ValidationErrors | null = isValid ? null : { notequal: true };\r\n\r\n if (errors) {\r\n control.markAsTouched();\r\n } else if (notEqual.hasError('notequal')) {\r\n notEqual.setErrors({ notequal: null });\r\n notEqual.updateValueAndValidity({ onlySelf: true, emitEvent: false });\r\n notEqual.markAsTouched();\r\n notEqual.markAsDirty();\r\n }\r\n return errors;\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a semicolon-separated list of email addresses.\r\n * Apply `emails` to a text input containing one or more addresses separated by `;`.\r\n */\r\n@Directive({\r\n selector: \"[emails]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EmailsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EmailsValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates each address in a semicolon-separated email list.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\r\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\r\n return isValid ? null : { emails: \"Elenco non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a GUID / UUID string.\r\n * Apply `guid` to a text input that expects a valid UUID.\r\n */\r\n@Directive({\r\n selector: \"[guid]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => GuidValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class GuidValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed GUID / UUID.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUUID(input) ? null : { guid: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { endOfDay } from 'date-fns';\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a parseable SQL-compatible date string.\r\n * Apply `sqlDate` to a text input that expects a date after year 1750.\r\n */\r\n@Directive({\r\n selector: \"[sqlDate]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => SqlDateValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class SqlDateValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value can be parsed as a date after 1750.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const d = endOfDay(SystemUtils.parseDate(input));\r\n return d.getFullYear() > 1750 ? null : { sqlDate: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { endOfDay } from 'date-fns';\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates that a control value is not a future date.\r\n * Apply `notFuture` to a text input that expects a date on or before today.\r\n */\r\n@Directive({\r\n selector: \"[notFuture]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotFutureValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotFutureValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value represents a date that is not in the future.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const today = endOfDay(new Date());\r\n const d = endOfDay(SystemUtils.parseDate(input));\r\n return d <= today ? null : { notFuture: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a well-formed URL.\r\n * Apply `url` to a text input that expects a URL.\r\n */\r\n@Directive({\r\n selector: \"[url]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => UrlValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class UrlValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed URL.\r\n * Returns `null` (valid) when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUrl(input) ? null : { url: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a file size against configurable minimum and maximum bounds.\r\n * Bind `[fileSize]` together with `[size]=\"fileSizeInMb\"`, `[maxSizeMb]`, and `[minSizeMb]`.\r\n */\r\n@Directive({\r\n selector: \"[fileSize]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => FileSizeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class FileSizeValidatorDirective implements Validator {\r\n\r\n /** Maximum allowed file size in megabytes. Defaults to 5. */\r\n readonly maxSizeMb = input<number>(5);\r\n\r\n /** Minimum required file size in megabytes. Defaults to 0. */\r\n readonly minSizeMb = input<number>(0);\r\n\r\n /** The actual file size in megabytes to validate against the bounds. */\r\n readonly size = input<number | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the bound file size falls within the configured min/max range.\r\n * Returns `null` when no control value is present.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control.value;\r\n if (!input) return null;\r\n const s = this.size() ?? 0;\r\n const isValid = s <= this.maxSizeMb() && s >= this.minSizeMb();\r\n return isValid ? null : { fileSize: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a control value does not exceed a maximum word count.\r\n * Bind `[maxTerms]=\"10\"` to allow at most 10 whitespace-separated terms.\r\n */\r\n@Directive({\r\n selector: \"[maxTerms]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => MaxTermsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class MaxTermsValidatorDirective implements Validator {\r\n\r\n /** The maximum number of whitespace-separated terms allowed. */\r\n readonly maxTerms = input<number>(0);\r\n\r\n /**\r\n * Validates that the control value contains no more than the configured number of terms.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input) return null;\r\n const terms = input.match(/\\S+/g)?.length ?? 0;\r\n return terms <= this.maxTerms() ? null : { maxTerms: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"../system\";\r\n\r\n/**\r\n * Directive that validates a control value as a sufficiently strong password.\r\n * Apply `password` to a password input.\r\n */\r\n@Directive({\r\n selector: \"[password]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => PasswordValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class PasswordValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value meets the minimum password-strength requirements.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value ?? '';\r\n const strength = SystemUtils.calculatePasswordStrength(input);\r\n return strength.isValid ? null : { password: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a time string against optional allowed time slot ranges.\r\n * Bind `[time]` and optionally `[slots]=\"'08:00-12:00|14:00-18:00'\"` (pipe-separated ranges).\r\n */\r\n@Directive({\r\n selector: \"[time]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => TimeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class TimeValidatorDirective implements Validator {\r\n\r\n /** Optional pipe-separated list of allowed time ranges, e.g. `\"08:00-12:00|14:00-18:00\"`. */\r\n readonly slots = input<string | undefined>(undefined);\r\n\r\n /**\r\n * Parses a `\"HH:MM\"` time string into a comparable integer (e.g. `\"09:30\"` -> `930`).\r\n * Returns `-1` when the string is not a valid time.\r\n * @param value - The time string to parse.\r\n */\r\n private getTime(value: string): number {\r\n const p = value.split(':');\r\n if (p.length !== 2) return -1;\r\n const hh = parseInt(p[0]);\r\n if (hh < 0 || hh > 23) return -1;\r\n const mm = parseInt(p[1]);\r\n if (mm < 0 || mm > 59) return -1;\r\n return parseInt(p[0] + p[1]);\r\n }\r\n\r\n /**\r\n * Validates that the control value is a valid time string and, when slots are configured,\r\n * that it falls within at least one of the allowed ranges.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n\r\n const t = this.getTime(input);\r\n if (t === -1) return { time: \"Non valido.\" };\r\n\r\n const slotsValue = this.slots();\r\n if (slotsValue) {\r\n const isValid = slotsValue.split('|').some(s => {\r\n const t1 = this.getTime(s.substring(0, 5));\r\n const t2 = this.getTime(s.substring(6));\r\n return t1 !== -1 && t2 !== -1 && t1 <= t && t2 >= t;\r\n });\r\n return isValid ? null : { time: \"Non valido.\" };\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a string control value is not blank (whitespace-only).\r\n * Apply `notEmpty` to a text input where non-blank content is required.\r\n */\r\n@Directive({\r\n selector: \"[notEmpty]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => NotEmptyValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class NotEmptyValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a non-blank string.\r\n * Returns `null` when the control is empty or not a string.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control?.value;\r\n if (!input || typeof input !== 'string' || input.length === 0) return null;\r\n return input.trim().length > 0 ? null : { notEmpty: true };\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { format } from 'date-fns';\r\nimport { it } from 'date-fns/locale';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * General-purpose formatting pipe that converts a raw value to a locale-aware string\r\n * based on the specified format type.\r\n *\r\n * Supported types: `'date'` / `'D'`, `'currency'` / `'C'`, `'number'` / `'N'`,\r\n * `'number0'` / `'N0'`, `'percentage'` / `'P'`.\r\n *\r\n * Usage: `{{ value | format:'currency' }}`\r\n */\r\n@Pipe({\r\n name: 'format',\r\n standalone: true\r\n})\r\nexport class FormatPipe implements PipeTransform {\r\n\r\n /**\r\n * Formats a value according to the specified type and optional pattern.\r\n * Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.\r\n * @param value - The raw value to format.\r\n * @param type - The format type identifier (default: `'date'`).\r\n * @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).\r\n * @returns A formatted string, or `undefined` when the value cannot be formatted.\r\n */\r\n transform(\r\n value?: unknown,\r\n type: string = 'date',\r\n pattern: string = 'dd/MM/yyyy'): string | undefined {\r\n\r\n if (value === undefined || value === null) return undefined;\r\n\r\n switch (type) {\r\n case 'D':\r\n case 'date': {\r\n const d = SystemUtils.parseDate(value as string | Date, it);\r\n if (d) return format(d, pattern, { locale: it });\r\n break;\r\n }\r\n case 'C':\r\n case 'currency':\r\n return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR' }).format(value as number);\r\n case 'N':\r\n case 'number':\r\n return new Intl.NumberFormat('it-IT', { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 2 }).format(value as number);\r\n case 'N0':\r\n case 'number0':\r\n return new Intl.NumberFormat('it-IT', { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 0 }).format(value as number);\r\n case 'P':\r\n case 'percentage':\r\n return new Intl.NumberFormat('it-IT', { style: 'percent', minimumFractionDigits: 0, maximumFractionDigits: 0 }).format(value as number);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that applies a global regex replacement on a string and returns the result\r\n * as sanitized HTML. When `regexValue` is `'\\n'` and no `replaceValue` is given,\r\n * newlines are replaced with `<br>` tags.\r\n *\r\n * Usage: `{{ text | replace:'\\n':'' }}`\r\n */\r\n@Pipe({\r\n name: 'replace',\r\n standalone: true\r\n})\r\nexport class ReplacePipe implements PipeTransform {\r\n\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Replaces all occurrences of `regexValue` in `value` with `replaceValue`.\r\n * Returns `undefined` when `value` is empty or `undefined`.\r\n * @param value - The source string to process.\r\n * @param regexValue - The regex pattern string to match (applied with the global flag).\r\n * @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\\n'` and this is falsy.\r\n * @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.\r\n */\r\n transform(value: string | undefined, regexValue: string, replaceValue: string): SafeHtml | undefined {\r\n if (!value) return undefined;\r\n const replacement = (regexValue === '\\n' && !replaceValue) ? '<br>' : replaceValue;\r\n return this.sanitizer.bypassSecurityTrustHtml(value.replace(new RegExp(regexValue, 'g'), replacement));\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that marks an HTML string as trusted so Angular does not escape it when\r\n * bound via `[innerHTML]`.\r\n *\r\n * Usage: `<div [innerHTML]=\"html | safeHtml\"></div>`\r\n */\r\n@Pipe({\r\n name: 'safeHtml',\r\n standalone: true\r\n})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Bypasses Angular's HTML sanitization and returns a `SafeHtml` instance.\r\n * @param value - The raw HTML string to trust. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be bound to `[innerHTML]` without escaping.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml(value ?? '');\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that marks a URL string as a trusted resource URL so Angular does not block it\r\n * when bound to attributes such as `[src]` or `[href]` on iframes, objects, or embeds.\r\n *\r\n * Usage: `<iframe [src]=\"url | safeUrl\"></iframe>`\r\n */\r\n@Pipe({\r\n name: 'safeUrl',\r\n standalone: true\r\n})\r\nexport class SafeUrlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Bypasses Angular's resource-URL sanitization and returns a `SafeResourceUrl` instance.\r\n * @param value - The URL string to trust. Treated as an empty string when `undefined`.\r\n * @returns A `SafeResourceUrl` that can be bound to resource URL attributes without blocking.\r\n */\r\n transform(value?: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(value ?? '');\r\n }\r\n}\r\n\r\n","import { PipeTransform, Pipe } from '@angular/core';\r\n\r\n/**\r\n * Impure pipe that filters an array using a caller-provided predicate function.\r\n * Because the pipe is impure it re-evaluates on every change-detection cycle,\r\n * which is necessary when the predicate's captured state changes.\r\n *\r\n * Usage: `*ngFor=\"let item of items | callback:myFilter\"`\r\n */\r\n@Pipe({\r\n name: 'callback',\r\n pure: false,\r\n standalone: true\r\n})\r\nexport class SearchCallbackPipe implements PipeTransform {\r\n\r\n /**\r\n * Filters `items` by applying `callback` to each element.\r\n * Returns the original array unchanged when either argument is falsy.\r\n * @param items - The source array to filter. May be `undefined`.\r\n * @param callback - A predicate function that returns `true` for items to keep.\r\n * @returns A new filtered array, the original array when no callback is provided,\r\n * or `undefined` when `items` is `undefined`.\r\n */\r\n transform<T>(items: T[] | undefined, callback: ((item: T) => boolean) | undefined): T[] | undefined {\r\n if (!items || !callback) return items;\r\n return items.filter(item => callback(item));\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { SearchFilterMetadata } from '../definitions';\r\n\r\n/**\r\n * Impure pipe that filters an array of searchable items against a text query.\r\n *\r\n * Each item is matched either via its `searchBag.name` property (when present)\r\n * or by converting the item itself to a lowercase string. The optional `metadata`\r\n * argument is updated in-place with the total item count and the filtered count,\r\n * making it usable in the template alongside `*ngFor`.\r\n *\r\n * Usage:\r\n * ```html\r\n * <div *ngFor=\"let item of items | search:filterText:meta\">...</div>\r\n * <div>Showing {{ meta.count }} of {{ meta.total }}</div>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'search',\r\n standalone: true\r\n})\r\nexport class SearchFilterPipe implements PipeTransform {\r\n\r\n /**\r\n * Filters `items` by performing a case-insensitive substring match against `value`.\r\n * When `items` or `value` is falsy the original array is returned unfiltered.\r\n * @param items - The source array to filter. May be `undefined`.\r\n * @param value - The search text to match against each item. May be `undefined`.\r\n * @param metadata - Optional object that is updated with `total` and `count` after filtering.\r\n * @returns The filtered array, the original array when no filter text is given,\r\n * or `undefined` when `items` is `undefined`.\r\n */\r\n transform(items?: any[], value?: string, metadata?: SearchFilterMetadata): any[] | undefined {\r\n metadata ??= { total: 0, count: 0 };\r\n\r\n if (!items || !value) return items;\r\n\r\n const query = value.toLowerCase();\r\n const result = items.filter(item => {\r\n if (!item) return false;\r\n const text: string | undefined = item.searchBag?.name ?? (typeof item === 'string' ? item : undefined);\r\n return text?.toLowerCase().includes(query) ?? false;\r\n });\r\n\r\n metadata.total = items.length;\r\n metadata.count = result.length;\r\n\r\n return result;\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n/**\r\n * Pipe that converts plain-text newlines (`\\r\\n`, `\\r`, `\\n`) to HTML `<br>` tags\r\n * and marks the result as trusted HTML so Angular does not escape it.\r\n *\r\n * Usage: `{{ text | formatHtml }}`\r\n */\r\n@Pipe({\r\n name: 'formatHtml',\r\n standalone: true\r\n})\r\nexport class FormatHtmlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Transforms a plain-text string into sanitized HTML by replacing newline characters\r\n * with `<br>` tags.\r\n * @param value - The input string to transform. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml((value ?? '').replaceAll(/(?:\\r\\n|\\r|\\n)/g, '<br>'));\r\n }\r\n}\r\n","export const Breakpoints = {\r\n XXSmall: '(max-width: 349.98px)',\r\n XSmall: '(max-width: 599.98px)',\r\n Small: '(min-width: 600px) and (max-width: 959.98px)',\r\n SmallMedium: '(min-width: 600px) and (max-width: 1059.98px)', \r\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\r\n MediumLarge: '(min-width: 960px) and (max-width: 1459.98px)',\r\n Large: '(min-width: 1460px) and (max-width: 1919.98px)'\r\n};","export const UtilsMessages = {\r\n /**\r\n * Messages\r\n */\r\n\r\n\r\n // Select dialog\r\n UTILS_DIALOGS_SELECT_OPTIONS_CHANGED: '§utils-dialogs-select-options-changed'\r\n};\r\n","import { computed, EventEmitter, signal } from '@angular/core';\r\nimport { SelectionModel } from \"@angular/cdk/collections\";\r\nimport { SystemUtils } from \"./system\";\r\n\r\n/**\r\n * Generic selection model that tracks a set of selected items identified by a lookup field.\r\n * Wraps Angular CDK's `SelectionModel` and adds lookup-based add/remove logic.\r\n *\r\n * @typeParam T - The item type held in the selection.\r\n * @typeParam V - The type of the lookup key used to identify items.\r\n */\r\nexport class SelectableModel<T, V> {\r\n\r\n /**\r\n * Emits whenever the selection changes.\r\n * Carries the affected item, or `undefined` when the whole selection is cleared.\r\n */\r\n readonly changed = new EventEmitter<T | undefined>();\r\n\r\n private readonly _all = signal<T[]>([]);\r\n\r\n /**\r\n * Snapshot of all items currently tracked by this model (selected or previously toggled).\r\n * Backed by a signal — reads are always up to date.\r\n */\r\n get all(): T[] {\r\n return this._all();\r\n }\r\n\r\n private readonly _current: SelectionModel<T>;\r\n\r\n /** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */\r\n get current(): SelectionModel<T> {\r\n return this._current;\r\n }\r\n\r\n private readonly _lookupFieldName: string;\r\n\r\n /** Signal that is `true` when at least one item is selected. */\r\n readonly hasValue = computed(() => this._all().length > 0);\r\n\r\n /**\r\n * @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.\r\n * @param lookupFieldName - Name of the note used as the unique key when searching the internal list (default: `'id'`).\r\n */\r\n constructor(\r\n allowMultiSelect: boolean = true,\r\n lookupFieldName: string = 'id'\r\n ) {\r\n this._current = new SelectionModel<T>(allowMultiSelect, []);\r\n this._lookupFieldName = lookupFieldName;\r\n }\r\n\r\n /**\r\n * Toggles the CDK selection state of an item that already exists in the tracked list.\r\n * Has no effect when `lookupValue` does not match any tracked item.\r\n * @param item - The item whose selection state should be toggled.\r\n * @param lookupValue - The key value used to locate the item in the internal list.\r\n */\r\n updateCurrent(item: T, lookupValue: V): void {\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p !== -1) {\r\n this._current.toggle(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n\r\n /**\r\n * Toggles an item in both the internal list and the CDK selection.\r\n * Adds the item when it is not yet tracked; removes it when it is.\r\n * @param item - The item to toggle.\r\n * @param lookupValue - The key value used to locate or register the item.\r\n */\r\n toggle(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p === -1) {\r\n this._all.update(arr => [...arr, item]);\r\n } else {\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n }\r\n this._current.toggle(item);\r\n this.changed.emit(item);\r\n }\r\n\r\n /**\r\n * Adds an item to the internal list (when not already present) and marks it as selected.\r\n * @param item - The item to select.\r\n * @param lookupValue - The key value used to locate or register the item.\r\n */\r\n select(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p === -1) {\r\n this._all.update(arr => [...arr, item]);\r\n }\r\n this._current.select(item);\r\n this.changed.emit(item);\r\n }\r\n\r\n /**\r\n * Removes an item from the internal list and deselects it in the CDK model.\r\n * Has no effect when the item is not currently tracked.\r\n * @param item - The item to deselect.\r\n * @param lookupValue - The key value used to locate the item in the internal list.\r\n */\r\n deselect(item: T, lookupValue?: V): void {\r\n if (lookupValue === undefined) return;\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue);\r\n if (p !== -1) {\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n this._current.deselect(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n\r\n /**\r\n * Deselects all items whose lookup key is contained in `lookupValues`.\r\n * @param lookupValues - Array of key values identifying the items to deselect.\r\n */\r\n deselectByValues(lookupValues: V[]): void {\r\n if (lookupValues.length === 0) return;\r\n for (const key of lookupValues) {\r\n const p = SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, key);\r\n if (p !== -1) {\r\n const item = this._all()[p];\r\n this._all.update(arr => arr.filter((_, i) => i !== p));\r\n this._current.deselect(item);\r\n this.changed.emit(item);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Runs `clearFunc` against every currently selected item, then clears the CDK selection.\r\n * The internal tracked list is **not** affected; only the CDK selection is cleared.\r\n * @param clearFunc - Callback invoked for each currently selected item before clearing.\r\n */\r\n clearCurrent(clearFunc: (item: T) => void): void {\r\n for (const item of this._current.selected) {\r\n clearFunc(item);\r\n }\r\n this._current.clear();\r\n this.changed.emit(undefined);\r\n }\r\n\r\n /**\r\n * Clears both the internal tracked list and the CDK selection.\r\n */\r\n clear(): void {\r\n this._all.set([]);\r\n this._current.clear();\r\n this.changed.emit(undefined);\r\n }\r\n\r\n /**\r\n * Returns `true` when the item identified by `lookupValue` is present in the tracked list.\r\n * @param lookupValue - The key value to look up.\r\n */\r\n isSelected(lookupValue?: V): boolean {\r\n return (\r\n lookupValue !== undefined &&\r\n SystemUtils.arrayFindIndexByKey(this._all(), this._lookupFieldName, lookupValue) !== -1\r\n );\r\n }\r\n}\r\n","/**\r\n * Standard Broadcast Messages Manager\r\n * https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\r\n */\r\n\r\nimport { Subject } from 'rxjs';\r\n\r\n/** The typed message payload exchanged over the broadcast channel. */\r\nexport interface BroadcastChannelMessageBag<T> {\r\n /** Unique identifier for the message type. */\r\n messageId: string;\r\n /** Identifier of the sender. */\r\n sender: string;\r\n /** Optional typed data attached to the message. */\r\n data?: T;\r\n}\r\n\r\n/** Subscription descriptor that pairs a message type identifier with its handler. */\r\nexport interface BroadcastChannelSubscriberInfo<T> {\r\n /** The message type identifier to listen for. */\r\n messageId: string;\r\n /** Callback invoked with the full message bag when a matching message is received. */\r\n action: (bag: BroadcastChannelMessageBag<T>) => void;\r\n}\r\n\r\n/**\r\n * Wrapper around the native Web `BroadcastChannel` API that adds typed messaging,\r\n * multiple named subscriptions, and a graceful disposal mechanism.\r\n *\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\r\n */\r\nexport class BroadcastChannelManager {\r\n private channel?: BroadcastChannel;\r\n private readonly subject = new Subject<BroadcastChannelMessageBag<unknown>>();\r\n private subscriptions: BroadcastChannelSubscriberInfo<unknown>[] = [];\r\n\r\n /**\r\n * The name of the underlying `BroadcastChannel`, or `undefined` when the API\r\n * is not supported by the current browser.\r\n */\r\n public get currentBus(): string | undefined {\r\n return this.channel?.name;\r\n }\r\n\r\n /**\r\n * Opens a `BroadcastChannel` with the given name (when the API is available).\r\n * @param bus - The channel name to open (default: `'ARS-CHANNEL'`).\r\n */\r\n constructor(bus: string = 'ARS-CHANNEL') {\r\n if ('BroadcastChannel' in window) {\r\n this.channel = new BroadcastChannel(bus);\r\n\r\n this.channel.onmessageerror = (e: Event) => {\r\n console.error('[BroadcastChannelManager] Message receive error', e);\r\n };\r\n\r\n this.channel.onmessage = (e: MessageEvent) => {\r\n const bag = e.data as BroadcastChannelMessageBag<unknown> | undefined;\r\n if (!bag) return;\r\n this.subject.next(bag);\r\n const info = this.subscriptions.find(m => m.messageId === bag.messageId);\r\n info?.action(bag);\r\n };\r\n } else {\r\n console.error('[BroadcastChannelManager] BroadcastChannel API is not supported in this browser');\r\n }\r\n }\r\n\r\n /**\r\n * Closes the underlying channel and completes the internal subject after a short delay\r\n * to allow any in-flight messages to be delivered.\r\n */\r\n dispose(): void {\r\n setTimeout(() => {\r\n this.subscriptions = [];\r\n this.channel?.close();\r\n this.channel = undefined;\r\n this.subject.complete();\r\n }, 1000);\r\n }\r\n\r\n /**\r\n * Sends a typed message bag immediately.\r\n * @param bag - The message bag to send.\r\n * @example\r\n * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value });\r\n */\r\n sendMessage<T>(bag: BroadcastChannelMessageBag<T>): void;\r\n /**\r\n * Sends a typed message bag after an optional delay.\r\n * @param bag - The message bag to send.\r\n * @param delay - Milliseconds to wait before posting the message.\r\n * @example\r\n * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value }, 250);\r\n */\r\n sendMessage<T>(bag: BroadcastChannelMessageBag<T>, delay?: number): void;\r\n /**\r\n * Sends a message identified by a string ID with optional data.\r\n * @param messageId - The message type identifier.\r\n * @param data - Optional typed payload.\r\n * @example\r\n * channel.sendMessage('my-message', value);\r\n */\r\n sendMessage<T>(messageId: string, data?: T): void;\r\n /**\r\n * Sends a message identified by a string ID with optional data after an optional delay.\r\n * @param messageId - The message type identifier.\r\n * @param data - Optional typed payload.\r\n * @param delay - Milliseconds to wait before posting the message.\r\n * @example\r\n * channel.sendMessage('my-message', value, 250);\r\n */\r\n sendMessage<T>(messageId: string, data?: T, delay?: number): void;\r\n\r\n /** @internal Implementation that handles all overloads. */\r\n sendMessage<T>(messageIdOrBag: string | BroadcastChannelMessageBag<T>, dataOrDelay?: T | number, delay?: number): void {\r\n const effectiveDelay = (typeof dataOrDelay === 'number' ? dataOrDelay : delay) ?? 0;\r\n setTimeout(() => {\r\n if (typeof messageIdOrBag === 'string') {\r\n this.channel?.postMessage({ messageId: messageIdOrBag, data: dataOrDelay } as BroadcastChannelMessageBag<T>);\r\n } else {\r\n this.channel?.postMessage(messageIdOrBag);\r\n }\r\n }, effectiveDelay);\r\n }\r\n\r\n /**\r\n * Registers a handler for messages with the given `messageId`.\r\n * If a handler for the same `messageId` is already registered it is replaced.\r\n * @param args - The subscription descriptor containing the message ID and handler.\r\n */\r\n subscribe<T>(args: BroadcastChannelSubscriberInfo<T>): void {\r\n const i = this.subscriptions.findIndex(m => m.messageId === args.messageId);\r\n if (i === -1) {\r\n this.subscriptions.push(args as BroadcastChannelSubscriberInfo<unknown>);\r\n } else {\r\n this.subscriptions[i].action = args.action as (bag: BroadcastChannelMessageBag<unknown>) => void;\r\n }\r\n }\r\n\r\n /**\r\n * Removes the subscription for the given message ID, if one exists.\r\n * @param messageId - The message type identifier whose subscription should be removed.\r\n */\r\n unsubscribe(messageId: string): void {\r\n const i = this.subscriptions.findIndex(m => m.messageId === messageId);\r\n if (i !== -1) {\r\n this.subscriptions.splice(i, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all registered subscriptions.\r\n */\r\n unsubscribeAll(): void {\r\n this.subscriptions = [];\r\n }\r\n}\r\n\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { BroadcastChannelManager, BroadcastChannelMessageBag } from './broadcastChannelManager';\r\n\r\n/** Payload carried by every in-process broadcast message. */\r\nexport interface BroadcastMessageInfo {\r\n /** Unique identifier for the message type. */\r\n id: string;\r\n /** Optional data attached to the message. */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data?: any;\r\n}\r\n\r\n/**\r\n * Application-level messaging service that combines two transports:\r\n * - An in-process RxJS `Subject` for same-tab communication (`sendMessage` / `getMessage`).\r\n * - A native `BroadcastChannel` for cross-tab communication (`sendChannelMessage` / `subscribeChannelMessage`).\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BroadcastService implements OnDestroy {\r\n private readonly subject = new Subject<BroadcastMessageInfo>();\r\n private readonly channel = new BroadcastChannelManager('ARS-CHANNEL');\r\n\r\n /**\r\n * Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.\r\n * Useful when a caller needs direct channel access outside the service.\r\n * @returns A new `BroadcastChannelManager` connected to `'ARS-CHANNEL'`.\r\n */\r\n static GetChannel(): BroadcastChannelManager {\r\n return new BroadcastChannelManager('ARS-CHANNEL');\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.channel?.dispose();\r\n }\r\n\r\n /**\r\n * Publishes a message to the in-process subject, optionally after a delay.\r\n * @param id - The message type identifier.\r\n * @param data - Optional payload to attach to the message.\r\n * @param delay - Milliseconds to wait before publishing (default: `0`).\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sendMessage(id: string, data?: any, delay: number = 0): void {\r\n setTimeout(() => {\r\n this.subject.next({ id, data });\r\n }, delay);\r\n }\r\n\r\n /**\r\n * Publishes a typed message over the native `BroadcastChannel` (cross-tab), optionally after a delay.\r\n * @param id - The message type identifier.\r\n * @param data - Optional typed payload to send.\r\n * @param delay - Milliseconds to wait before sending (forwarded to the channel manager).\r\n */\r\n sendChannelMessage<T>(id: string, data?: T, delay?: number): void {\r\n this.channel.sendMessage(id, data, delay);\r\n }\r\n\r\n /**\r\n * Registers a handler that is invoked whenever a channel message with the given `id` is received.\r\n * @param id - The message type identifier to listen for.\r\n * @param action - Callback invoked with the full `BroadcastChannelMessageBag` when a matching message arrives.\r\n */\r\n subscribeChannelMessage<T>(id: string, action: (bag: BroadcastChannelMessageBag<T>) => void): void {\r\n this.channel.subscribe({ messageId: id, action });\r\n }\r\n\r\n /**\r\n * Returns an `Observable` that emits every in-process message published via `sendMessage`.\r\n * @returns An observable stream of `BroadcastMessageInfo` objects.\r\n */\r\n getMessage(): Observable<BroadcastMessageInfo> {\r\n return this.subject.asObservable();\r\n }\r\n}\r\n\r\n","import { Injectable, computed, signal } from '@angular/core';\r\n\r\n/**\r\n * Application-wide environment configuration service.\r\n * Exposes writable signals for the base URIs used throughout the application.\r\n * Values should be set once during application bootstrap (e.g. in `APP_INITIALIZER`).\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EnvironmentService {\r\n\r\n /** Writable signal holding the base URI of the frontend application (e.g. `https://app.example.com`). */\r\n readonly appUriSignal = signal<string>('');\r\n\r\n /** Writable signal holding the base URI of the backend API service (e.g. `https://api.example.com`). */\r\n readonly appServiceUriSignal = signal<string>('');\r\n\r\n /**\r\n * Writable signal holding the redirect URI used after login.\r\n * When empty, `appLoginRedirectUri` falls back to `appUri`.\r\n */\r\n readonly appLoginRedirectUriSignal = signal<string>('');\r\n\r\n /**\r\n * Writable signal holding the login endpoint URI of the backend service.\r\n * When empty, `appServiceLoginUri` falls back to `appServiceUri`.\r\n */\r\n readonly appServiceLoginUriSignal = signal<string>('');\r\n\r\n // ── Computed: fallback logic ──────────────────────────────────────────────\r\n\r\n private readonly _effectiveLoginRedirectUri = computed(() =>\r\n this.appLoginRedirectUriSignal() || this.appUriSignal()\r\n );\r\n\r\n private readonly _effectiveServiceLoginUri = computed(() =>\r\n this.appServiceLoginUriSignal() || this.appServiceUriSignal()\r\n );\r\n\r\n // ── Getter / setter API (kept for backward compatibility) ─────────────────\r\n\r\n /** Base URI of the frontend application. */\r\n get appUri(): string { return this.appUriSignal(); }\r\n /** @param value - The base URI of the frontend application. */\r\n set appUri(value: string) { this.appUriSignal.set(value); }\r\n\r\n /** Base URI of the backend API service. */\r\n get appServiceUri(): string { return this.appServiceUriSignal(); }\r\n /** @param value - The base URI of the backend API service. */\r\n set appServiceUri(value: string) { this.appServiceUriSignal.set(value); }\r\n\r\n /**\r\n * Effective login redirect URI.\r\n * Returns the explicitly set value, or falls back to `appUri` when empty.\r\n */\r\n get appLoginRedirectUri(): string { return this._effectiveLoginRedirectUri(); }\r\n /** @param value - The redirect URI to use after login. */\r\n set appLoginRedirectUri(value: string) { this.appLoginRedirectUriSignal.set(value); }\r\n\r\n /**\r\n * Effective service login URI.\r\n * Returns the explicitly set value, or falls back to `appServiceUri` when empty.\r\n */\r\n get appServiceLoginUri(): string { return this._effectiveServiceLoginUri(); }\r\n /** @param value - The login endpoint URI of the backend service. */\r\n set appServiceLoginUri(value: string) { this.appServiceLoginUriSignal.set(value); }\r\n}\r\n\r\n\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Service that exposes reactive screen and device-capability information.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScreenService {\r\n\r\n /**\r\n * Writable signal that holds the current Material breakpoint alias\r\n * (e.g. `'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`).\r\n * Updated externally by the breakpoint observer in the consuming component or module.\r\n */\r\n readonly mq = signal<string>('');\r\n\r\n /**\r\n * Returns `true` when the primary input mechanism can hover over elements\r\n * with coarse pointer precision (i.e. a touch screen).\r\n */\r\n get isTouchable(): boolean {\r\n return SystemUtils.isTouchable();\r\n }\r\n\r\n /**\r\n * Returns `true` when the current browser is Internet Explorer or the legacy Edge (EdgeHTML).\r\n * Modern Chromium-based Edge reports a different user-agent and will return `false`.\r\n */\r\n get isIEOrEdge(): boolean {\r\n return /msie\\s|trident\\/|edge\\//i.test(window.navigator.userAgent);\r\n }\r\n}\r\n\r\n","import { computed, inject, Injectable, OnDestroy, RendererFactory2, Signal, signal } from \"@angular/core\";\r\nimport { BroadcastChannelManager, BroadcastChannelMessageBag } from './broadcastChannelManager';\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\n\r\n/** The three available theme modes: follow system preference, force light, or force dark. */\r\nexport type ThemeType = 'auto' | 'light' | 'dark';\r\n\r\n/** Internal schema that maps each `ThemeType` to its UI representation and the next value in the toggle cycle. */\r\ninterface ThemeInfoRecord {\r\n /** Material icon code for the current theme. */\r\n icon: string;\r\n /** Human-readable label for the current theme. */\r\n name: string;\r\n /** The `ThemeType` that `toggleTheme()` will switch to next. */\r\n next: ThemeType;\r\n /** Tooltip text shown on the toggle button. */\r\n tooltip: string;\r\n}\r\n\r\n/**\r\n * Application-level theme management service.\r\n *\r\n * Responsibilities:\r\n * - Persists the user's preferred theme in `localStorage`.\r\n * - Applies `'light'` or `'dark'` CSS class to `<body>`.\r\n * - Reacts to OS-level colour-scheme changes when the theme is set to `'auto'`.\r\n * - Synchronises theme changes across browser tabs via `BroadcastChannel`.\r\n * - Exposes reactive signals (`themeIcon`, `themeName`, `toggleTooltip`) for the UI.\r\n */\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ThemeService implements OnDestroy {\r\n\r\n private readonly broadcastChannel = new BroadcastChannelManager('THEME-SERVICE');\r\n private readonly broadcastMessage = '$theme-changed';\r\n\r\n private readonly prefersColorSchemeMediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\r\n\r\n /**\r\n * Observable that emits the resolved (`'light'` or `'dark'`) theme whenever it changes.\r\n * Useful for components that cannot consume signals directly (e.g. class-based guards).\r\n * @example\r\n * this.themeService.changed\r\n * .pipe(takeUntilDestroyed(this.destroyRef))\r\n * .subscribe(theme => { ... });\r\n */\r\n public readonly changed: Observable<ThemeType>;\r\n private readonly themeChanged = new BehaviorSubject<ThemeType>('auto');\r\n\r\n private readonly renderFactory2 = inject(RendererFactory2);\r\n private readonly renderer = this.renderFactory2.createRenderer(null, null);\r\n\r\n /** The currently selected `ThemeType` (may be `'auto'`). */\r\n private readonly theme = signal<ThemeType>('light');\r\n\r\n /** `true` when the theme is set to follow the system preference. */\r\n private readonly auto: Signal<boolean> = computed(() => this.theme() === 'auto');\r\n\r\n private readonly themeInfo: Record<ThemeType, ThemeInfoRecord> = {\r\n auto: { icon: 'routine', name: 'Tema di sistema', next: 'light', tooltip: 'Passa a tema chiaro' },\r\n light: { icon: 'light_mode', name: 'Tema chiaro', next: 'dark', tooltip: 'Passa a tema scuro' },\r\n dark: { icon: 'dark_mode', name: 'Tema scuro', next: 'auto', tooltip: 'Passa a tema di sistema' },\r\n };\r\n\r\n /** Reactive Material icon code for the current theme (use with `<mat-icon>`). */\r\n public readonly themeIcon: Signal<string> = computed(() => this.themeInfo[this.theme()].icon);\r\n\r\n /** Reactive human-readable name of the current theme. */\r\n public readonly themeName: Signal<string> = computed(() => this.themeInfo[this.theme()].name);\r\n\r\n /** Reactive tooltip text for the theme toggle button. */\r\n public readonly toggleTooltip: Signal<string> = computed(() => this.themeInfo[this.theme()].tooltip);\r\n\r\n constructor() {\r\n this.changed = this.themeChanged.asObservable();\r\n }\r\n\r\n /**\r\n * Initialises the service: loads the preferred theme, registers OS-change listener,\r\n * and subscribes to cross-tab broadcast messages.\r\n * Call this once during application bootstrap (e.g. in `APP_INITIALIZER`).\r\n * @param theme - The initial theme to apply (defaults to the value stored in `localStorage`).\r\n */\r\n initialize(theme: ThemeType = this.getPreferredTheme()): void {\r\n this.prefersColorSchemeMediaQueryList.onchange = () => {\r\n if (this.auto()) this.setTheme(this.theme());\r\n };\r\n\r\n this.broadcastChannel.subscribe<ThemeType>({\r\n messageId: this.broadcastMessage,\r\n action: (bag: BroadcastChannelMessageBag<ThemeType>) => {\r\n if (bag.data && this.theme() !== bag.data) {\r\n this.setTheme(bag.data);\r\n }\r\n }\r\n });\r\n\r\n this.setTheme(theme);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.broadcastChannel.dispose();\r\n }\r\n\r\n /**\r\n * Advances the theme through the cycle: `auto` → `light` → `dark` → `auto`.\r\n */\r\n public toggleTheme(): void {\r\n this.setTheme(this.themeInfo[this.theme()].next);\r\n }\r\n\r\n /**\r\n * Returns the resolved effective theme (`'light'` or `'dark'`), taking the OS preference\r\n * into account when the current mode is `'auto'`.\r\n * @returns `'light'` or `'dark'` — never `'auto'`.\r\n */\r\n public getTheme(): ThemeType {\r\n if (this.auto()) {\r\n return this.prefersColorSchemeMediaQueryList.matches ? 'dark' : 'light';\r\n }\r\n return this.getPreferredTheme();\r\n }\r\n\r\n /**\r\n * Reads the theme stored in `localStorage` and validates it.\r\n * Falls back to `'auto'` when the stored value is missing or invalid.\r\n * @returns The persisted `ThemeType`, or `'auto'` as default.\r\n */\r\n private getPreferredTheme(): ThemeType {\r\n const stored = localStorage.getItem('preferred-theme');\r\n return stored && this.isTheme(stored) ? stored : 'auto';\r\n }\r\n\r\n /**\r\n * Returns `true` when `value` is a valid `ThemeType` string.\r\n * Acts as a TypeScript type guard.\r\n * @param value - The string to check.\r\n */\r\n private isTheme(value: string): value is ThemeType {\r\n return value === 'auto' || value === 'light' || value === 'dark';\r\n }\r\n\r\n /**\r\n * Applies the given theme to `<body>` (CSS class), persists it to `localStorage`,\r\n * notifies the `changed` observable, and broadcasts the change to other tabs.\r\n * @param theme - The `ThemeType` to apply (defaults to `'auto'`).\r\n */\r\n private setTheme(theme: ThemeType = 'auto'): void {\r\n this.renderer.removeClass(document.body, 'light');\r\n this.renderer.removeClass(document.body, 'dark');\r\n this.theme.set(theme);\r\n localStorage.setItem('preferred-theme', theme);\r\n const effectiveClass = this.auto()\r\n ? (this.prefersColorSchemeMediaQueryList.matches ? 'dark' : 'light')\r\n : theme;\r\n this.renderer.addClass(document.body, effectiveClass);\r\n this.themeChanged.next(this.getTheme());\r\n this.broadcastChannel.sendMessage(this.broadcastMessage, theme);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AutoFocusDirective } from './directives/autoFocusDirective';\r\nimport { DateIntervalChangeDirective } from './directives/changeDateIntervalDirective';\r\nimport { CopyClipboardDirective } from './directives/copyClipboardDirective';\r\nimport { EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SqlDateValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective } from './directives/validators';\r\nimport { FormatPipe } from './pipes/format.pipe';\r\nimport { ReplacePipe } from './pipes/replace.pipe';\r\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\r\nimport { SafeUrlPipe } from './pipes/safe-url.pipe';\r\nimport { SearchCallbackPipe } from './pipes/search-callback.pipe';\r\nimport { SearchFilterPipe } from './pipes/search-filter.pipe';\r\nimport { FormatHtmlPipe } from './pipes/format-html.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n FileSizeValidatorDirective,\r\n ValidIfDirective,\r\n ValidatorDirective,\r\n EqualsValidatorDirective,\r\n GuidValidatorDirective,\r\n EmailsValidatorDirective,\r\n UrlValidatorDirective,\r\n NotFutureValidatorDirective,\r\n NotEmptyValidatorDirective,\r\n PasswordValidatorDirective,\r\n DateIntervalChangeDirective,\r\n SqlDateValidatorDirective,\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe,\r\n CopyClipboardDirective,\r\n AutoFocusDirective,\r\n MaxTermsValidatorDirective\r\n ],\r\n exports: [\r\n FileSizeValidatorDirective,\r\n ValidIfDirective,\r\n ValidatorDirective,\r\n EqualsValidatorDirective,\r\n GuidValidatorDirective,\r\n EmailsValidatorDirective,\r\n UrlValidatorDirective,\r\n NotFutureValidatorDirective,\r\n NotEmptyValidatorDirective,\r\n PasswordValidatorDirective,\r\n DateIntervalChangeDirective,\r\n SqlDateValidatorDirective,\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe,\r\n CopyClipboardDirective,\r\n AutoFocusDirective,\r\n MaxTermsValidatorDirective\r\n ],\r\n providers: [\r\n SearchFilterPipe,\r\n SearchCallbackPipe,\r\n SafeHtmlPipe,\r\n SafeUrlPipe,\r\n ReplacePipe,\r\n FormatPipe,\r\n FormatHtmlPipe\r\n ]\r\n})\r\nexport class ArsCoreModule { }\r\n\r\nexport * from './definitions';\r\nexport * from './breakpoints';\r\nexport * from './messages';\r\nexport * from './selectable';\r\nexport * from './services/broadcast.service';\r\nexport * from './services/environment.service';\r\nexport * from './services/screen.service';\r\nexport * from './services/theme.service';\r\nexport * from './system';\r\n\r\n","import { inject, Injectable, NgModule } from '@angular/core';\r\nimport { DateAdapter, MatDateFormats, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';\r\nimport { TZDate } from '@date-fns/tz';\r\nimport {\r\n Locale,\r\n getMonth,\r\n getYear,\r\n getDate,\r\n getDay,\r\n getDaysInMonth,\r\n formatISO,\r\n addYears,\r\n addMonths,\r\n addDays,\r\n isValid,\r\n isDate,\r\n format,\r\n parseISO,\r\n parse,\r\n} from 'date-fns';\r\n\r\n\r\n/**\r\n * Creates an array of the given length, filling each slot with the result of `valueFunction`.\r\n * @param length - Number of elements to create.\r\n * @param valueFunction - Factory called with each index to produce the element value.\r\n * @returns Typed array of `length` elements.\r\n */\r\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\r\n const valuesArray = Array(length);\r\n for (let i = 0; i < length; i++) {\r\n valuesArray[i] = valueFunction(i);\r\n }\r\n return valuesArray;\r\n}\r\n\r\n// date-fns doesn't have a way to read/print month names or days of the week directly,\r\n// so we get them by formatting a date with a format that produces the desired month/day.\r\nconst MONTH_FORMATS = {\r\n long: 'LLLL',\r\n short: 'LLL',\r\n narrow: 'LLLLL',\r\n};\r\n\r\nconst DAY_OF_WEEK_FORMATS = {\r\n long: 'EEEE',\r\n short: 'EEE',\r\n narrow: 'EEEEE',\r\n};\r\n\r\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\r\n parse: {\r\n dateInput: 'P',\r\n },\r\n display: {\r\n dateInput: 'P',\r\n monthYearLabel: 'LLL uuuu',\r\n dateA11yLabel: 'PP',\r\n monthYearA11yLabel: 'LLLL uuuu',\r\n },\r\n};\r\n\r\n\r\n/**\r\n * date-fns adapter that integrates Angular Material's date picker with the date-fns library,\r\n * applying `Europe/Rome` timezone for all parsed and created dates.\r\n */\r\n@Injectable()\r\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const matDateLocale = inject(MAT_DATE_LOCALE, { optional: true });\r\n if (matDateLocale) {\r\n this.setLocale(matDateLocale as Locale);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the year component of the given date.\r\n * @param date - The source date.\r\n */\r\n getYear(date: Date): number {\r\n return getYear(date);\r\n }\r\n\r\n /**\r\n * Returns the zero-based month index of the given date (0 = January).\r\n * @param date - The source date.\r\n */\r\n getMonth(date: Date): number {\r\n return getMonth(date);\r\n }\r\n\r\n /**\r\n * Returns the day-of-month of the given date (1-based).\r\n * @param date - The source date.\r\n */\r\n getDate(date: Date): number {\r\n return getDate(date);\r\n }\r\n\r\n /**\r\n * Returns the day-of-week of the given date (0 = Sunday).\r\n * @param date - The source date.\r\n */\r\n getDayOfWeek(date: Date): number {\r\n return getDay(date);\r\n }\r\n\r\n /**\r\n * Returns an array of 12 month name strings formatted for the active locale.\r\n * @param style - One of `'long'`, `'short'`, or `'narrow'`.\r\n */\r\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const pattern = MONTH_FORMATS[style];\r\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\r\n }\r\n\r\n /**\r\n * Returns an array of 31 day-of-month label strings formatted using `Intl.DateTimeFormat`\r\n * when available, falling back to plain numeric strings.\r\n */\r\n getDateNames(): string[] {\r\n const dtf =\r\n typeof Intl !== 'undefined'\r\n ? new Intl.DateTimeFormat(this.locale?.code, {\r\n day: 'numeric',\r\n timeZone: 'utc',\r\n })\r\n : null;\r\n\r\n return range(31, i => {\r\n if (dtf) {\r\n // date-fns doesn't appear to support this functionality.\r\n // Fall back to `Intl` on supported browsers.\r\n const date = new Date();\r\n date.setUTCFullYear(2017, 0, i + 1);\r\n date.setUTCHours(0, 0, 0, 0);\r\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\r\n }\r\n\r\n return String(i + 1);\r\n });\r\n }\r\n\r\n /**\r\n * Returns an array of 7 day-of-week name strings formatted for the active locale.\r\n * @param style - One of `'long'`, `'short'`, or `'narrow'`.\r\n */\r\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const pattern = DAY_OF_WEEK_FORMATS[style];\r\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\r\n }\r\n\r\n /**\r\n * Returns the four-digit year string for the given date.\r\n * @param date - The source date.\r\n */\r\n getYearName(date: Date): string {\r\n return this.format(date, 'y');\r\n }\r\n\r\n /**\r\n * Returns the first day of the week for the active locale (0 = Sunday, 1 = Monday, …).\r\n */\r\n getFirstDayOfWeek(): number {\r\n return this.locale?.options?.weekStartsOn ?? 0;\r\n }\r\n\r\n /**\r\n * Returns the number of days in the month of the given date.\r\n * @param date - The source date.\r\n */\r\n getNumDaysInMonth(date: Date): number {\r\n return getDaysInMonth(date);\r\n }\r\n\r\n /**\r\n * Creates an independent copy of the given date.\r\n * @param date - The date to clone.\r\n */\r\n clone(date: Date): Date {\r\n return new Date(date.getTime());\r\n }\r\n\r\n /**\r\n * Creates a `Date` in the `Europe/Rome` timezone for the given year, month, and day.\r\n * Throws an `Error` when any component is out of range.\r\n * @param year - Full four-digit year.\r\n * @param month - Zero-based month index (0 = January, 11 = December).\r\n * @param date - Day-of-month (1-based).\r\n */\r\n createDate(year: number, month: number, date: number): Date {\r\n if (month < 0 || month > 11) {\r\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\r\n }\r\n\r\n if (date < 1) {\r\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\r\n }\r\n\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this we use `setFullYear` and `setHours` instead.\r\n const result = new Date();\r\n result.setFullYear(year, month, date);\r\n result.setHours(0, 0, 0, 0);\r\n const result2 = new TZDate(result, 'Europe/Rome');\r\n\r\n if (result2.getMonth() !== month) {\r\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\r\n }\r\n\r\n return result2;\r\n }\r\n\r\n /**\r\n * Returns today's date in the local timezone.\r\n */\r\n today(): Date {\r\n return new Date();\r\n }\r\n\r\n /**\r\n * Parses a value into a `Date`.\r\n * - Strings are first attempted as ISO 8601, then matched against each format in `parseFormat`.\r\n * - Numbers are treated as Unix timestamps (milliseconds).\r\n * - Existing `Date` instances are cloned.\r\n * @param value - The value to parse.\r\n * @param parseFormat - A format string or an array of format strings (date-fns tokens).\r\n * @returns A valid `Date` in `Europe/Rome`, an invalid sentinel, or `null` for unrecognised input.\r\n */\r\n parse(value: unknown, parseFormat: string | string[]): Date | null {\r\n if (typeof value === 'string' && value.length > 0) {\r\n const iso8601Date = parseISO(value);\r\n if (this.isValid(iso8601Date)) {\r\n return new TZDate(iso8601Date, 'Europe/Rome');\r\n }\r\n\r\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\r\n\r\n if (!formats.length) {\r\n throw Error('Formats array must not be empty.');\r\n }\r\n\r\n for (const currentFormat of formats) {\r\n const fromFormat = parse(value, currentFormat, new Date(), { locale: this.locale });\r\n if (this.isValid(fromFormat)) {\r\n return new TZDate(fromFormat, 'Europe/Rome');\r\n }\r\n }\r\n\r\n return this.invalid();\r\n } else if (typeof value === 'number') {\r\n return new Date(value);\r\n } else if (value instanceof Date) {\r\n return this.clone(value);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Formats a `Date` using the given date-fns display format string.\r\n * Throws an `Error` when `date` is not valid.\r\n * @param date - The date to format.\r\n * @param displayFormat - A date-fns format string (e.g. `'P'`, `'LLL uuuu'`).\r\n */\r\n format(date: Date, displayFormat: string): string {\r\n if (!this.isValid(date)) {\r\n throw Error('DateFnsAdapter: Cannot format invalid date.');\r\n }\r\n\r\n return format(date, displayFormat, { locale: this.locale });\r\n }\r\n\r\n /**\r\n * Adds the given number of whole years to a date.\r\n * @param date - The base date.\r\n * @param years - Number of years to add (can be negative).\r\n */\r\n addCalendarYears(date: Date, years: number): Date {\r\n return addYears(date, years);\r\n }\r\n\r\n /**\r\n * Adds the given number of whole months to a date.\r\n * @param date - The base date.\r\n * @param months - Number of months to add (can be negative).\r\n */\r\n addCalendarMonths(date: Date, months: number): Date {\r\n return addMonths(date, months);\r\n }\r\n\r\n /**\r\n * Adds the given number of whole days to a date.\r\n * @param date - The base date.\r\n * @param days - Number of days to add (can be negative).\r\n */\r\n addCalendarDays(date: Date, days: number): Date {\r\n return addDays(date, days);\r\n }\r\n\r\n /**\r\n * Serialises a date to an ISO 8601 date string (`yyyy-MM-dd`).\r\n * @param date - The date to serialise.\r\n */\r\n toIso8601(date: Date): string {\r\n return formatISO(date, { representation: 'date' });\r\n }\r\n\r\n /**\r\n * Returns the given value when it is a valid `Date`, or `null` for an empty string.\r\n * Deserialises valid ISO 8601 strings into `Date` instances.\r\n * Delegates all other values to the base-class implementation.\r\n * @param value - The raw value to deserialise.\r\n */\r\n override deserialize(value: unknown): Date | null {\r\n if (typeof value === 'string') {\r\n if (!value) {\r\n return null;\r\n }\r\n const date = parseISO(value);\r\n if (this.isValid(date)) {\r\n return date;\r\n }\r\n }\r\n return super.deserialize(value);\r\n }\r\n\r\n /**\r\n * Returns `true` when `obj` is an instance of `Date`.\r\n * @param obj - The object to test.\r\n */\r\n isDateInstance(obj: unknown): boolean {\r\n return isDate(obj);\r\n }\r\n\r\n /**\r\n * Returns `true` when `date` represents a valid point in time.\r\n * @param date - The date to validate.\r\n */\r\n isValid(date: Date): boolean {\r\n return isValid(date);\r\n }\r\n\r\n /**\r\n * Returns a sentinel `Date` that represents an invalid date (`new Date(NaN)`).\r\n */\r\n invalid(): Date {\r\n return new Date(NaN);\r\n }\r\n}\r\n\r\n@NgModule({\r\n providers: [\r\n {\r\n provide: DateAdapter,\r\n useClass: DateFnsAdapter,\r\n deps: [MAT_DATE_LOCALE],\r\n },\r\n { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }\r\n ],\r\n})\r\nexport class ArsDateFnsModule { }\r\n","import { Directive, ElementRef, HostListener, inject } from '@angular/core';\r\n\r\n/**\r\n * Directive that removes focus from the host element after it is clicked,\r\n * preventing the browser from keeping a visible focus ring post-interaction.\r\n * Apply `removeFocus` to any focusable element (e.g. a button).\r\n */\r\n@Directive({\r\n selector: '[removeFocus]',\r\n standalone: true\r\n})\r\nexport class RemoveFocusDirective {\r\n\r\n private readonly elementRef = inject(ElementRef);\r\n\r\n /**\r\n * Handles click events on the host element and blurs it on the next event-loop tick\r\n * so that the click action completes before focus is removed.\r\n */\r\n @HostListener('click')\r\n onClick(): void {\r\n const el = this.elementRef.nativeElement;\r\n if (el && typeof el.blur === 'function') {\r\n setTimeout(() => el.blur(), 0);\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { SystemUtils } from '../system';\r\n\r\n/**\r\n * Pipe that converts a Markdown string to sanitized HTML using `SystemUtils.markdownToHtml`.\r\n *\r\n * Usage: `{{ text | formatMarkdown }}`\r\n */\r\n@Pipe({\r\n name: 'formatMarkdown',\r\n standalone: true\r\n})\r\nexport class FormatMarkdownPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n\r\n /**\r\n * Transforms a Markdown string into sanitized HTML.\r\n * @param value - The Markdown input to convert. Treated as an empty string when `undefined`.\r\n * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.\r\n */\r\n transform(value?: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml(\r\n SystemUtils.markdownToHtml(value ?? ''));\r\n }\r\n}\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './core.module';\r\nexport * from './dateFnsAdapter.module';\r\nexport * from './directives/index';\r\nexport * from './pipes/index';\r\nexport * from './system';\r\nexport * from './definitions';\r\nexport * from './breakpoints';\r\nexport * from './selectable';\r\nexport * from './services/index';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;;;AAGG;MAKU,kBAAkB,CAAA;AAI3B,IAAA,WAAA,GAAA;AAFiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAG5C,eAAe,CAAC,MAAK;AACjB,YAAA,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,KAAK,EAAE;AAC1C,QAAA,CAAC,CAAC;IACN;+GARS,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,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