@powfix/core-js 0.26.5 → 0.27.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.
Files changed (126) hide show
  1. package/dist/browser/utils/SearchParamsUtils.cjs +8 -8
  2. package/dist/browser/utils/SearchParamsUtils.js +1 -1
  3. package/dist/{chunk-JE77HYXB.cjs → chunk-QHUNR4O5.cjs} +4 -0
  4. package/dist/{chunk-AQ5VUG5P.js → chunk-S7EYY36U.js} +4 -1
  5. package/dist/node/constants/TransactionManagerLogLevel.cjs +1 -1
  6. package/dist/node/constants/TransactionManagerLogLevel.js +1 -1
  7. package/dist/node/constants/TransactionManagerTimeoutAction.cjs +1 -1
  8. package/dist/node/constants/TransactionManagerTimeoutAction.js +1 -1
  9. package/dist/node/managers/TransactionManager.cjs +7 -7
  10. package/dist/node/managers/TransactionManager.js +1 -1
  11. package/dist/node/services/redis/RedisClient.cjs +4 -4
  12. package/dist/node/services/redis/RedisClient.js +1 -1
  13. package/dist/node/services/redis/RedisPublisher.cjs +2 -2
  14. package/dist/node/services/redis/RedisPublisher.js +1 -1
  15. package/dist/node/services/redis/RedisSubscriber.cjs +1 -1
  16. package/dist/node/services/redis/RedisSubscriber.js +1 -1
  17. package/dist/node/utils/HookUtils.cjs +1 -1
  18. package/dist/node/utils/HookUtils.js +1 -1
  19. package/dist/node/utils/sequelize-utils/SequelizeUtils.cjs +2 -2
  20. package/dist/node/utils/sequelize-utils/SequelizeUtils.js +1 -1
  21. package/dist/shared/constants/COORDINATE.cjs +5 -5
  22. package/dist/shared/constants/COORDINATE.js +1 -1
  23. package/dist/shared/constants/CRUD.cjs +1 -1
  24. package/dist/shared/constants/CRUD.js +1 -1
  25. package/dist/shared/constants/DATE.cjs +1 -1
  26. package/dist/shared/constants/DATE.js +1 -1
  27. package/dist/shared/constants/DISTANCE.cjs +1 -1
  28. package/dist/shared/constants/DISTANCE.js +1 -1
  29. package/dist/shared/constants/DURATION.cjs +1 -1
  30. package/dist/shared/constants/DURATION.js +1 -1
  31. package/dist/shared/constants/NOT_NULL.cjs +1 -1
  32. package/dist/shared/constants/NOT_NULL.js +1 -1
  33. package/dist/shared/features/DedupedTaskManager.cjs +12 -12
  34. package/dist/shared/features/DedupedTaskManager.js +1 -1
  35. package/dist/shared/features/WatchablePromise.cjs +13 -13
  36. package/dist/shared/features/WatchablePromise.js +1 -1
  37. package/dist/shared/interfaces/index.cjs +0 -36
  38. package/dist/shared/interfaces/index.d.ts +4 -4
  39. package/dist/shared/interfaces/index.js +0 -4
  40. package/dist/shared/managers/SessionManager.cjs +4 -4
  41. package/dist/shared/managers/SessionManager.js +1 -1
  42. package/dist/shared/scripts/base64Polyfill.cjs +1 -1
  43. package/dist/shared/scripts/base64Polyfill.js +1 -1
  44. package/dist/shared/services/time/TimeService.cjs +7 -7
  45. package/dist/shared/services/time/TimeService.js +1 -1
  46. package/dist/shared/types/If.d.ts +1 -1
  47. package/dist/shared/types/index.cjs +0 -27
  48. package/dist/shared/types/index.d.ts +3 -3
  49. package/dist/shared/types/index.js +0 -3
  50. package/dist/shared/utils/ArrayUtils.cjs +1 -1
  51. package/dist/shared/utils/ArrayUtils.js +1 -1
  52. package/dist/shared/utils/AxiosUtils.cjs +1 -1
  53. package/dist/shared/utils/AxiosUtils.js +1 -1
  54. package/dist/shared/utils/BooleanUtils.cjs +1 -1
  55. package/dist/shared/utils/BooleanUtils.js +1 -1
  56. package/dist/shared/utils/Calc.cjs +1 -1
  57. package/dist/shared/utils/Calc.js +1 -1
  58. package/dist/shared/utils/CoordinateUtils.cjs +1 -1
  59. package/dist/shared/utils/CoordinateUtils.js +1 -1
  60. package/dist/shared/utils/CyclicCounter.cjs +108 -0
  61. package/dist/shared/utils/CyclicCounter.d.ts +13 -0
  62. package/dist/shared/utils/CyclicCounter.js +108 -0
  63. package/dist/shared/utils/DateUtils.cjs +4 -4
  64. package/dist/shared/utils/DateUtils.js +1 -1
  65. package/dist/shared/utils/Enum.cjs +5 -5
  66. package/dist/shared/utils/Enum.js +1 -1
  67. package/dist/shared/utils/I18nUtils.cjs +1 -1
  68. package/dist/shared/utils/I18nUtils.js +1 -1
  69. package/dist/shared/utils/JuminNumberUtils.cjs +1 -1
  70. package/dist/shared/utils/JuminNumberUtils.js +1 -1
  71. package/dist/shared/utils/NumberUtils.cjs +1 -1
  72. package/dist/shared/utils/NumberUtils.js +1 -1
  73. package/dist/shared/utils/ObjectIdUtils.cjs +1 -1
  74. package/dist/shared/utils/ObjectIdUtils.js +1 -1
  75. package/dist/shared/utils/Point3Utils.cjs +1 -1
  76. package/dist/shared/utils/Point3Utils.js +1 -1
  77. package/dist/shared/utils/RandomUtils.cjs +1 -1
  78. package/dist/shared/utils/RandomUtils.js +1 -1
  79. package/dist/shared/utils/Sequencer.cjs +10 -10
  80. package/dist/shared/utils/Sequencer.js +1 -1
  81. package/dist/shared/utils/StringUtils.cjs +2 -2
  82. package/dist/shared/utils/StringUtils.js +1 -1
  83. package/dist/shared/utils/Uint8ArrayUtils.cjs +1 -1
  84. package/dist/shared/utils/Uint8ArrayUtils.js +1 -1
  85. package/dist/shared/utils/UuidUtils.cjs +1 -1
  86. package/dist/shared/utils/UuidUtils.js +1 -1
  87. package/dist/shared/utils/Validator.cjs +1 -1
  88. package/dist/shared/utils/Validator.js +1 -1
  89. package/dist/shared/utils/global/atob.cjs +1 -1
  90. package/dist/shared/utils/global/atob.js +1 -1
  91. package/dist/shared/utils/global/base64.cjs +1 -1
  92. package/dist/shared/utils/global/base64.js +1 -1
  93. package/dist/shared/utils/global/between.cjs +1 -1
  94. package/dist/shared/utils/global/between.js +1 -1
  95. package/dist/shared/utils/global/btoa.cjs +1 -1
  96. package/dist/shared/utils/global/btoa.js +1 -1
  97. package/dist/shared/utils/global/castArray.cjs +1 -1
  98. package/dist/shared/utils/global/castArray.js +1 -1
  99. package/dist/shared/utils/global/circularDistance.cjs +1 -1
  100. package/dist/shared/utils/global/circularDistance.js +1 -1
  101. package/dist/shared/utils/global/fallbackIfMatch.cjs +1 -1
  102. package/dist/shared/utils/global/fallbackIfMatch.js +1 -1
  103. package/dist/shared/utils/global/fallbackIfNull.cjs +1 -1
  104. package/dist/shared/utils/global/fallbackIfNull.js +1 -1
  105. package/dist/shared/utils/global/fallbackIfNullish.cjs +1 -1
  106. package/dist/shared/utils/global/fallbackIfNullish.js +1 -1
  107. package/dist/shared/utils/global/fallbackIfUndefined.cjs +1 -1
  108. package/dist/shared/utils/global/fallbackIfUndefined.js +1 -1
  109. package/dist/shared/utils/global/firstNonNullish.cjs +1 -1
  110. package/dist/shared/utils/global/firstNonNullish.js +1 -1
  111. package/dist/shared/utils/global/flat.cjs +1 -1
  112. package/dist/shared/utils/global/flat.js +1 -1
  113. package/dist/shared/utils/global/mapIfNotNullish.cjs +1 -1
  114. package/dist/shared/utils/global/mapIfNotNullish.js +1 -1
  115. package/dist/shared/utils/global/processFirstNonNullish.cjs +1 -1
  116. package/dist/shared/utils/global/processFirstNonNullish.js +1 -1
  117. package/dist/shared/utils/global/pureEnum.cjs +1 -1
  118. package/dist/shared/utils/global/pureEnum.js +1 -1
  119. package/dist/shared/utils/global/sleep.cjs +1 -1
  120. package/dist/shared/utils/global/sleep.js +1 -1
  121. package/dist/shared/utils/index.cjs +9 -0
  122. package/dist/shared/utils/index.d.ts +1 -0
  123. package/dist/shared/utils/index.js +1 -0
  124. package/dist/shared/utils/try-catch/TryCatch.cjs +1 -1
  125. package/dist/shared/utils/try-catch/TryCatch.js +1 -1
  126. package/package.json +1 -1
