devexpress-utils
Advanced tools
Comparing version 1.0.1-alpha-001 to 1.0.1-alpha-002
/*! | ||
* DevExpress Utils (dx.utils) | ||
* Version: 1.0.1-alpha-001 | ||
* Build date: Mon Aug 31 2020 | ||
* Version: 1.0.1-alpha-002 | ||
* Build date: Thu Sep 03 2020 | ||
* | ||
@@ -93,3 +93,3 @@ * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -99,20 +99,2 @@ /************************************************************************/ | ||
/* 0 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(1); | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(2); | ||
tslib_1.__exportStar(__webpack_require__(3), exports); | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -375,2 +357,159 @@ | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SesElem = exports.ONP = exports.SesType = void 0; | ||
var SesType; | ||
(function (SesType) { | ||
SesType[SesType["Delete"] = -1] = "Delete"; | ||
SesType[SesType["Common"] = 0] = "Common"; | ||
SesType[SesType["Add"] = 1] = "Add"; | ||
})(SesType = exports.SesType || (exports.SesType = {})); | ||
var ONP = (function () { | ||
function ONP(a, b) { | ||
this.editDistance = null; | ||
this.lcs = ''; | ||
this.ses = []; | ||
this.path = []; | ||
this.pathposi = []; | ||
this.a = a; | ||
this.b = b; | ||
this.m = this.a.length; | ||
this.n = this.b.length; | ||
this.reverse = this.m > this.n; | ||
if (this.reverse) { | ||
var tmpA = this.a; | ||
this.a = this.b; | ||
this.b = tmpA; | ||
var tmpM = this.m; | ||
this.m = this.n; | ||
this.n = tmpM; | ||
} | ||
this.offset = this.m + 1; | ||
this.comparer = this.a.getComparer(); | ||
} | ||
ONP.prototype.calculate = function () { | ||
var size = this.m + this.n + 3; | ||
var fp = {}; | ||
for (var i = 0; i < size; ++i) { | ||
fp[i] = -1; | ||
this.path[i] = -1; | ||
} | ||
var delta = this.n - this.m; | ||
var p = -1; | ||
do { | ||
++p; | ||
for (var k = -p; k <= delta - 1; ++k) | ||
fp[k + this.offset] = this.snake(k, fp[k - 1 + this.offset] + 1, fp[k + 1 + this.offset]); | ||
for (var k = delta + p; k >= delta + 1; --k) | ||
fp[k + this.offset] = this.snake(k, fp[k - 1 + this.offset] + 1, fp[k + 1 + this.offset]); | ||
fp[delta + this.offset] = this.snake(delta, fp[delta - 1 + this.offset] + 1, fp[delta + 1 + this.offset]); | ||
} while (fp[delta + this.offset] !== this.n); | ||
this.editDistance = delta + 2 * p; | ||
var r = this.path[delta + this.offset]; | ||
var epc = []; | ||
while (r !== -1) { | ||
var pos = this.pathposi[r]; | ||
epc.push(new PathElem(pos.x, pos.y, null)); | ||
r = pos.k; | ||
} | ||
this.recordSeq(epc); | ||
return this.ses; | ||
}; | ||
ONP.prototype.toString = function () { | ||
var result = []; | ||
for (var _i = 0, _a = this.ses; _i < _a.length; _i++) { | ||
var elem = _a[_i]; | ||
result.push(elem.toString()); | ||
} | ||
return result.join('\n'); | ||
}; | ||
ONP.prototype.snake = function (k, p, pp) { | ||
var r = p > pp ? | ||
this.path[k - 1 + this.offset] : | ||
this.path[k + 1 + this.offset]; | ||
var y = Math.max(p, pp); | ||
var x = y - k; | ||
while (x < this.m && y < this.n && this.comparer(this.a.getByIndex(x), this.b.getByIndex(y))) { | ||
++x; | ||
++y; | ||
} | ||
var len = this.pathposi.push(new PathElem(x, y, r)); | ||
this.path[k + this.offset] = len - 1; | ||
return y; | ||
}; | ||
ONP.prototype.recordSeq = function (epc) { | ||
var px_idx = 0; | ||
var py_idx = 0; | ||
var addTag = this.reverse ? SesType.Delete : SesType.Add; | ||
var deleteTag = this.reverse ? SesType.Add : SesType.Delete; | ||
for (var i = epc.length - 1; i >= 0; --i) { | ||
var currEpc = epc[i]; | ||
while (px_idx < currEpc.x || py_idx < currEpc.y) { | ||
var yxDiff = currEpc.y - currEpc.x; | ||
var pypxDiff = py_idx - px_idx; | ||
if (yxDiff > pypxDiff) { | ||
this.ses.push(new SesElem(this.b.getByIndex(py_idx), addTag)); | ||
++py_idx; | ||
} | ||
else if (yxDiff < pypxDiff) { | ||
this.ses.push(new SesElem(this.a.getByIndex(px_idx), deleteTag)); | ||
++px_idx; | ||
} | ||
else { | ||
this.ses.push(new SesElem(this.a.getByIndex(px_idx), SesType.Common)); | ||
this.lcs += this.a[px_idx]; | ||
++px_idx; | ||
++py_idx; | ||
} | ||
} | ||
} | ||
}; | ||
return ONP; | ||
}()); | ||
exports.ONP = ONP; | ||
var PathElem = (function () { | ||
function PathElem(x, y, k) { | ||
this.x = x; | ||
this.y = y; | ||
this.k = k; | ||
} | ||
return PathElem; | ||
}()); | ||
var SesElem = (function () { | ||
function SesElem(elem, type) { | ||
this.elem = elem; | ||
this.type = type; | ||
} | ||
SesElem.prototype.toString = function () { | ||
var sign; | ||
switch (this.type) { | ||
case SesType.Add: | ||
sign = '+'; | ||
break; | ||
case SesType.Delete: | ||
sign = '-'; | ||
break; | ||
case SesType.Common: | ||
sign = ' '; | ||
break; | ||
} | ||
return sign + this.elem.toString(); | ||
}; | ||
return SesElem; | ||
}()); | ||
exports.SesElem = SesElem; | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(3); | ||
/***/ }), | ||
/* 3 */ | ||
@@ -381,2 +520,292 @@ /***/ (function(module, exports, __webpack_require__) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = __webpack_require__(0); | ||
tslib_1.__exportStar(__webpack_require__(1), exports); | ||
tslib_1.__exportStar(__webpack_require__(4), exports); | ||
tslib_1.__exportStar(__webpack_require__(5), exports); | ||
tslib_1.__exportStar(__webpack_require__(6), exports); | ||
tslib_1.__exportStar(__webpack_require__(7), exports); | ||
tslib_1.__exportStar(__webpack_require__(8), exports); | ||
tslib_1.__exportStar(__webpack_require__(9), exports); | ||
tslib_1.__exportStar(__webpack_require__(10), exports); | ||
tslib_1.__exportStar(__webpack_require__(11), exports); | ||
tslib_1.__exportStar(__webpack_require__(12), exports); | ||
/***/ }), | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StringOnpItertor = void 0; | ||
var StringOnpItertor = (function () { | ||
function StringOnpItertor(str) { | ||
this.str = str; | ||
} | ||
Object.defineProperty(StringOnpItertor.prototype, "length", { | ||
get: function () { | ||
return this.str.length; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
StringOnpItertor.prototype.getComparer = function () { | ||
return function (a, b) { return a === b; }; | ||
}; | ||
StringOnpItertor.prototype.getByIndex = function (index) { | ||
return this.str[index]; | ||
}; | ||
return StringOnpItertor; | ||
}()); | ||
exports.StringOnpItertor = StringOnpItertor; | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StringSesElem = exports.StringONP = void 0; | ||
var common_1 = __webpack_require__(1); | ||
var StringONP = (function () { | ||
function StringONP(a, b) { | ||
this.editDistance = null; | ||
this.lcs = ''; | ||
this.ses = []; | ||
this.path = []; | ||
this.pathposi = []; | ||
this.a = a; | ||
this.b = b; | ||
this.m = this.a.length; | ||
this.n = this.b.length; | ||
this.reverse = this.m > this.n; | ||
if (this.reverse) { | ||
var tmpA = this.a; | ||
this.a = this.b; | ||
this.b = tmpA; | ||
var tmpM = this.m; | ||
this.m = this.n; | ||
this.n = tmpM; | ||
} | ||
this.offset = this.m + 1; | ||
} | ||
StringONP.prototype.calculate = function () { | ||
var size = this.m + this.n + 3; | ||
var fp = {}; | ||
for (var i = 0; i < size; ++i) { | ||
fp[i] = -1; | ||
this.path[i] = -1; | ||
} | ||
var delta = this.n - this.m; | ||
var p = -1; | ||
do { | ||
++p; | ||
for (var k = -p; k <= delta - 1; ++k) | ||
fp[k + this.offset] = this.snake(k, fp[k - 1 + this.offset] + 1, fp[k + 1 + this.offset]); | ||
for (var k = delta + p; k >= delta + 1; --k) | ||
fp[k + this.offset] = this.snake(k, fp[k - 1 + this.offset] + 1, fp[k + 1 + this.offset]); | ||
fp[delta + this.offset] = this.snake(delta, fp[delta - 1 + this.offset] + 1, fp[delta + 1 + this.offset]); | ||
} while (fp[delta + this.offset] !== this.n); | ||
this.editDistance = delta + 2 * p; | ||
var r = this.path[delta + this.offset]; | ||
var epc = []; | ||
while (r !== -1) { | ||
var pos = this.pathposi[r]; | ||
epc.push(new PathElem(pos.x, pos.y, null)); | ||
r = pos.k; | ||
} | ||
this.recordSeq(epc); | ||
return this.ses; | ||
}; | ||
StringONP.prototype.toString = function () { | ||
var result = []; | ||
for (var _i = 0, _a = this.ses; _i < _a.length; _i++) { | ||
var elem = _a[_i]; | ||
result.push(elem.toString()); | ||
} | ||
return result.join('\n'); | ||
}; | ||
StringONP.prototype.snake = function (k, p, pp) { | ||
var r = p > pp ? | ||
this.path[k - 1 + this.offset] : | ||
this.path[k + 1 + this.offset]; | ||
var y = Math.max(p, pp); | ||
var x = y - k; | ||
while (x < this.m && y < this.n && this.a[x] === this.b[y]) { | ||
++x; | ||
++y; | ||
} | ||
var len = this.pathposi.push(new PathElem(x, y, r)); | ||
this.path[k + this.offset] = len - 1; | ||
return y; | ||
}; | ||
StringONP.prototype.recordSeq = function (epc) { | ||
var px_idx = 0; | ||
var py_idx = 0; | ||
var addTag = this.reverse ? common_1.SesType.Delete : common_1.SesType.Add; | ||
var deleteTag = this.reverse ? common_1.SesType.Add : common_1.SesType.Delete; | ||
for (var i = epc.length - 1; i >= 0; --i) { | ||
var currEpc = epc[i]; | ||
while (px_idx < currEpc.x || py_idx < currEpc.y) { | ||
var yxDiff = currEpc.y - currEpc.x; | ||
var pypxDiff = py_idx - px_idx; | ||
if (yxDiff > pypxDiff) { | ||
this.ses.push(new StringSesElem(this.b[py_idx], addTag)); | ||
++py_idx; | ||
} | ||
else if (yxDiff < pypxDiff) { | ||
this.ses.push(new StringSesElem(this.a[px_idx], deleteTag)); | ||
++px_idx; | ||
} | ||
else { | ||
this.ses.push(new StringSesElem(this.a[px_idx], common_1.SesType.Common)); | ||
this.lcs += this.a[px_idx]; | ||
++px_idx; | ||
++py_idx; | ||
} | ||
} | ||
} | ||
}; | ||
return StringONP; | ||
}()); | ||
exports.StringONP = StringONP; | ||
var PathElem = (function () { | ||
function PathElem(x, y, k) { | ||
this.x = x; | ||
this.y = y; | ||
this.k = k; | ||
} | ||
return PathElem; | ||
}()); | ||
var StringSesElem = (function () { | ||
function StringSesElem(elem, type) { | ||
this.elem = elem; | ||
this.type = type; | ||
} | ||
StringSesElem.prototype.toString = function () { | ||
var sign; | ||
switch (this.type) { | ||
case common_1.SesType.Add: | ||
sign = '+'; | ||
break; | ||
case common_1.SesType.Delete: | ||
sign = '-'; | ||
break; | ||
case common_1.SesType.Common: | ||
sign = ' '; | ||
break; | ||
} | ||
return sign + this.elem; | ||
}; | ||
return StringSesElem; | ||
}()); | ||
exports.StringSesElem = StringSesElem; | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StringUtils = void 0; | ||
var StringUtils = (function () { | ||
function StringUtils() { | ||
} | ||
StringUtils.stringCompare = function (a, b) { | ||
return ((a === b) ? 0 : ((a > b) ? 1 : -1)); | ||
}; | ||
StringUtils.stringHashCode = function (str) { | ||
var hash = 0; | ||
if (str.length === 0) | ||
return hash; | ||
var strLen = str.length; | ||
for (var i = 0; i < strLen; i++) { | ||
hash = ((hash << 5) - hash) + str.charCodeAt(i); | ||
hash |= 0; | ||
} | ||
return hash; | ||
}; | ||
StringUtils.endsAt = function (str, template) { | ||
var strInd = str.length - 1; | ||
var tmplInd = template.length - 1; | ||
var strStartInd = strInd - tmplInd; | ||
if (strStartInd < 0) | ||
return false; | ||
for (; strInd >= strStartInd; strInd--, tmplInd--) { | ||
if (str[strInd] !== template[tmplInd]) | ||
return false; | ||
} | ||
return true; | ||
}; | ||
StringUtils.startsAt = function (str, template) { | ||
return str.substr(0, template.length) === template; | ||
}; | ||
StringUtils.stringInLowerCase = function (str) { | ||
return str.toLowerCase() === str; | ||
}; | ||
StringUtils.stringInUpperCase = function (str) { | ||
return str.toUpperCase() === str; | ||
}; | ||
StringUtils.inStringAtLeastOneSymbolInUpperCase = function (str) { | ||
for (var i = 0, char = void 0; char = str[i]; i++) { | ||
if (StringUtils.stringInUpperCase(char) && !StringUtils.stringInLowerCase(char)) | ||
return true; | ||
} | ||
return false; | ||
}; | ||
StringUtils.getSymbolFromEnd = function (text, posFromEnd) { | ||
return text[text.length - posFromEnd]; | ||
}; | ||
StringUtils.stringTrim = function (str, trimChars) { | ||
if (trimChars === void 0) { trimChars = ['\\s']; } | ||
var joinedChars = trimChars.join(''); | ||
return str.replace(new RegExp("(^[" + joinedChars + "]*)|([" + joinedChars + "]*$)", 'g'), ''); | ||
}; | ||
StringUtils.stringTrimStart = function (str, trimChars) { | ||
if (trimChars === void 0) { trimChars = ['\\s']; } | ||
var joinedChars = trimChars.join(''); | ||
return str.replace(new RegExp("^[" + joinedChars + "]*", 'g'), ''); | ||
}; | ||
StringUtils.stringTrimEnd = function (str, trimChars) { | ||
if (trimChars === void 0) { trimChars = ['\\s']; } | ||
var joinedChars = trimChars.join(''); | ||
return str.replace(new RegExp("[" + joinedChars + "]*$", 'g'), ''); | ||
}; | ||
StringUtils.getDecimalSeparator = function () { | ||
return (1.1).toLocaleString().substr(1, 1); | ||
}; | ||
StringUtils.strCompare = function (a, b, ignoreCase) { | ||
if (ignoreCase === void 0) { ignoreCase = false; } | ||
if (ignoreCase) { | ||
a = a.toLowerCase(); | ||
b = b.toLowerCase(); | ||
} | ||
return ((a === b) ? 0 : ((a > b) ? 1 : -1)); | ||
}; | ||
StringUtils.repeat = function (str, count) { | ||
return new Array(count <= 0 ? 0 : count + 1).join(str); | ||
}; | ||
StringUtils.isNullOrEmpty = function (str) { | ||
return !str || !str.length; | ||
}; | ||
StringUtils.padLeft = function (str, totalWidth, paddingChar) { | ||
return StringUtils.repeat(paddingChar, Math.max(0, totalWidth - str.length)) + str; | ||
}; | ||
return StringUtils; | ||
}()); | ||
exports.StringUtils = StringUtils; | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var _a; | ||
@@ -467,3 +896,300 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
/***/ }), | ||
/* 8 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChunkedText = void 0; | ||
var ChunkedText = (function () { | ||
function ChunkedText(text, maxChunkSize) { | ||
if (maxChunkSize === void 0) { maxChunkSize = 2000; } | ||
this.maxChunkSize = maxChunkSize; | ||
this.chunks = []; | ||
this._textLength = 0; | ||
this.pushText(text); | ||
this.resetToStart(); | ||
} | ||
Object.defineProperty(ChunkedText.prototype, "currChar", { | ||
get: function () { | ||
return this.chunk[this.posInChunk]; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ChunkedText.prototype, "currPos", { | ||
get: function () { | ||
return this._currPos; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ChunkedText.prototype, "textLength", { | ||
get: function () { | ||
return this._textLength; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
ChunkedText.prototype.resetToStart = function () { | ||
this.setChunk(0); | ||
this.posInChunk = -1; | ||
this._currPos = -1; | ||
}; | ||
ChunkedText.prototype.resetToEnd = function () { | ||
this.setChunk(this.chunks.length - 1); | ||
this.posInChunk = this.chunkLength - 1; | ||
this._currPos = this._textLength; | ||
}; | ||
ChunkedText.prototype.addText = function (text) { | ||
this.pushText(text); | ||
if (this._currPos === -1) { | ||
this.chunk = this.chunks[0]; | ||
this.chunkLength = this.chunk.length; | ||
} | ||
else | ||
this.setPositionTo(this._currPos); | ||
}; | ||
ChunkedText.prototype.getText = function () { | ||
return this.chunks.join(''); | ||
}; | ||
ChunkedText.prototype.moveToNextChar = function () { | ||
this.posInChunk++; | ||
this._currPos++; | ||
if (this.posInChunk < this.chunkLength) | ||
return true; | ||
if (this.setChunk(this.chunkIndex + 1)) { | ||
this.posInChunk = 0; | ||
return true; | ||
} | ||
else { | ||
this.posInChunk = this.chunkLength; | ||
this._currPos = this._textLength; | ||
return false; | ||
} | ||
}; | ||
ChunkedText.prototype.moveToPrevChar = function () { | ||
this.posInChunk--; | ||
this._currPos--; | ||
if (this.posInChunk >= 0) | ||
return true; | ||
if (this.setChunk(this.chunkIndex - 1)) { | ||
this.posInChunk = this.chunkLength - 1; | ||
return true; | ||
} | ||
else { | ||
this.posInChunk = -1; | ||
this._currPos = -1; | ||
return false; | ||
} | ||
}; | ||
ChunkedText.prototype.setPositionTo = function (position) { | ||
var restLength = position; | ||
this.chunkIndex = 0; | ||
for (var ind = 0; true; ind++) { | ||
if (this.setChunk(ind)) { | ||
if (restLength > this.chunkLength) | ||
restLength -= this.chunk.length; | ||
else { | ||
this.posInChunk = restLength; | ||
this._currPos = position; | ||
return; | ||
} | ||
} | ||
else { | ||
this.posInChunk = this.chunkLength; | ||
this._currPos = this._textLength; | ||
return; | ||
} | ||
} | ||
}; | ||
ChunkedText.prototype.setChunk = function (index) { | ||
var prevChunkVal = this.chunk; | ||
this.chunk = this.chunks[index]; | ||
if (!this.chunk) { | ||
this.chunk = prevChunkVal; | ||
return false; | ||
} | ||
this.chunkIndex = index; | ||
this.chunkLength = this.chunk.length; | ||
return true; | ||
}; | ||
ChunkedText.prototype.pushText = function (text) { | ||
if (!text.length) | ||
return; | ||
var textPos = 0; | ||
while (textPos < text.length) { | ||
if (textPos === 0) { | ||
var lastChunk = this.chunks.pop(); | ||
if (lastChunk) { | ||
if (lastChunk.length < this.maxChunkSize) { | ||
var restLen = this.maxChunkSize - lastChunk.length; | ||
this.chunks.push(lastChunk + text.substr(textPos, restLen)); | ||
textPos += restLen; | ||
continue; | ||
} | ||
else | ||
this.chunks.push(lastChunk); | ||
} | ||
} | ||
this.chunks.push(text.substr(textPos, this.maxChunkSize)); | ||
textPos += this.maxChunkSize; | ||
} | ||
this._textLength += text.length; | ||
}; | ||
return ChunkedText; | ||
}()); | ||
exports.ChunkedText = ChunkedText; | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Int32Constants = exports.Constants = void 0; | ||
var Constants = (function () { | ||
function Constants() { | ||
} | ||
Constants.MIN_SAFE_INTEGER = -(Math.pow(2, 53) - 1); | ||
Constants.MAX_SAFE_INTEGER = (Math.pow(2, 53) - 1); | ||
Constants.MAX_BYTE = Math.pow(2, 8) - 1; | ||
return Constants; | ||
}()); | ||
exports.Constants = Constants; | ||
var Int32Constants = (function () { | ||
function Int32Constants() { | ||
} | ||
Int32Constants.MIN_VALUE = -2147483648; | ||
Int32Constants.MAX_VALUE = 2147483647; | ||
return Int32Constants; | ||
}()); | ||
exports.Int32Constants = Int32Constants; | ||
/***/ }), | ||
/* 10 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Flag = void 0; | ||
var Flag = (function () { | ||
function Flag(initValue) { | ||
if (initValue === void 0) { initValue = 0; } | ||
this.value = initValue; | ||
} | ||
Flag.prototype.get = function (enumVal) { | ||
return (this.value & enumVal) === enumVal; | ||
}; | ||
Flag.prototype.set = function (enumVal, newValue) { | ||
var currVal = (this.value & enumVal) === enumVal; | ||
if (currVal !== newValue) { | ||
if (newValue) | ||
this.value |= enumVal; | ||
else | ||
this.value ^= enumVal; | ||
} | ||
return this; | ||
}; | ||
Flag.prototype.add = function (value) { | ||
this.value |= value; | ||
}; | ||
Flag.prototype.anyOf = function () { | ||
var flags = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
flags[_i] = arguments[_i]; | ||
} | ||
for (var _a = 0, flags_1 = flags; _a < flags_1.length; _a++) { | ||
var flag = flags_1[_a]; | ||
if ((this.value & flag) === flag) | ||
return true; | ||
} | ||
return false; | ||
}; | ||
Flag.prototype.getValue = function () { | ||
return this.value; | ||
}; | ||
Flag.prototype.clone = function () { | ||
return new Flag(this.value); | ||
}; | ||
return Flag; | ||
}()); | ||
exports.Flag = Flag; | ||
/***/ }), | ||
/* 11 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExtendedMinMax = exports.ExtendedMax = exports.ExtendedMin = exports.MinMaxNumber = exports.MinMax = void 0; | ||
var tslib_1 = __webpack_require__(0); | ||
var MinMax = (function () { | ||
function MinMax(min, max) { | ||
this.min = min; | ||
this.max = max; | ||
} | ||
return MinMax; | ||
}()); | ||
exports.MinMax = MinMax; | ||
var MinMaxNumber = (function (_super) { | ||
tslib_1.__extends(MinMaxNumber, _super); | ||
function MinMaxNumber() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
Object.defineProperty(MinMaxNumber.prototype, "length", { | ||
get: function () { | ||
return this.max - this.min; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return MinMaxNumber; | ||
}(MinMax)); | ||
exports.MinMaxNumber = MinMaxNumber; | ||
var ExtendedMin = (function () { | ||
function ExtendedMin(minElement, minValue) { | ||
this.minElement = minElement; | ||
this.minValue = minValue; | ||
} | ||
return ExtendedMin; | ||
}()); | ||
exports.ExtendedMin = ExtendedMin; | ||
var ExtendedMax = (function () { | ||
function ExtendedMax(maxElement, maxValue) { | ||
this.maxElement = maxElement; | ||
this.maxValue = maxValue; | ||
} | ||
return ExtendedMax; | ||
}()); | ||
exports.ExtendedMax = ExtendedMax; | ||
var ExtendedMinMax = (function () { | ||
function ExtendedMinMax(minElement, minValue, maxElement, maxValue) { | ||
this.minElement = minElement; | ||
this.minValue = minValue; | ||
this.maxElement = maxElement; | ||
this.maxValue = maxValue; | ||
} | ||
return ExtendedMinMax; | ||
}()); | ||
exports.ExtendedMinMax = ExtendedMinMax; | ||
/***/ }), | ||
/* 12 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/***/ }) | ||
/******/ ]); |
/*! | ||
* DevExpress Utils (dx.utils.min) | ||
* Version: 1.0.1-alpha-001 | ||
* Build date: Mon Aug 31 2020 | ||
* Version: 1.0.1-alpha-002 | ||
* Build date: Thu Sep 03 2020 | ||
* | ||
@@ -9,3 +9,3 @@ * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED | ||
*/ | ||
var DevExpress="object"==typeof DevExpress?DevExpress:{};DevExpress.WebUtils=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2).__exportStar(n(3),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return c})),n.d(t,"__metadata",(function(){return f})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return p})),n.d(t,"__createBinding",(function(){return s})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return y})),n.d(t,"__read",(function(){return m})),n.d(t,"__spread",(function(){return v})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return _})),n.d(t,"__asyncGenerator",(function(){return h})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return g})),n.d(t,"__importStar",(function(){return x})),n.d(t,"__importDefault",(function(){return T})),n.d(t,"__classPrivateFieldGet",(function(){return j})),n.d(t,"__classPrivateFieldSet",(function(){return S})); | ||
var DevExpress="object"==typeof DevExpress?DevExpress:{};DevExpress.WebUtils=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return s})),n.d(e,"__decorate",(function(){return u})),n.d(e,"__param",(function(){return a})),n.d(e,"__metadata",(function(){return h})),n.d(e,"__awaiter",(function(){return f})),n.d(e,"__generator",(function(){return c})),n.d(e,"__createBinding",(function(){return p})),n.d(e,"__exportStar",(function(){return l})),n.d(e,"__values",(function(){return d})),n.d(e,"__read",(function(){return y})),n.d(e,"__spread",(function(){return v})),n.d(e,"__spreadArrays",(function(){return m})),n.d(e,"__await",(function(){return g})),n.d(e,"__asyncGenerator",(function(){return _})),n.d(e,"__asyncDelegator",(function(){return b})),n.d(e,"__asyncValues",(function(){return x})),n.d(e,"__makeTemplateObject",(function(){return S})),n.d(e,"__importStar",(function(){return k})),n.d(e,"__importDefault",(function(){return O})),n.d(e,"__classPrivateFieldGet",(function(){return P})),n.d(e,"__classPrivateFieldSet",(function(){return T})); | ||
/*! ***************************************************************************** | ||
@@ -25,2 +25,2 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var s=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function d(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function h(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof _?Promise.resolve(n.value.v).then(c,f):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function c(e){u("next",e)}function f(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return P(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function j(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Base64Utils=t.DocmMimeType=t.PlainTextMimeType=t.RtfMimeType=t.OpenXmlMimeType=t.Base64MimeType=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.OpenXml=1]="OpenXml",e[e.Rtf=2]="Rtf",e[e.PlainText=3]="PlainText",e[e.Docm=4]="Docm"}(o=t.Base64MimeType||(t.Base64MimeType={})),t.OpenXmlMimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document",t.RtfMimeType="application/rtf",t.PlainTextMimeType="text/plain",t.DocmMimeType="application/vnd.ms-word.document.macroEnabled.12";var i=function(){function e(){}return e.normalizeToDataUrl=function(t,n){return e.checkPrependDataUrl(t)||(t=e.prependByDataUrl(t,n)),t},e.prependByDataUrl=function(e,t){return void 0===t&&(t="image/png"),"data:"+t+";base64,"+e},e.checkPrependDataUrl=function(t){return e.dataUrl.test(t)},e.deleteDataUrlPrefix=function(t){return t.replace(e.dataUrl,"")},e.getUint8Array=function(e){for(var t=(e=atob(e)).length,n=new Uint8Array(t);t--;)n[t]=e.charCodeAt(t);return n},e.fromArrayBuffer=function(e){for(var t=[],n=new Uint8Array(e),r=n.byteLength,o=0;o<r;o++)t.push(String.fromCharCode(n[o]));return window.btoa(t.join(""))},e.getFileFromBase64=function(t,n){void 0===n&&(n={type:"text"});var r=e.getUint8Array(t);return new Blob([r],n)},e.getMimeTypeAsString=function(t){var n=t.match(e.dataUrl);return n?n[1]:null},e.getKnownMimeType=function(t){var n,r=t.match(e.dataUrl);return r&&null!==(n=e.mimeTypesMap[r[1]])&&void 0!==n?n:o.Unknown},e.fromBlobAsArrayBuffer=function(t,n){var r=new FileReader;r.onloadend=function(){return n(e.fromArrayBuffer(r.result))},r.readAsArrayBuffer(t)},e.fromBlobAsDataUrl=function(e,t){var n=new FileReader;n.onloadend=function(){return t(n.result)},n.readAsDataURL(e)},e.mimeTypesMap=((r={})[t.OpenXmlMimeType]=o.OpenXml,r[t.RtfMimeType]=o.Rtf,r[t.PlainTextMimeType]=o.PlainText,r[t.DocmMimeType]=o.Docm,r),e.dataUrl=/^data:(.*?)(;(.*?))??(;base64)?,/,e}();t.Base64Utils=i}]); | ||
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function u(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){return function(n,r){e(n,r,t)}}function h(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{a(r.next(t))}catch(t){o(t)}}function u(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var p=Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]};function l(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||p(e,t,n)}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}function m(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r}function g(t){return this instanceof g?(this.v=t,this):new g(t)}function _(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||u(t,e)}))})}function u(t,e){try{(n=i[t](e)).value instanceof g?Promise.resolve(n.value.v).then(a,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function a(t){u("next",t)}function h(t){u("throw",t)}function f(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function b(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:g(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var w=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function k(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&p(e,t,n);return w(e,t),e}function O(t){return t&&t.__esModule?t:{default:t}}function P(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function T(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.SesElem=e.ONP=e.SesType=void 0,function(t){t[t.Delete=-1]="Delete",t[t.Common=0]="Common",t[t.Add=1]="Add"}(r=e.SesType||(e.SesType={}));var i=function(){function t(t,e){if(this.editDistance=null,this.lcs="",this.ses=[],this.path=[],this.pathposi=[],this.a=t,this.b=e,this.m=this.a.length,this.n=this.b.length,this.reverse=this.m>this.n,this.reverse){var n=this.a;this.a=this.b,this.b=n;var r=this.m;this.m=this.n,this.n=r}this.offset=this.m+1,this.comparer=this.a.getComparer()}return t.prototype.calculate=function(){for(var t=this.m+this.n+3,e={},n=0;n<t;++n)e[n]=-1,this.path[n]=-1;var r=this.n-this.m,i=-1;do{for(var s=-++i;s<=r-1;++s)e[s+this.offset]=this.snake(s,e[s-1+this.offset]+1,e[s+1+this.offset]);for(s=r+i;s>=r+1;--s)e[s+this.offset]=this.snake(s,e[s-1+this.offset]+1,e[s+1+this.offset]);e[r+this.offset]=this.snake(r,e[r-1+this.offset]+1,e[r+1+this.offset])}while(e[r+this.offset]!==this.n);this.editDistance=r+2*i;for(var u=this.path[r+this.offset],a=[];-1!==u;){var h=this.pathposi[u];a.push(new o(h.x,h.y,null)),u=h.k}return this.recordSeq(a),this.ses},t.prototype.toString=function(){for(var t=[],e=0,n=this.ses;e<n.length;e++){var r=n[e];t.push(r.toString())}return t.join("\n")},t.prototype.snake=function(t,e,n){for(var r=e>n?this.path[t-1+this.offset]:this.path[t+1+this.offset],i=Math.max(e,n),s=i-t;s<this.m&&i<this.n&&this.comparer(this.a.getByIndex(s),this.b.getByIndex(i));)++s,++i;var u=this.pathposi.push(new o(s,i,r));return this.path[t+this.offset]=u-1,i},t.prototype.recordSeq=function(t){for(var e=0,n=0,i=this.reverse?r.Delete:r.Add,o=this.reverse?r.Add:r.Delete,u=t.length-1;u>=0;--u)for(var a=t[u];e<a.x||n<a.y;){var h=a.y-a.x,f=n-e;h>f?(this.ses.push(new s(this.b.getByIndex(n),i)),++n):h<f?(this.ses.push(new s(this.a.getByIndex(e),o)),++e):(this.ses.push(new s(this.a.getByIndex(e),r.Common)),this.lcs+=this.a[e],++e,++n)}},t}();e.ONP=i;var o=function(t,e,n){this.x=t,this.y=e,this.k=n},s=function(){function t(t,e){this.elem=t,this.type=e}return t.prototype.toString=function(){var t;switch(this.type){case r.Add:t="+";break;case r.Delete:t="-";break;case r.Common:t=" "}return t+this.elem.toString()},t}();e.SesElem=s},function(t,e,n){t.exports=n(3)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(1),e),r.__exportStar(n(4),e),r.__exportStar(n(5),e),r.__exportStar(n(6),e),r.__exportStar(n(7),e),r.__exportStar(n(8),e),r.__exportStar(n(9),e),r.__exportStar(n(10),e),r.__exportStar(n(11),e),r.__exportStar(n(12),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringOnpItertor=void 0;var r=function(){function t(t){this.str=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.str.length},enumerable:!1,configurable:!0}),t.prototype.getComparer=function(){return function(t,e){return t===e}},t.prototype.getByIndex=function(t){return this.str[t]},t}();e.StringOnpItertor=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSesElem=e.StringONP=void 0;var r=n(1),i=function(){function t(t,e){if(this.editDistance=null,this.lcs="",this.ses=[],this.path=[],this.pathposi=[],this.a=t,this.b=e,this.m=this.a.length,this.n=this.b.length,this.reverse=this.m>this.n,this.reverse){var n=this.a;this.a=this.b,this.b=n;var r=this.m;this.m=this.n,this.n=r}this.offset=this.m+1}return t.prototype.calculate=function(){for(var t=this.m+this.n+3,e={},n=0;n<t;++n)e[n]=-1,this.path[n]=-1;var r=this.n-this.m,i=-1;do{for(var s=-++i;s<=r-1;++s)e[s+this.offset]=this.snake(s,e[s-1+this.offset]+1,e[s+1+this.offset]);for(s=r+i;s>=r+1;--s)e[s+this.offset]=this.snake(s,e[s-1+this.offset]+1,e[s+1+this.offset]);e[r+this.offset]=this.snake(r,e[r-1+this.offset]+1,e[r+1+this.offset])}while(e[r+this.offset]!==this.n);this.editDistance=r+2*i;for(var u=this.path[r+this.offset],a=[];-1!==u;){var h=this.pathposi[u];a.push(new o(h.x,h.y,null)),u=h.k}return this.recordSeq(a),this.ses},t.prototype.toString=function(){for(var t=[],e=0,n=this.ses;e<n.length;e++){var r=n[e];t.push(r.toString())}return t.join("\n")},t.prototype.snake=function(t,e,n){for(var r=e>n?this.path[t-1+this.offset]:this.path[t+1+this.offset],i=Math.max(e,n),s=i-t;s<this.m&&i<this.n&&this.a[s]===this.b[i];)++s,++i;var u=this.pathposi.push(new o(s,i,r));return this.path[t+this.offset]=u-1,i},t.prototype.recordSeq=function(t){for(var e=0,n=0,i=this.reverse?r.SesType.Delete:r.SesType.Add,o=this.reverse?r.SesType.Add:r.SesType.Delete,u=t.length-1;u>=0;--u)for(var a=t[u];e<a.x||n<a.y;){var h=a.y-a.x,f=n-e;h>f?(this.ses.push(new s(this.b[n],i)),++n):h<f?(this.ses.push(new s(this.a[e],o)),++e):(this.ses.push(new s(this.a[e],r.SesType.Common)),this.lcs+=this.a[e],++e,++n)}},t}();e.StringONP=i;var o=function(t,e,n){this.x=t,this.y=e,this.k=n},s=function(){function t(t,e){this.elem=t,this.type=e}return t.prototype.toString=function(){var t;switch(this.type){case r.SesType.Add:t="+";break;case r.SesType.Delete:t="-";break;case r.SesType.Common:t=" "}return t+this.elem},t}();e.StringSesElem=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtils=void 0;var r=function(){function t(){}return t.stringCompare=function(t,e){return t===e?0:t>e?1:-1},t.stringHashCode=function(t){var e=0;if(0===t.length)return e;for(var n=t.length,r=0;r<n;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return e},t.endsAt=function(t,e){var n=t.length-1,r=e.length-1,i=n-r;if(i<0)return!1;for(;n>=i;n--,r--)if(t[n]!==e[r])return!1;return!0},t.startsAt=function(t,e){return t.substr(0,e.length)===e},t.stringInLowerCase=function(t){return t.toLowerCase()===t},t.stringInUpperCase=function(t){return t.toUpperCase()===t},t.inStringAtLeastOneSymbolInUpperCase=function(e){for(var n=0,r=void 0;r=e[n];n++)if(t.stringInUpperCase(r)&&!t.stringInLowerCase(r))return!0;return!1},t.getSymbolFromEnd=function(t,e){return t[t.length-e]},t.stringTrim=function(t,e){void 0===e&&(e=["\\s"]);var n=e.join("");return t.replace(new RegExp("(^["+n+"]*)|(["+n+"]*$)","g"),"")},t.stringTrimStart=function(t,e){void 0===e&&(e=["\\s"]);var n=e.join("");return t.replace(new RegExp("^["+n+"]*","g"),"")},t.stringTrimEnd=function(t,e){void 0===e&&(e=["\\s"]);var n=e.join("");return t.replace(new RegExp("["+n+"]*$","g"),"")},t.getDecimalSeparator=function(){return 1.1.toLocaleString().substr(1,1)},t.strCompare=function(t,e,n){return void 0===n&&(n=!1),n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:t>e?1:-1},t.repeat=function(t,e){return new Array(e<=0?0:e+1).join(t)},t.isNullOrEmpty=function(t){return!t||!t.length},t.padLeft=function(e,n,r){return t.repeat(r,Math.max(0,n-e.length))+e},t}();e.StringUtils=r},function(t,e,n){"use strict";var r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.Base64Utils=e.DocmMimeType=e.PlainTextMimeType=e.RtfMimeType=e.OpenXmlMimeType=e.Base64MimeType=void 0,function(t){t[t.Unknown=0]="Unknown",t[t.OpenXml=1]="OpenXml",t[t.Rtf=2]="Rtf",t[t.PlainText=3]="PlainText",t[t.Docm=4]="Docm"}(i=e.Base64MimeType||(e.Base64MimeType={})),e.OpenXmlMimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.RtfMimeType="application/rtf",e.PlainTextMimeType="text/plain",e.DocmMimeType="application/vnd.ms-word.document.macroEnabled.12";var o=function(){function t(){}return t.normalizeToDataUrl=function(e,n){return t.checkPrependDataUrl(e)||(e=t.prependByDataUrl(e,n)),e},t.prependByDataUrl=function(t,e){return void 0===e&&(e="image/png"),"data:"+e+";base64,"+t},t.checkPrependDataUrl=function(e){return t.dataUrl.test(e)},t.deleteDataUrlPrefix=function(e){return e.replace(t.dataUrl,"")},t.getUint8Array=function(t){for(var e=(t=atob(t)).length,n=new Uint8Array(e);e--;)n[e]=t.charCodeAt(e);return n},t.fromArrayBuffer=function(t){for(var e=[],n=new Uint8Array(t),r=n.byteLength,i=0;i<r;i++)e.push(String.fromCharCode(n[i]));return window.btoa(e.join(""))},t.getFileFromBase64=function(e,n){void 0===n&&(n={type:"text"});var r=t.getUint8Array(e);return new Blob([r],n)},t.getMimeTypeAsString=function(e){var n=e.match(t.dataUrl);return n?n[1]:null},t.getKnownMimeType=function(e){var n,r=e.match(t.dataUrl);return r&&null!==(n=t.mimeTypesMap[r[1]])&&void 0!==n?n:i.Unknown},t.fromBlobAsArrayBuffer=function(e,n){var r=new FileReader;r.onloadend=function(){return n(t.fromArrayBuffer(r.result))},r.readAsArrayBuffer(e)},t.fromBlobAsDataUrl=function(t,e){var n=new FileReader;n.onloadend=function(){return e(n.result)},n.readAsDataURL(t)},t.mimeTypesMap=((r={})[e.OpenXmlMimeType]=i.OpenXml,r[e.RtfMimeType]=i.Rtf,r[e.PlainTextMimeType]=i.PlainText,r[e.DocmMimeType]=i.Docm,r),t.dataUrl=/^data:(.*?)(;(.*?))??(;base64)?,/,t}();e.Base64Utils=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChunkedText=void 0;var r=function(){function t(t,e){void 0===e&&(e=2e3),this.maxChunkSize=e,this.chunks=[],this._textLength=0,this.pushText(t),this.resetToStart()}return Object.defineProperty(t.prototype,"currChar",{get:function(){return this.chunk[this.posInChunk]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currPos",{get:function(){return this._currPos},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textLength",{get:function(){return this._textLength},enumerable:!1,configurable:!0}),t.prototype.resetToStart=function(){this.setChunk(0),this.posInChunk=-1,this._currPos=-1},t.prototype.resetToEnd=function(){this.setChunk(this.chunks.length-1),this.posInChunk=this.chunkLength-1,this._currPos=this._textLength},t.prototype.addText=function(t){this.pushText(t),-1===this._currPos?(this.chunk=this.chunks[0],this.chunkLength=this.chunk.length):this.setPositionTo(this._currPos)},t.prototype.getText=function(){return this.chunks.join("")},t.prototype.moveToNextChar=function(){return this.posInChunk++,this._currPos++,this.posInChunk<this.chunkLength||(this.setChunk(this.chunkIndex+1)?(this.posInChunk=0,!0):(this.posInChunk=this.chunkLength,this._currPos=this._textLength,!1))},t.prototype.moveToPrevChar=function(){return this.posInChunk--,this._currPos--,this.posInChunk>=0||(this.setChunk(this.chunkIndex-1)?(this.posInChunk=this.chunkLength-1,!0):(this.posInChunk=-1,this._currPos=-1,!1))},t.prototype.setPositionTo=function(t){var e=t;this.chunkIndex=0;for(var n=0;;n++){if(!this.setChunk(n))return this.posInChunk=this.chunkLength,void(this._currPos=this._textLength);if(!(e>this.chunkLength))return this.posInChunk=e,void(this._currPos=t);e-=this.chunk.length}},t.prototype.setChunk=function(t){var e=this.chunk;return this.chunk=this.chunks[t],this.chunk?(this.chunkIndex=t,this.chunkLength=this.chunk.length,!0):(this.chunk=e,!1)},t.prototype.pushText=function(t){if(t.length){for(var e=0;e<t.length;){if(0===e){var n=this.chunks.pop();if(n){if(n.length<this.maxChunkSize){var r=this.maxChunkSize-n.length;this.chunks.push(n+t.substr(e,r)),e+=r;continue}this.chunks.push(n)}}this.chunks.push(t.substr(e,this.maxChunkSize)),e+=this.maxChunkSize}this._textLength+=t.length}},t}();e.ChunkedText=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Int32Constants=e.Constants=void 0;var r=function(){function t(){}return t.MIN_SAFE_INTEGER=-(Math.pow(2,53)-1),t.MAX_SAFE_INTEGER=Math.pow(2,53)-1,t.MAX_BYTE=Math.pow(2,8)-1,t}();e.Constants=r;var i=function(){function t(){}return t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,t}();e.Int32Constants=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Flag=void 0;var r=function(){function t(t){void 0===t&&(t=0),this.value=t}return t.prototype.get=function(t){return(this.value&t)===t},t.prototype.set=function(t,e){return(this.value&t)===t!==e&&(e?this.value|=t:this.value^=t),this},t.prototype.add=function(t){this.value|=t},t.prototype.anyOf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=t;n<r.length;n++){var i=r[n];if((this.value&i)===i)return!0}return!1},t.prototype.getValue=function(){return this.value},t.prototype.clone=function(){return new t(this.value)},t}();e.Flag=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedMinMax=e.ExtendedMax=e.ExtendedMin=e.MinMaxNumber=e.MinMax=void 0;var r=n(0),i=function(t,e){this.min=t,this.max=e};e.MinMax=i;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),Object.defineProperty(e.prototype,"length",{get:function(){return this.max-this.min},enumerable:!1,configurable:!0}),e}(i);e.MinMaxNumber=o;var s=function(t,e){this.minElement=t,this.minValue=e};e.ExtendedMin=s;var u=function(t,e){this.maxElement=t,this.maxValue=e};e.ExtendedMax=u;var a=function(t,e,n,r){this.minElement=t,this.minValue=e,this.maxElement=n,this.maxValue=r};e.ExtendedMinMax=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}]); |
@@ -32,3 +32,3 @@ "use strict"; | ||
var flag = flags_1[_a]; | ||
if (this.value & flag) | ||
if ((this.value & flag) === flag) | ||
return true; | ||
@@ -35,0 +35,0 @@ } |
@@ -1,6 +0,2 @@ | ||
export declare enum SesType { | ||
Delete = -1, | ||
Common = 0, | ||
Add = 1 | ||
} | ||
import { SesType } from './common'; | ||
export declare class StringONP { | ||
@@ -7,0 +3,0 @@ editDistance: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StringSesElem = exports.StringONP = exports.SesType = void 0; | ||
var SesType; | ||
(function (SesType) { | ||
SesType[SesType["Delete"] = -1] = "Delete"; | ||
SesType[SesType["Common"] = 0] = "Common"; | ||
SesType[SesType["Add"] = 1] = "Add"; | ||
})(SesType = exports.SesType || (exports.SesType = {})); | ||
exports.StringSesElem = exports.StringONP = void 0; | ||
var common_1 = require("./common"); | ||
var StringONP = (function () { | ||
@@ -85,4 +80,4 @@ function StringONP(a, b) { | ||
var py_idx = 0; | ||
var addTag = this.reverse ? SesType.Delete : SesType.Add; | ||
var deleteTag = this.reverse ? SesType.Add : SesType.Delete; | ||
var addTag = this.reverse ? common_1.SesType.Delete : common_1.SesType.Add; | ||
var deleteTag = this.reverse ? common_1.SesType.Add : common_1.SesType.Delete; | ||
for (var i = epc.length - 1; i >= 0; --i) { | ||
@@ -102,3 +97,3 @@ var currEpc = epc[i]; | ||
else { | ||
this.ses.push(new StringSesElem(this.a[px_idx], SesType.Common)); | ||
this.ses.push(new StringSesElem(this.a[px_idx], common_1.SesType.Common)); | ||
this.lcs += this.a[px_idx]; | ||
@@ -130,9 +125,9 @@ ++px_idx; | ||
switch (this.type) { | ||
case SesType.Add: | ||
case common_1.SesType.Add: | ||
sign = '+'; | ||
break; | ||
case SesType.Delete: | ||
case common_1.SesType.Delete: | ||
sign = '-'; | ||
break; | ||
case SesType.Common: | ||
case common_1.SesType.Common: | ||
sign = ' '; | ||
@@ -139,0 +134,0 @@ break; |
{ | ||
"name": "devexpress-utils", | ||
"version": "1.0.1-alpha-001", | ||
"version": "1.0.1-alpha-002", | ||
"description": "DevExpress utils", | ||
@@ -5,0 +5,0 @@ "author": "DevExpress Inc.", |
@@ -10,3 +10,3 @@ ## About | ||
```shell | ||
npm install devexpress-diagram | ||
npm install devexpress-utils | ||
``` | ||
@@ -13,0 +13,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102074
2090