@acorex/core 16.0.2 → 17.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. package/common/README.md +3 -0
  2. package/common/countries/countries.data.d.ts +2 -0
  3. package/common/countries/country.d.ts +13 -0
  4. package/common/index.d.ts +2 -0
  5. package/config/README.md +3 -0
  6. package/config/index.d.ts +2 -0
  7. package/config/lib/configs.d.ts +6 -0
  8. package/config/lib/configs.service.d.ts +12 -0
  9. package/date-time/README.md +3 -0
  10. package/date-time/index.d.ts +10 -0
  11. package/date-time/lib/calendar.service.d.ts +27 -0
  12. package/date-time/lib/dateTime.config.d.ts +12 -0
  13. package/date-time/lib/datetime.class.d.ts +138 -0
  14. package/date-time/lib/datetime.module.d.ts +8 -0
  15. package/date-time/lib/datetime.pipe.d.ts +12 -0
  16. package/date-time/lib/formatters/datetime-formatter.d.ts +19 -0
  17. package/date-time/lib/formatters/timeleft-formatter.d.ts +16 -0
  18. package/date-time/lib/georgian.calendar.d.ts +21 -0
  19. package/date-time/lib/holidays.loader.d.ts +21 -0
  20. package/date-time/lib/jalali.calendar.d.ts +40 -0
  21. package/esm2022/common/acorex-core-common.mjs +5 -0
  22. package/esm2022/common/countries/countries.data.mjs +2625 -0
  23. package/esm2022/common/countries/country.mjs +2 -0
  24. package/esm2022/common/index.mjs +3 -0
  25. package/esm2022/config/acorex-core-config.mjs +5 -0
  26. package/esm2022/config/index.mjs +3 -0
  27. package/esm2022/config/lib/configs.mjs +7 -0
  28. package/esm2022/config/lib/configs.service.mjs +27 -0
  29. package/esm2022/date-time/acorex-core-date-time.mjs +5 -0
  30. package/esm2022/date-time/index.mjs +11 -0
  31. package/esm2022/date-time/lib/calendar.service.mjs +100 -0
  32. package/esm2022/date-time/lib/dateTime.config.mjs +50 -0
  33. package/esm2022/date-time/lib/datetime.class.mjs +337 -0
  34. package/esm2022/date-time/lib/datetime.module.mjs +27 -0
  35. package/esm2022/date-time/lib/datetime.pipe.mjs +29 -0
  36. package/esm2022/date-time/lib/formatters/datetime-formatter.mjs +32 -0
  37. package/esm2022/date-time/lib/formatters/timeleft-formatter.mjs +91 -0
  38. package/esm2022/date-time/lib/georgian.calendar.mjs +203 -0
  39. package/esm2022/date-time/lib/holidays.loader.mjs +13 -0
  40. package/esm2022/date-time/lib/jalali.calendar.mjs +440 -0
  41. package/esm2022/events/acorex-core-events.mjs +5 -0
  42. package/esm2022/events/index.mjs +3 -0
  43. package/esm2022/events/lib/event.service.mjs +43 -0
  44. package/esm2022/events/lib/event.type.mjs +6 -0
  45. package/esm2022/file/acorex-core-file.mjs +5 -0
  46. package/esm2022/file/index.mjs +7 -0
  47. package/esm2022/file/lib/file-download-ref.class.mjs +12 -0
  48. package/esm2022/file/lib/file-download-result.class.mjs +45 -0
  49. package/esm2022/file/lib/file-size-formatter.mjs +24 -0
  50. package/esm2022/file/lib/file-upload-ref.class.mjs +12 -0
  51. package/esm2022/file/lib/file.module.mjs +20 -0
  52. package/esm2022/file/lib/file.service.mjs +103 -0
  53. package/esm2022/format/acorex-core-format.mjs +5 -0
  54. package/esm2022/format/index.mjs +8 -0
  55. package/esm2022/format/lib/format.config.mjs +3 -0
  56. package/esm2022/format/lib/format.module.mjs +64 -0
  57. package/esm2022/format/lib/format.pipe.mjs +37 -0
  58. package/esm2022/format/lib/format.service.mjs +95 -0
  59. package/esm2022/format/lib/format.types.mjs +2 -0
  60. package/esm2022/format/lib/formatters/number-formatter.mjs +74 -0
  61. package/esm2022/format/lib/formatters/string-formatter.mjs +15 -0
  62. package/esm2022/image/acorex-core-image.mjs +5 -0
  63. package/esm2022/image/index.mjs +2 -0
  64. package/esm2022/image/lib/image.service.mjs +43 -0
  65. package/esm2022/index.mjs +2 -44
  66. package/esm2022/memorize/acorex-core-memorize.mjs +5 -0
  67. package/esm2022/memorize/index.mjs +2 -0
  68. package/esm2022/memorize/lib/memorize.decorator.mjs +19 -0
  69. package/esm2022/pipes/acorex-core-pipes.mjs +5 -0
  70. package/esm2022/pipes/index.mjs +2 -0
  71. package/esm2022/pipes/lib/safe/safe.pipe.mjs +38 -0
  72. package/esm2022/platform/acorex-core-platform.mjs +5 -0
  73. package/esm2022/platform/index.mjs +2 -0
  74. package/esm2022/platform/lib/platform.service.mjs +225 -0
  75. package/esm2022/storage/acorex-core-storage.mjs +5 -0
  76. package/esm2022/storage/cookie-storage.service.mjs +202 -0
  77. package/esm2022/storage/index.mjs +5 -0
  78. package/esm2022/storage/local-storage.service.mjs +58 -0
  79. package/esm2022/storage/session-storage.service.mjs +22 -0
  80. package/esm2022/storage/storage.interface.mjs +2 -0
  81. package/esm2022/translation/acorex-core-translation.mjs +5 -0
  82. package/esm2022/translation/index.mjs +9 -0
  83. package/esm2022/translation/lib/translation-scope.resolver.mjs +11 -0
  84. package/esm2022/translation/lib/translation.config.mjs +20 -0
  85. package/esm2022/translation/lib/translation.loader.mjs +14 -0
  86. package/esm2022/translation/lib/translation.module.mjs +40 -0
  87. package/esm2022/translation/lib/translation.service.mjs +173 -0
  88. package/esm2022/translation/lib/translation.types.mjs +2 -0
  89. package/esm2022/translation/lib/translator.directive.mjs +28 -0
  90. package/esm2022/translation/lib/translator.pipe.mjs +23 -0
  91. package/esm2022/types/acorex-core-types.mjs +5 -0
  92. package/esm2022/types/index.mjs +2 -0
  93. package/esm2022/utils/acorex-core-utils.mjs +5 -0
  94. package/esm2022/utils/index.mjs +6 -0
  95. package/esm2022/utils/lib/auto-unsubscribe.mjs +36 -0
  96. package/esm2022/utils/lib/color-util.mjs +111 -0
  97. package/esm2022/utils/lib/drawing-util.mjs +35 -0
  98. package/esm2022/utils/lib/html-util.mjs +39 -0
  99. package/esm2022/utils/lib/string-util.mjs +19 -0
  100. package/esm2022/validation/acorex-core-validation.mjs +5 -0
  101. package/esm2022/validation/index.mjs +18 -0
  102. package/esm2022/validation/lib/rules/between-rule.mjs +31 -0
  103. package/esm2022/validation/lib/rules/callback-rule.mjs +29 -0
  104. package/esm2022/validation/lib/rules/equal-rule.mjs +26 -0
  105. package/esm2022/validation/lib/rules/greater-than.mjs +29 -0
  106. package/esm2022/validation/lib/rules/length-rule.mjs +26 -0
  107. package/esm2022/validation/lib/rules/less-than-rule.mjs +29 -0
  108. package/esm2022/validation/lib/rules/maxlength-rule.mjs +27 -0
  109. package/esm2022/validation/lib/rules/minlength-rule.mjs +26 -0
  110. package/esm2022/validation/lib/rules/regex-rule.mjs +49 -0
  111. package/esm2022/validation/lib/rules/required-rule.mjs +36 -0
  112. package/esm2022/validation/lib/validation.config.mjs +33 -0
  113. package/esm2022/validation/lib/validation.module.mjs +84 -0
  114. package/esm2022/validation/lib/validation.service.mjs +98 -0
  115. package/esm2022/validation/lib/validation.types.mjs +3 -0
  116. package/events/README.md +3 -0
  117. package/events/index.d.ts +2 -0
  118. package/{lib/services → events/lib}/event.service.d.ts +8 -0
  119. package/events/lib/event.type.d.ts +5 -0
  120. package/fesm2022/acorex-core-common.mjs +2631 -0
  121. package/fesm2022/acorex-core-common.mjs.map +1 -0
  122. package/fesm2022/acorex-core-config.mjs +39 -0
  123. package/fesm2022/acorex-core-config.mjs.map +1 -0
  124. package/fesm2022/acorex-core-date-time.mjs +1305 -0
  125. package/fesm2022/acorex-core-date-time.mjs.map +1 -0
  126. package/fesm2022/acorex-core-events.mjs +56 -0
  127. package/fesm2022/acorex-core-events.mjs.map +1 -0
  128. package/fesm2022/acorex-core-file.mjs +214 -0
  129. package/fesm2022/acorex-core-file.mjs.map +1 -0
  130. package/fesm2022/acorex-core-format.mjs +282 -0
  131. package/fesm2022/acorex-core-format.mjs.map +1 -0
  132. package/fesm2022/acorex-core-image.mjs +50 -0
  133. package/fesm2022/acorex-core-image.mjs.map +1 -0
  134. package/fesm2022/acorex-core-memorize.mjs +26 -0
  135. package/fesm2022/acorex-core-memorize.mjs.map +1 -0
  136. package/fesm2022/acorex-core-pipes.mjs +44 -0
  137. package/fesm2022/acorex-core-pipes.mjs.map +1 -0
  138. package/fesm2022/acorex-core-platform.mjs +232 -0
  139. package/fesm2022/acorex-core-platform.mjs.map +1 -0
  140. package/fesm2022/acorex-core-storage.mjs +285 -0
  141. package/fesm2022/acorex-core-storage.mjs.map +1 -0
  142. package/fesm2022/acorex-core-translation.mjs +293 -0
  143. package/fesm2022/acorex-core-translation.mjs.map +1 -0
  144. package/fesm2022/acorex-core-types.mjs +6 -0
  145. package/fesm2022/acorex-core-types.mjs.map +1 -0
  146. package/fesm2022/acorex-core-utils.mjs +247 -0
  147. package/fesm2022/acorex-core-utils.mjs.map +1 -0
  148. package/fesm2022/acorex-core-validation.mjs +488 -0
  149. package/fesm2022/acorex-core-validation.mjs.map +1 -0
  150. package/fesm2022/acorex-core.mjs +2 -2309
  151. package/fesm2022/acorex-core.mjs.map +1 -1
  152. package/file/README.md +3 -0
  153. package/file/index.d.ts +6 -0
  154. package/file/lib/file-download-ref.class.d.ts +6 -0
  155. package/file/lib/file-download-result.class.d.ts +8 -0
  156. package/file/lib/file-size-formatter.d.ts +16 -0
  157. package/file/lib/file-upload-ref.class.d.ts +5 -0
  158. package/file/lib/file.module.d.ts +7 -0
  159. package/file/lib/file.service.d.ts +18 -0
  160. package/format/README.md +3 -0
  161. package/format/index.d.ts +7 -0
  162. package/format/lib/format.config.d.ts +5 -0
  163. package/format/lib/format.module.d.ts +18 -0
  164. package/format/lib/format.pipe.d.ts +12 -0
  165. package/format/lib/format.service.d.ts +43 -0
  166. package/format/lib/format.types.d.ts +4 -0
  167. package/format/lib/formatters/number-formatter.d.ts +23 -0
  168. package/format/lib/formatters/string-formatter.d.ts +14 -0
  169. package/image/README.md +3 -0
  170. package/image/index.d.ts +1 -0
  171. package/image/lib/image.service.d.ts +11 -0
  172. package/index.d.ts +1 -43
  173. package/memorize/README.md +3 -0
  174. package/memorize/index.d.ts +1 -0
  175. package/memorize/lib/memorize.decorator.d.ts +1 -0
  176. package/package.json +98 -5
  177. package/pipes/README.md +3 -0
  178. package/pipes/index.d.ts +1 -0
  179. package/pipes/lib/safe/safe.pipe.d.ts +10 -0
  180. package/platform/README.md +3 -0
  181. package/platform/index.d.ts +1 -0
  182. package/{lib/platform → platform/lib}/platform.service.d.ts +14 -6
  183. package/storage/README.md +3 -0
  184. package/storage/cookie-storage.service.d.ts +104 -0
  185. package/storage/index.d.ts +4 -0
  186. package/storage/local-storage.service.d.ts +16 -0
  187. package/storage/session-storage.service.d.ts +10 -0
  188. package/storage/storage.interface.d.ts +14 -0
  189. package/translation/README.md +3 -0
  190. package/translation/index.d.ts +8 -0
  191. package/translation/lib/translation-scope.resolver.d.ts +2 -0
  192. package/translation/lib/translation.config.d.ts +14 -0
  193. package/translation/lib/translation.loader.d.ts +14 -0
  194. package/translation/lib/translation.module.d.ts +8 -0
  195. package/translation/lib/translation.service.d.ts +31 -0
  196. package/translation/lib/translation.types.d.ts +10 -0
  197. package/translation/lib/translator.directive.d.ts +12 -0
  198. package/translation/lib/translator.pipe.d.ts +12 -0
  199. package/types/README.md +3 -0
  200. package/types/index.d.ts +2 -0
  201. package/utils/README.md +3 -0
  202. package/utils/index.d.ts +5 -0
  203. package/utils/lib/auto-unsubscribe.d.ts +12 -0
  204. package/utils/lib/color-util.d.ts +24 -0
  205. package/utils/lib/drawing-util.d.ts +18 -0
  206. package/utils/lib/html-util.d.ts +5 -0
  207. package/utils/lib/string-util.d.ts +6 -0
  208. package/validation/README.md +3 -0
  209. package/validation/index.d.ts +14 -0
  210. package/validation/lib/rules/between-rule.d.ts +18 -0
  211. package/validation/lib/rules/callback-rule.d.ts +23 -0
  212. package/validation/lib/rules/equal-rule.d.ts +17 -0
  213. package/validation/lib/rules/greater-than.d.ts +17 -0
  214. package/validation/lib/rules/length-rule.d.ts +17 -0
  215. package/validation/lib/rules/less-than-rule.d.ts +17 -0
  216. package/validation/lib/rules/maxlength-rule.d.ts +16 -0
  217. package/validation/lib/rules/minlength-rule.d.ts +16 -0
  218. package/validation/lib/rules/regex-rule.d.ts +17 -0
  219. package/validation/lib/rules/required-rule.d.ts +16 -0
  220. package/validation/lib/validation.config.d.ts +15 -0
  221. package/validation/lib/validation.module.d.ts +17 -0
  222. package/validation/lib/validation.service.d.ts +35 -0
  223. package/validation/lib/validation.types.d.ts +21 -0
  224. package/esm2022/lib/classes/base-page.class.mjs +0 -26
  225. package/esm2022/lib/classes/color.class.mjs +0 -49
  226. package/esm2022/lib/classes/datetime.class.mjs +0 -323
  227. package/esm2022/lib/classes/menu.class.mjs +0 -35
  228. package/esm2022/lib/classes/navigator.class.mjs +0 -2
  229. package/esm2022/lib/classes/popup.class.mjs +0 -2
  230. package/esm2022/lib/classes/promise.class.mjs +0 -21
  231. package/esm2022/lib/classes/sectionlist.class.mjs +0 -2
  232. package/esm2022/lib/classes/select.class.mjs +0 -8
  233. package/esm2022/lib/core.module.mjs +0 -27
  234. package/esm2022/lib/error/error.class.mjs +0 -2
  235. package/esm2022/lib/error/error.module.mjs +0 -19
  236. package/esm2022/lib/error/error.service.mjs +0 -22
  237. package/esm2022/lib/events/keyboard.mjs +0 -2
  238. package/esm2022/lib/http/http-error.class.mjs +0 -2
  239. package/esm2022/lib/http/http-events.interceptor.mjs +0 -3
  240. package/esm2022/lib/http/http-request.class.mjs +0 -2
  241. package/esm2022/lib/http/http-result.class.mjs +0 -25
  242. package/esm2022/lib/http/http.module.mjs +0 -35
  243. package/esm2022/lib/http/http.service.mjs +0 -148
  244. package/esm2022/lib/locale/en.json +0 -255
  245. package/esm2022/lib/locale/fa.json +0 -245
  246. package/esm2022/lib/pipe/datetime.pipe.mjs +0 -25
  247. package/esm2022/lib/pipe/htmlToText.pipe.mjs +0 -25
  248. package/esm2022/lib/platform/index.mjs +0 -2
  249. package/esm2022/lib/platform/platform.service.mjs +0 -152
  250. package/esm2022/lib/services/config.mjs +0 -29
  251. package/esm2022/lib/services/event.service.mjs +0 -34
  252. package/esm2022/lib/services/navigator.service.mjs +0 -10
  253. package/esm2022/lib/services/storage.service.mjs +0 -16
  254. package/esm2022/lib/translator/translator.mjs +0 -26
  255. package/esm2022/lib/translator/translator.module.mjs +0 -25
  256. package/esm2022/lib/translator/translator.pipe.mjs +0 -24
  257. package/esm2022/lib/translator/translator.service.mjs +0 -21
  258. package/esm2022/lib/utils/array/array-util.mjs +0 -133
  259. package/esm2022/lib/utils/html/html-util.mjs +0 -200
  260. package/esm2022/lib/utils/html/html.module.mjs +0 -19
  261. package/esm2022/lib/utils/math/math-util.mjs +0 -6
  262. package/esm2022/lib/utils/object/object-util.mjs +0 -83
  263. package/esm2022/lib/utils/render/on-demand-preload-strategy.service.mjs +0 -21
  264. package/esm2022/lib/utils/render/render.service.mjs +0 -109
  265. package/esm2022/lib/utils/render/rendering.module.mjs +0 -35
  266. package/esm2022/lib/utils/scroll/scroll.directive.mjs +0 -56
  267. package/esm2022/lib/utils/scroll/scroll.module.mjs +0 -19
  268. package/esm2022/lib/utils/separator/separator.module.mjs +0 -19
  269. package/esm2022/lib/utils/separator/separator.pipe.mjs +0 -33
  270. package/lib/classes/base-page.class.d.ts +0 -13
  271. package/lib/classes/color.class.d.ts +0 -17
  272. package/lib/classes/datetime.class.d.ts +0 -63
  273. package/lib/classes/menu.class.d.ts +0 -34
  274. package/lib/classes/navigator.class.d.ts +0 -5
  275. package/lib/classes/popup.class.d.ts +0 -12
  276. package/lib/classes/promise.class.d.ts +0 -7
  277. package/lib/classes/sectionlist.class.d.ts +0 -8
  278. package/lib/classes/select.class.d.ts +0 -7
  279. package/lib/core.module.d.ts +0 -9
  280. package/lib/error/error.class.d.ts +0 -4
  281. package/lib/error/error.module.d.ts +0 -7
  282. package/lib/error/error.service.d.ts +0 -13
  283. package/lib/events/keyboard.d.ts +0 -2
  284. package/lib/http/http-error.class.d.ts +0 -7
  285. package/lib/http/http-events.interceptor.d.ts +0 -10
  286. package/lib/http/http-request.class.d.ts +0 -14
  287. package/lib/http/http-result.class.d.ts +0 -11
  288. package/lib/http/http.module.d.ts +0 -10
  289. package/lib/http/http.service.d.ts +0 -23
  290. package/lib/pipe/datetime.pipe.d.ts +0 -8
  291. package/lib/pipe/htmlToText.pipe.d.ts +0 -7
  292. package/lib/platform/index.d.ts +0 -1
  293. package/lib/services/config.d.ts +0 -9
  294. package/lib/services/navigator.service.d.ts +0 -8
  295. package/lib/services/storage.service.d.ts +0 -7
  296. package/lib/translator/translator.d.ts +0 -9
  297. package/lib/translator/translator.module.d.ts +0 -8
  298. package/lib/translator/translator.pipe.d.ts +0 -8
  299. package/lib/translator/translator.service.d.ts +0 -8
  300. package/lib/utils/array/array-util.d.ts +0 -6
  301. package/lib/utils/html/html-util.d.ts +0 -62
  302. package/lib/utils/html/html.module.d.ts +0 -8
  303. package/lib/utils/math/math-util.d.ts +0 -3
  304. package/lib/utils/object/object-util.d.ts +0 -7
  305. package/lib/utils/render/on-demand-preload-strategy.service.d.ts +0 -10
  306. package/lib/utils/render/render.service.d.ts +0 -18
  307. package/lib/utils/render/rendering.module.d.ts +0 -8
  308. package/lib/utils/scroll/scroll.directive.d.ts +0 -18
  309. package/lib/utils/scroll/scroll.module.d.ts +0 -8
  310. package/lib/utils/separator/separator.module.d.ts +0 -8
  311. package/lib/utils/separator/separator.pipe.d.ts +0 -8