@@ -217,7 +217,7 @@ function _ts_generator(thisArg, body) {
217
217
  };
218
218
  }
219
219
  }
220
- var chunkJE77HYXB_cjs = require('../../chunk-JE77HYXB.cjs');
220
+ var chunkQHUNR4O5_cjs = require('../../chunk-QHUNR4O5.cjs');
221
221
  var jwtDecode = require('jwt-decode');
222
222
  var moment = require('moment');
223
223
  var EventEmitter = require('eventemitter3');
@@ -235,8 +235,8 @@ var _SessionManager = /*#__PURE__*/ function(_EventEmitter__default_default) {
235
235
  var _this;
236
236
  _this = _call_super(this, _SessionManager);
237
237
  // Service parameters
238
- chunkJE77HYXB_cjs.__publicField(_this, "api");
239
- chunkJE77HYXB_cjs.__publicField(_this, "storageProvider");
238
+ chunkQHUNR4O5_cjs.__publicField(_this, "api");
239
+ chunkQHUNR4O5_cjs.__publicField(_this, "storageProvider");
240
240
  _this.api = options.api;
241
241
  _this.storageProvider = options.storageProvider;
242
242
  console.log("SessionManager initialized", Date.now(), options.api);
@@ -493,6 +493,6 @@ var _SessionManager = /*#__PURE__*/ function(_EventEmitter__default_default) {
493
493
  ]);
