@bigbinary/neeto-molecules 4.1.23 → 4.1.25

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 (40) hide show
  1. package/dist/IpRestriction.js +93 -86
  2. package/dist/IpRestriction.js.map +1 -1
  3. package/dist/cjs/IpRestriction.js +93 -86
  4. package/dist/cjs/IpRestriction.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/translations/ar.json +3 -1
  7. package/src/translations/bg.json +3 -1
  8. package/src/translations/ca.json +3 -1
  9. package/src/translations/cs.json +3 -1
  10. package/src/translations/da.json +3 -1
  11. package/src/translations/de.json +4 -2
  12. package/src/translations/es-MX.json +3 -1
  13. package/src/translations/es.json +3 -1
  14. package/src/translations/et.json +4 -2
  15. package/src/translations/fi.json +4 -2
  16. package/src/translations/fil.json +4 -2
  17. package/src/translations/fr.json +3 -1
  18. package/src/translations/he.json +3 -1
  19. package/src/translations/hi.json +3 -1
  20. package/src/translations/hr.json +3 -1
  21. package/src/translations/hu.json +4 -2
  22. package/src/translations/id.json +4 -2
  23. package/src/translations/it.json +3 -1
  24. package/src/translations/ja.json +3 -1
  25. package/src/translations/ko.json +3 -1
  26. package/src/translations/nl.json +3 -1
  27. package/src/translations/pl.json +4 -2
  28. package/src/translations/pt-BR.json +4 -2
  29. package/src/translations/pt.json +4 -2
  30. package/src/translations/ro.json +3 -1
  31. package/src/translations/ru.json +3 -1
  32. package/src/translations/sk.json +3 -1
  33. package/src/translations/sl.json +4 -2
  34. package/src/translations/sv.json +3 -1
  35. package/src/translations/th.json +3 -1
  36. package/src/translations/tr.json +4 -2
  37. package/src/translations/uk.json +3 -1
  38. package/src/translations/vi.json +3 -1
  39. package/src/translations/zh-CN.json +3 -1
  40. package/src/translations/zh-TW.json +3 -1
@@ -345,86 +345,93 @@ function requireIPv6Utils () {
345
345
 
346
346
  var HexadecimalUtils = {};
347
347
 
348
- (function (exports$1) {
349
- Object.defineProperty(exports$1, "__esModule", { value: true });
350
- exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
351
- const IPv6Utils_1 = requireIPv6Utils();
352
- const BinaryUtils_1 = BinaryUtils;
353
- /**
354
- * Converts a given bigint number to a hexadecimal string
355
- * @param num the bigint number
356
- * @returns {string} the hexadeciaml string
357
- */
358
- let bigIntToHexadecimalString = (num) => {
359
- return num.toString(16);
360
- };
361
- exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
362
- /**
363
- * Converts a number in hexadecimal (base 16) to binary string
364
- * @param {string} hexadecimalString the number in base 16
365
- * @returns {string} the number converted to base 2
366
- */
367
- let hexadecimalStringToBinaryString = (hexadecimalString) => {
368
- let inDecimal = BigInt(`0x${hexadecimalString}`);
369
- return inDecimal.toString(2);
370
- };
371
- exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
372
- /**
373
- * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
374
- * This means the bits in the output cannot be more than 16
375
- *
376
- * @param hexadecimalString {string} the number converted to binary hexadecatet string
377
- */
378
- let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
379
- let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
380
- let length = binaryString.length;
381
- if (length > 16) {
382
- throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
383
- }
384
- return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
385
- };
386
- exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
387
- /**
388
- * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
389
- * binary string
390
- *
391
- * @param hexadecimalString IPv6 string
392
- * @returns {string} the binary value of the given ipv6 number in string
393
- */
394
- let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
395
- let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
396
- let stringHexadecimal = expandedIPv6.split(":");
397
- return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
398
- return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
399
- }, '');
400
- };
401
- exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
402
- /**
403
- * Converts number in binary string to hexadecimal string
404
- * @param {string} num in binary string
405
- * @returns {string} num in hexadecimal string
406
- */
407
- let binaryStringToHexadecimalString = (num) => {
408
- // first convert to binary string to decimal (big Integer)
409
- let inDecimal = BigInt(`0b${num}`);
410
- return inDecimal.toString(16);
411
- };
412
- exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
413
- /**
414
- * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
415
- * @param {string} hexadectetString the IPv6 number
416
- * @returns {string} the IPv6 number converted to binary string
417
- */
418
- let hexadectetNotationToBinaryString = (hexadectetString) => {
419
- let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
420
- let hexadecimals = expand.split(":");
421
- return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
422
- return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
423
- }, '');
424
- };
425
- exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
426
-
427
- } (HexadecimalUtils));
348
+ var hasRequiredHexadecimalUtils;
349
+
350
+ function requireHexadecimalUtils () {
351
+ if (hasRequiredHexadecimalUtils) return HexadecimalUtils;
352
+ hasRequiredHexadecimalUtils = 1;
353
+ (function (exports$1) {
354
+ Object.defineProperty(exports$1, "__esModule", { value: true });
355
+ exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
356
+ const IPv6Utils_1 = requireIPv6Utils();
357
+ const BinaryUtils_1 = BinaryUtils;
358
+ /**
359
+ * Converts a given bigint number to a hexadecimal string
360
+ * @param num the bigint number
361
+ * @returns {string} the hexadeciaml string
362
+ */
363
+ let bigIntToHexadecimalString = (num) => {
364
+ return num.toString(16);
365
+ };
366
+ exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
367
+ /**
368
+ * Converts a number in hexadecimal (base 16) to binary string
369
+ * @param {string} hexadecimalString the number in base 16
370
+ * @returns {string} the number converted to base 2
371
+ */
372
+ let hexadecimalStringToBinaryString = (hexadecimalString) => {
373
+ let inDecimal = BigInt(`0x${hexadecimalString}`);
374
+ return inDecimal.toString(2);
375
+ };
376
+ exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
377
+ /**
378
+ * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
379
+ * This means the bits in the output cannot be more than 16
380
+ *
381
+ * @param hexadecimalString {string} the number converted to binary hexadecatet string
382
+ */
383
+ let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
384
+ let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
385
+ let length = binaryString.length;
386
+ if (length > 16) {
387
+ throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
388
+ }
389
+ return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
390
+ };
391
+ exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
392
+ /**
393
+ * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
394
+ * binary string
395
+ *
396
+ * @param hexadecimalString IPv6 string
397
+ * @returns {string} the binary value of the given ipv6 number in string
398
+ */
399
+ let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
400
+ let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
401
+ let stringHexadecimal = expandedIPv6.split(":");
402
+ return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
403
+ return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
404
+ }, '');
405
+ };
406
+ exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
407
+ /**
408
+ * Converts number in binary string to hexadecimal string
409
+ * @param {string} num in binary string
410
+ * @returns {string} num in hexadecimal string
411
+ */
412
+ let binaryStringToHexadecimalString = (num) => {
413
+ // first convert to binary string to decimal (big Integer)
414
+ let inDecimal = BigInt(`0b${num}`);
415
+ return inDecimal.toString(16);
416
+ };
417
+ exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
418
+ /**
419
+ * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
420
+ * @param {string} hexadectetString the IPv6 number
421
+ * @returns {string} the IPv6 number converted to binary string
422
+ */
423
+ let hexadectetNotationToBinaryString = (hexadectetString) => {
424
+ let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
425
+ let hexadecimals = expand.split(":");
426
+ return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
427
+ return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
428
+ }, '');
429
+ };
430
+ exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
431
+
432
+ } (HexadecimalUtils));
433
+ return HexadecimalUtils;
434
+ }
428
435
 
