@3kles/kles-material-dynamicforms 16.1.5 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/directive/dynamic-component.directive.mjs +5 -5
- package/esm2022/lib/directive/dynamic-field.directive.mjs +5 -5
- package/esm2022/lib/dynamic-form.component.mjs +19 -16
- package/esm2022/lib/fields/array.component.mjs +25 -21
- package/esm2022/lib/fields/badge.component.mjs +5 -5
- package/esm2022/lib/fields/button-form.component.mjs +3 -3
- package/esm2022/lib/fields/button-submit.component.mjs +5 -5
- package/esm2022/lib/fields/button-toogle-group.component.mjs +17 -15
- package/esm2022/lib/fields/buttonchecker-form.component.mjs +3 -3
- package/esm2022/lib/fields/buttonfile-form.component.mjs +3 -3
- package/esm2022/lib/fields/checkbox.component.mjs +33 -17
- package/esm2022/lib/fields/chip.component.mjs +11 -7
- package/esm2022/lib/fields/clear.component.mjs +4 -4
- package/esm2022/lib/fields/color.component.mjs +43 -23
- package/esm2022/lib/fields/date-time.component.mjs +39 -19
- package/esm2022/lib/fields/date.component.mjs +39 -19
- package/esm2022/lib/fields/field.abstract.mjs +5 -5
- package/esm2022/lib/fields/group.component.mjs +17 -13
- package/esm2022/lib/fields/icon.component.mjs +4 -4
- package/esm2022/lib/fields/input.clearable.component.mjs +97 -63
- package/esm2022/lib/fields/input.component.mjs +95 -61
- package/esm2022/lib/fields/label.component.mjs +4 -4
- package/esm2022/lib/fields/line-break.component.mjs +4 -4
- package/esm2022/lib/fields/link.component.mjs +4 -4
- package/esm2022/lib/fields/list-field.component.mjs +59 -38
- package/esm2022/lib/fields/radio.component.mjs +48 -16
- package/esm2022/lib/fields/range.component.mjs +33 -17
- package/esm2022/lib/fields/select.component.mjs +192 -136
- package/esm2022/lib/fields/select.lazy-search.component.mjs +194 -144
- package/esm2022/lib/fields/select.search.component.mjs +196 -138
- package/esm2022/lib/fields/selection-list.component.mjs +33 -27
- package/esm2022/lib/fields/slide-toggle.component.mjs +35 -17
- package/esm2022/lib/fields/text.component.mjs +5 -5
- package/esm2022/lib/fields/textarea.component.mjs +51 -25
- package/esm2022/lib/forms/button-control.component.mjs +21 -9
- package/esm2022/lib/forms/buttonchecker-control.component.mjs +57 -44
- package/esm2022/lib/forms/buttonfile-control.component.mjs +3 -3
- package/esm2022/lib/kles-material-dynamicforms.module.mjs +5 -5
- package/esm2022/lib/matcher/form-error.matcher.mjs +4 -4
- package/esm2022/lib/modules/material.module.mjs +4 -4
- package/esm2022/lib/pipe/array.pipe.mjs +3 -3
- package/esm2022/lib/pipe/transform.pipe.mjs +3 -3
- package/fesm2022/3kles-kles-material-dynamicforms.mjs +1409 -938
- package/fesm2022/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/lib/fields/radio.component.d.ts +2 -0
- package/package.json +12 -12
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
2
|
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
+
import { Observable, of } from 'rxjs';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
import * as i1 from "@angular/common";
|
|
5
6
|
import * as i2 from "@angular/forms";
|
|
@@ -8,41 +9,72 @@ import * as i4 from "@angular/material/radio";
|
|
|
8
9
|
import * as i5 from "@angular/material/tooltip";
|
|
9
10
|
import * as i6 from "@ngx-translate/core";
|
|
10
11
|
export class KlesFormRadioComponent extends KlesFieldAbstract {
|
|
11
|
-
ngOnInit() {
|
|
12
|
+
ngOnInit() {
|
|
13
|
+
super.ngOnInit();
|
|
14
|
+
if (this.field.options instanceof Observable) {
|
|
15
|
+
this.options$ = this.field.options;
|
|
16
|
+
}
|
|
17
|
+
else if (this.field.options instanceof Function) {
|
|
18
|
+
this.options$ = this.field.options();
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.options$ = of(this.field.options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
12
24
|
ngOnDestroy() {
|
|
13
25
|
super.ngOnDestroy();
|
|
14
26
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: KlesFormRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.2", type: KlesFormRadioComponent, selector: "kles-form-radiobutton", usesInheritance: true, ngImport: i0, template: `
|
|
17
29
|
<div [formGroup]="group">
|
|
18
30
|
<label class="radio-label-padding">{{field.label}}</label>
|
|
19
31
|
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
20
|
-
|
|
32
|
+
@for (item of options$ | async; track item) {
|
|
33
|
+
<mat-radio-button [value]="item">{{item}}</mat-radio-button>
|
|
34
|
+
}
|
|
21
35
|
</mat-radio-group>
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
@for (validation of field.validations; track validation.name) {
|
|
37
|
+
<ng-container ngProjectAs="mat-error">
|
|
38
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
39
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
40
|
+
}
|
|
24
41
|
</ng-container>
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
}
|
|
43
|
+
@for (validation of field.asyncValidations; track validation.name) {
|
|
44
|
+
<ng-container ngProjectAs="mat-error">
|
|
45
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
46
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
47
|
+
}
|
|
27
48
|
</ng-container>
|
|
49
|
+
}
|
|
28
50
|
</div>
|
|
29
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type:
|
|
51
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex", "id", "name", "aria-label", "aria-labelledby", "aria-describedby", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
30
52
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: KlesFormRadioComponent, decorators: [{
|
|
32
54
|
type: Component,
|
|
33
55
|
args: [{ selector: 'kles-form-radiobutton', template: `
|
|
34
56
|
<div [formGroup]="group">
|
|
35
57
|
<label class="radio-label-padding">{{field.label}}</label>
|
|
36
58
|
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
37
|
-
|
|
59
|
+
@for (item of options$ | async; track item) {
|
|
60
|
+
<mat-radio-button [value]="item">{{item}}</mat-radio-button>
|
|
61
|
+
}
|
|
38
62
|
</mat-radio-group>
|
|
39
|
-
|
|
40
|
-
|
|
63
|
+
@for (validation of field.validations; track validation.name) {
|
|
64
|
+
<ng-container ngProjectAs="mat-error">
|
|
65
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
66
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
67
|
+
}
|
|
41
68
|
</ng-container>
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
}
|
|
70
|
+
@for (validation of field.asyncValidations; track validation.name) {
|
|
71
|
+
<ng-container ngProjectAs="mat-error">
|
|
72
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
73
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
74
|
+
}
|
|
44
75
|
</ng-container>
|
|
76
|
+
}
|
|
45
77
|
</div>
|
|
46
78
|
` }]
|
|
47
79
|
}] });
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2xlcy1tYXRlcmlhbC1keW5hbWljZm9ybXMvc3JjL2xpYi9maWVsZHMvcmFkaW8uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQXFCLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBRSxpQkFBaUIsRUF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B0cmFuc2xhdGV9fTwvbWF0LWVycm9yPlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICB9XG4gICAgICAgIEBmb3IgKHZhbGlkYXRpb24gb2YgZmllbGQuYXN5bmNWYWxpZGF0aW9uczsgdHJhY2sgdmFsaWRhdGlvbi5uYW1lKSB7XG4gICAgICAgICAgICA8bmctY29udGFpbmVyIG5nUHJvamVjdEFzPVwibWF0LWVycm9yXCI+XG4gICAgICAgICAgICAgICAgQGlmIChncm91cC5nZXQoZmllbGQubmFtZSkuaGFzRXJyb3IodmFsaWRhdGlvbi5uYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICA8bWF0LWVycm9yPnt7dmFsaWRhdGlvbi5tZXNzYWdlIHwgdHJhbnNsYXRlfX08L21hdC1lcnJvcj5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgfVxuICAgIDwvZGl2PlxuYCxcbiAgICBzdHlsZXM6IFtdXG59KVxuZXhwb3J0IGNsYXNzIEtsZXNGb3JtUmFkaW9Db21wb25lbnQgZXh0ZW5kcyBLbGVzRmllbGRBYnN0cmFjdCBpbXBsZW1lbnRzIE9uSW5pdCwgT25EZXN0cm95IHtcbiAgICBvcHRpb25zJDogT2JzZXJ2YWJsZTxhbnlbXT47XG5cbiAgICBuZ09uSW5pdCgpIHtcbiAgICAgICAgc3VwZXIubmdPbkluaXQoKTtcblxuICAgICAgICBpZiAodGhpcy5maWVsZC5vcHRpb25zIGluc3RhbmNlb2YgT2JzZXJ2YWJsZSkge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zJCA9IHRoaXMuZmllbGQub3B0aW9ucztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLmZpZWxkLm9wdGlvbnMgaW5zdGFuY2VvZiBGdW5jdGlvbikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zJCA9IHRoaXMuZmllbGQub3B0aW9ucygpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zJCA9IG9mKHRoaXMuZmllbGQub3B0aW9ucyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICAgICAgc3VwZXIubmdPbkRlc3Ryb3koKTtcbiAgICB9XG59Il19
|
|
@@ -20,8 +20,8 @@ let KlesFormRangeComponent = class KlesFormRangeComponent extends KlesFieldAbstr
|
|
|
20
20
|
ngOnDestroy() {
|
|
21
21
|
super.ngOnDestroy();
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: KlesFormRangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.2", type: KlesFormRangeComponent, selector: "kles-form-rangepicker", usesInheritance: true, ngImport: i0, template: `
|
|
25
25
|
<mat-form-field [color]="field.color" [formGroup]="group">
|
|
26
26
|
|
|
27
27
|
<mat-label>{{field.label}}</mat-label>
|
|
@@ -40,20 +40,28 @@ let KlesFormRangeComponent = class KlesFormRangeComponent extends KlesFieldAbstr
|
|
|
40
40
|
<mat-date-range-picker #picker></mat-date-range-picker>
|
|
41
41
|
<mat-hint>{{field.hint}}</mat-hint>
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
@for (validation of field.validations; track validation.name) {
|
|
44
|
+
<ng-container ngProjectAs="mat-error">
|
|
45
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
46
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
47
|
+
}
|
|
48
|
+
</ng-container>
|
|
49
|
+
}
|
|
50
|
+
@for (validation of field.asyncValidations; track validation.name) {
|
|
51
|
+
<ng-container ngProjectAs="mat-error">
|
|
52
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
53
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
54
|
+
}
|
|
55
|
+
</ng-container>
|
|
56
|
+
}
|
|
49
57
|
</mat-form-field>
|
|
50
|
-
`, isInline: true, styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type:
|
|
58
|
+
`, isInline: true, styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
51
59
|
};
|
|
52
60
|
KlesFormRangeComponent = __decorate([
|
|
53
61
|
FieldMapper({ type: EnumType.range, factory: (field) => (new KlesFormRange(field).create()) })
|
|
54
62
|
], KlesFormRangeComponent);
|
|
55
63
|
export { KlesFormRangeComponent };
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: KlesFormRangeComponent, decorators: [{
|
|
57
65
|
type: Component,
|
|
58
66
|
args: [{ selector: "kles-form-rangepicker", template: `
|
|
59
67
|
<mat-form-field [color]="field.color" [formGroup]="group">
|
|
@@ -74,13 +82,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
74
82
|
<mat-date-range-picker #picker></mat-date-range-picker>
|
|
75
83
|
<mat-hint>{{field.hint}}</mat-hint>
|
|
76
84
|
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
@for (validation of field.validations; track validation.name) {
|
|
86
|
+
<ng-container ngProjectAs="mat-error">
|
|
87
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
88
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
89
|
+
}
|
|
90
|
+
</ng-container>
|
|
91
|
+
}
|
|
92
|
+
@for (validation of field.asyncValidations; track validation.name) {
|
|
93
|
+
<ng-container ngProjectAs="mat-error">
|
|
94
|
+
@if (group.get(field.name).hasError(validation.name)) {
|
|
95
|
+
<mat-error>{{validation.message | translate}}</mat-error>
|
|
96
|
+
}
|
|
97
|
+
</ng-container>
|
|
98
|
+
}
|
|
83
99
|
</mat-form-field>
|
|
84
100
|
`, styles: ["mat-form-field{width:100%}\n"] }]
|
|
85
101
|
}] });
|
|
86
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
102
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFuZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2xlcy1tYXRlcmlhbC1keW5hbWljZm9ybXMvc3JjL2xpYi9maWVsZHMvcmFuZ2UuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsYUF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