494
494
  return _SessionManager;
495
495
  }(EventEmitter__default.default);
496
- chunkJE77HYXB_cjs.__publicField(_SessionManager, "DEFAULT_AUTHORIZATION_STORAGE_KEY", "AUTHORIZATION");
496
+ chunkQHUNR4O5_cjs.__publicField(_SessionManager, "DEFAULT_AUTHORIZATION_STORAGE_KEY", "AUTHORIZATION");
497
497
  var SessionManager = _SessionManager;
498
498
  exports.SessionManager = SessionManager;
@@ -216,7 +216,7 @@ function _ts_generator(thisArg, body) {
216
216
  };
217
217
  }
218
218
  }
219
- import { __publicField } from '../../chunk-AQ5VUG5P.js';
219
+ import { __publicField } from '../../chunk-S7EYY36U.js';
220
220
  import { jwtDecode } from 'jwt-decode';
221
221
  import moment from 'moment';
222
222
  import EventEmitter from 'eventemitter3';
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- require('../../chunk-JE77HYXB.cjs');
2
+ require('../../chunk-QHUNR4O5.cjs');
3
3
  var base64 = require('base-64');
4
4
  function _interopDefault(e) {
5
5
  return e && e.__esModule ? e : {
@@ -1,4 +1,4 @@
1
- import '../../chunk-AQ5VUG5P.js';
1
+ import '../../chunk-S7EYY36U.js';
2
2
  import base64 from 'base-64';
3
3
  var decode = base64.decode, encode = base64.encode;
4
4
  var base64Polyfill = function() {
@@ -192,7 +192,7 @@ function _ts_generator(thisArg, body) {
192
192
  };
193
193
  }
194
194
  }
195
- var chunkJE77HYXB_cjs = require('../../../chunk-JE77HYXB.cjs');
195
+ var chunkQHUNR4O5_cjs = require('../../../chunk-QHUNR4O5.cjs');
196
196
  var EventEmitter = require('eventemitter3');
197
197
  function _interopDefault(e) {
198
198
  return e && e.__esModule ? e : {
@@ -208,13 +208,13 @@ var TimeService = /*#__PURE__*/ function(_EventEmitter__default_default) {
208
208
  var _this;
209
209
  _this = _call_super(this, TimeService);
210
210
  // Internal
211
- chunkJE77HYXB_cjs.__publicField(_this, "syncHandler");
212
- chunkJE77HYXB_cjs.__publicField(_this, "offset");
213
- chunkJE77HYXB_cjs.__publicField(_this, "syncedAt");
211
+ chunkQHUNR4O5_cjs.__publicField(_this, "syncHandler");
212
+ chunkQHUNR4O5_cjs.__publicField(_this, "offset");
213
+ chunkQHUNR4O5_cjs.__publicField(_this, "syncedAt");
214
214
  // Members
215
- chunkJE77HYXB_cjs.__publicField(_this, "syncInterval");
216
- chunkJE77HYXB_cjs.__publicField(_this, "clientTimeProvider");
217
- chunkJE77HYXB_cjs.__publicField(_this, "serverTimeProvider");
215
+ chunkQHUNR4O5_cjs.__publicField(_this, "syncInterval");
216
+ chunkQHUNR4O5_cjs.__publicField(_this, "clientTimeProvider");
217
+ chunkQHUNR4O5_cjs.__publicField(_this, "serverTimeProvider");
218
218
  _this.syncInterval = options === null || options === void 0 ? void 0 : options.syncInterval;
219
219
  _this.clientTimeProvider = options === null || options === void 0 ? void 0 : options.clientTimeProvider;
220
220
  _this.serverTimeProvider = options === null || options === void 0 ? void 0 : options.serverTimeProvider;
@@ -191,7 +191,7 @@ function _ts_generator(thisArg, body) {
191
191
  };
192
192
  }
193
193
  }
194
- import { __publicField } from '../../../chunk-AQ5VUG5P.js';
194
+ import { __publicField } from '../../../chunk-S7EYY36U.js';
195
195
  import EventEmitter from 'eventemitter3';
196
196
  var LOG_TAG = "TimeService";
197
197
  var TimeService = /*#__PURE__*/ function(EventEmitter) {
@@ -1 +1 @@
1
- export type If<C extends boolean, T, F = undefined> = C extends true ? T : F;
1
+ export type If<C extends boolean | undefined, T, F = undefined> = C extends true ? T : F;
@@ -1,28 +1 @@
1
1
  'use strict';
2
- var IntRage = require('./IntRage');
3
- var PartialExcept = require('./PartialExcept');
4
- var Object$1 = require('./Object');
5
- Object.keys(IntRage).forEach(function(k) {
6
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
7
- enumerable: true,
8
- get: function get() {
9
- return IntRage[k];
10
- }
11
- });
12
- });
13
- Object.keys(PartialExcept).forEach(function(k) {
14
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
15
- enumerable: true,
16
- get: function get() {
17
- return PartialExcept[k];
18
- }
19
- });
20
- });
21
- Object.keys(Object$1).forEach(function(k) {
22
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
23
- enumerable: true,
24
- get: function get() {
25
- return Object$1[k];
26
- }
27
- });
28
- });
@@ -1,5 +1,5 @@
1
1
  export type * from "./If.js";
