@sarafapp/iron_core 1.0.22 → 1.0.24
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 +46 -46
- package/dist/IronCore.umd.cjs +1 -1
- package/dist/src/lib/Constants.d.ts +2 -2
- package/package.json +1 -1
package/dist/IronCore.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import L from "dayjs";
|
|
2
|
-
import { toRaw as xe, reactive as
|
|
3
|
-
import { JsonConvert as tt, JsonProperty as
|
|
2
|
+
import { toRaw as xe, reactive as je, ref as M, watch as Qe, computed as I, onBeforeUnmount as et } from "vue";
|
|
3
|
+
import { JsonConvert as tt, JsonProperty as j, JsonObject as Ae } from "json2typescript";
|
|
4
4
|
import { defineStore as Ue } from "pinia";
|
|
5
|
-
var we = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(we || {}), Q = /* @__PURE__ */ ((t) => (t.FullDate = "
|
|
5
|
+
var we = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(we || {}), Q = /* @__PURE__ */ ((t) => (t.FullDate = "YYYY/M/D HH:mm", t.SimpleDate = "YYYY/M/D", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(Q || {});
|
|
6
6
|
const st = [
|
|
7
7
|
{
|
|
8
8
|
62198619: {
|
|
@@ -853,7 +853,7 @@ class b {
|
|
|
853
853
|
return L(new Date(e)).subtract(1, "day").format(s);
|
|
854
854
|
}
|
|
855
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 || {}), k = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(k || {}),
|
|
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 || {}), k = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(k || {}), N = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(N || {}), $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 || {}), Y = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(Y || {}), 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 || {}), Ft = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(Ft || {});
|
|
857
857
|
class W {
|
|
858
858
|
static getBankImageBaseOnCardInfo(e, s) {
|
|
859
859
|
return e === void 0 ? "/img/banks/shetab.png" : s === "IBAN" ? (e = b.toEnglishDigits(
|
|
@@ -912,8 +912,8 @@ class W {
|
|
|
912
912
|
""
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
static isArraySorted(e, s = (a) => a, r =
|
|
916
|
-
return e.every((a, n) => e.length - 1 === n ? !0 : r ===
|
|
915
|
+
static isArraySorted(e, s = (a) => a, r = N.ASC) {
|
|
916
|
+
return e.every((a, n) => e.length - 1 === n ? !0 : r === N.ASC ? s(a) <= s(e[n + 1]) : s(a) >= s(e[n + 1]));
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
const $ = class $ {
|
|
@@ -926,7 +926,7 @@ const $ = class $ {
|
|
|
926
926
|
this.availableAccesses.add(s);
|
|
927
927
|
}
|
|
928
928
|
setAccessListToStorage(e) {
|
|
929
|
-
localStorage.setItem(
|
|
929
|
+
localStorage.setItem(Y.AccessList, JSON.stringify(e));
|
|
930
930
|
}
|
|
931
931
|
everyAccess(e) {
|
|
932
932
|
return e.every((s) => this.availableAccesses.has(s));
|
|
@@ -935,10 +935,10 @@ const $ = class $ {
|
|
|
935
935
|
return e.some((s) => this.availableAccesses.has(s));
|
|
936
936
|
}
|
|
937
937
|
clearAvailableAccesses() {
|
|
938
|
-
this.availableAccesses.clear(), localStorage.removeItem(
|
|
938
|
+
this.availableAccesses.clear(), localStorage.removeItem(Y.AccessList);
|
|
939
939
|
}
|
|
940
940
|
initialize() {
|
|
941
|
-
const e = localStorage.getItem(
|
|
941
|
+
const e = localStorage.getItem(Y.AccessList);
|
|
942
942
|
e !== null && this.setAvailableAccesses(JSON.parse(e));
|
|
943
943
|
}
|
|
944
944
|
static GetInstance() {
|
|
@@ -981,10 +981,10 @@ const P = class P {
|
|
|
981
981
|
this.setAccessLevelsToStorage(e);
|
|
982
982
|
}
|
|
983
983
|
setAccessLevelsToStorage(e) {
|
|
984
|
-
localStorage.setItem(
|
|
984
|
+
localStorage.setItem(Y.SSO_ACCESS_LIST, JSON.stringify(e));
|
|
985
985
|
}
|
|
986
986
|
getAccessLevelsFromStorage() {
|
|
987
|
-
let e = localStorage.getItem(
|
|
987
|
+
let e = localStorage.getItem(Y.SSO_ACCESS_LIST);
|
|
988
988
|
return e !== null ? JSON.parse(e) : e;
|
|
989
989
|
}
|
|
990
990
|
getAccessLevelsOfScope(e) {
|
|
@@ -1008,7 +1008,7 @@ const P = class P {
|
|
|
1008
1008
|
return this._accessLevels.has(e);
|
|
1009
1009
|
}
|
|
1010
1010
|
clear() {
|
|
1011
|
-
localStorage.removeItem(
|
|
1011
|
+
localStorage.removeItem(Y.SSO_ACCESS_LIST), this._accessLevels = /* @__PURE__ */ new Map();
|
|
1012
1012
|
}
|
|
1013
1013
|
static GetInstance() {
|
|
1014
1014
|
return P._instance || (P._instance = new P()), P._instance;
|
|
@@ -1050,7 +1050,7 @@ class is extends qe {
|
|
|
1050
1050
|
return this._authorizationService.someAccess(e, s);
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class Yt {
|
|
1054
1054
|
constructor() {
|
|
1055
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
1056
|
}
|
|
@@ -1061,7 +1061,7 @@ function os(t) {
|
|
|
1061
1061
|
function ls(t, e) {
|
|
1062
1062
|
return t - 1 === e;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Nt(t) {
|
|
1065
1065
|
return String(t).length === 0 || t === null || t === void 0;
|
|
1066
1066
|
}
|
|
1067
1067
|
function cs(t) {
|
|
@@ -1069,10 +1069,10 @@ function cs(t) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
class us {
|
|
1071
1071
|
constructor(e, s) {
|
|
1072
|
-
this.initialData = null, this.data = new
|
|
1072
|
+
this.initialData = null, this.data = new Yt(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
|
|
1073
1073
|
}
|
|
1074
1074
|
shouldRunValidation() {
|
|
1075
|
-
return this.data.isRequired ? !0 : !
|
|
1075
|
+
return this.data.isRequired ? !0 : !Nt(this.data.value);
|
|
1076
1076
|
}
|
|
1077
1077
|
runValidation(e = !1) {
|
|
1078
1078
|
for (const s of this._validators) {
|
|
@@ -1269,7 +1269,7 @@ class fs {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
function vs(t) {
|
|
1272
|
-
const e =
|
|
1272
|
+
const e = je(t), s = M(
|
|
1273
1273
|
de.Invalid
|
|
1274
1274
|
);
|
|
1275
1275
|
return Qe(
|
|
@@ -1312,7 +1312,7 @@ const Je = "150px", Ge = 2, ms = {
|
|
|
1312
1312
|
align: _e.Center,
|
|
1313
1313
|
headerType: be.Text,
|
|
1314
1314
|
accessLevel: null
|
|
1315
|
-
},
|
|
1315
|
+
}, jt = {
|
|
1316
1316
|
width: Je,
|
|
1317
1317
|
align: _e.Center,
|
|
1318
1318
|
headerType: be.Text,
|
|
@@ -1348,17 +1348,17 @@ class Pe {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
class ps {
|
|
1350
1350
|
arrayOfObjectSort(e, s, r, a = new Pe()) {
|
|
1351
|
-
return r ===
|
|
1351
|
+
return r === N.ASC ? a.aSort(e, s) : a.bSort(e, s);
|
|
1352
1352
|
}
|
|
1353
1353
|
arraySort(e, s, r = new Pe()) {
|
|
1354
|
-
return s ===
|
|
1354
|
+
return s === N.ASC ? r.aSort(e) : r.bSort(e);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
1357
|
class Ut {
|
|
1358
1358
|
constructor(e) {
|
|
1359
1359
|
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new We(
|
|
1360
1360
|
"id",
|
|
1361
|
-
|
|
1361
|
+
N.DESC
|
|
1362
1362
|
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService = fe.GetInstance();
|
|
1363
1363
|
}
|
|
1364
1364
|
addHeader(e) {
|
|
@@ -1503,7 +1503,7 @@ class gs extends Ut {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
function ys(t) {
|
|
1505
1505
|
return {
|
|
1506
|
-
...
|
|
1506
|
+
...jt,
|
|
1507
1507
|
...t
|
|
1508
1508
|
};
|
|
1509
1509
|
}
|
|
@@ -1599,7 +1599,7 @@ function Vt() {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
class Ht {
|
|
1601
1601
|
constructor() {
|
|
1602
|
-
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new We("id",
|
|
1602
|
+
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new We("id", N.DESC), this.filters = [];
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
class _s {
|
|
@@ -1952,7 +1952,7 @@ const _ = class _ {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
};
|
|
1954
1954
|
_.handlers = /* @__PURE__ */ new Map(), _.instance = null;
|
|
1955
|
-
let
|
|
1955
|
+
let Ye = _;
|
|
1956
1956
|
class Ts {
|
|
1957
1957
|
constructor(e) {
|
|
1958
1958
|
this.axiosInstance = e;
|
|
@@ -2064,7 +2064,7 @@ const F = class F {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
};
|
|
2066
2066
|
F.Instance = null;
|
|
2067
|
-
let
|
|
2067
|
+
let Ne = F;
|
|
2068
2068
|
var Jt = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(Jt || {}), Ze = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(Ze || {});
|
|
2069
2069
|
class Ps {
|
|
2070
2070
|
constructor(e, s, r) {
|
|
@@ -2072,7 +2072,7 @@ class Ps {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
const Fs = Ue(Ce.Dialog, () => {
|
|
2075
|
-
const t =
|
|
2075
|
+
const t = je({
|
|
2076
2076
|
dialogComponent: null,
|
|
2077
2077
|
width: k.DefaultWidth,
|
|
2078
2078
|
height: k.DefaultHeight,
|
|
@@ -2110,7 +2110,7 @@ const Fs = Ue(Ce.Dialog, () => {
|
|
|
2110
2110
|
isDialogExists: e,
|
|
2111
2111
|
hasDefaultHeader: s
|
|
2112
2112
|
};
|
|
2113
|
-
}),
|
|
2113
|
+
}), Ys = Ue(Ce.Drawer, () => {
|
|
2114
2114
|
const t = M(ee.Close), e = I(() => t.value === ee.Open);
|
|
2115
2115
|
function s() {
|
|
2116
2116
|
t.value = ee.Close;
|
|
@@ -2124,7 +2124,7 @@ const Fs = Ue(Ce.Dialog, () => {
|
|
|
2124
2124
|
isDrawerOpen: e
|
|
2125
2125
|
};
|
|
2126
2126
|
});
|
|
2127
|
-
class
|
|
2127
|
+
class Ns {
|
|
2128
2128
|
constructor() {
|
|
2129
2129
|
this.observers = [];
|
|
2130
2130
|
}
|
|
@@ -2141,7 +2141,7 @@ class Ys {
|
|
|
2141
2141
|
e.update(this);
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
|
-
class
|
|
2144
|
+
class js {
|
|
2145
2145
|
constructor(e) {
|
|
2146
2146
|
this.mapProcesses = /* @__PURE__ */ new Map(), this.processes = e, this.assignProcessManager();
|
|
2147
2147
|
}
|
|
@@ -2289,10 +2289,10 @@ let ve = class {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
2291
2291
|
R([
|
|
2292
|
-
|
|
2292
|
+
j("value", String, !0)
|
|
2293
2293
|
], ve.prototype, "value", 2);
|
|
2294
2294
|
R([
|
|
2295
|
-
|
|
2295
|
+
j("symbol", String)
|
|
2296
2296
|
], ve.prototype, "symbol", 2);
|
|
2297
2297
|
ve = R([
|
|
2298
2298
|
Ae("Amount")
|
|
@@ -2308,7 +2308,7 @@ let me = class {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
};
|
|
2310
2310
|
R([
|
|
2311
|
-
|
|
2311
|
+
j("id", Number)
|
|
2312
2312
|
], me.prototype, "id", 2);
|
|
2313
2313
|
me = R([
|
|
2314
2314
|
Ae("BaseModel")
|
|
@@ -2316,16 +2316,16 @@ me = R([
|
|
|
2316
2316
|
let Z = class extends me {
|
|
2317
2317
|
};
|
|
2318
2318
|
R([
|
|
2319
|
-
|
|
2319
|
+
j("symbol", String)
|
|
2320
2320
|
], Z.prototype, "symbol", 2);
|
|
2321
2321
|
R([
|
|
2322
|
-
|
|
2322
|
+
j("enName", String)
|
|
2323
2323
|
], Z.prototype, "enName", 2);
|
|
2324
2324
|
R([
|
|
2325
|
-
|
|
2325
|
+
j("faName", String)
|
|
2326
2326
|
], Z.prototype, "faName", 2);
|
|
2327
2327
|
R([
|
|
2328
|
-
|
|
2328
|
+
j("image", String)
|
|
2329
2329
|
], Z.prototype, "image", 2);
|
|
2330
2330
|
Z = R([
|
|
2331
2331
|
Ae("MinifiedSymbolModel")
|
|
@@ -2373,8 +2373,8 @@ class Ws {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
2375
|
export {
|
|
2376
|
-
|
|
2377
|
-
|
|
2376
|
+
Ye as APIErrorHandlerRegistry,
|
|
2377
|
+
Ns as AbstractSubject,
|
|
2378
2378
|
He as AccessControl,
|
|
2379
2379
|
fe as AccessLevel,
|
|
2380
2380
|
ws as Action,
|
|
@@ -2414,13 +2414,13 @@ export {
|
|
|
2414
2414
|
ks as HttpClient,
|
|
2415
2415
|
us as InputControl,
|
|
2416
2416
|
hs as InputControlBuilder,
|
|
2417
|
-
|
|
2418
|
-
|
|
2417
|
+
Yt as InputControlData,
|
|
2418
|
+
Ne as JsonMapper,
|
|
2419
2419
|
m as LoadingStatus,
|
|
2420
2420
|
Z as MinifiedSymbolModel,
|
|
2421
2421
|
Ht as Params,
|
|
2422
2422
|
Us as Process,
|
|
2423
|
-
|
|
2423
|
+
js as ProcessManager,
|
|
2424
2424
|
ts as RangeValue,
|
|
2425
2425
|
Bs as RouteGuard,
|
|
2426
2426
|
ze as Scheduler,
|
|
@@ -2429,11 +2429,11 @@ export {
|
|
|
2429
2429
|
as as SomeAccess,
|
|
2430
2430
|
is as SomeLevelsAuthorizationDirective,
|
|
2431
2431
|
We as SortDetail,
|
|
2432
|
-
|
|
2432
|
+
N as SortOrder,
|
|
2433
2433
|
$t as SortOrderTableHeader,
|
|
2434
2434
|
ps as Sorter,
|
|
2435
2435
|
Pt as StatusCode,
|
|
2436
|
-
|
|
2436
|
+
Y as StorageKeys,
|
|
2437
2437
|
Ce as StoreNames,
|
|
2438
2438
|
Ws as SymbolInTrade,
|
|
2439
2439
|
Gs as SymbolPriceInTrade,
|
|
@@ -2441,7 +2441,7 @@ export {
|
|
|
2441
2441
|
bs as SyncDetail,
|
|
2442
2442
|
ms as TABLE_ACTION_COLUMN,
|
|
2443
2443
|
Ge as TABLE_COLUMN_DEFAULT_COLSPAN,
|
|
2444
|
-
|
|
2444
|
+
jt as TABLE_COLUMN_DEFAULT_VALUES,
|
|
2445
2445
|
Je as TABLE_COLUMN_DEFAULT_WIDTH,
|
|
2446
2446
|
Is as Table,
|
|
2447
2447
|
Ve as TableConstants,
|
|
@@ -2460,7 +2460,7 @@ export {
|
|
|
2460
2460
|
st as cards,
|
|
2461
2461
|
ys as generateHeader,
|
|
2462
2462
|
rt as ibans,
|
|
2463
|
-
|
|
2463
|
+
Nt as isEmpty,
|
|
2464
2464
|
ls as isLastItem,
|
|
2465
2465
|
os as isOnlyOneItem,
|
|
2466
2466
|
kt as setupJalaliDate,
|
|
@@ -2468,7 +2468,7 @@ export {
|
|
|
2468
2468
|
Cs as useCrud,
|
|
2469
2469
|
Vt as useData,
|
|
2470
2470
|
Fs as useDialogService,
|
|
2471
|
-
|
|
2471
|
+
Ys as useDrawerService,
|
|
2472
2472
|
vs as useForm,
|
|
2473
2473
|
zt as useLoadingStatus,
|
|
2474
2474
|
qt as useParams,
|
package/dist/IronCore.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(a,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],_):(a=typeof globalThis<"u"?globalThis:a||self,_(a.IronCore={},a.dayjs,a.Vue,a.json2typescript,a.pinia))})(this,function(a,_,g,M,Fe){"use strict";var re=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(re||{}),H=(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))(H||{});const Be=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایرانزمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],Ne=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var Ue=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(Ue||{});function ae(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={exports:{}},ct=ie.exports,Ye;function ut(){return Ye||(Ye=1,function(t,e){(function(s,r){t.exports=r()})(ct,function(){return function(s,r){r.prototype.weekday=function(i){var n=this.$locale().weekStart||0,o=this.$W,d=(o<n?o+7:o)-n;return this.$utils().u(i)?d:this.subtract(d,"day").add(i,"day")}}})}(ie)),ie.exports}var ht=ut();const dt=ae(ht);var ne={exports:{}},ft=ne.exports,Ve;function mt(){return Ve||(Ve=1,function(t,e){(function(s,r){t.exports=r()})(ft,function(){var s="week",r="year";return function(i,n,o){var d=n.prototype;d.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var y=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=o(this).startOf(r).add(1,r).date(y),h=o(this).endOf(s);if(m.isBefore(h))return 1}var v=o(this).startOf(r).date(y).startOf(s).subtract(1,"millisecond"),S=this.diff(v,s,!0);return S<0?o(this).startOf("week").week():Math.ceil(S)},d.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(ne)),ne.exports}var vt=mt();const gt=ae(vt);var oe={exports:{}},pt=oe.exports,je;function yt(){return je||(je=1,function(t,e){(function(s,r){t.exports=r()})(pt,function(){return function(s,r){r.prototype.weekYear=function(){var i=this.month(),n=this.week(),o=this.year();return n===1&&i===11?o+1:i===0&&n>=52?o-1:o}}})}(oe)),oe.exports}var St=yt();const It=ae(St);var le={exports:{}},Dt=le.exports,He;function wt(){return He||(He=1,function(t,e){(function(s,r){t.exports=r(_)})(Dt,function(s){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(s),n={name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(o){return o},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 سال"}};return i.default.locale(n,null,!0),n})}(le)),le.exports}var At=wt();const bt=ae(At);function ce(t,e){return _t(t)||Mt(t,e)||Ct()}function _t(t){if(Array.isArray(t))return t}function Mt(t,e){var s=[],r=!0,i=!1,n=void 0;try{for(var o=t[Symbol.iterator](),d;!(r=(d=o.next()).done)&&(s.push(d.value),!(e&&s.length===e));r=!0);}catch(u){i=!0,n=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw n}}return s}function Ct(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function qe(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),i=2-r+Math.floor(r/4),n=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+i-1524.5;return n}function Lt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return Et(h,m,y)}function Rt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return[Math.floor(h),Math.floor(m),Math.floor(y)]}function Tt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(S,A){return Math.floor(S/A)}t-=979;for(var o=365*t+n(t,33)*8+n(t%33+3,4),d=0;d<e-1;++d)o+=i[d];o+=s-1;var u=o+79,y=1600+400*n(u,146097);u=u%146097;var m=!0;for(u>=36525&&(u--,y+=100*n(u,36524),u=u%36524,u>=365?u++:m=!1),y+=4*n(u,1461),u%=1461,u>=366&&(m=!1,u--,y+=n(u,365),u=u%365),d=0;u>=r[d]+(d==1&&m);d++)u-=r[d]+(d==1&&m);var h=d+1,v=u+1;return qe(y,h,v)}function Et(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(W,x){return Math.floor(W/x)}for(var o=t-1600,d=e-1,u=s-1,y=365*o+n(o+3,4)-n(o+99,100)+n(o+399,400),m=0;m<d;++m)y+=r[m];d>1&&(t%4==0&&t%100!=0||t%400==0)&&y++,y+=u;var h=y-79,v=n(h,12053);h%=12053;var S=979+33*v+4*n(h,1461);h%=1461,h>=366&&(S+=n(h-1,365),h=(h-1)%365);for(var A=0;A<11&&h>=i[A];++A)h-=i[A];var J=A+1,G=h+1;return[S,J,G]}var ue={J:function(e,s,r){return Lt(qe(e,s,r))},G:function(e,s,r){return Rt(Tt(e,s,r))}},Ot=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,kt=/\[.*?\]|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",q="day",P="month",$="year",ze="week",Pt="YYYY-MM-DDTHH:mm:ssZ",$t={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},Ft=function(t,e,s){var r=e.prototype,i=r.$utils(),n=function(c){return c.$C==="jalali"},o=i.prettyUnit||i.p,d=i.isUndefined||i.u,u=i.padStart||i.s,y=i.monthDiff||i.m,m=i.absFloor||i.a,h=function(c){return function(){var f=c.bind(this).apply(void 0,arguments);return f.$C=this.$C,f.isJalali()&&f.InitJalali(),f}};r.startOf=h(r.startOf),r.endOf=h(r.endOf),r.add=h(r.add),r.subtract=h(r.subtract),r.set=h(r.set);var v=r.parse,S=r.init,A=r.startOf,J=r.$set,G=r.add,W=r.format,x=r.diff,ke=r.year,Pe=r.month,ge=r.date,$e=r.daysInMonth,te=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(l){return s.$C=l,s},r.calendar=function(l){var c=this.clone();return c.$C=l,c.isJalali()&&c.InitJalali(),c},r.isJalali=function(){return n(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},bt,{},$t),!0);var K=function(c,f){return s(c,{locale:f.$L,utc:f.$u,calendar:f.$C})};r.init=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(l),this.isJalali()&&this.InitJalali()},r.parse=function(l){var c;if(this.$C=l.calendar||this.$C||s.$C,l.jalali&&typeof l.date=="string"&&/.*[^Z]$/i.test(l.date)&&(c=l.date.match(Ot))){var f=ue.G(parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||1,10)),D=ce(f,3),w=D[0],I=D[1],b=D[2];l.date="".concat(w,"-").concat(I,"-").concat(b).concat(c[4]||"")}return v.bind(this)(l)},r.InitJalali=function(){var l=ue.J(this.$y,this.$M+1,this.$D),c=ce(l,3),f=c[0],D=c[1],w=c[2];this.$jy=f,this.$jM=D-1,this.$jD=w},r.startOf=function(l,c){var f=this;if(!n(this))return A.bind(this)(l,c);var D=d(c)?!0:c,w=o(l),I=function(Z,V){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,ye=ue.G(T,V+1,Z),j=ce(ye,3),se=j[0],Se=j[1],$s=j[2],lt=K(new Date(se,Se-1,$s),f);return(D?lt:lt.endOf(q)).$set("hour",1)},b=(this.$W+(7-s.$fdow))%7;switch(w){case $:return D?I(1,0):I(0,0,this.$jy+1);case P:return D?I(1,this.$jM):I(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case ze:return D?I(this.$jD-b,this.$jM):I(this.$jD+(6-b),this.$jM);default:return A.bind(this)(l,c)}},r.$set=function(l,c){var f=this;if(!n(this))return J.bind(this)(l,c);var D=o(l),w=function(b,pe){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,V=ue.G(Z,pe+1,b),T=ce(V,3),ye=T[0],j=T[1],se=T[2];return f.$d.setFullYear(ye),f.$d.setMonth(j-1),f.$d.setDate(se),f};switch(D){case Ie:case q:w(c,this.$jM);break;case P:w(this.$jD,c);break;case $:w(this.$jD,this.$jM,c);break;default:return J.bind(this)(l,c)}return this.init(),this},r.add=function(l,c){var f=this;if(!n(this))return G.bind(this)(l,c);l=Number(l);var D=c&&(c.length===1||c==="ms")?c:o(c),w=function(j,se){var Se=f.set(Ie,1).set(j,se+l);return Se.set(Ie,Math.min(f.$jD,Se.daysInMonth()))};if(["M",P].indexOf(D)>-1){var I=this.$jM+l,b=I<0?-Math.ceil(-I/12):Math.floor(I/12),pe=this.$jD,Z=this.set(q,1).add(b,$).set(P,I-b*12);return Z.set(q,Math.min(Z.daysInMonth(),pe))}if(["y",$].indexOf(D)>-1)return w($,this.$jy);if(["d",q].indexOf(D)>-1){var V=new Date(this.$d);return V.setDate(V.getDate()+l),K(V,this)}if(["w",ze].indexOf(D)>-1){var T=new Date(this.$d);return T.setDate(T.getDate()+l*7),K(T,this)}return G.bind(this)(l,c)},r.format=function(l,c){var f=this;if(!n(this))return W.bind(this)(l,c);var D=l||Pt,w=c||this.$locale(),I=w.jmonths;return D.replace(kt,function(b){if(b.indexOf("[")>-1)return b.replace(/\[|\]/g,"");switch(b){case"YY":return String(f.$jy).slice(-2);case"YYYY":return String(f.$jy);case"M":return String(f.$jM+1);case"MM":return u(f.$jM+1,2,"0");case"MMM":return I[f.$jM].slice(0,3);case"MMMM":return I[f.$jM];case"D":return String(f.$jD);case"DD":return u(f.$jD,2,"0");default:return W.bind(f)(b,c)}})},r.diff=function(l,c,f){if(!n(this))return x.bind(this)(l,c,f);var D=o(c),w=s(l),I=y(this,w);switch(D){case $:I/=12;break;case P:break;default:return x.bind(this)(l,c,f)}return f?I:m(I)},r.$g=function(l,c,f){return d(l)?this[c]:this.set(f,l)},r.year=function(l){return n(this)?this.$g(l,"$jy",$):ke.bind(this)(l)},r.month=function(l){return n(this)?this.$g(l,"$jM",P):Pe.bind(this)(l)},r.date=function(l){return n(this)?this.$g(l,"$jD",q):ge.bind(this)(l)},r.daysInMonth=function(){return n(this)?this.endOf(P).$jD:$e.bind(this)()},te&&(r.toArray=function(){return n(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:te.bind(this)()}),r.clone=function(){return K(this.toDate(),this)}};const Bt={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function Je(){_.extend(Ft),_.calendar("jalali"),_.extend(dt),_.extend(gt),_.extend(It),_.locale(Bt,{},!0)}class Nt{constructor(e,s){this.start=e,this.end=s}}class Ut{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return _.unix(e).endOf("day").unix()}}class X{static isDateDisabled(e,s){for(const r of e.disabledDates)if(X.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&X.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&X.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}Je();class C{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return C.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",i=0,n=0;for(;i<e.length;){if(e[i]==="#"){if(n>=s.length)throw new Error("Value length does not match the format.");r+=s[n],n++}else r+=e[i];i++}if(n!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return C.applyMask(re.BankCard,String(e))}static applyIbanMask(e){return C.applyMask(re.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],i=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(n=>i[s.indexOf(n)]||i[r.indexOf(n)]||n).join("")}static mapUnixToDate(e,s){return _(new Date(e)).subtract(1,"day").format(s)}}var p=(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))(p||{}),E=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(E||{}),O=(t=>(t.ASC="ASC",t.DESC="DESC",t))(O||{}),Ge=(t=>(t.ASC="ascend",t.DESC="descend",t))(Ge||{}),he=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(he||{}),de=(t=>(t.Text="text",t))(de||{}),fe=(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))(fe||{}),De=(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))(De||{});a.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(a.ApplicationTheme||{});var z=(t=>(t.Open="open",t.Close="close",t))(z||{}),We=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(We||{}),Q=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(Q||{}),k=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(k||{});a.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(a.ApplicationTheme||{});var me=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(me||{}),xe=(t=>(t.USDT="USDT",t))(xe||{});class B{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=C.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${B.iban(e).english}.png`):(e=C.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${B.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=Be.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=Ne.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=B.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,i,n,o;return((o=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:o.slice(1,((n=(i=e.headers["content-disposition"])==null?void 0:i.split("filename="))==null?void 0:n[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=i=>i,r=O.ASC){return e.every((i,n)=>e.length-1===n?!0:r===O.ASC?s(i)<=s(e[n+1]):s(i)>=s(e[n+1]))}}const N=class N{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(k.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(k.AccessList)}initialize(){const e=localStorage.getItem(k.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return N.Instance||(N.Instance=new N),N.Instance}};N.Instance=null;let ee=N;class we{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=ee.GetInstance()}}class Yt extends we{hasAccess(e){return this.accessService.everyAccess(e)}}class Vt extends we{hasAccess(e){return this.accessService.someAccess(e)}}const U=class U{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(k.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(k.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(i=>r.has(i)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(i=>r.has(i)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(k.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return U._instance||(U._instance=new U),U._instance}};U._instance=null;let ve=U;class Ae{constructor(){this._authorizationService=ve.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)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const i=this.getAccessLevels(s,r);this.hasAccess(s,i)||e.remove()}getAccessLevels(e,s){var i;let r=Object.keys(s);return r.length||(r=Array.from(((i=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:i.values())??[])),r}}class jt extends Ae{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class Ht extends Ae{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class Ke{constructor(){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}}function qt(t){return t===1}function zt(t,e){return t-1===e}function Ze(t){return String(t).length===0||t===null||t===void 0}function Jt(t){t()}class Gt{constructor(e,s){this.initialData=null,this.data=new Ke,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.isRequired?!0:!Ze(this.data.value)}runValidation(e=!1){for(const s of this._validators){const r=s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
|
|
1
|
+
(function(a,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],_):(a=typeof globalThis<"u"?globalThis:a||self,_(a.IronCore={},a.dayjs,a.Vue,a.json2typescript,a.pinia))})(this,function(a,_,g,M,Fe){"use strict";var re=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(re||{}),H=(t=>(t.FullDate="YYYY/M/D HH:mm",t.SimpleDate="YYYY/M/D",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(H||{});const Be=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایرانزمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],Ne=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var Ue=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(Ue||{});function ae(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={exports:{}},ct=ie.exports,Ye;function ut(){return Ye||(Ye=1,function(t,e){(function(s,r){t.exports=r()})(ct,function(){return function(s,r){r.prototype.weekday=function(i){var n=this.$locale().weekStart||0,o=this.$W,d=(o<n?o+7:o)-n;return this.$utils().u(i)?d:this.subtract(d,"day").add(i,"day")}}})}(ie)),ie.exports}var ht=ut();const dt=ae(ht);var ne={exports:{}},ft=ne.exports,Ve;function mt(){return Ve||(Ve=1,function(t,e){(function(s,r){t.exports=r()})(ft,function(){var s="week",r="year";return function(i,n,o){var d=n.prototype;d.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var y=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=o(this).startOf(r).add(1,r).date(y),h=o(this).endOf(s);if(m.isBefore(h))return 1}var v=o(this).startOf(r).date(y).startOf(s).subtract(1,"millisecond"),S=this.diff(v,s,!0);return S<0?o(this).startOf("week").week():Math.ceil(S)},d.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(ne)),ne.exports}var vt=mt();const gt=ae(vt);var oe={exports:{}},pt=oe.exports,je;function yt(){return je||(je=1,function(t,e){(function(s,r){t.exports=r()})(pt,function(){return function(s,r){r.prototype.weekYear=function(){var i=this.month(),n=this.week(),o=this.year();return n===1&&i===11?o+1:i===0&&n>=52?o-1:o}}})}(oe)),oe.exports}var St=yt();const It=ae(St);var le={exports:{}},Dt=le.exports,He;function wt(){return He||(He=1,function(t,e){(function(s,r){t.exports=r(_)})(Dt,function(s){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(s),n={name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(o){return o},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 سال"}};return i.default.locale(n,null,!0),n})}(le)),le.exports}var At=wt();const bt=ae(At);function ce(t,e){return _t(t)||Mt(t,e)||Ct()}function _t(t){if(Array.isArray(t))return t}function Mt(t,e){var s=[],r=!0,i=!1,n=void 0;try{for(var o=t[Symbol.iterator](),d;!(r=(d=o.next()).done)&&(s.push(d.value),!(e&&s.length===e));r=!0);}catch(u){i=!0,n=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw n}}return s}function Ct(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function qe(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),i=2-r+Math.floor(r/4),n=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+i-1524.5;return n}function Lt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return Et(h,m,y)}function Rt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return[Math.floor(h),Math.floor(m),Math.floor(y)]}function Tt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(S,A){return Math.floor(S/A)}t-=979;for(var o=365*t+n(t,33)*8+n(t%33+3,4),d=0;d<e-1;++d)o+=i[d];o+=s-1;var u=o+79,y=1600+400*n(u,146097);u=u%146097;var m=!0;for(u>=36525&&(u--,y+=100*n(u,36524),u=u%36524,u>=365?u++:m=!1),y+=4*n(u,1461),u%=1461,u>=366&&(m=!1,u--,y+=n(u,365),u=u%365),d=0;u>=r[d]+(d==1&&m);d++)u-=r[d]+(d==1&&m);var h=d+1,v=u+1;return qe(y,h,v)}function Et(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(W,x){return Math.floor(W/x)}for(var o=t-1600,d=e-1,u=s-1,y=365*o+n(o+3,4)-n(o+99,100)+n(o+399,400),m=0;m<d;++m)y+=r[m];d>1&&(t%4==0&&t%100!=0||t%400==0)&&y++,y+=u;var h=y-79,v=n(h,12053);h%=12053;var S=979+33*v+4*n(h,1461);h%=1461,h>=366&&(S+=n(h-1,365),h=(h-1)%365);for(var A=0;A<11&&h>=i[A];++A)h-=i[A];var J=A+1,G=h+1;return[S,J,G]}var ue={J:function(e,s,r){return Lt(qe(e,s,r))},G:function(e,s,r){return Rt(Tt(e,s,r))}},Ot=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,kt=/\[.*?\]|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",q="day",P="month",$="year",ze="week",Pt="YYYY-MM-DDTHH:mm:ssZ",$t={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},Ft=function(t,e,s){var r=e.prototype,i=r.$utils(),n=function(c){return c.$C==="jalali"},o=i.prettyUnit||i.p,d=i.isUndefined||i.u,u=i.padStart||i.s,y=i.monthDiff||i.m,m=i.absFloor||i.a,h=function(c){return function(){var f=c.bind(this).apply(void 0,arguments);return f.$C=this.$C,f.isJalali()&&f.InitJalali(),f}};r.startOf=h(r.startOf),r.endOf=h(r.endOf),r.add=h(r.add),r.subtract=h(r.subtract),r.set=h(r.set);var v=r.parse,S=r.init,A=r.startOf,J=r.$set,G=r.add,W=r.format,x=r.diff,ke=r.year,Pe=r.month,ge=r.date,$e=r.daysInMonth,te=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(l){return s.$C=l,s},r.calendar=function(l){var c=this.clone();return c.$C=l,c.isJalali()&&c.InitJalali(),c},r.isJalali=function(){return n(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},bt,{},$t),!0);var K=function(c,f){return s(c,{locale:f.$L,utc:f.$u,calendar:f.$C})};r.init=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(l),this.isJalali()&&this.InitJalali()},r.parse=function(l){var c;if(this.$C=l.calendar||this.$C||s.$C,l.jalali&&typeof l.date=="string"&&/.*[^Z]$/i.test(l.date)&&(c=l.date.match(Ot))){var f=ue.G(parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||1,10)),D=ce(f,3),w=D[0],I=D[1],b=D[2];l.date="".concat(w,"-").concat(I,"-").concat(b).concat(c[4]||"")}return v.bind(this)(l)},r.InitJalali=function(){var l=ue.J(this.$y,this.$M+1,this.$D),c=ce(l,3),f=c[0],D=c[1],w=c[2];this.$jy=f,this.$jM=D-1,this.$jD=w},r.startOf=function(l,c){var f=this;if(!n(this))return A.bind(this)(l,c);var D=d(c)?!0:c,w=o(l),I=function(Z,V){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,ye=ue.G(T,V+1,Z),j=ce(ye,3),se=j[0],Se=j[1],$s=j[2],lt=K(new Date(se,Se-1,$s),f);return(D?lt:lt.endOf(q)).$set("hour",1)},b=(this.$W+(7-s.$fdow))%7;switch(w){case $:return D?I(1,0):I(0,0,this.$jy+1);case P:return D?I(1,this.$jM):I(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case ze:return D?I(this.$jD-b,this.$jM):I(this.$jD+(6-b),this.$jM);default:return A.bind(this)(l,c)}},r.$set=function(l,c){var f=this;if(!n(this))return J.bind(this)(l,c);var D=o(l),w=function(b,pe){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,V=ue.G(Z,pe+1,b),T=ce(V,3),ye=T[0],j=T[1],se=T[2];return f.$d.setFullYear(ye),f.$d.setMonth(j-1),f.$d.setDate(se),f};switch(D){case Ie:case q:w(c,this.$jM);break;case P:w(this.$jD,c);break;case $:w(this.$jD,this.$jM,c);break;default:return J.bind(this)(l,c)}return this.init(),this},r.add=function(l,c){var f=this;if(!n(this))return G.bind(this)(l,c);l=Number(l);var D=c&&(c.length===1||c==="ms")?c:o(c),w=function(j,se){var Se=f.set(Ie,1).set(j,se+l);return Se.set(Ie,Math.min(f.$jD,Se.daysInMonth()))};if(["M",P].indexOf(D)>-1){var I=this.$jM+l,b=I<0?-Math.ceil(-I/12):Math.floor(I/12),pe=this.$jD,Z=this.set(q,1).add(b,$).set(P,I-b*12);return Z.set(q,Math.min(Z.daysInMonth(),pe))}if(["y",$].indexOf(D)>-1)return w($,this.$jy);if(["d",q].indexOf(D)>-1){var V=new Date(this.$d);return V.setDate(V.getDate()+l),K(V,this)}if(["w",ze].indexOf(D)>-1){var T=new Date(this.$d);return T.setDate(T.getDate()+l*7),K(T,this)}return G.bind(this)(l,c)},r.format=function(l,c){var f=this;if(!n(this))return W.bind(this)(l,c);var D=l||Pt,w=c||this.$locale(),I=w.jmonths;return D.replace(kt,function(b){if(b.indexOf("[")>-1)return b.replace(/\[|\]/g,"");switch(b){case"YY":return String(f.$jy).slice(-2);case"YYYY":return String(f.$jy);case"M":return String(f.$jM+1);case"MM":return u(f.$jM+1,2,"0");case"MMM":return I[f.$jM].slice(0,3);case"MMMM":return I[f.$jM];case"D":return String(f.$jD);case"DD":return u(f.$jD,2,"0");default:return W.bind(f)(b,c)}})},r.diff=function(l,c,f){if(!n(this))return x.bind(this)(l,c,f);var D=o(c),w=s(l),I=y(this,w);switch(D){case $:I/=12;break;case P:break;default:return x.bind(this)(l,c,f)}return f?I:m(I)},r.$g=function(l,c,f){return d(l)?this[c]:this.set(f,l)},r.year=function(l){return n(this)?this.$g(l,"$jy",$):ke.bind(this)(l)},r.month=function(l){return n(this)?this.$g(l,"$jM",P):Pe.bind(this)(l)},r.date=function(l){return n(this)?this.$g(l,"$jD",q):ge.bind(this)(l)},r.daysInMonth=function(){return n(this)?this.endOf(P).$jD:$e.bind(this)()},te&&(r.toArray=function(){return n(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:te.bind(this)()}),r.clone=function(){return K(this.toDate(),this)}};const Bt={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function Je(){_.extend(Ft),_.calendar("jalali"),_.extend(dt),_.extend(gt),_.extend(It),_.locale(Bt,{},!0)}class Nt{constructor(e,s){this.start=e,this.end=s}}class Ut{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return _.unix(e).endOf("day").unix()}}class X{static isDateDisabled(e,s){for(const r of e.disabledDates)if(X.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&X.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&X.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}Je();class C{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return C.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",i=0,n=0;for(;i<e.length;){if(e[i]==="#"){if(n>=s.length)throw new Error("Value length does not match the format.");r+=s[n],n++}else r+=e[i];i++}if(n!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return C.applyMask(re.BankCard,String(e))}static applyIbanMask(e){return C.applyMask(re.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],i=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(n=>i[s.indexOf(n)]||i[r.indexOf(n)]||n).join("")}static mapUnixToDate(e,s){return _(new Date(e)).subtract(1,"day").format(s)}}var p=(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))(p||{}),E=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(E||{}),O=(t=>(t.ASC="ASC",t.DESC="DESC",t))(O||{}),Ge=(t=>(t.ASC="ascend",t.DESC="descend",t))(Ge||{}),he=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(he||{}),de=(t=>(t.Text="text",t))(de||{}),fe=(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))(fe||{}),De=(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))(De||{});a.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(a.ApplicationTheme||{});var z=(t=>(t.Open="open",t.Close="close",t))(z||{}),We=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(We||{}),Q=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(Q||{}),k=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(k||{});a.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(a.ApplicationTheme||{});var me=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(me||{}),xe=(t=>(t.USDT="USDT",t))(xe||{});class B{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=C.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${B.iban(e).english}.png`):(e=C.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${B.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=Be.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=Ne.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=B.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,i,n,o;return((o=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:o.slice(1,((n=(i=e.headers["content-disposition"])==null?void 0:i.split("filename="))==null?void 0:n[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=i=>i,r=O.ASC){return e.every((i,n)=>e.length-1===n?!0:r===O.ASC?s(i)<=s(e[n+1]):s(i)>=s(e[n+1]))}}const N=class N{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(k.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(k.AccessList)}initialize(){const e=localStorage.getItem(k.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return N.Instance||(N.Instance=new N),N.Instance}};N.Instance=null;let ee=N;class we{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=ee.GetInstance()}}class Yt extends we{hasAccess(e){return this.accessService.everyAccess(e)}}class Vt extends we{hasAccess(e){return this.accessService.someAccess(e)}}const U=class U{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(k.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(k.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(i=>r.has(i)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(i=>r.has(i)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(k.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return U._instance||(U._instance=new U),U._instance}};U._instance=null;let ve=U;class Ae{constructor(){this._authorizationService=ve.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)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const i=this.getAccessLevels(s,r);this.hasAccess(s,i)||e.remove()}getAccessLevels(e,s){var i;let r=Object.keys(s);return r.length||(r=Array.from(((i=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:i.values())??[])),r}}class jt extends Ae{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class Ht extends Ae{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class Ke{constructor(){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}}function qt(t){return t===1}function zt(t,e){return t-1===e}function Ze(t){return String(t).length===0||t===null||t===void 0}function Jt(t){t()}class Gt{constructor(e,s){this.initialData=null,this.data=new Ke,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.isRequired?!0:!Ze(this.data.value)}runValidation(e=!1){for(const s of this._validators){const r=s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
|
|
2
2
|
the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation()}get value(){return this.data.value}}class Wt{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}build(){return this._inputControl}}class xt{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class Kt{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}runValidation(){for(const e of this.getInputControlsAsArray())if(!e.getIsValid()){this._isValid=!1;return}this._isValid=!0}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function Zt(t){const e=g.reactive(t),s=g.ref(Q.Invalid);return g.watch(()=>e.getInputControlsAsArray(),()=>{e.runValidation(),e.getIsValid()?s.value=Q.Valid:s.value=Q.Invalid},{immediate:!0,deep:!0}),{reactiveForm:e,validationStatus:s}}class be{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const _e="150px",Me=2,Xt={path:"id",key:"id",title:"عملیات",colspan:Me,width:_e,cellType:fe.ACTION,align:he.Center,headerType:de.Text,accessLevel:null},Xe={width:_e,align:he.Center,headerType:de.Text,cellType:fe.Text,colspan:Me};class Ce{constructor(e,s){this.key=e,this.order=s}}class Le{aSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return n.localeCompare(o);if(typeof n=="number"&&typeof o=="number")return n-o;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return o.localeCompare(n);if(typeof n=="number"&&typeof o=="number")return o-n;throw new Error("Not supported data type")})}}class Qt{arrayOfObjectSort(e,s,r,i=new Le){return r===O.ASC?i.aSort(e,s):i.bSort(e,s)}arraySort(e,s,r=new Le){return s===O.ASC?r.aSort(e):r.bSort(e)}}class Qe{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ce("id",O.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=ee.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return De.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(p.Search)||e.has(p.FetchList)||e.has(p.Sort)||e.has(p.FetchLastItems)||e.has(p.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class et{constructor(e){this.observers=[],this.next(e)}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class es extends Qe{constructor(e){super(e),this.selectedRows=new et(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)}rowSelect(e){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()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function ts(t){return{...Xe,...t}}function ss(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function rs(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function i(d){const u=[],y=s.prototype.actions||[];for(const m of y){if(!m.isAvailable(d))continue;const h={handler:m.handler.bind(d),accessLevel:m.accessLevel,actionName:m.actionName};u.push(h)}return u}async function n(d){s.prototype.rowClick&&await s.prototype.rowClick.call(d)}async function o(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=i,t.prototype.handleClick=n,t.prototype.onDestroy=o}}function as(t){return function(s,r,i){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=i.value,s.constructor.prototype.actions.push(t)}}function is(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function ns(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}function tt(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function i(v){e.value=v}function n(v){for(const S of v)o(S)}function o(v){t.value.set(v.id,v)}function d(v){return s.value=t.value.get(v)||null,s.value}function u(v){const S=d(v);return S&&t.value.delete(v),!!S}function y(){t.value.clear()}function m(v){s.value=v}function h(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:i,addOrReplaceItems:n,getById:d,removeById:u,clearItems:y,setCurrentItem:m,clearCurrentItem:h}}class st{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ce("id",O.DESC),this.filters=[]}}class os{constructor(e,s){this.items=e,this.totalItems=s}}class ls{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const rt=new st;function at(){const t=g.ref(structuredClone(rt));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(h){t.value.pageNumber=h}function i(h){t.value.itemCount=h}function n(h){t.value.sortDetail.key=h.key,t.value.sortDetail.order=h.order}function o(h){for(const v in h)d(v,h[v])}function d(h,v){const S=t.value.filters.findIndex(A=>A.key===h);S>-1?t.value.filters[S].value=v:t.value.filters.push({key:h,value:v})}function u(h){let v=t.value.filters;v=v.filter(S=>S.key!==h),t.value.filters=v}function y(){const h={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(h.by=t.value.sortDetail.key,h.order=t.value.sortDetail.order);for(const v of t.value.filters)if(v.value)if(typeof v.value=="string"||typeof v.value=="number")h[v.key]=v.value;else{const S=JSON.stringify(v.value);S!=="[]"&&S!=="{}"&&(h[v.key]=S)}return h}function m(){t.value=structuredClone(rt)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:i,setSortDetail:n,setFilter:d,removeFilter:u,getRequestParams:y,clearParam:m,setFiltersBaseOnRequestBody:o}}function it(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(p.FetchList)),s=g.computed(()=>t.value.has(p.FetchItem)),r=g.computed(()=>t.value.has(p.FetchLastItems)),i=g.computed(()=>t.value.has(p.FetchPreviousItems)),n=g.computed(()=>t.value.has(p.Create)),o=g.computed(()=>t.value.has(p.Update)),d=g.computed(()=>t.value.has(p.Delete)),u=g.computed(()=>t.value.has(p.Search)),y=g.computed(()=>t.value.has(p.Sort));function m(v){t.value.add(v)}function h(v){t.value.delete(v)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:i,isCreating:n,isUpdating:o,isDeleting:d,isSearching:u,isSorting:y,setStatus:m,removeStatus:h}}function cs(t){const e=tt(),s=at(),r=it(),i=new be({runAction:async()=>h(p.AutoRefresh)}),n=g.computed(()=>{const l=s.params.value.pageNumber,c=s.params.value.itemCount,f=l*c-c,D=l*c-1,w=[];for(let I=f;I<=D&&e.itemsAsArray.value[I];I++)w.push(e.itemsAsArray.value[I]);return w}),o=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:n.value})),d=g.computed(()=>({getData:y,sort:te,paginate:ge,fetchRows:h})),u=g.computed(()=>t.getSyncDetail());function y(){return o.value}async function m(l){const c=await t.fetchList(l);return e.clearItems(),e.addOrReplaceItems(c.items),e.setTotalCount(c.totalItems),c}async function h(l=p.FetchList){r.setStatus(l);const c=await m(s.getRequestParams());return r.removeStatus(l),c}async function v(){S(),await h()}function S(){if(!u.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");i.setupInterval(u.value.intervalInMillisecond)}function A(){i.clearInterval()}async function J(l,c=!0){r.setStatus(p.FetchItem),c&&e.clearCurrentItem();const f=await t.fetchItemById(l);return e.setCurrentItem(f),r.removeStatus(p.FetchItem),f}async function G(l){r.setStatus(p.Create);const c=await t.createItem(l);return c&&e.addOrReplaceItems([c]),r.removeStatus(p.Create),c}async function W(l,c){r.setStatus(p.Update);const f=await t.updateItem(l,c);return f&&e.addOrReplaceItems([f]),r.removeStatus(p.Update),f}async function x(l){return r.setStatus(p.Delete),await t.deleteItem(l),r.removeStatus(p.Delete),e.removeById(l)}async function ke(){s.setNextPage(),r.setStatus(p.FetchLastItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchLastItems),l}async function Pe(){s.setPreventPage(),r.setStatus(p.FetchPreviousItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchPreviousItems),l}async function ge(l){s.setPageNumber(l),r.setStatus(p.FetchList);const c=await m(s.getRequestParams());return r.removeStatus(p.FetchList),c}async function $e(l){s.setFilter("search",l),r.setStatus(p.Search),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Search),c}async function te(l){s.setSortDetail(l),r.setStatus(p.Sort),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Sort),c}async function K(){return s.clearParam(),await h()}return g.onBeforeUnmount(()=>{A()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:o,fetchList:h,fetchWithAutoRefresh:v,setupAutoRefresh:S,stopAutoRefresh:A,fetchItemById:J,createItem:G,updateItem:W,deleteItem:x,fetchLastItems:ke,fetchPreviousItems:Pe,fetchItemsByPageNumber:ge,search:$e,sort:te,clearFilters:K,tableService:d,currentPageItems:n}}function us(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,i){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function hs(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function i(m){e.value=m}function n(m){for(const h of m)o(h)}function o(m){t.value.set(String(m.id),m)}function d(m){const h=u(m);return t.value.delete(String(m)),h}function u(m){return t.value.get(String(m))||null}function y(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:n,removeById:d,getItemById:u,clearItems:y,setTotalCount:i,getTotalCount:s}}class ds{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function fs(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{return await i.apply(this,n)}catch(o){for(const d of t)await d.handleError(o)}}}}function ms(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{const o=await i.apply(this,n);for(const d of t)d.shouldResolveSuccess(o)&&await d.handleSuccess(o);return o}catch(o){for(const d of t)d.shouldResolveFailure(o)&&await d.handleFailure(o)}}}}class vs{constructor(e,s,r=()=>!0,i=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=i}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const R=class R{constructor(){}static GetInstance(){return R.instance||(R.instance=new R),R.instance}static registerHandler(e,s){R.handlers.set(e,s)}handle(e){var i;const s=((i=e.response)==null?void 0:i.status)??0,r=R.handlers.get(s);r&&r.handleError(e)}};R.handlers=new Map,R.instance=null;let Re=R;class gs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class ps{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class ys{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const Y=class Y{constructor(){this.jsonConverter=new M.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return Y.Instance||(Y.Instance=new Y),Y.Instance}};Y.Instance=null;let Te=Y;var nt=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(nt||{}),Ee=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ee||{});class Ss{constructor(e,s,r){this.placement=Ee.BottomLeft,this.type=e,this.message=s,this.description=r}}const Is=Fe.defineStore(me.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:E.DefaultWidth,height:E.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(u){t.dialogComponent=u}function i(u){t.header=u}function n(u){if(!e.value)throw new Error("there is no dialog to set props on");t.props=u}function o(u,y){if(!e.value)throw new Error("there is no dialog to set size on");if(u<E.MinimalAvailableSize)throw new Error("negative size not supported");y===E.Width?t.width=u:t.height=u}function d(){t.props=null,t.height=E.DefaultHeight,t.width=E.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:d,setSize:o,setDialogHeader:i,setProps:n,isDialogExists:e,hasDefaultHeader:s}}),Ds=Fe.defineStore(me.Drawer,()=>{const t=g.ref(z.Close),e=g.computed(()=>t.value===z.Open);function s(){t.value=z.Close}function r(){t.value=z.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class ws{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class As{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class bs{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class _s{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}if(await this.getDestinationRouteLocation(e,s)){r(await this.getDestinationRouteLocation(e,s));return}r(!1)}async getDestinationRouteName(){return""}async getDestinationRouteLocation(e,s){return null}}class Ms{constructor(e,s,r){this.scheduler=new be({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class ot{}class Cs extends ot{search(e,s,r){const i=[];e:for(const n of e)for(const o of r(n))if(B.removeSpacesFromString(String(o).toLowerCase()).indexOf(B.removeSpacesFromString(String(s).toLowerCase()))>-1){i.push(n);continue e}return i}}var Oe=(t=>(t.Hidden="hidden",t.Visible="visible",t))(Oe||{});class Ls{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===Oe.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var Rs=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,L=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ts(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rs(e,s,i),i};a.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},L([M.JsonProperty("value",String,!0)],a.Amount.prototype,"value",2),L([M.JsonProperty("symbol",String)],a.Amount.prototype,"symbol",2),a.Amount=L([M.JsonObject("Amount")],a.Amount),a.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},L([M.JsonProperty("id",Number)],a.BaseModel.prototype,"id",2),a.BaseModel=L([M.JsonObject("BaseModel")],a.BaseModel),a.MinifiedSymbolModel=class extends a.BaseModel{},L([M.JsonProperty("symbol",String)],a.MinifiedSymbolModel.prototype,"symbol",2),L([M.JsonProperty("enName",String)],a.MinifiedSymbolModel.prototype,"enName",2),L([M.JsonProperty("faName",String)],a.MinifiedSymbolModel.prototype,"faName",2),L([M.JsonProperty("image",String)],a.MinifiedSymbolModel.prototype,"image",2),a.MinifiedSymbolModel=L([M.JsonObject("MinifiedSymbolModel")],a.MinifiedSymbolModel);class Es{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return C.mapUnixToDate(this.requestedDate,H.SimpleDate)}get requestedTime(){return C.mapUnixToDate(this.requestedDate,H.JustHour)}get executedDateInJalali(){return C.mapUnixToDate(this.executedDate,H.SimpleDate)}get executedDateTime(){return C.mapUnixToDate(this.executedDate,H.JustHour)}}class Os{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class ks{constructor(e,s,r,i,n){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=i,this.USDTImage=n}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class Ps{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}a.APIErrorHandlerRegistry=Re,a.AbstractSubject=ws,a.AccessControl=we,a.AccessLevel=ee,a.Action=as,a.ApiBuilder=gs,a.ApplicationDrawerStatus=z,a.ApplicationInitializer=ys,a.AuthorizationDirective=Ae,a.AuthorizationService=ve,a.BaseTable=Qe,a.BehaviorSubject=et,a.CellType=fe,a.ClientArraySearch=Cs,a.ClientSearch=ot,a.Column=ss,a.CommonMaskFormats=re,a.CrudService=Ms,a.DateConverter=F,a.DateDisabledOptions=Ut,a.DateFormat=H,a.DateFormats=Ue,a.DateTools=X,a.DebounceService=ds,a.DialogDimensions=E,a.EveryAccess=Yt,a.EveryLevelAuthorizationDirective=jt,a.Feedback=vs,a.FetchListResponse=os,a.FormManager=Kt,a.FormValidationStatus=Q,a.Formatter=C,a.HandleError=fs,a.HandleFeedback=ms,a.HeaderType=de,a.HttpClient=ps,a.InputControl=Gt,a.InputControlBuilder=Wt,a.InputControlData=Ke,a.JsonMapper=Te,a.LoadingStatus=p,a.Params=st,a.Process=bs,a.ProcessManager=As,a.RangeValue=Nt,a.RouteGuard=_s,a.Scheduler=be,a.SelectableTable=es,a.SimpleSort=Le,a.SomeAccess=Vt,a.SomeLevelsAuthorizationDirective=Ht,a.SortDetail=Ce,a.SortOrder=O,a.SortOrderTableHeader=Ge,a.Sorter=Qt,a.StatusCode=We,a.StorageKeys=k,a.StoreNames=me,a.SymbolInTrade=Ps,a.SymbolPriceInTrade=ks,a.Symbols=xe,a.SyncDetail=ls,a.TABLE_ACTION_COLUMN=Xt,a.TABLE_COLUMN_DEFAULT_COLSPAN=Me,a.TABLE_COLUMN_DEFAULT_VALUES=Xe,a.TABLE_COLUMN_DEFAULT_WIDTH=_e,a.Table=rs,a.TableConstants=De,a.TableDestroy=is,a.TableHeaderAlign=he,a.TableRowClick=ns,a.ToastLocation=Ee,a.ToastMessage=Ss,a.ToastType=nt,a.TouchSensitiveControl=xt,a.TradeAmount=Os,a.TradeDate=Es,a.Util=B,a.VisibilityManager=Ls,a.VisibilityState=Oe,a.cards=Be,a.generateHeader=ts,a.ibans=Ne,a.isEmpty=Ze,a.isLastItem=zt,a.isOnlyOneItem=qt,a.setupJalaliDate=Je,a.setupStore=Jt,a.useCrud=hs,a.useData=tt,a.useDialogService=Is,a.useDrawerService=Ds,a.useForm=Zt,a.useLoadingStatus=it,a.useParams=at,a.useRepository=cs,a.useStaticTableService=us,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -3,8 +3,8 @@ export declare const enum CommonMaskFormats {
|
|
|
3
3
|
Iban = "##-####-####-####-####-####-##"
|
|
4
4
|
}
|
|
5
5
|
export declare const enum DateFormat {
|
|
6
|
-
FullDate = "
|
|
7
|
-
SimpleDate = "
|
|
6
|
+
FullDate = "YYYY/M/D HH:mm",
|
|
7
|
+
SimpleDate = "YYYY/M/D",
|
|
8
8
|
CompactGregorianDate = "YYYYMMDD",
|
|
9
9
|
ShortJalaliDate = "YYMM",
|
|
10
10
|
JustHour = "HH:mm:ss"
|