coer-elements 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/components/index.d.ts +2 -2
  2. package/esm2022/coer-elements.mjs +2 -2
  3. package/esm2022/components/index.mjs +3 -3
  4. package/esm2022/components/lib/coer-alert/coer-alert.component.mjs +227 -0
  5. package/esm2022/components/lib/components.module.mjs +92 -0
  6. package/esm2022/public_api.mjs +2 -0
  7. package/fesm2022/coer-elements.mjs +6 -697
  8. package/fesm2022/coer-elements.mjs.map +1 -1
  9. package/index.d.ts +5 -1
  10. package/package.json +1 -1
  11. package/public_api.d.ts +1 -0
  12. package/src/styles/bootstrap.scss +15 -0
  13. package/src/styles/coer-elements.scss +29 -0
  14. package/{styles → src/styles}/colors.scss +27 -1
  15. package/src/styles/containers.scss +34 -0
  16. package/src/styles/cursores.scss +11 -0
  17. package/src/styles/layout.scss +21 -0
  18. package/src/styles/scroll-bar.scss +20 -0
  19. package/styles/{index.css → coer-elements.css} +268 -26
  20. package/components/index.ts +0 -2
  21. package/components/src/coer-alert/coer-alert.component.html +0 -56
  22. package/components/src/coer-alert/coer-alert.component.scss +0 -100
  23. package/components/src/coer-alert/coer-alert.component.ts +0 -249
  24. package/components/src/components.module.ts +0 -97
  25. package/esm2022/components/src/coer-alert/coer-alert.component.mjs +0 -227
  26. package/esm2022/components/src/components.module.mjs +0 -92
  27. package/esm2022/index.mjs +0 -2
  28. package/esm2022/interfaces/index.mjs +0 -7
  29. package/esm2022/interfaces/src/IAppSource.interface.mjs +0 -2
  30. package/esm2022/interfaces/src/IBreadcrumb.interface.mjs +0 -2
  31. package/esm2022/interfaces/src/ICoerRef.interface.mjs +0 -2
  32. package/esm2022/interfaces/src/IGoBack.interface.mjs +0 -2
  33. package/esm2022/interfaces/src/IPatch.interface.mjs +0 -2
  34. package/esm2022/interfaces/src/IScreenSize.interface.mjs +0 -2
  35. package/esm2022/tools/index.mjs +0 -9
  36. package/esm2022/tools/src/Breadcrumbs.class.mjs +0 -63
  37. package/esm2022/tools/src/ControlValue.mjs +0 -44
  38. package/esm2022/tools/src/DateTime.class.mjs +0 -22
  39. package/esm2022/tools/src/Files.class.mjs +0 -93
  40. package/esm2022/tools/src/Page.class.mjs +0 -162
  41. package/esm2022/tools/src/Screen.class.mjs +0 -43
  42. package/esm2022/tools/src/Source.class.mjs +0 -80
  43. package/esm2022/tools/src/Tools.mjs +0 -200
  44. package/interfaces/index.d.ts +0 -6
  45. package/interfaces/index.ts +0 -6
  46. package/interfaces/src/IAppSource.interface.d.ts +0 -4
  47. package/interfaces/src/IAppSource.interface.ts +0 -4
  48. package/interfaces/src/IBreadcrumb.interface.d.ts +0 -6
  49. package/interfaces/src/IBreadcrumb.interface.ts +0 -6
  50. package/interfaces/src/ICoerRef.interface.d.ts +0 -10
  51. package/interfaces/src/ICoerRef.interface.ts +0 -11
  52. package/interfaces/src/IGoBack.interface.d.ts +0 -6
  53. package/interfaces/src/IGoBack.interface.ts +0 -6
  54. package/interfaces/src/IPatch.interface.d.ts +0 -5
  55. package/interfaces/src/IPatch.interface.ts +0 -5
  56. package/interfaces/src/IScreenSize.interface.d.ts +0 -5
  57. package/interfaces/src/IScreenSize.interface.ts +0 -5
  58. package/styles/index.scss +0 -98
  59. package/tools/index.d.ts +0 -8
  60. package/tools/index.ts +0 -8
  61. package/tools/src/Breadcrumbs.class.d.ts +0 -18
  62. package/tools/src/Breadcrumbs.class.ts +0 -84
  63. package/tools/src/ControlValue.d.ts +0 -23
  64. package/tools/src/ControlValue.ts +0 -63
  65. package/tools/src/DateTime.class.d.ts +0 -11
  66. package/tools/src/DateTime.class.ts +0 -27
  67. package/tools/src/Files.class.d.ts +0 -16
  68. package/tools/src/Files.class.ts +0 -119
  69. package/tools/src/Page.class.d.ts +0 -66
  70. package/tools/src/Page.class.ts +0 -197
  71. package/tools/src/Screen.class.d.ts +0 -11
  72. package/tools/src/Screen.class.ts +0 -50
  73. package/tools/src/Source.class.d.ts +0 -20
  74. package/tools/src/Source.class.ts +0 -107
  75. package/tools/src/Tools.d.ts +0 -33
  76. package/tools/src/Tools.ts +0 -217
  77. /package/components/{src → lib}/coer-alert/coer-alert.component.d.ts +0 -0
  78. /package/components/{src → lib}/components.module.d.ts +0 -0