2
- export * from './IntRage.js';
3
- export * from './PartialExcept.js';
4
- export * from './Object.js';
2
+ export type * from './IntRage.js';
3
+ export type * from './PartialExcept.js';
4
+ export type * from './Object.js';
5
5
  export type * from "./XOR.js";
@@ -1,3 +0,0 @@
1
- export * from './IntRage.js';
2
- export * from './PartialExcept.js';
3
- export * from './Object.js';
@@ -43,7 +43,7 @@ function _unsupported_iterable_to_array(o, minLen) {
43
43
  if (n === "Map" || n === "Set") return Array.from(n);
44
44
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
45
45
  }
46
- require('../../chunk-JE77HYXB.cjs');
46
+ require('../../chunk-QHUNR4O5.cjs');
47
47
  var global = require('./global');
48
48
  var ArrayUtils = /*#__PURE__*/ function() {
49
49
  function ArrayUtils() {
@@ -42,7 +42,7 @@ function _unsupported_iterable_to_array(o, minLen) {
42
42
  if (n === "Map" || n === "Set") return Array.from(n);
43
43
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
44
44
  }
45
- import '../../chunk-AQ5VUG5P.js';
45
+ import '../../chunk-S7EYY36U.js';
46
46
  import { castArray } from './global/index.js';
47
47
  var ArrayUtils = /*#__PURE__*/ function() {
48
48
  "use strict";
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var AxiosUtils = /*#__PURE__*/ function() {
23
23
  function AxiosUtils() {
24
24
  _class_call_check(this, AxiosUtils);
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  var AxiosUtils = /*#__PURE__*/ function() {
22
22
  "use strict";
23
23
  function AxiosUtils() {
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- require('../../chunk-JE77HYXB.cjs');
2
+ require('../../chunk-QHUNR4O5.cjs');
3
3
  function parseBoolean(value, defaultValue) {
4
4
  if (value === void 0 || value === null) return defaultValue;
5
5
  return value === "true" || value === true || value === 1 || value === "1";
@@ -1,4 +1,4 @@
1
- import '../../chunk-AQ5VUG5P.js';
1
+ import '../../chunk-S7EYY36U.js';
2
2
  function parseBoolean(value, defaultValue) {
3
3
  if (value === void 0 || value === null) return defaultValue;
4
4
  return value === "true" || value === true || value === 1 || value === "1";
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var Calc = /*#__PURE__*/ function() {
23
23
  function Calc() {
24
24
  _class_call_check(this, Calc);
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  var Calc = /*#__PURE__*/ function() {
22
22
  "use strict";
23
23
  function Calc() {
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var CoordinateUtils = /*#__PURE__*/ function() {
23
23
  function CoordinateUtils() {
24
24
  _class_call_check(this, CoordinateUtils);
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  var CoordinateUtils = /*#__PURE__*/ function() {
22
22
  "use strict";
23
23
  function CoordinateUtils() {
@@ -0,0 +1,108 @@
1
+ 'use strict';
2
+ function _class_call_check(instance, Constructor) {
3
+ if (!(instance instanceof Constructor)) {
4
+ throw new TypeError("Cannot call a class as a function");
5
+ }
6
+ }
7
+ function _defineProperties(target, props) {
8
+ for(var i = 0; i < props.length; i++){
9
+ var descriptor = props[i];
10
+ descriptor.enumerable = descriptor.enumerable || false;
11
+ descriptor.configurable = true;
12
+ if ("value" in descriptor) descriptor.writable = true;
13
+ Object.defineProperty(target, descriptor.key, descriptor);
14
+ }
15
+ }
16
+ function _create_class(Constructor, protoProps, staticProps) {
17
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
18
+ if (staticProps) _defineProperties(Constructor, staticProps);
19
+ return Constructor;
20
+ }
21
+ var chunkQHUNR4O5_cjs = require('../../chunk-QHUNR4O5.cjs');
22
+ var _min, _max, _value, _CyclicCounter_instances, normalize_fn;
23
+ var CyclicCounter = /*#__PURE__*/ function() {
24
+ function CyclicCounter(min, max) {
25
+ _class_call_check(this, CyclicCounter);
26
+ chunkQHUNR4O5_cjs.__privateAdd(this, _CyclicCounter_instances);
27
+ chunkQHUNR4O5_cjs.__privateAdd(this, _min);
28
+ chunkQHUNR4O5_cjs.__privateAdd(this, _max);
29
+ chunkQHUNR4O5_cjs.__privateAdd(this, _value);
30
+ if (min > max) {
31
+ throw new Error("min value is should be less or equal than ".concat(this.max));
32
+ }
33
+ if (max < min) {
34
+ throw new Error("max value is should be greater or equal than ".concat(this.min));
35
+ }
36
+ chunkQHUNR4O5_cjs.__privateSet(this, _min, min);
37
+ chunkQHUNR4O5_cjs.__privateSet(this, _max, max);
38
+ chunkQHUNR4O5_cjs.__privateSet(this, _value, 0);
39
+ }
40
+ _create_class(CyclicCounter, [
41
+ {
42
+ key: "min",
43
+ get: function get() {
44
+ return chunkQHUNR4O5_cjs.__privateGet(this, _min);
45
+ },
46
+ set: function set(value) {
47
+ if (value > this.max) {
48
+ throw new Error("min value is should be less or equal than ".concat(this.max));
49
+ }
50
+ chunkQHUNR4O5_cjs.__privateSet(this, _min, value);
51
+ }
52
+ },
53
+ {
54
+ key: "max",
55
+ get: function get() {
56
+ return chunkQHUNR4O5_cjs.__privateGet(this, _max);
57
+ },
58
+ set: function set(value) {
59
+ if (value < this.min) {
60
+ throw new Error("max value is should be greater or equal than ".concat(this.min));
61
+ }
62
+ chunkQHUNR4O5_cjs.__privateSet(this, _max, value);
63
+ }
64
+ },
65
+ {
66
+ key: "value",
67
+ get: function get() {
68
+ return chunkQHUNR4O5_cjs.__privateGet(this, _value);
69
+ },
70
+ set: function set(value) {
71
+ chunkQHUNR4O5_cjs.__privateSet(this, _value, chunkQHUNR4O5_cjs.__privateMethod(this, _CyclicCounter_instances, normalize_fn).call(this, value));
72
+ }
73
+ },
74
+ {
75
+ key: "current",
76
+ value: function current() {
77
+ return this.value;
78
+ }
79
+ },
80
+ {
81
+ key: "prev",
82
+ value: function prev() {
83
+ this.value = this.value - 1;
84
+ return this.value;
85
+ }
86
+ },
87
+ {
88
+ key: "next",
89
+ value: function next() {
90
+ this.value = this.value + 1;
91
+ return this.value;
92
+ }
93
+ }
94
+ ]);
95
+ return CyclicCounter;
96
+ }();
97
+ _min = new WeakMap();
98
+ _max = new WeakMap();
99
+ _value = new WeakMap();
100
+ _CyclicCounter_instances = new WeakSet();
101
+ normalize_fn = function normalize_fn(v) {
102
+ var range = this.max - this.min + 1;
103
+ if (!Number.isInteger(v) || !Number.isFinite(v)) {
104
+ throw new RangeError("Tag value must be a finite integer. got=".concat(v));
105
+ }
106
+ return ((v - this.min) % range + range) % range + this.min;
107
+ };
108
+ exports.CyclicCounter = CyclicCounter;
@@ -0,0 +1,13 @@
1
+ export declare class CyclicCounter {
2
+ #private;
3
+ constructor(min: number, max: number);
4
+ get min(): number;
5
+ set min(value: number);
6
+ get max(): number;
7
+ set max(value: number);
8
+ private get value();
9
+ private set value(value);
10
+ current(): number;
11
+ prev(): number;
12
+ next(): number;
13
+ }
@@ -0,0 +1,108 @@
1
+ function _class_call_check(instance, Constructor) {
2
+ if (!(instance instanceof Constructor)) {
3
+ throw new TypeError("Cannot call a class as a function");
4
+ }
5
+ }
6
+ function _defineProperties(target, props) {
7
+ for(var i = 0; i < props.length; i++){
8
+ var descriptor = props[i];
9
+ descriptor.enumerable = descriptor.enumerable || false;
10
+ descriptor.configurable = true;
11
+ if ("value" in descriptor) descriptor.writable = true;
12
+ Object.defineProperty(target, descriptor.key, descriptor);
13
+ }
14
+ }
15
+ function _create_class(Constructor, protoProps, staticProps) {
16
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
+ if (staticProps) _defineProperties(Constructor, staticProps);
18
+ return Constructor;
19
+ }
20
+ import { __privateAdd, __privateSet, __privateGet, __privateMethod } from '../../chunk-S7EYY36U.js';
21
+ var _min, _max, _value, _CyclicCounter_instances, normalize_fn;
22
+ var CyclicCounter = /*#__PURE__*/ function() {
23
+ "use strict";
24
+ function CyclicCounter(min, max) {
25
+ _class_call_check(this, CyclicCounter);
26
+ __privateAdd(this, _CyclicCounter_instances);
27
+ __privateAdd(this, _min);
28
+ __privateAdd(this, _max);
29
+ __privateAdd(this, _value);
30
+ if (min > max) {
31
+ throw new Error("min value is should be less or equal than ".concat(this.max));
32
+ }
33
+ if (max < min) {
34
+ throw new Error("max value is should be greater or equal than ".concat(this.min));
35
+ }
36
+ __privateSet(this, _min, min);
37
+ __privateSet(this, _max, max);
38
+ __privateSet(this, _value, 0);
39
+ }
40
+ _create_class(CyclicCounter, [
41
+ {
42
+ key: "min",
43
+ get: function get() {
44
+ return __privateGet(this, _min);
45
+ },
46
+ set: function set(value) {
47
+ if (value > this.max) {
48
+ throw new Error("min value is should be less or equal than ".concat(this.max));
49
+ }
50
+ __privateSet(this, _min, value);
51
+ }
52
+ },
53
+ {
54
+ key: "max",
55
+ get: function get() {
56
+ return __privateGet(this, _max);
57
+ },
58
+ set: function set(value) {
59
+ if (value < this.min) {
60
+ throw new Error("max value is should be greater or equal than ".concat(this.min));
61
+ }
62
+ __privateSet(this, _max, value);
63
+ }
64
+ },
65
+ {
66
+ key: "value",
67
+ get: function get() {
68
+ return __privateGet(this, _value);
69
+ },
70
+ set: function set(value) {
71
+ __privateSet(this, _value, __privateMethod(this, _CyclicCounter_instances, normalize_fn).call(this, value));
72
+ }
73
+ },
74
+ {
75
+ key: "current",
76
+ value: function current() {
77
+ return this.value;
78
+ }
79
+ },
80
+ {
81
+ key: "prev",
82
+ value: function prev() {
83
+ this.value = this.value - 1;
84
+ return this.value;
85
+ }
86
+ },
87
+ {
88
+ key: "next",
89
+ value: function next() {
90
+ this.value = this.value + 1;
91
+ return this.value;
92
+ }
93
+ }
94
+ ]);
95
+ return CyclicCounter;
96
+ }();
97
+ _min = new WeakMap();
98
+ _max = new WeakMap();
99
+ _value = new WeakMap();
100
+ _CyclicCounter_instances = new WeakSet();
101
+ normalize_fn = function normalize_fn(v) {
102
+ var range = this.max - this.min + 1;
103
+ if (!Number.isInteger(v) || !Number.isFinite(v)) {
104
+ throw new RangeError("Tag value must be a finite integer. got=".concat(v));
105
+ }
106
+ return ((v - this.min) % range + range) % range + this.min;
107
+ };
108
+ export { CyclicCounter };
@@ -29,7 +29,7 @@ function _type_of(obj) {
29
29
  "@swc/helpers - typeof";
30
30
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
31
31
  }
32
- var chunkJE77HYXB_cjs = require('../../chunk-JE77HYXB.cjs');
32
+ var chunkQHUNR4O5_cjs = require('../../chunk-QHUNR4O5.cjs');
33
33
  var moment = require('moment');
34
34
  var DATE = require('../constants/DATE');
35
35
  function _interopDefault(e) {
@@ -185,7 +185,7 @@ var _DateUtils = /*#__PURE__*/ function() {
185
185
  ]);
186
186
  return _DateUtils;
187
187
  }();
188
- chunkJE77HYXB_cjs.__publicField(_DateUtils, "relativeDate", function(input) {
188
+ chunkQHUNR4O5_cjs.__publicField(_DateUtils, "relativeDate", function(input) {
189
189
  var base = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Date.now();
190
190
  var datetime = moment__default.default.isMoment(input) ? moment__default.default(input.toDate()) : moment__default.default(input);
191
191
  if (!datetime.isValid()) {
@@ -194,7 +194,7 @@ chunkJE77HYXB_cjs.__publicField(_DateUtils, "relativeDate", function(input) {
194
194
  }
195
195
  return datetime.from(base);
196
196
  });
197
- chunkJE77HYXB_cjs.__publicField(_DateUtils, "setLocale", function(language) {
197
+ chunkQHUNR4O5_cjs.__publicField(_DateUtils, "setLocale", function(language) {
198
198
  var relativeTime = _DateUtils.getRelativeTimeSpec(language);
199
199
  if (relativeTime !== void 0) {
200
200
  moment__default.default.updateLocale(language, {
@@ -203,7 +203,7 @@ chunkJE77HYXB_cjs.__publicField(_DateUtils, "setLocale", function(language) {
203
203
  }
204
204
  moment__default.default.locale(language);
205
205
  });
206
- chunkJE77HYXB_cjs.__publicField(_DateUtils, "getRelativeTimeSpec", function(locale) {
206
+ chunkQHUNR4O5_cjs.__publicField(_DateUtils, "getRelativeTimeSpec", function(locale) {
207
207
  if (locale in _DateUtils.relativeTimeSpecs) {
208
208
  return _DateUtils.relativeTimeSpecs[locale];
209
209
  }
@@ -28,7 +28,7 @@ function _type_of(obj) {
28
28
  "@swc/helpers - typeof";
29
29
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
30
30
  }
31
- import { __publicField } from '../../chunk-AQ5VUG5P.js';
31
+ import { __publicField } from '../../chunk-S7EYY36U.js';
32
32
  import moment from 'moment';
33
33
  import { DATE } from '../constants/DATE.js';
34
34
  var _DateUtils = /*#__PURE__*/ function() {
@@ -64,14 +64,14 @@ function _unsupported_iterable_to_array(o, minLen) {
64
64
  if (n === "Map" || n === "Set") return Array.from(n);
65
65
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
66
66
  }
67
- var chunkJE77HYXB_cjs = require('../../chunk-JE77HYXB.cjs');
67
+ var chunkQHUNR4O5_cjs = require('../../chunk-QHUNR4O5.cjs');
68
68
  var Enum = /*#__PURE__*/ function() {
69
69
  function Enum(e) {
70
70
  _class_call_check(this, Enum);
71
- chunkJE77HYXB_cjs.__publicField(this, "_e");
72
- chunkJE77HYXB_cjs.__publicField(this, "_entries");
73
- chunkJE77HYXB_cjs.__publicField(this, "_keys");
74
- chunkJE77HYXB_cjs.__publicField(this, "_values");
71
+ chunkQHUNR4O5_cjs.__publicField(this, "_e");
72
+ chunkQHUNR4O5_cjs.__publicField(this, "_entries");
73
+ chunkQHUNR4O5_cjs.__publicField(this, "_keys");
74
+ chunkQHUNR4O5_cjs.__publicField(this, "_values");
75
75
  this._e = e;
76
76
  this._entries = Enum.entries(e);
77
77
  this._keys = Enum.keys(e);
@@ -63,7 +63,7 @@ function _unsupported_iterable_to_array(o, minLen) {
63
63
  if (n === "Map" || n === "Set") return Array.from(n);
64
64
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
65
65
  }
66
- import { __publicField } from '../../chunk-AQ5VUG5P.js';
66
+ import { __publicField } from '../../chunk-S7EYY36U.js';
67
67
  var Enum = /*#__PURE__*/ function() {
68
68
  "use strict";
69
69
  function Enum(e) {
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var deepmerge = require('deepmerge');
23
23
  function _interopDefault(e) {
24
24
  return e && e.__esModule ? e : {
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  import deepmerge from 'deepmerge';
22
22
  var I18nUtils = /*#__PURE__*/ function() {
23
23
  "use strict";
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var between = require('./global/between');
23
23
  var JuminNumberUtils = /*#__PURE__*/ function() {
24
24
  function JuminNumberUtils() {
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  import { between } from './global/between.js';
22
22
  var JuminNumberUtils = /*#__PURE__*/ function() {
23
23
  "use strict";
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var NumberUtils = /*#__PURE__*/ function() {
23
23
  function NumberUtils() {
24
24
  _class_call_check(this, NumberUtils);
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  var NumberUtils = /*#__PURE__*/ function() {
22
22
  "use strict";
23
23
  function NumberUtils() {
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var Uint8ArrayUtils = require('./Uint8ArrayUtils');
23
23
  var node = require('@powfix/uuid/node');
24
24
  var ObjectIdUtils = /*#__PURE__*/ function() {
@@ -17,7 +17,7 @@ function _create_class(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import '../../chunk-AQ5VUG5P.js';
20
+ import '../../chunk-S7EYY36U.js';
21
21
  import { Uint8ArrayUtils } from './Uint8ArrayUtils.js';
22
22
  import { UUID } from '@powfix/uuid/node';
23
23
  var ObjectIdUtils = /*#__PURE__*/ function() {
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
- require('../../chunk-JE77HYXB.cjs');
21
+ require('../../chunk-QHUNR4O5.cjs');
22
22
  var Point3Utils = /*#__PURE__*/ function() {
23
23
  function Point3Utils() {
24
24
  _class_call_check(this, Point3Utils);