eservices-core 1.0.311 → 1.0.312

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 (2) hide show
  1. package/dist/index.js +4 -423
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * eservices-core v1.0.311
2
+ * eservices-core v1.0.312
3
3
  * (c) 2022 ESERVICES
4
4
  */
5
5
  'use strict';
@@ -10,10 +10,12 @@ var vue = require('vue');
10
10
  var jenesiusVueModal = require('jenesius-vue-modal');
11
11
  var vueRouter = require('vue-router');
12
12
  var dateAndTime = require('date-and-time');
13
+ var hash = require('object-hash');
13
14
 
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
16
 
16
17
  var dateAndTime__default = /*#__PURE__*/_interopDefaultLegacy(dateAndTime);
18
+ var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
17
19
 
18
20
  var script$R = vue.defineComponent({
19
21
  props: {
@@ -4721,427 +4723,6 @@ styleInject(css_248z$d);
4721
4723
  script$e.__scopeId = "data-v-476fe206";
4722
4724
  script$e.__file = "core/widgets/interface/interface-navigation-row.vue";
4723
4725
 
4724
- var lib = {exports: {}};
4725
-
4726
- var util = {exports: {}};
4727
-
4728
- (function (module) {
4729
- const util = module.exports;
4730
-
4731
- util.digitCount = function digitCount (value) {
4732
- // Add a digit for negative numbers, as the sign will be prefixed
4733
- const sign = value < 0 ? 1 : 0;
4734
- // Guard against negative numbers & zero going into log10(),
4735
- // as that would return -Infinity
4736
- value = Math.abs(Number(value || 1));
4737
- return Math.floor(Math.log10(value)) + 1 + sign
4738
- };
4739
-
4740
- util.getType = function getType (value) {
4741
- if (Buffer.isBuffer(value)) return 'buffer'
4742
- if (ArrayBuffer.isView(value)) return 'arraybufferview'
4743
- if (Array.isArray(value)) return 'array'
4744
- if (value instanceof Number) return 'number'
4745
- if (value instanceof Boolean) return 'boolean'
4746
- if (value instanceof Set) return 'set'
4747
- if (value instanceof Map) return 'map'
4748
- if (value instanceof String) return 'string'
4749
- if (value instanceof ArrayBuffer) return 'arraybuffer'
4750
- return typeof value
4751
- };
4752
- }(util));
4753
-
4754
- const { getType: getType$1 } = util.exports;
4755
-
4756
- /**
4757
- * Encodes data in bencode.
4758
- *
4759
- * @param {Buffer|Array|String|Object|Number|Boolean} data
4760
- * @return {Buffer}
4761
- */
4762
- function encode (data, buffer, offset) {
4763
- const buffers = [];
4764
- let result = null;
4765
-
4766
- encode._encode(buffers, data);
4767
- result = Buffer.concat(buffers);
4768
- encode.bytes = result.length;
4769
-
4770
- if (Buffer.isBuffer(buffer)) {
4771
- result.copy(buffer, offset);
4772
- return buffer
4773
- }
4774
-
4775
- return result
4776
- }
4777
-
4778
- encode.bytes = -1;
4779
- encode._floatConversionDetected = false;
4780
-
4781
- encode._encode = function (buffers, data) {
4782
- if (data == null) { return }
4783
-
4784
- switch (getType$1(data)) {
4785
- case 'buffer': encode.buffer(buffers, data); break
4786
- case 'object': encode.dict(buffers, data); break
4787
- case 'map': encode.dictMap(buffers, data); break
4788
- case 'array': encode.list(buffers, data); break
4789
- case 'set': encode.listSet(buffers, data); break
4790
- case 'string': encode.string(buffers, data); break
4791
- case 'number': encode.number(buffers, data); break
4792
- case 'boolean': encode.number(buffers, data); break
4793
- case 'arraybufferview': encode.buffer(buffers, Buffer.from(data.buffer, data.byteOffset, data.byteLength)); break
4794
- case 'arraybuffer': encode.buffer(buffers, Buffer.from(data)); break
4795
- }
4796
- };
4797
-
4798
- const buffE = Buffer.from('e');
4799
- const buffD = Buffer.from('d');
4800
- const buffL = Buffer.from('l');
4801
-
4802
- encode.buffer = function (buffers, data) {
4803
- buffers.push(Buffer.from(data.length + ':'), data);
4804
- };
4805
-
4806
- encode.string = function (buffers, data) {
4807
- buffers.push(Buffer.from(Buffer.byteLength(data) + ':' + data));
4808
- };
4809
-
4810
- encode.number = function (buffers, data) {
4811
- const maxLo = 0x80000000;
4812
- const hi = (data / maxLo) << 0;
4813
- const lo = (data % maxLo) << 0;
4814
- const val = hi * maxLo + lo;
4815
-
4816
- buffers.push(Buffer.from('i' + val + 'e'));
4817
-
4818
- if (val !== data && !encode._floatConversionDetected) {
4819
- encode._floatConversionDetected = true;
4820
- console.warn(
4821
- 'WARNING: Possible data corruption detected with value "' + data + '":',
4822
- 'Bencoding only defines support for integers, value was converted to "' + val + '"'
4823
- );
4824
- console.trace();
4825
- }
4826
- };
4827
-
4828
- encode.dict = function (buffers, data) {
4829
- buffers.push(buffD);
4830
-
4831
- let j = 0;
4832
- let k;
4833
- // fix for issue #13 - sorted dicts
4834
- const keys = Object.keys(data).sort();
4835
- const kl = keys.length;
4836
-
4837
- for (; j < kl; j++) {
4838
- k = keys[j];
4839
- if (data[k] == null) continue
4840
- encode.string(buffers, k);
4841
- encode._encode(buffers, data[k]);
4842
- }
4843
-
4844
- buffers.push(buffE);
4845
- };
4846
-
4847
- encode.dictMap = function (buffers, data) {
4848
- buffers.push(buffD);
4849
-
4850
- const keys = Array.from(data.keys()).sort();
4851
-
4852
- for (const key of keys) {
4853
- if (data.get(key) == null) continue
4854
- Buffer.isBuffer(key)
4855
- ? encode._encode(buffers, key)
4856
- : encode.string(buffers, String(key));
4857
- encode._encode(buffers, data.get(key));
4858
- }
4859
-
4860
- buffers.push(buffE);
4861
- };
4862
-
4863
- encode.list = function (buffers, data) {
4864
- let i = 0;
4865
- const c = data.length;
4866
- buffers.push(buffL);
4867
-
4868
- for (; i < c; i++) {
4869
- if (data[i] == null) continue
4870
- encode._encode(buffers, data[i]);
4871
- }
4872
-
4873
- buffers.push(buffE);
4874
- };
4875
-
4876
- encode.listSet = function (buffers, data) {
4877
- buffers.push(buffL);
4878
-
4879
- for (const item of data) {
4880
- if (item == null) continue
4881
- encode._encode(buffers, item);
4882
- }
4883
-
4884
- buffers.push(buffE);
4885
- };
4886
-
4887
- var encode_1 = encode;
4888
-
4889
- const INTEGER_START = 0x69; // 'i'
4890
- const STRING_DELIM = 0x3A; // ':'
4891
- const DICTIONARY_START = 0x64; // 'd'
4892
- const LIST_START = 0x6C; // 'l'
4893
- const END_OF_TYPE = 0x65; // 'e'
4894
-
4895
- /**
4896
- * replaces parseInt(buffer.toString('ascii', start, end)).
4897
- * For strings with less then ~30 charachters, this is actually a lot faster.
4898
- *
4899
- * @param {Buffer} data
4900
- * @param {Number} start
4901
- * @param {Number} end
4902
- * @return {Number} calculated number
4903
- */
4904
- function getIntFromBuffer (buffer, start, end) {
4905
- let sum = 0;
4906
- let sign = 1;
4907
-
4908
- for (let i = start; i < end; i++) {
4909
- const num = buffer[i];
4910
-
4911
- if (num < 58 && num >= 48) {
4912
- sum = sum * 10 + (num - 48);
4913
- continue
4914
- }
4915
-
4916
- if (i === start && num === 43) { // +
4917
- continue
4918
- }
4919
-
4920
- if (i === start && num === 45) { // -
4921
- sign = -1;
4922
- continue
4923
- }
4924
-
4925
- if (num === 46) { // .
4926
- // its a float. break here.
4927
- break
4928
- }
4929
-
4930
- throw new Error('not a number: buffer[' + i + '] = ' + num)
4931
- }
4932
-
4933
- return sum * sign
4934
- }
4935
-
4936
- /**
4937
- * Decodes bencoded data.
4938
- *
4939
- * @param {Buffer} data
4940
- * @param {Number} start (optional)
4941
- * @param {Number} end (optional)
4942
- * @param {String} encoding (optional)
4943
- * @return {Object|Array|Buffer|String|Number}
4944
- */
4945
- function decode (data, start, end, encoding) {
4946
- if (data == null || data.length === 0) {
4947
- return null
4948
- }
4949
-
4950
- if (typeof start !== 'number' && encoding == null) {
4951
- encoding = start;
4952
- start = undefined;
4953
- }
4954
-
4955
- if (typeof end !== 'number' && encoding == null) {
4956
- encoding = end;
4957
- end = undefined;
4958
- }
4959
-
4960
- decode.position = 0;
4961
- decode.encoding = encoding || null;
4962
-
4963
- decode.data = !(Buffer.isBuffer(data))
4964
- ? Buffer.from(data)
4965
- : data.slice(start, end);
4966
-
4967
- decode.bytes = decode.data.length;
4968
-
4969
- return decode.next()
4970
- }
4971
-
4972
- decode.bytes = 0;
4973
- decode.position = 0;
4974
- decode.data = null;
4975
- decode.encoding = null;
4976
-
4977
- decode.next = function () {
4978
- switch (decode.data[decode.position]) {
4979
- case DICTIONARY_START:
4980
- return decode.dictionary()
4981
- case LIST_START:
4982
- return decode.list()
4983
- case INTEGER_START:
4984
- return decode.integer()
4985
- default:
4986
- return decode.buffer()
4987
- }
4988
- };
4989
-
4990
- decode.find = function (chr) {
4991
- let i = decode.position;
4992
- const c = decode.data.length;
4993
- const d = decode.data;
4994
-
4995
- while (i < c) {
4996
- if (d[i] === chr) return i
4997
- i++;
4998
- }
4999
-
5000
- throw new Error(
5001
- 'Invalid data: Missing delimiter "' +
5002
- String.fromCharCode(chr) + '" [0x' +
5003
- chr.toString(16) + ']'
5004
- )
5005
- };
5006
-
5007
- decode.dictionary = function () {
5008
- decode.position++;
5009
-
5010
- const dict = {};
5011
-
5012
- while (decode.data[decode.position] !== END_OF_TYPE) {
5013
- dict[decode.buffer()] = decode.next();
5014
- }
5015
-
5016
- decode.position++;
5017
-
5018
- return dict
5019
- };
5020
-
5021
- decode.list = function () {
5022
- decode.position++;
5023
-
5024
- const lst = [];
5025
-
5026
- while (decode.data[decode.position] !== END_OF_TYPE) {
5027
- lst.push(decode.next());
5028
- }
5029
-
5030
- decode.position++;
5031
-
5032
- return lst
5033
- };
5034
-
5035
- decode.integer = function () {
5036
- const end = decode.find(END_OF_TYPE);
5037
- const number = getIntFromBuffer(decode.data, decode.position + 1, end);
5038
-
5039
- decode.position += end + 1 - decode.position;
5040
-
5041
- return number
5042
- };
5043
-
5044
- decode.buffer = function () {
5045
- let sep = decode.find(STRING_DELIM);
5046
- const length = getIntFromBuffer(decode.data, decode.position, sep);
5047
- const end = ++sep + length;
5048
-
5049
- decode.position = end;
5050
-
5051
- return decode.encoding
5052
- ? decode.data.toString(decode.encoding, sep, end)
5053
- : decode.data.slice(sep, end)
5054
- };
5055
-
5056
- var decode_1 = decode;
5057
-
5058
- const { digitCount, getType } = util.exports;
5059
-
5060
- function listLength (list) {
5061
- let length = 1 + 1; // type marker + end-of-type marker
5062
-
5063
- for (const value of list) {
5064
- length += encodingLength(value);
5065
- }
5066
-
5067
- return length
5068
- }
5069
-
5070
- function mapLength (map) {
5071
- let length = 1 + 1; // type marker + end-of-type marker
5072
-
5073
- for (const [key, value] of map) {
5074
- const keyLength = Buffer.byteLength(key);
5075
- length += digitCount(keyLength) + 1 + keyLength;
5076
- length += encodingLength(value);
5077
- }
5078
-
5079
- return length
5080
- }
5081
-
5082
- function objectLength (value) {
5083
- let length = 1 + 1; // type marker + end-of-type marker
5084
- const keys = Object.keys(value);
5085
-
5086
- for (let i = 0; i < keys.length; i++) {
5087
- const keyLength = Buffer.byteLength(keys[i]);
5088
- length += digitCount(keyLength) + 1 + keyLength;
5089
- length += encodingLength(value[keys[i]]);
5090
- }
5091
-
5092
- return length
5093
- }
5094
-
5095
- function stringLength (value) {
5096
- const length = Buffer.byteLength(value);
5097
- return digitCount(length) + 1 + length
5098
- }
5099
-
5100
- function arrayBufferLength (value) {
5101
- const length = value.byteLength - value.byteOffset;
5102
- return digitCount(length) + 1 + length
5103
- }
5104
-
5105
- function encodingLength (value) {
5106
- const length = 0;
5107
-
5108
- if (value == null) return length
5109
-
5110
- const type = getType(value);
5111
-
5112
- switch (type) {
5113
- case 'buffer': return digitCount(value.length) + 1 + value.length
5114
- case 'arraybufferview': return arrayBufferLength(value)
5115
- case 'string': return stringLength(value)
5116
- case 'array': case 'set': return listLength(value)
5117
- case 'number': return 1 + digitCount(Math.floor(value)) + 1
5118
- case 'bigint': return 1 + value.toString().length + 1
5119
- case 'object': return objectLength(value)
5120
- case 'map': return mapLength(value)
5121
- default:
5122
- throw new TypeError(`Unsupported value of type "${type}"`)
5123
- }
5124
- }
5125
-
5126
- var encodingLength_1 = encodingLength;
5127
-
5128
- (function (module) {
5129
- const bencode = module.exports;
5130
-
5131
- bencode.encode = encode_1;
5132
- bencode.decode = decode_1;
5133
-
5134
- /**
5135
- * Determines the amount of bytes
5136
- * needed to encode the given value
5137
- * @param {Object|Array|Buffer|String|Number|Boolean} value
5138
- * @return {Number} byteCount
5139
- */
5140
- bencode.byteLength = bencode.encodingLength = encodingLength_1;
5141
- }(lib));
5142
-
5143
- var bencode = lib.exports;
5144
-
5145
4726
  const _hoisted_1$d = { class: "" };
5146
4727
  var script$d = /*#__PURE__*/ vue.defineComponent({
5147
4728
  props: {
@@ -5154,7 +4735,7 @@ var script$d = /*#__PURE__*/ vue.defineComponent({
5154
4735
  * объекта.
5155
4736
  * */
5156
4737
  const parsedConfig = vue.computed(() => props.config.map(elem => {
5157
- return Object.assign(Object.assign({}, elem), { hash: bencode.encode(elem).toString() });
4738
+ return Object.assign(Object.assign({}, elem), { hash: hash__default["default"](elem).toString() });
5158
4739
  }));
5159
4740
  vue.reactive({
5160
4741
  activeRow: null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.311",
3
+ "version": "1.0.312",
4
4
  "description": "----",
5
5
  "author": "",
6
6
  "scripts": {