@@ -1,249 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import * as bootstrap from 'bootstrap';
3
- import Swal from 'sweetalert2'
4
-
5
- @Component({
6
- selector: 'coer-alert',
7
- templateUrl: './coer-alert.component.html',
8
- styleUrls: ['./coer-alert.component.scss']
9
- })
10
- export class CoerAlert {
11
-
12
- /** */
13
- public Success(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {
14
- //Title
15
- if (!title || title == '') title = 'Success';
16
- const alertSuccessTitle = document.getElementById('alert-success-title')!;
17
- alertSuccessTitle.textContent = title;
18
-
19
- //Icon
20
- icon = this.GetIcon(title, icon, 'bi-check-circle fa-beat');
21
- const alertSuccessIcon = document.getElementById('alert-success-icon')!;
22
- this.SetIcon(alertSuccessIcon, icon);
23
-
24
- //Message
25
- if (!message) message = '';
26
- const alertSuccessMessage = document.getElementById('alert-success-message')!;
27
- alertSuccessMessage.innerHTML = message;
28
-
29
- //Toast
30
- const alertSuccess = document.getElementById('alert-success')!;
31
- this.SetAutoHide(alertSuccess, autohide);
32
-
33
- const toast = bootstrap.Toast.getOrCreateInstance(alertSuccess);
34
- toast.show();
35
- }
36
-
37
-
38
- /** */
39
- public Error(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {
40
- //Title
41
- if (!title || title == '') title = 'Error';
42
- const alertErrorTitle = document.getElementById('alert-error-title')!;
43
- alertErrorTitle.textContent = title;
44
-
45
- //Icon
46
- icon = this.GetIcon(title, icon, 'bi-exclamation-octagon fa-beat');
47
- const alertErrorIcon = document.getElementById('alert-error-icon')!;
48
- this.SetIcon(alertErrorIcon, icon);
49
-
50
- //Message
51
- if (!message) message = '';
52
- const alertErrorBody = document.getElementById('alert-error-message')!;
53
- alertErrorBody.innerHTML = message;
54
-
55
- //Toast
56
- const alertError = document.getElementById('alert-error')!;
57
- this.SetAutoHide(alertError, autohide);
58
-
59
- const toast = bootstrap.Toast.getOrCreateInstance(alertError);
60
- toast.show();
61
- }
62
-
63
-
64
- /** */
65
- public Info(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {
66
- //Title
67
- if (!title || title == '') title = 'Info';
68
- const alertInfoTitle = document.getElementById('alert-info-title')!;
69
- alertInfoTitle.textContent = title;
70
-
71
- //Icon
72
- icon = this.GetIcon(title, icon, 'bi-info-circle fa-beat');
73
- const alertInfoIcon = document.getElementById('alert-info-icon')!;
74
- this.SetIcon(alertInfoIcon, icon);
75
-
76
- //Message
77
- if (!message) message = '';
78
- const alertInfoBody = document.getElementById('alert-info-message')!;
79
- alertInfoBody.innerHTML = message;
80
-
81
- //Toast
82
- const alertInfo = document.getElementById('alert-info')!;
83
- this.SetAutoHide(alertInfo, autohide);
84
-
85
- const toast = bootstrap.Toast.getOrCreateInstance(alertInfo);
86
- toast.show();
87
- }
88
-
89
-
90
- /** */
91
- public Warning(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {
92
- //Title
93
- if (!title || title == '') title = 'Warning';
94
- const alertWarningTitle = document.getElementById('alert-warning-title')!;
95
- alertWarningTitle.textContent = title;
96
-
97
- //Icon
98
- icon = this.GetIcon(title, icon, 'bi-exclamation-triangle-fill fa-beat');
99
- const alertWarningIcon = document.getElementById('alert-warning-icon')!;
100
- this.SetIcon(alertWarningIcon, icon);
101
-
102
- //Message
103
- if (!message) message = '';
104
- const alertWarningBody = document.getElementById('alert-warning-message')!;
105
- alertWarningBody.innerHTML = message;
106
-
107
- //Toast
108
- const alertWarning = document.getElementById('alert-warning')!;
109
- this.SetAutoHide(alertWarning, autohide);
110
-
111
- const toast = bootstrap.Toast.getOrCreateInstance(alertWarning);
112
- toast.show();
113
- }
114
-
115
-
116
- /** */
117
- protected Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning') {
118
- return new Promise<void>(Resolve => {
119
- const element = document.getElementById(alert)!;
120
- const toast = bootstrap.Toast.getOrCreateInstance(element);
121
- toast.hide();
122
-
123
- setTimeout(() => { Resolve() }, 200);
124
- })
125
- }
126
-
127
-
128
- /** */
129
- public Confirm(
130
- message: string = 'Proceed?',
131
- alertType: 'warning' | 'danger' | 'success' | 'info' = 'warning',
132
- icon: string | null = null) {
133
- return new Promise<boolean>(Resolve => {
134
- let color: string;
135
- let iconType: 'warning' | 'error' | 'success' | 'info';
136
- switch(alertType) {
137
- case 'danger': {
138
- if (icon == null) icon = 'bi-exclamation-octagon';
139
- iconType = 'error';
140
- color = '#dc3545'; //red
141
- break;
142
- };
143
-
144
- case 'success': {
145
- if (icon == null) icon = 'bi-check-circle';
146
- iconType = 'info';
147
- color = '#198754'; //green
148
- break;
149
- };
150
-
151
- case 'info': {
152
- if (icon == null) icon = 'bi-info-circle';
153
- iconType = 'error';
154
- color = '#0d6efd'; //blue
155
- break
156
- };
157
-
158
- default: {
159
- if (icon == null) icon = 'bi-exclamation-triangle-fill';
160
- iconType = 'warning';
161
- color = '#ffc107'; //yellow
162
- break;
163
- }
164
- }
165
-
166
- switch(icon) {
167
- case 'delete': icon = 'fa-regular fa-trash-can'; break;
168
- }
169
-
170
- Swal.fire({
171
- icon: iconType,
172
- iconColor: 'transparent',
173
- iconHtml: `<i class="${icon}" style="color: ${color};"></i>`,
174
- html: message,
175
- showConfirmButton: true,
176
- confirmButtonText: 'Yes',
177
- confirmButtonColor: color,
178
- focusConfirm: true,
179
- showDenyButton: true,
180
- denyButtonColor: color,
181
- focusDeny: false,
182
- reverseButtons: true,
183
- allowOutsideClick: false,
184
- allowEscapeKey: false,
185
- allowEnterKey: true,
186
- customClass: {
187
- denyButton: 'sweet-alert-button',
188
- confirmButton: 'sweet-alert-button'
189
- }
190
- }).then(({ value }) => setTimeout(() => Resolve(value)));
191
- });
192
- }
193
-
194
-
195
- /** */
196
- private SetIcon(element: HTMLElement, icon: string): void {
197
- for (const item of [...element.classList.value.split(' ')]) {
198
- if (item.length > 0) {
199
- element.classList.remove(item);
200
- element.classList.remove('q');
201
- }
202
- }
203
-
204
- icon = icon.trim();
205
- const hasWhiteSpaces: RegExp = / /;
206
- if (hasWhiteSpaces.test(icon)) {
207
- const classes = icon.split(' ');
208
- for (const icon of classes) element.classList.add(icon);
209
- }
210
-
211
- else element.classList.add(icon);
212
- }
213
-
214
-
215
- /** */
216
- private SetAutoHide(element: HTMLElement, autohide: number | null): void {
217
- element.removeAttribute('data-bs-autohide');
218
- element.removeAttribute('data-bs-delay');
219
-
220
- if (autohide && autohide > 0) {
221
- if (autohide < 1000) autohide = 1000;
222
- element.setAttribute('data-bs-autohide', 'true');
223
- element.setAttribute('data-bs-delay', String(autohide));
224
- }
225
-
226
- else element.setAttribute('data-bs-autohide', 'false');
227
- }
228
-
229
-
230
- /** */
231
- private GetIcon(title: string, icon: string | null, iconDefault: string): string {
232
- if (icon == null || icon == '') {
233
- title = title.replaceAll(' ', '').toUpperCase();
234
-
235
- switch(title) {
236
- case 'ENABLED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
237
- case 'ACTIVE': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
238
- case 'ACTIVED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
239
- case 'DISABLE': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
240
- case 'DISABLED': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
241
- case 'DELETE': return 'fa-regular fa-trash-can';
242
- case 'DELETED': return 'fa-regular fa-trash-can';
243
- default: return iconDefault;
244
- }
245
- }
246
-
247
- return icon;
248
- }
249
- }
@@ -1,97 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { RouterModule } from '@angular/router';
4
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- //import { DirectivesModule } from 'src/app/shared/directives/directives.module';
6
- //import { PipesModule } from 'src/app/shared/pipes/pipes.module';
7
-
8
- //Angular Material
9
- //import { MatButtonModule } from '@angular/material/button';
10
- //import { MatCheckboxModule } from '@angular/material/checkbox';
11
- //import { MatInputModule } from '@angular/material/input';
12
- //import { MatFormFieldModule } from '@angular/material/form-field';
13
- //import { MatSlideToggleModule } from '@angular/material/slide-toggle';
14
- //import { MatTabsModule } from '@angular/material/tabs';
15
-
16
- //Components
17
- import { CoerAlert } from './coer-alert/coer-alert.component';
18
- //import { CoerButton } from './coer-button/coer-button.component';
19
- //import { CoerCheckbox } from './coer-checkbox/coer-checkbox.component';
20
- //import { CoerFilebox } from './coer-filebox/coer-filebox.component';
21
- //import { CoerForm } from './coer-form/coer-form.component';
22
- //import { CoerGrid } from './coer-grid/coer-grid.component';
23
- //import { CoerModal } from './coer-modal/coer-modal.component';
24
- //import { CoerNumberBox } from './coer-numberbox/coer-numberbox.component';
25
- //import { CoerPageTitle } from './coer-page-title/coer-page-title.component';
26
- //import { CoerSelectbox } from './coer-selectbox/coer-selectbox.component';
27
- //import { CoerSwitch } from './coer-switch/coer-switch.component';
28
- //import { CoerTab } from './coer-tab/coer-tab.component';
29
- //import { CoerTextarea } from './coer-textarea/coer-textarea.component';
30
- //import { CoerTextBox } from './coer-textbox/coer-textbox.component';
31
-
32
- @NgModule({
33
- imports: [
34
- CommonModule,
35
- RouterModule,
36
- FormsModule,
37
- ReactiveFormsModule,
38
- //PipesModule,
39
- //MatButtonModule,
40
- //MatCheckboxModule,
41
- //MatInputModule,
42
- //MatFormFieldModule,
43
- //MatSlideToggleModule,
44
- //MatTabsModule,
45
- //DirectivesModule
46
- ],
47
- declarations: [
48
- CoerAlert,
49
- //CoerButton,
50
- //CoerCheckbox,
51
- //CoerFilebox,
52
- //CoerForm,
53
- //CoerGrid,
54
- //CoerModal,
55
- //CoerNumberBox,
56
- //CoerPageTitle,
57
- //CoerSelectbox,
58
- //CoerSwitch,
59
- //CoerTextarea,
60
- //CoerTab,
61
- //CoerTextBox,
62
- ],
63
- exports: [
64
- CoerAlert,
65
- //CoerButton,
66
- //CoerCheckbox,
67
- //CoerFilebox,
68
- //CoerForm,
69
- //CoerGrid,
70
- //CoerModal,
71
- //CoerNumberBox,
72
- //CoerPageTitle,
73
- //CoerSelectbox,
74
- //CoerSwitch,
75
- //CoerTextarea,
76
- //CoerTab,
77
- //CoerTextBox,
78
- ]
79
- })
80
- export class ComponentsModule { }
81
- //export * from './coer-alert/coer-alert.component';
82
- //export * from './coer-button/coer-button.component';
83
- //export * from './coer-checkbox/coer-checkbox.component';
84
- //export * from './coer-filebox/coer-filebox.component';
85
- //export * from './coer-filebox/coer-filebox.interface';
86
- //export * from './coer-form/coer-form.component';
87
- //export * from './coer-grid/coer-grid.component';
88
- //export * from './coer-grid/coer-grid.interface';
89
- //export * from './coer-grid/coer-grid.templates';
90
- //export * from './coer-modal/coer-modal.component';
91
- //export * from './coer-numberbox/coer-numberbox.component';
92
- //export * from './coer-page-title/coer-page-title.component';
93
- //export * from './coer-page-title/pageTitle.interface';
94
- //export * from './coer-selectbox/coer-selectbox.component';
95
- //export * from './coer-switch/coer-switch.component';
96
- //export * from './coer-tab/coer-tab.component';
97
- //export * from './coer-textbox/coer-textbox.component';
@@ -1,227 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import * as bootstrap from 'bootstrap';
3
- import Swal from 'sweetalert2';
4
- import * as i0 from "@angular/core";
5
- export class CoerAlert {
6
- /** */
7
- Success(message = null, title = null, icon = null, autohide = 3000) {
8
- //Title
9
- if (!title || title == '')
10
- title = 'Success';
11
- const alertSuccessTitle = document.getElementById('alert-success-title');
12
- alertSuccessTitle.textContent = title;
13
- //Icon
14
- icon = this.GetIcon(title, icon, 'bi-check-circle fa-beat');
15
- const alertSuccessIcon = document.getElementById('alert-success-icon');
16
- this.SetIcon(alertSuccessIcon, icon);
17
- //Message
18
- if (!message)
19
- message = '';
20
- const alertSuccessMessage = document.getElementById('alert-success-message');
21
- alertSuccessMessage.innerHTML = message;
22
- //Toast
23
- const alertSuccess = document.getElementById('alert-success');
24
- this.SetAutoHide(alertSuccess, autohide);
25
- const toast = bootstrap.Toast.getOrCreateInstance(alertSuccess);
26
- toast.show();
27
- }
28
- /** */
29
- Error(message = null, title = null, icon = null, autohide = 3000) {
30
- //Title
31
- if (!title || title == '')
32
- title = 'Error';
33
- const alertErrorTitle = document.getElementById('alert-error-title');
34
- alertErrorTitle.textContent = title;
35
- //Icon
36
- icon = this.GetIcon(title, icon, 'bi-exclamation-octagon fa-beat');
37
- const alertErrorIcon = document.getElementById('alert-error-icon');
38
- this.SetIcon(alertErrorIcon, icon);
39
- //Message
40
- if (!message)
41
- message = '';
42
- const alertErrorBody = document.getElementById('alert-error-message');
43
- alertErrorBody.innerHTML = message;
44
- //Toast
45
- const alertError = document.getElementById('alert-error');
46
- this.SetAutoHide(alertError, autohide);
47
- const toast = bootstrap.Toast.getOrCreateInstance(alertError);
48
- toast.show();
49
- }
50
- /** */
51
- Info(message = null, title = null, icon = null, autohide = 3000) {
52
- //Title
53
- if (!title || title == '')
54
- title = 'Info';
55
- const alertInfoTitle = document.getElementById('alert-info-title');
56
- alertInfoTitle.textContent = title;
57
- //Icon
58
- icon = this.GetIcon(title, icon, 'bi-info-circle fa-beat');
59
- const alertInfoIcon = document.getElementById('alert-info-icon');
60
- this.SetIcon(alertInfoIcon, icon);
61
- //Message
62
- if (!message)
63
- message = '';
64
- const alertInfoBody = document.getElementById('alert-info-message');
65
- alertInfoBody.innerHTML = message;
66
- //Toast
67
- const alertInfo = document.getElementById('alert-info');
68
- this.SetAutoHide(alertInfo, autohide);
69
- const toast = bootstrap.Toast.getOrCreateInstance(alertInfo);
70
- toast.show();
71
- }
72
- /** */
73
- Warning(message = null, title = null, icon = null, autohide = 3000) {
74
- //Title
75
- if (!title || title == '')
76
- title = 'Warning';
77
- const alertWarningTitle = document.getElementById('alert-warning-title');
78
- alertWarningTitle.textContent = title;
79
- //Icon
80
- icon = this.GetIcon(title, icon, 'bi-exclamation-triangle-fill fa-beat');
81
- const alertWarningIcon = document.getElementById('alert-warning-icon');
82
- this.SetIcon(alertWarningIcon, icon);
83
- //Message
84
- if (!message)
85
- message = '';
86
- const alertWarningBody = document.getElementById('alert-warning-message');
87
- alertWarningBody.innerHTML = message;
88
- //Toast
89
- const alertWarning = document.getElementById('alert-warning');
90
- this.SetAutoHide(alertWarning, autohide);
91
- const toast = bootstrap.Toast.getOrCreateInstance(alertWarning);
92
- toast.show();
93
- }
94
- /** */
95
- Close(alert) {
96
- return new Promise(Resolve => {
97
- const element = document.getElementById(alert);
98
- const toast = bootstrap.Toast.getOrCreateInstance(element);
99
- toast.hide();
100
- setTimeout(() => { Resolve(); }, 200);
101
- });
102
- }
103
- /** */
104
- Confirm(message = 'Proceed?', alertType = 'warning', icon = null) {
105
- return new Promise(Resolve => {
106
- let color;
107
- let iconType;
108
- switch (alertType) {
109
- case 'danger':
110
- {
111
- if (icon == null)
112
- icon = 'bi-exclamation-octagon';
113
- iconType = 'error';
114
- color = '#dc3545'; //red
115
- break;
116
- }
117
- ;
118
- case 'success':
119
- {
120
- if (icon == null)
121
- icon = 'bi-check-circle';
122
- iconType = 'info';
123
- color = '#198754'; //green
124
- break;
125
- }
126
- ;
127
- case 'info':
128
- {
129
- if (icon == null)
130
- icon = 'bi-info-circle';
131
- iconType = 'error';
132
- color = '#0d6efd'; //blue
133
- break;
134
- }
135
- ;
136
- default: {
137
- if (icon == null)
138
- icon = 'bi-exclamation-triangle-fill';
139
- iconType = 'warning';
140
- color = '#ffc107'; //yellow
141
- break;
142
- }
143
- }
144
- switch (icon) {
145
- case 'delete':
146
- icon = 'fa-regular fa-trash-can';
147
- break;
148
- }
149
- Swal.fire({
150
- icon: iconType,
151
- iconColor: 'transparent',
152
- iconHtml: `<i class="${icon}" style="color: ${color};"></i>`,
153
- html: message,
154
- showConfirmButton: true,
155
- confirmButtonText: 'Yes',
156
- confirmButtonColor: color,
157
- focusConfirm: true,
158
- showDenyButton: true,
159
- denyButtonColor: color,
160
- focusDeny: false,
161
- reverseButtons: true,
162
- allowOutsideClick: false,
163
- allowEscapeKey: false,
164
- allowEnterKey: true,
165
- customClass: {
166
- denyButton: 'sweet-alert-button',
167
- confirmButton: 'sweet-alert-button'
168
- }
169
- }).then(({ value }) => setTimeout(() => Resolve(value)));
170
- });
171
- }
172
- /** */
173
- SetIcon(element, icon) {
174
- for (const item of [...element.classList.value.split(' ')]) {
175
- if (item.length > 0) {
176
- element.classList.remove(item);
177
- element.classList.remove('q');
178
- }
179
- }
180
- icon = icon.trim();
181
- const hasWhiteSpaces = / /;
182
- if (hasWhiteSpaces.test(icon)) {
183
- const classes = icon.split(' ');
184
- for (const icon of classes)
185
- element.classList.add(icon);
186
- }
187
- else
188
- element.classList.add(icon);
189
- }
190
- /** */
191
- SetAutoHide(element, autohide) {
192
- element.removeAttribute('data-bs-autohide');
193
- element.removeAttribute('data-bs-delay');
194
- if (autohide && autohide > 0) {
195
- if (autohide < 1000)
196
- autohide = 1000;
197
- element.setAttribute('data-bs-autohide', 'true');
198
- element.setAttribute('data-bs-delay', String(autohide));
199
- }
200
- else
201
- element.setAttribute('data-bs-autohide', 'false');
202
- }
203
- /** */
204
- GetIcon(title, icon, iconDefault) {
205
- if (icon == null || icon == '') {
206
- title = title.replaceAll(' ', '').toUpperCase();
207
- switch (title) {
208
- case 'ENABLED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
209
- case 'ACTIVE': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
210
- case 'ACTIVED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
211
- case 'DISABLE': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
212
- case 'DISABLED': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
213
- case 'DELETE': return 'fa-regular fa-trash-can';
214
- case 'DELETED': return 'fa-regular fa-trash-can';
215
- default: return iconDefault;
216
- }
217
- }
218
- return icon;
219
- }
220
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
221
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CoerAlert, selector: "coer-alert", ngImport: i0, template: "<aside class=\"toast-container coer-alert\">\r\n <!-- Success -->\r\n <div id=\"alert-success\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-success-icon\"></i>\r\n <strong id=\"alert-success-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-success')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-success-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Error -->\r\n <div id=\"alert-error\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-error-icon\"></i>\r\n <strong id=\"alert-error-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-error')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-error-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Info -->\r\n <div id=\"alert-info\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-info-icon\"></i>\r\n <strong id=\"alert-info-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-info')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-info-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Warning -->\r\n <div id=\"alert-warning\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-warning-icon\"></i>\r\n <strong id=\"alert-warning-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-warning')\" class=\"btn-close\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-warning-message\"></pre>\r\n </div>\r\n </div>\r\n</aside>", styles: [".text-blue{color:#0d6efd!important}.text-blue-bold{color:#0d6efd!important;font-weight:700!important}.background-blue{background-color:#0d6efd!important}.background-border-blue{background-color:#0d6efd!important;border-color:#0d6efd!important}.text-gray{color:#6c757d!important}.text-gray-bold{color:#6c757d!important;font-weight:700!important}.background-gray{background-color:#6c757d!important}.background-border-gray{background-color:#6c757d!important;border-color:#6c757d!important}.text-green{color:#198754!important}.text-green-bold{color:#198754!important;font-weight:700!important}.background-green{background-color:#198754!important}.background-border-green{background-color:#198754!important;border-color:#198754!important}.text-yellow{color:#ffc107!important}.text-yellow-bold{color:#ffc107!important;font-weight:700!important}.background-yellow{background-color:#ffc107!important}.background-border-yellow{background-color:#ffc107!important;border-color:#ffc107!important}.text-red{color:#dc3545!important}.text-red-bold{color:#dc3545!important;font-weight:700!important}.background-red{background-color:#dc3545!important}.background-border-red{background-color:#dc3545!important;border-color:#dc3545!important}.text-white{color:#f5f5f5!important}.text-white-bold{color:#f5f5f5!important;font-weight:700!important}.background-white{background-color:#f5f5f5!important}.background-border-white{background-color:#f5f5f5!important;border-color:#f5f5f5!important}.text-black{color:#252525!important}.text-black-bold{color:#252525!important;font-weight:700!important}.background-black{background-color:#252525!important}.background-border-black{background-color:#252525!important;border-color:#252525!important}.text-orange{color:#fd6031!important}.text-orange-bold{color:#fd6031!important;font-weight:700!important}.background-orange{background-color:#fd6031!important}.background-border-orange{background-color:#fd6031!important;border-color:#fd6031!important}aside.toast-container{position:fixed;bottom:0;right:0;padding:15px!important;z-index:2000!important}aside.toast-container i,aside.toast-container svg{display:flex;align-items:center}aside.toast-container strong{margin:0 auto 0 5px}aside.toast-container div.toast,aside.toast-container div.toast-header{border-top-left-radius:10px;border-top-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast,aside.toast-container div.toast-body{border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast-body{min-height:36px}aside.toast-container pre{font-family:Roboto,RobotoFallback,Noto Kufi Arabic,Helvetica,Arial,sans-serif;white-space:pre-wrap;font-size:medium}aside.toast-container button{margin:0 2px!important;width:10px!important;height:10px!important;box-shadow:none!important;outline:none!important;border:none!important}aside.toast-container div#alert-success div.toast-header,aside.toast-container div#alert-success div.toast-body{background-color:#198754}aside.toast-container div#alert-info div.toast-header,aside.toast-container div#alert-info div.toast-body{background-color:#0d6efd}aside.toast-container div#alert-error div.toast-header,aside.toast-container div#alert-error div.toast-body{background-color:#dc3545}aside.toast-container div#alert-warning div.toast-header,aside.toast-container div#alert-warning div.toast-body{background-color:#ffc107;border-color:#252525;color:#252525}aside.toast-container div#alert-success:hover,aside.toast-container div#alert-info:hover,aside.toast-container div#alert-error:hover,aside.toast-container div#alert-warning:hover{transform:scale(1.01);box-shadow:2px 2px 10px #789;cursor:default}button.sweet-alert-button{width:100px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0 5px!important;outline:none!important;border:none!important;box-shadow:none!important}aside.toast-container>*{border:none!important;z-index:2000!important;margin:15px 0 0!important}\n"] }); }
222
- }
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerAlert, decorators: [{
224
- type: Component,
225
- args: [{ selector: 'coer-alert', template: "<aside class=\"toast-container coer-alert\">\r\n <!-- Success -->\r\n <div id=\"alert-success\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-success-icon\"></i>\r\n <strong id=\"alert-success-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-success')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-success-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Error -->\r\n <div id=\"alert-error\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-error-icon\"></i>\r\n <strong id=\"alert-error-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-error')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-error-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Info -->\r\n <div id=\"alert-info\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-info-icon\"></i>\r\n <strong id=\"alert-info-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-info')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-info-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Warning -->\r\n <div id=\"alert-warning\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-warning-icon\"></i>\r\n <strong id=\"alert-warning-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-warning')\" class=\"btn-close\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-warning-message\"></pre>\r\n </div>\r\n </div>\r\n</aside>", styles: [".text-blue{color:#0d6efd!important}.text-blue-bold{color:#0d6efd!important;font-weight:700!important}.background-blue{background-color:#0d6efd!important}.background-border-blue{background-color:#0d6efd!important;border-color:#0d6efd!important}.text-gray{color:#6c757d!important}.text-gray-bold{color:#6c757d!important;font-weight:700!important}.background-gray{background-color:#6c757d!important}.background-border-gray{background-color:#6c757d!important;border-color:#6c757d!important}.text-green{color:#198754!important}.text-green-bold{color:#198754!important;font-weight:700!important}.background-green{background-color:#198754!important}.background-border-green{background-color:#198754!important;border-color:#198754!important}.text-yellow{color:#ffc107!important}.text-yellow-bold{color:#ffc107!important;font-weight:700!important}.background-yellow{background-color:#ffc107!important}.background-border-yellow{background-color:#ffc107!important;border-color:#ffc107!important}.text-red{color:#dc3545!important}.text-red-bold{color:#dc3545!important;font-weight:700!important}.background-red{background-color:#dc3545!important}.background-border-red{background-color:#dc3545!important;border-color:#dc3545!important}.text-white{color:#f5f5f5!important}.text-white-bold{color:#f5f5f5!important;font-weight:700!important}.background-white{background-color:#f5f5f5!important}.background-border-white{background-color:#f5f5f5!important;border-color:#f5f5f5!important}.text-black{color:#252525!important}.text-black-bold{color:#252525!important;font-weight:700!important}.background-black{background-color:#252525!important}.background-border-black{background-color:#252525!important;border-color:#252525!important}.text-orange{color:#fd6031!important}.text-orange-bold{color:#fd6031!important;font-weight:700!important}.background-orange{background-color:#fd6031!important}.background-border-orange{background-color:#fd6031!important;border-color:#fd6031!important}aside.toast-container{position:fixed;bottom:0;right:0;padding:15px!important;z-index:2000!important}aside.toast-container i,aside.toast-container svg{display:flex;align-items:center}aside.toast-container strong{margin:0 auto 0 5px}aside.toast-container div.toast,aside.toast-container div.toast-header{border-top-left-radius:10px;border-top-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast,aside.toast-container div.toast-body{border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast-body{min-height:36px}aside.toast-container pre{font-family:Roboto,RobotoFallback,Noto Kufi Arabic,Helvetica,Arial,sans-serif;white-space:pre-wrap;font-size:medium}aside.toast-container button{margin:0 2px!important;width:10px!important;height:10px!important;box-shadow:none!important;outline:none!important;border:none!important}aside.toast-container div#alert-success div.toast-header,aside.toast-container div#alert-success div.toast-body{background-color:#198754}aside.toast-container div#alert-info div.toast-header,aside.toast-container div#alert-info div.toast-body{background-color:#0d6efd}aside.toast-container div#alert-error div.toast-header,aside.toast-container div#alert-error div.toast-body{background-color:#dc3545}aside.toast-container div#alert-warning div.toast-header,aside.toast-container div#alert-warning div.toast-body{background-color:#ffc107;border-color:#252525;color:#252525}aside.toast-container div#alert-success:hover,aside.toast-container div#alert-info:hover,aside.toast-container div#alert-error:hover,aside.toast-container div#alert-warning:hover{transform:scale(1.01);box-shadow:2px 2px 10px #789;cursor:default}button.sweet-alert-button{width:100px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0 5px!important;outline:none!important;border:none!important;box-shadow:none!important}aside.toast-container>*{border:none!important;z-index:2000!important;margin:15px 0 0!important}\n"] }]
226
- }] });
227
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29lci1hbGVydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2VyLWVsZW1lbnRzL2NvbXBvbmVudHMvc3JjL2NvZXItYWxlcnQvY29lci1hbGVydC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2VyLWVsZW1lbnRzL2NvbXBvbmVudHMvc3JjL2NvZXItYWxlcnQvY29lci1hbGVydC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sS0FBSyxTQUFTLE1BQU0sV0FBVyxDQUFDO0FBQ3ZDLE9BQU8sSUFBSSxNQUFNLGFBQWEsQ0FBQTs7QUFPOUIsTUFBTSxPQUFPLFNBQVM7SUFFbEIsTUFBTTtJQUNDLE9BQU8sQ0FBQyxVQUF5QixJQUFJLEVBQUUsUUFBdUIsSUFBSSxFQUFFLE9BQXNCLElBQUksRUFBRSxXQUEwQixJQUFJO1FBQ2pJLE9BQU87UUFDUCxJQUFJLENBQUMsS0FBSyxJQUFJLEtBQUssSUFBSSxFQUFFO1lBQUUsS0FBSyxHQUFHLFNBQVMsQ0FBQztRQUM3QyxNQUFNLGlCQUFpQix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clxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8Ym9vbGVhbj4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBjb2xvcjogc3RyaW5nO1xyXG4gICAgICAgICAgICBsZXQgaWNvblR5cGU6ICd3YXJuaW5nJyB8ICdlcnJvcicgfCAnc3VjY2VzcycgfCAnaW5mbyc7XHJcbiAgICAgICAgICAgIHN3aXRjaChhbGVydFR5cGUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2Rhbmdlcic6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbiA9PSBudWxsKSBpY29uID0gJ2JpLWV4Y2xhbWF0aW9uLW9jdGFnb24nO1xyXG4gICAgICAgICAgICAgICAgICAgIGljb25UeXBlID0gJ2Vycm9yJztcclxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9ICcjZGMzNTQ1JzsgLy9yZWRcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSAnc3VjY2Vzcyc6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbiA9PSBudWxsKSBpY29uID0gJ2JpLWNoZWNrLWNpcmNsZSc7XHJcbiAgICAgICAgICAgICAgICAgICAgaWNvblR5cGUgPSAnaW5mbyc7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSAnIzE5ODc1NCc7IC8vZ3JlZW5cclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSAnaW5mbyc6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbiA9PSBudWxsKSBpY29uID0gJ2JpLWluZm8tY2lyY2xlJztcclxuICAgICAgICAgICAgICAgICAgICBpY29uVHlwZSA9ICdlcnJvcic7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSAnIzBkNmVmZCc7IC8vYmx1ZVxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbiA9PSBudWxsKSBpY29uID0gJ2JpLWV4Y2xhbWF0aW9uLXRyaWFuZ2xlLWZpbGwnO1xyXG4gICAgICAgICAgICAgICAgICAgIGljb25UeXBlID0gJ3dhcm5pbmcnO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gJyNmZmMxMDcnOyAvL3llbGxvd1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBzd2l0Y2goaWNvbikge1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnZGVsZXRlJzogaWNvbiA9ICdmYS1yZWd1bGFyIGZhLXRyYXNoLWNhbic7IGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBTd2FsLmZpcmUoe1xyXG4gICAgICAgICAgICAgICAgaWNvbjogaWNvblR5cGUsXHJcbiAgICAgICAgICAgICAgICBpY29uQ29sb3I6ICd0cmFuc3BhcmVudCcsXHJcbiAgICAgICAgICAgICAgICBpY29uSHRtbDogYDxpIGNsYXNzPVwiJHtpY29ufVwiIHN0eWxlPVwiY29sb3I6ICR7Y29sb3J9O1wiPjwvaT5gLFxyXG4gICAgICAgICAgICAgICAgaHRtbDogbWVzc2FnZSxcclxuICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICdZZXMnLFxyXG4gICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvbkNvbG9yOiBjb2xvcixcclxuICAgICAgICAgICAgICAgIGZvY3VzQ29uZmlybTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHNob3dEZW55QnV0dG9uOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgZGVueUJ1dHRvbkNvbG9yOiBjb2xvcixcclxuICAgICAgICAgICAgICAgIGZvY3VzRGVueTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICByZXZlcnNlQnV0dG9uczogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGFsbG93T3V0c2lkZUNsaWNrOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGFsbG93RXNjYXBlS2V5OiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGFsbG93RW50ZXJLZXk6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBjdXN0b21DbGFzczoge1xyXG4gICAgICAgICAgICAgICAgICAgIGRlbnlCdXR0b246ICdzd2VldC1hbGVydC1idXR0b24nLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b246ICdzd2VldC1hbGVydC1idXR0b24nXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pLnRoZW4oKHsgdmFsdWUgfSkgPT4gc2V0VGltZW91dCgoKSA9PiBSZXNvbHZlKHZhbHVlKSkpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByaXZhdGUgU2V0SWNvbihlbGVtZW50OiBIVE1MRWxlbWVudCwgaWNvbjogc3RyaW5nKTogdm9pZCB7XHJcbiAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIFsuLi5lbGVtZW50LmNsYXNzTGlzdC52YWx1ZS5zcGxpdCgnICcpXSkge1xyXG4gICAgICAgICAgICBpZiAoaXRlbS5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoaXRlbSk7XHJcbiAgICAgICAgICAgICAgICBlbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoJ3EnKTtcclxuICAgIC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V0ZSgnZGF0YS1icy1hdXRvaGlkZScsICdmYWxzZScpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByaXZhdGUgR2V0SWNvbih0aXRsZTogc3RyaW5nLCBpY29uOiBzdHJpbmcgfCBudWxsLCBpY29uRGVmYXVsdDogc3RyaW5nKTogc3RyaW5nIHtcclxuICAgICAgICBpZiAoaWNvbiA9PSBudWxsIHx8IGljb24gPT0gJycpIHtcclxuICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlQWxsKCcgJywgJycpLnRvVXBwZXJDYXNlKCk7XHJcblxyXG4gICAgICAgICAgICBzd2l0Y2godGl0bGUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgJ0VOQUJMRUQnOiByZXR1cm4gJ2ZhLXNvbGlkIGZhLXRodW1icy11cCBmYS1mbGlwLWhvcml6b250YWwnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnQUNUSVZFJzogcmV0dXJuICdmYS1zb2xpZCBmYS10aHVtYnMtdXAgZmEtZmxpcC1ob3Jpem9udGFsJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJ0FDVElWRUQnOiByZXR1cm4gJ2ZhLXNvbGlkIGZhLXRodW1icy11cCBmYS1mbGlwLWhvcml6b250YWwnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnRElTQUJMRSc6IHJldHVybiAnZmEtc29saWQgZmEtdGh1bWJzLWRvd24gZmEtZmxpcC1ob3Jpem9udGFsJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJ0RJU0FCTEVEJzogcmV0dXJuICdmYS1zb2xpZCBmYS10aHVtYnMtZG93biBmYS1mbGlwLWhvcml6b250YWwnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnREVMRVRFJzogcmV0dXJuICdmYS1yZWd1bGFyIGZhLXRyYXNoLWNhbic7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdERUxFVEVEJzogcmV0dXJuICdmYS1yZWd1bGF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