@evergis/condition
Advanced tools
Comparing version 1.2.93 to 1.2.94
@@ -26,5 +26,2 @@ 'use strict'; | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
@@ -63,5 +60,2 @@ } | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -165,4 +159,2 @@ } | ||
return call; | ||
} else if (call !== void 0) { | ||
throw new TypeError("Derived constructors may only return object or undefined"); | ||
} | ||
@@ -201,3 +193,3 @@ | ||
function _get() { | ||
function _get(target, property, receiver) { | ||
if (typeof Reflect !== "undefined" && Reflect.get) { | ||
@@ -213,3 +205,3 @@ _get = Reflect.get; | ||
if (desc.get) { | ||
return desc.get.call(arguments.length < 3 ? target : receiver); | ||
return desc.get.call(receiver); | ||
} | ||
@@ -221,3 +213,3 @@ | ||
return _get.apply(this, arguments); | ||
return _get(target, property, receiver || target); | ||
} | ||
@@ -224,0 +216,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("date-fns");function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){var t=p();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function y(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}function k(){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=y(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}(e=exports.TokenType||(exports.TokenType={}))[e.Number=0]="Number",e[e.Identifier=1]="Identifier",e[e.DynamicIdentifier=2]="DynamicIdentifier",e[e.String=3]="String",e[e.Date=4]="Date",e[e.TimeSpan=5]="TimeSpan",e[e.Terminal=6]="Terminal",e[e.EndOfString=7]="EndOfString",e[e.Null=8]="Null",e[e.ArIn=9]="ArIn",e[e.ArEq=10]="ArEq",e[e.ArNotEq=11]="ArNotEq",e[e.ArGr=12]="ArGr",e[e.ArGre=13]="ArGre",e[e.ArLs=14]="ArLs",e[e.ArLse=15]="ArLse",e[e.BoolNot=16]="BoolNot",e[e.BoolAnd=17]="BoolAnd",e[e.BoolOr=18]="BoolOr",e[e.ArPlus=19]="ArPlus",e[e.ArMinus=20]="ArMinus",e[e.ArMul=21]="ArMul",e[e.ArDiv=22]="ArDiv",e[e.ExprOpen=23]="ExprOpen",e[e.ExprClose=24]="ExprClose",e[e.ArrayOpen=25]="ArrayOpen",e[e.ArrayClose=26]="ArrayClose",e[e.Separator=27]="Separator",e[e.Function=28]="Function",e[e.Between=29]="Between",e[e.Outside=30]="Outside",e[e.Param=31]="Param";const T={start:0,end:0};let v=o((function e(t,r,o){void 0===o&&(o=T),n(this,e),this.type=t,this.value=r,this.position=o})),x=function(){function e(t,r,o){void 0===r&&(r=null),void 0===o&&(o=null),n(this,e),this.token=t,this.left=r,this.right=o}return o(e,[{key:"accept",value:function(e){return e.visit(this)}}]),e}(),d=function(e){s(r,x);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();d.TOKENS=[exports.TokenType.String,exports.TokenType.Number,exports.TokenType.DynamicIdentifier,exports.TokenType.Date,exports.TokenType.Param];let E=function(e){s(r,x);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();E.TOKENS=[exports.TokenType.Identifier];let g=function(e){s(r,x);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();g.TOKENS=[exports.TokenType.ArEq,exports.TokenType.ArNotEq,exports.TokenType.ArGr,exports.TokenType.ArGre,exports.TokenType.ArLs,exports.TokenType.ArLse,exports.TokenType.ArPlus,exports.TokenType.ArMinus,exports.TokenType.ArDiv,exports.TokenType.ArMul,exports.TokenType.Between,exports.TokenType.Outside];let O=function(e){s(r,x);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();O.TOKENS=[exports.TokenType.BoolAnd,exports.TokenType.BoolOr];let A=function(e){s(r,x);var t=f(r);function r(e,o,i,s){var u;return void 0===i&&(i=null),void 0===s&&(s=null),n(this,r),(u=t.call(this,e,i,s)).func=o,u}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();A.TOKENS=[exports.TokenType.Function];const N=new Map;N.set(exports.TokenType.ExprOpen,0),N.set(exports.TokenType.ExprClose,0),N.set(exports.TokenType.BoolAnd,1),N.set(exports.TokenType.BoolOr,1),N.set(exports.TokenType.ArEq,2),N.set(exports.TokenType.ArNotEq,2),N.set(exports.TokenType.ArGr,2),N.set(exports.TokenType.ArGre,2),N.set(exports.TokenType.ArLs,2),N.set(exports.TokenType.ArLse,2),N.set(exports.TokenType.ArPlus,3),N.set(exports.TokenType.ArMinus,3),N.set(exports.TokenType.ArMul,4),N.set(exports.TokenType.ArDiv,4),N.set(exports.TokenType.Function,5),N.set(exports.TokenType.Between,5),N.set(exports.TokenType.Outside,5);let b=function(e){s(r,l(Error));var t=f(r);function r(e,o){var i;void 0===o&&(o=T),n(this,r),(i=t.call(this)).position=o;const{start:s,end:u}=o;return i.message=i.name+"(cимвол: "+(s+1)+", "+(u+1)+"):"+e+".",i}return o(r)}(),m=function(e){s(r,b);var t=f(r);function r(e,o){var i;return void 0===o&&(o=T),n(this,r),(i=t.call(this,e,o)).position=o,i.name="LintError",i}return o(r)}();const S=e=>e[e.length-1],w=e=>d.is(e)||E.is(e),B=e=>g.is(e)||O.is(e)||A.is(e);let C=function(e){s(r,b);var t=f(r);function r(e,o){var i;return void 0===o&&(o=T),n(this,r),(i=t.call(this,e,o)).position=o,i.name="ExpressionAst",i}return o(r)}(),P=function(){function e(t,r,o){void 0===o&&(o=[]),n(this,e),this.acceptMap=new Map,this.value=t,this.tokenType=r,o.map(e=>this.acceptMap.set(e.value,e))}return o(e,[{key:"accept",value:function(e){return this.acceptMap.get(e)||null}}]),e}(),M=function(){function e(){n(this,e)}return o(e,null,[{key:"isChar",value:function(e){return"string"==typeof e&&1===e.length}},{key:"isDigit",value:function(e){return this.isChar(e)&&/\d/.test(e)}},{key:"isLetter",value:function(e){return this.isChar(e)&&/\w/.test(e)}},{key:"isWhiteSpace",value:function(t){return this.isChar(t)&&t===e.WHITE_SPACE}},{key:"isLetterOrDigit",value:function(t){return e.isLetter(t)||e.isDigit(t)}},{key:"isUnderscore",value:function(t){return e.isChar(t)&&t===e.UNDERSCORE}},{key:"isFloating",value:function(t){return e.isChar(t)&&("f"===t||"F"===t)}},{key:"escapeSpecChars",value:function(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"').replace(/\t/g,"\\\\t").replace(/\v/g,"\\\\v").replace(/\0/g,"\\\\0").replace(/\f/g,"\\\\f").replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r")}},{key:"unEscapeSpecChars",value:function(e){return e.replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\\/g,"\\").replace(/\\\\t/g,"\t").replace(/\\\\v/g,"\v").replace(/\\\\0/g,"\0").replace(/\\\\f/g,"\f").replace(/\\\\n/g,"\n").replace(/\\\\r/g,"\r")}}]),e}();function L(e){return!!e&&"[object Object]"===Object.prototype.toString.call(e)}M.LEFT_BRACKET="{",M.OPEN_BRACKET="(",M.BETWEEN="between",M.OUTSIDE="!between",M.SINGLE_QUOTE="'",M.DOUBLE_QUOTE='"',M.HASH_SYMBOL="#",M.RIGHT_BRACKET="}",M.CLOSE_BRACKET=")",M.BACK_SLASH="\\",M.WHITE_SPACE=" ",M.UNDERSCORE="_",M.PERCENTAGE="%",M.POINT=".",M.AT_SIGN="@";let D=o((function e(){n(this,e)}));D.sToMs=e=>1e3*e,D.mToMs=e=>60*D.sToMs(e),D.hToMs=e=>60*D.mToMs(e),D.dToMs=e=>24*D.hToMs(e),D.mthToMs=e=>30*D.dToMs(e),D.yToMs=e=>365*D.mthToMs(e);const F=new P("",exports.TokenType.Null,[new P(M.BETWEEN,exports.TokenType.Between),new P(M.OUTSIDE,exports.TokenType.Outside),new P(">",exports.TokenType.ArGr,[new P("=",exports.TokenType.ArGre)]),new P("<",exports.TokenType.ArLs,[new P("=",exports.TokenType.ArLse)]),new P("!",exports.TokenType.BoolNot,[new P("=",exports.TokenType.ArNotEq)]),new P("&",exports.TokenType.Null,[new P("&",exports.TokenType.BoolAnd)]),new P("=",exports.TokenType.ArEq,[new P("=",exports.TokenType.ArEq)]),new P("|",exports.TokenType.Null,[new P("|",exports.TokenType.BoolOr)]),new P("+",exports.TokenType.ArPlus),new P("-",exports.TokenType.ArMinus),new P("*",exports.TokenType.ArMul),new P("/",exports.TokenType.ArDiv),new P("(",exports.TokenType.ExprOpen),new P(")",exports.TokenType.ExprClose),new P("[",exports.TokenType.ArrayOpen),new P("]",exports.TokenType.ArrayClose),new P(",",exports.TokenType.Separator)]);let I=function(e){s(r,b);var t=f(r);function r(e,o){var i;return void 0===o&&(o=T),n(this,r),(i=t.call(this,e,o)).position=o,i.name="ExpressionTokenizer",i}return o(r)}(),_=function(){function e(t,r){n(this,e),this.start=0,this.currentPosition=0,this.tokens=[],this.tokenizerMaxSize=1e3,this.input=t||"",this.tokenizerMaxSize=r||1e3}return o(e,[{key:"tokenize",value:function(){if(this.isEndOfString())return this.tokens;for(;;){const e=this.nextToken();if(!e)break;if(this.tokens.push(e),this.tokens.length>this.tokenizerMaxSize&&this.Error("Превышен лимит запроса: "+this.tokenizerMaxSize),e.type===exports.TokenType.EndOfString)break}return this.tokens}},{key:"nextToken",value:function(){for(;this.currentPosition<this.input.length;this.nextSymbol()){if(M.isWhiteSpace(this.current))continue;if(this.resetStart(),this.input.slice(this.currentPosition).startsWith(M.OUTSIDE))return this.currentPosition+=M.OUTSIDE.length,this.createToken(exports.TokenType.Outside,M.OUTSIDE);if(this.input.slice(this.currentPosition).startsWith(M.BETWEEN))return this.currentPosition+=M.BETWEEN.length,this.createToken(exports.TokenType.Between,M.BETWEEN);const e=F.accept(this.current);if(null!==e)return this.captureSpecial(e);if(M.isDigit(this.current)||this.current===M.POINT)return this.captureNumber();if(M.isLetter(this.current)||M.isUnderscore(this.current))return this.captureIdentifier();if(this.current===M.LEFT_BRACKET)return this.captureDynamicIdentifier();if(this.current===M.DOUBLE_QUOTE||this.current===M.SINGLE_QUOTE)return this.captureString();if(this.current===M.HASH_SYMBOL)return this.captureDate();if(this.current===M.AT_SIGN)return this.captureParam()}return this.resetStart(),this.createToken(exports.TokenType.EndOfString)}},{key:"resetStart",value:function(){this.start=this.currentPosition}},{key:"createToken",value:function(e,t){void 0===t&&(t=null);const n=this.currentPosition-(e===exports.TokenType.EndOfString?0:1);return new v(e,t,{start:this.start,end:n})}},{key:"nextSymbol",value:function(){this.currentPosition+=1}},{key:"current",get:function(){return this.input[this.currentPosition]}},{key:"captureSpecial",value:function(e){let t=this.current;for(this.nextSymbol();this.currentPosition<this.input.length;this.nextSymbol()){const n=e.accept(this.current);if(null===n||n.tokenType===exports.TokenType.Null)break;t+=this.current,e=n}return this.current&&M.isDigit(this.current)&&e.tokenType===exports.TokenType.ArMinus?this.createToken(exports.TokenType.Number,-(this.captureNumber().value||0)):(e.tokenType===exports.TokenType.Null&&this.Error("Неизвеcтная операция '"+e.value+"'"),this.createToken(e.tokenType,t))}},{key:"captureNumber",value:function(){let e="",t=!1;for(;this.currentPosition<this.input.length&&!M.isWhiteSpace(this.current)&&(M.isDigit(this.current)||M.isFloating(this.current)||this.current===M.POINT);this.nextSymbol())this.current===M.POINT&&(t=!0),e+=this.current;t&&M.isFloating(e[e.length-1])&&(e=e.slice(0,-1));const n=parseFloat(e);return Number.isNaN(n)&&this.Error("Неверный числовой формат: "+e),this.createToken(exports.TokenType.Number,n)}},{key:"captureIdentifier",value:function(){let e="";for(;this.currentPosition<this.input.length&&(M.isLetterOrDigit(this.current)||M.isUnderscore(this.current));this.nextSymbol())e+=this.current;if(this.current===M.OPEN_BRACKET){const t=this.tokens.some(e=>e.type===exports.TokenType.Between),n=this.tokens.some(e=>e.type===exports.TokenType.Outside);return this.createToken(n?exports.TokenType.Outside:t?exports.TokenType.Between:exports.TokenType.Function,e)}return"true"===e||"True"===e||"TRUE"===e?this.createToken(exports.TokenType.Terminal,!0):"false"===e||"False"===e||"FALSE"===e?this.createToken(exports.TokenType.Terminal,!1):"in"===e||"IN"===e?this.createToken(exports.TokenType.ArIn):this.createToken(exports.TokenType.Identifier,e)}},{key:"captureDynamicIdentifier",value:function(){this.nextSymbol();let e="";for(;this.currentPosition<this.input.length;this.nextSymbol()){if(this.current===M.RIGHT_BRACKET){this.nextSymbol();break}e+=this.current}return this.createToken(exports.TokenType.DynamicIdentifier,"null"===e||"Null"===e||"NULL"===e?null:e)}},{key:"captureString",value:function(){let e="",t=!1;const n=this.current;for(this.nextSymbol();this.currentPosition<this.input.length;this.nextSymbol())if(t||this.current!==M.BACK_SLASH){if(!t&&this.current===n)return this.nextSymbol(),this.createToken(exports.TokenType.String,e);e+=this.current,t=!1}else t=!0;this.Error("Открытая строка")}},{key:"captureDate",value:function(){if(this.nextSymbol(),![M.SINGLE_QUOTE,M.DOUBLE_QUOTE,M.BACK_SLASH].includes(this.current))return this.captureTimeSpan();const e=this.captureString();return this.createToken(exports.TokenType.Date,e.value)}},{key:"captureParam",value:function(){this.nextSymbol();let e="";for(;M.isLetter(this.current)||M.isDigit(this.current);)e+=this.current,this.nextSymbol();if(!new RegExp(/^(?!p[\d]+$|[\d\_])[\w\d\_]{2,}$/,"gi").test(e))throw new m("Неверное наименование параметра: '"+e+"'");return this.createToken(exports.TokenType.Param,"@"+e)}},{key:"captureTimeSpan",value:function(){let e="";for(;this.currentPosition<this.input.length&&M.isDigit(this.current);this.nextSymbol())e+=this.current;const t=parseFloat(e);Number.isNaN(t)&&this.Error("Неверный формат числа для значения timespan: "+e+". Должно быть положительным целочисленным значением."),M.isLetter(this.current)||this.Error("Для значения задана неверная единица измерения "+this.current);let n="";for(;M.isLetter(this.current);)n+=this.current,this.nextSymbol();let r=0;switch(n){case"ms":r=t;break;case"s":r=D.sToMs(t);break;case"m":r=D.mToMs(t);break;case"h":r=D.hToMs(t);break;case"d":r=D.dToMs(t);break;case"mth":r=D.mthToMs(t);break;case"y":r=D.yToMs(t);break;default:this.Error("Неверная единица измерения для timespan: "+n)}return this.createToken(exports.TokenType.TimeSpan,r)}},{key:"isEndOfString",value:function(){return this.tokens.length>0&&this.tokens[this.tokens.length-1].type===exports.TokenType.EndOfString}},{key:"Error",value:function(e){throw new I(e,{start:this.start,end:this.start})}}]),e}(),R=function(){function e(){n(this,e)}return o(e,[{key:"visit",value:function(e){return e instanceof O?this.visitBoolOpNode(e):e instanceof g?this.visitOpNode(e):e instanceof d?this.visitValueNode(e):e instanceof E?this.visitAttributeNode(e):e instanceof A?this.visitFunctionNode(e):void 0}},{key:"visitBoolOpNode",value:function(e){}},{key:"visitOpNode",value:function(e){}},{key:"visitValueNode",value:function(e){}},{key:"visitAttributeNode",value:function(e){}},{key:"visitFunctionNode",value:function(e){}}]),e}(),U=function(e){s(r,R);var t=f(r);function r(e){var o;return n(this,r),(o=t.call(this)).attributes=e,o}return o(r,[{key:"visitBoolOpNode",value:function(e){k(u(r.prototype),"visitBoolOpNode",this).call(this,e),this.checkBoolOpNode(e),this.acceptLeafs(e)}},{key:"visitOpNode",value:function(e){k(u(r.prototype),"visitOpNode",this).call(this,e),this.checkOpNode(e),this.acceptLeafs(e)}},{key:"visitValueNode",value:function(e){k(u(r.prototype),"visitValueNode",this).call(this,e),this.checkLeafNode(e)}},{key:"visitAttributeNode",value:function(e){k(u(r.prototype),"visitAttributeNode",this).call(this,e),this.checkLeafNode(e),this.checkAttributeNode(e)}},{key:"visitFunctionNode",value:function(e){k(u(r.prototype),"visitFunctionNode",this).call(this,e),this.checkLeafNode(e),this.checkFunctionNode(e)}},{key:"checkBoolOpNode",value:function(e){const t="Ожидается выражение вида 'a == 2 "+e.token.value+" b == 3'";this.isOperationNode(e.left)||this.Error(t,e.token),this.isOperationNode(e.right)||this.Error(t,e.token)}},{key:"checkOpNode",value:function(e){e.left&&e.right||this.Error("'"+e.token.value+"' ожидает выражение",e.token)}},{key:"checkLeafNode",value:function(e){if(e.left){const{token:t}=e.left;this.Error("'"+t.value+"' не может использоваться вне выражения",t)}if(e.right){const{token:t}=e.right;this.Error("'"+t.value+"' не может использоваться вне выражения",t)}}},{key:"checkAttributeNode",value:function(e){e.token.value&&void 0!==this.attributes[e.token.value]||this.Error("Атрибут '"+e.token.value+"' не найден в атрибутах слоя",e.token)}},{key:"checkFunctionNode",value:function(e){const t=e.func.check(this.attributes);t instanceof Error&&this.Error(t.message,e.token)}},{key:"Error",value:function(e,t){const{position:n}=t;throw new m(e,n)}},{key:"acceptLeafs",value:function(e){return{x:e.left&&e.left.accept(this),y:e.right&&e.right.accept(this)}}},{key:"isOperationNode",value:function(e){return e instanceof O||e instanceof g}}]),r}(),K=function(e){s(r,U);var t=f(r);function r(e,o){var i;return n(this,r),(i=t.call(this,e)).attributes=e,i.silent=!(!o||!o.silent),i}return o(r,[{key:"visitBoolOpNode",value:function(e){this.silent||k(u(r.prototype),"visitBoolOpNode",this).call(this,e);const{x:t,y:n}=this.acceptLeafs(e);return e.token.type===exports.TokenType.BoolAnd?t&&n:t||n}},{key:"visitOpNode",value:function(e){this.silent||k(u(r.prototype),"visitOpNode",this).call(this,e);const{x:t,y:n}=this.acceptLeafs(e);switch(e.token.type){case exports.TokenType.ArEq:return t===n;case exports.TokenType.ArNotEq:return t!==n;case exports.TokenType.ArGre:return t>=n;case exports.TokenType.ArLse:return t<=n;case exports.TokenType.ArGr:return t>n;case exports.TokenType.ArLs:return t<n;case exports.TokenType.ArPlus:return t+n;case exports.TokenType.ArMinus:return t-n;case exports.TokenType.ArMul:return t*n;case exports.TokenType.ArDiv:return t/n;default:return!1}}},{key:"visitValueNode",value:function(e){return this.silent||k(u(r.prototype),"visitValueNode",this).call(this,e),e.token.value}},{key:"visitAttributeNode",value:function(e){return this.silent||k(u(r.prototype),"visitAttributeNode",this).call(this,e),this.attributes[e.token.value]}},{key:"visitFunctionNode",value:function(e){return this.silent||k(u(r.prototype),"visitFunctionNode",this).call(this,e),e.func.calc(this.attributes)}}]),r}(),j=function(){function e(t){n(this,e),this.args=t}return o(e,[{key:"calc",value:function(e){return 0}},{key:"evaluateArguments",value:function(e){return this.args.map(t=>{if(t instanceof g)return t.accept(new K(e));if("string"==typeof t.value){if("number"!=typeof e[t.value]){const{position:e}=t;throw new m("Аргумент функции должен быть числовым типом",e)}return e[t.value]}return t.value})}},{key:"check",value:function(e,t){return this.evaluateArguments(e).length!==t?new Error("Передано неверное количество аргументов"):null}}]),e}(),G=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.sin(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();G.ArgsCount=1,G.Name="sin";let q=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.asin(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();q.ArgsCount=1,q.Name="arcsin";let z=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.cos(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();z.ArgsCount=1,z.Name="cos";let V=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.acos(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();V.ArgsCount=1,V.Name="arccos";let W=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t,n]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.atan2(t,n).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();W.ArgsCount=2,W.Name="arctan2";let H=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.tan(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();H.ArgsCount=1,H.Name="tan";let Q=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.atan(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();Q.ArgsCount=1,Q.Name="arctan";let Y=function(e){s(r,j);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.sqrt(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();Y.ArgsCount=1,Y.Name="sqrt";const $={[G.Name]:G,[q.Name]:q,[z.Name]:z,[V.Name]:V,[H.Name]:H,[Q.Name]:Q,[W.Name]:W,[Y.Name]:Y},J=e=>t.isValid(e)?e:"#'"+e+"'";let X=function(){function e(t){n(this,e),this.tokens=t,this.tree=null,this.currentPosition=0}return o(e,[{key:"value",get:function(){if(this.tree)return this.tree;this.tokens=function(e){let t=[];const n=[];for(const i of e){if(w(i)&&t.push(i),B(i)){if(![exports.TokenType.Between,exports.TokenType.Outside].includes(i.type))for(;S(n)&&(r=S(n),o=i,N.get(r.type)>N.get(o.type))&&S(n).type!==exports.TokenType.ExprOpen;)t.push(n.pop());n.push(i)}if(i.type===exports.TokenType.ExprOpen&&n.push(i),i.type===exports.TokenType.ExprClose){const e=i;for(;S(n)&&S(n).type!==exports.TokenType.ExprOpen;)t.push(n.pop());if(0===n.length)throw new m("Пропущена открывающая скобка",e.position);S(n).type===exports.TokenType.ExprOpen&&n.pop()}}var r,o;if(n.length){const e=S(n);if(e.type===exports.TokenType.ExprOpen)throw new m("Пропущена закрывающая скобка",e.position);t=[...t,...n.reverse()]}return t}(this.tokens);const e=[];for(;this.currentPosition<this.tokens.length;this.nextToken()){if(d.is(this.currentToken)&&e.push(new d(this.currentToken)),E.is(this.currentToken)&&e.push(new E(this.currentToken)),A.is(this.currentToken)){const t=$[this.currentToken.value];t||this.Error("Функция '"+this.currentToken.value+"' не определена",this.currentToken);const n=[];for(let r=0;r<t.ArgsCount;r++){const t=e.pop()||null;t instanceof g?n.push(t):t&&t.token&&n.push(t.token)}const r=new t(n);e.push(new A(this.currentToken,r))}if(g.is(this.currentToken)){const r=new g(this.currentToken);if([exports.TokenType.Between,exports.TokenType.Outside].includes(this.currentToken.type)){var t,n;const o=e.pop()||null,s=e.pop()||null;r.left=e.pop()||null,r.right=new d(i({},this.currentToken,{value:J(null==s?void 0:s.token.value)+" - "+J(null==o?void 0:o.token.value),position:{start:(null==s||null==(t=s.token.position)?void 0:t.start)||0,end:(null==o||null==(n=o.token.position)?void 0:n.end)||0}}))}else e.length>1&&(r.right=e.pop()||null),r.left=e.pop()||null;e.push(r)}if(O.is(this.currentToken)){const t=new O(this.currentToken);e.length>1&&(t.right=e.pop()||null),t.left=e.pop()||null,e.push(t)}}return this.tree=e.pop()||null,this.flashStack(e),this.checkRoot(),this.tree}},{key:"nextToken",value:function(){this.currentPosition+=1}},{key:"currentToken",get:function(){return this.tokens[this.currentPosition]}},{key:"checkRoot",value:function(){}},{key:"flashStack",value:function(e){if(this.tree&&e.length)for(;e.length;){const t=e.pop();t&&this.insert(this.tree,t)}}},{key:"insert",value:function(e,t){null!==e.right?this.insert(e.right,t):e.right=t}},{key:"Error",value:function(e,t){const{position:n}=t,{start:r,end:o}=n;throw new C(e,{start:r,end:o})}}]),e}(),Z=function(e){s(r,R);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"visitBoolOpNode",value:function(e){k(u(r.prototype),"visitBoolOpNode",this).call(this,e);const t=e.left&&e.left.accept(this),n=e.right&&e.right.accept(this);return e.left instanceof O&&e.right instanceof O?(this.checkBoolOperations(e.token.type,[...t.boolOperations,...n.boolOperations]),{boolOperations:[...t.boolOperations,e.token.type,...n.boolOperations],expressions:[...t.expressions,...n.expressions]}):e.right instanceof O?(this.checkBoolOperations(e.token.type,n.boolOperations),{boolOperations:[e.token.type,...n.boolOperations],expressions:[t,...n.expressions]}):e.left instanceof O?(this.checkBoolOperations(e.token.type,t.boolOperations),{boolOperations:[...t.boolOperations,e.token.type],expressions:[...t.expressions,n]}):{boolOperations:[e.token.type],expressions:[t,n]}}},{key:"visitOpNode",value:function(e){var t;k(u(r.prototype),"visitOpNode",this).call(this,e),this.checkExpressionSimple(e);const n=e.left&&e.left.accept(this),o=e.right&&(null==(t=e.right)?void 0:t.accept(this));return{attribute:n,operation:e.token.type,value:o}}},{key:"visitValueNode",value:function(e){return k(u(r.prototype),"visitValueNode",this).call(this,e),e.token.value}},{key:"visitAttributeNode",value:function(e){return k(u(r.prototype),"visitAttributeNode",this).call(this,e),e.token.value}},{key:"checkBoolOperations",value:function(e,t){if(t.some(t=>t!==e))throw new m("Выражение должно использовать одинаковые булевы операторы")}},{key:"checkExpressionSimple",value:function(e){if(!(e.left instanceof E&&e.right instanceof d||e.right instanceof d))throw new m("Выражение должно быть простым")}}]),r}();const ee=e=>L(e)&&"boolOperations"in e,te=e=>L(e)&&"attribute"in e;let ne=function(){function e(t){n(this,e),this.result=null,this.tokenizer=new _(t)}return o(e,[{key:"value",get:function(){if(this.result)return this.result;try{const e=this.tokenizer.tokenize(),t=new X(e).value,n=t&&t.accept(new Z);return this.result=ee(n)?n:te(n)?{boolOperations:[],expressions:[n]}:{boolOperations:[],expressions:[]},this.result}catch(e){return e}}}]),e}(),re=function(){function e(t){n(this,e),this.attributes=t}return o(e,[{key:"evaluate",value:function(e,t){try{const n=new _(e).tokenize(),r=new X(n).value;return r&&r.accept(new K(this.attributes,t))}catch(e){return e}}}]),e}(),oe=function(){function e(t){n(this,e),this.attributes=t}return o(e,[{key:"lint",value:function(e){try{const t=new _(e).tokenize(),n=new X(t).value;return n&&n.accept(new U(this.attributes)),null}catch(e){return e}}}]),e}();exports.ArcCos=V,exports.ArcSin=q,exports.ArcTan=Q,exports.ArcTan2=W,exports.AttributeNode=E,exports.BoolOperationNode=O,exports.Char=M,exports.ConditionEvaluator=re,exports.ConditionInterpreter=ne,exports.ConditionLinter=oe,exports.ConditionVisitor=Z,exports.Cos=z,exports.DEFAULT_TOKEN_POSITION=T,exports.EqlFunction=j,exports.EqlFunctions=$,exports.EvaluateVisitor=K,exports.ExpressionAst=X,exports.ExpressionAstError=C,exports.ExpressionNode=x,exports.ExpressionTokenizer=_,exports.ExpressionTokenizerError=I,exports.ExpressionVisitor=R,exports.FunctionNode=A,exports.LintError=m,exports.LintVisitor=U,exports.OperationNode=g,exports.Sin=G,exports.Sqrt=Y,exports.Tan=H,exports.Time=D,exports.Token=v,exports.TokenError=b,exports.ValueNode=d,exports.isBoolResult=ee,exports.isExpression=te,exports.isObject=L; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("date-fns");function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function h(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){var t=p();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function k(e,t,n){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}(e=exports.TokenType||(exports.TokenType={}))[e.Number=0]="Number",e[e.Identifier=1]="Identifier",e[e.DynamicIdentifier=2]="DynamicIdentifier",e[e.String=3]="String",e[e.Date=4]="Date",e[e.TimeSpan=5]="TimeSpan",e[e.Terminal=6]="Terminal",e[e.EndOfString=7]="EndOfString",e[e.Null=8]="Null",e[e.ArIn=9]="ArIn",e[e.ArEq=10]="ArEq",e[e.ArNotEq=11]="ArNotEq",e[e.ArGr=12]="ArGr",e[e.ArGre=13]="ArGre",e[e.ArLs=14]="ArLs",e[e.ArLse=15]="ArLse",e[e.BoolNot=16]="BoolNot",e[e.BoolAnd=17]="BoolAnd",e[e.BoolOr=18]="BoolOr",e[e.ArPlus=19]="ArPlus",e[e.ArMinus=20]="ArMinus",e[e.ArMul=21]="ArMul",e[e.ArDiv=22]="ArDiv",e[e.ExprOpen=23]="ExprOpen",e[e.ExprClose=24]="ExprClose",e[e.ArrayOpen=25]="ArrayOpen",e[e.ArrayClose=26]="ArrayClose",e[e.Separator=27]="Separator",e[e.Function=28]="Function",e[e.Between=29]="Between",e[e.Outside=30]="Outside",e[e.Param=31]="Param";const y={start:0,end:0};let T=o((function e(t,r,o){void 0===o&&(o=y),n(this,e),this.type=t,this.value=r,this.position=o})),v=function(){function e(t,r,o){void 0===r&&(r=null),void 0===o&&(o=null),n(this,e),this.token=t,this.left=r,this.right=o}return o(e,[{key:"accept",value:function(e){return e.visit(this)}}]),e}(),x=function(e){s(r,v);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();x.TOKENS=[exports.TokenType.String,exports.TokenType.Number,exports.TokenType.DynamicIdentifier,exports.TokenType.Date,exports.TokenType.Param];let d=function(e){s(r,v);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();d.TOKENS=[exports.TokenType.Identifier];let E=function(e){s(r,v);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();E.TOKENS=[exports.TokenType.ArEq,exports.TokenType.ArNotEq,exports.TokenType.ArGr,exports.TokenType.ArGre,exports.TokenType.ArLs,exports.TokenType.ArLse,exports.TokenType.ArPlus,exports.TokenType.ArMinus,exports.TokenType.ArDiv,exports.TokenType.ArMul,exports.TokenType.Between,exports.TokenType.Outside];let g=function(e){s(r,v);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();g.TOKENS=[exports.TokenType.BoolAnd,exports.TokenType.BoolOr];let A=function(e){s(r,v);var t=f(r);function r(e,o,i,s){var u;return void 0===i&&(i=null),void 0===s&&(s=null),n(this,r),(u=t.call(this,e,i,s)).func=o,u}return o(r,null,[{key:"is",value:function(e){return r.TOKENS.includes(e.type)}}]),r}();A.TOKENS=[exports.TokenType.Function];const O=new Map;O.set(exports.TokenType.ExprOpen,0),O.set(exports.TokenType.ExprClose,0),O.set(exports.TokenType.BoolAnd,1),O.set(exports.TokenType.BoolOr,1),O.set(exports.TokenType.ArEq,2),O.set(exports.TokenType.ArNotEq,2),O.set(exports.TokenType.ArGr,2),O.set(exports.TokenType.ArGre,2),O.set(exports.TokenType.ArLs,2),O.set(exports.TokenType.ArLse,2),O.set(exports.TokenType.ArPlus,3),O.set(exports.TokenType.ArMinus,3),O.set(exports.TokenType.ArMul,4),O.set(exports.TokenType.ArDiv,4),O.set(exports.TokenType.Function,5),O.set(exports.TokenType.Between,5),O.set(exports.TokenType.Outside,5);let N=function(e){s(r,l(Error));var t=f(r);function r(e,o){var i;void 0===o&&(o=y),n(this,r),(i=t.call(this)).position=o;const{start:s,end:u}=o;return i.message=i.name+"(cимвол: "+(s+1)+", "+(u+1)+"):"+e+".",i}return o(r)}(),b=function(e){s(r,N);var t=f(r);function r(e,o){var i;return void 0===o&&(o=y),n(this,r),(i=t.call(this,e,o)).position=o,i.name="LintError",i}return o(r)}();const m=e=>e[e.length-1],S=e=>x.is(e)||d.is(e),w=e=>E.is(e)||g.is(e)||A.is(e);let B=function(e){s(r,N);var t=f(r);function r(e,o){var i;return void 0===o&&(o=y),n(this,r),(i=t.call(this,e,o)).position=o,i.name="ExpressionAst",i}return o(r)}(),C=function(){function e(t,r,o){void 0===o&&(o=[]),n(this,e),this.acceptMap=new Map,this.value=t,this.tokenType=r,o.map(e=>this.acceptMap.set(e.value,e))}return o(e,[{key:"accept",value:function(e){return this.acceptMap.get(e)||null}}]),e}(),M=function(){function e(){n(this,e)}return o(e,null,[{key:"isChar",value:function(e){return"string"==typeof e&&1===e.length}},{key:"isDigit",value:function(e){return this.isChar(e)&&/\d/.test(e)}},{key:"isLetter",value:function(e){return this.isChar(e)&&/\w/.test(e)}},{key:"isWhiteSpace",value:function(t){return this.isChar(t)&&t===e.WHITE_SPACE}},{key:"isLetterOrDigit",value:function(t){return e.isLetter(t)||e.isDigit(t)}},{key:"isUnderscore",value:function(t){return e.isChar(t)&&t===e.UNDERSCORE}},{key:"isFloating",value:function(t){return e.isChar(t)&&("f"===t||"F"===t)}},{key:"escapeSpecChars",value:function(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"').replace(/\t/g,"\\\\t").replace(/\v/g,"\\\\v").replace(/\0/g,"\\\\0").replace(/\f/g,"\\\\f").replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r")}},{key:"unEscapeSpecChars",value:function(e){return e.replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\\/g,"\\").replace(/\\\\t/g,"\t").replace(/\\\\v/g,"\v").replace(/\\\\0/g,"\0").replace(/\\\\f/g,"\f").replace(/\\\\n/g,"\n").replace(/\\\\r/g,"\r")}}]),e}();function P(e){return!!e&&"[object Object]"===Object.prototype.toString.call(e)}M.LEFT_BRACKET="{",M.OPEN_BRACKET="(",M.BETWEEN="between",M.OUTSIDE="!between",M.SINGLE_QUOTE="'",M.DOUBLE_QUOTE='"',M.HASH_SYMBOL="#",M.RIGHT_BRACKET="}",M.CLOSE_BRACKET=")",M.BACK_SLASH="\\",M.WHITE_SPACE=" ",M.UNDERSCORE="_",M.PERCENTAGE="%",M.POINT=".",M.AT_SIGN="@";let L=o((function e(){n(this,e)}));L.sToMs=e=>1e3*e,L.mToMs=e=>60*L.sToMs(e),L.hToMs=e=>60*L.mToMs(e),L.dToMs=e=>24*L.hToMs(e),L.mthToMs=e=>30*L.dToMs(e),L.yToMs=e=>365*L.mthToMs(e);const D=new C("",exports.TokenType.Null,[new C(M.BETWEEN,exports.TokenType.Between),new C(M.OUTSIDE,exports.TokenType.Outside),new C(">",exports.TokenType.ArGr,[new C("=",exports.TokenType.ArGre)]),new C("<",exports.TokenType.ArLs,[new C("=",exports.TokenType.ArLse)]),new C("!",exports.TokenType.BoolNot,[new C("=",exports.TokenType.ArNotEq)]),new C("&",exports.TokenType.Null,[new C("&",exports.TokenType.BoolAnd)]),new C("=",exports.TokenType.ArEq,[new C("=",exports.TokenType.ArEq)]),new C("|",exports.TokenType.Null,[new C("|",exports.TokenType.BoolOr)]),new C("+",exports.TokenType.ArPlus),new C("-",exports.TokenType.ArMinus),new C("*",exports.TokenType.ArMul),new C("/",exports.TokenType.ArDiv),new C("(",exports.TokenType.ExprOpen),new C(")",exports.TokenType.ExprClose),new C("[",exports.TokenType.ArrayOpen),new C("]",exports.TokenType.ArrayClose),new C(",",exports.TokenType.Separator)]);let F=function(e){s(r,N);var t=f(r);function r(e,o){var i;return void 0===o&&(o=y),n(this,r),(i=t.call(this,e,o)).position=o,i.name="ExpressionTokenizer",i}return o(r)}(),I=function(){function e(t,r){n(this,e),this.start=0,this.currentPosition=0,this.tokens=[],this.tokenizerMaxSize=1e3,this.input=t||"",this.tokenizerMaxSize=r||1e3}return o(e,[{key:"tokenize",value:function(){if(this.isEndOfString())return this.tokens;for(;;){const e=this.nextToken();if(!e)break;if(this.tokens.push(e),this.tokens.length>this.tokenizerMaxSize&&this.Error("Превышен лимит запроса: "+this.tokenizerMaxSize),e.type===exports.TokenType.EndOfString)break}return this.tokens}},{key:"nextToken",value:function(){for(;this.currentPosition<this.input.length;this.nextSymbol()){if(M.isWhiteSpace(this.current))continue;if(this.resetStart(),this.input.slice(this.currentPosition).startsWith(M.OUTSIDE))return this.currentPosition+=M.OUTSIDE.length,this.createToken(exports.TokenType.Outside,M.OUTSIDE);if(this.input.slice(this.currentPosition).startsWith(M.BETWEEN))return this.currentPosition+=M.BETWEEN.length,this.createToken(exports.TokenType.Between,M.BETWEEN);const e=D.accept(this.current);if(null!==e)return this.captureSpecial(e);if(M.isDigit(this.current)||this.current===M.POINT)return this.captureNumber();if(M.isLetter(this.current)||M.isUnderscore(this.current))return this.captureIdentifier();if(this.current===M.LEFT_BRACKET)return this.captureDynamicIdentifier();if(this.current===M.DOUBLE_QUOTE||this.current===M.SINGLE_QUOTE)return this.captureString();if(this.current===M.HASH_SYMBOL)return this.captureDate();if(this.current===M.AT_SIGN)return this.captureParam()}return this.resetStart(),this.createToken(exports.TokenType.EndOfString)}},{key:"resetStart",value:function(){this.start=this.currentPosition}},{key:"createToken",value:function(e,t){void 0===t&&(t=null);const n=this.currentPosition-(e===exports.TokenType.EndOfString?0:1);return new T(e,t,{start:this.start,end:n})}},{key:"nextSymbol",value:function(){this.currentPosition+=1}},{key:"current",get:function(){return this.input[this.currentPosition]}},{key:"captureSpecial",value:function(e){let t=this.current;for(this.nextSymbol();this.currentPosition<this.input.length;this.nextSymbol()){const n=e.accept(this.current);if(null===n||n.tokenType===exports.TokenType.Null)break;t+=this.current,e=n}return this.current&&M.isDigit(this.current)&&e.tokenType===exports.TokenType.ArMinus?this.createToken(exports.TokenType.Number,-(this.captureNumber().value||0)):(e.tokenType===exports.TokenType.Null&&this.Error("Неизвеcтная операция '"+e.value+"'"),this.createToken(e.tokenType,t))}},{key:"captureNumber",value:function(){let e="",t=!1;for(;this.currentPosition<this.input.length&&!M.isWhiteSpace(this.current)&&(M.isDigit(this.current)||M.isFloating(this.current)||this.current===M.POINT);this.nextSymbol())this.current===M.POINT&&(t=!0),e+=this.current;t&&M.isFloating(e[e.length-1])&&(e=e.slice(0,-1));const n=parseFloat(e);return Number.isNaN(n)&&this.Error("Неверный числовой формат: "+e),this.createToken(exports.TokenType.Number,n)}},{key:"captureIdentifier",value:function(){let e="";for(;this.currentPosition<this.input.length&&(M.isLetterOrDigit(this.current)||M.isUnderscore(this.current));this.nextSymbol())e+=this.current;if(this.current===M.OPEN_BRACKET){const t=this.tokens.some(e=>e.type===exports.TokenType.Between),n=this.tokens.some(e=>e.type===exports.TokenType.Outside);return this.createToken(n?exports.TokenType.Outside:t?exports.TokenType.Between:exports.TokenType.Function,e)}return"true"===e||"True"===e||"TRUE"===e?this.createToken(exports.TokenType.Terminal,!0):"false"===e||"False"===e||"FALSE"===e?this.createToken(exports.TokenType.Terminal,!1):"in"===e||"IN"===e?this.createToken(exports.TokenType.ArIn):this.createToken(exports.TokenType.Identifier,e)}},{key:"captureDynamicIdentifier",value:function(){this.nextSymbol();let e="";for(;this.currentPosition<this.input.length;this.nextSymbol()){if(this.current===M.RIGHT_BRACKET){this.nextSymbol();break}e+=this.current}return this.createToken(exports.TokenType.DynamicIdentifier,"null"===e||"Null"===e||"NULL"===e?null:e)}},{key:"captureString",value:function(){let e="",t=!1;const n=this.current;for(this.nextSymbol();this.currentPosition<this.input.length;this.nextSymbol())if(t||this.current!==M.BACK_SLASH){if(!t&&this.current===n)return this.nextSymbol(),this.createToken(exports.TokenType.String,e);e+=this.current,t=!1}else t=!0;this.Error("Открытая строка")}},{key:"captureDate",value:function(){if(this.nextSymbol(),![M.SINGLE_QUOTE,M.DOUBLE_QUOTE,M.BACK_SLASH].includes(this.current))return this.captureTimeSpan();const e=this.captureString();return this.createToken(exports.TokenType.Date,e.value)}},{key:"captureParam",value:function(){this.nextSymbol();let e="";for(;M.isLetter(this.current)||M.isDigit(this.current);)e+=this.current,this.nextSymbol();if(!new RegExp(/^(?!p[\d]+$|[\d\_])[\w\d\_]{2,}$/,"gi").test(e))throw new b("Неверное наименование параметра: '"+e+"'");return this.createToken(exports.TokenType.Param,"@"+e)}},{key:"captureTimeSpan",value:function(){let e="";for(;this.currentPosition<this.input.length&&M.isDigit(this.current);this.nextSymbol())e+=this.current;const t=parseFloat(e);Number.isNaN(t)&&this.Error("Неверный формат числа для значения timespan: "+e+". Должно быть положительным целочисленным значением."),M.isLetter(this.current)||this.Error("Для значения задана неверная единица измерения "+this.current);let n="";for(;M.isLetter(this.current);)n+=this.current,this.nextSymbol();let r=0;switch(n){case"ms":r=t;break;case"s":r=L.sToMs(t);break;case"m":r=L.mToMs(t);break;case"h":r=L.hToMs(t);break;case"d":r=L.dToMs(t);break;case"mth":r=L.mthToMs(t);break;case"y":r=L.yToMs(t);break;default:this.Error("Неверная единица измерения для timespan: "+n)}return this.createToken(exports.TokenType.TimeSpan,r)}},{key:"isEndOfString",value:function(){return this.tokens.length>0&&this.tokens[this.tokens.length-1].type===exports.TokenType.EndOfString}},{key:"Error",value:function(e){throw new F(e,{start:this.start,end:this.start})}}]),e}(),_=function(){function e(){n(this,e)}return o(e,[{key:"visit",value:function(e){return e instanceof g?this.visitBoolOpNode(e):e instanceof E?this.visitOpNode(e):e instanceof x?this.visitValueNode(e):e instanceof d?this.visitAttributeNode(e):e instanceof A?this.visitFunctionNode(e):void 0}},{key:"visitBoolOpNode",value:function(e){}},{key:"visitOpNode",value:function(e){}},{key:"visitValueNode",value:function(e){}},{key:"visitAttributeNode",value:function(e){}},{key:"visitFunctionNode",value:function(e){}}]),e}(),R=function(e){s(r,_);var t=f(r);function r(e){var o;return n(this,r),(o=t.call(this)).attributes=e,o}return o(r,[{key:"visitBoolOpNode",value:function(e){k(u(r.prototype),"visitBoolOpNode",this).call(this,e),this.checkBoolOpNode(e),this.acceptLeafs(e)}},{key:"visitOpNode",value:function(e){k(u(r.prototype),"visitOpNode",this).call(this,e),this.checkOpNode(e),this.acceptLeafs(e)}},{key:"visitValueNode",value:function(e){k(u(r.prototype),"visitValueNode",this).call(this,e),this.checkLeafNode(e)}},{key:"visitAttributeNode",value:function(e){k(u(r.prototype),"visitAttributeNode",this).call(this,e),this.checkLeafNode(e),this.checkAttributeNode(e)}},{key:"visitFunctionNode",value:function(e){k(u(r.prototype),"visitFunctionNode",this).call(this,e),this.checkLeafNode(e),this.checkFunctionNode(e)}},{key:"checkBoolOpNode",value:function(e){const t="Ожидается выражение вида 'a == 2 "+e.token.value+" b == 3'";this.isOperationNode(e.left)||this.Error(t,e.token),this.isOperationNode(e.right)||this.Error(t,e.token)}},{key:"checkOpNode",value:function(e){e.left&&e.right||this.Error("'"+e.token.value+"' ожидает выражение",e.token)}},{key:"checkLeafNode",value:function(e){if(e.left){const{token:t}=e.left;this.Error("'"+t.value+"' не может использоваться вне выражения",t)}if(e.right){const{token:t}=e.right;this.Error("'"+t.value+"' не может использоваться вне выражения",t)}}},{key:"checkAttributeNode",value:function(e){e.token.value&&void 0!==this.attributes[e.token.value]||this.Error("Атрибут '"+e.token.value+"' не найден в атрибутах слоя",e.token)}},{key:"checkFunctionNode",value:function(e){const t=e.func.check(this.attributes);t instanceof Error&&this.Error(t.message,e.token)}},{key:"Error",value:function(e,t){const{position:n}=t;throw new b(e,n)}},{key:"acceptLeafs",value:function(e){return{x:e.left&&e.left.accept(this),y:e.right&&e.right.accept(this)}}},{key:"isOperationNode",value:function(e){return e instanceof g||e instanceof E}}]),r}(),U=function(e){s(r,R);var t=f(r);function r(e,o){var i;return n(this,r),(i=t.call(this,e)).attributes=e,i.silent=!(!o||!o.silent),i}return o(r,[{key:"visitBoolOpNode",value:function(e){this.silent||k(u(r.prototype),"visitBoolOpNode",this).call(this,e);const{x:t,y:n}=this.acceptLeafs(e);return e.token.type===exports.TokenType.BoolAnd?t&&n:t||n}},{key:"visitOpNode",value:function(e){this.silent||k(u(r.prototype),"visitOpNode",this).call(this,e);const{x:t,y:n}=this.acceptLeafs(e);switch(e.token.type){case exports.TokenType.ArEq:return t===n;case exports.TokenType.ArNotEq:return t!==n;case exports.TokenType.ArGre:return t>=n;case exports.TokenType.ArLse:return t<=n;case exports.TokenType.ArGr:return t>n;case exports.TokenType.ArLs:return t<n;case exports.TokenType.ArPlus:return t+n;case exports.TokenType.ArMinus:return t-n;case exports.TokenType.ArMul:return t*n;case exports.TokenType.ArDiv:return t/n;default:return!1}}},{key:"visitValueNode",value:function(e){return this.silent||k(u(r.prototype),"visitValueNode",this).call(this,e),e.token.value}},{key:"visitAttributeNode",value:function(e){return this.silent||k(u(r.prototype),"visitAttributeNode",this).call(this,e),this.attributes[e.token.value]}},{key:"visitFunctionNode",value:function(e){return this.silent||k(u(r.prototype),"visitFunctionNode",this).call(this,e),e.func.calc(this.attributes)}}]),r}(),K=function(){function e(t){n(this,e),this.args=t}return o(e,[{key:"calc",value:function(e){return 0}},{key:"evaluateArguments",value:function(e){return this.args.map(t=>{if(t instanceof E)return t.accept(new U(e));if("string"==typeof t.value){if("number"!=typeof e[t.value]){const{position:e}=t;throw new b("Аргумент функции должен быть числовым типом",e)}return e[t.value]}return t.value})}},{key:"check",value:function(e,t){return this.evaluateArguments(e).length!==t?new Error("Передано неверное количество аргументов"):null}}]),e}(),G=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.sin(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();G.ArgsCount=1,G.Name="sin";let q=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.asin(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();q.ArgsCount=1,q.Name="arcsin";let j=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.cos(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();j.ArgsCount=1,j.Name="cos";let z=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.acos(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();z.ArgsCount=1,z.Name="arccos";let V=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t,n]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.atan2(t,n).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();V.ArgsCount=2,V.Name="arctan2";let W=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.tan(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();W.ArgsCount=1,W.Name="tan";let H=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.atan(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();H.ArgsCount=1,H.Name="arctan";let Q=function(e){s(r,K);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"calc",value:function(e){const[t]=k(u(r.prototype),"evaluateArguments",this).call(this,e);return+Math.sqrt(t).toFixed(3)}},{key:"check",value:function(e){return k(u(r.prototype),"check",this).call(this,e,r.ArgsCount)}}]),r}();Q.ArgsCount=1,Q.Name="sqrt";const Y={[G.Name]:G,[q.Name]:q,[j.Name]:j,[z.Name]:z,[W.Name]:W,[H.Name]:H,[V.Name]:V,[Q.Name]:Q},$=e=>t.isValid(e)?e:"#'"+e+"'";let J=function(){function e(t){n(this,e),this.tokens=t,this.tree=null,this.currentPosition=0}return o(e,[{key:"value",get:function(){if(this.tree)return this.tree;this.tokens=function(e){let t=[];const n=[];for(const i of e){if(S(i)&&t.push(i),w(i)){if(![exports.TokenType.Between,exports.TokenType.Outside].includes(i.type))for(;m(n)&&(r=m(n),o=i,O.get(r.type)>O.get(o.type))&&m(n).type!==exports.TokenType.ExprOpen;)t.push(n.pop());n.push(i)}if(i.type===exports.TokenType.ExprOpen&&n.push(i),i.type===exports.TokenType.ExprClose){const e=i;for(;m(n)&&m(n).type!==exports.TokenType.ExprOpen;)t.push(n.pop());if(0===n.length)throw new b("Пропущена открывающая скобка",e.position);m(n).type===exports.TokenType.ExprOpen&&n.pop()}}var r,o;if(n.length){const e=m(n);if(e.type===exports.TokenType.ExprOpen)throw new b("Пропущена закрывающая скобка",e.position);t=[...t,...n.reverse()]}return t}(this.tokens);const e=[];for(;this.currentPosition<this.tokens.length;this.nextToken()){if(x.is(this.currentToken)&&e.push(new x(this.currentToken)),d.is(this.currentToken)&&e.push(new d(this.currentToken)),A.is(this.currentToken)){const t=Y[this.currentToken.value];t||this.Error("Функция '"+this.currentToken.value+"' не определена",this.currentToken);const n=[];for(let r=0;r<t.ArgsCount;r++){const t=e.pop()||null;t instanceof E?n.push(t):t&&t.token&&n.push(t.token)}const r=new t(n);e.push(new A(this.currentToken,r))}if(E.is(this.currentToken)){const r=new E(this.currentToken);if([exports.TokenType.Between,exports.TokenType.Outside].includes(this.currentToken.type)){var t,n;const o=e.pop()||null,s=e.pop()||null;r.left=e.pop()||null,r.right=new x(i({},this.currentToken,{value:$(null==s?void 0:s.token.value)+" - "+$(null==o?void 0:o.token.value),position:{start:(null==s||null==(t=s.token.position)?void 0:t.start)||0,end:(null==o||null==(n=o.token.position)?void 0:n.end)||0}}))}else e.length>1&&(r.right=e.pop()||null),r.left=e.pop()||null;e.push(r)}if(g.is(this.currentToken)){const t=new g(this.currentToken);e.length>1&&(t.right=e.pop()||null),t.left=e.pop()||null,e.push(t)}}return this.tree=e.pop()||null,this.flashStack(e),this.checkRoot(),this.tree}},{key:"nextToken",value:function(){this.currentPosition+=1}},{key:"currentToken",get:function(){return this.tokens[this.currentPosition]}},{key:"checkRoot",value:function(){}},{key:"flashStack",value:function(e){if(this.tree&&e.length)for(;e.length;){const t=e.pop();t&&this.insert(this.tree,t)}}},{key:"insert",value:function(e,t){null!==e.right?this.insert(e.right,t):e.right=t}},{key:"Error",value:function(e,t){const{position:n}=t,{start:r,end:o}=n;throw new B(e,{start:r,end:o})}}]),e}(),X=function(e){s(r,_);var t=f(r);function r(){return n(this,r),t.apply(this,arguments)}return o(r,[{key:"visitBoolOpNode",value:function(e){k(u(r.prototype),"visitBoolOpNode",this).call(this,e);const t=e.left&&e.left.accept(this),n=e.right&&e.right.accept(this);return e.left instanceof g&&e.right instanceof g?(this.checkBoolOperations(e.token.type,[...t.boolOperations,...n.boolOperations]),{boolOperations:[...t.boolOperations,e.token.type,...n.boolOperations],expressions:[...t.expressions,...n.expressions]}):e.right instanceof g?(this.checkBoolOperations(e.token.type,n.boolOperations),{boolOperations:[e.token.type,...n.boolOperations],expressions:[t,...n.expressions]}):e.left instanceof g?(this.checkBoolOperations(e.token.type,t.boolOperations),{boolOperations:[...t.boolOperations,e.token.type],expressions:[...t.expressions,n]}):{boolOperations:[e.token.type],expressions:[t,n]}}},{key:"visitOpNode",value:function(e){var t;k(u(r.prototype),"visitOpNode",this).call(this,e),this.checkExpressionSimple(e);const n=e.left&&e.left.accept(this),o=e.right&&(null==(t=e.right)?void 0:t.accept(this));return{attribute:n,operation:e.token.type,value:o}}},{key:"visitValueNode",value:function(e){return k(u(r.prototype),"visitValueNode",this).call(this,e),e.token.value}},{key:"visitAttributeNode",value:function(e){return k(u(r.prototype),"visitAttributeNode",this).call(this,e),e.token.value}},{key:"checkBoolOperations",value:function(e,t){if(t.some(t=>t!==e))throw new b("Выражение должно использовать одинаковые булевы операторы")}},{key:"checkExpressionSimple",value:function(e){if(!(e.left instanceof d&&e.right instanceof x||e.right instanceof x))throw new b("Выражение должно быть простым")}}]),r}();const Z=e=>P(e)&&"boolOperations"in e,ee=e=>P(e)&&"attribute"in e;let te=function(){function e(t){n(this,e),this.result=null,this.tokenizer=new I(t)}return o(e,[{key:"value",get:function(){if(this.result)return this.result;try{const e=this.tokenizer.tokenize(),t=new J(e).value,n=t&&t.accept(new X);return this.result=Z(n)?n:ee(n)?{boolOperations:[],expressions:[n]}:{boolOperations:[],expressions:[]},this.result}catch(e){return e}}}]),e}(),ne=function(){function e(t){n(this,e),this.attributes=t}return o(e,[{key:"evaluate",value:function(e,t){try{const n=new I(e).tokenize(),r=new J(n).value;return r&&r.accept(new U(this.attributes,t))}catch(e){return e}}}]),e}(),re=function(){function e(t){n(this,e),this.attributes=t}return o(e,[{key:"lint",value:function(e){try{const t=new I(e).tokenize(),n=new J(t).value;return n&&n.accept(new R(this.attributes)),null}catch(e){return e}}}]),e}();exports.ArcCos=z,exports.ArcSin=q,exports.ArcTan=H,exports.ArcTan2=V,exports.AttributeNode=d,exports.BoolOperationNode=g,exports.Char=M,exports.ConditionEvaluator=ne,exports.ConditionInterpreter=te,exports.ConditionLinter=re,exports.ConditionVisitor=X,exports.Cos=j,exports.DEFAULT_TOKEN_POSITION=y,exports.EqlFunction=K,exports.EqlFunctions=Y,exports.EvaluateVisitor=U,exports.ExpressionAst=J,exports.ExpressionAstError=B,exports.ExpressionNode=v,exports.ExpressionTokenizer=I,exports.ExpressionTokenizerError=F,exports.ExpressionVisitor=_,exports.FunctionNode=A,exports.LintError=b,exports.LintVisitor=R,exports.OperationNode=E,exports.Sin=G,exports.Sqrt=Q,exports.Tan=W,exports.Time=L,exports.Token=T,exports.TokenError=N,exports.ValueNode=x,exports.isBoolResult=Z,exports.isExpression=ee,exports.isObject=P; | ||
//# sourceMappingURL=condition.cjs.production.min.js.map |
@@ -22,5 +22,2 @@ import { isValid } from 'date-fns'; | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
@@ -59,5 +56,2 @@ } | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -161,4 +155,2 @@ } | ||
return call; | ||
} else if (call !== void 0) { | ||
throw new TypeError("Derived constructors may only return object or undefined"); | ||
} | ||
@@ -197,3 +189,3 @@ | ||
function _get() { | ||
function _get(target, property, receiver) { | ||
if (typeof Reflect !== "undefined" && Reflect.get) { | ||
@@ -209,3 +201,3 @@ _get = Reflect.get; | ||
if (desc.get) { | ||
return desc.get.call(arguments.length < 3 ? target : receiver); | ||
return desc.get.call(receiver); | ||
} | ||
@@ -217,3 +209,3 @@ | ||
return _get.apply(this, arguments); | ||
return _get(target, property, receiver || target); | ||
} | ||
@@ -220,0 +212,0 @@ |
{ | ||
"version": "1.2.93", | ||
"version": "1.2.94", | ||
"license": "MIT", | ||
@@ -36,3 +36,3 @@ "main": "dist/index.js", | ||
"module": "dist/condition.esm.js", | ||
"gitHead": "a158b8cd1d48c52cae58bffdaa0d8d89e1218515" | ||
"gitHead": "96048ffd6911fb9383006543384628eedf842197" | ||
} |
@@ -0,0 +0,0 @@ # @everigs/condition |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
415585
3867