@rxap/pipes 14.0.2 → 16.0.0-dev.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/currency.pipe.mjs +69 -0
- package/esm2022/lib/delete-identifier.pipe.mjs +40 -0
- package/esm2022/lib/escape-quotation-mark.pipe.mjs +36 -0
- package/esm2022/lib/get-from-object.pipe.mjs +31 -0
- package/esm2022/lib/replace.pipe.mjs +30 -0
- package/esm2022/lib/to-display.pipe.mjs +34 -0
- package/esm2022/santization/lib/santization.module.mjs +18 -0
- package/esm2022/santization/lib/santization.pipe.mjs +22 -0
- package/esm2022/santization/lib/santization.service.mjs +41 -0
- package/{fesm2020 → fesm2022}/rxap-pipes-santization.mjs +10 -10
- package/{fesm2015 → fesm2022}/rxap-pipes-santization.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/rxap-pipes.mjs +42 -42
- package/{fesm2015 → fesm2022}/rxap-pipes.mjs.map +1 -1
- package/package.json +15 -23
- package/esm2020/lib/currency.pipe.mjs +0 -67
- package/esm2020/lib/delete-identifier.pipe.mjs +0 -38
- package/esm2020/lib/escape-quotation-mark.pipe.mjs +0 -34
- package/esm2020/lib/get-from-object.pipe.mjs +0 -29
- package/esm2020/lib/replace.pipe.mjs +0 -28
- package/esm2020/lib/to-display.pipe.mjs +0 -32
- package/esm2020/santization/lib/santization.module.mjs +0 -17
- package/esm2020/santization/lib/santization.pipe.mjs +0 -21
- package/esm2020/santization/lib/santization.service.mjs +0 -40
- package/fesm2015/rxap-pipes-santization.mjs +0 -80
- package/fesm2020/rxap-pipes-santization.mjs.map +0 -1
- package/fesm2020/rxap-pipes.mjs +0 -222
- package/fesm2020/rxap-pipes.mjs.map +0 -1
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/rxap-pipes.mjs +0 -0
- /package/{esm2020 → esm2022}/santization/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/santization/rxap-pipes-santization.mjs +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import { SantizationService } from './santization.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./santization.service";
|
|
5
|
-
export class SantizationPipe {
|
|
6
|
-
constructor(santizationService) {
|
|
7
|
-
this.santizationService = santizationService;
|
|
8
|
-
}
|
|
9
|
-
transform(value, type = 'url') {
|
|
10
|
-
return this.santizationService.transform(value, type);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
SantizationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, deps: [{ token: i1.SantizationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
14
|
-
SantizationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, name: "santization" });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, decorators: [{
|
|
16
|
-
type: Pipe,
|
|
17
|
-
args: [{
|
|
18
|
-
name: 'santization',
|
|
19
|
-
}]
|
|
20
|
-
}], ctorParameters: function () { return [{ type: i1.SantizationService }]; } });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FudGl6YXRpb24ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcGlwZXMvc2FudGl6YXRpb24vc3JjL2xpYi9zYW50aXphdGlvbi5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBRXBELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHVCQUF1Qix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AgICByZXR1cm4gdGhpcy5zYW50aXphdGlvblNlcnZpY2UudHJhbnNmb3JtKHZhbHVlLCB0eXBlKTtcbiAgfVxufVxuIl19
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable, SecurityContext } from '@angular/core';
|
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/platform-browser";
|
|
5
|
-
// TODO : move to @rxap/services
|
|
6
|
-
export class SantizationService {
|
|
7
|
-
constructor(_sanitizer) {
|
|
8
|
-
this._sanitizer = _sanitizer;
|
|
9
|
-
}
|
|
10
|
-
transform(value, type = 'url') {
|
|
11
|
-
if (value === null) {
|
|
12
|
-
return this._sanitizer.sanitize(SecurityContext.NONE, value);
|
|
13
|
-
}
|
|
14
|
-
switch (type) {
|
|
15
|
-
case 'html':
|
|
16
|
-
return this._sanitizer.bypassSecurityTrustHtml(value);
|
|
17
|
-
case 'style':
|
|
18
|
-
return this._sanitizer.bypassSecurityTrustStyle(value);
|
|
19
|
-
case 'script':
|
|
20
|
-
return this._sanitizer.bypassSecurityTrustScript(value);
|
|
21
|
-
case 'url':
|
|
22
|
-
return this._sanitizer.bypassSecurityTrustUrl(value);
|
|
23
|
-
case 'resourceUrl':
|
|
24
|
-
return this._sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
25
|
-
}
|
|
26
|
-
throw new Error('type is not set');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
SantizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, deps: [{ token: DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30
|
-
SantizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, providedIn: 'root' });
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, decorators: [{
|
|
32
|
-
type: Injectable,
|
|
33
|
-
args: [{
|
|
34
|
-
providedIn: 'root'
|
|
35
|
-
}]
|
|
36
|
-
}], ctorParameters: function () { return [{ type: i1.DomSanitizer, decorators: [{
|
|
37
|
-
type: Inject,
|
|
38
|
-
args: [DomSanitizer]
|
|
39
|
-
}] }]; } });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FudGl6YXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcGlwZXMvc2FudGl6YXRpb24vc3JjL2xpYi9zYW50aXphdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxNQUFNLEVBQ04sVUFBVSxFQUNWLGVBQWUsRUFDaEIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUNMLFlBQVksRUFFYixNQUFNLDJCQUEyQixDQUFDOzs7QUFFbkMsZ0NBQWdDO0FBSWhDLE1BQU0sT0FBTyxrQkFBa0I7SUFDN0IsWUFBMEMsVUFBd0I7UUFBeEIsZUFBVSxHQUFWLFVBQVUsQ0FBYztJQUFHLENBQUM7SUFFdEUsU0FBUyxDQUNQLEtBQW9CLEVBQ3BCLE9BQTRELEtBQUs7UUFFakUsSUFBSSxLQUFLLEtBQUssSUFBSSxFQUFFO1lBQ2xCLE9BQU8sSUFBSSxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsZUFBZSxDQUFDLElBQUksRUFBRSxLQUFLLENBQUMsQ0FBQztTQUM5RDtRQUNELFFBQVEsSUFBSSxFQUFFO1lBQ1osS0FBSyxNQUFNO2dCQUNULE9BQU8sSUFBSSxDQUFDLFVBQVUsQ0FBQyx1QkFBdUIsQ0FBQyxLQUFLLENBQUMsQ0FBQzt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cyBub3Qgc2V0Jyk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Injectable, Inject, Pipe, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/platform-browser';
|
|
4
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
|
-
|
|
6
|
-
// TODO : move to @rxap/services
|
|
7
|
-
class SantizationService {
|
|
8
|
-
constructor(_sanitizer) {
|
|
9
|
-
this._sanitizer = _sanitizer;
|
|
10
|
-
}
|
|
11
|
-
transform(value, type = 'url') {
|
|
12
|
-
if (value === null) {
|
|
13
|
-
return this._sanitizer.sanitize(SecurityContext.NONE, value);
|
|
14
|
-
}
|
|
15
|
-
switch (type) {
|
|
16
|
-
case 'html':
|
|
17
|
-
return this._sanitizer.bypassSecurityTrustHtml(value);
|
|
18
|
-
case 'style':
|
|
19
|
-
return this._sanitizer.bypassSecurityTrustStyle(value);
|
|
20
|
-
case 'script':
|
|
21
|
-
return this._sanitizer.bypassSecurityTrustScript(value);
|
|
22
|
-
case 'url':
|
|
23
|
-
return this._sanitizer.bypassSecurityTrustUrl(value);
|
|
24
|
-
case 'resourceUrl':
|
|
25
|
-
return this._sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
26
|
-
}
|
|
27
|
-
throw new Error('type is not set');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
SantizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, deps: [{ token: DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
-
SantizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, providedIn: 'root' });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationService, decorators: [{
|
|
33
|
-
type: Injectable,
|
|
34
|
-
args: [{
|
|
35
|
-
providedIn: 'root'
|
|
36
|
-
}]
|
|
37
|
-
}], ctorParameters: function () {
|
|
38
|
-
return [{ type: i1.DomSanitizer, decorators: [{
|
|
39
|
-
type: Inject,
|
|
40
|
-
args: [DomSanitizer]
|
|
41
|
-
}] }];
|
|
42
|
-
} });
|
|
43
|
-
|
|
44
|
-
class SantizationPipe {
|
|
45
|
-
constructor(santizationService) {
|
|
46
|
-
this.santizationService = santizationService;
|
|
47
|
-
}
|
|
48
|
-
transform(value, type = 'url') {
|
|
49
|
-
return this.santizationService.transform(value, type);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
SantizationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, deps: [{ token: SantizationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
53
|
-
SantizationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, name: "santization" });
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationPipe, decorators: [{
|
|
55
|
-
type: Pipe,
|
|
56
|
-
args: [{
|
|
57
|
-
name: 'santization',
|
|
58
|
-
}]
|
|
59
|
-
}], ctorParameters: function () { return [{ type: SantizationService }]; } });
|
|
60
|
-
|
|
61
|
-
class SantizationModule {
|
|
62
|
-
}
|
|
63
|
-
SantizationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
64
|
-
SantizationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: SantizationModule, declarations: [SantizationPipe], exports: [SantizationPipe] });
|
|
65
|
-
SantizationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationModule });
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: SantizationModule, decorators: [{
|
|
67
|
-
type: NgModule,
|
|
68
|
-
args: [{
|
|
69
|
-
declarations: [SantizationPipe],
|
|
70
|
-
imports: [],
|
|
71
|
-
exports: [SantizationPipe]
|
|
72
|
-
}]
|
|
73
|
-
}] });
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Generated bundle index. Do not edit.
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
export { SantizationModule, SantizationPipe, SantizationService };
|
|
80
|
-
//# sourceMappingURL=rxap-pipes-santization.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-pipes-santization.mjs","sources":["../../../../libs/pipes/santization/src/lib/santization.service.ts","../../../../libs/pipes/santization/src/lib/santization.pipe.ts","../../../../libs/pipes/santization/src/lib/santization.module.ts","../../../../libs/pipes/santization/src/rxap-pipes-santization.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n SecurityContext\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeValue\n} from '@angular/platform-browser';\n\n// TODO : move to @rxap/services\n@Injectable({\n providedIn: 'root'\n})\nexport class SantizationService {\n constructor(@Inject(DomSanitizer) private _sanitizer: DomSanitizer) {}\n\n transform(\n value: string | null,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url'\n ): SafeValue | null {\n if (value === null) {\n return this._sanitizer.sanitize(SecurityContext.NONE, value);\n }\n switch (type) {\n case 'html':\n return this._sanitizer.bypassSecurityTrustHtml(value);\n\n case 'style':\n return this._sanitizer.bypassSecurityTrustStyle(value);\n\n case 'script':\n return this._sanitizer.bypassSecurityTrustScript(value);\n\n case 'url':\n return this._sanitizer.bypassSecurityTrustUrl(value);\n\n case 'resourceUrl':\n return this._sanitizer.bypassSecurityTrustResourceUrl(value);\n }\n\n throw new Error('type is not set');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { SafeValue } from '@angular/platform-browser';\nimport { SantizationService } from './santization.service';\n\n@Pipe({\n name: 'santization',\n})\nexport class SantizationPipe implements PipeTransform {\n constructor(private readonly santizationService: SantizationService) {}\n\n transform(\n value: string | null,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url'\n ): SafeValue | null {\n return this.santizationService.transform(value, type);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SantizationPipe } from './santization.pipe';\n\n@NgModule({\n declarations: [ SantizationPipe ],\n imports: [],\n exports: [ SantizationPipe ]\n})\nexport class SantizationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.SantizationService"],"mappings":";;;;;AAUA;MAIa,kBAAkB,CAAA;AAC7B,IAAA,WAAA,CAA0C,UAAwB,EAAA;QAAxB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAc;KAAI;AAEtE,IAAA,SAAS,CACP,KAAoB,EACpB,IAAA,GAA4D,KAAK,EAAA;QAEjE,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC9D,SAAA;AACD,QAAA,QAAQ,IAAI;AACV,YAAA,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAExD,YAAA,KAAK,OAAO;gBACV,OAAO,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEzD,YAAA,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;AAE1D,YAAA,KAAK,KAAK;gBACR,OAAO,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;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AAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACpB,iBAAA,CAAA;;;MCEY,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAJZ,eAAe,CAAA,EAAA,OAAA,EAAA,CAEf,eAAe,CAAA,EAAA,CAAA,CAAA;+GAEpB,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAE,eAAe,CAAE;AACjC,oBAAA,OAAO,EAAO,EAAE;oBAChB,OAAO,EAAO,CAAE,eAAe,CAAE;AAClC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
package/fesm2020/rxap-pipes.mjs
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { JsonPipe, CurrencyPipe } from '@angular/common';
|
|
5
|
-
import { clone, hasIdentifierProperty, getIdentifierProperties, getFromObject } from '@rxap/utilities';
|
|
6
|
-
|
|
7
|
-
class ToDisplayPipe {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.jsonPipe = new JsonPipe();
|
|
10
|
-
}
|
|
11
|
-
transform(value, toDisplay = this.jsonPipe.transform) {
|
|
12
|
-
return toDisplay(value);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
ToDisplayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
16
|
-
ToDisplayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipe, name: "toDisplay" });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipe, decorators: [{
|
|
18
|
-
type: Pipe,
|
|
19
|
-
args: [{
|
|
20
|
-
name: 'toDisplay'
|
|
21
|
-
}]
|
|
22
|
-
}] });
|
|
23
|
-
class ToDisplayPipeModule {
|
|
24
|
-
}
|
|
25
|
-
ToDisplayPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
26
|
-
ToDisplayPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipeModule, declarations: [ToDisplayPipe], exports: [ToDisplayPipe] });
|
|
27
|
-
ToDisplayPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipeModule });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ToDisplayPipeModule, decorators: [{
|
|
29
|
-
type: NgModule,
|
|
30
|
-
args: [{
|
|
31
|
-
declarations: [ToDisplayPipe],
|
|
32
|
-
exports: [ToDisplayPipe]
|
|
33
|
-
}]
|
|
34
|
-
}] });
|
|
35
|
-
|
|
36
|
-
class ReplacePipe {
|
|
37
|
-
transform(value, replace, replaceValue) {
|
|
38
|
-
return value ? value.replace(replace, replaceValue) : '';
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
ReplacePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
42
|
-
ReplacePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipe, name: "replace" });
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipe, decorators: [{
|
|
44
|
-
type: Pipe,
|
|
45
|
-
args: [{
|
|
46
|
-
name: 'replace',
|
|
47
|
-
}]
|
|
48
|
-
}] });
|
|
49
|
-
class ReplacePipeModule {
|
|
50
|
-
}
|
|
51
|
-
ReplacePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
52
|
-
ReplacePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipeModule, declarations: [ReplacePipe], exports: [ReplacePipe] });
|
|
53
|
-
ReplacePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipeModule });
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ReplacePipeModule, decorators: [{
|
|
55
|
-
type: NgModule,
|
|
56
|
-
args: [{
|
|
57
|
-
declarations: [ReplacePipe],
|
|
58
|
-
exports: [ReplacePipe],
|
|
59
|
-
}]
|
|
60
|
-
}] });
|
|
61
|
-
|
|
62
|
-
class EscapeQuotationMarkPipe {
|
|
63
|
-
transform(value, reverse = false) {
|
|
64
|
-
if (reverse) {
|
|
65
|
-
return new ReplacePipe().transform(value, /\\"/g, '"');
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
return new ReplacePipe().transform(value, /"/g, '\"');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
EscapeQuotationMarkPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
73
|
-
EscapeQuotationMarkPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipe, name: "escapeQuotationMark" });
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipe, decorators: [{
|
|
75
|
-
type: Pipe,
|
|
76
|
-
args: [{
|
|
77
|
-
name: 'escapeQuotationMark'
|
|
78
|
-
}]
|
|
79
|
-
}] });
|
|
80
|
-
class EscapeQuotationMarkPipeModule {
|
|
81
|
-
}
|
|
82
|
-
EscapeQuotationMarkPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
83
|
-
EscapeQuotationMarkPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipeModule, declarations: [EscapeQuotationMarkPipe], exports: [EscapeQuotationMarkPipe] });
|
|
84
|
-
EscapeQuotationMarkPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipeModule });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: EscapeQuotationMarkPipeModule, decorators: [{
|
|
86
|
-
type: NgModule,
|
|
87
|
-
args: [{
|
|
88
|
-
declarations: [EscapeQuotationMarkPipe],
|
|
89
|
-
exports: [EscapeQuotationMarkPipe]
|
|
90
|
-
}]
|
|
91
|
-
}] });
|
|
92
|
-
|
|
93
|
-
class RxapCurrencyPipe {
|
|
94
|
-
constructor(currency) {
|
|
95
|
-
this.currency = currency;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
*
|
|
99
|
-
* @param value The number to be formatted as currency.
|
|
100
|
-
* @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
|
|
101
|
-
* such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be
|
|
102
|
-
* configured using the `DEFAULT_CURRENCY_CODE` injection token.
|
|
103
|
-
* @param display The format for the currency indicator. One of the following:
|
|
104
|
-
* - `code`: Show the code (such as `USD`).
|
|
105
|
-
* - `symbol`(default): Show the symbol (such as `$`).
|
|
106
|
-
* - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
|
|
107
|
-
* currency.
|
|
108
|
-
* For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
|
|
109
|
-
* locale has no narrow symbol, uses the standard symbol for the locale.
|
|
110
|
-
* - String: Use the given string value instead of a code or a symbol.
|
|
111
|
-
* For example, an empty string will suppress the currency & symbol.
|
|
112
|
-
* - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
|
|
113
|
-
*
|
|
114
|
-
* @param digitsInfo Decimal representation options, specified by a string
|
|
115
|
-
* in the following format:<br>
|
|
116
|
-
* <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
|
|
117
|
-
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
|
|
118
|
-
* Default is `1`.
|
|
119
|
-
* - `minFractionDigits`: The minimum number of digits after the decimal point.
|
|
120
|
-
* Default is `2`.
|
|
121
|
-
* - `maxFractionDigits`: The maximum number of digits after the decimal point.
|
|
122
|
-
* Default is `2`.
|
|
123
|
-
* If not provided, the number will be formatted with the proper amount of digits,
|
|
124
|
-
* depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
|
|
125
|
-
* For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
|
|
126
|
-
* @param locale A locale code for the locale format rules to use.
|
|
127
|
-
* When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
|
|
128
|
-
* See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
|
|
129
|
-
*/
|
|
130
|
-
transform(value, currencyCode, display, digitsInfo, locale) {
|
|
131
|
-
return this.currency.transform(value / 100, currencyCode, display, digitsInfo, locale);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
RxapCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapCurrencyPipe, deps: [{ token: i1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
135
|
-
RxapCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RxapCurrencyPipe, name: "currency" });
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapCurrencyPipe, decorators: [{
|
|
137
|
-
type: Pipe,
|
|
138
|
-
args: [{
|
|
139
|
-
name: 'currency'
|
|
140
|
-
}]
|
|
141
|
-
}], ctorParameters: function () { return [{ type: i1.CurrencyPipe }]; } });
|
|
142
|
-
class CurrencyPipeModule {
|
|
143
|
-
}
|
|
144
|
-
CurrencyPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CurrencyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
145
|
-
CurrencyPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: CurrencyPipeModule, declarations: [RxapCurrencyPipe], exports: [RxapCurrencyPipe] });
|
|
146
|
-
CurrencyPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CurrencyPipeModule, providers: [CurrencyPipe] });
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CurrencyPipeModule, decorators: [{
|
|
148
|
-
type: NgModule,
|
|
149
|
-
args: [{
|
|
150
|
-
exports: [RxapCurrencyPipe],
|
|
151
|
-
declarations: [RxapCurrencyPipe],
|
|
152
|
-
providers: [CurrencyPipe]
|
|
153
|
-
}]
|
|
154
|
-
}] });
|
|
155
|
-
|
|
156
|
-
class DeleteIdentifierPipe {
|
|
157
|
-
transform(value) {
|
|
158
|
-
if (!value) {
|
|
159
|
-
return value;
|
|
160
|
-
}
|
|
161
|
-
const copy = clone(value);
|
|
162
|
-
if (hasIdentifierProperty(copy)) {
|
|
163
|
-
for (const pk of getIdentifierProperties(copy)) {
|
|
164
|
-
delete copy[pk];
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return copy;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
DeleteIdentifierPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
171
|
-
DeleteIdentifierPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipe, name: "deleteIdentifier" });
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipe, decorators: [{
|
|
173
|
-
type: Pipe,
|
|
174
|
-
args: [{
|
|
175
|
-
name: 'deleteIdentifier',
|
|
176
|
-
}]
|
|
177
|
-
}] });
|
|
178
|
-
class DeleteIdentifierPipeModule {
|
|
179
|
-
}
|
|
180
|
-
DeleteIdentifierPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
181
|
-
DeleteIdentifierPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipeModule, declarations: [DeleteIdentifierPipe], exports: [DeleteIdentifierPipe] });
|
|
182
|
-
DeleteIdentifierPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipeModule });
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteIdentifierPipeModule, decorators: [{
|
|
184
|
-
type: NgModule,
|
|
185
|
-
args: [{
|
|
186
|
-
exports: [DeleteIdentifierPipe],
|
|
187
|
-
declarations: [DeleteIdentifierPipe],
|
|
188
|
-
}]
|
|
189
|
-
}] });
|
|
190
|
-
|
|
191
|
-
class GetFromObjectPipe {
|
|
192
|
-
transform(value, path) {
|
|
193
|
-
return getFromObject(value, path);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
GetFromObjectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
197
|
-
GetFromObjectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipe, name: "getFromObject" });
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipe, decorators: [{
|
|
199
|
-
type: Pipe,
|
|
200
|
-
args: [{
|
|
201
|
-
name: 'getFromObject'
|
|
202
|
-
}]
|
|
203
|
-
}] });
|
|
204
|
-
class GetFromObjectPipeModule {
|
|
205
|
-
}
|
|
206
|
-
GetFromObjectPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
207
|
-
GetFromObjectPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipeModule, declarations: [GetFromObjectPipe], exports: [GetFromObjectPipe] });
|
|
208
|
-
GetFromObjectPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipeModule });
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: GetFromObjectPipeModule, decorators: [{
|
|
210
|
-
type: NgModule,
|
|
211
|
-
args: [{
|
|
212
|
-
exports: [GetFromObjectPipe],
|
|
213
|
-
declarations: [GetFromObjectPipe]
|
|
214
|
-
}]
|
|
215
|
-
}] });
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Generated bundle index. Do not edit.
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
|
-
export { CurrencyPipeModule, DeleteIdentifierPipe, DeleteIdentifierPipeModule, EscapeQuotationMarkPipe, EscapeQuotationMarkPipeModule, GetFromObjectPipe, GetFromObjectPipeModule, ReplacePipe, ReplacePipeModule, RxapCurrencyPipe, ToDisplayPipe, ToDisplayPipeModule };
|
|
222
|
-
//# sourceMappingURL=rxap-pipes.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-pipes.mjs","sources":["../../../../libs/pipes/src/lib/to-display.pipe.ts","../../../../libs/pipes/src/lib/replace.pipe.ts","../../../../libs/pipes/src/lib/escape-quotation-mark.pipe.ts","../../../../libs/pipes/src/lib/currency.pipe.ts","../../../../libs/pipes/src/lib/delete-identifier.pipe.ts","../../../../libs/pipes/src/lib/get-from-object.pipe.ts","../../../../libs/pipes/src/rxap-pipes.ts"],"sourcesContent":["import {\n Pipe,\n PipeTransform,\n NgModule\n} from '@angular/core';\nimport { ToDisplayFunction } from '@rxap/utilities';\nimport { JsonPipe } from '@angular/common';\n\n@Pipe({\n name: 'toDisplay'\n})\nexport class ToDisplayPipe implements PipeTransform {\n\n private jsonPipe = new JsonPipe();\n\n public transform(value: any, toDisplay: ToDisplayFunction = this.jsonPipe.transform): string {\n return toDisplay(value);\n }\n\n}\n\n@NgModule({\n declarations: [ ToDisplayPipe ],\n exports: [ ToDisplayPipe ]\n})\nexport class ToDisplayPipeModule {\n\n}\n","import {\n Pipe,\n PipeTransform,\n NgModule,\n} from '@angular/core';\n\n@Pipe({\n name: 'replace',\n})\nexport class ReplacePipe implements PipeTransform {\n\n public transform(value: string, replace: RegExp, replaceValue: string): string {\n return value ? value.replace(replace, replaceValue) : '';\n }\n\n}\n\n@NgModule({\n declarations: [ ReplacePipe ],\n exports: [ ReplacePipe ],\n})\nexport class ReplacePipeModule {}\n","import {\n Pipe,\n PipeTransform,\n NgModule\n} from '@angular/core';\nimport { ReplacePipe } from './replace.pipe';\n\n@Pipe({\n name: 'escapeQuotationMark'\n})\nexport class EscapeQuotationMarkPipe implements PipeTransform {\n\n public transform(value: string, reverse: boolean = false): string {\n if (reverse) {\n return new ReplacePipe().transform(value, /\\\\\"/g, '\"');\n } else {\n return new ReplacePipe().transform(value, /\"/g, '\\\"');\n }\n }\n\n}\n\n@NgModule({\n declarations: [ EscapeQuotationMarkPipe ],\n exports: [ EscapeQuotationMarkPipe ]\n})\nexport class EscapeQuotationMarkPipeModule {}\n","import {\n Pipe,\n PipeTransform,\n NgModule\n} from '@angular/core';\nimport { CurrencyPipe } from '@angular/common';\n\n@Pipe({\n name: 'currency'\n})\nexport class RxapCurrencyPipe implements PipeTransform {\n\n constructor(private readonly currency: CurrencyPipe) {}\n\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n public transform(\n value: number,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string\n ): string | null {\n return this.currency.transform(value / 100, currencyCode, display, digitsInfo, locale);\n }\n\n}\n\n@NgModule({\n exports: [ RxapCurrencyPipe ],\n declarations: [ RxapCurrencyPipe ],\n providers: [ CurrencyPipe ]\n})\nexport class CurrencyPipeModule {}\n","import {\n Pipe,\n PipeTransform,\n NgModule\n} from '@angular/core';\nimport {\n WithIdentifier,\n hasIdentifierProperty,\n getIdentifierProperties,\n clone\n} from '@rxap/utilities';\n\n@Pipe({\n name: 'deleteIdentifier',\n})\nexport class DeleteIdentifierPipe implements PipeTransform {\n\n public transform<T>(value: (WithIdentifier & T) | null): T | null {\n if (!value) {\n return value;\n }\n const copy: any = clone(value);\n if (hasIdentifierProperty(copy)) {\n for (const pk of getIdentifierProperties(copy)) {\n delete copy[ pk ];\n }\n }\n return copy;\n }\n\n}\n\n@NgModule({\n exports: [ DeleteIdentifierPipe ],\n declarations: [ DeleteIdentifierPipe ],\n})\nexport class DeleteIdentifierPipeModule {\n\n}\n","import {\n Pipe,\n PipeTransform,\n NgModule\n} from '@angular/core';\nimport { getFromObject } from '@rxap/utilities';\n\n@Pipe({\n name: 'getFromObject'\n})\nexport class GetFromObjectPipe implements PipeTransform {\n transform(value: any, path: string): any {\n return getFromObject(value, path);\n }\n}\n\n@NgModule({\n exports: [ GetFromObjectPipe ],\n declarations: [ GetFromObjectPipe ]\n})\nexport class GetFromObjectPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWa,aAAa,CAAA;AAH1B,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAMnC,KAAA;IAJQ,SAAS,CAAC,KAAU,EAAE,SAAA,GAA+B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAA;AACjF,QAAA,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;KACzB;;0GANU,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;wGAAb,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AAClB,iBAAA,CAAA;;MAeY,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAA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