@sd-angular/core 19.0.10 → 19.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +20 -20
  2. package/assets/STYLE-GUIDE.md +19 -19
  3. package/assets/fonts/fonts.scss +115 -115
  4. package/assets/scss/core/scrollbar.scss +30 -30
  5. package/assets/scss/core/utilities/_grid.scss +149 -149
  6. package/components/form-generic/src/components/form-builder/components/expression-builder/expression-builder.component.d.ts +1 -1
  7. package/components/form-generic/src/components/form-builder/components/table/control/table-control.component.d.ts +1 -1
  8. package/components/form-generic/src/components/sd-feel-expression/sd-feel-expression.component.d.ts +1 -1
  9. package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +1 -1
  10. package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
  11. package/fesm2022/sd-angular-core-components-autoid-inspector.mjs.map +1 -1
  12. package/fesm2022/sd-angular-core-components-avatar.mjs +2 -2
  13. package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -1
  14. package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
  15. package/fesm2022/sd-angular-core-components-chart.mjs +40 -40
  16. package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -1
  17. package/fesm2022/sd-angular-core-components-editor.mjs +2 -2
  18. package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
  19. package/fesm2022/sd-angular-core-components-form-generic.mjs +2 -2
  20. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  21. package/fesm2022/sd-angular-core-components-inform.mjs +2 -2
  22. package/fesm2022/sd-angular-core-components-inform.mjs.map +1 -1
  23. package/fesm2022/sd-angular-core-components-modal.mjs +2 -2
  24. package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
  25. package/fesm2022/sd-angular-core-components-org-chart.mjs +2 -2
  26. package/fesm2022/sd-angular-core-components-org-chart.mjs.map +1 -1
  27. package/fesm2022/sd-angular-core-components-preview.mjs +4 -4
  28. package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
  29. package/fesm2022/sd-angular-core-components-query-bar.mjs +10 -10
  30. package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -1
  31. package/fesm2022/sd-angular-core-components-query-builder.mjs +2 -2
  32. package/fesm2022/sd-angular-core-components-query-builder.mjs.map +1 -1
  33. package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
  34. package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
  35. package/fesm2022/sd-angular-core-components-section.mjs +2 -2
  36. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  37. package/fesm2022/sd-angular-core-components-side-drawer.mjs +2 -2
  38. package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
  39. package/fesm2022/sd-angular-core-components-splitter.mjs +6 -6
  40. package/fesm2022/sd-angular-core-components-splitter.mjs.map +1 -1
  41. package/fesm2022/sd-angular-core-components-stepper.mjs +2 -2
  42. package/fesm2022/sd-angular-core-components-stepper.mjs.map +1 -1
  43. package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
  44. package/fesm2022/sd-angular-core-components-tab.mjs +2 -2
  45. package/fesm2022/sd-angular-core-components-tab.mjs.map +1 -1
  46. package/fesm2022/sd-angular-core-components-table.mjs +8 -8
  47. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  48. package/fesm2022/sd-angular-core-components-tree.mjs +2 -2
  49. package/fesm2022/sd-angular-core-components-tree.mjs.map +1 -1
  50. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
  51. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  52. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  53. package/fesm2022/sd-angular-core-forms-date-range.mjs +2 -2
  54. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  55. package/fesm2022/sd-angular-core-forms-datetime.mjs +4 -4
  56. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  57. package/fesm2022/sd-angular-core-forms-inline-text.mjs.map +1 -1
  58. package/fesm2022/sd-angular-core-forms-input-number.mjs +2 -2
  59. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  60. package/fesm2022/sd-angular-core-forms-label.mjs +2 -2
  61. package/fesm2022/sd-angular-core-forms-label.mjs.map +1 -1
  62. package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
  63. package/fesm2022/sd-angular-core-forms-select.mjs +2 -2
  64. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  65. package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
  66. package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -1
  67. package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -1
  68. package/fesm2022/sd-angular-core-modules-layout.mjs +2 -2
  69. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  70. package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
  71. package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
  72. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  73. package/fesm2022/sd-angular-core-services-excel.mjs +26 -19
  74. package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
  75. package/fesm2022/sd-angular-core-services-notify.mjs +2 -2
  76. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  77. package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
  78. package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
  79. package/fesm2022/sd-angular-core.mjs.map +1 -1
  80. package/modules/keycloak/htmls/auth-keycloak-error.html +54 -54
  81. package/modules/keycloak/htmls/silent-renew.html +7 -7
  82. package/package.json +43 -43
  83. package/sd-angular-core-19.0.11.tgz +0 -0
  84. package/services/excel/src/lib/excel.service.d.ts +0 -1
  85. package/services/excel/src/lib/spreadsheet-formula-injection.util.d.ts +5 -0
  86. package/sd-angular-core-19.0.10.tgz +0 -0