@@ -0,0 +1,440 @@
1
+ import { AXCalendar, AXDateTime, } from './datetime.class';
2
+ export class JalaliCalendar extends AXCalendar {
3
+ /**
4
+ * @ignore
5
+ */
6
+ constructor(config) {
7
+ super(config);
8
+ /*
9
+ Jalaali years starting the 33-year rule.
10
+ */
11
+ this.breaks = [
12
+ -61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097,
13
+ 2192, 2262, 2324, 2394, 2456, 3178,
14
+ ];
15
+ }
16
+ create(value) {
17
+ const a = this.toGregorian(value.year, value.month, value.date);
18
+ return new AXDateTime(new Date(a.getFullYear(), a.getMonth(), a.getDate(), value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0), this);
19
+ }
20
+ name() {
21
+ return 'jalali';
22
+ }
23
+ dayOfMonth(date) {
24
+ return this.toJalaali(date).day;
25
+ }
26
+ dayOfYear(date) {
27
+ const j = this.toJalaali(date);
28
+ return ((j.month <= 6 ? (j.month - 1) * 31 : 6 * 31 + (j.month - 7) * 30) + j.day);
29
+ }
30
+ dayOfWeek(date) {
31
+ return date.getDay() == 6 ? 1 : date.getDay() + 2;
32
+ }
33
+ weekOfYear(date) {
34
+ //TODO : apply jalali
35
+ const firstDay = new AXDateTime(date, this).startOf('year');
36
+ return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 +
37
+ firstDay.date.getDay() +
38
+ 1) /
39
+ 7);
40
+ }
41
+ year(date) {
42
+ return this.toJalaali(date).year;
43
+ }
44
+ monthOfYear(date) {
45
+ return this.toJalaali(date).month;
46
+ }
47
+ add(date, unit, amount) {
48
+ let value = date.valueOf();
49
+ switch (unit) {
50
+ case 'second':
51
+ value += 1000 * amount;
52
+ break;
53
+ case 'minute':
54
+ value += 60000 * amount;
55
+ break;
56
+ case 'hour':
57
+ value += 3600000 * amount;
58
+ break;
59
+ case 'month': {
60
+ // const v = new Date(value);
61
+ // let jd = this.dayOfMonth(date);
62
+ // let jm = this.monthOfYear(date);
63
+ // let jy = this.year(date);
64
+ // const nm = jm + amount;
65
+ // const ny = nm % 12 ? Math.floor(nm / 12) : 0;
66
+ // jy += ny;
67
+ // jm = nm - ny * 12;
68
+ // const vv = this.toGregorian(jy, jm, jd);
69
+ // v.setFullYear(vv.getFullYear());
70
+ // v.setMonth(vv.getMonth());
71
+ // v.setDate(vv.getDate());
72
+ // value = v.valueOf();
73
+ // break;
74
+ let jd = this.dayOfMonth(date);
75
+ let jm = this.monthOfYear(date);
76
+ let jy = this.year(date);
77
+ let newMonth = jm + amount;
78
+ let yearsToAdd = Math.floor(newMonth / 12);
79
+ newMonth = newMonth % 12;
80
+ if (newMonth <= 0) {
81
+ newMonth += 12;
82
+ yearsToAdd--;
83
+ }
84
+ jy += yearsToAdd;
85
+ // Temporary set to first of the month to prevent rollover
86
+ const tempDate = this.toGregorian(jy, newMonth, 1);
87
+ const gregorianDate = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
88
+ // Adjust the day to either the original day or the last day of the new month, whichever is smaller
89
+ const lastDayOfNewMonth = this.jalaaliMonthLength(jy, newMonth); // Implement this method to find the last day in a Jalali month
90
+ jd = Math.min(jd, lastDayOfNewMonth);
91
+ const finalDate = this.toGregorian(jy, newMonth, jd);
92
+ gregorianDate.setFullYear(finalDate.getFullYear());
93
+ gregorianDate.setMonth(finalDate.getMonth());
94
+ gregorianDate.setDate(finalDate.getDate());
95
+ value = gregorianDate.valueOf();
96
+ break;
97
+ }
98
+ case 'week':
99
+ value += 7 * 86400000 * amount;
100
+ break;
101
+ case 'year': {
102
+ const v = new Date(value);
103
+ let jd = this.dayOfMonth(date);
104
+ let jm = this.monthOfYear(date);
105
+ let jy = this.year(date);
106
+ const vv = this.toGregorian(jy + amount, jm, jd);
107
+ v.setFullYear(vv.getFullYear());
108
+ v.setMonth(vv.getMonth());
109
+ v.setDate(vv.getDate());
110
+ value = v.valueOf();
111
+ break;
112
+ }
113
+ case 'day':
114
+ default:
115
+ value += 86400000 * amount;
116
+ }
117
+ return new AXDateTime(new Date(value), this);
118
+ }
119
+ set(date, unit, value) {
120
+ const clone = new Date(date.valueOf());
121
+ const jDate = this.toJalaali(clone);
122
+ switch (unit) {
123
+ case 'second':
124
+ clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
125
+ break;
126
+ case 'minute':
127
+ clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
128
+ break;
129
+ case 'hour':
130
+ clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
131
+ break;
132
+ default:
133
+ case 'day': {
134
+ const gDate = this.toGregorian(jDate.year, jDate.month, value);
135
+ clone.setDate(gDate.getDate());
136
+ break;
137
+ }
138
+ case 'week':
139
+ break;
140
+ case 'month': {
141
+ const gDate2 = this.toGregorian(jDate.year, value, jDate.day);
142
+ clone.setMonth(gDate2.getMonth());
143
+ break;
144
+ }
145
+ case 'year': {
146
+ const gDate3 = this.toGregorian(value, jDate.month, jDate.day);
147
+ clone.setFullYear(gDate3.getFullYear());
148
+ break;
149
+ }
150
+ }
151
+ return new AXDateTime(clone, this);
152
+ }
153
+ startOf(date, unit) {
154
+ const clone = new Date(date.valueOf());
155
+ switch (unit) {
156
+ case 'second':
157
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
158
+ return new AXDateTime(clone, this);
159
+ case 'minute':
160
+ clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
161
+ return new AXDateTime(clone, this);
162
+ case 'hour':
163
+ clone.setHours(clone.getHours(), 0, 0, 0);
164
+ return new AXDateTime(clone, this);
165
+ default:
166
+ case 'day':
167
+ clone.setHours(0, 0, 0, 0);
168
+ return new AXDateTime(clone, this);
169
+ case 'week':
170
+ return new AXDateTime(clone, this)
171
+ .add('day', -this.dayOfWeek(clone) + 1)
172
+ .startOf('day');
173
+ case 'month': {
174
+ const jy = this.year(date);
175
+ const jm = this.monthOfYear(date);
176
+ const gDate = this.toGregorian(jy, jm, 1);
177
+ return new AXDateTime(gDate, this).startOf('day');
178
+ }
179
+ case 'year': {
180
+ const jy = this.year(date);
181
+ const gDate = this.toGregorian(jy, 1, 1);
182
+ return new AXDateTime(gDate, this).startOf('day');
183
+ }
184
+ }
185
+ }
186
+ endOf(date, unit) {
187
+ const clone = new Date(date.valueOf());
188
+ switch (unit) {
189
+ case 'second':
190
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
191
+ return new AXDateTime(clone, this);
192
+ case 'minute':
193
+ clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
194
+ return new AXDateTime(clone, this);
195
+ case 'hour':
196
+ clone.setHours(clone.getHours(), 59, 59, 999);
197
+ return new AXDateTime(clone, this);
198
+ default:
199
+ case 'day':
200
+ clone.setHours(23, 59, 59, 999);
201
+ return new AXDateTime(clone, this);
202
+ case 'week': {
203
+ return this.startOf(date, 'week').add('day', 6).endOf('day');
204
+ }
205
+ case 'month': {
206
+ const jy = this.year(date);
207
+ const jm = this.monthOfYear(date);
208
+ const jd = this.jalaaliMonthLength(jy, jm);
209
+ const gDate = this.toGregorian(jy, jm, jd);
210
+ return new AXDateTime(gDate, this).endOf('day');
211
+ }
212
+ case 'year': {
213
+ const jy = this.year(date);
214
+ const gDate = this.toGregorian(jy, 12, this.jalaaliMonthLength(jy, 12));
215
+ return new AXDateTime(gDate, this).endOf('day');
216
+ }
217
+ }
218
+ }
219
+ parse(value) {
220
+ const [y, M, d, h, m, s, ms] = value.split(/[^a-zA-Z0-9]+/gi);
221
+ const date = this.toGregorian(Number(y) ?? 0, Number(M) ?? 1, Number(d) ?? 1);
222
+ if (h != null)
223
+ date.setHours(Number(h));
224
+ if (m != null)
225
+ date.setMinutes(Number(m));
226
+ if (s != null)
227
+ date.setSeconds(Number(s));
228
+ if (ms != null)
229
+ date.setMilliseconds(Number(d));
230
+ return new AXDateTime(date, this);
231
+ }
232
+ /*
233
+ Converts a Gregorian date to Jalaali.
234
+ */
235
+ toJalaali(date) {
236
+ const gd = date.getDate();
237
+ const gm = date.getMonth() + 1;
238
+ const gy = date.getFullYear();
239
+ const r = this.d2j(this.g2d(gy, gm, gd));
240
+ return {
241
+ year: r.jy,
242
+ month: r.jm,
243
+ day: r.jd,
244
+ };
245
+ }
246
+ /*
247
+ Converts a Jalaali date to Gregorian.
248
+ */
249
+ toGregorian(jy, jm, jd) {
250
+ const g = this.d2g(this.j2d(jy, jm, jd));
251
+ return new Date(g.gy, g.gm - 1, g.gd);
252
+ }
253
+ /*
254
+ Checks whether a Jalaali date is valid or not.
255
+ */
256
+ isValidJalaaliDate(jy, jm, jd) {
257
+ return (jy >= -61 &&
258
+ jy <= 3177 &&
259
+ jm >= 1 &&
260
+ jm <= 12 &&
261
+ jd >= 1 &&
262
+ jd <= this.jalaaliMonthLength(jy, jm));
263
+ }
264
+ /*
265
+ Is this a leap year or not?
266
+ */
267
+ isLeapJalaaliYear(jy) {
268
+ return this.jalCalLeap(jy) === 0;
269
+ }
270
+ /*
271
+ Number of days in a given month in a Jalaali year.
272
+ */
273
+ jalaaliMonthLength(jy, jm) {
274
+ if (jm <= 6)
275
+ return 31;
276
+ if (jm <= 11)
277
+ return 30;
278
+ if (this.isLeapJalaaliYear(jy))
279
+ return 30;
280
+ return 29;
281
+ }
282
+ /*
283
+ This determines if the Jalaali (Persian) year is
284
+ leap (366-day long) or is the common year (365 days)
285
+
286
+ @param jy Jalaali calendar year (-61 to 3177)
287
+ @returns number of years since the last leap year (0 to 4)
288
+ */
289
+ jalCalLeap(jy) {
290
+ let bl = this.breaks.length, jp = this.breaks[0], jm, jump, leap, n, i;
291
+ if (jy < jp || jy >= this.breaks[bl - 1])
292
+ throw new Error('Invalid Jalaali year ' + jy);
293
+ for (i = 1; i < bl; i += 1) {
294
+ jm = this.breaks[i];
295
+ jump = jm - jp;
296
+ if (jy < jm)
297
+ break;
298
+ jp = jm;
299
+ }
300
+ n = jy - jp;
301
+ if (jump - n < 6)
302
+ n = n - jump + this.div(jump + 4, 33) * 33;
303
+ leap = this.mod(this.mod(n + 1, 33) - 1, 4);
304
+ if (leap === -1) {
305
+ leap = 4;
306
+ }
307
+ return leap;
308
+ }
309
+ jalCal(jy, withoutLeap) {
310
+ let bl = this.breaks.length, gy = jy + 621, leapJ = -14, jp = this.breaks[0], jm, jump, leap, leapG, march, n, i;
311
+ if (jy < jp || jy >= this.breaks[bl - 1])
312
+ throw new Error('Invalid Jalaali year ' + jy);
313
+ // Find the limiting years for the Jalaali year jy.
314
+ for (i = 1; i < bl; i += 1) {
315
+ jm = this.breaks[i];
316
+ jump = jm - jp;
317
+ if (jy < jm)
318
+ break;
319
+ leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);
320
+ jp = jm;
321
+ }
322
+ n = jy - jp;
323
+ // Find the number of leap years from AD 621 to the beginning
324
+ // of the current Jalaali year in the Persian calendar.
325
+ leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);
326
+ if (this.mod(jump, 33) === 4 && jump - n === 4)
327
+ leapJ += 1;
328
+ // And the same in the Gregorian calendar (until the year gy).
329
+ leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;
330
+ // Determine the Gregorian date of Farvardin the 1st.
331
+ march = 20 + leapJ - leapG;
332
+ // return with gy and march when we don't need leap
333
+ if (withoutLeap)
334
+ return { gy: gy, march: march };
335
+ // Find how many years have passed since the last leap year.
336
+ if (jump - n < 6)
337
+ n = n - jump + this.div(jump + 4, 33) * 33;
338
+ leap = this.mod(this.mod(n + 1, 33) - 1, 4);
339
+ if (leap === -1) {
340
+ leap = 4;
341
+ }
342
+ return {
343
+ leap: leap,
344
+ gy: gy,
345
+ march: march,
346
+ };
347
+ }
348
+ j2d(jy, jm, jd) {
349
+ let r = this.jalCal(jy, true);
350
+ return (this.g2d(r.gy, 3, r.march) +
351
+ (jm - 1) * 31 -
352
+ this.div(jm, 7) * (jm - 7) +
353
+ jd -
354
+ 1);
355
+ }
356
+ d2j(jdn) {
357
+ let gy = this.d2g(jdn).gy, // Calculate Gregorian year (gy).
358
+ jy = gy - 621, r = this.jalCal(jy, false), jdn1f = this.g2d(gy, 3, r.march), jd, jm, k;
359
+ // Find number of days that passed since 1 Farvardin.
360
+ k = jdn - jdn1f;
361
+ if (k >= 0) {
362
+ if (k <= 185) {
363
+ // The first 6 months.
364
+ jm = 1 + this.div(k, 31);
365
+ jd = this.mod(k, 31) + 1;
366
+ return {
367
+ jy: jy,
368
+ jm: jm,
369
+ jd: jd,
370
+ };
371
+ }
372
+ else {
373
+ // The remaining months.
374
+ k -= 186;
375
+ }
376
+ }
377
+ else {
378
+ // Previous Jalaali year.
379
+ jy -= 1;
380
+ k += 179;
381
+ if (r.leap === 1)
382
+ k += 1;
383
+ }
384
+ jm = 7 + this.div(k, 30);
385
+ jd = this.mod(k, 30) + 1;
386
+ return {
387
+ jy: jy,
388
+ jm: jm,
389
+ jd: jd,
390
+ };
391
+ }
392
+ g2d(gy, gm, gd) {
393
+ let d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4) +
394
+ this.div(153 * this.mod(gm + 9, 12) + 2, 5) +
395
+ gd -
396
+ 34840408;
397
+ d =
398
+ d -
399
+ this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) +
400
+ 752;
401
+ return d;
402
+ }
403
+ d2g(jdn) {
404
+ let j, i, gd, gm, gy;
405
+ j = 4 * jdn + 139361631;
406
+ j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;
407
+ i = this.div(this.mod(j, 1461), 4) * 5 + 308;
408
+ gd = this.div(this.mod(i, 153), 5) + 1;
409
+ gm = this.mod(this.div(i, 153), 12) + 1;
410
+ gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);
411
+ return {
412
+ gy: gy,
413
+ gm: gm,
414
+ gd: gd,
415
+ };
416
+ }
417
+ jalaaliWeek(jy, jm, jd) {
418
+ let dayOfWeek = this.jalaaliToDateObject(jy, jm, jd, 0, 0, 0, 0).getDay();
419
+ let startDayDifference = dayOfWeek == 6 ? 0 : -(dayOfWeek + 1);
420
+ let endDayDifference = 6 + startDayDifference;
421
+ return {
422
+ saturday: this.d2j(this.j2d(jy, jm, jd + startDayDifference)),
423
+ friday: this.d2j(this.j2d(jy, jm, jd + endDayDifference)),
424
+ };
425
+ }
426
+ jalaaliToDateObject(jy, jm, jd, h = 0, m = 0, s = 0, ms = 0) {
427
+ let gregorianCalenderDate = this.toGregorian(jy, jm, jd);
428
+ return new Date(gregorianCalenderDate.getFullYear(), gregorianCalenderDate.getMonth() - 1, gregorianCalenderDate.getDate(), h || 0, m || 0, s || 0, ms || 0);
429
+ }
430
+ /*
431
+ Utility helper functions.
432
+ */
433
+ div(a, b) {
434
+ return ~~(a / b);
435
+ }
436
+ mod(a, b) {
437
+ return a - ~~(a / b) * b;
438
+ }
439
+ }
440
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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GxldCBqeSA9IHRoaXMueWVhcihkYXRlKTtcblxuICAgICAgICBsZXQgbmV3TW9udGggPSBqbSArIGFtb3VudDtcbiAgICAgICAgbGV0IHllYXJzVG9BZGQgPSBNYXRoLmZsb29yKG5ld01vbnRoIC8gMTIpO1xuICAgICAgICBuZXdNb250aCA9IG5ld01vbnRoICUgMTI7XG4gICAgICAgIGlmIChuZXdNb250aCA8PSAwKSB7XG4gICAgICAgICAgbmV3TW9udGggKz0gMTI7XG4gICAgICAgICAgeWVhcnNUb0FkZC0tO1xuICAgICAgICB9XG5cbiAgICAgICAgankgKz0geWVhcnNUb0FkZDtcblxuICAgICAgICAvLyBUZW1wb3Jhcnkgc2V0IHRvIGZpcnN0IG9mIHRoZSBtb250aCB0byBwcmV2ZW50IHJvbGxvdmVyXG4gICAgICAgIGNvbnN0IHRlbXBEYXRlID0gdGhpcy50b0dyZWdvcmlhbihqeSwgbmV3TW9udGgsIDEpO1xuICAgICAgICBjb25zdCBncmVnb3JpYW5EYXRlID0gbmV3IERhdGUoXG4gICAgICAgICAgdGVtcERhdGUuZ2V0RnVsbFllYXIoKSxcbiAgICAgICAgICB0ZW1wRGF0ZS5nZXRNb250aCgpLFxuICAgICAgICAgIHRlbXBEYXRlLmdldERhdGUoKVxuICAgICAgICApO1xuXG4gICAgICAgIC8vIEFkanVzdCB0aGUgZGF5IHRvIGVpdGhlciB0aGUgb3JpZ2luYWwgZGF5IG9yIHRoZSBsYXN0IGRheSBvZiB0aGUgbmV3IG1vbnRoLCB3aGljaGV2ZXIgaXMgc21hbGxlclxuICAgICAgICBjb25zdCBsYXN0RGF5T2ZOZXdNb250aCA9IHRoaXMuamFsYWFsaU1vbnRoTGVuZ3RoKGp5LCBuZXdNb250aCk7IC8vIEltcGxlbWVudCB0aGlzIG1ldGhvZCB0byBmaW5kIHRoZSBsYXN0IGRheSBpbiBhIEphbGFsaSBtb250aFxuICAgICAgICBqZCA9IE1hdGgubWluKGpkLCBsYXN0RGF5T2ZOZXdNb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4NjQwMDAwMCAqIGFtb3VudDtcbiAgICB9XG4gICAgcmV0dXJuIG5ldyBBWERhdGVUaW1lKG5ldyBEYXRlKHZhbHVlKSwgdGhpcyk7XG4gIH1cblxuICBzZXQoZGF0ZTogRGF0ZSwgdW5pdDogVGltZVVuaXQsIHZhbHVlOiBudW1iZXIpOiBBWERhdGVUaW1lIHtcbiAgICBjb25zdCBjbG9uZSA9IG5ldyBEYXRlKGRhdGUudmFsdWVPZigpKTtcbiAgICBjb25zdCBqRGF0ZSA9IHRoaXMudG9KYWxhYWxpKGNsb25lKTtcbiAgICBzd2l0Y2ggKHVuaXQpIHtcbiAgICAgIGNhc2UgJ3NlY29uZCc6XG4gICAgICAgIGNsb25lLnNldEhvdXJzKFxuICAgICAgICAgIGNsb25lLmdldEhvdXJzKCksXG4gICAgICAgICAgY2xvbmUuZ2V0TWludXRlcygpLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgIGNsb25lLmdldE1pbGxpc2Vjb25kcygpXG4gICAgICAgICk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnbWludXRlJzpcbiAgICAgICAgY2xvbmUuc2V0SG91cnMoXG4gICAgICAgICAgY2xvbmUuZ2V0SG91cnMoKSxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICBjbG9uZS5nZXRTZWNvbmRzKCksXG4gICAgICAgICAgY2xvbmUuZ2V0TWlsbGlzZWNvbmRzKClcbiAgICAgICAgKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdob3VyJzpcbiAgICAgICAgY2xvbmUuc2V0SG91cnMoXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgY2xvbmUuZ2V0TWludXRlcygpLFxuICAgICAgICAgIGNsb25lLmdldFNlY29uZHMoKSxcbiAgICAgICAgICBjbG9uZS5nZXRNaWxsaXNlY29uZHMoKVxuICAgICAgICApO1xuICAgICAgICBicmVhaztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICBjYXNl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ICAgICAgICAwXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiBuZXcgQVhEYXRlVGltZShjbG9uZSwgdGhpcyk7XG4gICAgICBjYXNlICdtaW51dGUnOlxuICAgICAgICBjbG9uZS5zZXRIb3VycyhjbG9uZS5nZXRIb3VycygpLCBjbG9uZS5nZXRNaW51dGVzKCksIDAsIDApO1xuICAgICAgICByZXR1cm4gbmV3IEFYRGF0ZVRpbWUoY2xvbmUsIHRoaXMpO1xuICAgICAgY2FzZSAnaG91cic6XG4gICAgICAgIGNsb25lLnNldEhvdXJzKGNsb25lLmdldEhvdXJzKCksIDAsIDAsIDApO1xuICAgICAgICByZXR1cm4gbmV3IEFYRGF0ZVRpbWUoY2xvbmUsIHRoaXMpO1xuICAgICAgZGVmYXVsdDpcbiAgICAgIGNhc2UgJ2RheSc6XG4gICAgICAgIGNsb25lLnNldEhvdXJzKDAsIDAsIDAsIDApO1xuICAgICAgICByZXR1cm4gbmV3IEFYRGF0ZVRpbWUoY2xvbmUsIHRoaXMpO1xuICAgICAgY2FzZSAnd2Vlayc6XG4gICAgICAgIHJldHVybiBuZXcgQVhEYXRlVGltZShjbG9uZSwgdGhpcylcbiAgICAgICAgICAuYWRkKCdkYXknLCAtdGhpcy5kYXlPZldlZWsoY2xvbmUpICsgMSlcbiAgICAgICAgICAuc3RhcnRPZignZGF5Jyk7XG4gICAgICBjYXNlICdtb250aCc6IHtcbiAgICAgICAgY29uc3QgankgPSB0aGlzLnllYXIoZGF0ZSk7XG4gICAgICAgIGNvbnN0IGptID0gdGhpcy5tb250aE9mWWVhcihkYXRlKTtcbiAgICAgICAgY29uc3QgZ0RhdGUgPSB0aGlzLnRvR3JlZ29yaWFuKGp5LCBqbSwgMSk7XG4gICAgICAgIHJldHVybiBuZXcgQVhEYXRlVGltZShnRGF0ZSwgdGhpcykuc3RhcnRPZignZGF5Jyk7XG4gICAgICB9XG4gICAgICBjYXNlICd5ZWFyJzoge1xuICAgICAgICBjb25zdCBqeSA9IHRo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W1iZXIpIHtcbiAgICBsZXQgZ3kgPSB0aGlzLmQyZyhqZG4pLmd5LCAvLyBDYWxjdWxhdGUgR3JlZ29yaWFuIHllYXIgKGd5KS5cbiAgICAgIGp5ID0gZ3kgLSA2MjEsXG4gICAgICByID0gdGhpcy5qYWxDYWwoanksIGZhbHNlKSxcbiAgICAgIGpkbjFmID0gdGhpcy5nMmQoZ3ksIDMsIHIubWFyY2gpLFxuICAgICAgamQsXG4gICAgICBqbSxcbiAgICAgIGs7XG5cbiAgICAvLyBGaW5kIG51bWJlciBvZiBkYXlzIHRoYXQgcGFzc2VkIHNpbmNlIDEgRmFydmFyZGluLlxuICAgIGsgPSBqZG4gLSBqZG4xZjtcbiAgICBpZiAoayA+PSAwKSB7XG4gICAgICBpZiAoayA8PSAxODUpIHtcbiAgICAgICAgLy8gVGhlIGZpcnN0IDYgbW9udGhzLlxuICAgICAgICBqbSA9IDEgKyB0aGlzLmRpdihrLCAzMSk7XG4gICAgICAgIGpkID0gdGhpcy5tb2QoaywgMzEpICsgMTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBqeToganksXG4gICAgICAgICAgam06IGptLFxuICAgICAgICAgIGpkOiBqZCxcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIFRoZSByZW1haW5pbmcgbW9udGhzLlxuICAgICAgICBrIC09IDE4NjtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgLy8gUHJldmlvdXMgSmFsYWFsaSB5ZWFyLlxuICAgICAgankgLT0gMTtcbiAgICAgIGsgKz0gMTc5O1xuICAgICAgaWYgKHIubGVhcCA9PT0gMSkgayArPSAxO1xuICAgIH1cbiAgICBqbSA9IDcgKyB0aGlzLmRpdihrLCAzMCk7XG4gICAgamQgPSB0aGlzLm1vZChrLCAzMCkgKyAxO1xuICAgIHJldHVybiB7XG4gICAgICBqeToganksXG4gICAgICBqbTogam0sXG4gICAgICBqZDogamQsXG4gICAgfTtcbiAg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G4gICAgICBoIHx8IDAsXG4gICAgICBtIHx8IDAsXG4gICAgICBzIHx8IDAsXG4gICAgICBtcyB8fCAwXG4gICAgKTtcbiAgfVxuXG4gIC8qXG4gICAgVXRpbGl0eSBoZWxwZXIgZnVuY3Rpb25zLlxuICAqL1xuXG4gIHByaXZhdGUgZGl2KGE6IG51bWJlciwgYjogbnVtYmVyKSB7XG4gICAgcmV0dXJuIH5+KGEgLyBiKTtcbiAgfVxuXG4gIHByaXZhdGUgbW9kKGE6IG51bWJlciwgYjogbnVtYmVyKSB7XG4gICAgcmV0dXJuIGEgLSB+fihhIC8gYikgKiBiO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtZXZlbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2V2ZW50cy9zcmMvYWNvcmV4LWNvcmUtZXZlbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,3 @@
1
+ export * from './lib/event.service';
2
+ export * from './lib/event.type';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvZXZlbnRzL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9ldmVudC5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2V2ZW50LnR5cGUnO1xuIl19
@@ -0,0 +1,43 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class AXEventService {
5
+ constructor() {
6
+ this.eventSubject = new Subject();
7
+ // Observable property
8
+ this.onEvent = this.eventSubject.asObservable();
9
+ this.list = [];
10
+ }
11
+ emitEvent(event) {
12
+ this.eventSubject.next(event);
13
+ }
14
+ broadcast(key, options) {
15
+ const d = this.list.find((c) => c.key === key);
16
+ if (d) {
17
+ d.events.forEach((c) => {
18
+ c(options);
19
+ });
20
+ }
21
+ }
22
+ on(key, callback) {
23
+ let d = this.list.find((c) => c.key === key);
24
+ if (!d) {
25
+ d = { key, events: [] };
26
+ this.list.push(d);
27
+ }
28
+ d.events.push(callback);
29
+ }
30
+ destroy(key, callback) {
31
+ const d = this.list.find((c) => c.key === key);
32
+ if (d) {
33
+ d.events = [];
34
+ }
35
+ }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
37
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXEventService, providedIn: 'root' }); }
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXEventService, decorators: [{
40
+ type: Injectable,
41
+ args: [{ providedIn: 'root' }]
42
+ }] });
43
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuc2VydmljZS5qcyIsIn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bnkpID0+IHZvaWQpOiB2b2lkIHtcbiAgICBjb25zdCBkID0gdGhpcy5saXN0LmZpbmQoKGMpID0+IGMua2V5ID09PSBrZXkpO1xuICAgIGlmIChkKSB7XG4gICAgICBkLmV2ZW50cyA9IFtdO1xuICAgIH1cbiAgfVxufVxuIl19
@@ -0,0 +1,6 @@
1
+ export const AXEventTypes = {
2
+ AXLanguageChanged: 'AX_LANGUAGE_CHANGED',
3
+ AXLanguageLoaded: 'AX_LANGUAGE_LOADED',
4
+ AXCalendarChanged: 'AX_CALENDAR_CHANGED',
5
+ };
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9ldmVudHMvc3JjL2xpYi9ldmVudC50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLFlBQVksR0FBRztJQUMxQixpQkFBaUIsRUFBRSxxQkFBcUI7SUFDeEMsZ0JBQWdCLEVBQUUsb0JBQW9CO0lBQ3RDLGlCQUFpQixFQUFFLHFCQUFxQjtDQUN6QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IEFYRXZlbnRUeXBlcyA9IHtcbiAgQVhMYW5ndWFnZUNoYW5nZWQ6ICdBWF9MQU5HVUFHRV9DSEFOR0VEJyxcbiAgQVhMYW5ndWFnZUxvYWRlZDogJ0FYX0xBTkdVQUdFX0xPQURFRCcsXG4gIEFYQ2FsZW5kYXJDaGFuZ2VkOiAnQVhfQ0FMRU5EQVJfQ0hBTkdFRCcsXG59O1xuIl19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9maWxlL3NyYy9hY29yZXgtY29yZS1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,7 @@
1
+ export * from './lib/file-size-formatter';
2
+ export * from './lib/file-download-ref.class';
3
+ export * from './lib/file-download-result.class';
4
+ export * from './lib/file-upload-ref.class';
5
+ export * from './lib/file.service';
6
+ export * from './lib/file.module';
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvZmlsZS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9maWxlLXNpemUtZm9ybWF0dGVyJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ZpbGUtZG93bmxvYWQtcmVmLmNsYXNzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ZpbGUtZG93bmxvYWQtcmVzdWx0LmNsYXNzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ZpbGUtdXBsb2FkLXJlZi5jbGFzcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9maWxlLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZmlsZS5tb2R1bGUnO1xuIl19
@@ -0,0 +1,12 @@
1
+ export class AXFileDownloadRef extends Promise {
2
+ constructor(executor) {
3
+ super(executor);
4
+ }
5
+ //abort the operation
6
+ abort() {
7
+ if (this.abortMethod) {
8
+ this.abortMethod();
9
+ }
10
+ }
11
+ }
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS1kb3dubG9hZC1yZWYuY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvZmlsZS9zcmMvbGliL2ZpbGUtZG93bmxvYWQtcmVmLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxPQUE2QjtJQUVsRSxZQUNFLFFBR1M7UUFFVCxLQUFLLENBQUMsUUFBZSxDQUFDLENBQUM7SUFDekIsQ0FBQztJQUNELHFCQUFxQjtJQUNkLEtBQUs7UUFDVixJQUFJLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztZQUNyQixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDckIsQ0FBQztJQUNILENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFYRmlsZURvd25sb2FkUmVzdWx0IH0gZnJvbSAnLi9maWxlLWRvd25sb2FkLXJlc3VsdC5jbGFzcyc7XG5cbmV4cG9ydCBjbGFzcyBBWEZpbGVEb3dubG9hZFJlZiBleHRlbmRzIFByb21pc2U8QVhGaWxlRG93bmxvYWRSZXN1bHQ+IHtcbiAgcHVibGljIGFib3J0T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