@sarafapp/iron_core 1.0.17
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/dist/IronCore.js +2469 -0
- package/dist/IronCore.umd.cjs +2 -0
- package/dist/index.d.ts +29 -0
- package/dist/src/BaseModel.d.ts +45 -0
- package/dist/src/Utils.d.ts +4 -0
- package/dist/src/accessHandling/AccessControl.d.ts +10 -0
- package/dist/src/accessHandling/AccessLevel.d.ts +13 -0
- package/dist/src/accessHandling/Accessible.d.ts +3 -0
- package/dist/src/accessHandling/EveryDirectiveAccess.d.ts +4 -0
- package/dist/src/accessHandling/SSO/AuthorizationDirective.d.ts +17 -0
- package/dist/src/accessHandling/SSO/AuthorizationService.d.ts +17 -0
- package/dist/src/accessHandling/SSO/EveryLevelAuthorizationDirective.d.ts +4 -0
- package/dist/src/accessHandling/SSO/SomeLevelsAuthorizationDirective.d.ts +4 -0
- package/dist/src/accessHandling/SomeDirectiveAccess.d.ts +4 -0
- package/dist/src/accessHandling/index.d.ts +9 -0
- package/dist/src/baseDirective/BeforeMountDirective.d.ts +3 -0
- package/dist/src/baseDirective/BeforeUnMountDirective.d.ts +3 -0
- package/dist/src/baseDirective/BeforeUpdateDirective.d.ts +3 -0
- package/dist/src/baseDirective/CreatedDirective.d.ts +3 -0
- package/dist/src/baseDirective/MountedDirective.d.ts +3 -0
- package/dist/src/baseDirective/UnMountedDirective.d.ts +3 -0
- package/dist/src/baseDirective/UpdateDirective.d.ts +3 -0
- package/dist/src/baseDirective/index.d.ts +7 -0
- package/dist/src/baseForm/FormManager.d.ts +17 -0
- package/dist/src/baseForm/InputControl.d.ts +36 -0
- package/dist/src/baseForm/InputControlBuilder.d.ts +14 -0
- package/dist/src/baseForm/InputControlData.d.ts +13 -0
- package/dist/src/baseForm/TouchSensitiveForm.d.ts +9 -0
- package/dist/src/baseForm/UseForm.d.ts +5 -0
- package/dist/src/baseForm/index.d.ts +6 -0
- package/dist/src/baseSchedule/Schedule.d.ts +3 -0
- package/dist/src/baseSchedule/Scheduler.d.ts +8 -0
- package/dist/src/baseSchedule/index.d.ts +2 -0
- package/dist/src/baseTable/BaseTable.d.ts +46 -0
- package/dist/src/baseTable/Constants.d.ts +12 -0
- package/dist/src/baseTable/OnDestory.d.ts +3 -0
- package/dist/src/baseTable/RowActionSource.d.ts +4 -0
- package/dist/src/baseTable/RowClick.d.ts +3 -0
- package/dist/src/baseTable/RowDoubleClick.d.ts +3 -0
- package/dist/src/baseTable/RowMetaClick.d.ts +3 -0
- package/dist/src/baseTable/SelectableTable.d.ts +19 -0
- package/dist/src/baseTable/TableAction.d.ts +8 -0
- package/dist/src/baseTable/TableHeaderSchema.d.ts +27 -0
- package/dist/src/baseTable/TableLoader.d.ts +3 -0
- package/dist/src/baseTable/TablePaginate.d.ts +3 -0
- package/dist/src/baseTable/TableService.d.ts +9 -0
- package/dist/src/baseTable/TableSort.d.ts +4 -0
- package/dist/src/baseTable/TableSummarySchema.d.ts +9 -0
- package/dist/src/baseTable/index.d.ts +15 -0
- package/dist/src/baseTable/moduleConnection/Action.d.ts +3 -0
- package/dist/src/baseTable/moduleConnection/Column.d.ts +3 -0
- package/dist/src/baseTable/moduleConnection/Table.d.ts +4 -0
- package/dist/src/baseTable/moduleConnection/TableDestroy.d.ts +2 -0
- package/dist/src/baseTable/moduleConnection/TableRowClick.d.ts +2 -0
- package/dist/src/composables/UseCrud.d.ts +10 -0
- package/dist/src/composables/UseData.d.ts +14 -0
- package/dist/src/composables/UseLoadingStatus.d.ts +15 -0
- package/dist/src/composables/UseParams.d.ts +15 -0
- package/dist/src/composables/UseRepository.d.ts +63 -0
- package/dist/src/composables/UseStaticTableService.d.ts +4 -0
- package/dist/src/composables/index.d.ts +6 -0
- package/dist/src/constants/Constants.d.ts +108 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/crudService/CrudService.d.ts +22 -0
- package/dist/src/crudService/index.d.ts +1 -0
- package/dist/src/dateHandling/Constants.d.ts +5 -0
- package/dist/src/dateHandling/Converter.d.ts +5 -0
- package/dist/src/dateHandling/JalaliDateSetup.d.ts +1 -0
- package/dist/src/dateHandling/Model.d.ts +12 -0
- package/dist/src/dateHandling/Utils.d.ts +8 -0
- package/dist/src/dateHandling/index.d.ts +5 -0
- package/dist/src/debounce/DebounceAction.d.ts +4 -0
- package/dist/src/debounce/DebounceService.d.ts +9 -0
- package/dist/src/debounce/index.d.ts +2 -0
- package/dist/src/deviceManagement/Constants.d.ts +4 -0
- package/dist/src/deviceManagement/Visibility.d.ts +4 -0
- package/dist/src/deviceManagement/VisibilityManager.d.ts +6 -0
- package/dist/src/deviceManagement/index.d.ts +3 -0
- package/dist/src/errorHandling/ErrorHandler.d.ts +3 -0
- package/dist/src/errorHandling/HandleError.d.ts +2 -0
- package/dist/src/errorHandling/index.d.ts +2 -0
- package/dist/src/feedbackHandling/FailureFeedback.d.ts +3 -0
- package/dist/src/feedbackHandling/Feedback.d.ts +11 -0
- package/dist/src/feedbackHandling/HandleFeedback.d.ts +2 -0
- package/dist/src/feedbackHandling/InfoFeedback.d.ts +3 -0
- package/dist/src/feedbackHandling/SuccessFeedback.d.ts +3 -0
- package/dist/src/feedbackHandling/WarningFeedback.d.ts +3 -0
- package/dist/src/feedbackHandling/index.d.ts +6 -0
- package/dist/src/httpClient/ApiBuilder.d.ts +14 -0
- package/dist/src/httpClient/ErrorHandlerRegistry.d.ts +10 -0
- package/dist/src/httpClient/HttpClient.d.ts +14 -0
- package/dist/src/httpClient/Interceptor.d.ts +4 -0
- package/dist/src/httpClient/index.d.ts +4 -0
- package/dist/src/initializer/ApplicationInitializer.d.ts +6 -0
- package/dist/src/initializer/Initializer.d.ts +3 -0
- package/dist/src/initializer/index.d.ts +2 -0
- package/dist/src/json/JsonMapper.d.ts +18 -0
- package/dist/src/json/index.d.ts +1 -0
- package/dist/src/layout/Constants.d.ts +10 -0
- package/dist/src/layout/DialogService.d.ts +1 -0
- package/dist/src/layout/DrawerService.d.ts +1 -0
- package/dist/src/layout/Toast.d.ts +8 -0
- package/dist/src/layout/index.d.ts +4 -0
- package/dist/src/lib/Constants.d.ts +20 -0
- package/dist/src/lib/Formatter.d.ts +10 -0
- package/dist/src/lib/Util.d.ts +11 -0
- package/dist/src/lib/index.d.ts +3 -0
- package/dist/src/observables/AbstractSubject.d.ts +7 -0
- package/dist/src/observables/BehaviorSubject.d.ts +15 -0
- package/dist/src/observables/Observer.d.ts +3 -0
- package/dist/src/observables/Subject.d.ts +6 -0
- package/dist/src/observables/index.d.ts +4 -0
- package/dist/src/process/Proccess.d.ts +9 -0
- package/dist/src/process/ProcessManager.d.ts +10 -0
- package/dist/src/process/index.d.ts +2 -0
- package/dist/src/repository/Params.d.ts +11 -0
- package/dist/src/repository/Repository.d.ts +38 -0
- package/dist/src/repository/SyncDetail.d.ts +5 -0
- package/dist/src/repository/index.d.ts +4 -0
- package/dist/src/repository/model.d.ts +5 -0
- package/dist/src/routeGuard/RouteGuard.d.ts +6 -0
- package/dist/src/routeGuard/index.d.ts +1 -0
- package/dist/src/search/client/ClientArraySearch.d.ts +4 -0
- package/dist/src/search/client/ClientSearch.d.ts +3 -0
- package/dist/src/search/index.d.ts +2 -0
- package/dist/src/sort/SortDetail.d.ts +6 -0
- package/dist/src/sort/client/Sorter.d.ts +6 -0
- package/dist/src/sort/index.d.ts +4 -0
- package/dist/src/sort/strategies/SimpleSort.d.ts +5 -0
- package/dist/src/sort/strategies/SortStrategy.d.ts +4 -0
- package/dist/src/types/Global.d.ts +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/validators/Validator.d.ts +4 -0
- package/dist/src/validators/index.d.ts +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +38 -0
package/dist/IronCore.js
ADDED
|
@@ -0,0 +1,2469 @@
|
|
|
1
|
+
import L from "dayjs";
|
|
2
|
+
import { toRaw as xe, reactive as Ne, ref as M, watch as Qe, computed as I, onBeforeUnmount as et } from "vue";
|
|
3
|
+
import { JsonConvert as tt, JsonProperty as N, JsonObject as Ae } from "json2typescript";
|
|
4
|
+
import { defineStore as Be } from "pinia";
|
|
5
|
+
var we = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(we || {}), Q = /* @__PURE__ */ ((t) => (t.FullDate = "jYYYY/jM/jD HH:mm", t.SimpleDate = "jYYYY/jM/jD", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(Q || {});
|
|
6
|
+
const st = [
|
|
7
|
+
{
|
|
8
|
+
62198619: {
|
|
9
|
+
persian: "بلو",
|
|
10
|
+
english: "blue"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
603799: {
|
|
15
|
+
persian: "بانک ملی ایران",
|
|
16
|
+
english: "melli"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
589210: {
|
|
21
|
+
persian: "بانک سپه",
|
|
22
|
+
english: "sepah"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
627648: {
|
|
27
|
+
persian: "بانک توسعه صادرات",
|
|
28
|
+
english: "export-development"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
627961: {
|
|
33
|
+
persian: "بانک صنعت و معدن",
|
|
34
|
+
english: "industry-mine"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
603770: {
|
|
39
|
+
persian: "بانک کشاورزی",
|
|
40
|
+
english: "agriculture"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
628023: {
|
|
45
|
+
persian: "بانک مسکن",
|
|
46
|
+
english: "housing"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
627760: {
|
|
51
|
+
persian: "پست بانک ایران",
|
|
52
|
+
english: "post"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
502908: {
|
|
57
|
+
persian: "بانک توسعه تعاون",
|
|
58
|
+
english: "development-cooperation"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
627412: {
|
|
63
|
+
persian: "بانک اقتصاد نوین",
|
|
64
|
+
english: "eghtesad-novin"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
622106: {
|
|
69
|
+
persian: "بانک پارسیان",
|
|
70
|
+
english: "parsian"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
502229: {
|
|
75
|
+
persian: "بانک پاسارگاد",
|
|
76
|
+
english: "pasargad"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
639599: {
|
|
81
|
+
persian: "بانک قوامین",
|
|
82
|
+
english: "ghavamin"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
627488: {
|
|
87
|
+
persian: "بانک کارآفرین",
|
|
88
|
+
english: "karafarin"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
621986: {
|
|
93
|
+
persian: "بانک سامان",
|
|
94
|
+
english: "saman"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
639346: {
|
|
99
|
+
persian: "بانک سینا",
|
|
100
|
+
english: "sina"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
639607: {
|
|
105
|
+
persian: "بانک سرمایه",
|
|
106
|
+
english: "sarmayeh"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
504706: {
|
|
111
|
+
persian: "بانک شهر",
|
|
112
|
+
english: "shahr"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
502806: {
|
|
117
|
+
persian: "بانک شهر",
|
|
118
|
+
english: "shahr"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
502938: {
|
|
123
|
+
persian: "بانک دی",
|
|
124
|
+
english: "day"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
603769: {
|
|
129
|
+
persian: "بانک صادرات",
|
|
130
|
+
english: "saderat"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
610433: {
|
|
135
|
+
persian: "بانک ملت",
|
|
136
|
+
english: "mellat"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
627353: {
|
|
141
|
+
persian: "بانک تجارت",
|
|
142
|
+
english: "tejarat"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
585983: {
|
|
147
|
+
persian: "بانک تجارت",
|
|
148
|
+
english: "tejarat"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
589463: {
|
|
153
|
+
persian: "بانک رفاه",
|
|
154
|
+
english: "refah"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
627381: {
|
|
159
|
+
persian: "بانک انصار",
|
|
160
|
+
english: "ansar"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
639370: {
|
|
165
|
+
persian: "بانک مهر اقتصاد",
|
|
166
|
+
english: "mehr-eqtesad"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
505801: {
|
|
171
|
+
persian: "موسسه اعتباری کوثر",
|
|
172
|
+
english: "kosar"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
606373: {
|
|
177
|
+
persian: "بانک قرض الحسنه مهرایرانیان",
|
|
178
|
+
english: "mehr"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
186214: {
|
|
183
|
+
persian: "بانک آینده",
|
|
184
|
+
english: "ayandeh"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
504172: {
|
|
189
|
+
persian: "بانک قرض الحسنه رسالت",
|
|
190
|
+
english: "resalat"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
505416: {
|
|
195
|
+
persian: "بانک گردشگری",
|
|
196
|
+
english: "tourism"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
505785: {
|
|
201
|
+
persian: "بانک ایرانزمین",
|
|
202
|
+
english: "iran-zamin"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
505809: {
|
|
207
|
+
persian: "بانک خاورمیانه",
|
|
208
|
+
english: "middle-east"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
585947: {
|
|
213
|
+
persian: "بانک خاورمیانه",
|
|
214
|
+
english: "middle-east"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
604932: {
|
|
219
|
+
persian: "بانک سپه",
|
|
220
|
+
english: "sepah"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
627961: {
|
|
225
|
+
persian: "بانک صنعت و معدن",
|
|
226
|
+
english: "industry-mine"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
636214: {
|
|
231
|
+
persian: "بانک آینده",
|
|
232
|
+
english: "ayandeh"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
636795: {
|
|
237
|
+
persian: "بانک مرکزی",
|
|
238
|
+
english: "markazi"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
636949: {
|
|
243
|
+
persian: "بانک حکمت ایرانیان",
|
|
244
|
+
english: "hekmat-iranian"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
639217: {
|
|
249
|
+
persian: "بانک کشاورزی",
|
|
250
|
+
english: "agriculture"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
], rt = [
|
|
254
|
+
{
|
|
255
|
+
"010": {
|
|
256
|
+
persian: "بانک مرکزی",
|
|
257
|
+
english: "markazi"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"011": {
|
|
262
|
+
persian: "بانک صنعت و معدن",
|
|
263
|
+
english: "industry-mine"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"012": {
|
|
268
|
+
persian: "بانک ملت",
|
|
269
|
+
english: "mellat"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"013": {
|
|
274
|
+
persian: "بانک رفاه",
|
|
275
|
+
english: "refah"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"014": {
|
|
280
|
+
persian: "بانک مسکن",
|
|
281
|
+
english: "housing"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"015": {
|
|
286
|
+
persian: "بانک سپه",
|
|
287
|
+
english: "sepah"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"016": {
|
|
292
|
+
persian: "بانک کشاورزی",
|
|
293
|
+
english: "agriculture"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"017": {
|
|
298
|
+
persian: "بانک ملّی ایران",
|
|
299
|
+
english: "melli"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"018": {
|
|
304
|
+
persian: "بانک تجارت",
|
|
305
|
+
english: "tejarat"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"019": {
|
|
310
|
+
persian: "بانک صادرات",
|
|
311
|
+
english: "saderat"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"020": {
|
|
316
|
+
persian: "بانک توسعه صادرات",
|
|
317
|
+
english: "export-development"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"021": {
|
|
322
|
+
persian: "پست بانک",
|
|
323
|
+
english: "post"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"053": {
|
|
328
|
+
persian: "بانک کارآفرین",
|
|
329
|
+
english: "karafarin"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"054": {
|
|
334
|
+
persian: "بانک پارسیان",
|
|
335
|
+
english: "parsian"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"055": {
|
|
340
|
+
persian: "بانک اقتصاد نوین",
|
|
341
|
+
english: "eghtesad-novin"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"056": {
|
|
346
|
+
persian: "بانک سامان",
|
|
347
|
+
english: "saman"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"057": {
|
|
352
|
+
persian: "بانک پاسارگاد",
|
|
353
|
+
english: "pasargad"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"058": {
|
|
358
|
+
persian: "بانک سرمایه",
|
|
359
|
+
english: "sarmayeh"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"059": {
|
|
364
|
+
persian: "بانک سینا",
|
|
365
|
+
english: "sina"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"060": {
|
|
370
|
+
persian: "بانک قرض الحسنه مهرایرانیان",
|
|
371
|
+
english: "mehr"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"061": {
|
|
376
|
+
persian: "بانک شهر",
|
|
377
|
+
english: "shahr"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"062": {
|
|
382
|
+
persian: "بانک آینده",
|
|
383
|
+
english: "ayandeh"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"065": {
|
|
388
|
+
persian: "بانک حکمت ایرانیان",
|
|
389
|
+
english: "hekmat-iranian"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"066": {
|
|
394
|
+
persian: "بانک دی",
|
|
395
|
+
english: "day"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"069": {
|
|
400
|
+
persian: "بانک ایران زمین",
|
|
401
|
+
english: "iran-zamin"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"070": {
|
|
406
|
+
persian: "بانک قرض الحسنه رسالت",
|
|
407
|
+
english: "resalat"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"078": {
|
|
412
|
+
persian: "بانک خاورمیانه",
|
|
413
|
+
english: "middle-east"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
];
|
|
417
|
+
var at = /* @__PURE__ */ ((t) => (t.Normal = "YYYY-MM-DD", t.ContainsHour = "YYYY-MM-DD HH:mm", t.OnlyHour = "HH:mm", t))(at || {});
|
|
418
|
+
function pe(t) {
|
|
419
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
420
|
+
}
|
|
421
|
+
var oe = { exports: {} }, nt = oe.exports, Ee;
|
|
422
|
+
function it() {
|
|
423
|
+
return Ee || (Ee = 1, function(t, e) {
|
|
424
|
+
(function(s, r) {
|
|
425
|
+
t.exports = r();
|
|
426
|
+
})(nt, function() {
|
|
427
|
+
return function(s, r) {
|
|
428
|
+
r.prototype.weekday = function(a) {
|
|
429
|
+
var n = this.$locale().weekStart || 0, i = this.$W, h = (i < n ? i + 7 : i) - n;
|
|
430
|
+
return this.$utils().u(a) ? h : this.subtract(h, "day").add(a, "day");
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
});
|
|
434
|
+
}(oe)), oe.exports;
|
|
435
|
+
}
|
|
436
|
+
var ot = it();
|
|
437
|
+
const lt = /* @__PURE__ */ pe(ot);
|
|
438
|
+
var le = { exports: {} }, ct = le.exports, Oe;
|
|
439
|
+
function ut() {
|
|
440
|
+
return Oe || (Oe = 1, function(t, e) {
|
|
441
|
+
(function(s, r) {
|
|
442
|
+
t.exports = r();
|
|
443
|
+
})(ct, function() {
|
|
444
|
+
var s = "week", r = "year";
|
|
445
|
+
return function(a, n, i) {
|
|
446
|
+
var h = n.prototype;
|
|
447
|
+
h.week = function(c) {
|
|
448
|
+
if (c === void 0 && (c = null), c !== null) return this.add(7 * (c - this.week()), "day");
|
|
449
|
+
var p = this.$locale().yearStart || 1;
|
|
450
|
+
if (this.month() === 11 && this.date() > 25) {
|
|
451
|
+
var f = i(this).startOf(r).add(1, r).date(p), u = i(this).endOf(s);
|
|
452
|
+
if (f.isBefore(u)) return 1;
|
|
453
|
+
}
|
|
454
|
+
var v = i(this).startOf(r).date(p).startOf(s).subtract(1, "millisecond"), g = this.diff(v, s, !0);
|
|
455
|
+
return g < 0 ? i(this).startOf("week").week() : Math.ceil(g);
|
|
456
|
+
}, h.weeks = function(c) {
|
|
457
|
+
return c === void 0 && (c = null), this.week(c);
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
});
|
|
461
|
+
}(le)), le.exports;
|
|
462
|
+
}
|
|
463
|
+
var ht = ut();
|
|
464
|
+
const dt = /* @__PURE__ */ pe(ht);
|
|
465
|
+
var ce = { exports: {} }, ft = ce.exports, ke;
|
|
466
|
+
function vt() {
|
|
467
|
+
return ke || (ke = 1, function(t, e) {
|
|
468
|
+
(function(s, r) {
|
|
469
|
+
t.exports = r();
|
|
470
|
+
})(ft, function() {
|
|
471
|
+
return function(s, r) {
|
|
472
|
+
r.prototype.weekYear = function() {
|
|
473
|
+
var a = this.month(), n = this.week(), i = this.year();
|
|
474
|
+
return n === 1 && a === 11 ? i + 1 : a === 0 && n >= 52 ? i - 1 : i;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
});
|
|
478
|
+
}(ce)), ce.exports;
|
|
479
|
+
}
|
|
480
|
+
var mt = vt();
|
|
481
|
+
const pt = /* @__PURE__ */ pe(mt);
|
|
482
|
+
var ue = { exports: {} }, gt = ue.exports, Te;
|
|
483
|
+
function yt() {
|
|
484
|
+
return Te || (Te = 1, function(t, e) {
|
|
485
|
+
(function(s, r) {
|
|
486
|
+
t.exports = r(L);
|
|
487
|
+
})(gt, function(s) {
|
|
488
|
+
function r(i) {
|
|
489
|
+
return i && typeof i == "object" && "default" in i ? i : { default: i };
|
|
490
|
+
}
|
|
491
|
+
var a = r(s), n = { name: "fa", weekdays: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysShort: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"), weekStart: 6, months: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), monthsShort: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), ordinal: function(i) {
|
|
492
|
+
return i;
|
|
493
|
+
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm" }, relativeTime: { future: "در %s", past: "%s پیش", s: "چند ثانیه", m: "یک دقیقه", mm: "%d دقیقه", h: "یک ساعت", hh: "%d ساعت", d: "یک روز", dd: "%d روز", M: "یک ماه", MM: "%d ماه", y: "یک سال", yy: "%d سال" } };
|
|
494
|
+
return a.default.locale(n, null, !0), n;
|
|
495
|
+
});
|
|
496
|
+
}(ue)), ue.exports;
|
|
497
|
+
}
|
|
498
|
+
var St = yt();
|
|
499
|
+
const It = /* @__PURE__ */ pe(St);
|
|
500
|
+
function ne(t, e) {
|
|
501
|
+
return wt(t) || Dt(t, e) || At();
|
|
502
|
+
}
|
|
503
|
+
function wt(t) {
|
|
504
|
+
if (Array.isArray(t)) return t;
|
|
505
|
+
}
|
|
506
|
+
function Dt(t, e) {
|
|
507
|
+
var s = [], r = !0, a = !1, n = void 0;
|
|
508
|
+
try {
|
|
509
|
+
for (var i = t[Symbol.iterator](), h; !(r = (h = i.next()).done) && (s.push(h.value), !(e && s.length === e)); r = !0)
|
|
510
|
+
;
|
|
511
|
+
} catch (c) {
|
|
512
|
+
a = !0, n = c;
|
|
513
|
+
} finally {
|
|
514
|
+
try {
|
|
515
|
+
!r && i.return != null && i.return();
|
|
516
|
+
} finally {
|
|
517
|
+
if (a) throw n;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return s;
|
|
521
|
+
}
|
|
522
|
+
function At() {
|
|
523
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
524
|
+
}
|
|
525
|
+
function Ue(t, e, s) {
|
|
526
|
+
e <= 2 && (t -= 1, e += 12);
|
|
527
|
+
var r = Math.floor(t / 100), a = 2 - r + Math.floor(r / 4), n = Math.floor(365.25 * (t + 4716)) + Math.floor(30.6001 * (e + 1)) + s + a - 1524.5;
|
|
528
|
+
return n;
|
|
529
|
+
}
|
|
530
|
+
function _t(t) {
|
|
531
|
+
t = t + 0.5;
|
|
532
|
+
var e = Math.floor(t), s = t - e, r = e;
|
|
533
|
+
if (e >= 2299161) {
|
|
534
|
+
var a = Math.floor((e - 186721625e-2) / 36524.25);
|
|
535
|
+
r = e + 1 + a - Math.floor(a / 4);
|
|
536
|
+
}
|
|
537
|
+
var n = r + 1524, i = Math.floor((n - 122.1) / 365.25), h = Math.floor(365.25 * i), c = Math.floor((n - h) / 30.6001), p = n - h - Math.floor(30.6001 * c) + s, f = c < 14 ? c - 1 : c - 13, u = f > 2 ? i - 4716 : i - 4715;
|
|
538
|
+
return Rt(u, f, p);
|
|
539
|
+
}
|
|
540
|
+
function bt(t) {
|
|
541
|
+
t = t + 0.5;
|
|
542
|
+
var e = Math.floor(t), s = t - e, r = e;
|
|
543
|
+
if (e >= 2299161) {
|
|
544
|
+
var a = Math.floor((e - 186721625e-2) / 36524.25);
|
|
545
|
+
r = e + 1 + a - Math.floor(a / 4);
|
|
546
|
+
}
|
|
547
|
+
var n = r + 1524, i = Math.floor((n - 122.1) / 365.25), h = Math.floor(365.25 * i), c = Math.floor((n - h) / 30.6001), p = n - h - Math.floor(30.6001 * c) + s, f = c < 14 ? c - 1 : c - 13, u = f > 2 ? i - 4716 : i - 4715;
|
|
548
|
+
return [Math.floor(u), Math.floor(f), Math.floor(p)];
|
|
549
|
+
}
|
|
550
|
+
function Mt(t, e, s) {
|
|
551
|
+
var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
552
|
+
function n(g, D) {
|
|
553
|
+
return Math.floor(g / D);
|
|
554
|
+
}
|
|
555
|
+
t -= 979;
|
|
556
|
+
for (var i = 365 * t + n(t, 33) * 8 + n(t % 33 + 3, 4), h = 0; h < e - 1; ++h)
|
|
557
|
+
i += a[h];
|
|
558
|
+
i += s - 1;
|
|
559
|
+
var c = i + 79, p = 1600 + 400 * n(c, 146097);
|
|
560
|
+
c = c % 146097;
|
|
561
|
+
var f = !0;
|
|
562
|
+
for (c >= 36525 && (c--, p += 100 * n(c, 36524), c = c % 36524, c >= 365 ? c++ : f = !1), p += 4 * n(c, 1461), c %= 1461, c >= 366 && (f = !1, c--, p += n(c, 365), c = c % 365), h = 0; c >= r[h] + (h == 1 && f); h++)
|
|
563
|
+
c -= r[h] + (h == 1 && f);
|
|
564
|
+
var u = h + 1, v = c + 1;
|
|
565
|
+
return Ue(p, u, v);
|
|
566
|
+
}
|
|
567
|
+
function Rt(t, e, s) {
|
|
568
|
+
var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
569
|
+
function n(V, H) {
|
|
570
|
+
return Math.floor(V / H);
|
|
571
|
+
}
|
|
572
|
+
for (var i = t - 1600, h = e - 1, c = s - 1, p = 365 * i + n(i + 3, 4) - n(i + 99, 100) + n(i + 399, 400), f = 0; f < h; ++f)
|
|
573
|
+
p += r[f];
|
|
574
|
+
h > 1 && (t % 4 == 0 && t % 100 != 0 || t % 400 == 0) && p++, p += c;
|
|
575
|
+
var u = p - 79, v = n(u, 12053);
|
|
576
|
+
u %= 12053;
|
|
577
|
+
var g = 979 + 33 * v + 4 * n(u, 1461);
|
|
578
|
+
u %= 1461, u >= 366 && (g += n(u - 1, 365), u = (u - 1) % 365);
|
|
579
|
+
for (var D = 0; D < 11 && u >= a[D]; ++D)
|
|
580
|
+
u -= a[D];
|
|
581
|
+
var B = D + 1, U = u + 1;
|
|
582
|
+
return [g, B, U];
|
|
583
|
+
}
|
|
584
|
+
var ie = {
|
|
585
|
+
J: function(e, s, r) {
|
|
586
|
+
return _t(Ue(e, s, r));
|
|
587
|
+
},
|
|
588
|
+
G: function(e, s, r) {
|
|
589
|
+
return bt(Mt(e, s, r));
|
|
590
|
+
}
|
|
591
|
+
}, Ct = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, Lt = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Ie = "date", J = "day", O = "month", k = "year", $e = "week", xt = "YYYY-MM-DDTHH:mm:ssZ", Et = {
|
|
592
|
+
jmonths: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")
|
|
593
|
+
}, Ot = function(t, e, s) {
|
|
594
|
+
var r = e.prototype, a = r.$utils(), n = function(l) {
|
|
595
|
+
return l.$C === "jalali";
|
|
596
|
+
}, i = a.prettyUnit || a.p, h = a.isUndefined || a.u, c = a.padStart || a.s, p = a.monthDiff || a.m, f = a.absFloor || a.a, u = function(l) {
|
|
597
|
+
return function() {
|
|
598
|
+
var d = l.bind(this).apply(void 0, arguments);
|
|
599
|
+
return d.$C = this.$C, d.isJalali() && d.InitJalali(), d;
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
r.startOf = u(r.startOf), r.endOf = u(r.endOf), r.add = u(r.add), r.subtract = u(r.subtract), r.set = u(r.set);
|
|
603
|
+
var v = r.parse, g = r.init, D = r.startOf, B = r.$set, U = r.add, V = r.format, H = r.diff, ge = r.year, ye = r.month, te = r.date, Se = r.daysInMonth, K = r.toArray;
|
|
604
|
+
s.$C = "gregory", s.$fdow = 6, s.calendar = function(o) {
|
|
605
|
+
return s.$C = o, s;
|
|
606
|
+
}, r.calendar = function(o) {
|
|
607
|
+
var l = this.clone();
|
|
608
|
+
return l.$C = o, l.isJalali() && l.InitJalali(), l;
|
|
609
|
+
}, r.isJalali = function() {
|
|
610
|
+
return n(this);
|
|
611
|
+
}, s.en.jmonths = "Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"), s.locale("fa", Object.assign({}, It, {}, Et), !0);
|
|
612
|
+
var q = function(l, d) {
|
|
613
|
+
return s(l, {
|
|
614
|
+
locale: d.$L,
|
|
615
|
+
utc: d.$u,
|
|
616
|
+
calendar: d.$C
|
|
617
|
+
});
|
|
618
|
+
};
|
|
619
|
+
r.init = function() {
|
|
620
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
621
|
+
g.bind(this)(o), this.isJalali() && this.InitJalali();
|
|
622
|
+
}, r.parse = function(o) {
|
|
623
|
+
var l;
|
|
624
|
+
if (this.$C = o.calendar || this.$C || s.$C, o.jalali && typeof o.date == "string" && /.*[^Z]$/i.test(o.date) && (l = o.date.match(Ct))) {
|
|
625
|
+
var d = ie.G(parseInt(l[1], 10), parseInt(l[2], 10), parseInt(l[3] || 1, 10)), S = ne(d, 3), w = S[0], y = S[1], A = S[2];
|
|
626
|
+
o.date = "".concat(w, "-").concat(y, "-").concat(A).concat(l[4] || "");
|
|
627
|
+
}
|
|
628
|
+
return v.bind(this)(o);
|
|
629
|
+
}, r.InitJalali = function() {
|
|
630
|
+
var o = ie.J(this.$y, this.$M + 1, this.$D), l = ne(o, 3), d = l[0], S = l[1], w = l[2];
|
|
631
|
+
this.$jy = d, this.$jM = S - 1, this.$jD = w;
|
|
632
|
+
}, r.startOf = function(o, l) {
|
|
633
|
+
var d = this;
|
|
634
|
+
if (!n(this))
|
|
635
|
+
return D.bind(this)(o, l);
|
|
636
|
+
var S = h(l) ? !0 : l, w = i(o), y = function(z, x) {
|
|
637
|
+
var C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.$jy, re = ie.G(C, x + 1, z), E = ne(re, 3), X = E[0], ae = E[1], Xe = E[2], Le = q(new Date(X, ae - 1, Xe), d);
|
|
638
|
+
return (S ? Le : Le.endOf(J)).$set("hour", 1);
|
|
639
|
+
}, A = (this.$W + (7 - s.$fdow)) % 7;
|
|
640
|
+
switch (w) {
|
|
641
|
+
case k:
|
|
642
|
+
return S ? y(1, 0) : y(0, 0, this.$jy + 1);
|
|
643
|
+
case O:
|
|
644
|
+
return S ? y(1, this.$jM) : y(0, (this.$jM + 1) % 12, this.$jy + parseInt((this.$jM + 1) / 12, 10));
|
|
645
|
+
case $e:
|
|
646
|
+
return S ? y(this.$jD - A, this.$jM) : y(this.$jD + (6 - A), this.$jM);
|
|
647
|
+
default:
|
|
648
|
+
return D.bind(this)(o, l);
|
|
649
|
+
}
|
|
650
|
+
}, r.$set = function(o, l) {
|
|
651
|
+
var d = this;
|
|
652
|
+
if (!n(this))
|
|
653
|
+
return B.bind(this)(o, l);
|
|
654
|
+
var S = i(o), w = function(A, se) {
|
|
655
|
+
var z = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.$jy, x = ie.G(z, se + 1, A), C = ne(x, 3), re = C[0], E = C[1], X = C[2];
|
|
656
|
+
return d.$d.setFullYear(re), d.$d.setMonth(E - 1), d.$d.setDate(X), d;
|
|
657
|
+
};
|
|
658
|
+
switch (S) {
|
|
659
|
+
case Ie:
|
|
660
|
+
case J:
|
|
661
|
+
w(l, this.$jM);
|
|
662
|
+
break;
|
|
663
|
+
case O:
|
|
664
|
+
w(this.$jD, l);
|
|
665
|
+
break;
|
|
666
|
+
case k:
|
|
667
|
+
w(this.$jD, this.$jM, l);
|
|
668
|
+
break;
|
|
669
|
+
default:
|
|
670
|
+
return B.bind(this)(o, l);
|
|
671
|
+
}
|
|
672
|
+
return this.init(), this;
|
|
673
|
+
}, r.add = function(o, l) {
|
|
674
|
+
var d = this;
|
|
675
|
+
if (!n(this))
|
|
676
|
+
return U.bind(this)(o, l);
|
|
677
|
+
o = Number(o);
|
|
678
|
+
var S = l && (l.length === 1 || l === "ms") ? l : i(l), w = function(E, X) {
|
|
679
|
+
var ae = d.set(Ie, 1).set(E, X + o);
|
|
680
|
+
return ae.set(Ie, Math.min(d.$jD, ae.daysInMonth()));
|
|
681
|
+
};
|
|
682
|
+
if (["M", O].indexOf(S) > -1) {
|
|
683
|
+
var y = this.$jM + o, A = y < 0 ? -Math.ceil(-y / 12) : Math.floor(y / 12), se = this.$jD, z = this.set(J, 1).add(A, k).set(O, y - A * 12);
|
|
684
|
+
return z.set(J, Math.min(z.daysInMonth(), se));
|
|
685
|
+
}
|
|
686
|
+
if (["y", k].indexOf(S) > -1)
|
|
687
|
+
return w(k, this.$jy);
|
|
688
|
+
if (["d", J].indexOf(S) > -1) {
|
|
689
|
+
var x = new Date(this.$d);
|
|
690
|
+
return x.setDate(x.getDate() + o), q(x, this);
|
|
691
|
+
}
|
|
692
|
+
if (["w", $e].indexOf(S) > -1) {
|
|
693
|
+
var C = new Date(this.$d);
|
|
694
|
+
return C.setDate(C.getDate() + o * 7), q(C, this);
|
|
695
|
+
}
|
|
696
|
+
return U.bind(this)(o, l);
|
|
697
|
+
}, r.format = function(o, l) {
|
|
698
|
+
var d = this;
|
|
699
|
+
if (!n(this))
|
|
700
|
+
return V.bind(this)(o, l);
|
|
701
|
+
var S = o || xt, w = l || this.$locale(), y = w.jmonths;
|
|
702
|
+
return S.replace(Lt, function(A) {
|
|
703
|
+
if (A.indexOf("[") > -1) return A.replace(/\[|\]/g, "");
|
|
704
|
+
switch (A) {
|
|
705
|
+
case "YY":
|
|
706
|
+
return String(d.$jy).slice(-2);
|
|
707
|
+
case "YYYY":
|
|
708
|
+
return String(d.$jy);
|
|
709
|
+
case "M":
|
|
710
|
+
return String(d.$jM + 1);
|
|
711
|
+
case "MM":
|
|
712
|
+
return c(d.$jM + 1, 2, "0");
|
|
713
|
+
case "MMM":
|
|
714
|
+
return y[d.$jM].slice(0, 3);
|
|
715
|
+
case "MMMM":
|
|
716
|
+
return y[d.$jM];
|
|
717
|
+
case "D":
|
|
718
|
+
return String(d.$jD);
|
|
719
|
+
case "DD":
|
|
720
|
+
return c(d.$jD, 2, "0");
|
|
721
|
+
default:
|
|
722
|
+
return V.bind(d)(A, l);
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
}, r.diff = function(o, l, d) {
|
|
726
|
+
if (!n(this))
|
|
727
|
+
return H.bind(this)(o, l, d);
|
|
728
|
+
var S = i(l), w = s(o), y = p(this, w);
|
|
729
|
+
switch (S) {
|
|
730
|
+
case k:
|
|
731
|
+
y /= 12;
|
|
732
|
+
break;
|
|
733
|
+
case O:
|
|
734
|
+
break;
|
|
735
|
+
default:
|
|
736
|
+
return H.bind(this)(o, l, d);
|
|
737
|
+
}
|
|
738
|
+
return d ? y : f(y);
|
|
739
|
+
}, r.$g = function(o, l, d) {
|
|
740
|
+
return h(o) ? this[l] : this.set(d, o);
|
|
741
|
+
}, r.year = function(o) {
|
|
742
|
+
return n(this) ? this.$g(o, "$jy", k) : ge.bind(this)(o);
|
|
743
|
+
}, r.month = function(o) {
|
|
744
|
+
return n(this) ? this.$g(o, "$jM", O) : ye.bind(this)(o);
|
|
745
|
+
}, r.date = function(o) {
|
|
746
|
+
return n(this) ? this.$g(o, "$jD", J) : te.bind(this)(o);
|
|
747
|
+
}, r.daysInMonth = function() {
|
|
748
|
+
return n(this) ? this.endOf(O).$jD : Se.bind(this)();
|
|
749
|
+
}, K && (r.toArray = function() {
|
|
750
|
+
return n(this) ? [this.$jy, this.$jM, this.$jD, this.$H, this.$m, this.$s, this.$ms] : K.bind(this)();
|
|
751
|
+
}), r.clone = function() {
|
|
752
|
+
return q(this.toDate(), this);
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
const kt = {
|
|
756
|
+
ordinal(t) {
|
|
757
|
+
},
|
|
758
|
+
relativeTime: void 0,
|
|
759
|
+
name: "fa",
|
|
760
|
+
weekdays: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),
|
|
761
|
+
weekdaysShort: "ی_د_س_چ_پ_ج_ش".split("_"),
|
|
762
|
+
weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"),
|
|
763
|
+
months: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split(
|
|
764
|
+
"_"
|
|
765
|
+
),
|
|
766
|
+
monthsShort: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split(
|
|
767
|
+
"_"
|
|
768
|
+
),
|
|
769
|
+
weekStart: 6,
|
|
770
|
+
formats: {
|
|
771
|
+
L: "YYYY/MM/DD",
|
|
772
|
+
LL: "D MMMM YYYY",
|
|
773
|
+
LLL: "D MMMM YYYY HH:mm",
|
|
774
|
+
LLLL: "dddd, D MMMM YYYY HH:mm"
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
function Tt() {
|
|
778
|
+
L.extend(Ot), L.calendar("jalali"), L.extend(lt), L.extend(dt), L.extend(pt), L.locale(kt, {}, !0);
|
|
779
|
+
}
|
|
780
|
+
class es {
|
|
781
|
+
constructor(e, s) {
|
|
782
|
+
this.start = e, this.end = s;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
class ts {
|
|
786
|
+
constructor(e, s, r) {
|
|
787
|
+
this.maxDate = e, this.minDate = s, this.disabledDates = r;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
class G {
|
|
791
|
+
static standardToUnix(e) {
|
|
792
|
+
return Math.floor(new Date(e).getTime() / 1e3);
|
|
793
|
+
}
|
|
794
|
+
static unixToStandard(e) {
|
|
795
|
+
return new Date(e * 1e3).toString();
|
|
796
|
+
}
|
|
797
|
+
static getUnixEndOfDayInUnix(e) {
|
|
798
|
+
return L.unix(e).endOf("day").unix();
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
class he {
|
|
802
|
+
static isDateDisabled(e, s) {
|
|
803
|
+
for (const r of e.disabledDates)
|
|
804
|
+
if (he.areUnixesInSameDate(r, s.unix())) return !0;
|
|
805
|
+
return !!(e.maxDate && he.isDateGraterOrSame(e.maxDate, s.unix()) || e.minDate && he.isDateLowerOrSame(e.minDate, s.unix()));
|
|
806
|
+
}
|
|
807
|
+
static areUnixesInSameDate(e, s) {
|
|
808
|
+
return G.getUnixEndOfDayInUnix(e) === G.getUnixEndOfDayInUnix(s);
|
|
809
|
+
}
|
|
810
|
+
static isDateGraterOrSame(e, s) {
|
|
811
|
+
return G.getUnixEndOfDayInUnix(s) >= G.getUnixEndOfDayInUnix(e);
|
|
812
|
+
}
|
|
813
|
+
static isDateLowerOrSame(e, s) {
|
|
814
|
+
return G.getUnixEndOfDayInUnix(s) <= G.getUnixEndOfDayInUnix(e);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
Tt();
|
|
818
|
+
class b {
|
|
819
|
+
static toCurrency(e, s) {
|
|
820
|
+
return e.toLocaleString("en-US", s);
|
|
821
|
+
}
|
|
822
|
+
static toCurrencyWithDotSeparator(e) {
|
|
823
|
+
return b.toCurrency(e).replaceAll(",", ".");
|
|
824
|
+
}
|
|
825
|
+
static applyMask(e, s) {
|
|
826
|
+
let r = "", a = 0, n = 0;
|
|
827
|
+
for (; a < e.length; ) {
|
|
828
|
+
if (e[a] === "#") {
|
|
829
|
+
if (n >= s.length)
|
|
830
|
+
throw new Error("Value length does not match the format.");
|
|
831
|
+
r += s[n], n++;
|
|
832
|
+
} else
|
|
833
|
+
r += e[a];
|
|
834
|
+
a++;
|
|
835
|
+
}
|
|
836
|
+
if (n !== s.length)
|
|
837
|
+
throw new Error("Value length does not match the format.");
|
|
838
|
+
return r;
|
|
839
|
+
}
|
|
840
|
+
static applyBankCardMask(e) {
|
|
841
|
+
return b.applyMask(we.BankCard, String(e));
|
|
842
|
+
}
|
|
843
|
+
static applyIbanMask(e) {
|
|
844
|
+
return b.applyMask(we.Iban, String(e));
|
|
845
|
+
}
|
|
846
|
+
static toEnglishDigits(e) {
|
|
847
|
+
const s = ["۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹", "۰"], r = ["١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩", "٠"], a = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
|
848
|
+
return e.split("").map(
|
|
849
|
+
(n) => a[s.indexOf(n)] || a[r.indexOf(n)] || n
|
|
850
|
+
).join("");
|
|
851
|
+
}
|
|
852
|
+
static mapUnixToDate(e, s) {
|
|
853
|
+
return L(new Date(e)).subtract(1, "day").format(s);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
var m = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(m || {}), T = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(T || {}), Y = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(Y || {}), $t = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))($t || {}), _e = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))(_e || {}), be = /* @__PURE__ */ ((t) => (t.Text = "text", t))(be || {}), Me = /* @__PURE__ */ ((t) => (t.Text = "text", t.ACTION = "action", t.Tag = "tag", t.Iban = "iban", t.BankCard = "bankCard", t.Symbol = "symbol", t.TradeDetail = "tradeDetail", t.SymbolPrice = "symbolPrice", t.TradeSymbol = "tradeSymbol", t.Price = "price", t.DynamicCurrencyPrice = "dynamicCurrencyPrice", t.TradeDate = "tradeDate", t.RequestResponseIdentity = "requestResponseIdentity", t.Image = "image", t))(Me || {}), Ve = /* @__PURE__ */ ((t) => (t[t.MINIMAL_LOADABLE_HEADER_COUNT = 0] = "MINIMAL_LOADABLE_HEADER_COUNT", t[t.DEFAULT_ITEM_COUNT_PER_PAGE = 20] = "DEFAULT_ITEM_COUNT_PER_PAGE", t.PAGINATION_POSITION = "bottomCenter", t))(Ve || {}), Re = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Re || {}), ee = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(ee || {}), Pt = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(Pt || {}), de = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(de || {}), j = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(j || {}), Re = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Re || {}), Ce = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(Ce || {});
|
|
857
|
+
class W {
|
|
858
|
+
static getBankImageBaseOnCardInfo(e, s) {
|
|
859
|
+
return e === void 0 ? "/img/banks/shetab.png" : s === "IBAN" ? (e = b.toEnglishDigits(
|
|
860
|
+
e.replace(/IR/g, "").split(" ").join("")
|
|
861
|
+
), `/img/banks/${W.iban(e).english}.png`) : (e = b.toEnglishDigits(
|
|
862
|
+
e.replace(/ /g, "")
|
|
863
|
+
), `/img/banks/${W.card(e).english}.png`);
|
|
864
|
+
}
|
|
865
|
+
static card(e) {
|
|
866
|
+
const s = { persian: "نامشخص", english: "shetab" };
|
|
867
|
+
if (e == null) return s;
|
|
868
|
+
e = e.substring(0, 6);
|
|
869
|
+
try {
|
|
870
|
+
const r = st.find((a) => Object.keys(a)[0] === e);
|
|
871
|
+
return r === void 0 ? s : Object.values(r)[0];
|
|
872
|
+
} catch {
|
|
873
|
+
return s;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
// Args: number -> string
|
|
877
|
+
// Returns: Object { persian: "string", english: "string" } || {}
|
|
878
|
+
static iban(e) {
|
|
879
|
+
const s = { persian: "نامشخص", english: "shetab" };
|
|
880
|
+
if (e == null) return s;
|
|
881
|
+
e = e.substring(2, 5);
|
|
882
|
+
try {
|
|
883
|
+
const r = rt.find((a) => Object.keys(a)[0] === e);
|
|
884
|
+
return r === void 0 ? s : Object.values(r)[0];
|
|
885
|
+
} catch {
|
|
886
|
+
return s;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
static async copyValueToClipboard(e) {
|
|
890
|
+
await navigator.clipboard.writeText(String(e));
|
|
891
|
+
}
|
|
892
|
+
static downloadBlob(e, s = W.extractFileNameFromHeader(e)) {
|
|
893
|
+
const r = document.createElement("a");
|
|
894
|
+
r.href = URL.createObjectURL(e.data), r.download = s, r.dispatchEvent(
|
|
895
|
+
new MouseEvent("click", {
|
|
896
|
+
bubbles: !0,
|
|
897
|
+
cancelable: !0,
|
|
898
|
+
composed: !0
|
|
899
|
+
})
|
|
900
|
+
), r.remove();
|
|
901
|
+
}
|
|
902
|
+
static extractFileNameFromHeader(e) {
|
|
903
|
+
var r, a, n, i;
|
|
904
|
+
return ((i = (r = e.headers["content-disposition"]) == null ? void 0 : r.split("filename=")[1]) == null ? void 0 : i.slice(
|
|
905
|
+
1,
|
|
906
|
+
((n = (a = e.headers["content-disposition"]) == null ? void 0 : a.split("filename=")) == null ? void 0 : n[1].length) - 1
|
|
907
|
+
)) || "Saraf-File";
|
|
908
|
+
}
|
|
909
|
+
static removeSpacesFromString(e) {
|
|
910
|
+
return e && typeof e.normalize == "function" && (e = e.normalize("NFC")), e.replace(
|
|
911
|
+
/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,
|
|
912
|
+
""
|
|
913
|
+
);
|
|
914
|
+
}
|
|
915
|
+
static isArraySorted(e, s = (a) => a, r = Y.ASC) {
|
|
916
|
+
return e.every((a, n) => e.length - 1 === n ? !0 : r === Y.ASC ? s(a) <= s(e[n + 1]) : s(a) >= s(e[n + 1]));
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const $ = class $ {
|
|
920
|
+
constructor() {
|
|
921
|
+
this.availableAccesses = /* @__PURE__ */ new Set();
|
|
922
|
+
}
|
|
923
|
+
setAvailableAccesses(e) {
|
|
924
|
+
this.setAccessListToStorage(e);
|
|
925
|
+
for (const s of e)
|
|
926
|
+
this.availableAccesses.add(s);
|
|
927
|
+
}
|
|
928
|
+
setAccessListToStorage(e) {
|
|
929
|
+
localStorage.setItem(j.AccessList, JSON.stringify(e));
|
|
930
|
+
}
|
|
931
|
+
everyAccess(e) {
|
|
932
|
+
return e.every((s) => this.availableAccesses.has(s));
|
|
933
|
+
}
|
|
934
|
+
someAccess(e) {
|
|
935
|
+
return e.some((s) => this.availableAccesses.has(s));
|
|
936
|
+
}
|
|
937
|
+
clearAvailableAccesses() {
|
|
938
|
+
this.availableAccesses.clear(), localStorage.removeItem(j.AccessList);
|
|
939
|
+
}
|
|
940
|
+
initialize() {
|
|
941
|
+
const e = localStorage.getItem(j.AccessList);
|
|
942
|
+
e !== null && this.setAvailableAccesses(JSON.parse(e));
|
|
943
|
+
}
|
|
944
|
+
static GetInstance() {
|
|
945
|
+
return $.Instance || ($.Instance = new $()), $.Instance;
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
$.Instance = null;
|
|
949
|
+
let fe = $;
|
|
950
|
+
class He {
|
|
951
|
+
constructor() {
|
|
952
|
+
this.mounted = (e, s) => {
|
|
953
|
+
this.checkAccess(e, s.value);
|
|
954
|
+
}, this.updated = (e, s) => {
|
|
955
|
+
this.checkAccess(e, s.value);
|
|
956
|
+
}, this.checkAccess = (e, s) => {
|
|
957
|
+
this.hasAccess(s) || e.remove();
|
|
958
|
+
}, this.accessService = fe.GetInstance();
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
class ss extends He {
|
|
962
|
+
hasAccess(e) {
|
|
963
|
+
return this.accessService.everyAccess(e);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
class rs extends He {
|
|
967
|
+
hasAccess(e) {
|
|
968
|
+
return this.accessService.someAccess(e);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
const P = class P {
|
|
972
|
+
constructor() {
|
|
973
|
+
this._accessLevels = /* @__PURE__ */ new Map();
|
|
974
|
+
}
|
|
975
|
+
initialize() {
|
|
976
|
+
this.setAccessLevelFromStorage();
|
|
977
|
+
}
|
|
978
|
+
setAccessLevels(e) {
|
|
979
|
+
for (const s in e)
|
|
980
|
+
this._accessLevels.set(s, new Set(e[s]));
|
|
981
|
+
this.setAccessLevelsToStorage(e);
|
|
982
|
+
}
|
|
983
|
+
setAccessLevelsToStorage(e) {
|
|
984
|
+
localStorage.setItem(j.SSO_ACCESS_LIST, JSON.stringify(e));
|
|
985
|
+
}
|
|
986
|
+
getAccessLevelsFromStorage() {
|
|
987
|
+
let e = localStorage.getItem(j.SSO_ACCESS_LIST);
|
|
988
|
+
return e !== null ? JSON.parse(e) : e;
|
|
989
|
+
}
|
|
990
|
+
getAccessLevelsOfScope(e) {
|
|
991
|
+
if (this._accessLevels.has(e))
|
|
992
|
+
return this._accessLevels.get(e);
|
|
993
|
+
throw new Error(`The scope is not exists ${e}`);
|
|
994
|
+
}
|
|
995
|
+
setAccessLevelFromStorage() {
|
|
996
|
+
const e = this.getAccessLevelsFromStorage();
|
|
997
|
+
e && this.setAccessLevels(e);
|
|
998
|
+
}
|
|
999
|
+
everyAccess(e, s) {
|
|
1000
|
+
const r = this.getAccessLevelsOfScope(e);
|
|
1001
|
+
return r ? s.every((a) => r.has(a)) : !1;
|
|
1002
|
+
}
|
|
1003
|
+
someAccess(e, s) {
|
|
1004
|
+
const r = this.getAccessLevelsOfScope(e);
|
|
1005
|
+
return r ? s.some((a) => r.has(a)) : !1;
|
|
1006
|
+
}
|
|
1007
|
+
hasScope(e) {
|
|
1008
|
+
return this._accessLevels.has(e);
|
|
1009
|
+
}
|
|
1010
|
+
clear() {
|
|
1011
|
+
localStorage.removeItem(j.SSO_ACCESS_LIST), this._accessLevels = /* @__PURE__ */ new Map();
|
|
1012
|
+
}
|
|
1013
|
+
static GetInstance() {
|
|
1014
|
+
return P._instance || (P._instance = new P()), P._instance;
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
P._instance = null;
|
|
1018
|
+
let De = P;
|
|
1019
|
+
class qe {
|
|
1020
|
+
constructor() {
|
|
1021
|
+
this._authorizationService = De.GetInstance(), this.mounted = this.mounted.bind(this), this.updated = this.updated.bind(this), this.hasAccess = this.hasAccess.bind(this), this.manageElement = this.manageElement.bind(this);
|
|
1022
|
+
}
|
|
1023
|
+
mounted(e, s, r) {
|
|
1024
|
+
this.manageElement(e, s.arg, s.modifiers);
|
|
1025
|
+
}
|
|
1026
|
+
updated(e, s, r) {
|
|
1027
|
+
this.manageElement(e, s.arg, s.modifiers);
|
|
1028
|
+
}
|
|
1029
|
+
manageElement(e, s, r) {
|
|
1030
|
+
if (!this._authorizationService.hasScope(s)) {
|
|
1031
|
+
e.remove();
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
const a = this.getAccessLevels(s, r);
|
|
1035
|
+
this.hasAccess(s, a) || e.remove();
|
|
1036
|
+
}
|
|
1037
|
+
getAccessLevels(e, s) {
|
|
1038
|
+
var a;
|
|
1039
|
+
let r = Object.keys(s);
|
|
1040
|
+
return r.length || (r = Array.from(((a = this._authorizationService.getAccessLevelsOfScope(e)) == null ? void 0 : a.values()) ?? [])), r;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
class as extends qe {
|
|
1044
|
+
hasAccess(e, s) {
|
|
1045
|
+
return this._authorizationService.everyAccess(e, s);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
class ns extends qe {
|
|
1049
|
+
hasAccess(e, s) {
|
|
1050
|
+
return this._authorizationService.someAccess(e, s);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
class Ft {
|
|
1054
|
+
constructor() {
|
|
1055
|
+
this.value = null, this.initialValue = null, this.name = "", this.isValid = !1, this.isBlurSensitive = !1, this.isRequired = !1, this.isIncludeInRequestBody = !0, this.isChangeSensitive = !1, this.notValidMessage = "", this.isEmptySensitive = !0;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
function is(t) {
|
|
1059
|
+
return t === 1;
|
|
1060
|
+
}
|
|
1061
|
+
function os(t, e) {
|
|
1062
|
+
return t - 1 === e;
|
|
1063
|
+
}
|
|
1064
|
+
function jt(t) {
|
|
1065
|
+
return String(t).length === 0 || t === null || t === void 0;
|
|
1066
|
+
}
|
|
1067
|
+
function ls(t) {
|
|
1068
|
+
t();
|
|
1069
|
+
}
|
|
1070
|
+
class cs {
|
|
1071
|
+
constructor(e, s) {
|
|
1072
|
+
this.initialData = null, this.data = new Ft(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
|
|
1073
|
+
}
|
|
1074
|
+
shouldRunValidation() {
|
|
1075
|
+
return this.data.isRequired ? !0 : !jt(this.data.value);
|
|
1076
|
+
}
|
|
1077
|
+
runValidation(e = !1) {
|
|
1078
|
+
for (const s of this._validators) {
|
|
1079
|
+
const r = s.validate(this.data.value);
|
|
1080
|
+
if (r) {
|
|
1081
|
+
this.setFormToInvalidState(e, r);
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
this.setFormToValidState();
|
|
1086
|
+
}
|
|
1087
|
+
setFormToInvalidState(e, s) {
|
|
1088
|
+
this.data.isValid = !1, (this.data.isChangeSensitive || e) && this.setNotValidMessage(s);
|
|
1089
|
+
}
|
|
1090
|
+
setFormToValidState() {
|
|
1091
|
+
this.data.isValid = !0, this.setNotValidMessage("");
|
|
1092
|
+
}
|
|
1093
|
+
reset() {
|
|
1094
|
+
this.initialData ? this.data = structuredClone(xe(this.initialData)) : console.warn(
|
|
1095
|
+
"The " + this.data.name + `input control has no initial data,
|
|
1096
|
+
the initial data will be available after calling the [markAsInitial] method on this instance`
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
markAsInitial() {
|
|
1100
|
+
this.initialData = structuredClone(xe(this.data));
|
|
1101
|
+
}
|
|
1102
|
+
setValidators(e) {
|
|
1103
|
+
this._validators = e;
|
|
1104
|
+
}
|
|
1105
|
+
getChangeSensitive() {
|
|
1106
|
+
return this.data.isChangeSensitive;
|
|
1107
|
+
}
|
|
1108
|
+
setChangeSensitive(e) {
|
|
1109
|
+
this.data.isChangeSensitive = e;
|
|
1110
|
+
}
|
|
1111
|
+
getIsBlurSensitive() {
|
|
1112
|
+
return this.data.isBlurSensitive;
|
|
1113
|
+
}
|
|
1114
|
+
setIsBlurSensitive(e) {
|
|
1115
|
+
this.data.isBlurSensitive = e;
|
|
1116
|
+
}
|
|
1117
|
+
getIsRequired() {
|
|
1118
|
+
return this.data.isRequired;
|
|
1119
|
+
}
|
|
1120
|
+
setIsRequired(e) {
|
|
1121
|
+
this.data.isRequired = e;
|
|
1122
|
+
}
|
|
1123
|
+
getIsValid() {
|
|
1124
|
+
return this.data.isValid;
|
|
1125
|
+
}
|
|
1126
|
+
setIsValid(e) {
|
|
1127
|
+
this.data.isValid = e;
|
|
1128
|
+
}
|
|
1129
|
+
getIsIncludeInRequestBody() {
|
|
1130
|
+
return this.data.isIncludeInRequestBody;
|
|
1131
|
+
}
|
|
1132
|
+
setIsIncludeInRequestBody(e) {
|
|
1133
|
+
this.data.isIncludeInRequestBody = e;
|
|
1134
|
+
}
|
|
1135
|
+
getNotValidMessage() {
|
|
1136
|
+
return this.data.notValidMessage;
|
|
1137
|
+
}
|
|
1138
|
+
setNotValidMessage(e) {
|
|
1139
|
+
this.data.notValidMessage = e;
|
|
1140
|
+
}
|
|
1141
|
+
getName() {
|
|
1142
|
+
return this.data.name;
|
|
1143
|
+
}
|
|
1144
|
+
setName(e) {
|
|
1145
|
+
this.data.name = e;
|
|
1146
|
+
}
|
|
1147
|
+
setId(e) {
|
|
1148
|
+
this._id = e;
|
|
1149
|
+
}
|
|
1150
|
+
getId() {
|
|
1151
|
+
return this._id;
|
|
1152
|
+
}
|
|
1153
|
+
getIsEmptySensitive() {
|
|
1154
|
+
return this.data.isEmptySensitive;
|
|
1155
|
+
}
|
|
1156
|
+
setIsEmptySensitive(e) {
|
|
1157
|
+
this.data.isEmptySensitive = e;
|
|
1158
|
+
}
|
|
1159
|
+
set value(e) {
|
|
1160
|
+
this.data.value = e, this.shouldRunValidation() && this.runValidation();
|
|
1161
|
+
}
|
|
1162
|
+
get value() {
|
|
1163
|
+
return this.data.value;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
class us {
|
|
1167
|
+
constructor(e) {
|
|
1168
|
+
this._inputControl = e;
|
|
1169
|
+
}
|
|
1170
|
+
setValidators(e) {
|
|
1171
|
+
return this._inputControl.setValidators(e), this;
|
|
1172
|
+
}
|
|
1173
|
+
setChangeSensitive() {
|
|
1174
|
+
return this._inputControl.setChangeSensitive(!0), this;
|
|
1175
|
+
}
|
|
1176
|
+
setRequired() {
|
|
1177
|
+
return this._inputControl.setIsRequired(!0), this;
|
|
1178
|
+
}
|
|
1179
|
+
setValid() {
|
|
1180
|
+
return this._inputControl.setIsValid(!0), this;
|
|
1181
|
+
}
|
|
1182
|
+
setBlurSensitive() {
|
|
1183
|
+
return this._inputControl.setIsBlurSensitive(!0), this;
|
|
1184
|
+
}
|
|
1185
|
+
setId(e) {
|
|
1186
|
+
return this._inputControl.setId(e), this;
|
|
1187
|
+
}
|
|
1188
|
+
removeEmptySensitive() {
|
|
1189
|
+
return this._inputControl.setIsEmptySensitive(!1), this;
|
|
1190
|
+
}
|
|
1191
|
+
build() {
|
|
1192
|
+
return this._inputControl;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
class hs {
|
|
1196
|
+
constructor() {
|
|
1197
|
+
this.mounted = (e, s) => {
|
|
1198
|
+
s.value && s.value.getIsBlurSensitive() && (e.addEventListener("click", this.handleFocus.bind(this, s.value)), e.addEventListener(
|
|
1199
|
+
"blur",
|
|
1200
|
+
this.handleBlur.bind(this, s.value),
|
|
1201
|
+
!0
|
|
1202
|
+
));
|
|
1203
|
+
}, this.beforeUnMount = (e, s) => {
|
|
1204
|
+
e.removeEventListener(
|
|
1205
|
+
"blur",
|
|
1206
|
+
this.handleBlur.bind(this, s.value)
|
|
1207
|
+
), e.removeEventListener("click", this.handleFocus.bind(this, s.value));
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
handleBlur(e) {
|
|
1211
|
+
e.runValidation(!0);
|
|
1212
|
+
}
|
|
1213
|
+
handleFocus(e) {
|
|
1214
|
+
e.value || e.getIsEmptySensitive() || e.setNotValidMessage("");
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
class ds {
|
|
1218
|
+
constructor() {
|
|
1219
|
+
this._inputControls = /* @__PURE__ */ new Map(), this._isValid = !1, this._id = Math.random();
|
|
1220
|
+
}
|
|
1221
|
+
getInputControlsAsArray() {
|
|
1222
|
+
return Array.from(this._inputControls.values());
|
|
1223
|
+
}
|
|
1224
|
+
runValidation() {
|
|
1225
|
+
for (const e of this.getInputControlsAsArray())
|
|
1226
|
+
if (!e.getIsValid()) {
|
|
1227
|
+
this._isValid = !1;
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
this._isValid = !0;
|
|
1231
|
+
}
|
|
1232
|
+
addInputControls(e) {
|
|
1233
|
+
for (const s of e)
|
|
1234
|
+
this._inputControls.set(s.getName(), s);
|
|
1235
|
+
}
|
|
1236
|
+
getInputControl(e) {
|
|
1237
|
+
const s = this._inputControls.get(e);
|
|
1238
|
+
if (!s)
|
|
1239
|
+
throw new Error(`The provided input name (${e}}) has no controls.`);
|
|
1240
|
+
return s;
|
|
1241
|
+
}
|
|
1242
|
+
resetControls(e) {
|
|
1243
|
+
for (const s of e) {
|
|
1244
|
+
const r = this._inputControls.get(s);
|
|
1245
|
+
r ? r.reset() : console.warn(`Provided input name ${s} has no controllers in this form`);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
resetAll() {
|
|
1249
|
+
for (const e of this.getInputControlsAsArray())
|
|
1250
|
+
e.reset();
|
|
1251
|
+
}
|
|
1252
|
+
createRequestBody() {
|
|
1253
|
+
const e = {};
|
|
1254
|
+
for (const s of this.getInputControlsAsArray())
|
|
1255
|
+
s.getIsIncludeInRequestBody() && (e[s.getName()] = s.value);
|
|
1256
|
+
return e;
|
|
1257
|
+
}
|
|
1258
|
+
setIsValid(e) {
|
|
1259
|
+
this._isValid = e;
|
|
1260
|
+
}
|
|
1261
|
+
getIsValid() {
|
|
1262
|
+
return this._isValid;
|
|
1263
|
+
}
|
|
1264
|
+
setId(e) {
|
|
1265
|
+
this._id = e;
|
|
1266
|
+
}
|
|
1267
|
+
getId() {
|
|
1268
|
+
return this._id;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
function fs(t) {
|
|
1272
|
+
const e = Ne(t), s = M(
|
|
1273
|
+
de.Invalid
|
|
1274
|
+
);
|
|
1275
|
+
return Qe(
|
|
1276
|
+
() => e.getInputControlsAsArray(),
|
|
1277
|
+
() => {
|
|
1278
|
+
e.runValidation(), e.getIsValid() ? s.value = de.Valid : s.value = de.Invalid;
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
immediate: !0,
|
|
1282
|
+
deep: !0
|
|
1283
|
+
}
|
|
1284
|
+
), {
|
|
1285
|
+
reactiveForm: e,
|
|
1286
|
+
validationStatus: s
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
class ze {
|
|
1290
|
+
constructor(e) {
|
|
1291
|
+
this.timerId = null, this.setupInterval = this.setupInterval.bind(this), this.schedule = e;
|
|
1292
|
+
}
|
|
1293
|
+
setupInterval(e) {
|
|
1294
|
+
const s = this;
|
|
1295
|
+
this.timerId = setTimeout(async function r() {
|
|
1296
|
+
await s.schedule.runAction(), s.timerId = setTimeout(() => {
|
|
1297
|
+
r();
|
|
1298
|
+
}, e);
|
|
1299
|
+
}, e);
|
|
1300
|
+
}
|
|
1301
|
+
clearInterval() {
|
|
1302
|
+
this.timerId && clearInterval(this.timerId);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
const Je = "150px", Ge = 2, vs = {
|
|
1306
|
+
path: "id",
|
|
1307
|
+
key: "id",
|
|
1308
|
+
title: "عملیات",
|
|
1309
|
+
colspan: Ge,
|
|
1310
|
+
width: Je,
|
|
1311
|
+
cellType: Me.ACTION,
|
|
1312
|
+
align: _e.Center,
|
|
1313
|
+
headerType: be.Text,
|
|
1314
|
+
accessLevel: null
|
|
1315
|
+
}, Yt = {
|
|
1316
|
+
width: Je,
|
|
1317
|
+
align: _e.Center,
|
|
1318
|
+
headerType: be.Text,
|
|
1319
|
+
cellType: Me.Text,
|
|
1320
|
+
colspan: Ge
|
|
1321
|
+
};
|
|
1322
|
+
class We {
|
|
1323
|
+
constructor(e, s) {
|
|
1324
|
+
this.key = e, this.order = s;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
class Pe {
|
|
1328
|
+
aSort(e, s) {
|
|
1329
|
+
return e.sort((r, a) => {
|
|
1330
|
+
const n = r[s] ?? r, i = a[s] ?? a;
|
|
1331
|
+
if (typeof n == "string" && typeof i == "string")
|
|
1332
|
+
return n.localeCompare(i);
|
|
1333
|
+
if (typeof n == "number" && typeof i == "number")
|
|
1334
|
+
return n - i;
|
|
1335
|
+
throw new Error("Not supported data type");
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
bSort(e, s) {
|
|
1339
|
+
return e.sort((r, a) => {
|
|
1340
|
+
const n = r[s] ?? r, i = a[s] ?? a;
|
|
1341
|
+
if (typeof n == "string" && typeof i == "string")
|
|
1342
|
+
return i.localeCompare(n);
|
|
1343
|
+
if (typeof n == "number" && typeof i == "number")
|
|
1344
|
+
return i - n;
|
|
1345
|
+
throw new Error("Not supported data type");
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
class ms {
|
|
1350
|
+
arrayOfObjectSort(e, s, r, a = new Pe()) {
|
|
1351
|
+
return r === Y.ASC ? a.aSort(e, s) : a.bSort(e, s);
|
|
1352
|
+
}
|
|
1353
|
+
arraySort(e, s, r = new Pe()) {
|
|
1354
|
+
return s === Y.ASC ? r.aSort(e) : r.bSort(e);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
class Nt {
|
|
1358
|
+
constructor(e) {
|
|
1359
|
+
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new We(
|
|
1360
|
+
"id",
|
|
1361
|
+
Y.DESC
|
|
1362
|
+
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService = fe.GetInstance();
|
|
1363
|
+
}
|
|
1364
|
+
addHeader(e) {
|
|
1365
|
+
this.headerSchema.push(e);
|
|
1366
|
+
}
|
|
1367
|
+
async load() {
|
|
1368
|
+
this.headerSchema = this.filterItemsBaseOnAccessLevel(
|
|
1369
|
+
await this.loadHeader()
|
|
1370
|
+
), await this.loadRows();
|
|
1371
|
+
}
|
|
1372
|
+
filterItemsBaseOnAccessLevel(e) {
|
|
1373
|
+
return e.filter((s) => s.hasAccess ? s.hasAccess() : !0);
|
|
1374
|
+
}
|
|
1375
|
+
async sort(e) {
|
|
1376
|
+
this.shouldSendSortRequest(e) && (this.currentSortDetail = e, this.loadedRows = (await this.handleSort(this.currentSortDetail)).items);
|
|
1377
|
+
}
|
|
1378
|
+
shouldSendSortRequest(e) {
|
|
1379
|
+
return e.key !== this.currentSortDetail.key || e.order !== this.currentSortDetail.order;
|
|
1380
|
+
}
|
|
1381
|
+
async paginate(e, s) {
|
|
1382
|
+
this.shouldSendPaginationRequest(e, s) && (this.currentPage = e, this.currentPageSize = s, this.loadedRows = (await this.handlePagination(this.currentPage, this.currentPageSize)).items);
|
|
1383
|
+
}
|
|
1384
|
+
shouldSendPaginationRequest(e, s) {
|
|
1385
|
+
return this.currentPage !== e || this.currentPageSize !== s;
|
|
1386
|
+
}
|
|
1387
|
+
async loadRows() {
|
|
1388
|
+
return this.loadedRows = (await this.service.fetchRows()).items, this.loadedRows;
|
|
1389
|
+
}
|
|
1390
|
+
getData() {
|
|
1391
|
+
return this.service.getData();
|
|
1392
|
+
}
|
|
1393
|
+
async handleSort(e) {
|
|
1394
|
+
return await this.service.sort(e);
|
|
1395
|
+
}
|
|
1396
|
+
async handlePagination(e, s) {
|
|
1397
|
+
return await this.service.paginate(e, s);
|
|
1398
|
+
}
|
|
1399
|
+
getItemCountPerPage() {
|
|
1400
|
+
return Ve.DEFAULT_ITEM_COUNT_PER_PAGE;
|
|
1401
|
+
}
|
|
1402
|
+
isLoading() {
|
|
1403
|
+
const e = this.getLoadingStatuses();
|
|
1404
|
+
return e.has(m.Search) || e.has(m.FetchList) || e.has(m.Sort) || e.has(m.FetchLastItems) || e.has(m.FetchPreviousItems);
|
|
1405
|
+
}
|
|
1406
|
+
getLoadingStatuses() {
|
|
1407
|
+
return this.getData().loadingStatus;
|
|
1408
|
+
}
|
|
1409
|
+
hasAnyAction() {
|
|
1410
|
+
for (const e of this.loadedRows)
|
|
1411
|
+
if (this.getAccessedActions(e).length) return !0;
|
|
1412
|
+
return !1;
|
|
1413
|
+
}
|
|
1414
|
+
getAccessedActions(e) {
|
|
1415
|
+
return this.filterItemsBaseOnAccessLevel(this.getActions(e));
|
|
1416
|
+
}
|
|
1417
|
+
getActions(e) {
|
|
1418
|
+
return [];
|
|
1419
|
+
}
|
|
1420
|
+
getScrollDetail() {
|
|
1421
|
+
return null;
|
|
1422
|
+
}
|
|
1423
|
+
isExpandable() {
|
|
1424
|
+
return !1;
|
|
1425
|
+
}
|
|
1426
|
+
async handleClick(e) {
|
|
1427
|
+
}
|
|
1428
|
+
async handleMetaClick(e) {
|
|
1429
|
+
}
|
|
1430
|
+
async handleDoubleClick(e) {
|
|
1431
|
+
}
|
|
1432
|
+
async onDestroy() {
|
|
1433
|
+
}
|
|
1434
|
+
async loadHeader() {
|
|
1435
|
+
throw new Error("No header provided for the table.");
|
|
1436
|
+
}
|
|
1437
|
+
loadSummarySchema() {
|
|
1438
|
+
return {
|
|
1439
|
+
summaryTitle: "",
|
|
1440
|
+
summaryItems: []
|
|
1441
|
+
};
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
class Bt {
|
|
1445
|
+
constructor(e) {
|
|
1446
|
+
this.observers = [], this.next(e);
|
|
1447
|
+
}
|
|
1448
|
+
attach(e) {
|
|
1449
|
+
this.observers.push(e);
|
|
1450
|
+
}
|
|
1451
|
+
detach(e) {
|
|
1452
|
+
this.observers = this.observers.filter((s) => s !== e);
|
|
1453
|
+
}
|
|
1454
|
+
notify() {
|
|
1455
|
+
for (const e of this.observers)
|
|
1456
|
+
typeof e == "function" ? e(this._value) : e.update(this._value);
|
|
1457
|
+
}
|
|
1458
|
+
next(e) {
|
|
1459
|
+
typeof e == "function" ? this._value = e(this._value) : this._value = e, this.notify();
|
|
1460
|
+
}
|
|
1461
|
+
getValue() {
|
|
1462
|
+
return this._value;
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
class ps extends Nt {
|
|
1466
|
+
constructor(e) {
|
|
1467
|
+
super(e), this.selectedRows = new Bt(/* @__PURE__ */ new Map()), this.rowSelect = this.rowSelect.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.handlePagination = this.handlePagination.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRows = this.getSelectedRows.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
|
|
1468
|
+
}
|
|
1469
|
+
rowSelect(e) {
|
|
1470
|
+
this.getSelectedRowsValue().has(e.id) ? (this.getSelectedRowsValue().delete(e.id), this.selectedRows.next(this.selectedRows.getValue())) : (this.selectedRows.getValue().set(e.id, e), this.selectedRows.next(this.selectedRows.getValue()));
|
|
1471
|
+
}
|
|
1472
|
+
selectAll() {
|
|
1473
|
+
if (this.isEveryRowSelected())
|
|
1474
|
+
this.clearAllSelectedItems();
|
|
1475
|
+
else
|
|
1476
|
+
for (const e of this.loadedRows)
|
|
1477
|
+
this.selectedRows.getValue().set(e.id, e), this.selectedRows.next(this.selectedRows.getValue());
|
|
1478
|
+
}
|
|
1479
|
+
isEveryRowSelected() {
|
|
1480
|
+
return this.getSelectedRowsValue().size === this.currentPageSize || this.loadedRows.length === this.getSelectedRowsValue().size;
|
|
1481
|
+
}
|
|
1482
|
+
async handlePagination(e, s) {
|
|
1483
|
+
return this.clearAllSelectedItems(), await super.handlePagination(e, s);
|
|
1484
|
+
}
|
|
1485
|
+
async handleSort(e) {
|
|
1486
|
+
return this.clearAllSelectedItems(), await super.handleSort(e);
|
|
1487
|
+
}
|
|
1488
|
+
clearAllSelectedItems() {
|
|
1489
|
+
this.selectedRows.getValue().clear(), this.selectedRows.next(this.selectedRows.getValue());
|
|
1490
|
+
}
|
|
1491
|
+
getSelectedRows() {
|
|
1492
|
+
return this.selectedRows;
|
|
1493
|
+
}
|
|
1494
|
+
getSelectedRowsAsArray() {
|
|
1495
|
+
return Array.from(this.selectedRows.getValue().values());
|
|
1496
|
+
}
|
|
1497
|
+
getSelectedRowIds() {
|
|
1498
|
+
return Array.from(this.selectedRows.getValue().keys());
|
|
1499
|
+
}
|
|
1500
|
+
getSelectedRowsValue() {
|
|
1501
|
+
return this.selectedRows.getValue();
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
function gs(t) {
|
|
1505
|
+
return {
|
|
1506
|
+
...Yt,
|
|
1507
|
+
...t
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
function ys(t) {
|
|
1511
|
+
return function(s, r) {
|
|
1512
|
+
s.constructor.prototype.headers || (s.constructor.prototype.headers = []), s.constructor.prototype.headers.push({ path: r, ...t });
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
function Ss(t) {
|
|
1516
|
+
return function(s) {
|
|
1517
|
+
async function r() {
|
|
1518
|
+
return s.prototype._table = this, s.prototype.headers;
|
|
1519
|
+
}
|
|
1520
|
+
function a(h) {
|
|
1521
|
+
const c = [], p = s.prototype.actions || [];
|
|
1522
|
+
for (const f of p) {
|
|
1523
|
+
if (!f.isAvailable(h)) continue;
|
|
1524
|
+
const u = {
|
|
1525
|
+
handler: f.handler.bind(h),
|
|
1526
|
+
accessLevel: f.accessLevel,
|
|
1527
|
+
actionName: f.actionName
|
|
1528
|
+
};
|
|
1529
|
+
c.push(u);
|
|
1530
|
+
}
|
|
1531
|
+
return c;
|
|
1532
|
+
}
|
|
1533
|
+
async function n(h) {
|
|
1534
|
+
s.prototype.rowClick && await s.prototype.rowClick.call(h);
|
|
1535
|
+
}
|
|
1536
|
+
async function i() {
|
|
1537
|
+
s.prototype.tableDestroy && await s.prototype.tableDestroy();
|
|
1538
|
+
}
|
|
1539
|
+
t.prototype.loadHeader = r, t.prototype.getActions = a, t.prototype.handleClick = n, t.prototype.onDestroy = i;
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
function Is(t) {
|
|
1543
|
+
return function(s, r, a) {
|
|
1544
|
+
s.constructor.prototype.actions || (s.constructor.prototype.actions = []), t.handler = a.value, s.constructor.prototype.actions.push(t);
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
function ws() {
|
|
1548
|
+
return function(e, s, r) {
|
|
1549
|
+
e.constructor.prototype.tableDestroy = r.value;
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
function Ds() {
|
|
1553
|
+
return function(e, s, r) {
|
|
1554
|
+
e.constructor.prototype.rowClick = r.value;
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
function Ut() {
|
|
1558
|
+
const t = M(
|
|
1559
|
+
/* @__PURE__ */ new Map()
|
|
1560
|
+
), e = M(0), s = M(null), r = I(() => Array.from(t.value.values()));
|
|
1561
|
+
function a(v) {
|
|
1562
|
+
e.value = v;
|
|
1563
|
+
}
|
|
1564
|
+
function n(v) {
|
|
1565
|
+
for (const g of v)
|
|
1566
|
+
i(g);
|
|
1567
|
+
}
|
|
1568
|
+
function i(v) {
|
|
1569
|
+
t.value.set(v.id, v);
|
|
1570
|
+
}
|
|
1571
|
+
function h(v) {
|
|
1572
|
+
return s.value = t.value.get(v) || null, s.value;
|
|
1573
|
+
}
|
|
1574
|
+
function c(v) {
|
|
1575
|
+
const g = h(v);
|
|
1576
|
+
return g && t.value.delete(v), !!g;
|
|
1577
|
+
}
|
|
1578
|
+
function p() {
|
|
1579
|
+
t.value.clear();
|
|
1580
|
+
}
|
|
1581
|
+
function f(v) {
|
|
1582
|
+
s.value = v;
|
|
1583
|
+
}
|
|
1584
|
+
function u() {
|
|
1585
|
+
s.value = null;
|
|
1586
|
+
}
|
|
1587
|
+
return {
|
|
1588
|
+
itemsAsArray: r,
|
|
1589
|
+
totalCount: e,
|
|
1590
|
+
currentItem: s,
|
|
1591
|
+
setTotalCount: a,
|
|
1592
|
+
addOrReplaceItems: n,
|
|
1593
|
+
getById: h,
|
|
1594
|
+
removeById: c,
|
|
1595
|
+
clearItems: p,
|
|
1596
|
+
setCurrentItem: f,
|
|
1597
|
+
clearCurrentItem: u
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
class Vt {
|
|
1601
|
+
constructor() {
|
|
1602
|
+
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new We("id", Y.DESC), this.filters = [];
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
class As {
|
|
1606
|
+
constructor(e, s) {
|
|
1607
|
+
this.items = e, this.totalItems = s;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
class _s {
|
|
1611
|
+
constructor(e, s) {
|
|
1612
|
+
this.shouldKeepSync = e, this.intervalInMillisecond = s;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
const Fe = new Vt();
|
|
1616
|
+
function Ht() {
|
|
1617
|
+
const t = M(structuredClone(Fe));
|
|
1618
|
+
function e() {
|
|
1619
|
+
t.value.pageNumber = t.value.pageNumber + 1;
|
|
1620
|
+
}
|
|
1621
|
+
function s() {
|
|
1622
|
+
t.value.pageNumber = t.value.pageNumber - 1;
|
|
1623
|
+
}
|
|
1624
|
+
function r(u) {
|
|
1625
|
+
t.value.pageNumber = u;
|
|
1626
|
+
}
|
|
1627
|
+
function a(u) {
|
|
1628
|
+
t.value.itemCount = u;
|
|
1629
|
+
}
|
|
1630
|
+
function n(u) {
|
|
1631
|
+
t.value.sortDetail.key = u.key, t.value.sortDetail.order = u.order;
|
|
1632
|
+
}
|
|
1633
|
+
function i(u) {
|
|
1634
|
+
for (const v in u)
|
|
1635
|
+
h(v, u[v]);
|
|
1636
|
+
}
|
|
1637
|
+
function h(u, v) {
|
|
1638
|
+
const g = t.value.filters.findIndex(
|
|
1639
|
+
(D) => D.key === u
|
|
1640
|
+
);
|
|
1641
|
+
g > -1 ? t.value.filters[g].value = v : t.value.filters.push({ key: u, value: v });
|
|
1642
|
+
}
|
|
1643
|
+
function c(u) {
|
|
1644
|
+
let v = t.value.filters;
|
|
1645
|
+
v = v.filter((g) => g.key !== u), t.value.filters = v;
|
|
1646
|
+
}
|
|
1647
|
+
function p() {
|
|
1648
|
+
const u = {
|
|
1649
|
+
page: t.value.pageNumber,
|
|
1650
|
+
count: t.value.itemCount
|
|
1651
|
+
};
|
|
1652
|
+
t.value.sortDetail && (u.by = t.value.sortDetail.key, u.order = t.value.sortDetail.order);
|
|
1653
|
+
for (const v of t.value.filters)
|
|
1654
|
+
if (v.value)
|
|
1655
|
+
if (typeof v.value == "string" || typeof v.value == "number")
|
|
1656
|
+
u[v.key] = v.value;
|
|
1657
|
+
else {
|
|
1658
|
+
const g = JSON.stringify(v.value);
|
|
1659
|
+
g !== "[]" && g !== "{}" && (u[v.key] = g);
|
|
1660
|
+
}
|
|
1661
|
+
return u;
|
|
1662
|
+
}
|
|
1663
|
+
function f() {
|
|
1664
|
+
t.value = structuredClone(Fe);
|
|
1665
|
+
}
|
|
1666
|
+
return {
|
|
1667
|
+
params: t,
|
|
1668
|
+
setNextPage: e,
|
|
1669
|
+
setPreventPage: s,
|
|
1670
|
+
setPageNumber: r,
|
|
1671
|
+
setItemCount: a,
|
|
1672
|
+
setSortDetail: n,
|
|
1673
|
+
setFilter: h,
|
|
1674
|
+
removeFilter: c,
|
|
1675
|
+
getRequestParams: p,
|
|
1676
|
+
clearParam: f,
|
|
1677
|
+
setFiltersBaseOnRequestBody: i
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
function qt() {
|
|
1681
|
+
const t = M(/* @__PURE__ */ new Set()), e = I(() => t.value.has(m.FetchList)), s = I(() => t.value.has(m.FetchItem)), r = I(() => t.value.has(m.FetchLastItems)), a = I(() => t.value.has(m.FetchPreviousItems)), n = I(() => t.value.has(m.Create)), i = I(() => t.value.has(m.Update)), h = I(() => t.value.has(m.Delete)), c = I(() => t.value.has(m.Search)), p = I(() => t.value.has(m.Sort));
|
|
1682
|
+
function f(v) {
|
|
1683
|
+
t.value.add(v);
|
|
1684
|
+
}
|
|
1685
|
+
function u(v) {
|
|
1686
|
+
t.value.delete(v);
|
|
1687
|
+
}
|
|
1688
|
+
return {
|
|
1689
|
+
loadingStatus: t,
|
|
1690
|
+
isFetchingList: e,
|
|
1691
|
+
isFetchingItem: s,
|
|
1692
|
+
isFetchingLastItems: r,
|
|
1693
|
+
isFetchingPreviousItems: a,
|
|
1694
|
+
isCreating: n,
|
|
1695
|
+
isUpdating: i,
|
|
1696
|
+
isDeleting: h,
|
|
1697
|
+
isSearching: c,
|
|
1698
|
+
isSorting: p,
|
|
1699
|
+
setStatus: f,
|
|
1700
|
+
removeStatus: u
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
function bs(t) {
|
|
1704
|
+
const e = Ut(), s = Ht(), r = qt(), a = new ze({
|
|
1705
|
+
runAction: async () => u(m.AutoRefresh)
|
|
1706
|
+
}), n = I(() => {
|
|
1707
|
+
const o = s.params.value.pageNumber, l = s.params.value.itemCount, d = o * l - l, S = o * l - 1, w = [];
|
|
1708
|
+
for (let y = d; y <= S && e.itemsAsArray.value[y]; y++)
|
|
1709
|
+
w.push(e.itemsAsArray.value[y]);
|
|
1710
|
+
return w;
|
|
1711
|
+
}), i = I(() => ({
|
|
1712
|
+
totalItems: e.totalCount.value,
|
|
1713
|
+
currentPage: s.params.value.pageNumber,
|
|
1714
|
+
rows: e.itemsAsArray.value,
|
|
1715
|
+
loadingStatus: r.loadingStatus.value,
|
|
1716
|
+
currentPageItems: n.value
|
|
1717
|
+
})), h = I(() => ({
|
|
1718
|
+
getData: p,
|
|
1719
|
+
sort: K,
|
|
1720
|
+
paginate: te,
|
|
1721
|
+
fetchRows: u
|
|
1722
|
+
})), c = I(() => t.getSyncDetail());
|
|
1723
|
+
function p() {
|
|
1724
|
+
return i.value;
|
|
1725
|
+
}
|
|
1726
|
+
async function f(o) {
|
|
1727
|
+
const l = await t.fetchList(o);
|
|
1728
|
+
return e.clearItems(), e.addOrReplaceItems(l.items), e.setTotalCount(l.totalItems), l;
|
|
1729
|
+
}
|
|
1730
|
+
async function u(o = m.FetchList) {
|
|
1731
|
+
r.setStatus(o);
|
|
1732
|
+
const l = await f(s.getRequestParams());
|
|
1733
|
+
return r.removeStatus(o), l;
|
|
1734
|
+
}
|
|
1735
|
+
async function v() {
|
|
1736
|
+
g(), await u();
|
|
1737
|
+
}
|
|
1738
|
+
function g() {
|
|
1739
|
+
if (!c.value.shouldKeepSync)
|
|
1740
|
+
throw new Error("The provided repository does not support auto refresh");
|
|
1741
|
+
a.setupInterval(c.value.intervalInMillisecond);
|
|
1742
|
+
}
|
|
1743
|
+
function D() {
|
|
1744
|
+
a.clearInterval();
|
|
1745
|
+
}
|
|
1746
|
+
async function B(o, l = !0) {
|
|
1747
|
+
r.setStatus(m.FetchItem), l && e.clearCurrentItem();
|
|
1748
|
+
const d = await t.fetchItemById(o);
|
|
1749
|
+
return e.setCurrentItem(d), r.removeStatus(m.FetchItem), d;
|
|
1750
|
+
}
|
|
1751
|
+
async function U(o) {
|
|
1752
|
+
r.setStatus(m.Create);
|
|
1753
|
+
const l = await t.createItem(o);
|
|
1754
|
+
return l && e.addOrReplaceItems([l]), r.removeStatus(m.Create), l;
|
|
1755
|
+
}
|
|
1756
|
+
async function V(o, l) {
|
|
1757
|
+
r.setStatus(m.Update);
|
|
1758
|
+
const d = await t.updateItem(o, l);
|
|
1759
|
+
return d && e.addOrReplaceItems([d]), r.removeStatus(m.Update), d;
|
|
1760
|
+
}
|
|
1761
|
+
async function H(o) {
|
|
1762
|
+
return r.setStatus(m.Delete), await t.deleteItem(o), r.removeStatus(m.Delete), e.removeById(o);
|
|
1763
|
+
}
|
|
1764
|
+
async function ge() {
|
|
1765
|
+
s.setNextPage(), r.setStatus(m.FetchLastItems);
|
|
1766
|
+
const o = await f(s.getRequestParams());
|
|
1767
|
+
return r.removeStatus(m.FetchLastItems), o;
|
|
1768
|
+
}
|
|
1769
|
+
async function ye() {
|
|
1770
|
+
s.setPreventPage(), r.setStatus(m.FetchPreviousItems);
|
|
1771
|
+
const o = await f(s.getRequestParams());
|
|
1772
|
+
return r.removeStatus(m.FetchPreviousItems), o;
|
|
1773
|
+
}
|
|
1774
|
+
async function te(o) {
|
|
1775
|
+
s.setPageNumber(o), r.setStatus(m.FetchList);
|
|
1776
|
+
const l = await f(s.getRequestParams());
|
|
1777
|
+
return r.removeStatus(m.FetchList), l;
|
|
1778
|
+
}
|
|
1779
|
+
async function Se(o) {
|
|
1780
|
+
s.setFilter("search", o), r.setStatus(m.Search), e.clearItems();
|
|
1781
|
+
const l = await f(s.getRequestParams());
|
|
1782
|
+
return r.removeStatus(m.Search), l;
|
|
1783
|
+
}
|
|
1784
|
+
async function K(o) {
|
|
1785
|
+
s.setSortDetail(o), r.setStatus(m.Sort), e.clearItems();
|
|
1786
|
+
const l = await f(s.getRequestParams());
|
|
1787
|
+
return r.removeStatus(m.Sort), l;
|
|
1788
|
+
}
|
|
1789
|
+
async function q() {
|
|
1790
|
+
return s.clearParam(), await u();
|
|
1791
|
+
}
|
|
1792
|
+
return et(() => {
|
|
1793
|
+
D();
|
|
1794
|
+
}), {
|
|
1795
|
+
loadingStatusManager: r,
|
|
1796
|
+
dataManger: e,
|
|
1797
|
+
paramsManager: s,
|
|
1798
|
+
tableRenderingData: i,
|
|
1799
|
+
fetchList: u,
|
|
1800
|
+
fetchWithAutoRefresh: v,
|
|
1801
|
+
setupAutoRefresh: g,
|
|
1802
|
+
stopAutoRefresh: D,
|
|
1803
|
+
fetchItemById: B,
|
|
1804
|
+
createItem: U,
|
|
1805
|
+
updateItem: V,
|
|
1806
|
+
deleteItem: H,
|
|
1807
|
+
fetchLastItems: ge,
|
|
1808
|
+
fetchPreviousItems: ye,
|
|
1809
|
+
fetchItemsByPageNumber: te,
|
|
1810
|
+
search: Se,
|
|
1811
|
+
sort: K,
|
|
1812
|
+
clearFilters: q,
|
|
1813
|
+
tableService: h,
|
|
1814
|
+
currentPageItems: n
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
function Ms(t) {
|
|
1818
|
+
const e = M(t), s = I(() => ({
|
|
1819
|
+
getData() {
|
|
1820
|
+
return {
|
|
1821
|
+
totalItems: e.value.length,
|
|
1822
|
+
currentPageItems: e.value,
|
|
1823
|
+
loadingStatus: /* @__PURE__ */ new Set(),
|
|
1824
|
+
rows: e.value,
|
|
1825
|
+
currentPage: 1
|
|
1826
|
+
};
|
|
1827
|
+
},
|
|
1828
|
+
async sort(r) {
|
|
1829
|
+
return {
|
|
1830
|
+
totalItems: e.value.length,
|
|
1831
|
+
items: e.value
|
|
1832
|
+
};
|
|
1833
|
+
},
|
|
1834
|
+
async fetchRows() {
|
|
1835
|
+
return {
|
|
1836
|
+
totalItems: e.value.length,
|
|
1837
|
+
items: e.value
|
|
1838
|
+
};
|
|
1839
|
+
},
|
|
1840
|
+
async paginate(r, a) {
|
|
1841
|
+
return {
|
|
1842
|
+
totalItems: e.value.length,
|
|
1843
|
+
items: e.value
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
}));
|
|
1847
|
+
return {
|
|
1848
|
+
tableRows: e,
|
|
1849
|
+
staticTableService: s
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1852
|
+
function Rs() {
|
|
1853
|
+
const t = M(/* @__PURE__ */ new Map()), e = M(0), s = I(() => e.value), r = I(() => Array.from(t.value.values()));
|
|
1854
|
+
function a(f) {
|
|
1855
|
+
e.value = f;
|
|
1856
|
+
}
|
|
1857
|
+
function n(f) {
|
|
1858
|
+
for (const u of f)
|
|
1859
|
+
i(u);
|
|
1860
|
+
}
|
|
1861
|
+
function i(f) {
|
|
1862
|
+
t.value.set(String(f.id), f);
|
|
1863
|
+
}
|
|
1864
|
+
function h(f) {
|
|
1865
|
+
const u = c(f);
|
|
1866
|
+
return t.value.delete(String(f)), u;
|
|
1867
|
+
}
|
|
1868
|
+
function c(f) {
|
|
1869
|
+
return t.value.get(String(f)) || null;
|
|
1870
|
+
}
|
|
1871
|
+
function p() {
|
|
1872
|
+
t.value.clear();
|
|
1873
|
+
}
|
|
1874
|
+
return {
|
|
1875
|
+
entityItemsAsArray: r,
|
|
1876
|
+
addOrReplaceItems: n,
|
|
1877
|
+
removeById: h,
|
|
1878
|
+
getItemById: c,
|
|
1879
|
+
clearItems: p,
|
|
1880
|
+
setTotalCount: a,
|
|
1881
|
+
getTotalCount: s
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
class Cs {
|
|
1885
|
+
constructor(e, s = 500) {
|
|
1886
|
+
this.timerId = null, this.debounceTimeout = s, this.action = e;
|
|
1887
|
+
}
|
|
1888
|
+
runAction() {
|
|
1889
|
+
this.cancelDebounce(), this.action.runImmediate(), this.timerId = setTimeout(() => {
|
|
1890
|
+
this.action.runDebounce();
|
|
1891
|
+
}, this.debounceTimeout);
|
|
1892
|
+
}
|
|
1893
|
+
cancelDebounce() {
|
|
1894
|
+
this.timerId && clearTimeout(this.timerId);
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
function Ls(t) {
|
|
1898
|
+
return function(e, s, r) {
|
|
1899
|
+
const a = r.value;
|
|
1900
|
+
r.value = async function(...n) {
|
|
1901
|
+
try {
|
|
1902
|
+
return await a.apply(this, n);
|
|
1903
|
+
} catch (i) {
|
|
1904
|
+
for (const h of t)
|
|
1905
|
+
await h.handleError(i);
|
|
1906
|
+
}
|
|
1907
|
+
};
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
function xs(t) {
|
|
1911
|
+
return function(e, s, r) {
|
|
1912
|
+
const a = r.value;
|
|
1913
|
+
r.value = async function(...n) {
|
|
1914
|
+
try {
|
|
1915
|
+
const i = await a.apply(this, n);
|
|
1916
|
+
for (const h of t)
|
|
1917
|
+
h.shouldResolveSuccess(i) && await h.handleSuccess(i);
|
|
1918
|
+
return i;
|
|
1919
|
+
} catch (i) {
|
|
1920
|
+
for (const h of t)
|
|
1921
|
+
h.shouldResolveFailure(i) && await h.handleFailure(i);
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
class Es {
|
|
1927
|
+
constructor(e, s, r = () => !0, a = () => !0) {
|
|
1928
|
+
this.successMessageResolver = e, this.failureMessageResolver = s, this.shouldResolveSuccess = r, this.shouldResolveFailure = a;
|
|
1929
|
+
}
|
|
1930
|
+
async handleSuccess(e) {
|
|
1931
|
+
}
|
|
1932
|
+
async handleFailure(e) {
|
|
1933
|
+
}
|
|
1934
|
+
async handleInfo() {
|
|
1935
|
+
}
|
|
1936
|
+
async handleWarning() {
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
const _ = class _ {
|
|
1940
|
+
constructor() {
|
|
1941
|
+
}
|
|
1942
|
+
static GetInstance() {
|
|
1943
|
+
return _.instance || (_.instance = new _()), _.instance;
|
|
1944
|
+
}
|
|
1945
|
+
static registerHandler(e, s) {
|
|
1946
|
+
_.handlers.set(e, s);
|
|
1947
|
+
}
|
|
1948
|
+
handle(e) {
|
|
1949
|
+
var a;
|
|
1950
|
+
const s = ((a = e.response) == null ? void 0 : a.status) ?? 0, r = _.handlers.get(s);
|
|
1951
|
+
r && r.handleError(e);
|
|
1952
|
+
}
|
|
1953
|
+
};
|
|
1954
|
+
_.handlers = /* @__PURE__ */ new Map(), _.instance = null;
|
|
1955
|
+
let je = _;
|
|
1956
|
+
class Os {
|
|
1957
|
+
constructor(e) {
|
|
1958
|
+
this.axiosInstance = e;
|
|
1959
|
+
}
|
|
1960
|
+
setBaseURL(e) {
|
|
1961
|
+
return this.axiosInstance.defaults.baseURL = e, this;
|
|
1962
|
+
}
|
|
1963
|
+
setTimeout(e) {
|
|
1964
|
+
return this.axiosInstance.defaults.timeout = e, this;
|
|
1965
|
+
}
|
|
1966
|
+
setHeaders(e) {
|
|
1967
|
+
return this.axiosInstance.defaults.headers.common = e, this;
|
|
1968
|
+
}
|
|
1969
|
+
attachRequestInterceptors(e) {
|
|
1970
|
+
return this.axiosInstance.interceptors.request.use(
|
|
1971
|
+
(s) => {
|
|
1972
|
+
for (const r of e)
|
|
1973
|
+
r.intercept(s);
|
|
1974
|
+
return s;
|
|
1975
|
+
},
|
|
1976
|
+
(s) => Promise.reject(s)
|
|
1977
|
+
), this;
|
|
1978
|
+
}
|
|
1979
|
+
attachResponseInterceptors(e) {
|
|
1980
|
+
return this.axiosInstance.interceptors.response.use(
|
|
1981
|
+
(s) => s,
|
|
1982
|
+
(s) => {
|
|
1983
|
+
throw e.handle(s), s;
|
|
1984
|
+
}
|
|
1985
|
+
), this;
|
|
1986
|
+
}
|
|
1987
|
+
build() {
|
|
1988
|
+
return this.axiosInstance;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
class ks {
|
|
1992
|
+
constructor(e) {
|
|
1993
|
+
this.axiosInstance = e;
|
|
1994
|
+
}
|
|
1995
|
+
async get(e, s) {
|
|
1996
|
+
return await this.axiosInstance.get(
|
|
1997
|
+
e,
|
|
1998
|
+
s
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
async post(e, s, r) {
|
|
2002
|
+
return await this.axiosInstance.post(
|
|
2003
|
+
e,
|
|
2004
|
+
s,
|
|
2005
|
+
r
|
|
2006
|
+
);
|
|
2007
|
+
}
|
|
2008
|
+
async patch(e, s, r) {
|
|
2009
|
+
return await this.axiosInstance.patch(
|
|
2010
|
+
e,
|
|
2011
|
+
s,
|
|
2012
|
+
r
|
|
2013
|
+
);
|
|
2014
|
+
}
|
|
2015
|
+
async put(e, s, r) {
|
|
2016
|
+
return await this.axiosInstance.put(
|
|
2017
|
+
e,
|
|
2018
|
+
s,
|
|
2019
|
+
r
|
|
2020
|
+
);
|
|
2021
|
+
}
|
|
2022
|
+
async delete(e, s) {
|
|
2023
|
+
return await this.axiosInstance.delete(
|
|
2024
|
+
e,
|
|
2025
|
+
s
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
class Ts {
|
|
2030
|
+
constructor() {
|
|
2031
|
+
this._initializer = [];
|
|
2032
|
+
}
|
|
2033
|
+
setupInitializers(e) {
|
|
2034
|
+
this._initializer.push(...e);
|
|
2035
|
+
}
|
|
2036
|
+
initialize() {
|
|
2037
|
+
for (const e of this._initializer)
|
|
2038
|
+
e.initialize();
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
const F = class F {
|
|
2042
|
+
constructor() {
|
|
2043
|
+
this.jsonConverter = new tt();
|
|
2044
|
+
}
|
|
2045
|
+
serializeObject(e, s) {
|
|
2046
|
+
return this.jsonConverter.serializeObject(e, s);
|
|
2047
|
+
}
|
|
2048
|
+
deserializeObject(e, s) {
|
|
2049
|
+
return this.jsonConverter.deserializeObject(e, s);
|
|
2050
|
+
}
|
|
2051
|
+
deserializeArray(e, s) {
|
|
2052
|
+
return this.jsonConverter.deserializeArray(e, s);
|
|
2053
|
+
}
|
|
2054
|
+
tryDeserialize(e, s) {
|
|
2055
|
+
for (const r of s)
|
|
2056
|
+
try {
|
|
2057
|
+
return this.deserializeObject(e, r);
|
|
2058
|
+
} catch {
|
|
2059
|
+
}
|
|
2060
|
+
throw new Error("Unable to deserialize object");
|
|
2061
|
+
}
|
|
2062
|
+
static GetInstance() {
|
|
2063
|
+
return F.Instance || (F.Instance = new F()), F.Instance;
|
|
2064
|
+
}
|
|
2065
|
+
};
|
|
2066
|
+
F.Instance = null;
|
|
2067
|
+
let Ye = F;
|
|
2068
|
+
var zt = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(zt || {}), Ze = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(Ze || {});
|
|
2069
|
+
class $s {
|
|
2070
|
+
constructor(e, s, r) {
|
|
2071
|
+
this.placement = Ze.BottomLeft, this.type = e, this.message = s, this.description = r;
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
const Ps = Be(Ce.Dialog, () => {
|
|
2075
|
+
const t = Ne({
|
|
2076
|
+
dialogComponent: null,
|
|
2077
|
+
width: T.DefaultWidth,
|
|
2078
|
+
height: T.DefaultHeight,
|
|
2079
|
+
props: null,
|
|
2080
|
+
header: ""
|
|
2081
|
+
}), e = I(() => !!t.dialogComponent), s = I(() => !!t.header);
|
|
2082
|
+
function r(c) {
|
|
2083
|
+
t.dialogComponent = c;
|
|
2084
|
+
}
|
|
2085
|
+
function a(c) {
|
|
2086
|
+
t.header = c;
|
|
2087
|
+
}
|
|
2088
|
+
function n(c) {
|
|
2089
|
+
if (!e.value)
|
|
2090
|
+
throw new Error("there is no dialog to set props on");
|
|
2091
|
+
t.props = c;
|
|
2092
|
+
}
|
|
2093
|
+
function i(c, p) {
|
|
2094
|
+
if (!e.value)
|
|
2095
|
+
throw new Error("there is no dialog to set size on");
|
|
2096
|
+
if (c < T.MinimalAvailableSize)
|
|
2097
|
+
throw new Error("negative size not supported");
|
|
2098
|
+
p === T.Width ? t.width = c : t.height = c;
|
|
2099
|
+
}
|
|
2100
|
+
function h() {
|
|
2101
|
+
t.props = null, t.height = T.DefaultHeight, t.width = T.DefaultWidth, t.header = "", t.dialogComponent = null;
|
|
2102
|
+
}
|
|
2103
|
+
return {
|
|
2104
|
+
dialogData: t,
|
|
2105
|
+
openDialog: r,
|
|
2106
|
+
clearDialog: h,
|
|
2107
|
+
setSize: i,
|
|
2108
|
+
setDialogHeader: a,
|
|
2109
|
+
setProps: n,
|
|
2110
|
+
isDialogExists: e,
|
|
2111
|
+
hasDefaultHeader: s
|
|
2112
|
+
};
|
|
2113
|
+
}), Fs = Be(Ce.Drawer, () => {
|
|
2114
|
+
const t = M(ee.Close), e = I(() => t.value === ee.Open);
|
|
2115
|
+
function s() {
|
|
2116
|
+
t.value = ee.Close;
|
|
2117
|
+
}
|
|
2118
|
+
function r() {
|
|
2119
|
+
t.value = ee.Open;
|
|
2120
|
+
}
|
|
2121
|
+
return {
|
|
2122
|
+
closeDrawer: s,
|
|
2123
|
+
openDrawer: r,
|
|
2124
|
+
isDrawerOpen: e
|
|
2125
|
+
};
|
|
2126
|
+
});
|
|
2127
|
+
class js {
|
|
2128
|
+
constructor() {
|
|
2129
|
+
this.observers = [];
|
|
2130
|
+
}
|
|
2131
|
+
attach(e) {
|
|
2132
|
+
this.observers.push(e);
|
|
2133
|
+
}
|
|
2134
|
+
detach(e) {
|
|
2135
|
+
this.observers = this.observers.filter(
|
|
2136
|
+
(s) => s !== e
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
notify() {
|
|
2140
|
+
for (const e of this.observers)
|
|
2141
|
+
e.update(this);
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
class Ys {
|
|
2145
|
+
constructor(e) {
|
|
2146
|
+
this.mapProcesses = /* @__PURE__ */ new Map(), this.processes = e, this.assignProcessManager();
|
|
2147
|
+
}
|
|
2148
|
+
assignProcessManager() {
|
|
2149
|
+
this.processes.addToManager(this);
|
|
2150
|
+
}
|
|
2151
|
+
setProcessToMap(e) {
|
|
2152
|
+
this.mapProcesses.set(e.name, e);
|
|
2153
|
+
}
|
|
2154
|
+
async start() {
|
|
2155
|
+
await this.processes.execute();
|
|
2156
|
+
}
|
|
2157
|
+
async startFrom(e) {
|
|
2158
|
+
const s = this.mapProcesses.get(e);
|
|
2159
|
+
if (!s)
|
|
2160
|
+
throw new Error(`Process ${e} not found`);
|
|
2161
|
+
await s.execute();
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
class Ns {
|
|
2165
|
+
constructor(e, s) {
|
|
2166
|
+
this.next = null, this.name = e, this.next = s;
|
|
2167
|
+
}
|
|
2168
|
+
addToManager(e) {
|
|
2169
|
+
e.setProcessToMap(this), this.next && this.next.addToManager(e);
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
class Bs {
|
|
2173
|
+
constructor() {
|
|
2174
|
+
this.checkAccessibility = this.checkAccessibility.bind(this), this.isAccessible = this.isAccessible.bind(this), this.getDestinationRouteName = this.getDestinationRouteName.bind(this);
|
|
2175
|
+
}
|
|
2176
|
+
async checkAccessibility(e, s, r) {
|
|
2177
|
+
if (await this.isAccessible(e, s)) {
|
|
2178
|
+
r();
|
|
2179
|
+
return;
|
|
2180
|
+
}
|
|
2181
|
+
if (await this.getDestinationRouteName()) {
|
|
2182
|
+
r({ name: await this.getDestinationRouteName() });
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
r(!1);
|
|
2186
|
+
}
|
|
2187
|
+
async getDestinationRouteName() {
|
|
2188
|
+
return "";
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
class Us {
|
|
2192
|
+
constructor(e, s, r) {
|
|
2193
|
+
this.scheduler = new ze({
|
|
2194
|
+
runAction: async () => {
|
|
2195
|
+
await this.fetchList();
|
|
2196
|
+
}
|
|
2197
|
+
}), this.repository = e, this.crudDataManagement = s, this.syncDetail = this.repository.getSyncDetail(), this.paramManager = r, this.syncListWithApi();
|
|
2198
|
+
}
|
|
2199
|
+
async fetchList() {
|
|
2200
|
+
const e = await this.repository.fetchList(this.paramManager.getRequestParams());
|
|
2201
|
+
return this.crudDataManagement.addOrReplaceItems(e.items), this.crudDataManagement.setTotalCount(e.totalItems), e;
|
|
2202
|
+
}
|
|
2203
|
+
async fetchItemById(e) {
|
|
2204
|
+
const s = await this.repository.fetchItemById(e);
|
|
2205
|
+
return s && this.crudDataManagement.addOrReplaceItems([s]), s;
|
|
2206
|
+
}
|
|
2207
|
+
async createItem(e) {
|
|
2208
|
+
const s = await this.repository.createItem(e);
|
|
2209
|
+
return s && !this.shouldRefreshListAfterCreate() && this.crudDataManagement.addOrReplaceItems([s]), s && this.shouldRefreshListAfterCreate() && await this.fetchList(), s;
|
|
2210
|
+
}
|
|
2211
|
+
shouldRefreshListAfterCreate() {
|
|
2212
|
+
return !0;
|
|
2213
|
+
}
|
|
2214
|
+
async deleteItem(e) {
|
|
2215
|
+
return await this.repository.deleteItem(e) ? this.crudDataManagement.removeById(e) : null;
|
|
2216
|
+
}
|
|
2217
|
+
async updateItem(e, s) {
|
|
2218
|
+
const r = await this.repository.updateItem(e, s);
|
|
2219
|
+
return this.shouldRefreshListAfterUpdate() && r ? (await this.fetchList(), this.crudDataManagement.getItemById(e)) : r;
|
|
2220
|
+
}
|
|
2221
|
+
shouldRefreshListAfterUpdate() {
|
|
2222
|
+
return !0;
|
|
2223
|
+
}
|
|
2224
|
+
async removeItem(e) {
|
|
2225
|
+
const s = await this.repository.deleteItem(e);
|
|
2226
|
+
return s && this.shouldRefreshListAfterDelete() && await this.fetchList(), s ? this.crudDataManagement.removeById(e) : null;
|
|
2227
|
+
}
|
|
2228
|
+
shouldRefreshListAfterDelete() {
|
|
2229
|
+
return !1;
|
|
2230
|
+
}
|
|
2231
|
+
syncListWithApi() {
|
|
2232
|
+
this.scheduler.clearInterval(), this.syncDetail.shouldKeepSync && this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond);
|
|
2233
|
+
}
|
|
2234
|
+
onDestroy() {
|
|
2235
|
+
this.crudDataManagement.clearItems(), this.clearInterval();
|
|
2236
|
+
}
|
|
2237
|
+
clearInterval() {
|
|
2238
|
+
this.scheduler.clearInterval();
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
class Jt {
|
|
2242
|
+
}
|
|
2243
|
+
class Vs extends Jt {
|
|
2244
|
+
search(e, s, r) {
|
|
2245
|
+
const a = [];
|
|
2246
|
+
e: for (const n of e)
|
|
2247
|
+
for (const i of r(n))
|
|
2248
|
+
if (W.removeSpacesFromString(String(i).toLowerCase()).indexOf(W.removeSpacesFromString(String(s).toLowerCase())) > -1) {
|
|
2249
|
+
a.push(n);
|
|
2250
|
+
continue e;
|
|
2251
|
+
}
|
|
2252
|
+
return a;
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
var Ke = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t.Visible = "visible", t))(Ke || {});
|
|
2256
|
+
class Hs {
|
|
2257
|
+
constructor(e) {
|
|
2258
|
+
this._visibilityControl = e, this.mangeVisibilityEvent();
|
|
2259
|
+
}
|
|
2260
|
+
mangeVisibilityEvent() {
|
|
2261
|
+
document.addEventListener("visibilitychange", (e) => {
|
|
2262
|
+
document.visibilityState === Ke.Hidden ? this._visibilityControl.screenInvisible(e) : this._visibilityControl.screenVisible(e);
|
|
2263
|
+
});
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
var Gt = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, R = (t, e, s, r) => {
|
|
2267
|
+
for (var a = r > 1 ? void 0 : r ? Wt(e, s) : e, n = t.length - 1, i; n >= 0; n--)
|
|
2268
|
+
(i = t[n]) && (a = (r ? i(e, s, a) : i(a)) || a);
|
|
2269
|
+
return r && a && Gt(e, s, a), a;
|
|
2270
|
+
};
|
|
2271
|
+
let ve = class {
|
|
2272
|
+
constructor() {
|
|
2273
|
+
this.value = "", this.symbol = "";
|
|
2274
|
+
}
|
|
2275
|
+
get tradeValueInNumber() {
|
|
2276
|
+
return Number(this.value);
|
|
2277
|
+
}
|
|
2278
|
+
get truncatedValue() {
|
|
2279
|
+
return this.tradeValueInNumber.toLocaleString("en-US", {
|
|
2280
|
+
maximumFractionDigits: 8
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
};
|
|
2284
|
+
R([
|
|
2285
|
+
N("value", String, !0)
|
|
2286
|
+
], ve.prototype, "value", 2);
|
|
2287
|
+
R([
|
|
2288
|
+
N("symbol", String)
|
|
2289
|
+
], ve.prototype, "symbol", 2);
|
|
2290
|
+
ve = R([
|
|
2291
|
+
Ae("Amount")
|
|
2292
|
+
], ve);
|
|
2293
|
+
let me = class {
|
|
2294
|
+
getTable() {
|
|
2295
|
+
const t = Object.getPrototypeOf(this)._table;
|
|
2296
|
+
if (!t)
|
|
2297
|
+
throw new Error(
|
|
2298
|
+
"No Table found for the model. are you sure decorated the model with @Table() ?"
|
|
2299
|
+
);
|
|
2300
|
+
return t;
|
|
2301
|
+
}
|
|
2302
|
+
};
|
|
2303
|
+
R([
|
|
2304
|
+
N("id", Number)
|
|
2305
|
+
], me.prototype, "id", 2);
|
|
2306
|
+
me = R([
|
|
2307
|
+
Ae("BaseModel")
|
|
2308
|
+
], me);
|
|
2309
|
+
let Z = class extends me {
|
|
2310
|
+
};
|
|
2311
|
+
R([
|
|
2312
|
+
N("symbol", String)
|
|
2313
|
+
], Z.prototype, "symbol", 2);
|
|
2314
|
+
R([
|
|
2315
|
+
N("enName", String)
|
|
2316
|
+
], Z.prototype, "enName", 2);
|
|
2317
|
+
R([
|
|
2318
|
+
N("faName", String)
|
|
2319
|
+
], Z.prototype, "faName", 2);
|
|
2320
|
+
R([
|
|
2321
|
+
N("image", String)
|
|
2322
|
+
], Z.prototype, "image", 2);
|
|
2323
|
+
Z = R([
|
|
2324
|
+
Ae("MinifiedSymbolModel")
|
|
2325
|
+
], Z);
|
|
2326
|
+
class qs {
|
|
2327
|
+
constructor(e, s) {
|
|
2328
|
+
this.requestedDate = e, this.executedDate = s;
|
|
2329
|
+
}
|
|
2330
|
+
get requestedDateInJalali() {
|
|
2331
|
+
return b.mapUnixToDate(this.requestedDate, Q.SimpleDate);
|
|
2332
|
+
}
|
|
2333
|
+
get requestedTime() {
|
|
2334
|
+
return b.mapUnixToDate(this.requestedDate, Q.JustHour);
|
|
2335
|
+
}
|
|
2336
|
+
get executedDateInJalali() {
|
|
2337
|
+
return b.mapUnixToDate(this.executedDate, Q.SimpleDate);
|
|
2338
|
+
}
|
|
2339
|
+
get executedDateTime() {
|
|
2340
|
+
return b.mapUnixToDate(this.executedDate, Q.JustHour);
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
class zs {
|
|
2344
|
+
constructor(e, s) {
|
|
2345
|
+
this.requestedAmount = e, this.executedAmount = s;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
class Js {
|
|
2349
|
+
constructor(e, s, r, a, n) {
|
|
2350
|
+
this.symbolPrice = e, this.USDTPrice = s, this.symobl = r, this.symbolImage = a, this.USDTImage = n;
|
|
2351
|
+
}
|
|
2352
|
+
get truncatedSymbolPrice() {
|
|
2353
|
+
return this.symbolPrice.toLocaleString("en-US", {
|
|
2354
|
+
maximumFractionDigits: 8
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
get truncatedUSDTPrice() {
|
|
2358
|
+
return this.USDTPrice.toLocaleString("en-US", {
|
|
2359
|
+
maximumFractionDigits: 8
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
class Gs {
|
|
2364
|
+
constructor(e, s) {
|
|
2365
|
+
this.soldSymbol = e, this.buySymbol = s;
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
export {
|
|
2369
|
+
je as APIErrorHandlerRegistry,
|
|
2370
|
+
js as AbstractSubject,
|
|
2371
|
+
He as AccessControl,
|
|
2372
|
+
fe as AccessLevel,
|
|
2373
|
+
Is as Action,
|
|
2374
|
+
ve as Amount,
|
|
2375
|
+
Os as ApiBuilder,
|
|
2376
|
+
ee as ApplicationDrawerStatus,
|
|
2377
|
+
Ts as ApplicationInitializer,
|
|
2378
|
+
Re as ApplicationTheme,
|
|
2379
|
+
qe as AuthorizationDirective,
|
|
2380
|
+
De as AuthorizationService,
|
|
2381
|
+
me as BaseModel,
|
|
2382
|
+
Nt as BaseTable,
|
|
2383
|
+
Bt as BehaviorSubject,
|
|
2384
|
+
Me as CellType,
|
|
2385
|
+
Vs as ClientArraySearch,
|
|
2386
|
+
Jt as ClientSearch,
|
|
2387
|
+
ys as Column,
|
|
2388
|
+
we as CommonMaskFormats,
|
|
2389
|
+
Us as CrudService,
|
|
2390
|
+
G as DateConverter,
|
|
2391
|
+
ts as DateDisabledOptions,
|
|
2392
|
+
Q as DateFormat,
|
|
2393
|
+
at as DateFormats,
|
|
2394
|
+
he as DateTools,
|
|
2395
|
+
Cs as DebounceService,
|
|
2396
|
+
T as DialogDimensions,
|
|
2397
|
+
ss as EveryAccess,
|
|
2398
|
+
as as EveryLevelAuthorizationDirective,
|
|
2399
|
+
Es as Feedback,
|
|
2400
|
+
As as FetchListResponse,
|
|
2401
|
+
ds as FormManager,
|
|
2402
|
+
de as FormValidationStatus,
|
|
2403
|
+
b as Formatter,
|
|
2404
|
+
Ls as HandleError,
|
|
2405
|
+
xs as HandleFeedback,
|
|
2406
|
+
be as HeaderType,
|
|
2407
|
+
ks as HttpClient,
|
|
2408
|
+
cs as InputControl,
|
|
2409
|
+
us as InputControlBuilder,
|
|
2410
|
+
Ft as InputControlData,
|
|
2411
|
+
Ye as JsonMapper,
|
|
2412
|
+
m as LoadingStatus,
|
|
2413
|
+
Z as MinifiedSymbolModel,
|
|
2414
|
+
Vt as Params,
|
|
2415
|
+
Ns as Process,
|
|
2416
|
+
Ys as ProcessManager,
|
|
2417
|
+
es as RangeValue,
|
|
2418
|
+
Bs as RouteGuard,
|
|
2419
|
+
ze as Scheduler,
|
|
2420
|
+
ps as SelectableTable,
|
|
2421
|
+
Pe as SimpleSort,
|
|
2422
|
+
rs as SomeAccess,
|
|
2423
|
+
ns as SomeLevelsAuthorizationDirective,
|
|
2424
|
+
We as SortDetail,
|
|
2425
|
+
Y as SortOrder,
|
|
2426
|
+
$t as SortOrderTableHeader,
|
|
2427
|
+
ms as Sorter,
|
|
2428
|
+
Pt as StatusCode,
|
|
2429
|
+
j as StorageKeys,
|
|
2430
|
+
Ce as StoreNames,
|
|
2431
|
+
Gs as SymbolInTrade,
|
|
2432
|
+
Js as SymbolPriceInTrade,
|
|
2433
|
+
_s as SyncDetail,
|
|
2434
|
+
vs as TABLE_ACTION_COLUMN,
|
|
2435
|
+
Ge as TABLE_COLUMN_DEFAULT_COLSPAN,
|
|
2436
|
+
Yt as TABLE_COLUMN_DEFAULT_VALUES,
|
|
2437
|
+
Je as TABLE_COLUMN_DEFAULT_WIDTH,
|
|
2438
|
+
Ss as Table,
|
|
2439
|
+
Ve as TableConstants,
|
|
2440
|
+
ws as TableDestroy,
|
|
2441
|
+
_e as TableHeaderAlign,
|
|
2442
|
+
Ds as TableRowClick,
|
|
2443
|
+
Ze as ToastLocation,
|
|
2444
|
+
$s as ToastMessage,
|
|
2445
|
+
zt as ToastType,
|
|
2446
|
+
hs as TouchSensitiveControl,
|
|
2447
|
+
zs as TradeAmount,
|
|
2448
|
+
qs as TradeDate,
|
|
2449
|
+
W as Util,
|
|
2450
|
+
Hs as VisibilityManager,
|
|
2451
|
+
Ke as VisibilityState,
|
|
2452
|
+
st as cards,
|
|
2453
|
+
gs as generateHeader,
|
|
2454
|
+
rt as ibans,
|
|
2455
|
+
jt as isEmpty,
|
|
2456
|
+
os as isLastItem,
|
|
2457
|
+
is as isOnlyOneItem,
|
|
2458
|
+
Tt as setupJalaliDate,
|
|
2459
|
+
ls as setupStore,
|
|
2460
|
+
Rs as useCrud,
|
|
2461
|
+
Ut as useData,
|
|
2462
|
+
Ps as useDialogService,
|
|
2463
|
+
Fs as useDrawerService,
|
|
2464
|
+
fs as useForm,
|
|
2465
|
+
qt as useLoadingStatus,
|
|
2466
|
+
Ht as useParams,
|
|
2467
|
+
bs as useRepository,
|
|
2468
|
+
Ms as useStaticTableService
|
|
2469
|
+
};
|