@@ -1,149 +1,149 @@
1
- @use "sass:math";
2
-
3
- // --------------------------------------------------------------------------
4
- // Grid - row/col 12-column flexbox + native CSS Grid container
5
- // Pure CSS Flexbox / CSS Grid, with no external framework dependency.
6
- // Breakpoint convention (sm/md/lg/xl) matches Bootstrap to ease host migration.
7
- // --------------------------------------------------------------------------
8
-
9
- // --------------------------------------------------------------------------
10
- // 1. Flexbox row/col (.row, .col-{1-12})
11
- // --------------------------------------------------------------------------
12
- $grid-columns: 12;
13
- $grid-gutter: 16px;
14
-
15
- .row {
16
- display: flex;
17
- flex-wrap: wrap;
18
- margin-left: calc(-1 * $grid-gutter / 2);
19
- margin-right: calc(-1 * $grid-gutter / 2);
20
-
21
- > * {
22
- box-sizing: border-box;
23
- padding-left: calc($grid-gutter / 2);
24
- padding-right: calc($grid-gutter / 2);
25
- }
26
- }
27
-
28
- // Gutter variants
29
- .row-md {
30
- @extend .row;
31
- margin-left: -8px;
32
- margin-right: -8px;
33
- > * { padding-left: 8px; padding-right: 8px; }
34
- }
35
-
36
- .row-sm {
37
- @extend .row;
38
- margin-left: -4px;
39
- margin-right: -4px;
40
- > * { padding-left: 4px; padding-right: 4px; }
41
- }
42
-
43
- .row-xs {
44
- @extend .row;
45
- margin-left: -2px;
46
- margin-right: -2px;
47
- > * { padding-left: 2px; padding-right: 2px; }
48
- }
49
-
50
- // .col-1 ... .col-12
51
- @for $i from 1 through $grid-columns {
52
- $col-size: math.percentage(math.div($i, $grid-columns));
53
-
54
- .col-#{$i} {
55
- box-sizing: border-box;
56
- width: $col-size;
57
- flex: 0 0 $col-size;
58
- max-width: $col-size;
59
- padding-left: calc($grid-gutter / 2);
60
- padding-right: calc($grid-gutter / 2);
61
- }
62
- }
63
-
64
- .col {
65
- flex: 1 1 0%;
66
- padding-left: calc($grid-gutter / 2);
67
- padding-right: calc($grid-gutter / 2);
68
- }
69
-
70
- // --------------------------------------------------------------------------
71
- // 1b. Responsive columns
72
- // col-sm-{1-12}: >= 576px
73
- // col-md-{1-12}: >= 768px
74
- // col-lg-{1-12}: >= 992px
75
- // col-xl-{1-12}: >= 1200px
76
- //
77
- // Mobile-first: default width is 100%; column size applies from breakpoint up.
78
- // --------------------------------------------------------------------------
79
- $grid-breakpoints: (
80
- 'sm': 576px,
81
- 'md': 768px,
82
- 'lg': 992px,
83
- 'xl': 1200px,
84
- );
85
-
86
- // col-{bp} - full-width flexible column at the breakpoint
87
- @each $bp, $min-width in $grid-breakpoints {
88
- @media (min-width: $min-width) {
89
- .col-#{$bp} {
90
- flex: 1 1 0%;
91
- padding-left: calc($grid-gutter / 2);
92
- padding-right: calc($grid-gutter / 2);
93
- }
94
- }
95
- }
96
-
97
- // col-{bp}-{1-12} - n/12 column width at the breakpoint
98
- @each $bp, $min-width in $grid-breakpoints {
99
- @media (min-width: $min-width) {
100
- @for $i from 1 through $grid-columns {
101
- $col-size: math.percentage(math.div($i, $grid-columns));
102
-
103
- .col-#{$bp}-#{$i} {
104
- box-sizing: border-box;
105
- width: $col-size;
106
- flex: 0 0 $col-size;
107
- max-width: $col-size;
108
- padding-left: calc($grid-gutter / 2);
109
- padding-right: calc($grid-gutter / 2);
110
- }
111
- }
112
- }
113
- }
114
-
115
- // --------------------------------------------------------------------------
116
- // 2. CSS Grid container (.grid-container)
117
- // grid-container + grid-cols-{1-12} + col-span-{1-12}
118
- // --------------------------------------------------------------------------
119
- .grid-container {
120
- display: grid;
121
- column-gap: 8px;
122
- row-gap: 0;
123
-
124
- @for $i from 1 through 12 {
125
- &.grid-cols-#{$i} {
126
- grid-template-columns: repeat($i, minmax(0, 1fr));
127
- }
128
- }
129
-
130
- @for $i from 1 through 12 {
131
- .col-span-#{$i} {
132
- grid-column: span #{$i} / span #{$i};
133
- }
134
- }
135
-
136
- .col-span-full {
137
- grid-column: 1 / -1;
138
- }
139
-
140
- @for $i from 1 through 12 {
141
- .row-span-#{$i} {
142
- grid-row: span #{$i} / span #{$i};
143
- }
144
- }
145
-
146
- .row-span-full {
147
- grid-row: 1 / -1;
148
- }
149
- }
1
+ @use "sass:math";
2
+
3
+ // --------------------------------------------------------------------------
4
+ // Grid - row/col 12-column flexbox + native CSS Grid container
5
+ // Pure CSS Flexbox / CSS Grid, with no external framework dependency.
6
+ // Breakpoint convention (sm/md/lg/xl) matches Bootstrap to ease host migration.
7
+ // --------------------------------------------------------------------------
8
+
9
+ // --------------------------------------------------------------------------
10
+ // 1. Flexbox row/col (.row, .col-{1-12})
11
+ // --------------------------------------------------------------------------
12
+ $grid-columns: 12;
13
+ $grid-gutter: 16px;
14
+
15
+ .row {
16
+ display: flex;
17
+ flex-wrap: wrap;
18
+ margin-left: calc(-1 * $grid-gutter / 2);
19
+ margin-right: calc(-1 * $grid-gutter / 2);
20
+
21
+ > * {
22
+ box-sizing: border-box;
23
+ padding-left: calc($grid-gutter / 2);
24
+ padding-right: calc($grid-gutter / 2);
25
+ }
26
+ }
27
+
28
+ // Gutter variants
29
+ .row-md {
30
+ @extend .row;
31
+ margin-left: -8px;
32
+ margin-right: -8px;
33
+ > * { padding-left: 8px; padding-right: 8px; }
34
+ }
35
+
36
+ .row-sm {
37
+ @extend .row;
38
+ margin-left: -4px;
39
+ margin-right: -4px;
40
+ > * { padding-left: 4px; padding-right: 4px; }
41
+ }
42
+
43
+ .row-xs {
44
+ @extend .row;
45
+ margin-left: -2px;
46
+ margin-right: -2px;
47
+ > * { padding-left: 2px; padding-right: 2px; }
48
+ }
49
+
50
+ // .col-1 ... .col-12
51
+ @for $i from 1 through $grid-columns {
52
+ $col-size: math.percentage(math.div($i, $grid-columns));
53
+
54
+ .col-#{$i} {
55
+ box-sizing: border-box;
56
+ width: $col-size;
57
+ flex: 0 0 $col-size;
58
+ max-width: $col-size;
59
+ padding-left: calc($grid-gutter / 2);
60
+ padding-right: calc($grid-gutter / 2);
61
+ }
62
+ }
63
+
64
+ .col {
65
+ flex: 1 1 0%;
66
+ padding-left: calc($grid-gutter / 2);
67
+ padding-right: calc($grid-gutter / 2);
68
+ }
69
+
70
+ // --------------------------------------------------------------------------
71
+ // 1b. Responsive columns
72
+ // col-sm-{1-12}: >= 576px
73
+ // col-md-{1-12}: >= 768px
74
+ // col-lg-{1-12}: >= 992px
75
+ // col-xl-{1-12}: >= 1200px
76
+ //
77
+ // Mobile-first: default width is 100%; column size applies from breakpoint up.
78
+ // --------------------------------------------------------------------------
79
+ $grid-breakpoints: (
80
+ 'sm': 576px,
81
+ 'md': 768px,
82
+ 'lg': 992px,
83
+ 'xl': 1200px,
84
+ );
85
+
86
+ // col-{bp} - full-width flexible column at the breakpoint
87
+ @each $bp, $min-width in $grid-breakpoints {
88
+ @media (min-width: $min-width) {
89
+ .col-#{$bp} {
90
+ flex: 1 1 0%;
91
+ padding-left: calc($grid-gutter / 2);
92
+ padding-right: calc($grid-gutter / 2);
93
+ }
94
+ }
95
+ }
96
+
97
+ // col-{bp}-{1-12} - n/12 column width at the breakpoint
98
+ @each $bp, $min-width in $grid-breakpoints {
99
+ @media (min-width: $min-width) {
100
+ @for $i from 1 through $grid-columns {
101
+ $col-size: math.percentage(math.div($i, $grid-columns));
102
+
103
+ .col-#{$bp}-#{$i} {
104
+ box-sizing: border-box;
105
+ width: $col-size;
106
+ flex: 0 0 $col-size;
107
+ max-width: $col-size;
108
+ padding-left: calc($grid-gutter / 2);
109
+ padding-right: calc($grid-gutter / 2);
110
+ }
111
+ }
112
+ }
113
+ }
114
+
115
+ // --------------------------------------------------------------------------
116
+ // 2. CSS Grid container (.grid-container)
117
+ // grid-container + grid-cols-{1-12} + col-span-{1-12}
118
+ // --------------------------------------------------------------------------
119
+ .grid-container {
120
+ display: grid;
121
+ column-gap: 8px;
122
+ row-gap: 0;
123
+
124
+ @for $i from 1 through 12 {
125
+ &.grid-cols-#{$i} {
126
+ grid-template-columns: repeat($i, minmax(0, 1fr));
127
+ }
128
+ }
129
+
130
+ @for $i from 1 through 12 {
131
+ .col-span-#{$i} {
132
+ grid-column: span #{$i} / span #{$i};
133
+ }
134
+ }
135
+
136
+ .col-span-full {
137
+ grid-column: 1 / -1;
138
+ }
139
+
140
+ @for $i from 1 through 12 {
141
+ .row-span-#{$i} {
142
+ grid-row: span #{$i} / span #{$i};
143
+ }
144
+ }
145
+
146
+ .row-span-full {
147
+ grid-row: 1 / -1;
148
+ }
149
+ }
@@ -7,7 +7,7 @@ export declare class ExpressionBuilderComponent {
7
7
  private ref;
8
8
  modal?: SdModal;
9
9
  form: FormGroup<{}>;
10
- attributeOperators: Record<"string" | "number" | "boolean" | "datetime" | "values", {
10
+ attributeOperators: Record<"string" | "number" | "boolean" | "values" | "datetime", {
11
11
  value: import("@sd-angular/core/components/form-generic").Operator;
12
12
  symbol?: string;
13
13
  display: string;
@@ -11,7 +11,7 @@ export declare class TableControl {
11
11
  constructor(ref: ChangeDetectorRef, builderService: BuilderService);
12
12
  ngAfterViewInit(): void;
13
13
  ngOnDestroy(): void;
14
- columnIcon: (type: string) => "image" | "text_fields" | "123" | "calendar_month" | "radio_button_checked" | "check_box" | "attach_file";
14
+ columnIcon: (type: string) => "image" | "text_fields" | "123" | "check_box" | "calendar_month" | "radio_button_checked" | "attach_file";
15
15
  sampleRows: () => number[];
16
16
  cellPreview: (column: any, rowIndex: number) => any;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<TableControl, never>;
@@ -12,7 +12,7 @@ export declare class SdFeelExpression {
12
12
  private formGenericService;
13
13
  modal?: SdModal;
14
14
  form: FormGroup<{}>;
15
- attributeOperators: Record<"string" | "number" | "boolean" | "datetime" | "values", {
15
+ attributeOperators: Record<"string" | "number" | "boolean" | "values" | "datetime", {
16
16
  value: import("@sd-angular/core/components/form-generic").Operator;
17
17
  symbol?: string;
18
18
  display: string;
@@ -23,7 +23,7 @@ export declare class ColumnFilterComponent {
23
23
  display: string;
24
24
  }[]>;
25
25
  operatorValues: Signal<Operator[]>;
26
- items: Signal<any[] | SdSearch | Signal<any[]>>;
26
+ items: Signal<any[] | Signal<any[]> | SdSearch>;
27
27
  constructor();
28
28
  onFilterChange: () => void;
29
29
  onFilterCommit: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-components-anchor.mjs","sources":["../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.html","../../../projects/sd-angular/components/anchor/sd-angular-core-components-anchor.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, effect, inject, input } from '@angular/core';\r\nimport { IAnchorItem } from '../../models';\r\nimport { Utilities } from '@sdcorejs/utils/fns';\r\n\r\n@Component({\r\n selector: 'sd-anchor-item',\r\n templateUrl: './anchor-item.component.html',\r\n styleUrl: './anchor-item.component.scss',\r\n imports: [CommonModule],\r\n standalone: true,\r\n})\r\nexport class SdAnchorItem implements IAnchorItem {\r\n title = input.required<string>();\r\n icon = input<string | undefined>();\r\n // Stable key dùng cho data-autoId. Nếu không truyền thì fallback về uuid (không stable giữa các lần render).\r\n key = input<string | undefined>(undefined);\r\n id: string = Utilities.generateUuid();\r\n elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.title()) {\r\n this.elementRef.nativeElement.removeAttribute('title');\r\n }\r\n });\r\n }\r\n}\r\n","<section>\r\n <ng-content></ng-content>\r\n</section>\r\n","import { ChangeDetectionStrategy, Component, OnDestroy, computed, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Color } from '@sdcorejs/utils/models';\nimport { Subject, Subscription, debounceTime } from 'rxjs';\n\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\n\n@Component({\n selector: 'anchor-nav',\n templateUrl: './anchor-nav.component.html',\n styleUrl: './anchor-nav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, MatIconModule],\n standalone: true,\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class AnchorNav implements OnDestroy {\n sections = input.required<readonly SdAnchorItem[]>();\n activeSectionId = input<string>('');\n ellipsis = input<boolean>(false);\n sidebarWidth = input<string>('');\n // autoId được forward từ <sd-anchor>. Derive per-item autoId theo `key` của item (nếu có).\n parentAutoId = input<string | undefined | null>(undefined);\n color = input<Color>('primary');\n\n // CSS var binding cho active state — map SdColor → global token `--sd-{color}`.\n // SCSS đọc qua `var(--anchor-active-color)` cho border + text + icon.\n cssActiveVar = computed(() => `var(--sd-${this.color()})`);\n\n itemAutoId(section: SdAnchorItem): string | undefined {\n const parent = this.parentAutoId();\n const key = section.key();\n return parent && key ? `${parent}-${key}` : undefined;\n }\n\n clickSection = output<string>();\n\n #delay = 200;\n #clickSectionSubject = new Subject<string>();\n #subscription = new Subscription();\n\n constructor() {\n this.#subscription.add(\n this.#clickSectionSubject\n .pipe(debounceTime(this.#delay))\n .subscribe((id: string) => this.clickSection.emit(id))\n );\n }\n\n onClickSection = (id: string): void => {\n this.#clickSectionSubject.next(id);\n };\n\n ngOnDestroy(): void {\n this.#subscription.unsubscribe();\n }\n}\n","<div\r\n class=\"c-anchor-list\"\r\n [style.width]=\"sidebarWidth()\"\r\n [style.--anchor-active-color]=\"cssActiveVar()\">\r\n @for (section of sections(); track section.id) {\r\n <div\r\n class=\"c-anchor-list-item\"\r\n [class.active]=\"section.id === activeSectionId()\"\r\n (click)=\"onClickSection(section.id)\"\r\n (keydown.enter)=\"onClickSection(section.id)\"\r\n [attr.data-autoId]=\"itemAutoId(section)\"\r\n tabindex=\"0\">\r\n @if (section.icon()) {\r\n <mat-icon class=\"c-anchor-list-item-icon\">{{ section.icon() }}</mat-icon>\r\n }\r\n <div class=\"c-anchor-list-item-text\" [class.ellipsis]=\"ellipsis()\">\r\n {{ section.title() }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n OnDestroy,\r\n afterNextRender,\r\n booleanAttribute,\r\n computed,\r\n contentChildren,\r\n effect,\r\n input,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\r\nimport { Color } from '@sdcorejs/utils/models';\r\nimport { Subscription, fromEvent, take } from 'rxjs';\r\nimport { AnchorNav } from '../anchor-nav/anchor-nav.component';\r\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\r\n\r\n@Component({\r\n selector: 'sd-anchor',\r\n templateUrl: './anchor.component.html',\r\n styleUrl: './anchor.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AnchorNav],\r\n standalone: true,\r\n})\r\nexport class SdAnchor implements OnDestroy {\r\n wrapper = viewChild.required<ElementRef>('wrapper');\r\n sections = contentChildren(SdAnchorItem);\r\n\r\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\r\n readonly autoId = computed(() => (this.autoIdInput() ? `components-anchor-${this.autoIdInput()}` : undefined));\r\n\r\n sidebarWidth = input<string>('200px');\r\n ellipsis = input(false, { transform: booleanAttribute });\r\n overScroll = input(false, { transform: booleanAttribute });\r\n // Mobile: default ?n nav (sidebar TOC chi?m ch? tr�n m�n h�nh h?p).\r\n // Consumer truy?n `[hideNav]=\"false\"` d? force hi?n tr�n mobile.\r\n hideNav = input(BrowserUtilities.isMobile(), { transform: booleanAttribute });\r\n // M�u highlight active nav (text + icon + vertical bar). Default 'primary'.\r\n color = input<Color>('primary');\r\n\r\n activeSectionId = signal<string>('');\r\n\r\n #initialized = false;\r\n #isClickScrolling = false;\r\n #clickScrollSubscription: Subscription | null = null;\r\n #intersectionObserver: IntersectionObserver | null = null;\r\n #visibleSections = new Set<Element>();\r\n #timeoutId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n #timeoutScrollFallback = 200;\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n this.#initialized = true;\r\n if (!this.hideNav()) {\r\n this.#registerIntersectionObserver();\r\n }\r\n });\r\n\r\n // L?ng nghe thay d?i sections d? dang k� l?i observe section\r\n effect(() => {\r\n this.sections();\r\n if (!this.hideNav() && this.#initialized) {\r\n untracked(() => this.#registerIntersectionObserver());\r\n }\r\n });\r\n }\r\n\r\n #registerIntersectionObserver(): void {\r\n this.#cleanIntersectionObserver();\r\n const wrapperEl = this.wrapper().nativeElement;\r\n\r\n // Brower API IntersectionObserver s? h? tr? khi n�o 1 section du?c hi?n ra trong wrapperEl\r\n this.#intersectionObserver = new IntersectionObserver(\r\n entries => {\r\n for (const entry of entries) {\r\n if (entry.isIntersecting) {\r\n // N?u section m?i di v�o v�ng nh�n th?y -> add v�o set\r\n this.#visibleSections.add(entry.target);\r\n } else {\r\n // N?u section d� di ra kh?i v�ng nh�n th?y -> x�a kh?i Set\r\n this.#visibleSections.delete(entry.target);\r\n }\r\n }\r\n\r\n // N?u dang scroll b?i click section th� return lu�n, k ph?i qu�t qua t�m v�ng section du?c active\r\n if (this.#isClickScrolling) {\r\n return;\r\n }\r\n\r\n for (const section of this.sections()) {\r\n // Ki?m tra xem DOM c?a section n�o dang n?m trong danh s�ch dang nh�n th?y d? active ch�nh x�c\r\n if (this.#visibleSections.has(section.elementRef.nativeElement)) {\r\n if (this.activeSectionId() !== section.id) {\r\n this.activeSectionId.set(section.id);\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n { root: wrapperEl, threshold: 0 }\r\n );\r\n\r\n // �ang k� theo d�i t?ng section c� trong anchor\r\n for (const section of this.sections()) {\r\n this.#intersectionObserver.observe(section.elementRef.nativeElement);\r\n }\r\n }\r\n\r\n scrollSectionByClick(idSectionTarget: string): void {\r\n this.activeSectionId.set(idSectionTarget);\r\n const targetSection = this.sections().find(s => s.id === idSectionTarget)?.elementRef;\r\n if (!targetSection) {\r\n return;\r\n }\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#isClickScrolling = true;\r\n\r\n const wrapperEl = this.wrapper().nativeElement;\r\n const targetElement = targetSection.nativeElement;\r\n\r\n const prevScrollTop = wrapperEl.scrollTop; // Luu l?i v? tr� cu?n hi?n t?i c?a container\r\n const scrollTop = prevScrollTop + targetElement.getBoundingClientRect().top - wrapperEl.getBoundingClientRect().top; // V? tr� section c?n scroll t?i\r\n\r\n // �ang k� s? ki?n n?u d� du?c scroll xong\r\n this.#clickScrollSubscription = fromEvent(wrapperEl, 'scrollend')\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.#isClickScrolling = false;\r\n });\r\n\r\n // N?u sectionTarget d� ? d�ng v? tr� (click nhung kh�ng scroll) th� sau #timeoutScrollFallback k�ch ho?t l?i IntersectionObserver\r\n this.#timeoutId = setTimeout(() => {\r\n if (wrapperEl.scrollTop === prevScrollTop) {\r\n this.#isClickScrolling = false;\r\n this.#clickScrollSubscription?.unsubscribe();\r\n }\r\n }, this.#timeoutScrollFallback);\r\n\r\n wrapperEl.scrollTo({ top: scrollTop, behavior: 'smooth' });\r\n }\r\n\r\n #cleanScrollSectionByClickObserver = (): void => {\r\n if (this.#timeoutId) {\r\n clearTimeout(this.#timeoutId);\r\n }\r\n this.#clickScrollSubscription?.unsubscribe();\r\n };\r\n\r\n #cleanIntersectionObserver = (): void => {\r\n this.#intersectionObserver?.disconnect();\r\n this.#visibleSections.clear();\r\n };\r\n\r\n ngOnDestroy(): void {\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#cleanIntersectionObserver();\r\n }\r\n}\r\n","<div class=\"c-anchor-vertical\" [ngClass]=\"{ 'c-stop-scroll-propagation': !overScroll() }\" #wrapper>\r\n <div class=\"c-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (!hideNav()) {\r\n <div class=\"c-anchor-list\" [style.flex-basis]=\"sidebarWidth()\">\r\n <anchor-nav\r\n [sections]=\"sections()\"\r\n [ellipsis]=\"ellipsis()\"\r\n [sidebarWidth]=\"sidebarWidth()\"\r\n [activeSectionId]=\"activeSectionId()\"\r\n [parentAutoId]=\"autoId()\"\r\n [color]=\"color()\"\r\n (clickSection)=\"scrollSectionByClick($event)\">\r\n </anchor-nav>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAYa,YAAY,CAAA;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;IAChC,IAAI,GAAG,KAAK,EAAsB;;AAElC,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC;AAC1C,IAAA,EAAE,GAAW,SAAS,CAAC,YAAY,EAAE;AACrC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC;YACxD;AACF,QAAA,CAAC,CAAC;IACJ;wGAdW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KA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,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGtB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBARpB,SAAS;+BACE,WAAW,EAAA,eAAA,EAGJ,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,YAAY,EAAE,SAAS,CAAC,EAAA,UAAA,EACtB,IAAI,EAAA,QAAA,EAAA,8pBAAA,EAAA,MAAA,EAAA,CAAA,iVAAA,CAAA,EAAA;;;AE5BlB;;AAEG;;;;"}
1
+ {"version":3,"file":"sd-angular-core-components-anchor.mjs","sources":["../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.html","../../../projects/sd-angular/components/anchor/sd-angular-core-components-anchor.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, effect, inject, input } from '@angular/core';\r\nimport { IAnchorItem } from '../../models';\r\nimport { Utilities } from '@sdcorejs/utils/fns';\r\n\r\n@Component({\r\n selector: 'sd-anchor-item',\r\n templateUrl: './anchor-item.component.html',\r\n styleUrl: './anchor-item.component.scss',\r\n imports: [CommonModule],\r\n standalone: true,\r\n})\r\nexport class SdAnchorItem implements IAnchorItem {\r\n title = input.required<string>();\r\n icon = input<string | undefined>();\r\n // Stable key dùng cho data-autoId. Nếu không truyền thì fallback về uuid (không stable giữa các lần render).\r\n key = input<string | undefined>(undefined);\r\n id: string = Utilities.generateUuid();\r\n elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.title()) {\r\n this.elementRef.nativeElement.removeAttribute('title');\r\n }\r\n });\r\n }\r\n}\r\n","<section>\r\n <ng-content></ng-content>\r\n</section>\r\n","import { ChangeDetectionStrategy, Component, OnDestroy, computed, input, output } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { Color } from '@sdcorejs/utils/models';\r\nimport { Subject, Subscription, debounceTime } from 'rxjs';\r\n\r\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\r\n\r\n@Component({\r\n selector: 'anchor-nav',\r\n templateUrl: './anchor-nav.component.html',\r\n styleUrl: './anchor-nav.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, MatIconModule],\r\n standalone: true,\r\n})\r\n// eslint-disable-next-line @angular-eslint/component-class-suffix\r\nexport class AnchorNav implements OnDestroy {\r\n sections = input.required<readonly SdAnchorItem[]>();\r\n activeSectionId = input<string>('');\r\n ellipsis = input<boolean>(false);\r\n sidebarWidth = input<string>('');\r\n // autoId được forward từ <sd-anchor>. Derive per-item autoId theo `key` của item (nếu có).\r\n parentAutoId = input<string | undefined | null>(undefined);\r\n color = input<Color>('primary');\r\n\r\n // CSS var binding cho active state — map SdColor → global token `--sd-{color}`.\r\n // SCSS đọc qua `var(--anchor-active-color)` cho border + text + icon.\r\n cssActiveVar = computed(() => `var(--sd-${this.color()})`);\r\n\r\n itemAutoId(section: SdAnchorItem): string | undefined {\r\n const parent = this.parentAutoId();\r\n const key = section.key();\r\n return parent && key ? `${parent}-${key}` : undefined;\r\n }\r\n\r\n clickSection = output<string>();\r\n\r\n #delay = 200;\r\n #clickSectionSubject = new Subject<string>();\r\n #subscription = new Subscription();\r\n\r\n constructor() {\r\n this.#subscription.add(\r\n this.#clickSectionSubject\r\n .pipe(debounceTime(this.#delay))\r\n .subscribe((id: string) => this.clickSection.emit(id))\r\n );\r\n }\r\n\r\n onClickSection = (id: string): void => {\r\n this.#clickSectionSubject.next(id);\r\n };\r\n\r\n ngOnDestroy(): void {\r\n this.#subscription.unsubscribe();\r\n }\r\n}\r\n","<div\r\n class=\"c-anchor-list\"\r\n [style.width]=\"sidebarWidth()\"\r\n [style.--anchor-active-color]=\"cssActiveVar()\">\r\n @for (section of sections(); track section.id) {\r\n <div\r\n class=\"c-anchor-list-item\"\r\n [class.active]=\"section.id === activeSectionId()\"\r\n (click)=\"onClickSection(section.id)\"\r\n (keydown.enter)=\"onClickSection(section.id)\"\r\n [attr.data-autoId]=\"itemAutoId(section)\"\r\n tabindex=\"0\">\r\n @if (section.icon()) {\r\n <mat-icon class=\"c-anchor-list-item-icon\">{{ section.icon() }}</mat-icon>\r\n }\r\n <div class=\"c-anchor-list-item-text\" [class.ellipsis]=\"ellipsis()\">\r\n {{ section.title() }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n OnDestroy,\r\n afterNextRender,\r\n booleanAttribute,\r\n computed,\r\n contentChildren,\r\n effect,\r\n input,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\r\nimport { Color } from '@sdcorejs/utils/models';\r\nimport { Subscription, fromEvent, take } from 'rxjs';\r\nimport { AnchorNav } from '../anchor-nav/anchor-nav.component';\r\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\r\n\r\n@Component({\r\n selector: 'sd-anchor',\r\n templateUrl: './anchor.component.html',\r\n styleUrl: './anchor.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AnchorNav],\r\n standalone: true,\r\n})\r\nexport class SdAnchor implements OnDestroy {\r\n wrapper = viewChild.required<ElementRef>('wrapper');\r\n sections = contentChildren(SdAnchorItem);\r\n\r\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\r\n readonly autoId = computed(() => (this.autoIdInput() ? `components-anchor-${this.autoIdInput()}` : undefined));\r\n\r\n sidebarWidth = input<string>('200px');\r\n ellipsis = input(false, { transform: booleanAttribute });\r\n overScroll = input(false, { transform: booleanAttribute });\r\n // Mobile: default ?n nav (sidebar TOC chi?m ch? tr�n m�n h�nh h?p).\r\n // Consumer truy?n `[hideNav]=\"false\"` d? force hi?n tr�n mobile.\r\n hideNav = input(BrowserUtilities.isMobile(), { transform: booleanAttribute });\r\n // M�u highlight active nav (text + icon + vertical bar). Default 'primary'.\r\n color = input<Color>('primary');\r\n\r\n activeSectionId = signal<string>('');\r\n\r\n #initialized = false;\r\n #isClickScrolling = false;\r\n #clickScrollSubscription: Subscription | null = null;\r\n #intersectionObserver: IntersectionObserver | null = null;\r\n #visibleSections = new Set<Element>();\r\n #timeoutId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n #timeoutScrollFallback = 200;\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n this.#initialized = true;\r\n if (!this.hideNav()) {\r\n this.#registerIntersectionObserver();\r\n }\r\n });\r\n\r\n // L?ng nghe thay d?i sections d? dang k� l?i observe section\r\n effect(() => {\r\n this.sections();\r\n if (!this.hideNav() && this.#initialized) {\r\n untracked(() => this.#registerIntersectionObserver());\r\n }\r\n });\r\n }\r\n\r\n #registerIntersectionObserver(): void {\r\n this.#cleanIntersectionObserver();\r\n const wrapperEl = this.wrapper().nativeElement;\r\n\r\n // Brower API IntersectionObserver s? h? tr? khi n�o 1 section du?c hi?n ra trong wrapperEl\r\n this.#intersectionObserver = new IntersectionObserver(\r\n entries => {\r\n for (const entry of entries) {\r\n if (entry.isIntersecting) {\r\n // N?u section m?i di v�o v�ng nh�n th?y -> add v�o set\r\n this.#visibleSections.add(entry.target);\r\n } else {\r\n // N?u section d� di ra kh?i v�ng nh�n th?y -> x�a kh?i Set\r\n this.#visibleSections.delete(entry.target);\r\n }\r\n }\r\n\r\n // N?u dang scroll b?i click section th� return lu�n, k ph?i qu�t qua t�m v�ng section du?c active\r\n if (this.#isClickScrolling) {\r\n return;\r\n }\r\n\r\n for (const section of this.sections()) {\r\n // Ki?m tra xem DOM c?a section n�o dang n?m trong danh s�ch dang nh�n th?y d? active ch�nh x�c\r\n if (this.#visibleSections.has(section.elementRef.nativeElement)) {\r\n if (this.activeSectionId() !== section.id) {\r\n this.activeSectionId.set(section.id);\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n { root: wrapperEl, threshold: 0 }\r\n );\r\n\r\n // �ang k� theo d�i t?ng section c� trong anchor\r\n for (const section of this.sections()) {\r\n this.#intersectionObserver.observe(section.elementRef.nativeElement);\r\n }\r\n }\r\n\r\n scrollSectionByClick(idSectionTarget: string): void {\r\n this.activeSectionId.set(idSectionTarget);\r\n const targetSection = this.sections().find(s => s.id === idSectionTarget)?.elementRef;\r\n if (!targetSection) {\r\n return;\r\n }\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#isClickScrolling = true;\r\n\r\n const wrapperEl = this.wrapper().nativeElement;\r\n const targetElement = targetSection.nativeElement;\r\n\r\n const prevScrollTop = wrapperEl.scrollTop; // Luu l?i v? tr� cu?n hi?n t?i c?a container\r\n const scrollTop = prevScrollTop + targetElement.getBoundingClientRect().top - wrapperEl.getBoundingClientRect().top; // V? tr� section c?n scroll t?i\r\n\r\n // �ang k� s? ki?n n?u d� du?c scroll xong\r\n this.#clickScrollSubscription = fromEvent(wrapperEl, 'scrollend')\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.#isClickScrolling = false;\r\n });\r\n\r\n // N?u sectionTarget d� ? d�ng v? tr� (click nhung kh�ng scroll) th� sau #timeoutScrollFallback k�ch ho?t l?i IntersectionObserver\r\n this.#timeoutId = setTimeout(() => {\r\n if (wrapperEl.scrollTop === prevScrollTop) {\r\n this.#isClickScrolling = false;\r\n this.#clickScrollSubscription?.unsubscribe();\r\n }\r\n }, this.#timeoutScrollFallback);\r\n\r\n wrapperEl.scrollTo({ top: scrollTop, behavior: 'smooth' });\r\n }\r\n\r\n #cleanScrollSectionByClickObserver = (): void => {\r\n if (this.#timeoutId) {\r\n clearTimeout(this.#timeoutId);\r\n }\r\n this.#clickScrollSubscription?.unsubscribe();\r\n };\r\n\r\n #cleanIntersectionObserver = (): void => {\r\n this.#intersectionObserver?.disconnect();\r\n this.#visibleSections.clear();\r\n };\r\n\r\n ngOnDestroy(): void {\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#cleanIntersectionObserver();\r\n }\r\n}\r\n","<div class=\"c-anchor-vertical\" [ngClass]=\"{ 'c-stop-scroll-propagation': !overScroll() }\" #wrapper>\r\n <div class=\"c-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (!hideNav()) {\r\n <div class=\"c-anchor-list\" [style.flex-basis]=\"sidebarWidth()\">\r\n <anchor-nav\r\n [sections]=\"sections()\"\r\n [ellipsis]=\"ellipsis()\"\r\n [sidebarWidth]=\"sidebarWidth()\"\r\n [activeSectionId]=\"activeSectionId()\"\r\n [parentAutoId]=\"autoId()\"\r\n [color]=\"color()\"\r\n (clickSection)=\"scrollSectionByClick($event)\">\r\n </anchor-nav>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAYa,YAAY,CAAA;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;IAChC,IAAI,GAAG,KAAK,EAAsB;;AAElC,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC;AAC1C,IAAA,EAAE,GAAW,SAAS,CAAC,YAAY,EAAE;AACrC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC;YACxD;AACF,QAAA,CAAC,CAAC;IACJ;wGAdW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,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