@masterteam/components 0.0.115 → 0.0.117

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 (40) hide show
  1. package/assets/common.css +172 -2
  2. package/fesm2022/masterteam-components-business-fields.mjs +1 -1
  3. package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
  4. package/fesm2022/masterteam-components-drawer.mjs +6 -6
  5. package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-entities.mjs +257 -34
  7. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-formula.mjs +25 -8
  9. package/fesm2022/masterteam-components-formula.mjs.map +1 -1
  10. package/fesm2022/masterteam-components-progress.mjs +10 -2
  11. package/fesm2022/masterteam-components-progress.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-table.mjs +417 -55
  13. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  14. package/package.json +16 -16
  15. package/types/masterteam-components-drawer.d.ts +1 -1
  16. package/types/masterteam-components-entities.d.ts +30 -6
  17. package/types/masterteam-components-formula.d.ts +8 -1
  18. package/types/masterteam-components-progress.d.ts +2 -0
  19. package/types/masterteam-components-table.d.ts +31 -2
  20. package/fesm2022/masterteam-components-sidebar.mjs +0 -36
  21. package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
  22. package/fesm2022/masterteam-components-slider-field.mjs +0 -104
  23. package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
  24. package/fesm2022/masterteam-components-statistic-card.mjs +0 -22
  25. package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
  26. package/fesm2022/masterteam-components-textarea-field.mjs +0 -92
  27. package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
  28. package/fesm2022/masterteam-components-toast.mjs +0 -75
  29. package/fesm2022/masterteam-components-toast.mjs.map +0 -1
  30. package/fesm2022/masterteam-components-topbar.mjs +0 -28
  31. package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
  32. package/fesm2022/masterteam-components-tree.mjs +0 -219
  33. package/fesm2022/masterteam-components-tree.mjs.map +0 -1
  34. package/types/masterteam-components-sidebar.d.ts +0 -28
  35. package/types/masterteam-components-slider-field.d.ts +0 -45
  36. package/types/masterteam-components-statistic-card.d.ts +0 -18
  37. package/types/masterteam-components-textarea-field.d.ts +0 -38
  38. package/types/masterteam-components-toast.d.ts +0 -26
  39. package/types/masterteam-components-topbar.d.ts +0 -17
  40. package/types/masterteam-components-tree.d.ts +0 -98
@@ -9,6 +9,7 @@ import { FormsModule } from '@angular/forms';
9
9
  import * as i2 from 'primeng/api';
10
10
 