429
436
  var hasRequiredValidator;
430
437
 
@@ -436,8 +443,8 @@ function requireValidator () {
436
443
  const BinaryUtils_1 = BinaryUtils;
437
444
  const BinaryUtils_2 = BinaryUtils;
438
445
  const IPv6Utils_1 = requireIPv6Utils();
439
- const HexadecimalUtils_1 = HexadecimalUtils;
440
- const HexadecimalUtils_2 = HexadecimalUtils;
446
+ const HexadecimalUtils_1 = requireHexadecimalUtils();
447
+ const HexadecimalUtils_2 = requireHexadecimalUtils();
441
448
  let Validator$1 = class Validator {
442
449
  /**
443
450
  * Checks if given ipNumber is in between the given lower and upper bound
@@ -934,9 +941,9 @@ const BinaryUtils_2 = BinaryUtils;
934
941
  const BinaryUtils_3 = BinaryUtils;
935
942
  const BinaryUtils_4 = BinaryUtils;
936
943
  const Hexadecatet_1$1 = Hexadecatet$1;
937
- const HexadecimalUtils_1$1 = HexadecimalUtils;
944
+ const HexadecimalUtils_1$1 = requireHexadecimalUtils();
938
945
  const IPv6Utils_1 = requireIPv6Utils();
939
- const HexadecimalUtils_2 = HexadecimalUtils;
946
+ const HexadecimalUtils_2 = requireHexadecimalUtils();
940
947
  /**
941
948
  * Provides the implementation of functionality that are common
942
949
  * to {@link IPv4}, {@link IPv6}, {@link IPv4Mask} and {@link IPv6Mask}
@@ -1687,7 +1694,7 @@ Prefix.isIPv4Prefix = isIPv4Prefix;
1687
1694
  const Validator_1$1 = requireValidator();
1688
1695
  const IPNumber_1$1 = IPNumber;
1689
1696
  const BinaryUtils_1$1 = BinaryUtils;
1690
- const HexadecimalUtils_1 = HexadecimalUtils;
1697
+ const HexadecimalUtils_1 = requireHexadecimalUtils();
1691
1698
  const Hexadecatet_1 = Hexadecatet$1;
1692
1699
  /**
1693
1700
  * Represents the prefix portion in the CIDR notation for representing IP ranges
@@ -3185,7 +3192,7 @@ class SortedSet {
3185
3192
  */
3186
3193
  __exportStar(BinaryUtils, exports$1);
3187
3194
  __exportStar(Hexadecatet$1, exports$1);
3188
- __exportStar(HexadecimalUtils, exports$1);
3195
+ __exportStar(requireHexadecimalUtils(), exports$1);
3189
3196
  __exportStar(IPNumber, exports$1);
3190
3197
  __exportStar(IPNumType, exports$1);
3191
3198
  __exportStar(IPPool, exports$1);