reslib 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +298 -0
- package/build/auth/index.d.ts +2034 -0
- package/build/auth/index.js +5 -0
- package/build/auth/types.d.ts +465 -0
- package/build/auth/types.js +1 -0
- package/build/countries/countries.d.ts +1454 -0
- package/build/countries/countries.js +1 -0
- package/build/countries/index.d.ts +159 -0
- package/build/countries/index.js +5 -0
- package/build/countries/types.d.ts +65 -0
- package/build/countries/types.js +1 -0
- package/build/currency/currencies.d.ts +8 -0
- package/build/currency/currencies.js +1 -0
- package/build/currency/index.d.ts +51 -0
- package/build/currency/index.js +5 -0
- package/build/currency/session.d.ts +23 -0
- package/build/currency/session.js +5 -0
- package/build/currency/types.d.ts +1039 -0
- package/build/currency/types.js +1 -0
- package/build/currency/utils.d.ts +25 -0
- package/build/currency/utils.js +1 -0
- package/build/i18n/index.d.ts +640 -0
- package/build/i18n/index.js +5 -0
- package/build/inputFormatter/index.d.ts +396 -0
- package/build/inputFormatter/index.js +5 -0
- package/build/inputFormatter/types.d.ts +544 -0
- package/build/inputFormatter/types.js +1 -0
- package/build/logger/index.d.ts +235 -0
- package/build/logger/index.js +5 -0
- package/build/observable/index.d.ts +329 -0
- package/build/observable/index.js +1 -0
- package/build/platform/index.d.ts +32 -0
- package/build/platform/index.js +1 -0
- package/build/resources/ResourcePaginationHelper.d.ts +537 -0
- package/build/resources/ResourcePaginationHelper.js +2 -0
- package/build/resources/decorators/create.decorator.d.ts +20 -0
- package/build/resources/decorators/create.decorator.js +1 -0
- package/build/resources/decorators/index.d.ts +41 -0
- package/build/resources/decorators/index.js +1 -0
- package/build/resources/fields/index.d.ts +33 -0
- package/build/resources/fields/index.js +1 -0
- package/build/resources/filters.d.ts +62 -0
- package/build/resources/filters.js +1 -0
- package/build/resources/index.d.ts +854 -0
- package/build/resources/index.js +6 -0
- package/build/resources/types/filters.d.ts +508 -0
- package/build/resources/types/filters.js +1 -0
- package/build/resources/types/index.d.ts +4138 -0
- package/build/resources/types/index.js +1 -0
- package/build/session/index.d.ts +1474 -0
- package/build/session/index.js +1 -0
- package/build/translations/auth.en.d.ts +3 -0
- package/build/translations/auth.en.js +1 -0
- package/build/translations/countries.en.d.ts +6 -0
- package/build/translations/countries.en.js +1 -0
- package/build/translations/currencies.en.d.ts +5 -0
- package/build/translations/currencies.en.js +1 -0
- package/build/translations/date.en.d.ts +19 -0
- package/build/translations/date.en.js +1 -0
- package/build/translations/index.d.ts +1583 -0
- package/build/translations/index.js +5 -0
- package/build/translations/resources.en.d.ts +6 -0
- package/build/translations/resources.en.js +1 -0
- package/build/translations/validator.en.d.ts +104 -0
- package/build/translations/validator.en.js +5 -0
- package/build/types/date.d.ts +44 -0
- package/build/types/date.js +1 -0
- package/build/types/dictionary.d.ts +29 -0
- package/build/types/dictionary.js +1 -0
- package/build/types/i18n.d.ts +121 -0
- package/build/types/i18n.js +1 -0
- package/build/types/index.d.ts +145 -0
- package/build/types/index.js +1 -0
- package/build/utils/areEquals.d.ts +19 -0
- package/build/utils/areEquals.js +1 -0
- package/build/utils/date/dateHelper.d.ts +371 -0
- package/build/utils/date/dateHelper.js +5 -0
- package/build/utils/date/index.d.ts +212 -0
- package/build/utils/date/index.js +5 -0
- package/build/utils/date/isDateObj.d.ts +14 -0
- package/build/utils/date/isDateObj.js +1 -0
- package/build/utils/debounce.d.ts +52 -0
- package/build/utils/debounce.js +1 -0
- package/build/utils/defaultArray.d.ts +18 -0
- package/build/utils/defaultArray.js +1 -0
- package/build/utils/defaultBool.d.ts +14 -0
- package/build/utils/defaultBool.js +1 -0
- package/build/utils/defaultStr.d.ts +17 -0
- package/build/utils/defaultStr.js +1 -0
- package/build/utils/defaultVal.d.ts +18 -0
- package/build/utils/defaultVal.js +1 -0
- package/build/utils/dom/index.d.ts +65 -0
- package/build/utils/dom/index.js +1 -0
- package/build/utils/dom/isDOMElement.d.ts +11 -0
- package/build/utils/dom/isDOMElement.js +1 -0
- package/build/utils/file/index.d.ts +26 -0
- package/build/utils/file/index.js +1 -0
- package/build/utils/global.d.ts +53 -0
- package/build/utils/global.js +1 -0
- package/build/utils/image.d.ts +56 -0
- package/build/utils/image.js +1 -0
- package/build/utils/index.d.ts +39 -0
- package/build/utils/index.js +6 -0
- package/build/utils/interpolate.d.ts +105 -0
- package/build/utils/interpolate.js +1 -0
- package/build/utils/isEmail.d.ts +57 -0
- package/build/utils/isEmail.js +1 -0
- package/build/utils/isEmpty.d.ts +18 -0
- package/build/utils/isEmpty.js +1 -0
- package/build/utils/isNonNullString.d.ts +17 -0
- package/build/utils/isNonNullString.js +1 -0
- package/build/utils/isNullable.d.ts +7 -0
- package/build/utils/isNullable.js +1 -0
- package/build/utils/isNumber.d.ts +36 -0
- package/build/utils/isNumber.js +1 -0
- package/build/utils/isPrimitive.d.ts +16 -0
- package/build/utils/isPrimitive.js +1 -0
- package/build/utils/isPromise.d.ts +14 -0
- package/build/utils/isPromise.js +1 -0
- package/build/utils/isRegex.d.ts +15 -0
- package/build/utils/isRegex.js +1 -0
- package/build/utils/isTime.d.ts +18 -0
- package/build/utils/isTime.js +1 -0
- package/build/utils/json.d.ts +224 -0
- package/build/utils/json.js +1 -0
- package/build/utils/numbers.d.ts +148 -0
- package/build/utils/numbers.js +5 -0
- package/build/utils/object.d.ts +567 -0
- package/build/utils/object.js +1 -0
- package/build/utils/sort.d.ts +67 -0
- package/build/utils/sort.js +1 -0
- package/build/utils/string.d.ts +165 -0
- package/build/utils/string.js +1 -0
- package/build/utils/stringify.d.ts +23 -0
- package/build/utils/stringify.js +1 -0
- package/build/utils/uniqid.d.ts +18 -0
- package/build/utils/uniqid.js +1 -0
- package/build/utils/uri/index.d.ts +333 -0
- package/build/utils/uri/index.js +2 -0
- package/build/validator/index.d.ts +4 -0
- package/build/validator/index.js +6 -0
- package/build/validator/rules/array.d.ts +848 -0
- package/build/validator/rules/array.js +5 -0
- package/build/validator/rules/boolean.d.ts +87 -0
- package/build/validator/rules/boolean.js +5 -0
- package/build/validator/rules/date.d.ts +551 -0
- package/build/validator/rules/date.js +5 -0
- package/build/validator/rules/default.d.ts +367 -0
- package/build/validator/rules/default.js +5 -0
- package/build/validator/rules/enum.d.ts +155 -0
- package/build/validator/rules/enum.js +5 -0
- package/build/validator/rules/file.d.ts +356 -0
- package/build/validator/rules/file.js +5 -0
- package/build/validator/rules/format.d.ts +2825 -0
- package/build/validator/rules/format.js +6 -0
- package/build/validator/rules/index.d.ts +16 -0
- package/build/validator/rules/index.js +6 -0
- package/build/validator/rules/multiRules.d.ts +475 -0
- package/build/validator/rules/multiRules.js +5 -0
- package/build/validator/rules/numeric.d.ts +1135 -0
- package/build/validator/rules/numeric.js +5 -0
- package/build/validator/rules/string.d.ts +504 -0
- package/build/validator/rules/string.js +5 -0
- package/build/validator/rules/target.d.ts +137 -0
- package/build/validator/rules/target.js +5 -0
- package/build/validator/rules/utils.d.ts +1 -0
- package/build/validator/rules/utils.js +1 -0
- package/build/validator/rulesMarkers.d.ts +11 -0
- package/build/validator/rulesMarkers.js +1 -0
- package/build/validator/types.d.ts +2906 -0
- package/build/validator/types.js +1 -0
- package/build/validator/validator.d.ts +3692 -0
- package/build/validator/validator.js +5 -0
- package/lib/cjs/auth.js +1 -0
- package/lib/cjs/countries.js +1 -0
- package/lib/cjs/currency.js +1 -0
- package/lib/cjs/i18n.js +1 -0
- package/lib/cjs/inputFormatter.js +1 -0
- package/lib/cjs/logger.js +1 -0
- package/lib/cjs/observable.js +1 -0
- package/lib/cjs/platform.js +1 -0
- package/lib/cjs/resources.js +1 -0
- package/lib/cjs/session.js +1 -0
- package/lib/cjs/types.js +1 -0
- package/lib/cjs/utils.js +1 -0
- package/lib/cjs/validator.js +1 -0
- package/lib/esm/auth.mjs +1 -0
- package/lib/esm/countries.mjs +1 -0
- package/lib/esm/currency.mjs +1 -0
- package/lib/esm/i18n.mjs +1 -0
- package/lib/esm/inputFormatter.mjs +1 -0
- package/lib/esm/logger.mjs +1 -0
- package/lib/esm/observable.mjs +1 -0
- package/lib/esm/platform.mjs +1 -0
- package/lib/esm/resources.mjs +1 -0
- package/lib/esm/session.mjs +1 -0
- package/lib/esm/types.mjs +1 -0
- package/lib/esm/utils.mjs +1 -0
- package/lib/esm/validator.mjs +1 -0
- package/package.json +244 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { DateFormat } from '../../types';
|
|
2
|
+
import { DateHelper } from './dateHelper';
|
|
3
|
+
export { DateHelper };
|
|
4
|
+
/**
|
|
5
|
+
* Global interface extension for the Date object.
|
|
6
|
+
*
|
|
7
|
+
* This extension adds several utility methods to the Date object for formatting and manipulating dates.
|
|
8
|
+
*/
|
|
9
|
+
declare global {
|
|
10
|
+
interface Date {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the date in SQL date format (YYYY-MM-DD).
|
|
13
|
+
*
|
|
14
|
+
* @returns The date in SQL date format.
|
|
15
|
+
*
|
|
16
|
+
* Example:
|
|
17
|
+
* ```ts
|
|
18
|
+
* const date = new Date();
|
|
19
|
+
* console.log(date.toSQLDateFormat()); // Output: YYYY-MM-DD
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
toSQLDateFormat: () => string;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the date in SQL datetime format (YYYY-MM-DD HH:MM:SS).
|
|
25
|
+
*
|
|
26
|
+
* @returns The date in SQL datetime format.
|
|
27
|
+
*
|
|
28
|
+
* Example:
|
|
29
|
+
* ```ts
|
|
30
|
+
* const date = new Date();
|
|
31
|
+
* console.log(date.toSQLDateTimeFormat()); // Output: YYYY-MM-DD HH:MM:SS
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
toSQLDateTimeFormat: () => string;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the date in SQL time format (HH:MM:SS).
|
|
37
|
+
*
|
|
38
|
+
* @returns The date in SQL time format.
|
|
39
|
+
*
|
|
40
|
+
* Example:
|
|
41
|
+
* ```ts
|
|
42
|
+
* const date = new Date();
|
|
43
|
+
* console.log(date.toSQLTimeFormat()); // Output: HH:MM:SS
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
toSQLTimeFormat: () => string;
|
|
47
|
+
/**
|
|
48
|
+
* Resets the hours of the date to 0.
|
|
49
|
+
*
|
|
50
|
+
* @returns The date with hours reset to 0.
|
|
51
|
+
*
|
|
52
|
+
* Example:
|
|
53
|
+
* ```ts
|
|
54
|
+
* const date = new Date();
|
|
55
|
+
* console.log(date.resetHours()); // Output: Date with hours reset to 0
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
resetHours: () => Date;
|
|
59
|
+
/**
|
|
60
|
+
* Resets the minutes of the date to 0.
|
|
61
|
+
*
|
|
62
|
+
* @returns The date with minutes reset to 0.
|
|
63
|
+
*
|
|
64
|
+
* Example:
|
|
65
|
+
* ```ts
|
|
66
|
+
* const date = new Date();
|
|
67
|
+
* console.log(date.resetMinutes()); // Output: Date with minutes reset to 0
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
resetMinutes: () => Date;
|
|
71
|
+
/**
|
|
72
|
+
* Resets the seconds of the date to 0.
|
|
73
|
+
*
|
|
74
|
+
* @returns The date with seconds reset to 0.
|
|
75
|
+
*
|
|
76
|
+
* Example:
|
|
77
|
+
* ```ts
|
|
78
|
+
* const date = new Date();
|
|
79
|
+
* console.log(date.resetSeconds()); // Output: Date with seconds reset to 0
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
resetSeconds: () => Date;
|
|
83
|
+
/***
|
|
84
|
+
* Resets the milliseconds of the date to 0.
|
|
85
|
+
*
|
|
86
|
+
* @returns The date with milliseconds reset to 0.
|
|
87
|
+
*
|
|
88
|
+
* Example:
|
|
89
|
+
* ```ts
|
|
90
|
+
* const date = new Date();
|
|
91
|
+
* console.log(date.resetMilliseconds()); // Output: Date with milliseconds reset to 0
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
resetMilliseconds: () => Date;
|
|
95
|
+
/**
|
|
96
|
+
* Resets the hours, minutes, and seconds of the date to 0.
|
|
97
|
+
*
|
|
98
|
+
* @returns The date with hours, minutes, and seconds reset to 0.
|
|
99
|
+
*
|
|
100
|
+
* Example:
|
|
101
|
+
* ```ts
|
|
102
|
+
* const date = new Date();
|
|
103
|
+
* console.log(date.resetHours2Minutes2Seconds()); // Output: Date with hours, minutes, and seconds reset to 0
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
resetHours2Minutes2Seconds: () => Date;
|
|
107
|
+
/**
|
|
108
|
+
* Adds a specified number of years to the date.
|
|
109
|
+
*
|
|
110
|
+
* @param years The number of years to add.
|
|
111
|
+
* @returns The date with the specified number of years added.
|
|
112
|
+
*
|
|
113
|
+
* Example:
|
|
114
|
+
* ```ts
|
|
115
|
+
* const date = new Date();
|
|
116
|
+
* console.log(date.addYears(1)); // Output: Date with 1 year added
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
addYears: (years: number) => Date;
|
|
120
|
+
/**
|
|
121
|
+
* Adds a specified number of months to the date.
|
|
122
|
+
*
|
|
123
|
+
* @param months The number of months to add.
|
|
124
|
+
* @returns The date with the specified number of months added.
|
|
125
|
+
*
|
|
126
|
+
* Example:
|
|
127
|
+
* ```ts
|
|
128
|
+
* const date = new Date();
|
|
129
|
+
* console.log(date.addMonths(1)); // Output: Date with 1 month added
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
addMonths: (months: number) => Date;
|
|
133
|
+
/**
|
|
134
|
+
* Adds a specified number of minutes to the date.
|
|
135
|
+
*
|
|
136
|
+
* @param minutes The number of minutes to add.
|
|
137
|
+
* @returns The date with the specified number of minutes added.
|
|
138
|
+
*
|
|
139
|
+
* Example:
|
|
140
|
+
* ```ts
|
|
141
|
+
* const date = new Date();
|
|
142
|
+
* console.log(date.addMinutes(1)); // Output: Date with 1 minute added
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
addMinutes: (minutes: number) => Date;
|
|
146
|
+
/**
|
|
147
|
+
* Adds a specified number of seconds to the date.
|
|
148
|
+
*
|
|
149
|
+
* @param seconds The number of seconds to add.
|
|
150
|
+
* @returns The date with the specified number of seconds added.
|
|
151
|
+
*
|
|
152
|
+
Example:
|
|
153
|
+
* ```ts
|
|
154
|
+
* const date = new Date();
|
|
155
|
+
* console.log(date.addSeconds(1)); // Output: Date with 1 second added
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
addSeconds: (seconds: number) => Date;
|
|
159
|
+
/**
|
|
160
|
+
* Adds a specified number of days to the date.
|
|
161
|
+
*
|
|
162
|
+
* @param days The number of days to add.
|
|
163
|
+
* @returns The date with the specified number of days added.
|
|
164
|
+
*
|
|
165
|
+
* Example:
|
|
166
|
+
* ```ts
|
|
167
|
+
* const date = new Date();
|
|
168
|
+
* console.log(date.addDays(1)); // Output: Date with 1 day added
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
addDays: (days: number) => Date;
|
|
172
|
+
/**
|
|
173
|
+
* Adds a specified number of weeks to the date.
|
|
174
|
+
*
|
|
175
|
+
* @param weeks The number of weeks to add.
|
|
176
|
+
* @returns The date with the specified number of weeks added.
|
|
177
|
+
*
|
|
178
|
+
* Example:
|
|
179
|
+
* ```ts
|
|
180
|
+
* const date = new Date();
|
|
181
|
+
* console.log(date.addWeeks(1)); // Output: Date with 1 week added
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
addWeeks: (weeks: number) => Date;
|
|
185
|
+
/**
|
|
186
|
+
* Adds a specified number of hours to the date.
|
|
187
|
+
*
|
|
188
|
+
* @param hours The number of hours to add.
|
|
189
|
+
* @returns The date with the specified number of hours added.
|
|
190
|
+
*
|
|
191
|
+
* Example:
|
|
192
|
+
* ```ts
|
|
193
|
+
* const date = new Date();
|
|
194
|
+
* console.log(date.addHours(1)); // Output: Date with 1 hour added
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
addHours: (hours: number) => Date;
|
|
198
|
+
/**
|
|
199
|
+
* Formats the date according to a specified format string.
|
|
200
|
+
*
|
|
201
|
+
* @param format The format string to use.
|
|
202
|
+
* @returns The formatted date string.
|
|
203
|
+
*
|
|
204
|
+
* Example:
|
|
205
|
+
* ```ts
|
|
206
|
+
* const date = new Date();
|
|
207
|
+
* console.log(date.toFormat("YYYY-MM-DD HH:mm:ss")); // Output: Formatted date string
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
toFormat: (format?: DateFormat) => string;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use strict';require('reflect-metadata');var i18nJs=require('i18n-js'),v=require('moment');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var v__default=/*#__PURE__*/_interopDefault(v);var q=Object.defineProperty,Ae=Object.defineProperties;var Ne=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var Q=(e,r,t)=>r in e?q(e,r,{enumerable:true,configurable:true,writable:true,value:t}):e[r]=t,j=(e,r)=>{for(var t in r||(r={}))_.call(r,t)&&Q(e,t,r[t]);if(R)for(var t of R(r))X.call(r,t)&&Q(e,t,r[t]);return e},ee=(e,r)=>Ae(e,Ne(r));var te=(e,r)=>{var t={};for(var a in e)_.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&R)for(var a of R(e))r.indexOf(a)<0&&X.call(e,a)&&(t[a]=e[a]);return t};var we=(e,r)=>{for(var t in r)q(e,t,{get:r[t],enumerable:true});};var re=function(e){let r={},t={},a=Array.prototype.slice;return ee(j({},Object.assign({},e)),{on:function(i,n){return n&&i&&(r[i]=r[i]||[]).push(n),{remove:()=>{this.off(i,n);}}},finally:function(i,n){return n&&i?((t[i]=t[i]||[]).push(n),this):this},off:function(i,n){if(!i)return this;if(i=="*"&&!n)r={};else if(n)for(var o=r[i],d=0,c;c=o&&o[d];++d)c==n&&o.splice(d--,1);return this},once:function(i,n){let o=(...d)=>{this.off(i,o),n.apply(this,d);};return this.on(i,o)},trigger:function(i,...n){if(!i)return this;let o,d,c,l=null;typeof n[n.length-1]=="function"&&(l=n.pop()),o=a.call(r[i]||[],0);let y=[];for(c=0;d=o[c];++c)typeof d=="function"&&y.push(d.apply(this,n));typeof r["*"]=="function"&&i!="*"&&(this.trigger(i,...n),this.trigger("*",...n));var h=a.call(t[i]||[],0);for(c=0;d=h[c];++c)d.call(this,y,n);return l&&l.call(this,y,n),this},offAll:function(){return r={},t={},this},getEventCallBacks:function(){return r}})};function ae(e,r){return Object.assign({},Object.assign({},Reflect.getMetadata(r,e)),Object.assign({},Reflect.getMetadata(r,e.prototype)))}var K={};we(K,{en:()=>Ee});var ie={AF:{code:"AF",dialCode:"93",name:"Afghanistan (\u202B\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646\u202C\u200E)",priority:0},AL:{code:"AL",dialCode:"355",name:"Albania (Shqip\xEBri)",priority:0},DZ:{code:"DZ",dialCode:"213",name:"Algeria (\u202B\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)",priority:0},AS:{code:"AS",dialCode:"1684",name:"American Samoa",priority:0},AD:{code:"AD",dialCode:"376",name:"Andorra",priority:0},AO:{code:"AO",dialCode:"244",name:"Angola",priority:0},AI:{code:"AI",dialCode:"1264",name:"Anguilla",priority:0},AG:{code:"AG",dialCode:"1268",name:"Antigua and Barbuda",priority:0},AR:{code:"AR",dialCode:"54",name:"Argentina",priority:0},AM:{code:"AM",dialCode:"374",name:"Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)",priority:0},AW:{code:"AW",dialCode:"297",name:"Aruba",priority:0},AU:{code:"AU",dialCode:"61",name:"Australia",priority:0},AT:{code:"AT",dialCode:"43",name:"Austria (\xD6sterreich)",priority:0},AZ:{code:"AZ",dialCode:"994",name:"Azerbaijan (Az\u0259rbaycan)",priority:0},BS:{code:"BS",dialCode:"1242",name:"Bahamas",priority:0},BH:{code:"BH",dialCode:"973",name:"Bahrain (\u202B\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)",priority:0},BD:{code:"BD",dialCode:"880",name:"Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)",priority:0},BB:{code:"BB",dialCode:"1246",name:"Barbados",priority:0},BY:{code:"BY",dialCode:"375",name:"Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)",priority:0},BE:{code:"BE",dialCode:"32",name:"Belgium (Belgi\xEB)",priority:0},BZ:{code:"BZ",dialCode:"501",name:"Belize",priority:0},BJ:{code:"BJ",dialCode:"229",name:"Benin (B\xE9nin)",priority:0},BM:{code:"BM",dialCode:"1441",name:"Bermuda",priority:0},BT:{code:"BT",dialCode:"975",name:"Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)",priority:0},BO:{code:"BO",dialCode:"591",name:"Bolivia",priority:0},BA:{code:"BA",dialCode:"387",name:"Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)",priority:0},BW:{code:"BW",dialCode:"267",name:"Botswana",priority:0},BR:{code:"BR",dialCode:"55",name:"Brazil (Brasil)",priority:0},IO:{code:"IO",dialCode:"246",name:"British Indian Ocean Territory",priority:0},VG:{code:"VG",dialCode:"1284",name:"British Virgin Islands",priority:0},BN:{code:"BN",dialCode:"673",name:"Brunei",priority:0},BG:{code:"BG",dialCode:"359",name:"Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)",priority:0},BF:{code:"BF",dialCode:"226",name:"Burkina Faso",priority:0},BI:{code:"BI",dialCode:"257",name:"Burundi (Uburundi)",priority:0},KH:{code:"KH",dialCode:"855",name:"Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)",priority:0},CM:{code:"CM",dialCode:"237",name:"Cameroon (Cameroun)",priority:0},CA:{code:"CA",dialCode:"1",name:"Canada",priority:1},CV:{code:"CV",dialCode:"238",name:"Cape Verde (Kabu Verdi)",priority:0},BQ:{code:"BQ",dialCode:"599",name:"Caribbean Netherlands",priority:1},KY:{code:"KY",dialCode:"1345",name:"Cayman Islands",priority:0},CF:{code:"CF",dialCode:"236",name:"Central African Republic (R\xE9publique centrafricaine)",priority:0},TD:{code:"TD",dialCode:"235",name:"Chad (Tchad)",priority:0},CL:{code:"CL",dialCode:"56",name:"Chile",priority:0},CN:{code:"CN",dialCode:"86",name:"China (\u4E2D\u56FD)",priority:0},CX:{code:"CX",dialCode:"61",name:"Christmas Island",priority:2},CC:{code:"CC",dialCode:"61",name:"Cocos (Keeling) Islands",priority:1},CO:{code:"CO",dialCode:"57",name:"Colombia",priority:0},KM:{code:"KM",dialCode:"269",name:"Comoros (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)",priority:0},CD:{code:"CD",dialCode:"243",name:"Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",priority:0},CG:{code:"CG",dialCode:"242",name:"Congo (Republic) (Congo-Brazzaville)",priority:0},CK:{code:"CK",dialCode:"682",name:"Cook Islands",priority:0},CR:{code:"CR",dialCode:"506",name:"Costa Rica",priority:0},CI:{code:"CI",dialCode:"225",name:"C\xF4te d\u2019Ivoire",priority:0},HR:{code:"HR",dialCode:"385",name:"Croatia (Hrvatska)",priority:0},CU:{code:"CU",dialCode:"53",name:"Cuba",priority:0},CW:{code:"CW",dialCode:"599",name:"Cura\xE7ao",priority:0},CY:{code:"CY",dialCode:"357",name:"Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)",priority:0},CZ:{code:"CZ",dialCode:"420",name:"Czech Republic (\u010Cesk\xE1 republika)",priority:0},DK:{code:"DK",dialCode:"45",name:"Denmark (Danmark)",priority:0},DJ:{code:"DJ",dialCode:"253",name:"Djibouti",priority:0},DM:{code:"DM",dialCode:"1767",name:"Dominica",priority:0},DO:{code:"DO",dialCode:"1",name:"Dominican Republic (Rep\xFAblica Dominicana)",priority:2},EC:{code:"EC",dialCode:"593",name:"Ecuador",priority:0},EG:{code:"EG",dialCode:"20",name:"Egypt (\u202B\u0645\u0635\u0631\u202C\u200E)",priority:0},SV:{code:"SV",dialCode:"503",name:"El Salvador",priority:0},GQ:{code:"GQ",dialCode:"240",name:"Equatorial Guinea (Guinea Ecuatorial)",priority:0},ER:{code:"ER",dialCode:"291",name:"Eritrea",priority:0},EE:{code:"EE",dialCode:"372",name:"Estonia (Eesti)",priority:0},ET:{code:"ET",dialCode:"251",name:"Ethiopia",priority:0},FK:{code:"FK",dialCode:"500",name:"Falkland Islands (Islas Malvinas)",priority:0},FO:{code:"FO",dialCode:"298",name:"Faroe Islands (F\xF8royar)",priority:0},FJ:{code:"FJ",dialCode:"679",name:"Fiji",priority:0},FI:{code:"FI",dialCode:"358",name:"Finland (Suomi)",priority:0},FR:{code:"FR",dialCode:"33",name:"France",priority:0},GF:{code:"GF",dialCode:"594",name:"French Guiana (Guyane fran\xE7aise)",priority:0},PF:{code:"PF",dialCode:"689",name:"French Polynesia (Polyn\xE9sie fran\xE7aise)",priority:0},GA:{code:"GA",dialCode:"241",name:"Gabon",priority:0},GM:{code:"GM",dialCode:"220",name:"Gambia",priority:0},GE:{code:"GE",dialCode:"995",name:"Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)",priority:0},DE:{code:"DE",dialCode:"49",name:"Germany (Deutschland)",priority:0},GH:{code:"GH",dialCode:"233",name:"Ghana (Gaana)",priority:0},GI:{code:"GI",dialCode:"350",name:"Gibraltar",priority:0},GR:{code:"GR",dialCode:"30",name:"Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)",priority:0},GL:{code:"GL",dialCode:"299",name:"Greenland (Kalaallit Nunaat)",priority:0},GD:{code:"GD",dialCode:"1473",name:"Grenada",priority:0},GP:{code:"GP",dialCode:"590",name:"Guadeloupe",priority:0},GU:{code:"GU",dialCode:"1671",name:"Guam",priority:0},GT:{code:"GT",dialCode:"502",name:"Guatemala",priority:0},GG:{code:"GG",dialCode:"44",name:"Guernsey",priority:1},GN:{code:"GN",dialCode:"224",name:"Guinea (Guin\xE9e)",priority:0},GW:{code:"GW",dialCode:"245",name:"Guinea-Bissau (Guin\xE9 Bissau)",priority:0},GY:{code:"GY",dialCode:"592",name:"Guyana",priority:0},HT:{code:"HT",dialCode:"509",name:"Haiti",priority:0},HN:{code:"HN",dialCode:"504",name:"Honduras",priority:0},HK:{code:"HK",dialCode:"852",name:"Hong Kong (\u9999\u6E2F)",priority:0},HU:{code:"HU",dialCode:"36",name:"Hungary (Magyarorsz\xE1g)",priority:0},IS:{code:"IS",dialCode:"354",name:"Iceland (\xCDsland)",priority:0},IN:{code:"IN",dialCode:"91",name:"India (\u092D\u093E\u0930\u0924)",priority:0},ID:{code:"ID",dialCode:"62",name:"Indonesia",priority:0},IR:{code:"IR",dialCode:"98",name:"Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)",priority:0},IQ:{code:"IQ",dialCode:"964",name:"Iraq (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)",priority:0},IE:{code:"IE",dialCode:"353",name:"Ireland",priority:0},IM:{code:"IM",dialCode:"44",name:"Isle of Man",priority:2},IL:{code:"IL",dialCode:"972",name:"Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)",priority:0},IT:{code:"IT",dialCode:"39",name:"Italy (Italia)",priority:0},JM:{code:"JM",dialCode:"1876",name:"Jamaica",priority:0},JP:{code:"JP",dialCode:"81",name:"Japan (\u65E5\u672C)",priority:0},JE:{code:"JE",dialCode:"44",name:"Jersey",priority:3},JO:{code:"JO",dialCode:"962",name:"Jordan (\u202B\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)",priority:0},KZ:{code:"KZ",dialCode:"77",name:"Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)",priority:1},KE:{code:"KE",dialCode:"254",name:"Kenya",priority:0},KI:{code:"KI",dialCode:"686",name:"Kiribati",priority:0},KW:{code:"KW",dialCode:"965",name:"Kuwait (\u202B\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E)",priority:0},KG:{code:"KG",dialCode:"996",name:"Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)",priority:0},LA:{code:"LA",dialCode:"856",name:"Laos (\u0EA5\u0EB2\u0EA7)",priority:0},LV:{code:"LV",dialCode:"371",name:"Latvia (Latvija)",priority:0},LB:{code:"LB",dialCode:"961",name:"Lebanon (\u202B\u0644\u0628\u0646\u0627\u0646\u202C\u200E)",priority:0},LS:{code:"LS",dialCode:"266",name:"Lesotho",priority:0},LR:{code:"LR",dialCode:"231",name:"Liberia",priority:0},LY:{code:"LY",dialCode:"218",name:"Libya (\u202B\u0644\u064A\u0628\u064A\u0627\u202C\u200E)",priority:0},LI:{code:"LI",dialCode:"423",name:"Liechtenstein",priority:0},LT:{code:"LT",dialCode:"370",name:"Lithuania (Lietuva)",priority:0},LU:{code:"LU",dialCode:"352",name:"Luxembourg",priority:0},MO:{code:"MO",dialCode:"853",name:"Macau (\u6FB3\u9580)",priority:0},MK:{code:"MK",dialCode:"389",name:"Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",priority:0},MG:{code:"MG",dialCode:"261",name:"Madagascar (Madagasikara)",priority:0},MW:{code:"MW",dialCode:"265",name:"Malawi",priority:0},MY:{code:"MY",dialCode:"60",name:"Malaysia",priority:0},MV:{code:"MV",dialCode:"960",name:"Maldives",priority:0},ML:{code:"ML",dialCode:"223",name:"Mali",priority:0},MT:{code:"MT",dialCode:"356",name:"Malta",priority:0},MH:{code:"MH",dialCode:"692",name:"Marshall Islands",priority:0},MQ:{code:"MQ",dialCode:"596",name:"Martinique",priority:0},MR:{code:"MR",dialCode:"222",name:"Mauritania (\u202B\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)",priority:0},MU:{code:"MU",dialCode:"230",name:"Mauritius (Moris)",priority:0},YT:{code:"YT",dialCode:"262",name:"Mayotte",priority:1},MX:{code:"MX",dialCode:"52",name:"Mexico (M\xE9xico)",priority:0},FM:{code:"FM",dialCode:"691",name:"Micronesia",priority:0},MD:{code:"MD",dialCode:"373",name:"Moldova (Republica Moldova)",priority:0},MC:{code:"MC",dialCode:"377",name:"Monaco",priority:0},MN:{code:"MN",dialCode:"976",name:"Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)",priority:0},ME:{code:"ME",dialCode:"382",name:"Montenegro (Crna Gora)",priority:0},MS:{code:"MS",dialCode:"1664",name:"Montserrat",priority:0},MA:{code:"MA",dialCode:"212",name:"Morocco (\u202B\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)",priority:0},MZ:{code:"MZ",dialCode:"258",name:"Mozambique (Mo\xE7ambique)",priority:0},MM:{code:"MM",dialCode:"95",name:"Myanmar (Burma)",priority:0},NA:{code:"NA",dialCode:"264",name:"Namibia (Namibi\xEB)",priority:0},NR:{code:"NR",dialCode:"674",name:"Nauru",priority:0},NP:{code:"NP",dialCode:"977",name:"Nepal (\u0928\u0947\u092A\u093E\u0932)",priority:0},NL:{code:"NL",dialCode:"31",name:"Netherlands (Nederland)",priority:0},NC:{code:"NC",dialCode:"687",name:"New Caledonia (Nouvelle-Cal\xE9donie)",priority:0},NZ:{code:"NZ",dialCode:"64",name:"New Zealand",priority:0},NI:{code:"NI",dialCode:"505",name:"Nicaragua",priority:0},NE:{code:"NE",dialCode:"227",name:"Niger (Nijar)",priority:0},NG:{code:"NG",dialCode:"234",name:"Nigeria",priority:0},NU:{code:"NU",dialCode:"683",name:"Niue",priority:0},NF:{code:"NF",dialCode:"672",name:"Norfolk Island",priority:0},KP:{code:"KP",dialCode:"850",name:"North Korea (\uC870\uC120 \uBBFC\uC8FC\uC8FC\uC758 \uC778\uBBFC \uACF5\uD654\uAD6D)",priority:0},MP:{code:"MP",dialCode:"1670",name:"Northern Mariana Islands",priority:0},NO:{code:"NO",dialCode:"47",name:"Norway (Norge)",priority:0},OM:{code:"OM",dialCode:"968",name:"Oman (\u202B\u0639\u064F\u0645\u0627\u0646\u202C\u200E)",priority:0},PK:{code:"PK",dialCode:"92",name:"Pakistan (\u202B\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)",priority:0},PW:{code:"PW",dialCode:"680",name:"Palau",priority:0},PS:{code:"PS",dialCode:"970",name:"Palestine (\u202B\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)",priority:0},PA:{code:"PA",dialCode:"507",name:"Panama (Panam\xE1)",priority:0},PG:{code:"PG",dialCode:"675",name:"Papua New Guinea",priority:0},PY:{code:"PY",dialCode:"595",name:"Paraguay",priority:0},PE:{code:"PE",dialCode:"51",name:"Peru (Per\xFA)",priority:0},PH:{code:"PH",dialCode:"63",name:"Philippines",priority:0},PL:{code:"PL",dialCode:"48",name:"Poland (Polska)",priority:0},PT:{code:"PT",dialCode:"351",name:"Portugal",priority:0},PR:{code:"PR",dialCode:"1",name:"Puerto Rico",priority:3},QA:{code:"QA",dialCode:"974",name:"Qatar (\u202B\u0642\u0637\u0631\u202C\u200E)",priority:0},RE:{code:"RE",dialCode:"262",name:"R\xE9union (La R\xE9union)",priority:0},RO:{code:"RO",dialCode:"40",name:"Romania (Rom\xE2nia)",priority:0},RU:{code:"RU",dialCode:"7",name:"Russia (\u0420\u043E\u0441\u0441\u0438\u044F)",priority:0},RW:{code:"RW",dialCode:"250",name:"Rwanda",priority:0},BL:{code:"BL",dialCode:"590",name:"Saint Barth\xE9lemy (Saint-Barth\xE9lemy)",priority:1},SH:{code:"SH",dialCode:"290",name:"Saint Helena",priority:0},KN:{code:"KN",dialCode:"1869",name:"Saint Kitts and Nevis",priority:0},LC:{code:"LC",dialCode:"1758",name:"Saint Lucia",priority:0},MF:{code:"MF",dialCode:"590",name:"Saint Martin (Saint-Martin (partie fran\xE7aise))",priority:2},PM:{code:"PM",dialCode:"508",name:"Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",priority:0},VC:{code:"VC",dialCode:"1784",name:"Saint Vincent and the Grenadines",priority:0},WS:{code:"WS",dialCode:"685",name:"Samoa",priority:0},SM:{code:"SM",dialCode:"378",name:"San Marino",priority:0},ST:{code:"ST",dialCode:"239",name:"S\xE3o Tom\xE9 and Pr\xEDncipe (S\xE3o Tom\xE9 e Pr\xEDncipe)",priority:0},SA:{code:"SA",dialCode:"966",name:"Saudi Arabia (\u202B\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629\u202C\u200E)",priority:0},SN:{code:"SN",dialCode:"221",name:"Senegal (S\xE9n\xE9gal)",priority:0},RS:{code:"RS",dialCode:"381",name:"Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",priority:0},SC:{code:"SC",dialCode:"248",name:"Seychelles",priority:0},SL:{code:"SL",dialCode:"232",name:"Sierra Leone",priority:0},SG:{code:"SG",dialCode:"65",name:"Singapore",priority:0},SX:{code:"SX",dialCode:"1721",name:"Sint Maarten",priority:0},SK:{code:"SK",dialCode:"421",name:"Slovakia (Slovensko)",priority:0},SI:{code:"SI",dialCode:"386",name:"Slovenia (Slovenija)",priority:0},SB:{code:"SB",dialCode:"677",name:"Solomon Islands",priority:0},SO:{code:"SO",dialCode:"252",name:"Somalia (Soomaaliya)",priority:0},ZA:{code:"ZA",dialCode:"27",name:"South Africa",priority:0},KR:{code:"KR",dialCode:"82",name:"South Korea (\uB300\uD55C\uBBFC\uAD6D)",priority:0},SS:{code:"SS",dialCode:"211",name:"South Sudan (\u202B\u062C\u0646\u0648\u0628 \u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",priority:0},ES:{code:"ES",dialCode:"34",name:"Spain (Espa\xF1a)",priority:0},LK:{code:"LK",dialCode:"94",name:"Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)",priority:0},SD:{code:"SD",dialCode:"249",name:"Sudan (\u202B\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",priority:0},SR:{code:"SR",dialCode:"597",name:"Suriname",priority:0},SJ:{code:"SJ",dialCode:"47",name:"Svalbard and Jan Mayen",priority:1},SZ:{code:"SZ",dialCode:"268",name:"Swaziland",priority:0},SE:{code:"SE",dialCode:"46",name:"Sweden (Sverige)",priority:0},CH:{code:"CH",dialCode:"41",name:"Switzerland (Schweiz)",priority:0},SY:{code:"SY",dialCode:"963",name:"Syria (\u202B\u0633\u0648\u0631\u064A\u0627\u202C\u200E)",priority:0},TW:{code:"TW",dialCode:"886",name:"Taiwan (\u53F0\u7063)",priority:0},TJ:{code:"TJ",dialCode:"992",name:"Tajikistan",priority:0},TZ:{code:"TZ",dialCode:"255",name:"Tanzania",priority:0},TH:{code:"TH",dialCode:"66",name:"Thailand (\u0E44\u0E17\u0E22)",priority:0},TL:{code:"TL",dialCode:"670",name:"Timor-Leste",priority:0},TG:{code:"TG",dialCode:"228",name:"Togo",priority:0},TK:{code:"TK",dialCode:"690",name:"Tokelau",priority:0},TO:{code:"TO",dialCode:"676",name:"Tonga",priority:0},TT:{code:"TT",dialCode:"1868",name:"Trinidad and Tobago",priority:0},TN:{code:"TN",dialCode:"216",name:"Tunisia (\u202B\u062A\u0648\u0646\u0633\u202C\u200E)",priority:0},TR:{code:"TR",dialCode:"90",name:"Turkey (T\xFCrkiye)",priority:0},TM:{code:"TM",dialCode:"993",name:"Turkmenistan",priority:0},TC:{code:"TC",dialCode:"1649",name:"Turks and Caicos Islands",priority:0},TV:{code:"TV",dialCode:"688",name:"Tuvalu",priority:0},VI:{code:"VI",dialCode:"1340",name:"U.S. Virgin Islands",priority:0},UG:{code:"UG",dialCode:"256",name:"Uganda",priority:0},UA:{code:"UA",dialCode:"380",name:"Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)",priority:0},AE:{code:"AE",dialCode:"971",name:"United Arab Emirates (\u202B\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629\u202C\u200E)",priority:0},GB:{code:"GB",dialCode:"44",name:"United Kingdom",priority:0},US:{code:"US",dialCode:"1",name:"United States",priority:0},UY:{code:"UY",dialCode:"598",name:"Uruguay",priority:0},UZ:{code:"UZ",dialCode:"998",name:"Uzbekistan (O\u02BBzbekiston)",priority:0},VU:{code:"VU",dialCode:"678",name:"Vanuatu",priority:0},VA:{code:"VA",dialCode:"39",name:"Vatican City (Citt\xE0 del Vaticano)",priority:1},VE:{code:"VE",dialCode:"58",name:"Venezuela",priority:0},VN:{code:"VN",dialCode:"84",name:"Vietnam (Vi\u1EC7t Nam)",priority:0},WF:{code:"WF",dialCode:"681",name:"Wallis and Futuna",priority:0},EH:{code:"EH",dialCode:"212",name:"Western Sahara (\u202B\u0627\u0644\u0635\u062D\u0631\u0627\u0621 \u0627\u0644\u063A\u0631\u0628\u064A\u0629\u202C\u200E)",priority:1},YE:{code:"YE",dialCode:"967",name:"Yemen (\u202B\u0627\u0644\u064A\u0645\u0646\u202C\u200E)",priority:0},ZM:{code:"ZM",dialCode:"260",name:"Zambia",priority:0},ZW:{code:"ZW",dialCode:"263",name:"Zimbabwe",priority:0},AX:{code:"AX",dialCode:"358",name:"\xC5land Islands",priority:1}};var ne={invalidSignInUser:"Invalid user provided to sign in"};var oe={thousandSeparator:",",decimalSeparator:".",decimalDigits:2};var se={defaultDateFormat:"YYYY-MM-DD",defaultTimeFormat:"HH:mm",defaultDateTimeFormat:"YYYY-MM-DD HH:mm",invalidDate:"Invalid date",invalidTime:"Invalid time",invalidDateTime:"Invalid date and time",today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow",selectedDate:"Selected date",selectedTime:"Selected time",selectedDateTime:"Selected date and time"};var de={};var le={separators:{multiple:", ",single:", "},failedForNFields:{one:"Validation failed for one field",other:"Validation failed for %{count} fields"},failedForNItems:{one:"Validation failed for one item",other:"Validation failed for %{count} items"},multipleOf:"This field must be a multiple of %{multipleOf}",invalidRule:"Invalid validation rule: %{rule}",invalidRuleParams:"Invalid parameters for rule %{rule}; params: %{ruleParams[0]}, %{ruleParams[1]}, ...",invalidMessage:"Invalid validation message for rule %{rule}; error validating value %{value}",invalidEnumValue:"The field %{field} must be one of %{expectedValues}",required:"This field is required",minLength:"This field must be at least %{minLength} characters long",maxLength:"This field must be at most %{maxLength} characters long",minValue:"This field must be at least %{minValue}",maxValue:"This field must be at most %{maxValue}",pattern:"This field must match the pattern %{pattern}",email:"This field must be a valid email address",url:"This field must be a valid URL",date:"This field must be a valid date",time:"This field must be a valid time",datetime:"This field must be a valid date and time","datetime-local":"This field must be a valid date and time",month:"This field must be a valid month",week:"This field must be a valid week",number:"This field must be a valid number",integer:"This field must be a valid integer",evenNumber:"This field must be an even integer",oddNumber:"This field must be an odd integer",float:"This field must be a valid float",fileName:"This field must be a valid file name",isNumber:"This field must be a valid number",isNonNullString:"This field must be a non null string",length:"This field must be exactly %{length} characters long",lengthRange:"This field must be between %{minLength} and %{maxLength} characters long",numberLTE:"This field must be less than or equal to %{ruleParams[0]}",numberLT:"This field must be less than %{ruleParams[0]}",numberGTE:"This field must be greater than or equal to %{ruleParams[0]}",numberGT:"This field must be greater than %{ruleParams[0]}",noteEquals:"This field must be different from %{ruleParams[0]}",numberIsDifferentFrom:"This field must be different from %{ruleParams[0]}",numberEquals:"This field must be equal to %{ruleParams[0]}",phoneNumber:"This field must be a valid phone number",emailOrPhoneNumber:"This field must be a valid email or phone number",boolean:"This field must be a valid boolean value",numberBetween:"This field must be between %{min} and %{max}",decimalCount:"This field must have(at least) %{ruleParams[0]} decimal places or/and at most %{ruleParams[1]} decimal places",decimalPlaces:"This field must have exactly %{places} decimal places",string:"This field must be a string",endsWithOneOf:"This field must end with one of the following values: %{endings}",startsWithOneOf:"This field must start with one of the following values: %{prefixes}",array:"This field must be an array",arrayMinLength:"This field must have at least %{minLength} items",arrayMaxLength:"This field must have at most %{maxLength} items",arrayLength:"This field must have exactly %{length} items",arrayContains:"This field must contain all of the following values: %{requiredValues}",arrayUnique:"This field must contain only unique values",arrayAllStrings:"This field must be an array of strings",arrayAllNumbers:"This field must be an array of numbers",arrayOf:`The field %{fieldName} must be an array where each item matches all the specified rules. Errors:
|
|
2
|
+
%{failedRulesErrors}`,oneOf:`The field %{fieldName} must match at least one of the following validation rules:
|
|
3
|
+
%{failedRulesErrors}`,allOf:`The field %{fieldName} must match all of the following validation rules:
|
|
4
|
+
%{failedRulesErrors}`,validateNested:`The field %{fieldName} must be a valid nested object. Errors:
|
|
5
|
+
%{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var Ee={auth:ne,currencies:oe,countries:ie,dates:se,resources:de,validator:le};function u(e){return !!(e&&typeof e=="string")}function f(...e){for(var r in e){let t=e[r];if(u(t))return t}return ""}var C=class C{static get logger(){let r=Reflect.getMetadata(C.loggerMetaData,C);return ce(r)&&(this._logger=r),this._logger?this._logger:console}static set logger(r){ce(r)&&Reflect.defineMetadata(C.loggerMetaData,r,C);}static _log(r,...t){let a=C.logger;r=f(r),r&&typeof a[r]=="function"?a[r](C.getDateTimeString(),...t):console.log("Logger level not found : [",r,"]",...t);}static getDateTimeString(){let{day:r,year:t,hours:a,minutes:i,seconds:n,dayNameShort:o,monthName:d}=g.getUTCDateTimeDetails(),c=r<10?"0"+r:r,l=a<10?"0"+a:a,y=i<10?"0"+i:i,h=n<10?"0"+n:n;return "["+[o,c,d,t].join(" ")+" "+[l,y,h].join(":")+"]"}static log(...r){this._log("log",...r);}static info(...r){this._log("info",...r);}static debug(...r){this._log("debug",...r);}static warn(...r){this._log("warn",...r);}static error(...r){this._log("error",...r);}};C.loggerMetaData=Symbol("logger-meta-data");var N=C,ce=e=>{if(!e)return false;try{return ["warn","info","error"].every(r=>typeof e[r]=="function")}catch(r){return false}};function Ie(e){return typeof e=="boolean"||!e||typeof e=="number"||typeof e=="string"||typeof e=="symbol"?false:Object(e).constructor===Promise||e.constructor&&(e.constructor.name==="Promise"||e.constructor.name==="AsyncFunction")||e instanceof Promise||typeof(e==null?void 0:e.then)=="function"&&typeof(e==null?void 0:e.catch)=="function"&&typeof(e==null?void 0:e.finally)=="function"?true:e&&typeof e.constructor=="function"&&Function.prototype.toString.call(e.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function ue(e){return e&&Object.prototype.toString.call(e)==="[object Promise]"?true:Ie(e)}function me(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var x=()=>{var e;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((e=process==null?void 0:process.versions)!=null&&e.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(r){}return false},Le=()=>{var e,r;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((e=window==null?void 0:window.process)==null?void 0:e.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((r=process.versions)!=null&&r.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Pe=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(e){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(r){}}return false},Re=()=>typeof window=="undefined"&&typeof process!="undefined",fe=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),xe=()=>{if(!me()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let e=navigator.userAgent.toLowerCase();return /android/i.test(e)},He=()=>{var e;return !fe()||!(window!=null&&window.ReactNativeWebView)?false:typeof((e=window==null?void 0:window.ReactNativeWebView)==null?void 0:e.postMessage)=="function"},Fe=()=>x()&&process.platform==="darwin",ke=()=>x()&&process.platform==="win32",Be=()=>x()&&process.platform==="linux",ye={isWeb:me,isLinux:Be,isDarwin:Fe,isWin32:ke,isNode:x,isElectron:Le,isTouchDevice:Pe,isServerSide:Re,isClientSide:fe,isAndroidMobileBrowser:xe,isReactNativeWebview:He};var O=class e{static decycle(r,t=[]){if(typeof r=="function")return;if(!r||typeof r!="object")return r;if(t.includes(r))return null;let a=t.concat([r]);return Array.isArray(r)?r.map(i=>e.decycle(i,a)):Object.fromEntries(Object.entries(r).map(([i,n])=>[i,e.decycle(n,a)]))}static stringify(r,t=false){return typeof r=="string"?r:JSON.stringify(t!==false?e.decycle(r):r)}static isJSON(r){if(typeof r!="string")return false;let t=r.trim();if(t.length===0)return false;let a=t[0];if(a!=="{"&&a!=="[")return false;try{let i=JSON.parse(t);return i!==null&&typeof i=="object"}catch(i){return false}}static parse(r,t){if(typeof r=="string")try{r=JSON.parse(r,t);}catch(a){return r}if(r&&typeof r=="object")for(let a in r){let i=r[a];e.isJSON(i)&&(r[a]=e.parse(i,t));}return r}};var D=class D{static get storage(){var t;let r=Reflect.getMetadata(D.sessionStorageMetaData,D);if(V(r)&&(this._storage=r),this._storage)return this._storage;if(ye.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((t=window.localStorage)!=null&&t.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,i)=>window.localStorage.setItem(a,i),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:i=>a[i],set:(i,n)=>a[i]=n,remove:i=>delete a[i],removeAll:()=>a={}};}return this._storage}static set storage(r){V(r)&&Reflect.defineMetadata(D.sessionStorageMetaData,r,D);}static get keyNamespace(){return u(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(r){u(r)&&(this._keyNamespace=r.trim().replace(/\s+/g,"-"));}static sanitizeKey(r){if(!r||!u(r))return "";r=r.trim().replace(/\s+/g,"-");let t=this.keyNamespace;return t?`${t}-${r}`:r}};D.sessionStorageMetaData=Symbol("sessionStorage"),D._keyNamespace=void 0;var b=D;function H(e){return b.sanitizeKey(e)}var pe=(e,r)=>(e=e&&O.stringify(e,r),e==null&&(e=""),e),ge=e=>{if(ue(e))return new Promise((r,t)=>{e.then(a=>{r(O.parse(a));}).catch(a=>{t(a);});});if(e!=null)return O.parse(e)},Ge=e=>{if(e=H(e),b.storage&&e&&typeof e=="string"){let r=b.storage.get(e);return ge(r)}},Ke=e=>{if(e=H(e),b.storage&&e&&typeof e=="string")return b.storage.remove(e)},Ve=()=>{if(b.storage)return b.storage.removeAll()},V=e=>{if(!e)return false;try{return ["get","set","remove","removeAll"].every(r=>typeof e[r]=="function")}catch(r){return false}},W={get:Ge,set:(e,r,t=true)=>(e=H(e),b.storage.set(e,pe(r,t))),remove:Ke,handleGetValue:ge,sanitizeKey:H,handleSetValue:pe,isValidStorage:V,Manager:b,removeAll:Ve};function S(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function w(e){if(e instanceof RegExp)return true;if(!e||typeof e!="object"||!Object.prototype.toString.call(e).includes("RegExp"))return false;try{return new RegExp(e),!0}catch(r){return false}}function E(e){return !e||typeof e!="object"?false:e instanceof Date?true:typeof e.getTime!="function"?false:!(Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))}function U(e){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:e===document?true:"HTMLElement"in window?!!e&&e instanceof HTMLElement:!!e&&typeof e=="object"&&e.nodeType===1&&!!e.nodeName}function m(e){if(e===null||typeof e!="object"||U(e)||E(e)||w(e)||S(e))return false;let r=Object.getPrototypeOf(e);if(r===null)return true;let t=r.constructor;if(typeof t!="function")return false;if(t===Object)return true;let a=t.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof r.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")&&typeof r.isPrototypeOf=="function"}function Z(e){if(Array.isArray(e)){let a=[];for(var r=0;r<e.length;r++)a[r]=Z(e[r]);return a}else if(m(e)&&e){let a={};for(var t in e)e.hasOwnProperty(t)&&(a[t]=Z(e[t]));return a}else return e}Object.getSize=function(e,r=false){if(!e||typeof e!="object")return 0;if(Array.isArray(e))return e.length;typeof r!="boolean"&&(r=false);let t=0;for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&(t++,r===true))return t;return t};function I(e,...r){let t=Array.isArray(e),a=m(e);(e==null||!t&&!a)&&(e={});for(let i=0;i<r.length;i++){let n=r[i];if(n==null)continue;let o=m(n),d=Array.isArray(n);if(!(!o&&!d)){if(t){d&&he(e,n);continue}else if(d)continue;for(let c in n){let l=n[c];if(l==null)continue;if(l===n){e[c]=e;continue}let y=e[c],h=Array.isArray(y),M=Array.isArray(l);if(h){M?he(e[c],l):e[c]=l;continue}else if(!m(y)){e[c]=l;continue}if(M||!m(l)){e[c]=l;continue}e[c]=I({},y,l);}}}return e}var he=(e,r)=>{let t=r.length,a=0;for(let i=0;i<e.length;i++){let n=e[i],o=r[i];if(i<t){let d=Array.isArray(n),c=Array.isArray(o),l=m(n),y=m(o);d&&c||l&&y?(e[a]=I(d?[]:{},n,o),a++):o!=null?(e[a]=o,a++):n!=null&&(e[a]=n,a++);}}for(let i=e.length;i<t;i++)r[i]!==void 0&&r[i]!==null&&e.push(r[i]);return e};function We(e,r){return F(e,"",{},r)}function F(e,r="",t={},a){if(t=m(t)?t:{},S(e)||E(e)||w(e)||Array.isArray(e)&&(a!=null&&a.skipArrays))return r&&(t[r]=e),t;if(typeof e=="function"||typeof e=="object"&&!m(e)&&!Ue(e))return t;if(e instanceof Map||e instanceof WeakMap)return Array.from(e.entries()).forEach(([i,n])=>{let o=r?`${r}[${String(i)}]`:String(i);F(n,o,t,a);}),t;if(Array.isArray(e)||e instanceof Set||e instanceof WeakSet)return (Array.isArray(e)?e:Array.from(e)).forEach((n,o)=>{let d=r?`${r}[${o}]`:String(o);F(n,d,t,a);}),t;if(m(e))for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=e[i],o=r?r.endsWith("]")?`${r}.${i}`:`${r}.${i}`:i;F(n,o,t,a);}return t}function Ue(e){return Array.isArray(e)||e instanceof Set||e instanceof Map||e instanceof WeakMap||e instanceof WeakSet}function Ze(e){return Object.entries(e)}Object.typedEntries=Ze;Object.flatten=We;Object.clone=Z;function L(e,r){if(e==null)return "";if(typeof e=="string")return e;if((typeof e=="number"||typeof e=="object"&&e instanceof Number)&&typeof e.formatNumber=="function")return e.formatNumber();if(e instanceof Date||typeof e=="object"&&e!==null&&e.constructor===Date)return typeof e.toFormat=="function"?e.toFormat():e.toISOString();if(e instanceof Error)return `Error: ${e.message}`;if(w(e))return e.toString();if(S(e))return String(e);if(Array.isArray(e))return JSON.stringify(e);if(typeof e=="object"&&e!==null){if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString();if(typeof e.toString=="function"){let t=e.toString();if(t!=="[object Object]")return t}return JSON.stringify(e)}return typeof(e==null?void 0:e.toString)=="function"?e.toString():String(e)}function be(e,r,t){let a=L,i=f(e);if(!m(r)||!r)return i;let n=/%\{([^}]+)\}/g,o=new Set,d,c=f(e);for(;(d=n.exec(c))!==null;){let l=d[1];l!==void 0&&o.add(l);}return o.forEach(l=>{let y;y=`%{${l}}`;let h=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,M=h===void 0?"":(()=>{try{return a(h,l,L)}catch($){return L(h)}})(),Se=y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(Se,"g"),M);}),i}function z(e){return !!(e==null||typeof e=="number"&&isNaN(e)||typeof e=="string"&&e.trim()==="")}function T(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function ze(e){return f(e).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f")}function k(e,r){var t=Object.prototype.toString.call(e);return t==="[object "+r+"]"}function A(e,r){if(["boolean","undefined"].includes(typeof e)||e===null)return String(e);if(T(e))return e.formatNumber();if(e instanceof Date)return e.toFormat();if(e instanceof Error)return e==null?void 0:e.toString();r=Object.assign({},r);let{parenthesis:t}=r,a=t?"(":"",i=t?")":"";return typeof e=="string"?(r==null?void 0:r.escapeString)!==false?"'"+ze(e)+"'":e:k(e,"RegExp")||k(e,"Number")||k(e,"Boolean")?e.toString():k(e,"Date")?"new Date("+e.getTime()+")":Array.isArray(e)?"["+e.map(n=>A(n,r)).join(",")+"]":typeof e=="object"?a+"{"+Object.keys(e).map(n=>{var o=e[n];return A(n,r)+":"+A(o,r)}).join(",")+"}"+i:e&&typeof(e==null?void 0:e.toString)=="function"?e==null?void 0:e.toString():String(e)}var Ce=Symbol("TRANSLATION_KEY");var p=class p extends i18nJs.I18n{constructor(t={},a={}){super({},a);this._isLoading=false;this._locales=[];this.namespaceResolvers={};this._observableFactory=re();this._____isObservable=true;this.hasRegisteredDefaultTranslations=false;this._namespacesLoaded={};this.hasRegisteredDefaultTranslations||(this.registerTranslations(K),this.hasRegisteredDefaultTranslations=true),this.registerTranslations(t),this.loadNamespaces();}static[Symbol.hasInstance](t){return this.isI18nInstance(t)}static isI18nInstance(t){if(!t||typeof t!="object")return false;try{if(t instanceof i18nJs.I18n)return !0}catch(a){}return typeof t.getLocale=="function"&&typeof t.translate=="function"&&typeof t.translateTarget=="function"}translate(t,a){return this.isPluralizeOptions(a)&&this.canPluralize(t)?(typeof a.count=="number"&&(a.countStr=a.count.formatNumber()),this.pluralize(a.count,t,a)):super.translate(t,a)}translateTarget(t,a){let i=p.getTargetTanslationKeys(t);for(let n in i)u(i[n])&&(i[n]=this.translate(i[n],a));return i}translateObject(t,a){if(!m(t))return {};let i={};for(let n in t){let o=t[n];u(o)&&(i[n]=Me.translate(o,a));}return i}static getTargetTanslationKeys(t){return ae(t,Ce)}on(t,a){return this._observableFactory.on.call(this,t,a)}finally(t,a){return this._observableFactory.finally.call(this,t,a)}off(t,a){var i;return (i=this._observableFactory)==null?void 0:i.off.call(this,t,a)}trigger(t,...a){var i;return (i=this._observableFactory)==null?void 0:i.trigger.call(this,t,...a)}offAll(){var t;return (t=this._observableFactory)==null?void 0:t.offAll.call(this)}once(t,a){var i;return (i=this._observableFactory)==null?void 0:i.once.call(this,t,a)}getEventCallBacks(){var t;return (t=this._observableFactory)==null?void 0:t.getEventCallBacks.call(this)}static getInstance(t){if(!this.isI18nInstance(p.instance)){let a=p.getLocaleFromSession();p.instance=this.createInstance({},Object.assign({},a?{locale:a}:{},t));}return p.instance}isDefaultInstance(){return this===p.instance}static setLocaleToSession(t){W.set("i18n.locale",t);}static getLocaleFromSession(){let t=W.get("i18n.locale");return u(t)?t:""}canPluralize(t,a){a=f(a,this.getLocale());let i=this.getNestedTranslation(t,a);return !m(i)||!i?false:u(i==null?void 0:i.one)&&u(i==null?void 0:i.other)}getNestedTranslation(t,a){a=f(a,this.getLocale());let i=(u(t)?t.trim().split("."):Array.isArray(t)?t:[]).filter(u);if(!i.length)return;let n=this.getTranslations(a);for(let o of i)if(m(n))n=n[o];else return;return n}isPluralizeOptions(t){return !!(m(t)&&t&&typeof t.count=="number")}static RegisterTranslations(t){return p.getInstance().registerTranslations(t)}static createInstance(t={},a={}){let d=Object.assign({},a),{interpolate:i}=d,n=te(d,["interpolate"]),o=new p(t,n);return o.interpolate=(c,l,y)=>{let h=p.flattenObject(y),M=this.defaultInterpolator(c,l,h);return u(M)&&M!==l&&(l=M),typeof i=="function"?i(c,l,y):be(l,y)},o}getTranslations(t){let a=m(this.translations)?this.translations:{};return u(t)?m(a[t])?a[t]:{}:a}static registerMomentLocale(t,a){return u(t)&&m(a)&&Array.isArray(a.months)&&(this.momentLocales[t]=I({},this.momentLocales[t],a)),this.momentLocales}static getMomentLocale(t){return this.momentLocales[t]}static setMomentLocale(t){try{return v__default.default.updateLocale(t,this.getMomentLocale(t)),!0}catch(a){console.error(a," setting moment locale : ",t);}return false}registerTranslations(t){return this.store(t),this.getTranslations()}store(t){super.store(t),this.trigger("translations-changed",this.getLocale(),this.getTranslations());}resolveTranslations(t){try{let a=Object.getOwnPropertyNames(t);for(let i of a){let n=Reflect.getMetadata(Ce,t,i);if(n)try{t[i]=this.translate(n);}catch(o){N.error(o," resolving translation for key : ",n);}}}catch(a){N.error(a," resolving translations for target : ",t);}}getMissingPlaceholderString(t,a,i){return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,t,f(a),Object.assign({},i)):t}getLocale(){return super.locale}setLocales(t){return this._locales=Array.isArray(t)?t:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}hasLocale(t){return u(t)&&this.getLocales().includes(t)}getLocales(){let t=Object.keys(this.getTranslations()),a=Array.isArray(this._locales)?this._locales:["en"],i=[...t,...a.filter(n=>!t.includes(n))];return i.includes("en")||i.push("en"),i}isLocaleSupported(t){return u(t)?this.getLocales().includes(t):false}isLoading(){return this._isLoading}setLocale(t,a=false){return super.locale===t&&a!==true&&this._namespacesLoaded[t]?Promise.resolve(this.getLocale()):new Promise((i,n)=>(this._isLoading=true,this.trigger("namespaces-before-load",t),this.loadNamespaces(t).then(o=>{this.isDefaultInstance()&&(p.instance=this,this.isLocaleSupported(t)&&p.setLocaleToSession(t)),super.locale=t,p.setMomentLocale(t),this.trigger("locale-changed",t,o),i(t);}).catch(n).finally(()=>{this._isLoading=false;})))}registerNamespaceResolver(t,a){if(!u(t)||typeof a!="function"){console.warn("Invalid arguments for registerNamespaceResolver.",t,a);return}this.namespaceResolvers[t]=a;}static RegisterNamespaceResolver(t,a){return p.getInstance().registerNamespaceResolver(t,a)}loadNamespace(t,a,i=true){return !u(t)||!this.namespaceResolvers[t]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${t}".`)):(a=f(a,this.getLocale()),u(a)?this.namespaceResolvers[t](a).then(n=>{let o={};return o[a]=Object.assign({},n),m(n)&&(i!==false&&this.store(o),this.trigger("namespace-loaded",t,a,o)),o}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${t}".`)))}static LoadNamespace(t,a,i=true){return p.getInstance().loadNamespace(t,a,i)}loadNamespaces(t,a=true){let i=[],n={};t=f(t,this.getLocale()),this._isLoading=true;for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&typeof this.namespaceResolvers[o]=="function"&&i.push(new Promise(d=>{this.namespaceResolvers[o](t).then(c=>{I(n,c);}).finally(()=>{d(true);});}));return Promise.all(i).then(()=>{let o={};return o[t]=n,a!==false&&this.store(o),setTimeout(()=>{this.trigger("namespaces-loaded",t,o);},100),o}).finally(()=>{this._isLoading=false;})}static LoadNamespaces(t,a=true){return p.getInstance().loadNamespaces(t,a)}static flattenObject(t){return m(t)?Object.flatten(t):t}static defaultInterpolator(t,a,i){return z(a)?"":S(a)?(a=String(a),!m(i)||!i||!m(i)||!i?a:a.replace(/%{(.*?)}/g,(n,o)=>z(i[o])?"":S(i[o])?String(i[o]):A(i[o],{escapeString:false}))):A(a,{escapeString:false})}};p.momentLocales={};var Y=p,Me=Y.getInstance();try{Object.setPrototypeOf(Me,Y.prototype);}catch(e){}function J(e){return !!(e==null||typeof e=="undefined"||typeof e=="string"&&e===""||Array.isArray(e)&&!e.length)}var s=class s{static parseString(r,t){if(u(r)&&u(t))try{let a=v__default.default(r,t,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:t,isValid:!0}}catch(a){}try{if(Array.isArray(t)&&(t!=null&&t.length))for(let a of t){let i=De(r,a);if(i)return i}for(let a of s.DATE_FORMATS){let i=De(r,a);if(i)return i}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(r){let t=r?s.parseDate(r):new Date;return t?t.toISOString():""}static isoStringToDate(r){return new Date(r)}static parseDate(r,t){if(s.isDateObj(r))return r;if(!u(t)){let a=s.parseString(r);return a!=null&&a.isValid?a.date:null}if(J(r))return null;try{let a=v__default.default(r,t,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",r," format is : ",t);}return null}static toSQLDateTimeFormat(r){if(!s.isDateObj(r))return "";let t=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),n=String(r.getHours()).padStart(2,"0"),o=String(r.getMinutes()).padStart(2,"0"),d=String(r.getSeconds()).padStart(2,"0");return `${t}-${a}-${i} ${n}:${o}:${d}`}static getI18n(r){return Y.isI18nInstance(r)?r:Y.getInstance()}static getDefaultDateTimeFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(r){if(!s.isDateObj(r))return "";let t=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0");return `${t}-${a}-${i}`}static toSQLTimeFormat(r){if(!s.isDateObj(r))return "";let t=String(r.getHours()).padStart(2,"0"),a=String(r.getMinutes()).padStart(2,"0"),i=String(r.getSeconds()).padStart(2,"0");return `${t}:${a}:${i}`}static getDefaultTimeFormat(r){return f(this.getI18n(r).getNestedTranslation("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(r,t){if(r==null||typeof r=="boolean")return false;if(s.isDateObj(r))return true;if(T(r)){let i=new Date(r);return i&&!isNaN(i.getTime())}if(u(r))return !!s.parseDate(r,t);if(r!=null&&r.toString&&(r==null?void 0:r.toString())==parseInt(r).toString())return false;let a=new Date(r);return s.isDateObj(a)}static addToDate(r,t,a){if(T(r)||(r=0),J(t)&&(t=new Date),s.isValidDate(t)&&u(t)&&(t=new Date(t)),s.isValidDate(t)||(t=u(t)?new Date(t):new Date),u(a)&&typeof t["set"+a]=="function"&&typeof t["get"+a]=="function"){let i="set"+a,n="get"+a;t=new Date(t[i](t[n]()+r));}return t}static addDays(r,t){return s.addToDate(r,t,"Date")}static addMilliseconds(r,t){return T(r)||(r=0),s.isDateObj(t)||(t=new Date),t=t||new Date,new Date(t.getTime()+r)}static addSeconds(r,t){return T(r)||(r=0),s.addMilliseconds(r*1e3,t)}static addMinutes(r,t){return T(r)||(r=0),s.addMilliseconds(r*6e4,t)}static addHours(r,t){return T(r)||(r=0),s.addMilliseconds(r*36e5,t)}static addMonths(r,t,a){return s.addToDate(r,t,"Month")}static addWeeks(r,t){return r=(T(r)?r:0)*7,s.addToDate(r,t,"Date")}static addYears(r,t){T(r)||(r=0);let a=new Date(s.addToDate(0,t)),i=a.getFullYear();return i+r<0?r=0:r+=i,a.setFullYear(r),new Date(a)}static formatDate(r,t){try{let a=v__default.default(r);if(a.isValid())return a.format(f(t,s.getDefaultDateTimeFormat()))}catch(a){}return f(s.isValidDate(r)?r==null?void 0:r.toString():"")}static getUTCDateTimeDetails(r){let t=r?v__default.default.utc(r):v__default.default.utc();return {year:t.year(),day:t.day(),month:t.month(),monthString:t.format("MM"),hours:t.hours(),date:t.date(),minutes:t.minutes(),seconds:t.seconds(),monthName:t.format("MMMM"),dayName:t.format("dddd"),dayNameShort:t.format("ddd")}}};s.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],s.SQL_DATE_FORMAT="YYYY-MM-DD",s.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",s.SQL_TIME_FORMAT="HH:mm:ss",s.getCurrentMonthDaysRange=r=>{let t=s.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(t.getFullYear(),t.getMonth()+1,0);return {first:a,last:i}},s.getPreviousWeekDaysRange=r=>{let t=s.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=new Date(t.getTime()-3600*24*7*1e3),i=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),d=new Date(a.setDate(o)),c=new Date(i.setDate(o+6));return {first:d,last:c}},s.getCurrentWeekDaysRange=r=>{let t=s.isValidDate(r)?new Date(r):new Date().resetHours2Minutes2Seconds(),a=t.getDay(),i=t.getDate()-a+(a==0?-6:1),n=new Date(t),o=new Date(t.setDate(i));return n.setDate(n.getDate()+6),{first:o,last:n}},s.isDateObj=E;var g=s,De=(e,r)=>{let t=v__default.default(e,r,true);try{if(t.isValid()&&t.format(r)===e||v__default.default.utc(t,!0).format(r)===e)return {date:t.toDate(),matchedFormat:r,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return g.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return g.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return g.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(e){return g.formatDate(this,e)};Date.prototype.addYears=function(e){return g.addYears(e,this)};Date.prototype.addMonths=function(e){return g.addMonths(e,this)};Date.prototype.addMinutes=function(e){return g.addMinutes(e,this)};Date.prototype.addSeconds=function(e){return g.addSeconds(e,this)};Date.prototype.addDays=function(e){return g.addDays(e,this)};Date.prototype.addWeeks=function(e){return g.addWeeks(e,this)};Date.prototype.addHours=function(e){return g.addHours(e,this)};exports.DateHelper=g;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given object is a valid date object.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} dateObj The object to check.
|
|
5
|
+
* @returns {boolean} True if the object is a valid date object, false otherwise.
|
|
6
|
+
*
|
|
7
|
+
* Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* console.log(DateHelper.DateHelper.isDateObj(new Date())); // Output: true
|
|
10
|
+
* console.log(DateHelper.DateHelper.isDateObj({})); // Output: false
|
|
11
|
+
* console.log(DateHelper.DateHelper.isDateObj("2022-01-01")); // Output: false
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function isDateObj(dateObj: any): dateObj is Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function e(t){return !t||typeof t!="object"?false:t instanceof Date?true:typeof t.getTime!="function"?false:!(Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))}exports.isDateObj=e;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for customizing the debounce function behavior
|
|
3
|
+
*/
|
|
4
|
+
export interface DebounceOptions {
|
|
5
|
+
/**
|
|
6
|
+
* If true, the debounced function will be invoked on the leading edge of the timeout
|
|
7
|
+
* instead of the trailing edge
|
|
8
|
+
*/
|
|
9
|
+
leading?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* If true, the debounced function will be invoked on the trailing edge of the timeout
|
|
12
|
+
*/
|
|
13
|
+
trailing?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum time the debounced function is allowed to be delayed before it's invoked
|
|
16
|
+
*/
|
|
17
|
+
maxWait?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A debounced function that can be invoked, cancelled, and flushed
|
|
21
|
+
*/
|
|
22
|
+
export interface DebouncedFunction<T extends (...args: any[]) => any> {
|
|
23
|
+
/**
|
|
24
|
+
* Invokes the debounced function
|
|
25
|
+
*/
|
|
26
|
+
(...args: Parameters<T>): ReturnType<T> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Cancels any pending invocation of the debounced function
|
|
29
|
+
*/
|
|
30
|
+
cancel: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Immediately invokes any pending debounced function call
|
|
33
|
+
*/
|
|
34
|
+
flush: () => ReturnType<T> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Returns true if there's a pending debounced function call
|
|
37
|
+
*/
|
|
38
|
+
isPending: () => boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a debounced function that delays invoking func until after wait milliseconds have elapsed
|
|
42
|
+
* since the last time the debounced function was invoked.
|
|
43
|
+
*
|
|
44
|
+
* The debounced function comes with methods to cancel delayed func invocations and to flush them immediately.
|
|
45
|
+
* Provide options to indicate whether func should be invoked on the leading and/or trailing edge of the wait timeout.
|
|
46
|
+
*
|
|
47
|
+
* @param func The function to debounce
|
|
48
|
+
* @param wait The number of milliseconds to delay
|
|
49
|
+
* @param options The options object with leading, trailing, and maxWait properties
|
|
50
|
+
* @returns A debounced version of the function with cancel, flush, and isPending methods
|
|
51
|
+
*/
|
|
52
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: DebounceOptions): DebouncedFunction<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function W(p,u=0,r={}){r=Object.assign({},r);let f,s,t,a,i,c,d=0,R=!!r.leading,k=r.trailing!==false;r.maxWait!==void 0&&(t=r.maxWait);let g=()=>Date.now();function h(e){let n=e-(c||0);return c===void 0||n>=u?true:t!==void 0?e-d>=t:false}function b(e){let n=f,o=s;return d=e,a=p.apply(o,n),a}function l(e,n){return setTimeout(e,n)}function x(){i!==void 0&&(clearTimeout(i),i=void 0);}function T(){let e=g();if(h(e))return v(e);let n=e-(c||0),o=e-d,y=u-n;if(t!==void 0){let P=t-o;y=Math.min(y,P);}i=l(T,y);}function I(e){d=e;let n=t!==void 0?Math.min(u,t-(e-d)):u;return i=l(T,n),R?b(e):a}function v(e){if(i=void 0,k&&f){let n=b(e);return f=void 0,s=void 0,n}return f=void 0,s=void 0,a}function m(...e){let n=g();if(u===0)return d=n,p.apply(this,e);let o=h(n);if(f=e,s=this,c=n,o){if(i===void 0)return I(n);if(t!==void 0)return x(),i=l(T,u),b(n)}return i===void 0&&(i=l(T,u)),a}return m.cancel=function(){i!==void 0&&x(),d=0,f=void 0,c=void 0,s=void 0,i=void 0;},m.flush=function(){return i!==void 0?v(g()):a},m.isPending=function(){return i!==void 0},m}exports.debounce=W;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a default array based on the provided arguments.
|
|
3
|
+
* If there is only one argument, it returns the argument if it's an array, or an empty array if it's not.
|
|
4
|
+
* If there are multiple arguments, it returns the first non-empty array found, or the first array if all are empty.
|
|
5
|
+
* If no arrays are found, it returns an empty array.
|
|
6
|
+
*
|
|
7
|
+
* @template T The type of elements in the array.
|
|
8
|
+
* @param args Variable number of arguments to check for arrays.
|
|
9
|
+
* @returns The default array based on the provided arguments.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* defaultArray([1, 2, 3]); // returns [1, 2, 3]
|
|
13
|
+
* defaultArray(1, 2, 3); // returns []
|
|
14
|
+
* defaultArray([1, 2, 3], [4, 5, 6]); // returns [1, 2, 3]
|
|
15
|
+
* defaultArray([], [4, 5, 6]); // returns [4, 5, 6]
|
|
16
|
+
* defaultArray([], []); // returns []
|
|
17
|
+
*/
|
|
18
|
+
export declare function defaultArray<T extends any = any>(...args: any[]): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function y(...r){if(r.length===1)return Array.isArray(r[0])?r[0]:[];let e=null;for(var t in r){let n=r[t];if(Array.isArray(n)){if(n.length)return n;e||(e=n);}}return e||[]}exports.defaultArray=y;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the first boolean value among the provided arguments.
|
|
3
|
+
*
|
|
4
|
+
* @param {...any[]} args The values to check for a boolean value.
|
|
5
|
+
* @returns {boolean} The first boolean value found, or false if none is found.
|
|
6
|
+
*
|
|
7
|
+
* Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* console.log(defaultBool("a string", false, true)); // Output: false
|
|
10
|
+
* console.log(defaultBool(1, 2, 3)); // Output: false
|
|
11
|
+
* console.log(defaultBool("hello", 42,true, )); // Output: true
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function defaultBool(...args: any[]): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function n(...o){for(let e in o)if(typeof o[e]=="boolean")return o[e];return false}exports.defaultBool=n;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the first non-null string value among the provided arguments.
|
|
3
|
+
*
|
|
4
|
+
* This function takes a variable number of arguments and returns the first one that is a non-null string.
|
|
5
|
+
* It iterates through the arguments and checks each one using the `isNonNullString` function.
|
|
6
|
+
* If a non-null string is found, it is returned immediately. If no non-null string is found, an empty string is returned.
|
|
7
|
+
*
|
|
8
|
+
* @param {...any[]} args The values to check for a non-null string.
|
|
9
|
+
* @returns {string} The first non-null string value found, or an empty string if none is found.
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* console.log(defaultStr(1,2,"hello", null, "world")); // Output: "hello"
|
|
13
|
+
* console.log(defaultStr(null, null, "world")); // Output: "world"
|
|
14
|
+
* console.log(defaultStr(null, null, null)); // Output: ""
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function defaultStr(...args: any[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function t(n){return !!(n&&typeof n=="string")}function u(...n){for(var i in n){let r=n[i];if(t(r))return r}return ""}exports.defaultStr=u;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the first non-null and non-undefined value among the provided arguments.
|
|
3
|
+
*
|
|
4
|
+
* This function takes a variable number of arguments and returns the first one that is not null or undefined.
|
|
5
|
+
* It iterates through the arguments and checks each one. If a non-null and non-undefined value is found, it is returned immediately.
|
|
6
|
+
* If no non-null and non-undefined value is found, but a null value is found, null is returned. Otherwise, undefined is returned.
|
|
7
|
+
*
|
|
8
|
+
* @param {...any[]} args The values to check for a non-null and non-undefined value.
|
|
9
|
+
* @returns {any} The first non-null and non-undefined value found, or null if a null value is found, or undefined if no value is found.
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* console.log(defaultVal("hello", null, "world")); // Output: "hello"
|
|
13
|
+
* console.log(defaultVal(null, null, "world")); // Output: "world"
|
|
14
|
+
* console.log(defaultVal(null, null, null)); // Output: null
|
|
15
|
+
* console.log(defaultVal(undefined, undefined)); // Output: undefined
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function defaultVal(...args: any[]): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function u(...n){let e;for(let l in n){if(n[l]!==void 0&&n[l]!==null)return n[l];n[l]===null&&(e=null);}return e}exports.defaultVal=u;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isDOMElement } from './isDOMElement';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the maximum z-index value of all elements in the document body.
|
|
4
|
+
*
|
|
5
|
+
* This function iterates through all elements in the document body, excluding those with a `data-highest` attribute or a class of `yetHigher`.
|
|
6
|
+
* It then retrieves the `zIndex` style property of each element using `getComputedStyle` and filters out any non-numeric values.
|
|
7
|
+
* Finally, it returns the maximum z-index value found.
|
|
8
|
+
*
|
|
9
|
+
* @returns The maximum z-index value of all elements in the document body.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getMaxZindex(): number;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if an HTML element has a specific class name.
|
|
14
|
+
*
|
|
15
|
+
* This function takes an HTML element and an optional class name as input.
|
|
16
|
+
* It first checks if the element is a valid DOM element and if the class name is provided.
|
|
17
|
+
* If both conditions are true, it uses a regular expression to test if the class name is present in the element's `className` property.
|
|
18
|
+
*
|
|
19
|
+
* @param elem The HTML element to check.
|
|
20
|
+
* @param className The class name to search for (optional).
|
|
21
|
+
* @returns `true` if the element has the specified class name, `false` otherwise.
|
|
22
|
+
*
|
|
23
|
+
* Example:
|
|
24
|
+
* ```ts
|
|
25
|
+
* const element = document.getElementById("myElement");
|
|
26
|
+
* console.log(hasClassName(element, "active")); // Output: true or false
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function hasClassName(elem: any, className?: string | null): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Adds one or more class names to an HTML element.
|
|
32
|
+
*
|
|
33
|
+
* This function takes an HTML element and a variable number of class names as input.
|
|
34
|
+
* It checks if the element is a valid DOM element and then iterates through the provided class names.
|
|
35
|
+
* If a class name is not already present on the element, it is appended to the element's `className` property.
|
|
36
|
+
*
|
|
37
|
+
* @param elem The HTML element to add class names to.
|
|
38
|
+
* @param args One or more class names to add.
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const elem = document.getElementById('myElement');
|
|
42
|
+
* addClassName(elem, 'class1', 'class2', 'class3');
|
|
43
|
+
* console.log(elem.className); // Output: "class1 class2 class3"
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function addClassName(elem: any, ...args: string[]): void;
|
|
47
|
+
/**
|
|
48
|
+
* Removes one or more class names from an HTML element.
|
|
49
|
+
*
|
|
50
|
+
* This function takes an HTML element and a variable number of class names as input.
|
|
51
|
+
* It checks if the element is a valid DOM element and then iterates through the provided class names.
|
|
52
|
+
* If a class name is present on the element, it is removed from the element's `className` property.
|
|
53
|
+
*
|
|
54
|
+
* @param elem The HTML element to remove class names from.
|
|
55
|
+
* @param args One or more class names to remove.
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const elem = document.getElementById('myElement');
|
|
59
|
+
* elem.className = 'class1 class2 class3';
|
|
60
|
+
* removeClassName(elem, 'class2');
|
|
61
|
+
* console.log(elem.className); // Output: "class1 class3"
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function removeClassName(elem: any, ...args: string[]): void;
|
|
65
|
+
export { isDOMElement };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function a(e){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:e===document?true:"HTMLElement"in window?!!e&&e instanceof HTMLElement:!!e&&typeof e=="object"&&e.nodeType===1&&!!e.nodeName}function d(){if(typeof document=="undefined"||!document||typeof window=="undefined"||!window||typeof(window==null?void 0:window.getComputedStyle)!="function")return 1e3;let e=0;return e=Math.max(e,...Array.from(document.querySelectorAll("body *:not([data-highest]):not(.yetHigher)"),n=>parseFloat(window.getComputedStyle(n).zIndex)).filter(n=>!isNaN(n))),e}function r(e,n){return !a(e)||!n?false:new RegExp(" "+n+" ").test(" "+e.className+" ")}function u(e,...n){if(a(e))for(let t=0;t<n.length;t++){let o=n[t];o&&!r(e,o)&&(e.className+=" "+o);}}function c(e,...n){if(!(!e||!a(e)))for(let t=0;t<n.length;t++){let o=n[t];if(o&&e.className&&typeof e.className=="string"){let i=new RegExp("(\\s|^)"+o+"(\\s|$)");e.className=e.className.replace(i," "),e.className=e.className.replace(o,"");}}}exports.addClassName=u;exports.getMaxZindex=d;exports.hasClassName=r;exports.isDOMElement=a;exports.removeClassName=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given object is a DOM element.
|
|
3
|
+
*
|
|
4
|
+
* This function performs a series of checks to determine if the object is a DOM element.
|
|
5
|
+
* It first checks if the `window` and `document` objects are available, and if the `HTMLElement` constructor is defined.
|
|
6
|
+
* Then, it checks if the object is an instance of `HTMLElement` or if it has the characteristics of a DOM element (e.g., `nodeType` equals 1 and `nodeName` is defined).
|
|
7
|
+
*
|
|
8
|
+
* @param element The object to check.
|
|
9
|
+
* @returns `true` if the object is a DOM element, `false` otherwise.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isDOMElement(element: any): element is HTMLElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function e(n){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:n===document?true:"HTMLElement"in window?!!n&&n instanceof HTMLElement:!!n&&typeof n=="object"&&n.nodeType===1&&!!n.nodeName}exports.isDOMElement=e;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for configuring file extension extraction behavior.
|
|
3
|
+
*/
|
|
4
|
+
export interface GetFileExtensionOptions {
|
|
5
|
+
/**
|
|
6
|
+
* If true, returns extension without the dot prefix (default: false)
|
|
7
|
+
*/
|
|
8
|
+
withoutDot?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Extracts the file extension from a provided string (filename or file path).
|
|
12
|
+
*
|
|
13
|
+
* @param filePath - The file path or filename string to extract extension from
|
|
14
|
+
* @param {GetFileExtensionOptions} options - Optional configuration for extraction behavior
|
|
15
|
+
* @returns The file extension with or without dot, or empty string if no extension found
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* getFileExtension('document.pdf') // Returns '.pdf'
|
|
20
|
+
* getFileExtension('document.pdf', { withoutDot: true }) // Returns 'pdf'
|
|
21
|
+
* getFileExtension('/path/to/file.txt') // Returns '.txt'
|
|
22
|
+
* getFileExtension('file') // Returns ''
|
|
23
|
+
* getFileExtension('archive.tar.gz') // Returns '.gz'
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function getFileExtension(filePath: string, options?: GetFileExtensionOptions): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function l(n,e){var r;let u=(r=e==null?void 0:e.withoutDot)!=null?r:false;if(!n||typeof n!="string")return "";let t=n.trim();if(t==="")return "";let i=t.split("/").pop()||t.split("\\").pop()||t,s=i.lastIndexOf(".");if(s<=0||s===i.length-1)return "";let o=i.substring(s);return u?o.substring(1):o}exports.getFileExtension=l;
|