11
11
  class Progress {
12
+ static DEFAULT_PRIMARY_COLOR = 'var(--p-primary-color)';
12
13
  // Required Input: The progress value (0-100)
13
14
  value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
14
15
  // Optional Inputs with Defaults
@@ -25,12 +26,19 @@ class Progress {
25
26
  customClass = input('', ...(ngDevMode ? [{ debugName: "customClass" }] : [])); // Pass tailwind classes like 'rounded-none'
26
27
  // Computed template for the knob text (e.g. "75%")
27
28
  labelTemplate = computed(() => `{value}${this.unit()}`, ...(ngDevMode ? [{ debugName: "labelTemplate" }] : []));
29
+ resolvedColor = computed(() => {
30
+ const color = this.color()?.trim();
31
+ if (!color || color === 'primary') {
32
+ return Progress.DEFAULT_PRIMARY_COLOR;
33
+ }
34
+ return color;
35
+ }, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : []));
28
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Progress, deps: [], target: i0.ɵɵFactoryTarget.Component });
29
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Progress, isStandalone: true, selector: "mt-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, circleSize: { classPropertyName: "circleSize", publicName: "circleSize", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"color()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i1.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: KnobModule }, { kind: "component", type: i3.Knob, selector: "p-knob", inputs: ["styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "valueColor", "rangeColor", "textColor", "valueTemplate", "size", "min", "max", "step", "strokeWidth", "showValue", "readonly"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
37
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Progress, isStandalone: true, selector: "mt-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, circleSize: { classPropertyName: "circleSize", publicName: "circleSize", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"resolvedColor()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i1.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: KnobModule }, { kind: "component", type: i3.Knob, selector: "p-knob", inputs: ["styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "valueColor", "rangeColor", "textColor", "valueTemplate", "size", "min", "max", "step", "strokeWidth", "showValue", "readonly"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
30
38
  }
31
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Progress, decorators: [{
32
40
  type: Component,
33
- args: [{ standalone: true, imports: [ProgressBarModule, KnobModule, FormsModule], selector: 'mt-progress', template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"color()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n" }]
41
+ args: [{ standalone: true, imports: [ProgressBarModule, KnobModule, FormsModule], selector: 'mt-progress', template: "<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"resolvedColor()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n" }]
34
42
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], circleSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "circleSize", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
35
43
 
36
44
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-components-progress.mjs","sources":["../../../../packages/masterteam/components/progress/progress.ts","../../../../packages/masterteam/components/progress/progress.html","../../../../packages/masterteam/components/progress/masterteam-components-progress.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\r\nimport { ProgressBarModule } from 'primeng/progressbar';\r\nimport { KnobModule } from 'primeng/knob';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [ProgressBarModule, KnobModule, FormsModule],\r\n selector: 'mt-progress',\r\n templateUrl: 'progress.html',\r\n})\r\nexport class Progress {\r\n // Required Input: The progress value (0-100)\r\n value = input.required<number>();\r\n\r\n // Optional Inputs with Defaults\r\n mode = input<'linear' | 'circle'>('linear');\r\n showLabel = input<boolean>(true);\r\n unit = input<string>('%');\r\n color = input<string>('primary'); // Default Tailwind blue-500\r\n minValue = input<number>(0); // Height for linear bar\r\n maxValue = input<number>(100); // Height for linear bar\r\n\r\n // Style Inputs\r\n height = input<number>(20); // Height for linear bar\r\n circleSize = input<number>(100); // Diameter for circle\r\n strokeWidth = input<number>(10); // Thickness for circle\r\n customClass = input<string>(''); // Pass tailwind classes like 'rounded-none'\r\n\r\n // Computed template for the knob text (e.g. \"75%\")\r\n labelTemplate = computed(() => `{value}${this.unit()}`);\r\n}\r\n","<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"color()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";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AAA,CAAA;kBANpB,SAAS;iCACI,IAAI,EAAA,OAAA,EACP,CAAC,iBAAiB,EAAE,UAAU,EAAE,WAAW,CAAC,EAAA,QAAA,EAC3C,aAAa,EAAA,QAAA,EAAA,ilCAAA,EAAA;;;AERzB;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-components-progress.mjs","sources":["../../../../packages/masterteam/components/progress/progress.ts","../../../../packages/masterteam/components/progress/progress.html","../../../../packages/masterteam/components/progress/masterteam-components-progress.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\r\nimport { ProgressBarModule } from 'primeng/progressbar';\r\nimport { KnobModule } from 'primeng/knob';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [ProgressBarModule, KnobModule, FormsModule],\r\n selector: 'mt-progress',\r\n templateUrl: 'progress.html',\r\n})\r\nexport class Progress {\r\n private static readonly DEFAULT_PRIMARY_COLOR = 'var(--p-primary-color)';\r\n\r\n // Required Input: The progress value (0-100)\r\n value = input.required<number>();\r\n\r\n // Optional Inputs with Defaults\r\n mode = input<'linear' | 'circle'>('linear');\r\n showLabel = input<boolean>(true);\r\n unit = input<string>('%');\r\n color = input<string>('primary'); // Default Tailwind blue-500\r\n minValue = input<number>(0); // Height for linear bar\r\n maxValue = input<number>(100); // Height for linear bar\r\n\r\n // Style Inputs\r\n height = input<number>(20); // Height for linear bar\r\n circleSize = input<number>(100); // Diameter for circle\r\n strokeWidth = input<number>(10); // Thickness for circle\r\n customClass = input<string>(''); // Pass tailwind classes like 'rounded-none'\r\n\r\n // Computed template for the knob text (e.g. \"75%\")\r\n labelTemplate = computed(() => `{value}${this.unit()}`);\r\n\r\n readonly resolvedColor = computed(() => {\r\n const color = this.color()?.trim();\r\n\r\n if (!color || color === 'primary') {\r\n return Progress.DEFAULT_PRIMARY_COLOR;\r\n }\r\n\r\n return color;\r\n });\r\n}\r\n","<div class=\"w-full flex flex-col items-center justify-center gap-2\">\r\n @if (mode() === \"linear\") {\r\n <div class=\"w-full\">\r\n <p-progressBar\r\n [value]=\"value()\"\r\n [showValue]=\"showLabel()\"\r\n [styleClass]=\"customClass()\"\r\n [style]=\"{ height: height() + 'px' }\"\r\n [color]=\"resolvedColor()\"\r\n >\r\n <ng-template pTemplate=\"content\" let-val>\r\n @if (showLabel()) {\r\n <span class=\"text-xs font-bold\">{{ val }}{{ unit() }}</span>\r\n }\r\n </ng-template>\r\n </p-progressBar>\r\n </div>\r\n } @else {\r\n <div class=\"relative flex items-center justify-center\">\r\n <p-knob\r\n [ngModel]=\"value()\"\r\n [readonly]=\"true\"\r\n [size]=\"circleSize()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [rangeColor]=\"'#e5e7eb'\"\r\n [valueTemplate]=\"labelTemplate()\"\r\n [showValue]=\"showLabel()\"\r\n [min]=\"minValue()\"\r\n [max]=\"maxValue()\"\r\n >\r\n </p-knob>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAWa,QAAQ,CAAA;AACX,IAAA,OAAgB,qBAAqB,GAAG,wBAAwB;;AAGxE,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAU;;AAGhC,IAAA,IAAI,GAAG,KAAK,CAAsB,QAAQ,gDAAC;AAC3C,IAAA,SAAS,GAAG,KAAK,CAAU,IAAI,qDAAC;AAChC,IAAA,IAAI,GAAG,KAAK,CAAS,GAAG,gDAAC;AACzB,IAAA,KAAK,GAAG,KAAK,CAAS,SAAS,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC,CAAC;AACjC,IAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC,CAAC;AAC5B,IAAA,QAAQ,GAAG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