coer-elements 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/components/lib/coer-button/coer-button.component.d.ts +2 -2
  2. package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +1 -1
  3. package/components/lib/coer-switch/coer-switch.component.d.ts +1 -1
  4. package/components/lib/coer-textarea/coer-textarea.component.d.ts +1 -1
  5. package/components/lib/coer-textbox/coer-textbox.component.d.ts +1 -1
  6. package/esm2022/pipes/lib/no-image.pipe.mjs +2 -2
  7. package/esm2022/public_api.mjs +1 -1
  8. package/esm2022/tools/index.mjs +3 -2
  9. package/esm2022/tools/lib/service.class.mjs +248 -0
  10. package/fesm2022/coer-elements.mjs +247 -2
  11. package/fesm2022/coer-elements.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/public_api.d.ts +1 -5
  14. package/styles/angular-material.scss +12 -0
  15. package/{src/styles → styles}/bootstrap.scss +3 -3
  16. package/tools/index.d.ts +2 -1
  17. package/tools/lib/service.class.d.ts +39 -0
  18. package/src/interfaces/index.ts +0 -49
  19. package/src/interfaces/lib/app-source.interface.ts +0 -4
  20. package/src/interfaces/lib/coer-filebox/file-image.interface.ts +0 -14
  21. package/src/interfaces/lib/coer-filebox/file.interface.ts +0 -5
  22. package/src/interfaces/lib/coer-grid/grid-button-by-row.interface.ts +0 -7
  23. package/src/interfaces/lib/coer-grid/grid-checkbox.interface.ts +0 -5
  24. package/src/interfaces/lib/coer-grid/grid-coer-numberbox.interface.ts +0 -12
  25. package/src/interfaces/lib/coer-grid/grid-coer-selectbox.interface.ts +0 -9
  26. package/src/interfaces/lib/coer-grid/grid-coer-switch.interface.ts +0 -6
  27. package/src/interfaces/lib/coer-grid/grid-coer-textbox.interface.ts +0 -11
  28. package/src/interfaces/lib/coer-grid/grid-column.interface.ts +0 -23
  29. package/src/interfaces/lib/coer-grid/grid-data-source.interface.ts +0 -6
  30. package/src/interfaces/lib/coer-grid/grid-header-button.interface.ts +0 -8
  31. package/src/interfaces/lib/coer-grid/grid-header-export-button.interface.ts +0 -10
  32. package/src/interfaces/lib/coer-grid/grid-header.interface.ts +0 -5
  33. package/src/interfaces/lib/coer-grid/grid-import.interface.ts +0 -4
  34. package/src/interfaces/lib/coer-grid/grid-input-checkbox.interface.ts +0 -5
  35. package/src/interfaces/lib/coer-grid/grid-input-switch-change.interface.ts +0 -5
  36. package/src/interfaces/lib/coer-grid/grid-input-textbox.interface.ts +0 -5
  37. package/src/interfaces/lib/coer-grid/grid-item.interface.ts +0 -5
  38. package/src/interfaces/lib/coer-grid/grid-keyup-enter.interface.ts +0 -6
  39. package/src/interfaces/lib/coer-grid/grid-length.interface.ts +0 -5
  40. package/src/interfaces/lib/coer-grid/grid-search.interface.ts +0 -4
  41. package/src/interfaces/lib/coer-grid/grid-sort.interface.ts +0 -5
  42. package/src/interfaces/lib/coer-menu/menu-option-selected.interface.ts +0 -10
  43. package/src/interfaces/lib/coer-menu/menu-selected.interface.ts +0 -11
  44. package/src/interfaces/lib/coer-menu/menu.interface.ts +0 -6
  45. package/src/interfaces/lib/coer-ref.interface.ts +0 -11
  46. package/src/interfaces/lib/page-title/breadcrumb.interface.ts +0 -6
  47. package/src/interfaces/lib/page-title/go-back.interface.ts +0 -6
  48. package/src/interfaces/lib/screen-size.interface.ts +0 -5
  49. package/src/interfaces/lib/service/http-request.interface.ts +0 -11
  50. package/src/interfaces/lib/service/http-response.interface.ts +0 -6
  51. package/src/interfaces/lib/service/patch.interface.ts +0 -5
  52. package/src/styles/angular-material.scss +0 -12
  53. /package/{src/images → images}/no-image.png +0 -0
  54. /package/{src/images → images}/no-user.png +0 -0
  55. /package/{src/styles → styles}/colors.scss +0 -0
  56. /package/{src/styles → styles}/containers.scss +0 -0
  57. /package/{src/styles → styles}/cursores.scss +0 -0
  58. /package/{src/styles → styles}/index.scss +0 -0
  59. /package/{src/styles → styles}/layout.scss +0 -0
  60. /package/{src/styles → styles}/scroll-bar.scss +0 -0
@@ -8,7 +8,7 @@ export declare class CoerButton implements OnInit, OnDestroy {
8
8
  id: string;
9
9
  color: import("@angular/core").InputSignal<"warning" | "danger" | "success" | "default" | "primary" | "secondary" | "navigation">;
10
10
  type: import("@angular/core").InputSignal<"icon" | "filled" | "outline" | "icon-outline" | "icon-no-border">;
11
- icon: import("@angular/core").InputSignal<"" | "cancel" | "menu" | "delete" | "new" | "save" | "import" | "excel" | "edit" | "go" | "back">;
11
+ icon: import("@angular/core").InputSignal<"" | "delete" | "new" | "save" | "cancel" | "import" | "excel" | "menu" | "edit" | "go" | "back">;
12
12
  iconPosition: import("@angular/core").InputSignal<"left" | "right">;
13
13
  animation: import("@angular/core").InputSignal<boolean>;
14
14
  isLoading: import("@angular/core").InputSignal<boolean>;
@@ -23,7 +23,7 @@ export declare class CoerButton implements OnInit, OnDestroy {
23
23
  marginBottom: import("@angular/core").InputSignal<string>;
24
24
  marginLeft: import("@angular/core").InputSignal<string>;
25
25
  path: import("@angular/core").InputSignal<string | (string | number)[]>;
26
- tooltipPosition: import("@angular/core").InputSignal<"top" | "bottom" | "left" | "right">;
26
+ tooltipPosition: import("@angular/core").InputSignal<"left" | "right" | "top" | "bottom">;
27
27
  set tooltip(value: string);
28
28
  onClick: EventEmitter<MouseEvent>;
29
29
  protected _isEnable: import("@angular/core").Signal<boolean>;
@@ -31,7 +31,7 @@ export declare class CoerNumberBox extends ControlValue implements OnInit {
31
31
  isReadonly: import("@angular/core").InputSignal<boolean>;
32
32
  isLoading: import("@angular/core").InputSignal<boolean>;
33
33
  selectOnFocus: import("@angular/core").InputSignal<boolean>;
34
- textPosition: import("@angular/core").InputSignal<"center" | "left" | "right">;
34
+ textPosition: import("@angular/core").InputSignal<"left" | "right" | "center">;
35
35
  onKeyupEnter: import("@angular/core").OutputEmitterRef<string | number>;
36
36
  onInput: import("@angular/core").OutputEmitterRef<string | number>;
37
37
  ngOnInit(): void;
@@ -15,7 +15,7 @@ export declare class CoerSwitch extends ControlValue implements OnInit, OnDestro
15
15
  isDisabled: import("@angular/core").InputSignal<boolean>;
16
16
  isLoading: import("@angular/core").InputSignal<boolean>;
17
17
  isInvisible: import("@angular/core").InputSignal<boolean>;
18
- tooltipPosition: import("@angular/core").InputSignal<"top" | "bottom" | "left" | "right">;
18
+ tooltipPosition: import("@angular/core").InputSignal<"left" | "right" | "top" | "bottom">;
19
19
  set tooltip(value: string);
20
20
  onChange: import("@angular/core").OutputEmitterRef<boolean>;
21
21
  ngOnInit(): void;
@@ -28,7 +28,7 @@ export declare class CoerTextarea extends ControlValue implements OnInit {
28
28
  isLoading: import("@angular/core").InputSignal<boolean>;
29
29
  showFooter: import("@angular/core").InputSignal<boolean>;
30
30
  resize: import("@angular/core").InputSignal<boolean>;
31
- textPosition: import("@angular/core").InputSignal<"center" | "left" | "right">;
31
+ textPosition: import("@angular/core").InputSignal<"left" | "right" | "center">;
32
32
  onInput: import("@angular/core").OutputEmitterRef<string | number>;
33
33
  ngOnInit(): void;
34
34
  get value(): string | number | null | undefined;
@@ -29,7 +29,7 @@ export declare class CoerTextBox extends ControlValue implements OnInit {
29
29
  isReadonly: import("@angular/core").InputSignal<boolean>;
30
30
  isLoading: import("@angular/core").InputSignal<boolean>;
31
31
  selectOnFocus: import("@angular/core").InputSignal<boolean>;
32
- textPosition: import("@angular/core").InputSignal<"center" | "left" | "right">;
32
+ textPosition: import("@angular/core").InputSignal<"left" | "right" | "center">;
33
33
  onKeyupEnter: import("@angular/core").OutputEmitterRef<string | number>;
34
34
  onInput: import("@angular/core").OutputEmitterRef<string | number>;
35
35
  onClickClear: import("@angular/core").OutputEmitterRef<void>;
@@ -3,7 +3,7 @@ import { Tools } from '../../tools/lib/tools';
3
3
  import * as i0 from "@angular/core";
4
4
  export class NoImagePipe {
5
5
  transform(value) {
6
- const NO_IMAGE = '../../images/no-image.png';
6
+ const NO_IMAGE = '../../../images/no-image.png';
7
7
  if (Tools.IsOnlyWhiteSpace(value)) {
8
8
  return NO_IMAGE;
9
9
  }
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
20
20
  type: Pipe,
21
21
  args: [{ name: 'noImage' }]
22
22
  }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm8taW1hZ2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL3BpcGVzL2xpYi9uby1pbWFnZS5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQzs7QUFHOUMsTUFBTSxPQUFPLFdBQVc7SUFFcEIsU0FBUyxDQUFDLEtBQXVDO1FBQzdDLE1BQU0sUUFBUSxHQUFHLDJCQUEyQixDQUFDO1FBRTdDLElBQUcsS0FBSyxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxFQUFHLENBQUM7WUFDaEMsT0FBTyxRQUFRLENBQUM7UUFDcEIsQ0FBQzthQUVJLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFLENBQUM7WUFDakMsT0FBTyxLQUFLLENBQUM7UUFDakIsQ0FBQztRQUVELHlFQUF5RTtRQUN6RSxPQUFPLFFBQVEsQ0FBQztJQUNwQixDQUFDOytHQWZRLFdBQVc7NkdBQVgsV0FBVzs7NEZBQVgsV0FBVztrQkFEdkIsSUFBSTttQkFBQyxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IFRvb2xzIH0gZnJvbSAnLi4vLi4vdG9vbHMvbGliL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xuXHJcbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xyXG4gICAgICAgICAgICByZXR1cm4gdmFsdWU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvL0ZpbGVzLkNvbnZlcnRUb0Jhc2U2NCh2YWx1ZSBhcyBGaWxlKS50aGVuKGJhc2U2NCA9PiB7IHJldHVybiBiYXNlNjQgfSk7XHJcbiAgICAgICAgcmV0dXJuIE5PX0lNQUdFO1xyXG4gICAgfVxyXG59Il19
@@ -3,4 +3,4 @@ export * from './directives';
3
3
  export * from './pipes';
4
4
  export * from './signals';
5
5
  export * from './tools';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbXBvbmVudHMnOyBcclxuZXhwb3J0ICogZnJvbSAnLi9kaXJlY3RpdmVzJztcclxuZXhwb3J0ICogZnJvbSAnLi9waXBlcyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vc2lnbmFscyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vdG9vbHMnOyJdfQ==
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbXBvbmVudHMnO1xyXG5leHBvcnQgKiBmcm9tICcuL2RpcmVjdGl2ZXMnO1xyXG5leHBvcnQgKiBmcm9tICcuL3BpcGVzJztcclxuZXhwb3J0ICogZnJvbSAnLi9zaWduYWxzJztcclxuZXhwb3J0ICogZnJvbSAnLi90b29scyc7Il19
@@ -2,9 +2,10 @@ export * from './lib/breadcrumbs.class';
2
2
  export * from './lib/control-value.class';
3
3
  export * from './lib/date-time.class';
4
4
  export * from './lib/files.class';
5
- export * from './lib/tools';
6
5
  export * from './lib/menu.class';
7
6
  export * from './lib/page.class';
8
7
  export * from './lib/screen.class';
8
+ export * from './lib/service.class';
9
9
  export * from './lib/source.class';
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2VyLWVsZW1lbnRzL3NyYy90b29scy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLG9CQ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yIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL2JyZWFkY3J1bWJzLmNsYXNzJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29udHJvbC12YWx1ZS5jbGFzcyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RhdGUtdGltZS5jbGFzcyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ZpbGVzLmNsYXNzJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbWVudS5jbGFzcyc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BhZ2UuY2xhc3MnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9zY3JlZW4uY2xhc3MnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlLmNsYXNzJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvc291cmNlLmNsYXNzJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvdG9vbHMnOyJdfQ==
@@ -0,0 +1,248 @@
1
+ import { inject } from "@angular/core";
2
+ import { HttpClient, HttpRequest } from "@angular/common/http";
3
+ import { CoerAlert } from "../../components/lib/coer-alert/coer-alert.component";
4
+ import { Tools } from "../../tools/lib/tools";
5
+ export class Service {
6
+ constructor() {
7
+ //Injections
8
+ this.alert = inject(CoerAlert);
9
+ this.http = inject(HttpClient);
10
+ this.httpCode = {
11
+ Ok: 200,
12
+ Created: 201,
13
+ NoContent: 204,
14
+ BadRequest: 400,
15
+ Unauthorize: 401,
16
+ NotFound: 404,
17
+ NotAllowed: 405,
18
+ NotAcceptable: 406,
19
+ Conflict: 409,
20
+ PayloadTooLarge: 413,
21
+ InnerError: 500
22
+ };
23
+ }
24
+ /** */
25
+ ReleaseSubscription(subscription) {
26
+ if (subscription && !subscription.closed)
27
+ subscription.unsubscribe();
28
+ }
29
+ /** HTTP GET */
30
+ HTTP_GET(request) {
31
+ return new Promise(Resolve => {
32
+ this.ReleaseSubscription(this._GET$);
33
+ this._GET$ = this.http.request(new HttpRequest("GET", request.url, { params: request.queryParams, headers: request.headers })).subscribe({
34
+ next: (response) => {
35
+ if (response.type > 0) {
36
+ Resolve({
37
+ body: Tools.BreakReference(response.body),
38
+ status: response.status,
39
+ message: response.statusText,
40
+ ok: true
41
+ });
42
+ }
43
+ },
44
+ error: (httpError) => {
45
+ this.ReleaseSubscription(this._GET$);
46
+ this.AlertError(httpError, request.alertError);
47
+ Resolve({
48
+ body: {},
49
+ status: httpError.status,
50
+ message: httpError.error?.message || httpError.error,
51
+ ok: false
52
+ });
53
+ },
54
+ complete: () => {
55
+ this.ReleaseSubscription(this._GET$);
56
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
57
+ this.alert.Success(request.alertSuccess);
58
+ }
59
+ }
60
+ });
61
+ });
62
+ }
63
+ /** HTTP POST */
64
+ HTTP_POST(request) {
65
+ return new Promise(Resolve => {
66
+ this.ReleaseSubscription(this._POST$);
67
+ this._POST$ = this.http.request(new HttpRequest("POST", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
68
+ next: (response) => {
69
+ if (response.type > 0) {
70
+ Resolve({
71
+ body: Tools.BreakReference(response.body),
72
+ status: response.status,
73
+ message: response.statusText,
74
+ ok: true
75
+ });
76
+ }
77
+ },
78
+ error: (httpError) => {
79
+ this.ReleaseSubscription(this._POST$);
80
+ this.AlertError(httpError, request.alertError);
81
+ Resolve({
82
+ body: {},
83
+ status: httpError.status,
84
+ message: httpError.error?.message || httpError.error,
85
+ ok: false
86
+ });
87
+ },
88
+ complete: () => {
89
+ this.ReleaseSubscription(this._POST$);
90
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
91
+ this.alert.Success(request.alertSuccess);
92
+ }
93
+ }
94
+ });
95
+ });
96
+ }
97
+ /** HTTP PUT */
98
+ HTTP_PUT(request) {
99
+ return new Promise(Resolve => {
100
+ this.ReleaseSubscription(this._PUT$);
101
+ this._PUT$ = this.http.request(new HttpRequest("PUT", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
102
+ next: (response) => {
103
+ if (response.type > 0) {
104
+ Resolve({
105
+ body: {},
106
+ status: response.status,
107
+ message: response.statusText,
108
+ ok: true
109
+ });
110
+ }
111
+ },
112
+ error: (httpError) => {
113
+ this.ReleaseSubscription(this._PUT$);
114
+ this.AlertError(httpError, request.alertError);
115
+ Resolve({
116
+ body: {},
117
+ status: httpError.status,
118
+ message: httpError.error?.message || httpError.error,
119
+ ok: false
120
+ });
121
+ },
122
+ complete: () => {
123
+ this.ReleaseSubscription(this._PUT$);
124
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
125
+ this.alert.Success(request.alertSuccess, 'Updated', 'fa-solid fa-arrows-rotate fa-spin');
126
+ }
127
+ }
128
+ });
129
+ });
130
+ }
131
+ /** HTTP PATCH */
132
+ HTTP_PATCH(request) {
133
+ return new Promise(Resolve => {
134
+ this.ReleaseSubscription(this._PATCH$);
135
+ this._PATCH$ = this.http.request(new HttpRequest("PATCH", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
136
+ next: (response) => {
137
+ if (response.type > 0) {
138
+ Resolve({
139
+ body: {},
140
+ status: response.status,
141
+ message: response.statusText,
142
+ ok: true
143
+ });
144
+ }
145
+ },
146
+ error: (httpError) => {
147
+ this.ReleaseSubscription(this._PATCH$);
148
+ this.AlertError(httpError, request.alertError);
149
+ Resolve({
150
+ body: {},
151
+ status: httpError.status,
152
+ message: httpError.error?.message || httpError.error,
153
+ ok: false
154
+ });
155
+ },
156
+ complete: () => {
157
+ this.ReleaseSubscription(this._PATCH$);
158
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
159
+ this.alert.Success(request.alertSuccess, 'Updated', 'fa-solid fa-arrows-rotate fa-spin');
160
+ }
161
+ }
162
+ });
163
+ });
164
+ }
165
+ /** HTTP DELETE */
166
+ HTTP_DELETE(request) {
167
+ return new Promise(Resolve => {
168
+ this.ReleaseSubscription(this._DELETE$);
169
+ this._DELETE$ = this.http.request(new HttpRequest("DELETE", request.url, { params: request.queryParams, headers: request.headers })).subscribe({
170
+ next: (response) => {
171
+ if (response.type > 0) {
172
+ Resolve({
173
+ body: {},
174
+ status: response.status,
175
+ message: response.statusText,
176
+ ok: true
177
+ });
178
+ }
179
+ },
180
+ error: (httpError) => {
181
+ this.ReleaseSubscription(this._DELETE$);
182
+ this.AlertError(httpError, request.alertError);
183
+ Resolve({
184
+ body: {},
185
+ status: httpError.status,
186
+ message: httpError.error?.message || httpError.error,
187
+ ok: false
188
+ });
189
+ },
190
+ complete: () => {
191
+ this.ReleaseSubscription(this._DELETE$);
192
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
193
+ this.alert.Success(request.alertSuccess, 'Deleted', 'fa-regular fa-trash-can');
194
+ }
195
+ }
196
+ });
197
+ });
198
+ }
199
+ /** */
200
+ AlertError(httpError, message) {
201
+ if (httpError.status >= 500) {
202
+ if (Tools.IsNotOnlyWhiteSpace(message)) {
203
+ this.alert.Error('', message, 'fa-solid fa-bug', null);
204
+ }
205
+ }
206
+ else if (httpError.status < 500) {
207
+ switch (httpError.status) {
208
+ case 400: {
209
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Bad Request', 'fa-regular fa-face-grin-beam-sweat fa-lg');
210
+ break;
211
+ }
212
+ case 401: {
213
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Unauthorize', 'fa-regular fa-face-rolling-eyes fa-lg');
214
+ break;
215
+ }
216
+ case 404: {
217
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Not Found', 'fa-regular fa-face-meh fa-lg');
218
+ break;
219
+ }
220
+ case 405: {
221
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Not Allowed', 'fa-regular fa-face-grimace fa-lg');
222
+ break;
223
+ }
224
+ case 406: {
225
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Not Acceptable', 'fa-regular fa-face-frown-open fa-lg');
226
+ break;
227
+ }
228
+ case 409: {
229
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Conflict', 'fa-regular fa-face-dizzy fa-lg');
230
+ break;
231
+ }
232
+ case 413: {
233
+ this.alert.Warning(httpError.error?.message || httpError.error, 'Too Large', 'fa-regular fa-face-flushed fa-lg');
234
+ break;
235
+ }
236
+ default: {
237
+ if (httpError.status <= 0) {
238
+ this.alert.Warning('Without Connection', 'WEB API DOWN', 'fa-solid fa-plug-circle-xmark fa-lg', null);
239
+ }
240
+ else
241
+ this.alert.Warning(httpError.error?.message || httpError.error);
242
+ break;
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL3Rvb2xzL2xpYi9zZXJ2aWNlLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFFLFVBQVUsRUFBZ0MsV0FBVyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDN0YsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBRWpGLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUc5QyxNQUFNLE9BQU8sT0FBTztJQUFwQjtRQUVJLFlBQVk7UUFDTyxVQUFLLEdBQUcsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQzFCLFNBQUksR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7UUFFbkMsYUFBUSxHQUFHO1lBQ2pCLEVBQUUsRUFBRSxHQUFHO1lBQ1AsT0FBTyxFQUFFLEdBQUc7WUFD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gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yOiAoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9HRVQkKTtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLkFsZXJ0RXJyb3IoaHR0cEVycm9yLCByZXF1ZXN0LmFsZXJ0RXJyb3IpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge30gYXMgYW55LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IGh0dHBFcnJvci5zdGF0dXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9rOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBjb21wbGV0ZTogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9HRVQkKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTm90T25seVdoaXRlU3BhY2UocmVxdWVzdC5hbGVydFN1Y2Nlc3MpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQuU3VjY2VzcyhyZXF1ZXN0LmFsZXJ0U3VjY2Vzcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqIEhUVFAgUE9TVCAqL1xyXG4gICAgcHJvdGVjdGVkIEhUVFBfUE9TVDxUPihyZXF1ZXN0OiBJSHR0cFJlcXVlc3Q8VD4pIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8SUh0dHBSZXNwb25zZTxUPj4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QT1NUJCk7XHJcblxyXG4gICAgICAgICAgICB0aGlzLl9QT1NUJCA9IHRoaXMuaHR0cC5yZXF1ZXN0PFQ+KG5ldyBIdHRwUmVxdWVzdChcIlBPU1RcIiwgcmVxdWVzdC51cmwsIHJlcXVlc3QuYm9keSwgeyBwYXJhbXM6IHJlcXVlc3QucXVlcnlQYXJhbXMsIGhlYWRlcnM6IHJlcXVlc3QuaGVhZGVycyB9KSkuc3Vic2NyaWJlKHtcclxuICAgICAgICAgICAgICAgIG5leHQ6IChyZXNwb25zZTogSHR0cEV2ZW50PFQ+IHwgYW55KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnR5cGUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogVG9vbHMuQnJlYWtSZWZlcmVuY2U8VD4ocmVzcG9uc2UuYm9keSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IHJlc3BvbnNlLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IHJlc3BvbnNlLnN0YXR1c1RleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvazogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yOiAoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QT1NUJCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5BbGVydEVycm9yKGh0dHBFcnJvciwgcmVxdWVzdC5hbGVydEVycm9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBodHRwRXJyb3Iuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvazogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgY29tcGxldGU6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fUE9TVCQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoVG9vbHMuSXNOb3RPbmx5V2hpdGVTcGFjZShyZXF1ZXN0LmFsZXJ0U3VjY2VzcykpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5TdWNjZXNzKHJlcXVlc3QuYWxlcnRTdWNjZXNzKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogSFRUUCBQVVQgKi9cclxuICAgIHByb3RlY3RlZCBIVFRQX1BVVDxUPihyZXF1ZXN0OiBJSHR0cFJlcXVlc3Q8VD4pIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8SUh0dHBSZXNwb25zZTx2b2lkPj4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QVVQkKTtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuX1BVVCQgPSB0aGlzLmh0dHAucmVxdWVzdDxUPihuZXcgSHR0cFJlcXVlc3QoXCJQVVRcIiwgcmVxdWVzdC51cmwsIHJlcXVlc3QuYm9keSwgeyBwYXJhbXM6IHJlcXVlc3QucXVlcnlQYXJhbXMsIGhlYWRlcnM6IHJlcXVlc3QuaGVhZGVycyB9KSkuc3Vic2NyaWJlKHtcclxuICAgICAgICAgICAgICAgIG5leHQ6IChyZXNwb25zZTogSHR0cEV2ZW50PFQ+IHwgYW55KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnR5cGUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge30gYXMgYW55LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiByZXNwb25zZS5zdGF0dXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXNwb25zZS5zdGF0dXNUZXh0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2s6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogKGh0dHBFcnJvcjogSHR0cEVycm9yUmVzcG9uc2UpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fUFVUJCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5BbGVydEVycm9yKGh0dHBFcnJvciwgcmVxdWVzdC5hbGVydEVycm9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBodHRwRXJyb3Iuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvazogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgY29tcGxldGU6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fUFVUJCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc05vdE9ubHlXaGl0ZVNwYWNlKHJlcXVlc3QuYWxlcnRTdWNjZXNzKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0LlN1Y2Nlc3MocmVxdWVzdC5hbGVydFN1Y2Nlc3MsICdVcGRhdGVkJywgJ2ZhLXNvbGlkIGZhLWFycm93cy1yb3RhdGUgZmEtc3BpbicpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiBIVFRQIFBBVENIICovXHJcbiAgICBwcm90ZWN0ZWQgSFRUUF9QQVRDSDxUPihyZXF1ZXN0OiBJSHR0cFJlcXVlc3Q8VD4pIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8SUh0dHBSZXNwb25zZTx2b2lkPj4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QQVRDSCQpO1xyXG5cclxuICAgICAgICAgICAgdGhpcy5fUEFUQ0gkID0gdGhpcy5odHRwLnJlcXVlc3Q8VD4obmV3IEh0dHBSZXF1ZXN0KFwiUEFUQ0hcIiwgcmVxdWVzdC51cmwsIHJlcXVlc3QuYm9keSwgeyBwYXJhbXM6IHJlcXVlc3QucXVlcnlQYXJhbXMsIGhlYWRlcnM6IHJlcXVlc3QuaGVhZGVycyB9KSkuc3Vic2NyaWJlKHtcclxuICAgICAgICAgICAgICAgIG5leHQ6IChyZXNwb25zZTogSHR0cEV2ZW50PFQ+IHwgYW55KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnR5cGUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge30gYXMgYW55LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiByZXNwb25zZS5zdGF0dXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXNwb25zZS5zdGF0dXNUZXh0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2s6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogKGh0dHBFcnJvcjogSHR0cEVycm9yUmVzcG9uc2UpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fUEFUQ0gkKTtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLkFsZXJ0RXJyb3IoaHR0cEVycm9yLCByZXF1ZXN0LmFsZXJ0RXJyb3IpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge30gYXMgYW55LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IGh0dHBFcnJvci5zdGF0dXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9rOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBjb21wbGV0ZTogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QQVRDSCQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoVG9vbHMuSXNOb3RPbmx5V2hpdGVTcGFjZShyZXF1ZXN0LmFsZXJ0U3VjY2VzcykpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5TdWNjZXNzKHJlcXVlc3QuYWxlcnRTdWNjZXNzLCAnVXBkYXRlZCcsICdmYS1zb2xpZCBmYS1hcnJvd3Mtcm90YXRlIGZhLXNwaW4nKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogSFRUUCBERUxFVEUgKi9cclxuICAgIHByb3RlY3RlZCBIVFRQX0RFTEVURTxUPihyZXF1ZXN0OiBJSHR0cFJlcXVlc3Q8VD4pIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8SUh0dHBSZXNwb25zZTx2b2lkPj4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9ERUxFVEUkKTtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuX0RFTEVURSQgPSB0aGlzLmh0dHAucmVxdWVzdDxUPihuZXcgSHR0cFJlcXVlc3QoXCJERUxFVEVcIiwgcmVxdWVzdC51cmwsIHsgcGFyYW1zOiByZXF1ZXN0LnF1ZXJ5UGFyYW1zLCBoZWFkZXJzOiByZXF1ZXN0LmhlYWRlcnMgfSkpLnN1YnNjcmliZSh7XHJcbiAgICAgICAgICAgICAgICBuZXh0OiAocmVzcG9uc2U6IEh0dHBFdmVudDxUPiB8IGFueSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS50eXBlID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzcG9uc2Uuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogcmVzcG9uc2Uuc3RhdHVzVGV4dCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9rOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZXJyb3I6IChodHRwRXJyb3I6IEh0dHBFcnJvclJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5SZWxlYXNlU3Vic2NyaXB0aW9uKHRoaXMuX0RFTEVURSQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuQWxlcnRFcnJvcihodHRwRXJyb3IsIHJlcXVlc3QuYWxlcnRFcnJvcik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7fSBhcyBhbnksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogaHR0cEVycm9yLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogaHR0cEVycm9yLmVycm9yPy5tZXNzYWdlIHx8IGh0dHBFcnJvci5lcnJvcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgb2s6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGNvbXBsZXRlOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5SZWxlYXNlU3Vic2NyaXB0aW9uKHRoaXMuX0RFTEVURSQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc05vdE9ubHlXaGl0ZVNwYWNlKHJlcXVlc3QuYWxlcnRTdWNjZXNzKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0LlN1Y2Nlc3MocmVxdWVzdC5hbGVydFN1Y2Nlc3MsICdEZWxldGVkJywgJ2ZhLXJlZ3VsYXIgZmEtdHJhc2gtY2FuJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwcml2YXRlIEFsZXJ0RXJyb3IoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSwgbWVzc2FnZT86IHN0cmluZyk6IHZvaWQge1xyXG4gICAgICAgIGlmIChodHRwRXJyb3Iuc3RhdHVzID49IDUwMCkge1xyXG4gICAgICAgICAgICBpZiAoVG9vbHMuSXNOb3RPbmx5V2hpdGVTcGFjZShtZXNzYWdlKSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5hbGVydC5FcnJvcignJywgbWVzc2FnZSwgJ2ZhLXNvbGlkIGZhLWJ1ZycsIG51bGwpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBlbHNlIGlmIChodHRwRXJyb3Iuc3RhdHVzIDwgNTAwKSB7XHJcbiAgICAgICAgICAgIHN3aXRjaChodHRwRXJyb3Iuc3RhdHVzKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDQwMDoge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQuV2FybmluZyhodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLCAnQmFkIFJlcXVlc3QnLCAnZmEtcmVndWxhciBmYS1mYWNlLWdyaW4tYmVhbS1zd2VhdCBmYS1sZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgNDAxOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsICdVbmF1dGhvcml6ZScsICdmYS1yZWd1bGFyIGZhLWZhY2Utcm9sbGluZy1leWVzIGZhLWxnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSA0MDQ6IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZ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gICAgICAgICAgIGNhc2UgNDEzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsICdUb28gTGFyZ2UnLCAnZmEtcmVndWxhciBmYS1mYWNlLWZsdXNoZWQgZmEtbGcnKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGh0dHBFcnJvci5zdGF0dXMgPD0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0Lldhcm5pbmcoJ1dpdGhvdXQgQ29ubmVjdGlvbicsICdXRUIgQVBJIERPV04nLCAnZmEtc29saWQgZmEtcGx1Zy1jaXJjbGUteG1hcmsgZmEtbGcnLCBudWxsKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59Il19