\": function(a, b) {\n return a > b;\n },\n \">=\": function(a, b) {\n return a >= b;\n },\n \"<\": function(a, b, c) {\n return (c === undefined) ? a < b : (a < b) && (b < c);\n },\n \"<=\": function(a, b, c) {\n return (c === undefined) ? a <= b : (a <= b) && (b <= c);\n },\n \"!!\": function(a) {\n return jsonLogic.truthy(a);\n },\n \"!\": function(a) {\n return !jsonLogic.truthy(a);\n },\n \"%\": function(a, b) {\n return a % b;\n },\n \"log\": function(a) {\n console.log(a); return a;\n },\n \"in\": function(a, b) {\n if (!b || typeof b.indexOf === \"undefined\") return false;\n return (b.indexOf(a) !== -1);\n },\n \"cat\": function() {\n return Array.prototype.join.call(arguments, \"\");\n },\n \"substr\": function(source, start, end) {\n if (end < 0) {\n // JavaScript doesn't support negative end, this emulates PHP behavior\n var temp = String(source).substr(start);\n return temp.substr(0, temp.length + end);\n }\n return String(source).substr(start, end);\n },\n \"+\": function() {\n return Array.prototype.reduce.call(arguments, function(a, b) {\n return parseFloat(a, 10) + parseFloat(b, 10);\n }, 0);\n },\n \"*\": function() {\n return Array.prototype.reduce.call(arguments, function(a, b) {\n return parseFloat(a, 10) * parseFloat(b, 10);\n });\n },\n \"-\": function(a, b) {\n if (b === undefined) {\n return -a;\n } else {\n return a - b;\n }\n },\n \"/\": function(a, b) {\n return a / b;\n },\n \"min\": function() {\n return Math.min.apply(this, arguments);\n },\n \"max\": function() {\n return Math.max.apply(this, arguments);\n },\n \"merge\": function() {\n return Array.prototype.reduce.call(arguments, function(a, b) {\n return a.concat(b);\n }, []);\n },\n \"var\": function(a, b) {\n var not_found = (b === undefined) ? null : b;\n var data = this;\n if (typeof a === \"undefined\" || a===\"\" || a===null) {\n return data;\n }\n var sub_props = String(a).split(\".\");\n for (var i = 0; i < sub_props.length; i++) {\n if (data === null || data === undefined) {\n return not_found;\n }\n // Descending into data\n data = data[sub_props[i]];\n if (data === undefined) {\n return not_found;\n }\n }\n return data;\n },\n \"missing\": function() {\n /*\n Missing can receive many keys as many arguments, like {\"missing:[1,2]}\n Missing can also receive *one* argument that is an array of keys,\n which typically happens if it's actually acting on the output of another command\n (like 'if' or 'merge')\n */\n\n var missing = [];\n var keys = Array.isArray(arguments[0]) ? arguments[0] : arguments;\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = jsonLogic.apply({\"var\": key}, this);\n if (value === null || value === \"\") {\n missing.push(key);\n }\n }\n\n return missing;\n },\n \"missing_some\": function(need_count, options) {\n // missing_some takes two arguments, how many (minimum) items must be present, and an array of keys (just like 'missing') to check for presence.\n var are_missing = jsonLogic.apply({\"missing\": options}, this);\n\n if (options.length - are_missing.length >= need_count) {\n return [];\n } else {\n return are_missing;\n }\n },\n };\n\n jsonLogic.is_logic = function(logic) {\n return (\n typeof logic === \"object\" && // An object\n logic !== null && // but not null\n ! Array.isArray(logic) && // and not an array\n Object.keys(logic).length === 1 // with exactly one key\n );\n };\n\n /*\n This helper will defer to the JsonLogic spec as a tie-breaker when different language interpreters define different behavior for the truthiness of primitives. E.g., PHP considers empty arrays to be falsy, but Javascript considers them to be truthy. JsonLogic, as an ecosystem, needs one consistent answer.\n\n Spec and rationale here: http://jsonlogic.com/truthy\n */\n jsonLogic.truthy = function(value) {\n if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n return !! value;\n };\n\n\n jsonLogic.get_operator = function(logic) {\n return Object.keys(logic)[0];\n };\n\n jsonLogic.get_values = function(logic) {\n return logic[jsonLogic.get_operator(logic)];\n };\n\n jsonLogic.apply = function(logic, data) {\n // Does this array contain logic? Only one way to find out.\n if (Array.isArray(logic)) {\n return logic.map(function(l) {\n return jsonLogic.apply(l, data);\n });\n }\n // You've recursed to a primitive, stop!\n if ( ! jsonLogic.is_logic(logic) ) {\n return logic;\n }\n\n var op = jsonLogic.get_operator(logic);\n var values = logic[op];\n var i;\n var current;\n var scopedLogic;\n var scopedData;\n var initial;\n\n // easy syntax for unary operators, like {\"var\" : \"x\"} instead of strict {\"var\" : [\"x\"]}\n if ( ! Array.isArray(values)) {\n values = [values];\n }\n\n // 'if', 'and', and 'or' violate the normal rule of depth-first calculating consequents, let each manage recursion as needed.\n if (op === \"if\" || op == \"?:\") {\n /* 'if' should be called with a odd number of parameters, 3 or greater\n This works on the pattern:\n if( 0 ){ 1 }else{ 2 };\n if( 0 ){ 1 }else if( 2 ){ 3 }else{ 4 };\n if( 0 ){ 1 }else if( 2 ){ 3 }else if( 4 ){ 5 }else{ 6 };\n\n The implementation is:\n For pairs of values (0,1 then 2,3 then 4,5 etc)\n If the first evaluates truthy, evaluate and return the second\n If the first evaluates falsy, jump to the next pair (e.g, 0,1 to 2,3)\n given one parameter, evaluate and return it. (it's an Else and all the If/ElseIf were false)\n given 0 parameters, return NULL (not great practice, but there was no Else)\n */\n for (i = 0; i < values.length - 1; i += 2) {\n if ( jsonLogic.truthy( jsonLogic.apply(values[i], data) ) ) {\n return jsonLogic.apply(values[i+1], data);\n }\n }\n if (values.length === i+1) {\n return jsonLogic.apply(values[i], data);\n }\n return null;\n } else if (op === \"and\") { // Return first falsy, or last\n for (i=0; i < values.length; i+=1) {\n current = jsonLogic.apply(values[i], data);\n if ( ! jsonLogic.truthy(current)) {\n return current;\n }\n }\n return current; // Last\n } else if (op === \"or\") {// Return first truthy, or last\n for (i=0; i < values.length; i+=1) {\n current = jsonLogic.apply(values[i], data);\n if ( jsonLogic.truthy(current) ) {\n return current;\n }\n }\n return current; // Last\n } else if (op === \"filter\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n\n if ( ! Array.isArray(scopedData)) {\n return [];\n }\n // Return only the elements from the array in the first argument,\n // that return truthy when passed to the logic in the second argument.\n // For parity with JavaScript, reindex the returned array\n return scopedData.filter(function(datum) {\n return jsonLogic.truthy( jsonLogic.apply(scopedLogic, datum));\n });\n } else if (op === \"map\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n\n if ( ! Array.isArray(scopedData)) {\n return [];\n }\n\n return scopedData.map(function(datum) {\n return jsonLogic.apply(scopedLogic, datum);\n });\n } else if (op === \"reduce\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n initial = typeof values[2] !== \"undefined\" ? values[2] : null;\n\n if ( ! Array.isArray(scopedData)) {\n return initial;\n }\n\n return scopedData.reduce(\n function(accumulator, current) {\n return jsonLogic.apply(\n scopedLogic,\n {current: current, accumulator: accumulator}\n );\n },\n initial\n );\n } else if (op === \"all\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n // All of an empty set is false. Note, some and none have correct fallback after the for loop\n if ( ! Array.isArray(scopedData) || ! scopedData.length) {\n return false;\n }\n for (i=0; i < scopedData.length; i+=1) {\n if ( ! jsonLogic.truthy( jsonLogic.apply(scopedLogic, scopedData[i]) )) {\n return false; // First falsy, short circuit\n }\n }\n return true; // All were truthy\n } else if (op === \"none\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n\n if ( ! Array.isArray(scopedData) || ! scopedData.length) {\n return true;\n }\n for (i=0; i < scopedData.length; i+=1) {\n if ( jsonLogic.truthy( jsonLogic.apply(scopedLogic, scopedData[i]) )) {\n return false; // First truthy, short circuit\n }\n }\n return true; // None were truthy\n } else if (op === \"some\") {\n scopedData = jsonLogic.apply(values[0], data);\n scopedLogic = values[1];\n\n if ( ! Array.isArray(scopedData) || ! scopedData.length) {\n return false;\n }\n for (i=0; i < scopedData.length; i+=1) {\n if ( jsonLogic.truthy( jsonLogic.apply(scopedLogic, scopedData[i]) )) {\n return true; // First truthy, short circuit\n }\n }\n return false; // None were truthy\n }\n\n // Everyone else gets immediate depth-first recursion\n values = values.map(function(val) {\n return jsonLogic.apply(val, data);\n });\n\n\n // The operation is called with \"data\" bound to its \"this\" and \"values\" passed as arguments.\n // Structured commands like % or > can name formal arguments while flexible commands (like missing or merge) can operate on the pseudo-array arguments\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments\n if (operations.hasOwnProperty(op) && typeof operations[op] === \"function\") {\n return operations[op].apply(data, values);\n } else if (op.indexOf(\".\") > 0) { // Contains a dot, and not in the 0th position\n var sub_ops = String(op).split(\".\");\n var operation = operations;\n for (i = 0; i < sub_ops.length; i++) {\n if (!operation.hasOwnProperty(sub_ops[i])) {\n throw new Error(\"Unrecognized operation \" + op +\n \" (failed at \" + sub_ops.slice(0, i+1).join(\".\") + \")\");\n }\n // Descending into operations\n operation = operation[sub_ops[i]];\n }\n\n return operation.apply(data, values);\n }\n\n throw new Error(\"Unrecognized operation \" + op );\n };\n\n jsonLogic.uses_data = function(logic) {\n var collection = [];\n\n if (jsonLogic.is_logic(logic)) {\n var op = jsonLogic.get_operator(logic);\n var values = logic[op];\n\n if ( ! Array.isArray(values)) {\n values = [values];\n }\n\n if (op === \"var\") {\n // This doesn't cover the case where the arg to var is itself a rule.\n collection.push(values[0]);\n } else {\n // Recursion!\n values.forEach(function(val) {\n collection.push.apply(collection, jsonLogic.uses_data(val) );\n });\n }\n }\n\n return arrayUnique(collection);\n };\n\n jsonLogic.add_operation = function(name, code) {\n operations[name] = code;\n };\n\n jsonLogic.rm_operation = function(name) {\n delete operations[name];\n };\n\n jsonLogic.rule_like = function(rule, pattern) {\n // console.log(\"Is \". JSON.stringify(rule) . \" like \" . JSON.stringify(pattern) . \"?\");\n if (pattern === rule) {\n return true;\n } // TODO : Deep object equivalency?\n if (pattern === \"@\") {\n return true;\n } // Wildcard!\n if (pattern === \"number\") {\n return (typeof rule === \"number\");\n }\n if (pattern === \"string\") {\n return (typeof rule === \"string\");\n }\n if (pattern === \"array\") {\n // !logic test might be superfluous in JavaScript\n return Array.isArray(rule) && ! jsonLogic.is_logic(rule);\n }\n\n if (jsonLogic.is_logic(pattern)) {\n if (jsonLogic.is_logic(rule)) {\n var pattern_op = jsonLogic.get_operator(pattern);\n var rule_op = jsonLogic.get_operator(rule);\n\n if (pattern_op === \"@\" || pattern_op === rule_op) {\n // echo \"\\nOperators match, go deeper\\n\";\n return jsonLogic.rule_like(\n jsonLogic.get_values(rule, false),\n jsonLogic.get_values(pattern, false)\n );\n }\n }\n return false; // pattern is logic, rule isn't, can't be eq\n }\n\n if (Array.isArray(pattern)) {\n if (Array.isArray(rule)) {\n if (pattern.length !== rule.length) {\n return false;\n }\n /*\n Note, array order MATTERS, because we're using this array test logic to consider arguments, where order can matter. (e.g., + is commutative, but '-' or 'if' or 'var' are NOT)\n */\n for (var i = 0; i < pattern.length; i += 1) {\n // If any fail, we fail\n if ( ! jsonLogic.rule_like(rule[i], pattern[i])) {\n return false;\n }\n }\n return true; // If they *all* passed, we pass\n } else {\n return false; // Pattern is array, rule isn't\n }\n }\n\n // Not logic, not array, not a === match for rule.\n return false;\n };\n\n return jsonLogic;\n}));\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor;\n\n/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\nfunction baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n}\n\nmodule.exports = baseRepeat;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var arrayMap = require('./_arrayMap');\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nmodule.exports = baseValues;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var toString = require('./toString');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n}\n\nmodule.exports = escapeRegExp;\n","var baseIndexOf = require('./_baseIndexOf'),\n isArrayLike = require('./isArrayLike'),\n isString = require('./isString'),\n toInteger = require('./toInteger'),\n values = require('./values');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nmodule.exports = includes;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isEmpty;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nmodule.exports = mergeWith;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n basePickBy = require('./_basePickBy'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nmodule.exports = pickBy;\n","var baseRepeat = require('./_baseRepeat'),\n isIterateeCall = require('./_isIterateeCall'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n\n/**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\nfunction repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n}\n\nmodule.exports = repeat;\n","var baseClamp = require('./_baseClamp'),\n baseToString = require('./_baseToString'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n\n/**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\nfunction startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n}\n\nmodule.exports = startsWith;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var baseValues = require('./_baseValues'),\n keys = require('./keys');\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n","/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"spel2js\"] = factory();\n\telse\n\t\troot[\"spel2js\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The common supertype of all AST nodes in a parsed Spring Expression Language\n * format expression.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createSpelNode(nodeType, position) {\n var node = {},\n type = nodeType || 'Abstract',\n children = [],\n parent = null,\n activeContext;\n\n node._type = type;\n\n node.getType = function () {\n return type;\n };\n node.setType = function (nodeType) {\n type = nodeType;\n };\n\n node.getChildren = function () {\n return children;\n };\n node.addChild = function (childNode) {\n if (!childNode) {\n // See OpMinus and OpPlus: right node can be null for unary mode\n return;\n }\n if (!childNode.setParent) {\n throw {\n name: 'Error',\n message: 'Trying to add a child which is not a node: ' + JSON.stringify(childNode)\n };\n }\n childNode.setParent(node);\n children.push(childNode);\n };\n\n node.getParent = function () {\n return parent;\n };\n node.setParent = function (parentNode) {\n parent = parentNode;\n };\n\n node.getContext = function (state) {\n return activeContext || state.activeContext.peek();\n };\n node.setContext = function (nodeContext) {\n activeContext = nodeContext;\n };\n\n node.getStartPosition = function () {\n return position >> 16;\n };\n\n node.getEndPosition = function () {\n return position & 0xffff;\n };\n\n //must override\n node.getValue = function () {\n throw {\n name: 'MethodNotImplementedException',\n message: 'SpelNode#getValue() must be overridden.'\n };\n };\n\n node.toString = function () {\n var s = 'Kind: ' + node.getType();\n //s += ', Value: ' + node.getValue();\n s += ', Children: [';\n for (var i = 0, l = node.getChildren().length; i < l; i += 1) {\n s += '{' + node.getChildren()[i] + '}, ';\n }\n s += ']';\n return s;\n };\n\n //constructor\n if (position === 0) {\n throw {\n name: 'Error',\n message: 'Position cannot be 0'\n };\n }\n\n for (var _len = arguments.length, operands = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n operands[_key - 2] = arguments[_key];\n }\n\n if (operands) {\n operands.forEach(function (operand) {\n node.addChild(operand);\n });\n }\n\n return node;\n}\n\nvar SpelNode = exports.SpelNode = {\n create: createSpelNode\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Stack = Stack;\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction Stack(startingElements) {\n this.elements = startingElements || [];\n}\n\nStack.prototype.push = function (el) {\n this.elements.push(el);\n return el;\n};\n\nStack.prototype.pop = function () {\n return this.elements.pop();\n};\n\nStack.prototype.peek = function () {\n return this.elements[this.elements.length - 1];\n};\n\nStack.prototype.empty = function () {\n return this.elements.length > 0;\n};\n\nStack.prototype.search = function (el) {\n return this.elements.length - this.elements.indexOf(el);\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nvar types = {\n\n LITERAL_INT: 1, //tested\n\n LITERAL_LONG: 2, //tested\n\n LITERAL_HEXINT: 3, //tested\n\n LITERAL_HEXLONG: 4, //tested\n\n LITERAL_STRING: 5, //tested\n\n LITERAL_REAL: 6, //tested\n\n LITERAL_REAL_FLOAT: 7, //tested\n\n LPAREN: '(', //tested\n\n RPAREN: ')', //tested\n\n COMMA: ',', //tested\n\n IDENTIFIER: 0, //tested\n\n COLON: ':', //tested\n\n HASH: '#', //tested\n\n RSQUARE: ']', //tested\n\n LSQUARE: '[', //tested\n\n LCURLY: '{', //tested\n\n RCURLY: '}', //tested\n\n DOT: '.', //tested\n\n PLUS: '+', //tested\n\n STAR: '*', //tested\n\n MINUS: '-', //tested\n\n SELECT_FIRST: '^[', //tested\n\n SELECT_LAST: '$[', //tested\n\n QMARK: '?', //tested\n\n PROJECT: '![', //tested\n\n DIV: '/', //tested\n\n GE: '>=', //tested\n\n GT: '>', //tested\n\n LE: '<=', //tested\n\n LT: '<', //tested\n\n EQ: '==', //tested\n\n NE: '!=', //tested\n\n MOD: '%', //tested\n\n NOT: '!', //tested\n\n ASSIGN: '=', //tested\n\n INSTANCEOF: 'instanceof', //test fails\n\n MATCHES: 'matches', //test fails\n\n BETWEEN: 'between', //test fails\n\n SELECT: '?[', //tested\n\n POWER: '^', //tested\n\n ELVIS: '?:', //tested\n\n SAFE_NAVI: '?.', //tested\n\n BEAN_REF: '@', //tested\n\n SYMBOLIC_OR: '||', //tested\n\n SYMBOLIC_AND: '&&', //tested\n\n INC: '++', //tested\n\n DEC: '--' //tested\n};\n\nfunction TokenKind(type) {\n this.type = type;\n this.tokenChars = types[type];\n this._hasPayload = typeof types[type] !== 'string';\n if (typeof types[type] === 'number') {\n this._ordinal = types[type];\n }\n}\n\n//create enum\nfor (var t in types) {\n if (types.hasOwnProperty(t)) {\n TokenKind[t] = new TokenKind(t);\n }\n}\n\nTokenKind.prototype.toString = function () {\n return this.type + (this.tokenChars.length !== 0 ? '(' + this.tokenChars + ')' : '');\n};\n\nTokenKind.prototype.getLength = function () {\n return this.tokenChars.length;\n};\n\nTokenKind.prototype.hasPayload = function () {\n return this._hasPayload;\n};\n\nTokenKind.prototype.valueOf = function (id) {\n for (var t in types) {\n if (types.hasOwnProperty(t) && types[t] === id) {\n return TokenKind[t];\n }\n }\n};\n\nTokenKind.prototype.ordinal = function () {\n return this._ordinal;\n};\n\nexports.TokenKind = TokenKind;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StandardContext = exports.SpelExpressionEvaluator = undefined;\n\nvar _SpelExpressionEvaluator = __webpack_require__(4);\n\nvar _StandardContext = __webpack_require__(50);\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Ben March\n * @since 0.2.0\n */\n\nexports.SpelExpressionEvaluator = _SpelExpressionEvaluator.SpelExpressionEvaluator;\nexports.StandardContext = _StandardContext.StandardContext;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SpelExpressionEvaluator = undefined;\n\nvar _SpelExpressionParser = __webpack_require__(5);\n\nvar _Stack = __webpack_require__(1);\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Ben March\n * @since 0.2.0\n */\n\nvar spelExpressionEvaluator = {};\n\nfunction evalCompiled(compiledExpression, context, locals) {\n var activeContext = new _Stack.Stack(),\n state;\n\n if (!context) {\n context = {};\n }\n\n activeContext.push(context);\n\n state = {\n rootContext: context,\n activeContext: activeContext,\n locals: locals\n };\n return compiledExpression.getValue(state);\n}\n\nspelExpressionEvaluator.compile = function (expression) {\n var compiledExpression = (0, _SpelExpressionParser.SpelExpressionParser)().parse(expression);\n return {\n eval: function _eval(context, locals) {\n return evalCompiled(compiledExpression, context, locals);\n },\n _compiledExpression: compiledExpression\n };\n};\n\nspelExpressionEvaluator.eval = function (expression, context, locals) {\n return spelExpressionEvaluator.compile(expression).eval(context, locals);\n};\n\nexports.SpelExpressionEvaluator = spelExpressionEvaluator;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SpelExpressionParser = undefined;\n\nvar _TokenKind = __webpack_require__(2);\n\nvar _Tokenizer = __webpack_require__(6);\n\nvar _BooleanLiteral = __webpack_require__(8);\n\nvar _NumberLiteral = __webpack_require__(9);\n\nvar _StringLiteral = __webpack_require__(10);\n\nvar _NullLiteral = __webpack_require__(11);\n\nvar _FunctionReference = __webpack_require__(12);\n\nvar _MethodReference = __webpack_require__(13);\n\nvar _PropertyReference = __webpack_require__(14);\n\nvar _VariableReference = __webpack_require__(15);\n\nvar _CompoundExpression = __webpack_require__(16);\n\nvar _Indexer = __webpack_require__(17);\n\nvar _Assign = __webpack_require__(18);\n\nvar _OpEQ = __webpack_require__(19);\n\nvar _OpNE = __webpack_require__(20);\n\nvar _OpGE = __webpack_require__(21);\n\nvar _OpGT = __webpack_require__(22);\n\nvar _OpLE = __webpack_require__(23);\n\nvar _OpLT = __webpack_require__(24);\n\nvar _OpPlus = __webpack_require__(25);\n\nvar _OpMinus = __webpack_require__(26);\n\nvar _OpMultiply = __webpack_require__(27);\n\nvar _OpDivide = __webpack_require__(28);\n\nvar _OpModulus = __webpack_require__(29);\n\nvar _OpPower = __webpack_require__(30);\n\nvar _OpInc = __webpack_require__(31);\n\nvar _OpDec = __webpack_require__(32);\n\nvar _OpNot = __webpack_require__(33);\n\nvar _OpAnd = __webpack_require__(34);\n\nvar _OpOr = __webpack_require__(35);\n\nvar _OpMatches = __webpack_require__(36);\n\nvar _Ternary = __webpack_require__(37);\n\nvar _Elvis = __webpack_require__(38);\n\nvar _InlineList = __webpack_require__(39);\n\nvar _InlineMap = __webpack_require__(40);\n\nvar _Selection = __webpack_require__(41);\n\nvar _Projection = __webpack_require__(42);\n\nvar _OpInstanceof = __webpack_require__(43);\n\nvar _OpBetween = __webpack_require__(44);\n\nvar _TypeReference = __webpack_require__(45);\n\nvar _BeanReference = __webpack_require__(46);\n\nvar _Identifier = __webpack_require__(47);\n\nvar _QualifiedIdentifier = __webpack_require__(48);\n\nvar _ConstructorReference = __webpack_require__(49);\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ben March\n * @since 0.2.0\n *\n */\n\nvar SpelExpressionParser = exports.SpelExpressionParser = function SpelExpressionParser() {\n\n var VALID_QUALIFIED_ID_PATTERN = new RegExp('[\\\\p{L}\\\\p{N}_$]+');\n\n var configuration;\n\n // For rules that build nodes, they are stacked here for return\n var constructedNodes = [];\n\n // The expression being parsed\n var expressionString;\n\n // The token stream constructed from that expression string\n var tokenStream;\n\n // length of a populated token stream\n var tokenStreamLength;\n\n // Current location in the token stream when processing tokens\n var tokenStreamPointer;\n\n /**\n * Create a parser with some configured behavior.\n * @param config custom configuration options\n */\n function setConfiguration(config) {\n configuration = config;\n }\n\n function parse(expression, context) {\n try {\n expressionString = expression;\n tokenStream = _Tokenizer.Tokenizer.tokenize(expression);\n tokenStreamLength = tokenStream.length;\n tokenStreamPointer = 0;\n constructedNodes = [];\n var ast = eatExpression();\n if (moreTokens()) {\n raiseInternalException(peekToken().startPos, 'MORE_INPUT', nextToken().toString());\n }\n //Assert.isTrue(this.constructedNodes.isEmpty());\n return ast;\n } catch (e) {\n throw e.message;\n }\n }\n\n //\texpression\n // : logicalOrExpression\n // ( (ASSIGN^ logicalOrExpression)\n //\t | (DEFAULT^ logicalOrExpression)\n //\t | (QMARK^ expression COLON! expression)\n // | (ELVIS^ expression))?;\n function eatExpression() {\n var expr = eatLogicalOrExpression();\n if (moreTokens()) {\n var token = peekToken();\n if (token.getKind() === _TokenKind.TokenKind.ASSIGN) {\n // a=b\n if (expr === null) {\n expr = _NullLiteral.NullLiteral.create(toPosBounds(token.startPos - 1, token.endPos - 1));\n }\n nextToken();\n var assignedValue = eatLogicalOrExpression();\n return _Assign.Assign.create(toPosToken(token), expr, assignedValue);\n }\n\n if (token.getKind() === _TokenKind.TokenKind.ELVIS) {\n // a?:b (a if it isn't null, otherwise b)\n if (expr === null) {\n expr = _NullLiteral.NullLiteral.create(toPosBounds(token.startPos - 1, token.endPos - 2));\n }\n nextToken(); // elvis has left the building\n var valueIfNull = eatExpression();\n if (valueIfNull === null) {\n valueIfNull = _NullLiteral.NullLiteral.create(toPosBounds(token.startPos + 1, token.endPos + 1));\n }\n return _Elvis.Elvis.create(toPosToken(token), expr, valueIfNull);\n }\n\n if (token.getKind() === _TokenKind.TokenKind.QMARK) {\n // a?b:c\n if (expr === null) {\n expr = _NullLiteral.NullLiteral.create(toPosBounds(token.startPos - 1, token.endPos - 1));\n }\n nextToken();\n var ifTrueExprValue = eatExpression();\n eatToken(_TokenKind.TokenKind.COLON);\n var ifFalseExprValue = eatExpression();\n return _Ternary.Ternary.create(toPosToken(token), expr, ifTrueExprValue, ifFalseExprValue);\n }\n }\n return expr;\n }\n\n //logicalOrExpression : logicalAndExpression (OR^ logicalAndExpression)*;\n function eatLogicalOrExpression() {\n var expr = eatLogicalAndExpression();\n while (peekIdentifierToken('or') || peekTokenOne(_TokenKind.TokenKind.SYMBOLIC_OR)) {\n var token = nextToken(); //consume OR\n var rhExpr = eatLogicalAndExpression();\n checkOperands(token, expr, rhExpr);\n expr = _OpOr.OpOr.create(toPosToken(token), expr, rhExpr);\n }\n return expr;\n }\n\n // logicalAndExpression : relationalExpression (AND^ relationalExpression)*;\n function eatLogicalAndExpression() {\n var expr = eatRelationalExpression();\n while (peekIdentifierToken('and') || peekTokenOne(_TokenKind.TokenKind.SYMBOLIC_AND)) {\n var token = nextToken(); // consume 'AND'\n var rhExpr = eatRelationalExpression();\n checkOperands(token, expr, rhExpr);\n expr = _OpAnd.OpAnd.create(toPosToken(token), expr, rhExpr);\n }\n return expr;\n }\n\n // relationalExpression : sumExpression (relationalOperator^ sumExpression)?;\n function eatRelationalExpression() {\n var expr = eatSumExpression();\n var relationalOperatorToken = maybeEatRelationalOperator();\n if (relationalOperatorToken !== null) {\n var token = nextToken(); // consume relational operator token\n var rhExpr = eatSumExpression();\n checkOperands(token, expr, rhExpr);\n var tk = relationalOperatorToken.kind;\n\n if (relationalOperatorToken.isNumericRelationalOperator()) {\n var pos = toPosToken(token);\n if (tk === _TokenKind.TokenKind.GT) {\n return _OpGT.OpGT.create(pos, expr, rhExpr);\n }\n if (tk === _TokenKind.TokenKind.LT) {\n return _OpLT.OpLT.create(pos, expr, rhExpr);\n }\n if (tk === _TokenKind.TokenKind.LE) {\n return _OpLE.OpLE.create(pos, expr, rhExpr);\n }\n if (tk === _TokenKind.TokenKind.GE) {\n return _OpGE.OpGE.create(pos, expr, rhExpr);\n }\n if (tk === _TokenKind.TokenKind.EQ) {\n return _OpEQ.OpEQ.create(pos, expr, rhExpr);\n }\n //Assert.isTrue(tk === TokenKind.NE);\n return _OpNE.OpNE.create(pos, expr, rhExpr);\n }\n\n if (tk === _TokenKind.TokenKind.INSTANCEOF) {\n return _OpInstanceof.OpInstanceof.create(toPosToken(token), expr, rhExpr);\n }\n\n if (tk === _TokenKind.TokenKind.MATCHES) {\n return _OpMatches.OpMatches.create(toPosToken(token), expr, rhExpr);\n }\n\n //Assert.isTrue(tk === TokenKind.BETWEEN);\n return _OpBetween.OpBetween.create(toPosToken(token), expr, rhExpr);\n }\n return expr;\n }\n\n //sumExpression: productExpression ( (PLUS^ | MINUS^) productExpression)*;\n function eatSumExpression() {\n var expr = eatProductExpression();\n while (peekTokenAny(_TokenKind.TokenKind.PLUS, _TokenKind.TokenKind.MINUS, _TokenKind.TokenKind.INC)) {\n var token = nextToken(); //consume PLUS or MINUS or INC\n var rhExpr = eatProductExpression();\n checkRightOperand(token, rhExpr);\n if (token.getKind() === _TokenKind.TokenKind.PLUS) {\n expr = _OpPlus.OpPlus.create(toPosToken(token), expr, rhExpr);\n } else if (token.getKind() === _TokenKind.TokenKind.MINUS) {\n expr = _OpMinus.OpMinus.create(toPosToken(token), expr, rhExpr);\n }\n }\n return expr;\n }\n\n // productExpression: powerExpr ((STAR^ | DIV^| MOD^) powerExpr)* ;\n function eatProductExpression() {\n var expr = eatPowerIncDecExpression();\n while (peekTokenAny(_TokenKind.TokenKind.STAR, _TokenKind.TokenKind.DIV, _TokenKind.TokenKind.MOD)) {\n var token = nextToken(); // consume STAR/DIV/MOD\n var rhExpr = eatPowerIncDecExpression();\n checkOperands(token, expr, rhExpr);\n if (token.getKind() === _TokenKind.TokenKind.STAR) {\n expr = _OpMultiply.OpMultiply.create(toPosToken(token), expr, rhExpr);\n } else if (token.getKind() === _TokenKind.TokenKind.DIV) {\n expr = _OpDivide.OpDivide.create(toPosToken(token), expr, rhExpr);\n } else {\n //Assert.isTrue(token.getKind() === TokenKind.MOD);\n expr = _OpModulus.OpModulus.create(toPosToken(token), expr, rhExpr);\n }\n }\n return expr;\n }\n\n // powerExpr : unaryExpression (POWER^ unaryExpression)? (INC || DEC) ;\n function eatPowerIncDecExpression() {\n var expr = eatUnaryExpression(),\n token;\n\n if (peekTokenOne(_TokenKind.TokenKind.POWER)) {\n token = nextToken(); //consume POWER\n var rhExpr = eatUnaryExpression();\n checkRightOperand(token, rhExpr);\n return _OpPower.OpPower.create(toPosToken(token), expr, rhExpr);\n }\n\n if (expr !== null && peekTokenAny(_TokenKind.TokenKind.INC, _TokenKind.TokenKind.DEC)) {\n token = nextToken(); //consume INC/DEC\n if (token.getKind() === _TokenKind.TokenKind.INC) {\n return _OpInc.OpInc.create(toPosToken(token), true, expr);\n }\n return _OpDec.OpDec.create(toPosToken(token), true, expr);\n }\n\n return expr;\n }\n\n // unaryExpression: (PLUS^ | MINUS^ | BANG^ | INC^ | DEC^) unaryExpression | primaryExpression ;\n function eatUnaryExpression() {\n var token, expr;\n\n if (peekTokenAny(_TokenKind.TokenKind.PLUS, _TokenKind.TokenKind.MINUS, _TokenKind.TokenKind.NOT)) {\n token = nextToken();\n expr = eatUnaryExpression();\n if (token.getKind() === _TokenKind.TokenKind.NOT) {\n return _OpNot.OpNot.create(toPosToken(token), expr);\n }\n\n if (token.getKind() === _TokenKind.TokenKind.PLUS) {\n return _OpPlus.OpPlus.create(toPosToken(token), expr);\n }\n //Assert.isTrue(token.getKind() === TokenKind.MINUS);\n return _OpMinus.OpMinus.create(toPosToken(token), expr);\n }\n if (peekTokenAny(_TokenKind.TokenKind.INC, _TokenKind.TokenKind.DEC)) {\n token = nextToken();\n expr = eatUnaryExpression();\n if (token.getKind() === _TokenKind.TokenKind.INC) {\n return _OpInc.OpInc.create(toPosToken(token), false, expr);\n }\n return _OpDec.OpDec.create(toPosToken(token), false, expr);\n }\n\n return eatPrimaryExpression();\n }\n\n // primaryExpression : startNode (node)? -> ^(EXPRESSION startNode (node)?);\n function eatPrimaryExpression() {\n var nodes = [];\n var start = eatStartNode(); // always a start node\n nodes.push(start);\n while (maybeEatNode()) {\n nodes.push(pop());\n }\n if (nodes.length === 1) {\n return nodes[0];\n }\n return _CompoundExpression.CompoundExpression.create(toPosBounds(start.getStartPosition(), nodes[nodes.length - 1].getEndPosition()), nodes);\n }\n\n // node : ((DOT dottedNode) | (SAFE_NAVI dottedNode) | nonDottedNode)+;\n function maybeEatNode() {\n var expr = null;\n if (peekTokenAny(_TokenKind.TokenKind.DOT, _TokenKind.TokenKind.SAFE_NAVI)) {\n expr = eatDottedNode();\n } else {\n expr = maybeEatNonDottedNode();\n }\n\n if (expr === null) {\n return false;\n } else {\n push(expr);\n return true;\n }\n }\n\n // nonDottedNode: indexer;\n function maybeEatNonDottedNode() {\n if (peekTokenOne(_TokenKind.TokenKind.LSQUARE)) {\n if (maybeEatIndexer()) {\n return pop();\n }\n }\n return null;\n }\n\n //dottedNode\n // : ((methodOrProperty\n //\t | functionOrVar\n // | projection\n // | selection\n // | firstSelection\n // | lastSelection\n // ))\n //\t;\n function eatDottedNode() {\n var token = nextToken(); // it was a '.' or a '?.'\n var nullSafeNavigation = token.getKind() === _TokenKind.TokenKind.SAFE_NAVI;\n if (maybeEatMethodOrProperty(nullSafeNavigation) || maybeEatFunctionOrVar() || maybeEatProjection(nullSafeNavigation) || maybeEatSelection(nullSafeNavigation)) {\n return pop();\n }\n if (peekToken() === null) {\n // unexpectedly ran out of data\n raiseInternalException(token.startPos, 'OOD');\n } else {\n raiseInternalException(token.startPos, 'UNEXPECTED_DATA_AFTER_DOT', toString(peekToken()));\n }\n return null;\n }\n\n // functionOrVar\n // : (POUND ID LPAREN) => function\n // | var\n //\n // function : POUND id=ID methodArgs -> ^(FUNCTIONREF[$id] methodArgs);\n // var : POUND id=ID -> ^(VARIABLEREF[$id]);\n function maybeEatFunctionOrVar() {\n if (!peekTokenOne(_TokenKind.TokenKind.HASH)) {\n return false;\n }\n var token = nextToken();\n var functionOrVariableName = eatToken(_TokenKind.TokenKind.IDENTIFIER);\n var args = maybeEatMethodArgs();\n if (args === null) {\n push(_VariableReference.VariableReference.create(functionOrVariableName.data, toPosBounds(token.startPos, functionOrVariableName.endPos)));\n return true;\n }\n\n push(_FunctionReference.FunctionReference.create(functionOrVariableName.data, toPosBounds(token.startPos, functionOrVariableName.endPos), args));\n return true;\n }\n\n // methodArgs : LPAREN! (argument (COMMA! argument)* (COMMA!)?)? RPAREN!;\n function maybeEatMethodArgs() {\n if (!peekTokenOne(_TokenKind.TokenKind.LPAREN)) {\n return null;\n }\n var args = [];\n consumeArguments(args);\n eatToken(_TokenKind.TokenKind.RPAREN);\n return args;\n }\n\n function eatConstructorArgs(accumulatedArguments) {\n if (!peekTokenOne(_TokenKind.TokenKind.LPAREN)) {\n raiseInternalException(toPosToken(peekToken()), 'MISSING_CONSTRUCTOR_ARGS');\n }\n consumeArguments(accumulatedArguments);\n eatToken(_TokenKind.TokenKind.RPAREN);\n }\n\n /**\n * Used for consuming arguments for either a method or a constructor call\n */\n function consumeArguments(accumulatedArguments) {\n var pos = peekToken().startPos;\n var next;\n do {\n nextToken(); // consume ( (first time through) or comma (subsequent times)\n var token = peekToken();\n if (token === null) {\n raiseInternalException(pos, 'RUN_OUT_OF_ARGUMENTS');\n }\n if (token.getKind() !== _TokenKind.TokenKind.RPAREN) {\n accumulatedArguments.push(eatExpression());\n }\n next = peekToken();\n } while (next !== null && next.kind === _TokenKind.TokenKind.COMMA);\n\n if (next === null) {\n raiseInternalException(pos, 'RUN_OUT_OF_ARGUMENTS');\n }\n }\n\n function positionOf(token) {\n if (token === null) {\n // if null assume the problem is because the right token was\n // not found at the end of the expression\n return expressionString.length;\n }\n return token.startPos;\n }\n\n //startNode\n // : parenExpr | literal\n //\t | type\n //\t | methodOrProperty\n //\t | functionOrVar\n //\t | projection\n //\t | selection\n //\t | firstSelection\n //\t | lastSelection\n //\t | indexer\n //\t | constructor\n function eatStartNode() {\n if (maybeEatLiteral()) {\n return pop();\n } else if (maybeEatParenExpression()) {\n return pop();\n } else if (maybeEatTypeReference() || maybeEatNullReference() || maybeEatConstructorReference() || maybeEatMethodOrProperty(false) || maybeEatFunctionOrVar()) {\n return pop();\n } else if (maybeEatBeanReference()) {\n return pop();\n } else if (maybeEatProjection(false) || maybeEatSelection(false) || maybeEatIndexer()) {\n return pop();\n } else if (maybeEatInlineListOrMap()) {\n return pop();\n } else {\n return null;\n }\n }\n\n // parse: @beanname @'bean.name'\n // quoted if dotted\n function maybeEatBeanReference() {\n if (peekTokenOne(_TokenKind.TokenKind.BEAN_REF)) {\n var beanRefToken = nextToken();\n var beanNameToken = null;\n var beanName = null;\n if (peekTokenOne(_TokenKind.TokenKind.IDENTIFIER)) {\n beanNameToken = eatToken(_TokenKind.TokenKind.IDENTIFIER);\n beanName = beanNameToken.data;\n } else if (peekTokenOne(_TokenKind.TokenKind.LITERAL_STRING)) {\n beanNameToken = eatToken(_TokenKind.TokenKind.LITERAL_STRING);\n beanName = beanNameToken.stringValue();\n beanName = beanName.substring(1, beanName.length() - 1);\n } else {\n raiseInternalException(beanRefToken.startPos, 'INVALID_BEAN_REFERENCE');\n }\n\n var beanReference = _BeanReference.BeanReference.create(toPosToken(beanNameToken), beanName);\n push(beanReference);\n return true;\n }\n return false;\n }\n\n function maybeEatTypeReference() {\n if (peekTokenOne(_TokenKind.TokenKind.IDENTIFIER)) {\n var typeName = peekToken();\n if (typeName.stringValue() !== 'T') {\n return false;\n }\n // It looks like a type reference but is T being used as a map key?\n var token = nextToken();\n if (peekTokenOne(_TokenKind.TokenKind.RSQUARE)) {\n // looks like 'T]' (T is map key)\n push(_PropertyReference.PropertyReference.create(token.stringValue(), toPosToken(token)));\n return true;\n }\n eatToken(_TokenKind.TokenKind.LPAREN);\n var node = eatPossiblyQualifiedId();\n // dotted qualified id\n // Are there array dimensions?\n var dims = 0;\n while (peekTokenConsumeIfMatched(_TokenKind.TokenKind.LSQUARE, true)) {\n eatToken(_TokenKind.TokenKind.RSQUARE);\n dims++;\n }\n eatToken(_TokenKind.TokenKind.RPAREN);\n push(_TypeReference.TypeReference.create(toPosToken(typeName), node, dims));\n return true;\n }\n return false;\n }\n\n function maybeEatNullReference() {\n if (peekTokenOne(_TokenKind.TokenKind.IDENTIFIER)) {\n var nullToken = peekToken();\n if (nullToken.stringValue().toLowerCase() !== 'null') {\n return false;\n }\n nextToken();\n push(_NullLiteral.NullLiteral.create(toPosToken(nullToken)));\n return true;\n }\n return false;\n }\n\n //projection: PROJECT^ expression RCURLY!;\n function maybeEatProjection(nullSafeNavigation) {\n var token = peekToken();\n if (!peekTokenConsumeIfMatched(_TokenKind.TokenKind.PROJECT, true)) {\n return false;\n }\n var expr = eatExpression();\n eatToken(_TokenKind.TokenKind.RSQUARE);\n push(_Projection.Projection.create(nullSafeNavigation, toPosToken(token), expr));\n return true;\n }\n\n // list = LCURLY (element (COMMA element)*) RCURLY\n // map = LCURLY (key ':' value (COMMA key ':' value)*) RCURLY\n function maybeEatInlineListOrMap() {\n var token = peekToken(),\n listElements = [];\n\n if (!peekTokenConsumeIfMatched(_TokenKind.TokenKind.LCURLY, true)) {\n return false;\n }\n var expr = null;\n var closingCurly = peekToken();\n if (peekTokenConsumeIfMatched(_TokenKind.TokenKind.RCURLY, true)) {\n // empty list '{}'\n expr = _InlineList.InlineList.create(toPosBounds(token.startPos, closingCurly.endPos));\n } else if (peekTokenConsumeIfMatched(_TokenKind.TokenKind.COLON, true)) {\n closingCurly = eatToken(_TokenKind.TokenKind.RCURLY);\n // empty map '{:}'\n expr = _InlineMap.InlineMap.create(toPosBounds(token.startPos, closingCurly.endPos));\n } else {\n var firstExpression = eatExpression();\n // Next is either:\n // '}' - end of list\n // ',' - more expressions in this list\n // ':' - this is a map!\n\n if (peekTokenOne(_TokenKind.TokenKind.RCURLY)) {\n // list with one item in it\n listElements.push(firstExpression);\n closingCurly = eatToken(_TokenKind.TokenKind.RCURLY);\n expr = _InlineList.InlineList.create(toPosBounds(token.startPos, closingCurly.endPos), listElements);\n } else if (peekTokenConsumeIfMatched(_TokenKind.TokenKind.COMMA, true)) {\n // multi item list\n listElements.push(firstExpression);\n do {\n listElements.push(eatExpression());\n } while (peekTokenConsumeIfMatched(_TokenKind.TokenKind.COMMA, true));\n closingCurly = eatToken(_TokenKind.TokenKind.RCURLY);\n expr = _InlineList.InlineList.create(toPosToken(token.startPos, closingCurly.endPos), listElements);\n } else if (peekTokenConsumeIfMatched(_TokenKind.TokenKind.COLON, true)) {\n // map!\n var mapElements = [];\n mapElements.push(firstExpression);\n mapElements.push(eatExpression());\n while (peekTokenConsumeIfMatched(_TokenKind.TokenKind.COMMA, true)) {\n mapElements.push(eatExpression());\n eatToken(_TokenKind.TokenKind.COLON);\n mapElements.push(eatExpression());\n }\n closingCurly = eatToken(_TokenKind.TokenKind.RCURLY);\n expr = _InlineMap.InlineMap.create(toPosBounds(token.startPos, closingCurly.endPos), mapElements);\n } else {\n raiseInternalException(token.startPos, 'OOD');\n }\n }\n push(expr);\n return true;\n }\n\n function maybeEatIndexer() {\n var token = peekToken();\n if (!peekTokenConsumeIfMatched(_TokenKind.TokenKind.LSQUARE, true)) {\n return false;\n }\n var expr = eatExpression();\n eatToken(_TokenKind.TokenKind.RSQUARE);\n push(_Indexer.Indexer.create(toPosToken(token), expr));\n return true;\n }\n\n function maybeEatSelection(nullSafeNavigation) {\n var token = peekToken();\n if (!peekSelectToken()) {\n return false;\n }\n nextToken();\n var expr = eatExpression();\n if (expr === null) {\n raiseInternalException(toPosToken(token), 'MISSING_SELECTION_EXPRESSION');\n }\n eatToken(_TokenKind.TokenKind.RSQUARE);\n if (token.getKind() === _TokenKind.TokenKind.SELECT_FIRST) {\n push(_Selection.Selection.create(nullSafeNavigation, _Selection.Selection.FIRST, toPosToken(token), expr));\n } else if (token.getKind() === _TokenKind.TokenKind.SELECT_LAST) {\n push(_Selection.Selection.create(nullSafeNavigation, _Selection.Selection.LAST, toPosToken(token), expr));\n } else {\n push(_Selection.Selection.create(nullSafeNavigation, _Selection.Selection.ALL, toPosToken(token), expr));\n }\n return true;\n }\n\n /**\n * Eat an identifier, possibly qualified (meaning that it is dotted).\n * TODO AndyC Could create complete identifiers (a.b.c) here rather than a sequence of them? (a, b, c)\n */\n function eatPossiblyQualifiedId() {\n var qualifiedIdPieces = [];\n var node = peekToken();\n while (isValidQualifiedId(node)) {\n nextToken();\n if (node.kind !== _TokenKind.TokenKind.DOT) {\n qualifiedIdPieces.push(_Identifier.Identifier.create(node.stringValue(), toPosToken(node)));\n }\n node = peekToken();\n }\n if (!qualifiedIdPieces.length) {\n if (node === null) {\n raiseInternalException(expressionString.length(), 'OOD');\n }\n raiseInternalException(node.startPos, 'NOT_EXPECTED_TOKEN', 'qualified ID', node.getKind().toString().toLowerCase());\n }\n var pos = toPosBounds(qualifiedIdPieces[0].getStartPosition(), qualifiedIdPieces[qualifiedIdPieces.length - 1].getEndPosition());\n return _QualifiedIdentifier.QualifiedIdentifier.create(pos, qualifiedIdPieces);\n }\n\n function isValidQualifiedId(node) {\n if (node === null || node.kind === _TokenKind.TokenKind.LITERAL_STRING) {\n return false;\n }\n if (node.kind === _TokenKind.TokenKind.DOT || node.kind === _TokenKind.TokenKind.IDENTIFIER) {\n return true;\n }\n var value = node.stringValue();\n return value && value.length && VALID_QUALIFIED_ID_PATTERN.test(value);\n }\n\n // This is complicated due to the support for dollars in identifiers. Dollars are normally separate tokens but\n // there we want to combine a series of identifiers and dollars into a single identifier\n function maybeEatMethodOrProperty(nullSafeNavigation) {\n if (peekTokenOne(_TokenKind.TokenKind.IDENTIFIER)) {\n var methodOrPropertyName = nextToken();\n var args = maybeEatMethodArgs();\n if (args === null) {\n // property\n push(_PropertyReference.PropertyReference.create(nullSafeNavigation, methodOrPropertyName.stringValue(), toPosToken(methodOrPropertyName)));\n return true;\n }\n // methodreference\n push(_MethodReference.MethodReference.create(nullSafeNavigation, methodOrPropertyName.stringValue(), toPosToken(methodOrPropertyName), args));\n // TODO what is the end position for a method reference? the name or the last arg?\n return true;\n }\n return false;\n }\n\n //constructor\n //:\t('new' qualifiedId LPAREN) => 'new' qualifiedId ctorArgs -> ^(CONSTRUCTOR qualifiedId ctorArgs)\n function maybeEatConstructorReference() {\n if (peekIdentifierToken('new')) {\n var newToken = nextToken();\n // It looks like a constructor reference but is NEW being used as a map key?\n if (peekTokenOne(_TokenKind.TokenKind.RSQUARE)) {\n // looks like 'NEW]' (so NEW used as map key)\n push(_PropertyReference.PropertyReference.create(newToken.stringValue(), toPosToken(newToken)));\n return true;\n }\n var possiblyQualifiedConstructorName = eatPossiblyQualifiedId();\n var nodes = [];\n nodes.push(possiblyQualifiedConstructorName);\n if (peekTokenOne(_TokenKind.TokenKind.LSQUARE)) {\n // array initializer\n var dimensions = [];\n while (peekTokenConsumeIfMatched(_TokenKind.TokenKind.LSQUARE, true)) {\n if (!peekTokenOne(_TokenKind.TokenKind.RSQUARE)) {\n dimensions.push(eatExpression());\n } else {\n dimensions.push(null);\n }\n eatToken(_TokenKind.TokenKind.RSQUARE);\n }\n if (maybeEatInlineListOrMap()) {\n nodes.push(pop());\n }\n push(_ConstructorReference.ConstructorReference.create(toPosToken(newToken), dimensions, nodes));\n } else {\n // regular constructor invocation\n eatConstructorArgs(nodes);\n // TODO correct end position?\n push(_ConstructorReference.ConstructorReference.create(toPosToken(newToken), nodes));\n }\n return true;\n }\n return false;\n }\n\n function push(newNode) {\n constructedNodes.push(newNode);\n }\n\n function pop() {\n return constructedNodes.pop();\n }\n\n //\tliteral\n // : INTEGER_LITERAL\n //\t| boolLiteral\n //\t| STRING_LITERAL\n // | HEXADECIMAL_INTEGER_LITERAL\n // | REAL_LITERAL\n //\t| DQ_STRING_LITERAL\n //\t| NULL_LITERAL\n function maybeEatLiteral() {\n var token = peekToken();\n if (token === null) {\n return false;\n }\n if (token.getKind() === _TokenKind.TokenKind.LITERAL_INT || token.getKind() === _TokenKind.TokenKind.LITERAL_LONG) {\n push(_NumberLiteral.NumberLiteral.create(parseInt(token.stringValue(), 10), toPosToken(token)));\n } else if (token.getKind() === _TokenKind.TokenKind.LITERAL_REAL || token.getKind() === _TokenKind.TokenKind.LITERAL_REAL_FLOAT) {\n push(_NumberLiteral.NumberLiteral.create(parseFloat(token.stringValue()), toPosToken(token)));\n } else if (token.getKind() === _TokenKind.TokenKind.LITERAL_HEXINT || token.getKind() === _TokenKind.TokenKind.LITERAL_HEXLONG) {\n push(_NumberLiteral.NumberLiteral.create(parseInt(token.stringValue(), 16), toPosToken(token)));\n } else if (peekIdentifierToken('true')) {\n push(_BooleanLiteral.BooleanLiteral.create(true, toPosToken(token)));\n } else if (peekIdentifierToken('false')) {\n push(_BooleanLiteral.BooleanLiteral.create(false, toPosToken(token)));\n } else if (token.getKind() === _TokenKind.TokenKind.LITERAL_STRING) {\n push(_StringLiteral.StringLiteral.create(token.stringValue(), toPosToken(token)));\n } else {\n return false;\n }\n nextToken();\n return true;\n }\n\n //parenExpr : LPAREN! expression RPAREN!;\n function maybeEatParenExpression() {\n if (peekTokenOne(_TokenKind.TokenKind.LPAREN)) {\n nextToken();\n var expr = eatExpression();\n eatToken(_TokenKind.TokenKind.RPAREN);\n push(expr);\n return true;\n } else {\n return false;\n }\n }\n\n // relationalOperator\n // : EQUAL | NOT_EQUAL | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN\n // | GREATER_THAN_OR_EQUAL | INSTANCEOF | BETWEEN | MATCHES\n function maybeEatRelationalOperator() {\n var token = peekToken();\n if (token === null) {\n return null;\n }\n if (token.isNumericRelationalOperator()) {\n return token;\n }\n if (token.isIdentifier()) {\n var idString = token.stringValue();\n if (idString.toLowerCase() === 'instanceof') {\n return token.asInstanceOfToken();\n }\n if (idString.toLowerCase() === 'matches') {\n return token.asMatchesToken();\n }\n if (idString.toLowerCase() === 'between') {\n return token.asBetweenToken();\n }\n }\n return null;\n }\n\n function eatToken(expectedKind) {\n var token = nextToken();\n if (token === null) {\n raiseInternalException(expressionString.length, 'OOD');\n }\n if (token.getKind() !== expectedKind) {\n raiseInternalException(token.startPos, 'NOT_EXPECTED_TOKEN', expectedKind.toString().toLowerCase(), token.getKind().toString().toLowerCase());\n }\n return token;\n }\n\n function peekTokenOne(desiredTokenKind) {\n return peekTokenConsumeIfMatched(desiredTokenKind, false);\n }\n\n function peekTokenConsumeIfMatched(desiredTokenKind, consumeIfMatched) {\n if (!moreTokens()) {\n return false;\n }\n var token = peekToken();\n if (token.getKind() === desiredTokenKind) {\n if (consumeIfMatched) {\n tokenStreamPointer++;\n }\n return true;\n }\n\n if (desiredTokenKind === _TokenKind.TokenKind.IDENTIFIER) {\n // might be one of the textual forms of the operators (e.g. NE for !== ) - in which case we can treat it as an identifier\n // The list is represented here: Tokenizer.alternativeOperatorNames and those ones are in order in the TokenKind enum\n if (token.getKind().ordinal() >= _TokenKind.TokenKind.DIV.ordinal() && token.getKind().ordinal() <= _TokenKind.TokenKind.NOT.ordinal() && token.data !== null) {\n // if token.data were null, we'd know it wasn'token the textual form, it was the symbol form\n return true;\n }\n }\n return false;\n }\n\n function peekTokenAny() {\n if (!moreTokens()) {\n return false;\n }\n var token = peekToken();\n var args = Array.prototype.slice.call(arguments);\n for (var i = 0, l = args.length; i < l; i += 1) {\n if (token.getKind() === args[i]) {\n return true;\n }\n }\n return false;\n }\n\n function peekIdentifierToken(identifierString) {\n if (!moreTokens()) {\n return false;\n }\n var token = peekToken();\n return token.getKind() === _TokenKind.TokenKind.IDENTIFIER && token.stringValue().toLowerCase() === identifierString.toLowerCase();\n }\n\n function peekSelectToken() {\n if (!moreTokens()) {\n return false;\n }\n var token = peekToken();\n return token.getKind() === _TokenKind.TokenKind.SELECT || token.getKind() === _TokenKind.TokenKind.SELECT_FIRST || token.getKind() === _TokenKind.TokenKind.SELECT_LAST;\n }\n\n function moreTokens() {\n return tokenStreamPointer < tokenStream.length;\n }\n\n function nextToken() {\n if (tokenStreamPointer >= tokenStreamLength) {\n return null;\n }\n return tokenStream[tokenStreamPointer++];\n }\n\n function peekToken() {\n if (tokenStreamPointer >= tokenStreamLength) {\n return null;\n }\n return tokenStream[tokenStreamPointer];\n }\n\n function raiseInternalException(pos, message, expected, actual) {\n if (expected) {\n message += '\\nExpected: ' + expected;\n }\n if (actual) {\n message += '\\nActual: ' + actual;\n }\n throw {\n name: 'InternalParseException',\n message: 'Error occurred while attempting to parse expression \\'' + expressionString + '\\' at position ' + pos + '. Message: ' + message\n };\n }\n\n function toString(token) {\n if (token.getKind().hasPayload()) {\n return token.stringValue();\n }\n return token.getKind().toString().toLowerCase();\n }\n\n function checkOperands(token, left, right) {\n checkLeftOperand(token, left);\n checkRightOperand(token, right);\n }\n\n function checkLeftOperand(token, operandExpression) {\n if (operandExpression === null) {\n raiseInternalException(token.startPos, 'LEFT_OPERAND_PROBLEM');\n }\n }\n\n function checkRightOperand(token, operandExpression) {\n if (operandExpression === null) {\n raiseInternalException(token.startPos, 'RIGHT_OPERAND_PROBLEM');\n }\n }\n\n /**\n * Compress the start and end of a token into a single int.\n */\n function toPosToken(token) {\n return (token.startPos << 16) + token.endPos;\n }\n\n function toPosBounds(start, end) {\n return (start << 16) + end;\n }\n\n return {\n setConfiguration: setConfiguration,\n parse: parse\n };\n};\n\n//not yet implemented\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Tokenizer = undefined;\n\nvar _Token = __webpack_require__(7);\n\nvar _TokenKind = __webpack_require__(2);\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Andy Clement\n * @author Phillip Webb\n * @author Ben March\n * @since 0.2.0\n */\n\nvar ALTERNATIVE_OPERATOR_NAMES = ['DIV', 'EQ', 'GE', 'GT', 'LE', 'LT', 'MOD', 'NE', 'NOT'],\n FLAGS = [],\n IS_DIGIT = 1,\n IS_HEXDIGIT = 2,\n IS_ALPHA = 4;\n\nfunction init() {\n var ch;\n\n for (ch = '0'.charCodeAt(0); ch <= '9'.charCodeAt(0); ch += 1) {\n FLAGS[ch] |= IS_DIGIT | IS_HEXDIGIT;\n }\n for (ch = 'A'.charCodeAt(0); ch <= 'F'.charCodeAt(0); ch += 1) {\n FLAGS[ch] |= IS_HEXDIGIT;\n }\n for (ch = 'a'.charCodeAt(0); ch <= 'f'.charCodeAt(0); ch += 1) {\n FLAGS[ch] |= IS_HEXDIGIT;\n }\n for (ch = 'A'.charCodeAt(0); ch <= 'Z'.charCodeAt(0); ch += 1) {\n FLAGS[ch] |= IS_ALPHA;\n }\n for (ch = 'a'.charCodeAt(0); ch <= 'z'.charCodeAt(0); ch += 1) {\n FLAGS[ch] |= IS_ALPHA;\n }\n}\n\ninit();\n\nfunction tokenize(inputData) {\n var expressionString = inputData,\n toProcess = inputData + '\\0',\n max = toProcess.length,\n pos = 0,\n tokens = [];\n\n function process() {\n var ch;\n\n while (pos < max) {\n ch = toProcess[pos];\n if (isAlphabetic(ch)) {\n lexIdentifier();\n } else {\n switch (ch) {\n case '+':\n if (isTwoCharToken(_TokenKind.TokenKind.INC)) {\n pushPairToken(_TokenKind.TokenKind.INC);\n } else {\n pushCharToken(_TokenKind.TokenKind.PLUS);\n }\n break;\n case '_':\n // the other way to start an identifier\n lexIdentifier();\n break;\n case '-':\n if (isTwoCharToken(_TokenKind.TokenKind.DEC)) {\n pushPairToken(_TokenKind.TokenKind.DEC);\n } else {\n pushCharToken(_TokenKind.TokenKind.MINUS);\n }\n break;\n case ':':\n pushCharToken(_TokenKind.TokenKind.COLON);\n break;\n case '.':\n pushCharToken(_TokenKind.TokenKind.DOT);\n break;\n case ',':\n pushCharToken(_TokenKind.TokenKind.COMMA);\n break;\n case '*':\n pushCharToken(_TokenKind.TokenKind.STAR);\n break;\n case '/':\n pushCharToken(_TokenKind.TokenKind.DIV);\n break;\n case '%':\n pushCharToken(_TokenKind.TokenKind.MOD);\n break;\n case '(':\n pushCharToken(_TokenKind.TokenKind.LPAREN);\n break;\n case ')':\n pushCharToken(_TokenKind.TokenKind.RPAREN);\n break;\n case '[':\n pushCharToken(_TokenKind.TokenKind.LSQUARE);\n break;\n case '#':\n pushCharToken(_TokenKind.TokenKind.HASH);\n break;\n case ']':\n pushCharToken(_TokenKind.TokenKind.RSQUARE);\n break;\n case '{':\n pushCharToken(_TokenKind.TokenKind.LCURLY);\n break;\n case '}':\n pushCharToken(_TokenKind.TokenKind.RCURLY);\n break;\n case '@':\n pushCharToken(_TokenKind.TokenKind.BEAN_REF);\n break;\n case '^':\n if (isTwoCharToken(_TokenKind.TokenKind.SELECT_FIRST)) {\n pushPairToken(_TokenKind.TokenKind.SELECT_FIRST);\n } else {\n pushCharToken(_TokenKind.TokenKind.POWER);\n }\n break;\n case '!':\n if (isTwoCharToken(_TokenKind.TokenKind.NE)) {\n pushPairToken(_TokenKind.TokenKind.NE);\n } else if (isTwoCharToken(_TokenKind.TokenKind.PROJECT)) {\n pushPairToken(_TokenKind.TokenKind.PROJECT);\n } else {\n pushCharToken(_TokenKind.TokenKind.NOT);\n }\n break;\n case '=':\n if (isTwoCharToken(_TokenKind.TokenKind.EQ)) {\n pushPairToken(_TokenKind.TokenKind.EQ);\n } else {\n pushCharToken(_TokenKind.TokenKind.ASSIGN);\n }\n break;\n case '&':\n if (!isTwoCharToken(_TokenKind.TokenKind.SYMBOLIC_AND)) {\n throw {\n name: 'SpelParseException',\n message: 'Missing character \\'&\\' in expression (' + expressionString + ') at position ' + pos\n };\n }\n pushPairToken(_TokenKind.TokenKind.SYMBOLIC_AND);\n break;\n case '|':\n if (!isTwoCharToken(_TokenKind.TokenKind.SYMBOLIC_OR)) {\n throw {\n name: 'SpelParseException',\n message: 'Missing character \\'|\\' in expression (' + expressionString + ') at position ' + pos\n };\n }\n pushPairToken(_TokenKind.TokenKind.SYMBOLIC_OR);\n break;\n case '?':\n if (isTwoCharToken(_TokenKind.TokenKind.SELECT)) {\n pushPairToken(_TokenKind.TokenKind.SELECT);\n } else if (isTwoCharToken(_TokenKind.TokenKind.ELVIS)) {\n pushPairToken(_TokenKind.TokenKind.ELVIS);\n } else if (isTwoCharToken(_TokenKind.TokenKind.SAFE_NAVI)) {\n pushPairToken(_TokenKind.TokenKind.SAFE_NAVI);\n } else {\n pushCharToken(_TokenKind.TokenKind.QMARK);\n }\n break;\n case '$':\n if (isTwoCharToken(_TokenKind.TokenKind.SELECT_LAST)) {\n pushPairToken(_TokenKind.TokenKind.SELECT_LAST);\n } else {\n lexIdentifier();\n }\n break;\n case '>':\n if (isTwoCharToken(_TokenKind.TokenKind.GE)) {\n pushPairToken(_TokenKind.TokenKind.GE);\n } else {\n pushCharToken(_TokenKind.TokenKind.GT);\n }\n break;\n case '<':\n if (isTwoCharToken(_TokenKind.TokenKind.LE)) {\n pushPairToken(_TokenKind.TokenKind.LE);\n } else {\n pushCharToken(_TokenKind.TokenKind.LT);\n }\n break;\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n lexNumericLiteral(ch === '0');\n break;\n case ' ':\n case '\\t':\n case '\\r':\n case '\\n':\n // drift over white space\n pos += 1;\n break;\n case '\\'':\n lexQuotedStringLiteral();\n break;\n case '\"':\n lexDoubleQuotedStringLiteral();\n break;\n case '\\0':\n // hit sentinel at end of value\n pos += 1; // will take us to the end\n break;\n case '\\\\':\n throw {\n name: 'SpelParseException',\n message: 'Unexpected escape character in expression (' + expressionString + ') at position ' + pos\n };\n default:\n throw {\n name: 'SpelParseException',\n message: 'Cannot handle character \\'' + ch + '\\' in expression (' + expressionString + ') at position ' + pos\n };\n }\n }\n }\n }\n\n function lexQuotedStringLiteral() {\n var start = pos,\n terminated = false,\n ch;\n\n while (!terminated) {\n pos += 1;\n ch = toProcess[pos];\n if (ch === '\\'') {\n // may not be the end if the char after is also a '\n if (toProcess[pos + 1] === '\\'') {\n pos += 1; // skip over that too, and continue\n } else {\n terminated = true;\n }\n }\n if (ch.charCodeAt(0) === 0) {\n throw {\n name: 'SpelParseException',\n message: 'Non-terminating quoted string in expression (' + expressionString + ') at position ' + pos\n };\n }\n }\n pos += 1;\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_STRING, subarray(start, pos), start, pos));\n }\n function lexDoubleQuotedStringLiteral() {\n var start = pos,\n terminated = false,\n ch;\n\n while (!terminated) {\n pos += 1;\n ch = toProcess[pos];\n if (ch === '\"') {\n // may not be the end if the char after is also a '\n if (toProcess[pos + 1] === '\"') {\n pos += 1; // skip over that too, and continue\n } else {\n terminated = true;\n }\n }\n if (ch.charCodeAt(0) === 0) {\n throw {\n name: 'SpelParseException',\n message: 'Non-terminating double-quoted string in expression (' + expressionString + ') at position ' + pos\n };\n }\n }\n pos += 1;\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_STRING, subarray(start, pos), start, pos));\n }\n\n // REAL_LITERAL :\n // ('.' (DECIMAL_DIGIT)+ (EXPONENT_PART)? (REAL_TYPE_SUFFIX)?) |\n // ((DECIMAL_DIGIT)+ '.' (DECIMAL_DIGIT)+ (EXPONENT_PART)? (REAL_TYPE_SUFFIX)?) |\n // ((DECIMAL_DIGIT)+ (EXPONENT_PART) (REAL_TYPE_SUFFIX)?) |\n // ((DECIMAL_DIGIT)+ (REAL_TYPE_SUFFIX));\n // fragment INTEGER_TYPE_SUFFIX : ( 'L' | 'l' );\n // fragment HEX_DIGIT :\n // '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'A'|'B'|'C'|'D'|'E'|'F'|'a'|'b'|'c'|'d'|'e'|'f';\n //\n // fragment EXPONENT_PART : 'e' (SIGN)* (DECIMAL_DIGIT)+ | 'E' (SIGN)*\n // (DECIMAL_DIGIT)+ ;\n // fragment SIGN : '+' | '-' ;\n // fragment REAL_TYPE_SUFFIX : 'F' | 'f' | 'D' | 'd';\n // INTEGER_LITERAL\n // : (DECIMAL_DIGIT)+ (INTEGER_TYPE_SUFFIX)?;\n\n function lexNumericLiteral(firstCharIsZero) {\n var isReal = false,\n start = pos,\n ch = toProcess[pos + 1],\n isHex = ch === 'x' || ch === 'X',\n dotpos,\n endOfNumber,\n possibleSign,\n isFloat;\n\n // deal with hexadecimal\n if (firstCharIsZero && isHex) {\n pos = pos + 1;\n do {\n pos += 1;\n } while (isHexadecimalDigit(toProcess[pos]));\n if (isChar('L', 'l')) {\n pushHexIntToken(subarray(start + 2, pos), true, start, pos);\n pos += 1;\n } else {\n pushHexIntToken(subarray(start + 2, pos), false, start, pos);\n }\n return;\n }\n\n // real numbers must have leading digits\n\n // Consume first part of number\n do {\n pos += 1;\n } while (isDigit(toProcess[pos]));\n\n // a '.' indicates this number is a real\n ch = toProcess[pos];\n if (ch === '.') {\n isReal = true;\n dotpos = pos;\n // carry on consuming digits\n do {\n pos += 1;\n } while (isDigit(toProcess[pos]));\n if (pos === dotpos + 1) {\n // the number is something like '3.'. It is really an int but may be\n // part of something like '3.toString()'. In this case process it as\n // an int and leave the dot as a separate token.\n pos = dotpos;\n pushIntToken(subarray(start, pos), false, start, pos);\n return;\n }\n }\n\n endOfNumber = pos;\n\n // Now there may or may not be an exponent\n\n // is it a long ?\n if (isChar('L', 'l')) {\n if (isReal) {\n // 3.4L - not allowed\n throw {\n name: 'SpelParseException',\n message: 'Real cannot be long in expression (' + expressionString + ') at position ' + pos\n };\n }\n pushIntToken(subarray(start, endOfNumber), true, start, endOfNumber);\n pos += 1;\n } else if (isExponentChar(toProcess[pos])) {\n isReal = true; // if it wasn't before, it is now\n pos += 1;\n possibleSign = toProcess[pos];\n if (isSign(possibleSign)) {\n pos += 1;\n }\n\n // exponent digits\n do {\n pos += 1;\n } while (isDigit(toProcess[pos]));\n isFloat = false;\n if (isFloatSuffix(toProcess[pos])) {\n isFloat = true;\n pos += 1;\n endOfNumber = pos;\n } else if (isDoubleSuffix(toProcess[pos])) {\n pos += 1;\n endOfNumber = pos;\n }\n pushRealToken(subarray(start, pos), isFloat, start, pos);\n } else {\n ch = toProcess[pos];\n isFloat = false;\n if (isFloatSuffix(ch)) {\n isReal = true;\n isFloat = true;\n pos += 1;\n endOfNumber = pos;\n } else if (isDoubleSuffix(ch)) {\n isReal = true;\n pos += 1;\n endOfNumber = pos;\n }\n if (isReal) {\n pushRealToken(subarray(start, endOfNumber), isFloat, start, endOfNumber);\n } else {\n pushIntToken(subarray(start, endOfNumber), false, start, endOfNumber);\n }\n }\n }\n\n function lexIdentifier() {\n var start = pos,\n substring,\n asString,\n idx;\n do {\n pos += 1;\n } while (isIdentifier(toProcess[pos]));\n substring = subarray(start, pos);\n\n // Check if this is the alternative (textual) representation of an operator (see\n // alternativeOperatorNames)\n if (pos - start === 2 || pos - start === 3) {\n asString = substring.toUpperCase();\n idx = ALTERNATIVE_OPERATOR_NAMES.indexOf(asString);\n if (idx >= 0) {\n pushOneCharOrTwoCharToken(_TokenKind.TokenKind.valueOf(asString), start, substring);\n return;\n }\n }\n tokens.push(new _Token.Token(_TokenKind.TokenKind.IDENTIFIER, substring.replace('\\0', ''), start, pos));\n }\n\n function pushIntToken(data, isLong, start, end) {\n if (isLong) {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_LONG, data, start, end));\n } else {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_INT, data, start, end));\n }\n }\n\n function pushHexIntToken(data, isLong, start, end) {\n if (data.length === 0) {\n if (isLong) {\n throw {\n name: 'SpelParseException',\n message: 'Not a long in expression (' + expressionString + ') at position ' + pos\n };\n } else {\n throw {\n name: 'SpelParseException',\n message: 'Not an int in expression (' + expressionString + ') at position ' + pos\n };\n }\n }\n if (isLong) {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_HEXLONG, data, start, end));\n } else {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_HEXINT, data, start, end));\n }\n }\n\n function pushRealToken(data, isFloat, start, end) {\n if (isFloat) {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_REAL_FLOAT, data, start, end));\n } else {\n tokens.push(new _Token.Token(_TokenKind.TokenKind.LITERAL_REAL, data, start, end));\n }\n }\n\n function subarray(start, end) {\n return toProcess.substring(start, end);\n }\n\n /**\n * Check if this might be a two character token.\n */\n function isTwoCharToken(kind) {\n if (kind.tokenChars.length === 2 && toProcess[pos] === kind.tokenChars[0]) {\n return toProcess[pos + 1] === kind.tokenChars[1];\n }\n return false;\n }\n\n /**\n * Push a token of just one character in length.\n */\n function pushCharToken(kind) {\n tokens.push(new _Token.Token(kind, null, pos, pos + 1));\n pos += 1;\n }\n\n /**\n * Push a token of two characters in length.\n */\n function pushPairToken(kind) {\n tokens.push(new _Token.Token(kind, null, pos, pos + 2));\n pos += 2;\n }\n\n function pushOneCharOrTwoCharToken(kind, pos, data) {\n tokens.push(new _Token.Token(kind, data, pos, pos + kind.getLength()));\n }\n\n // ID: ('a'..'z'|'A'..'Z'|'_'|'$') ('a'..'z'|'A'..'Z'|'_'|'$'|'0'..'9'|DOT_ESCAPED)*;\n function isIdentifier(ch) {\n return isAlphabetic(ch) || isDigit(ch) || ch === '_' || ch === '$';\n }\n\n function isChar(a, b) {\n var ch = toProcess[pos];\n return ch === a || ch === b;\n }\n\n function isExponentChar(ch) {\n return ch === 'e' || ch === 'E';\n }\n\n function isFloatSuffix(ch) {\n return ch === 'f' || ch === 'F';\n }\n\n function isDoubleSuffix(ch) {\n return ch === 'd' || ch === 'D';\n }\n\n function isSign(ch) {\n return ch === '+' || ch === '-';\n }\n\n function isDigit(ch) {\n if (ch.charCodeAt(0) > 255) {\n return false;\n }\n return (FLAGS[ch.charCodeAt(0)] & IS_DIGIT) !== 0;\n }\n\n function isAlphabetic(ch) {\n if (ch.charCodeAt(0) > 255) {\n return false;\n }\n return (FLAGS[ch.charCodeAt(0)] & IS_ALPHA) !== 0;\n }\n\n function isHexadecimalDigit(ch) {\n if (ch.charCodeAt(0) > 255) {\n return false;\n }\n return (FLAGS[ch.charCodeAt(0)] & IS_HEXDIGIT) !== 0;\n }\n\n process();\n\n return tokens;\n}\n\nvar Tokenizer = exports.Tokenizer = {\n tokenize: tokenize\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Token = undefined;\n\nvar _TokenKind = __webpack_require__(2);\n\nfunction Token(tokenKind, tokenData, startPos, endPos) {\n this.kind = tokenKind;\n this.startPos = startPos;\n this.endPos = endPos;\n if (tokenData) {\n this.data = tokenData;\n }\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nToken.prototype.getKind = function () {\n return this.kind;\n};\n\nToken.prototype.toString = function () {\n var s = '[';\n s += this.kind.toString();\n if (this.kind.hasPayload()) {\n s += ':' + this.data;\n }\n s += ']';\n s += '(' + this.startPos + ',' + this.endPos + ')';\n return s;\n};\n\nToken.prototype.isIdentifier = function () {\n return this.kind === _TokenKind.TokenKind.IDENTIFIER;\n};\n\nToken.prototype.isNumericRelationalOperator = function () {\n return this.kind === _TokenKind.TokenKind.GT || this.kind === _TokenKind.TokenKind.GE || this.kind === _TokenKind.TokenKind.LT || this.kind === _TokenKind.TokenKind.LE || this.kind === _TokenKind.TokenKind.EQ || this.kind === _TokenKind.TokenKind.NE;\n};\n\nToken.prototype.stringValue = function () {\n return this.data;\n};\n\nToken.prototype.asInstanceOfToken = function () {\n return new Token(_TokenKind.TokenKind.INSTANCEOF, this.startPos, this.endPos);\n};\n\nToken.prototype.asMatchesToken = function () {\n return new Token(_TokenKind.TokenKind.MATCHES, this.startPos, this.endPos);\n};\n\nToken.prototype.asBetweenToken = function () {\n return new Token(_TokenKind.TokenKind.BETWEEN, this.startPos, this.endPos);\n};\n\nToken.prototype.getStartPosition = function () {\n return this.startPos;\n};\n\nToken.prototype.getEndPosition = function () {\n return this.endPos;\n};\n\nexports.Token = Token;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BooleanLiteral = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents the literal values TRUE and FALSE.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(value, position) {\n var node = _SpelNode.SpelNode.create('boolean', position);\n\n node.getValue = function () {\n return value;\n };\n\n node.setValue = function (newValue) {\n /*jshint -W093 */\n return value = newValue;\n /*jshint +W093 */\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar BooleanLiteral = exports.BooleanLiteral = {\n create: createNode\n};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NumberLiteral = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Expression language AST node that represents a literal number of any kind (since JavaScript only supports doubles anyway)\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(value, position) {\n var node = _SpelNode.SpelNode.create('number', position);\n\n node.getValue = function () {\n return value;\n };\n\n node.setValue = function (newValue) {\n /*jshint -W093 */\n return value = newValue;\n /*jshint +W093 */\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar NumberLiteral = exports.NumberLiteral = {\n create: createNode\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StringLiteral = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Expression language AST node that represents a string literal.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(value, position) {\n var node = _SpelNode.SpelNode.create('string', position);\n\n function stripQuotes(value) {\n if (value[0] === '\\'' && value[value.length - 1] === '\\'' || value[0] === '\"' && value[value.length - 1] === '\"') {\n value = value.substring(1, value.length - 1);\n }\n\n return value.replace(/''/g, '\\'').replace(/\"\"/g, '\"');\n }\n\n //value cannot be null so no check\n value = stripQuotes(value);\n\n node.getValue = function () {\n return value;\n };\n\n node.setValue = function (newValue) {\n /*jshint -W093 */\n return value = newValue;\n /*jshint +W093 */\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar StringLiteral = exports.StringLiteral = {\n create: createNode\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NullLiteral = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Expression language AST node that represents null.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(value, position) {\n var node = _SpelNode.SpelNode.create('null', position);\n\n node.getValue = function () {\n return null;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar NullLiteral = exports.NullLiteral = {\n create: createNode\n};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FunctionReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\nvar _Stack = __webpack_require__(1);\n\n/**\n * A function reference is of the form \"#someFunction(a,b,c)\". Functions may be defined in\n * the context prior to the expression being evaluated or within the expression itself\n * using a lambda function definition. For example: Lambda function definition in an\n * expression: \"(#max = {|x,y|$x>$y?$x:$y};max(2,3))\" Calling context defined function:\n * \"#isEven(37)\". Functions may also be static java methods, registered in the context\n * prior to invocation of the expression.\n *\n * Functions are very simplistic, the arguments are not part of the definition (right\n * now), so the names must be unique.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction createNode(functionName, position, args) {\n var node = _SpelNode.SpelNode.create('function', position);\n\n node.getRaw = function () {\n return {\n functionName: functionName,\n args: args\n };\n };\n\n node.getValue = function (state) {\n var locals = state.locals || {},\n context = state.rootContext,\n compiledArgs = [];\n\n //populate arguments\n args.forEach(function (arg) {\n // reset the active context to root context for evaluating argument\n var currentActiveContext = state.activeContext;\n state.activeContext = new _Stack.Stack();\n state.activeContext.push(state.rootContext);\n\n // evaluate argument\n compiledArgs.push(arg.getValue(state));\n\n // reset the active context\n state.activeContext = currentActiveContext;\n });\n\n if (locals[functionName]) {\n return locals[functionName].apply(context, compiledArgs);\n }\n\n throw {\n name: 'FunctionDoesNotExistException',\n message: 'Function \\'' + functionName + '\\' does not exist.'\n };\n };\n\n return node;\n}\n\nvar FunctionReference = exports.FunctionReference = {\n create: createNode\n};\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MethodReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\nvar _Stack = __webpack_require__(1);\n\n/**\n * Expression language AST node that represents a method reference.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ben March\n * @since 0.2.0\n */\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction createNode(nullSafeNavigation, methodName, position, args) {\n var node = _SpelNode.SpelNode.create('method', position);\n\n node.getRaw = function () {\n return {\n methodName: methodName,\n args: args\n };\n };\n\n node.getValue = function (state) {\n var context = state.activeContext.peek(),\n compiledArgs = [],\n method;\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to look up property \\'' + methodName + '\\' for an undefined context.'\n };\n }\n\n //handle safe navigation\n function maybeHandleNullSafeNavigation(member) {\n if (member === undefined || member === null) {\n if (nullSafeNavigation) {\n return null;\n }\n\n throw {\n name: 'NullPointerException',\n message: 'Method ' + methodName + ' does not exist.'\n };\n }\n\n return member;\n }\n\n //populate arguments\n args.forEach(function (arg) {\n // reset the active context to root context for evaluating argument\n var currentActiveContext = state.activeContext;\n state.activeContext = new _Stack.Stack();\n state.activeContext.push(state.rootContext);\n\n // evaluate argument\n compiledArgs.push(arg.getValue(state));\n\n // reset the active context\n state.activeContext = currentActiveContext;\n });\n\n //accessors might not be available\n if (methodName.substr(0, 3) === 'get' && !context[methodName]) {\n return maybeHandleNullSafeNavigation(context[methodName.charAt(3).toLowerCase() + methodName.substring(4)]);\n }\n if (methodName.substr(0, 3) === 'set' && !context[methodName]) {\n /*jshint -W093 */\n return context[methodName.charAt(3).toLowerCase() + methodName.substring(4)] = compiledArgs[0];\n /*jshint +W093 */\n }\n\n //array methods\n if (Array.isArray(context)) {\n //size() -> length\n if (methodName === 'size') {\n return context.length;\n }\n\n if (methodName === 'contains') {\n return context.includes(compiledArgs[0]);\n }\n }\n\n method = maybeHandleNullSafeNavigation(context[methodName]);\n if (method) {\n return method.apply(context, compiledArgs);\n }\n return null;\n };\n\n return node;\n}\n\nvar MethodReference = exports.MethodReference = {\n create: createNode\n};\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PropertyReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a simple property or field reference.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Clark Duplichien\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(nullSafeNavigation, propertyName, position) {\n var node = _SpelNode.SpelNode.create('property', position);\n\n node.getRaw = function () {\n return propertyName;\n };\n\n node.getValue = function (state) {\n var context = state.activeContext.peek();\n\n if (!context) {\n if (nullSafeNavigation) {\n return null;\n }\n\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to look up property \\'' + propertyName + '\\' for an undefined context.'\n };\n }\n\n if (context[propertyName] === undefined || context[propertyName] === null) {\n //handle safe navigation\n if (nullSafeNavigation) {\n return null;\n }\n\n //handle conversion of Java properties to JavaScript properties\n if (propertyName === 'size' && Array.isArray(context)) {\n return context.length;\n }\n\n throw {\n name: 'NullPointerException',\n message: 'Property \\'' + propertyName + '\\' does not exist.'\n };\n }\n\n return context[propertyName];\n };\n\n node.setValue = function (value, state) {\n var context = state.activeContext.peek();\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to assign property \\'' + propertyName + '\\' for an undefined context.'\n };\n }\n\n /*jshint -W093 */\n return context[propertyName] = value;\n /*jshint +W093 */\n };\n\n node.getName = function () {\n return propertyName;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar PropertyReference = exports.PropertyReference = {\n create: createNode\n};\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VariableReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a variable reference, eg. #someVar. Note this is different to a *local*\n * variable like $someVar\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(variableName, position) {\n var node = _SpelNode.SpelNode.create('variable', position);\n\n node.getRaw = function () {\n return variableName;\n };\n\n node.getValue = function (state) {\n var context = state.activeContext.peek(),\n locals = state.locals;\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to look up variable \\'' + variableName + '\\' for an undefined context.'\n };\n }\n\n //there are 2 keywords (root, this) that need to be dealt with\n if (variableName === 'this') {\n return context;\n }\n if (variableName === 'root') {\n return state.rootContext;\n }\n\n return locals[variableName];\n };\n\n node.setValue = function (value, state) {\n var locals = state.locals;\n\n /*jshint -W093 */\n return locals[variableName] = value;\n /*jshint +W093 */\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar VariableReference = exports.VariableReference = {\n create: createNode\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CompoundExpression = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a DOT separated expression sequence, such as 'property1.property2.methodOne()'\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, expressionComponents) {\n var node = _SpelNode.SpelNode.create.apply(null, ['compound', position].concat(expressionComponents));\n\n function buildContextStack(state) {\n var childrenCount = node.getChildren().length,\n i;\n\n for (i = 0; i < childrenCount; i += 1) {\n if (node.getChildren()[i].getType() === 'indexer') {\n state.activeContext.push(state.activeContext.peek()[node.getChildren()[i].getValue(state)]);\n } else {\n state.activeContext.push(node.getChildren()[i].getValue(state));\n }\n }\n\n return function unbuildContextStack() {\n for (i = 0; i < childrenCount; i += 1) {\n state.activeContext.pop();\n }\n };\n }\n\n node.getValue = function (state) {\n var context = state.activeContext.peek(),\n value;\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to evaluate compound expression with an undefined context.'\n };\n }\n\n var unbuildContextStack = buildContextStack(state);\n\n value = state.activeContext.peek();\n\n unbuildContextStack();\n\n return value;\n };\n\n node.setValue = function (value, state) {\n var unbuildContextStack = buildContextStack(state),\n childCount = node.getChildren().length;\n\n state.activeContext.pop();\n\n value = node.getChildren()[childCount - 1].setValue(value, state);\n\n state.activeContext.push(null);\n\n unbuildContextStack();\n\n return value;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar CompoundExpression = exports.CompoundExpression = {\n create: createNode\n};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Indexer = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\nvar _Stack = __webpack_require__(1);\n\n/**\n * An Indexer can index into some proceeding structure to access a particular piece of it.\n * Supported structures are: strings / collections (lists/sets) / arrays.\n *\n * @author Andy Clement\n * @author Phillip Webb\n * @author Stephane Nicoll\n * @author Ben March\n * @since 0.2.0\n */\n\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction createNode(position, expressionComponents) {\n var node = _SpelNode.SpelNode.create.apply(null, ['indexer', position].concat(expressionComponents));\n\n node.getValue = function (state) {\n var activeContext = state.activeContext,\n context,\n childrenCount = node.getChildren().length,\n i,\n value;\n\n state.activeContext = new _Stack.Stack();\n state.activeContext.push(state.rootContext);\n\n context = state.activeContext.peek();\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to evaluate compound expression with an undefined context.'\n };\n }\n\n for (i = 0; i < childrenCount; i += 1) {\n state.activeContext.push(node.getChildren()[i].getValue(state));\n }\n\n value = state.activeContext.peek();\n\n for (i = 0; i < childrenCount; i += 1) {\n state.activeContext.pop();\n }\n\n state.activeContext = activeContext;\n\n return value;\n };\n\n //node.setContext(node.getValue());\n\n return node;\n}\n\nvar Indexer = exports.Indexer = {\n create: createNode\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Assign = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents assignment. An alternative to calling setValue() for an expression is to use\n * an assign.\n *\n *
Example: 'someNumberProperty=42'\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, property, assignedValue) {\n var node = _SpelNode.SpelNode.create('assign', position, property, assignedValue);\n\n node.getValue = function (state) {\n var context = state.activeContext.peek();\n\n if (!context) {\n throw {\n name: 'ContextDoesNotExistException',\n message: 'Attempting to assign property \\'' + property.getValue(state) + '\\' for an undefined context.'\n };\n }\n\n return property.setValue(assignedValue.getValue(state), state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Assign = exports.Assign = {\n create: createNode\n};\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpEQ = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the equality operator.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-eq', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) === right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpEQ = exports.OpEQ = {\n create: createNode\n};\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpNE = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the not-equal operator.\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-ne', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) !== right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpNE = exports.OpNE = {\n create: createNode\n};\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpGE = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements greater-than-or-equal operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-ge', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) >= right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpGE = exports.OpGE = {\n create: createNode\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpGT = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the greater-than operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-gt', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) > right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpGT = exports.OpGT = {\n create: createNode\n};\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpLE = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the less-than-or-equal operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-le', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) <= right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpLE = exports.OpLE = {\n create: createNode\n};\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpLT = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the less-than operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-lt', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) < right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpLT = exports.OpLT = {\n create: createNode\n};\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpPlus = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * The plus operator will:\n *
\n * - add numbers\n *
- concatenate strings\n *
\n *\n * It can be used as a unary operator for numbers.\n * The standard promotions are performed when the operand types vary (double+int=double).\n * For other options it defers to the registered overloader.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ivo Smid\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-plus', position, left, right);\n\n node.getValue = function (state) {\n if (!right) {\n return +left.getValue(state);\n }\n //javascript will handle string concatenation or addition depending on types\n return left.getValue(state) + right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpPlus = exports.OpPlus = {\n create: createNode\n};\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpMinus = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * The minus operator supports:\n *
\n * - subtraction of numbers\n *
- subtraction of an int from a string of one character\n * (effectively decreasing that character), so 'd'-3='a'\n *
\n *\n * It can be used as a unary operator for numbers.\n * The standard promotions are performed when the operand types vary (double-int=double).\n * For other options it defers to the registered overloader.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-minus', position, left, right);\n\n node.getValue = function (state) {\n if (!right) {\n return -left.getValue(state);\n }\n return left.getValue(state) - right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpMinus = exports.OpMinus = {\n create: createNode\n};\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpMultiply = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the {@code multiply} operator.\n *\n *
Conversions and promotions are handled as defined in\n * Section 5.6.2 of the\n * Java Language Specification, with the addiction of {@code BigDecimal}/{@code BigInteger} management:\n *\n *
If any of the operands is of a reference type, unboxing conversion (Section 5.1.8)\n * is performed. Then:
\n * If either operand is of type {@code BigDecimal}, the other is converted to {@code BigDecimal}.
\n * If either operand is of type double, the other is converted to double.
\n * Otherwise, if either operand is of type float, the other is converted to float.
\n * If either operand is of type {@code BigInteger}, the other is converted to {@code BigInteger}.
\n * Otherwise, if either operand is of type long, the other is converted to long.
\n * Otherwise, both operands are converted to type int.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Sam Brannen\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-multiply', position, left, right);\n\n node.getValue = function (state) {\n var leftValue = left.getValue(state),\n rightValue = right.getValue(state);\n\n if (typeof leftValue === 'number' && typeof rightValue === 'number') {\n return leftValue * rightValue;\n }\n\n //repeats (ex. 'abc' * 2 = 'abcabc')\n if (typeof leftValue === 'string' && typeof rightValue === 'number') {\n var s = '',\n i = 0;\n for (; i < rightValue; i += 1) {\n s += leftValue;\n }\n return s;\n }\n\n return null;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpMultiply = exports.OpMultiply = {\n create: createNode\n};\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpDivide = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements division operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-divide', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) / right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpDivide = exports.OpDivide = {\n create: createNode\n};\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpModulus = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the modulus operator.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-modulus', position, left, right);\n\n node.getValue = function (state) {\n return left.getValue(state) % right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpModulus = exports.OpModulus = {\n create: createNode\n};\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpPower = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * The power operator.\n *\n * @author Andy Clement\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, base, exp) {\n var node = _SpelNode.SpelNode.create('op-power', position, base, exp);\n\n node.getValue = function (state) {\n return Math.pow(base.getValue(state), exp.getValue(state));\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpPower = exports.OpPower = {\n create: createNode\n};\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpInc = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Increment operator. Can be used in a prefix or postfix form. This will throw\n * appropriate exceptions if the operand in question does not support increment.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, postfix, int) {\n var node = _SpelNode.SpelNode.create('op-inc', position, int);\n\n node.getValue = function (state) {\n var cur = int.getValue(state);\n int.setValue(cur + 1, state);\n if (postfix) {\n return cur;\n }\n return cur + 1;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpInc = exports.OpInc = {\n create: createNode\n};\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpDec = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Decrement operator. Can be used in a prefix or postfix form. This will throw\n * appropriate exceptions if the operand in question does not support decrement.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Giovanni Dall'Oglio Risso\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, postfix, int) {\n var node = _SpelNode.SpelNode.create('op-dec', position, int);\n\n node.getValue = function (state) {\n var cur = int.getValue(state);\n int.setValue(cur - 1, state);\n if (postfix) {\n return cur;\n }\n return cur - 1;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpDec = exports.OpDec = {\n create: createNode\n};\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpNot = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a NOT operation.\n *\n * @author Andy Clement\n * @author Mark Fisher\n * @author Oliver Becker\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, expr) {\n var node = _SpelNode.SpelNode.create('op-not', position, expr);\n\n node.getValue = function (state) {\n return !expr.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpNot = exports.OpNot = {\n create: createNode\n};\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpAnd = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents the boolean AND operation.\n *\n * @author Andy Clement\n * @author Mark Fisher\n * @author Oliver Becker\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-and', position, left, right);\n\n node.getValue = function (state) {\n //double bang for javascript\n return !!left.getValue(state) && !!right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpAnd = exports.OpAnd = {\n create: createNode\n};\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpOr = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents the boolean OR operation.\n *\n * @author Andy Clement\n * @author Mark Fisher\n * @author Oliver Becker\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('op-or', position, left, right);\n\n node.getValue = function (state) {\n //double bang for javascript\n return !!left.getValue(state) || !!right.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpOr = exports.OpOr = {\n create: createNode\n};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpMatches = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Implements the matches operator. Matches takes two operands:\n * The first is a String and the second is a Java regex.\n * It will return {@code true} when {@link #getValue} is called\n * if the first operand matches the regex.\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Chris Thielen\n * @since 3.0\n */\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('matches', position, left, right);\n\n /**\n * Check the first operand matches the regex specified as the second operand.\n * @param state the expression state\n * @return {@code true} if the first operand matches the regex specified as the\n * second operand, otherwise {@code false}\n * @throws EvaluationException if there is a problem evaluating the expression\n * (e.g. the regex is invalid)\n */\n node.getValue = function (state) {\n var data = left.getValue(state);\n var regexpString = right.getValue(state);\n\n try {\n var regexp = new RegExp(regexpString);\n return !!regexp.exec(data);\n } catch (error) {\n throw {\n name: 'EvaluationException',\n message: error.toString()\n };\n }\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpMatches = exports.OpMatches = {\n create: createNode\n};\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Ternary = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a ternary expression, for example: \"someCheck()?true:false\".\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, expression, ifTrue, ifFalse) {\n var node = _SpelNode.SpelNode.create('ternary', position, expression, ifTrue, ifFalse);\n\n node.getValue = function (state) {\n return expression.getValue(state) ? ifTrue.getValue(state) : ifFalse.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Ternary = exports.Ternary = {\n create: createNode\n};\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Elvis = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents the elvis operator ?:. For an expression \"a?:b\" if a is not null, the value\n * of the expression is \"a\", if a is null then the value of the expression is \"b\".\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, expression, ifFalse) {\n var node = _SpelNode.SpelNode.create('elvis', position, expression, ifFalse);\n\n node.getValue = function (state) {\n return expression.getValue(state) !== null ? expression.getValue(state) : ifFalse.getValue(state);\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Elvis = exports.Elvis = {\n create: createNode\n};\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.InlineList = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represent a list in an expression, e.g. '{1,2,3}'\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, elements) {\n var node = _SpelNode.SpelNode.create('list', position),\n list = [].concat(elements || []);\n\n node.getRaw = function () {\n return list;\n };\n\n node.getValue = function (state) {\n return list.map(function (element) {\n return element.getValue(state);\n });\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar InlineList = exports.InlineList = {\n create: createNode\n};\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.InlineMap = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represent a map in an expression, e.g. '{name:'foo',age:12}'\n *\n * @author Andy Clement\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction createNode(position, elements) {\n var node = _SpelNode.SpelNode.create('map', position),\n mapPieces = [].concat(elements || []);\n\n node.getValue = function (state) {\n var key = true,\n keyValue = null,\n map = {};\n\n mapPieces.forEach(function (piece) {\n if (key) {\n //unquoted property names come as type \"property\" but should be treated as strings\n if (piece.getType() === 'property') {\n keyValue = piece.getName();\n } else {\n keyValue = piece.getValue(state);\n }\n } else {\n map[keyValue] = piece.getValue(state);\n }\n key = !key;\n });\n\n return map;\n };\n\n return node;\n} /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar InlineMap = exports.InlineMap = {\n create: createNode\n};\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Selection = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents selection over a map or collection.\n * For example: {1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this) == 'y'} returns [2, 4, 6, 8, 10]\n *\n *
Basically a subset of the input data is returned based on the\n * evaluation of the expression supplied as selection criteria.\n *\n * @author Andy Clement\n * @author Mark Fisher\n * @author Sam Brannen\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction matches(element, expr, state) {\n var doesMatch = false;\n state.activeContext.push(element);\n doesMatch = expr.getValue(state);\n state.activeContext.pop();\n return doesMatch;\n}\n\nfunction selectFromArray(collection, whichElement, expr, state) {\n var newCollection = collection.filter(function (element) {\n return matches(element, expr, state);\n });\n\n switch (whichElement) {\n case 'ALL':\n return newCollection;\n case 'FIRST':\n return newCollection[0] || null;\n case 'LAST':\n if (newCollection.length) {\n return newCollection[newCollection.length - 1];\n }\n return null;\n }\n}\n\nfunction selectFromMap(collection, whichElement, expr, state) {\n var newCollection = {},\n entry,\n key,\n entries = [],\n returnValue = {};\n\n for (key in collection) {\n if (collection.hasOwnProperty(key)) {\n entry = {\n key: key,\n value: collection[key]\n };\n if (matches(entry, expr, state)) {\n entries.push(entry);\n }\n }\n }\n\n switch (whichElement) {\n case 'ALL':\n entries.forEach(function (entry) {\n newCollection[entry.key] = entry.value;\n });\n return newCollection;\n case 'FIRST':\n if (entries.length) {\n returnValue[entries[0].key] = entries[0].value;\n return returnValue;\n }\n return null;\n case 'LAST':\n if (entries.length) {\n returnValue[entries[entries.length - 1].key] = entries[entries.length - 1].value;\n return returnValue;\n }\n return null;\n }\n\n entries.forEach(function (entry) {\n newCollection[entry.key] = entry.value;\n });\n}\n\nfunction createNode(nullSafeNavigation, whichElement, position, expr) {\n var node = _SpelNode.SpelNode.create('selection', position, expr);\n\n node.getValue = function (state) {\n var collection = state.activeContext.peek();\n\n if (collection) {\n if (Array.isArray(collection)) {\n return selectFromArray(collection, whichElement, expr, state);\n } else if ((typeof collection === 'undefined' ? 'undefined' : _typeof(collection)) === 'object') {\n return selectFromMap(collection, whichElement, expr, state);\n }\n }\n\n return null;\n };\n\n return node;\n}\n\nvar Selection = exports.Selection = {\n create: createNode,\n FIRST: 'FIRST',\n LAST: 'LAST',\n ALL: 'ALL'\n};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Projection = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents projection, where a given operation is performed on all elements in some\n * input sequence, returning a new sequence of the same size. For example:\n * \"{1,2,3,4,5,6,7,8,9,10}.!{#isEven(#this)}\" returns \"[n, y, n, y, n, y, n, y, n, y]\"\n *\n * @author Andy Clement\n * @author Mark Fisher\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction projectCollection(collection, expr, state) {\n return collection.map(function (element) {\n var matches;\n state.activeContext.push(element);\n matches = expr.getValue(state);\n state.activeContext.pop();\n return matches;\n });\n}\n\nfunction createNode(nullSafeNavigation, position, expr) {\n var node = _SpelNode.SpelNode.create('projection', position, expr);\n\n node.getValue = function (state) {\n var collection = state.activeContext.peek(),\n entries = [],\n key;\n\n if (Array.isArray(collection)) {\n return projectCollection(collection, expr, state);\n } else if ((typeof collection === 'undefined' ? 'undefined' : _typeof(collection)) === 'object') {\n for (key in collection) {\n if (collection.hasOwnProperty(key)) {\n entries.push(collection[key]);\n }\n }\n return projectCollection(entries, expr, state);\n }\n\n return null;\n };\n\n return node;\n}\n\nvar Projection = exports.Projection = {\n create: createNode\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpInstanceof = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * The operator 'instanceof' checks if an object is of the class specified in the right\n * hand operand, in the same way that {@code instanceof} does in Java.\n *\n * THIS OPERATOR IS NOT IMPLEMENTED AND WILL THROW AN EXCEPTION\n *\n * @author Andy Clement\n * @since 3.0\n */\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('instanceof', position, left, right);\n\n /**\n * Compare the left operand to see it is an instance of the type specified as the\n * right operand. The right operand must be a class.\n * @param state the expression state\n * @return {@code true} if the left operand is an instanceof of the right operand,\n * otherwise {@code false}\n * @throws EvaluationException if there is a problem evaluating the expression\n */\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'OpInstanceOf: Not implemented'\n };\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpInstanceof = exports.OpInstanceof = {\n create: createNode\n};\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.OpBetween = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents the between operator. The left operand to between must be a single value and\n * the right operand must be a list - this operator returns true if the left operand is\n * between (using the registered comparator) the two elements in the list. The definition\n * of between being inclusive follows the SQL BETWEEN definition.\n *\n * @author Andy Clement\n * @since 3.0\n */\nfunction createNode(position, left, right) {\n var node = _SpelNode.SpelNode.create('between', position, left, right);\n\n /**\n * Returns a boolean based on whether a value is in the range expressed. The first\n * operand is any value whilst the second is a list of two values - those two values\n * being the bounds allowed for the first operand (inclusive).\n * @param state the expression state\n * @return true if the left operand is in the range specified, false otherwise\n * @throws EvaluationException if there is a problem evaluating the expression\n */\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'OpBetween: Not implemented'\n };\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar OpBetween = exports.OpBetween = {\n create: createNode\n};\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TypeReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a reference to a type, for example\n * {@code \"T(String)\" or \"T(com.somewhere.Foo)\"}.\n *\n * @author Andy Clement\n */\nfunction createNode(position, node, _dims) {\n var node = _SpelNode.SpelNode.create('typeref', position, node);\n\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'TypeReference: Not implemented'\n };\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar TypeReference = exports.TypeReference = {\n create: createNode\n};\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BeanReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * Represents a bean reference to a type, for example @foo or @'foo.bar'.\n * For a FactoryBean the syntax &foo can be used to access the factory itself.\n *\n * @author Andy Clement\n */\nfunction createNode(position, beanName) {\n var node = _SpelNode.SpelNode.create('beanref', position);\n\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'BeanReference: Not implemented'\n };\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar BeanReference = exports.BeanReference = {\n create: createNode\n};\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Identifier = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\n/**\n * An 'identifier' {@link SpelNode}.\n *\n * @author Andy Clement\n * @since 3.0\n */\nfunction createNode(identifierName, position) {\n var node = _SpelNode.SpelNode.create('identifier', position);\n\n node.getRaw = function () {\n return identifierName;\n };\n\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'Identifier: Not implemented'\n };\n };\n\n return node;\n} /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Identifier = exports.Identifier = {\n create: createNode\n};\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.QualifiedIdentifier = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Represents a dot separated sequence of strings that indicate a package qualified type\n * reference.\n *\n *
Example: \"java.lang.String\" as in the expression \"new java.lang.String('hello')\"\n *\n * @author Andy Clement\n * @since 3.0\n */\nfunction createNode(position, pieces) {\n var node = _SpelNode.SpelNode.create.apply(_SpelNode.SpelNode, ['qualifiedidentifier', position].concat(_toConsumableArray(pieces)));\n\n node.getRaw = function () {\n return pieces.map(function (p) {\n return p.getRaw();\n });\n };\n\n node.getValue = function (state) {\n throw {\n name: 'MethodNotImplementedException',\n message: 'QualifiedIdentifier: Not implemented'\n };\n };\n\n return node;\n}\n\nvar QualifiedIdentifier = exports.QualifiedIdentifier = {\n create: createNode\n};\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ConstructorReference = undefined;\n\nvar _SpelNode = __webpack_require__(0);\n\nvar _Stack = __webpack_require__(1);\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } /*\n * Copyright 2002-2019 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Represents the invocation of a constructor. Either a constructor on a regular type or\n * construction of an array. When an array is constructed, an initializer can be specified.\n *\n *
Examples:
\n * new String('hello world')
\n * new int[]{1,2,3,4}
\n * new int[3] new int[3]{1,2,3}\n *\n * @author Andy Clement\n * @author Juergen Hoeller\n * @since 3.0\n */\nfunction createNode(position, dimensions, nodes) {\n var isArray = nodes !== undefined;\n var dimension;\n if (isArray) {\n dimension = dimensions.length && dimensions[0] && dimensions[0].getType() === 'number' ? dimensions[0].getValue() : null;\n } else {\n nodes = dimensions;\n dimensions = undefined;\n }\n\n var _nodes = nodes,\n _nodes2 = _toArray(_nodes),\n _qualifiedIdentifier = _nodes2[0],\n args = _nodes2.slice(1);\n\n var node = _SpelNode.SpelNode.create.apply(_SpelNode.SpelNode, ['constructorref', position].concat(_toConsumableArray(nodes)));\n\n node.getRaw = function () {\n return dimension;\n };\n\n node.getValue = function (state) {\n if (isArray && args.length <= 1) {\n var compiledArgs = [];\n\n //populate arguments\n args.forEach(function (arg) {\n // reset the active context to root context for evaluating argument\n var currentActiveContext = state.activeContext;\n state.activeContext = new _Stack.Stack();\n state.activeContext.push(state.rootContext);\n\n // evaluate argument\n compiledArgs.push(arg.getValue(state));\n\n // reset the active context\n state.activeContext = currentActiveContext;\n });\n\n if (args.length === 1) {\n return compiledArgs[0];\n } else {\n return dimension ? new Array(dimension) : [];\n }\n }\n\n throw {\n name: 'MethodNotImplementedException',\n message: 'ConstructorReference: Not implemented'\n };\n };\n\n return node;\n}\n\nvar ConstructorReference = exports.ConstructorReference = {\n create: createNode\n};\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright 2002-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @author Ben March\n * @since 0.2.0\n */\n\nfunction create(authentication, principal) {\n var context = {};\n\n context.authentication = authentication || {};\n context.principal = principal || {};\n\n context.hasRole = function (role) {\n var hasRole = false;\n\n if (!role) {\n return false;\n }\n if (!context.authentication && !Array.isArray(context.authentication.authorities)) {\n return false;\n }\n\n context.authentication.authorities.forEach(function (grantedAuthority) {\n if (grantedAuthority.authority.toLowerCase() === role.toLowerCase()) {\n hasRole = true;\n }\n });\n\n return hasRole;\n };\n\n context.hasPermission = function () /*variable arguments*/{\n var args = Array.prototype.slice.call(arguments);\n\n if (args.length === 1) {\n return context.hasRole(args[0]);\n }\n };\n\n return context;\n}\n\nvar StandardContext = exports.StandardContext = {\n create: create\n};\n\n/***/ })\n/******/ ]);\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _includes = _interopRequireDefault(require(\"lodash/includes\"));\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nvar _Indentation = _interopRequireDefault(require(\"./Indentation\"));\n\nvar _InlineBlock = _interopRequireDefault(require(\"./InlineBlock\"));\n\nvar _Params = _interopRequireDefault(require(\"./Params\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar trimSpacesEnd = function trimSpacesEnd(str) {\n return str.replace(/[\\t ]+$/, '');\n};\n\nvar Formatter =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg\r\n * @param {String} cfg.language\r\n * @param {String} cfg.indent\r\n * @param {Bool} cfg.uppercase\r\n * @param {Integer} cfg.linesBetweenQueries\r\n * @param {Object} cfg.params\r\n * @param {Tokenizer} tokenizer\r\n */\n function Formatter(cfg, tokenizer, tokenOverride) {\n _classCallCheck(this, Formatter);\n\n this.cfg = cfg || {};\n this.indentation = new _Indentation[\"default\"](this.cfg.indent);\n this.inlineBlock = new _InlineBlock[\"default\"]();\n this.params = new _Params[\"default\"](this.cfg.params);\n this.tokenizer = tokenizer;\n this.tokenOverride = tokenOverride;\n this.previousReservedWord = {};\n this.tokens = [];\n this.index = 0;\n }\n /**\r\n * Formats whitespace in a SQL string to make it easier to read.\r\n *\r\n * @param {String} query The SQL query string\r\n * @return {String} formatted query\r\n */\n\n\n _createClass(Formatter, [{\n key: \"format\",\n value: function format(query) {\n this.tokens = this.tokenizer.tokenize(query);\n var formattedQuery = this.getFormattedQueryFromTokens();\n return formattedQuery.trim();\n }\n }, {\n key: \"getFormattedQueryFromTokens\",\n value: function getFormattedQueryFromTokens() {\n var _this = this;\n\n var formattedQuery = '';\n this.tokens.forEach(function (token, index) {\n _this.index = index;\n if (_this.tokenOverride) token = _this.tokenOverride(token, _this.previousReservedWord) || token;\n\n if (token.type === _tokenTypes[\"default\"].WHITESPACE) {// ignore (we do our own whitespace formatting)\n } else if (token.type === _tokenTypes[\"default\"].LINE_COMMENT) {\n formattedQuery = _this.formatLineComment(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].BLOCK_COMMENT) {\n formattedQuery = _this.formatBlockComment(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL) {\n formattedQuery = _this.formatTopLevelReservedWord(token, formattedQuery);\n _this.previousReservedWord = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL_NO_INDENT) {\n formattedQuery = _this.formatTopLevelReservedWordNoIndent(token, formattedQuery);\n _this.previousReservedWord = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_NEWLINE) {\n formattedQuery = _this.formatNewlineReservedWord(token, formattedQuery);\n _this.previousReservedWord = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED) {\n formattedQuery = _this.formatWithSpaces(token, formattedQuery);\n _this.previousReservedWord = token;\n } else if (token.type === _tokenTypes[\"default\"].OPEN_PAREN) {\n formattedQuery = _this.formatOpeningParentheses(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].CLOSE_PAREN) {\n formattedQuery = _this.formatClosingParentheses(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].PLACEHOLDER) {\n formattedQuery = _this.formatPlaceholder(token, formattedQuery);\n } else if (token.value === ',') {\n formattedQuery = _this.formatComma(token, formattedQuery);\n } else if (token.value === ':') {\n formattedQuery = _this.formatWithSpaceAfter(token, formattedQuery);\n } else if (token.value === '.') {\n formattedQuery = _this.formatWithoutSpaces(token, formattedQuery);\n } else if (token.value === ';') {\n formattedQuery = _this.formatQuerySeparator(token, formattedQuery);\n } else {\n formattedQuery = _this.formatWithSpaces(token, formattedQuery);\n }\n });\n return formattedQuery;\n }\n }, {\n key: \"formatLineComment\",\n value: function formatLineComment(token, query) {\n return this.addNewline(query + token.value);\n }\n }, {\n key: \"formatBlockComment\",\n value: function formatBlockComment(token, query) {\n return this.addNewline(this.addNewline(query) + this.indentComment(token.value));\n }\n }, {\n key: \"indentComment\",\n value: function indentComment(comment) {\n return comment.replace(/\\n[\\t ]*/g, '\\n' + this.indentation.getIndent() + ' ');\n }\n }, {\n key: \"formatTopLevelReservedWordNoIndent\",\n value: function formatTopLevelReservedWordNoIndent(token, query) {\n this.indentation.decreaseTopLevel();\n query = this.addNewline(query) + this.equalizeWhitespace(this.formatReservedWord(token.value));\n return this.addNewline(query);\n }\n }, {\n key: \"formatTopLevelReservedWord\",\n value: function formatTopLevelReservedWord(token, query) {\n this.indentation.decreaseTopLevel();\n query = this.addNewline(query);\n this.indentation.increaseTopLevel();\n query += this.equalizeWhitespace(this.formatReservedWord(token.value));\n return this.addNewline(query);\n }\n }, {\n key: \"formatNewlineReservedWord\",\n value: function formatNewlineReservedWord(token, query) {\n return this.addNewline(query) + this.equalizeWhitespace(this.formatReservedWord(token.value)) + ' ';\n } // Replace any sequence of whitespace characters with single space\n\n }, {\n key: \"equalizeWhitespace\",\n value: function equalizeWhitespace(string) {\n return string.replace(/[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]+/g, ' ');\n } // Opening parentheses increase the block indent level and start a new line\n\n }, {\n key: \"formatOpeningParentheses\",\n value: function formatOpeningParentheses(token, query) {\n // Take out the preceding space unless there was whitespace there in the original query\n // or another opening parens or line comment\n var preserveWhitespaceFor = [_tokenTypes[\"default\"].WHITESPACE, _tokenTypes[\"default\"].OPEN_PAREN, _tokenTypes[\"default\"].LINE_COMMENT];\n\n if (!(0, _includes[\"default\"])(preserveWhitespaceFor, this.previousToken().type)) {\n query = trimSpacesEnd(query);\n }\n\n query += this.cfg.uppercase ? token.value.toUpperCase() : token.value;\n this.inlineBlock.beginIfPossible(this.tokens, this.index);\n\n if (!this.inlineBlock.isActive()) {\n this.indentation.increaseBlockLevel();\n query = this.addNewline(query);\n }\n\n return query;\n } // Closing parentheses decrease the block indent level\n\n }, {\n key: \"formatClosingParentheses\",\n value: function formatClosingParentheses(token, query) {\n token.value = this.cfg.uppercase ? token.value.toUpperCase() : token.value;\n\n if (this.inlineBlock.isActive()) {\n this.inlineBlock.end();\n return this.formatWithSpaceAfter(token, query);\n } else {\n this.indentation.decreaseBlockLevel();\n return this.formatWithSpaces(token, this.addNewline(query));\n }\n }\n }, {\n key: \"formatPlaceholder\",\n value: function formatPlaceholder(token, query) {\n return query + this.params.get(token) + ' ';\n } // Commas start a new line (unless within inline parentheses or SQL \"LIMIT\" clause)\n\n }, {\n key: \"formatComma\",\n value: function formatComma(token, query) {\n query = trimSpacesEnd(query) + token.value + ' ';\n\n if (this.inlineBlock.isActive()) {\n return query;\n } else if (/^LIMIT$/i.test(this.previousReservedWord.value)) {\n return query;\n } else {\n return this.addNewline(query);\n }\n }\n }, {\n key: \"formatWithSpaceAfter\",\n value: function formatWithSpaceAfter(token, query) {\n return trimSpacesEnd(query) + token.value + ' ';\n }\n }, {\n key: \"formatWithoutSpaces\",\n value: function formatWithoutSpaces(token, query) {\n return trimSpacesEnd(query) + token.value;\n }\n }, {\n key: \"formatWithSpaces\",\n value: function formatWithSpaces(token, query) {\n var value = token.type === 'reserved' ? this.formatReservedWord(token.value) : token.value;\n return query + value + ' ';\n }\n }, {\n key: \"formatReservedWord\",\n value: function formatReservedWord(value) {\n return this.cfg.uppercase ? value.toUpperCase() : value;\n }\n }, {\n key: \"formatQuerySeparator\",\n value: function formatQuerySeparator(token, query) {\n this.indentation.resetIndentation();\n return trimSpacesEnd(query) + token.value + '\\n'.repeat(this.cfg.linesBetweenQueries || 1);\n }\n }, {\n key: \"addNewline\",\n value: function addNewline(query) {\n query = trimSpacesEnd(query);\n if (!query.endsWith('\\n')) query += '\\n';\n return query + this.indentation.getIndent();\n }\n }, {\n key: \"previousToken\",\n value: function previousToken() {\n var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n return this.tokens[this.index - offset] || {};\n }\n }]);\n\n return Formatter;\n}();\n\nexports[\"default\"] = Formatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _repeat = _interopRequireDefault(require(\"lodash/repeat\"));\n\nvar _last = _interopRequireDefault(require(\"lodash/last\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar INDENT_TYPE_TOP_LEVEL = 'top-level';\nvar INDENT_TYPE_BLOCK_LEVEL = 'block-level';\n/**\r\n * Manages indentation levels.\r\n *\r\n * There are two types of indentation levels:\r\n *\r\n * - BLOCK_LEVEL : increased by open-parenthesis\r\n * - TOP_LEVEL : increased by RESERVED_TOP_LEVEL words\r\n */\n\nvar Indentation =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {String} indent Indent value, default is \" \" (2 spaces)\r\n */\n function Indentation(indent) {\n _classCallCheck(this, Indentation);\n\n this.indent = indent || ' ';\n this.indentTypes = [];\n }\n /**\r\n * Returns current indentation string.\r\n * @return {String}\r\n */\n\n\n _createClass(Indentation, [{\n key: \"getIndent\",\n value: function getIndent() {\n return (0, _repeat[\"default\"])(this.indent, this.indentTypes.length);\n }\n /**\r\n * Increases indentation by one top-level indent.\r\n */\n\n }, {\n key: \"increaseTopLevel\",\n value: function increaseTopLevel() {\n this.indentTypes.push(INDENT_TYPE_TOP_LEVEL);\n }\n /**\r\n * Increases indentation by one block-level indent.\r\n */\n\n }, {\n key: \"increaseBlockLevel\",\n value: function increaseBlockLevel() {\n this.indentTypes.push(INDENT_TYPE_BLOCK_LEVEL);\n }\n /**\r\n * Decreases indentation by one top-level indent.\r\n * Does nothing when the previous indent is not top-level.\r\n */\n\n }, {\n key: \"decreaseTopLevel\",\n value: function decreaseTopLevel() {\n if ((0, _last[\"default\"])(this.indentTypes) === INDENT_TYPE_TOP_LEVEL) {\n this.indentTypes.pop();\n }\n }\n /**\r\n * Decreases indentation by one block-level indent.\r\n * If there are top-level indents within the block-level indent,\r\n * throws away these as well.\r\n */\n\n }, {\n key: \"decreaseBlockLevel\",\n value: function decreaseBlockLevel() {\n while (this.indentTypes.length > 0) {\n var type = this.indentTypes.pop();\n\n if (type !== INDENT_TYPE_TOP_LEVEL) {\n break;\n }\n }\n }\n }, {\n key: \"resetIndentation\",\n value: function resetIndentation() {\n this.indentTypes = [];\n }\n }]);\n\n return Indentation;\n}();\n\nexports[\"default\"] = Indentation;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar INLINE_MAX_LENGTH = 50;\n/**\r\n * Bookkeeper for inline blocks.\r\n *\r\n * Inline blocks are parenthesized expressions that are shorter than INLINE_MAX_LENGTH.\r\n * These blocks are formatted on a single line, unlike longer parenthesized\r\n * expressions where open-parenthesis causes newline and increase of indentation.\r\n */\n\nvar InlineBlock =\n/*#__PURE__*/\nfunction () {\n function InlineBlock() {\n _classCallCheck(this, InlineBlock);\n\n this.level = 0;\n }\n /**\r\n * Begins inline block when lookahead through upcoming tokens determines\r\n * that the block would be smaller than INLINE_MAX_LENGTH.\r\n * @param {Object[]} tokens Array of all tokens\r\n * @param {Number} index Current token position\r\n */\n\n\n _createClass(InlineBlock, [{\n key: \"beginIfPossible\",\n value: function beginIfPossible(tokens, index) {\n if (this.level === 0 && this.isInlineBlock(tokens, index)) {\n this.level = 1;\n } else if (this.level > 0) {\n this.level++;\n } else {\n this.level = 0;\n }\n }\n /**\r\n * Finishes current inline block.\r\n * There might be several nested ones.\r\n */\n\n }, {\n key: \"end\",\n value: function end() {\n this.level--;\n }\n /**\r\n * True when inside an inline block\r\n * @return {Boolean}\r\n */\n\n }, {\n key: \"isActive\",\n value: function isActive() {\n return this.level > 0;\n } // Check if this should be an inline parentheses block\n // Examples are \"NOW()\", \"COUNT(*)\", \"int(10)\", key(`some_column`), DECIMAL(7,2)\n\n }, {\n key: \"isInlineBlock\",\n value: function isInlineBlock(tokens, index) {\n var length = 0;\n var level = 0;\n\n for (var i = index; i < tokens.length; i++) {\n var token = tokens[i];\n length += token.value.length; // Overran max length\n\n if (length > INLINE_MAX_LENGTH) {\n return false;\n }\n\n if (token.type === _tokenTypes[\"default\"].OPEN_PAREN) {\n level++;\n } else if (token.type === _tokenTypes[\"default\"].CLOSE_PAREN) {\n level--;\n\n if (level === 0) {\n return true;\n }\n }\n\n if (this.isForbiddenToken(token)) {\n return false;\n }\n }\n\n return false;\n } // Reserved words that cause newlines, comments and semicolons\n // are not allowed inside inline parentheses block\n\n }, {\n key: \"isForbiddenToken\",\n value: function isForbiddenToken(_ref) {\n var type = _ref.type,\n value = _ref.value;\n return type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL || type === _tokenTypes[\"default\"].RESERVED_NEWLINE || type === _tokenTypes[\"default\"].COMMENT || type === _tokenTypes[\"default\"].BLOCK_COMMENT || value === ';';\n }\n }]);\n\n return InlineBlock;\n}();\n\nexports[\"default\"] = InlineBlock;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\r\n * Handles placeholder replacement with given params.\r\n */\nvar Params =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} params\r\n */\n function Params(params) {\n _classCallCheck(this, Params);\n\n this.params = params;\n this.index = 0;\n }\n /**\r\n * Returns param value that matches given placeholder with param key.\r\n * @param {Object} token\r\n * @param {String} token.key Placeholder key\r\n * @param {String} token.value Placeholder value\r\n * @return {String} param or token.value when params are missing\r\n */\n\n\n _createClass(Params, [{\n key: \"get\",\n value: function get(_ref) {\n var key = _ref.key,\n value = _ref.value;\n\n if (!this.params) {\n return value;\n }\n\n if (key) {\n return this.params[key];\n }\n\n return this.params[this.index++];\n }\n }]);\n\n return Params;\n}();\n\nexports[\"default\"] = Params;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _isEmpty = _interopRequireDefault(require(\"lodash/isEmpty\"));\n\nvar _escapeRegExp = _interopRequireDefault(require(\"lodash/escapeRegExp\"));\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Tokenizer =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg\r\n * @param {String[]} cfg.reservedWords Reserved words in SQL\r\n * @param {String[]} cfg.reservedTopLevelWords Words that are set to new line separately\r\n * @param {String[]} cfg.reservedNewlineWords Words that are set to newline\r\n * @param {String[]} cfg.reservedTopLevelWordsNoIndent Words that are top level but have no indentation\r\n * @param {String[]} cfg.stringTypes String types to enable: \"\", '', ``, [], N''\r\n * @param {String[]} cfg.openParens Opening parentheses to enable, like (, [\r\n * @param {String[]} cfg.closeParens Closing parentheses to enable, like ), ]\r\n * @param {String[]} cfg.indexedPlaceholderTypes Prefixes for indexed placeholders, like ?\r\n * @param {String[]} cfg.namedPlaceholderTypes Prefixes for named placeholders, like @ and :\r\n * @param {String[]} cfg.lineCommentTypes Line comments to enable, like # and --\r\n * @param {String[]} cfg.specialWordChars Special chars that can be found inside of words, like @ and #\r\n */\n function Tokenizer(cfg) {\n _classCallCheck(this, Tokenizer);\n\n this.WHITESPACE_REGEX = /^([\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]+)/;\n this.NUMBER_REGEX = /^((\\x2D[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]*)?[0-9]+(\\.[0-9]+)?|0x[0-9A-Fa-f]+|0b[01]+)\\b/;\n this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\\|\\||::|\\x2D>>|\\x2D>|~~\\*|~~|!~~\\*|!~~|~\\*|!~\\*|!~|:=|(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))/;\n this.BLOCK_COMMENT_REGEX = /^(\\/\\*(?:[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*?(?:\\*\\/|$))/;\n this.LINE_COMMENT_REGEX = this.createLineCommentRegex(cfg.lineCommentTypes);\n this.RESERVED_TOP_LEVEL_REGEX = this.createReservedWordRegex(cfg.reservedTopLevelWords);\n this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX = this.createReservedWordRegex(cfg.reservedTopLevelWordsNoIndent);\n this.RESERVED_NEWLINE_REGEX = this.createReservedWordRegex(cfg.reservedNewlineWords);\n this.RESERVED_PLAIN_REGEX = this.createReservedWordRegex(cfg.reservedWords);\n this.WORD_REGEX = this.createWordRegex(cfg.specialWordChars);\n this.STRING_REGEX = this.createStringRegex(cfg.stringTypes);\n this.OPEN_PAREN_REGEX = this.createParenRegex(cfg.openParens);\n this.CLOSE_PAREN_REGEX = this.createParenRegex(cfg.closeParens);\n this.INDEXED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(cfg.indexedPlaceholderTypes, '[0-9]*');\n this.IDENT_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(cfg.namedPlaceholderTypes, '[a-zA-Z0-9._$]+');\n this.STRING_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(cfg.namedPlaceholderTypes, this.createStringPattern(cfg.stringTypes));\n }\n\n _createClass(Tokenizer, [{\n key: \"createLineCommentRegex\",\n value: function createLineCommentRegex(lineCommentTypes) {\n return new RegExp(\"^((?:\".concat(lineCommentTypes.map(function (c) {\n return (0, _escapeRegExp[\"default\"])(c);\n }).join('|'), \").*?(?:\\r\\n|\\r|\\n|$))\"), 'u');\n }\n }, {\n key: \"createReservedWordRegex\",\n value: function createReservedWordRegex(reservedWords) {\n var reservedWordsPattern = reservedWords.join('|').replace(/ /g, '\\\\s+');\n return new RegExp(\"^(\".concat(reservedWordsPattern, \")\\\\b\"), 'iu');\n }\n }, {\n key: \"createWordRegex\",\n value: function createWordRegex() {\n var specialChars = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return new RegExp(\"^([\\\\p{Alphabetic}\\\\p{Mark}\\\\p{Decimal_Number}\\\\p{Connector_Punctuation}\\\\p{Join_Control}\".concat(specialChars.join(''), \"]+)\"), 'u');\n }\n }, {\n key: \"createStringRegex\",\n value: function createStringRegex(stringTypes) {\n return new RegExp('^(' + this.createStringPattern(stringTypes) + ')', 'u');\n } // This enables the following string patterns:\n // 1. backtick quoted string using `` to escape\n // 2. square bracket quoted string (SQL Server) using ]] to escape\n // 3. double quoted string using \"\" or \\\" to escape\n // 4. single quoted string using '' or \\' to escape\n // 5. national character quoted string using N'' or N\\' to escape\n\n }, {\n key: \"createStringPattern\",\n value: function createStringPattern(stringTypes) {\n var patterns = {\n '``': '((`[^`]*($|`))+)',\n '[]': '((\\\\[[^\\\\]]*($|\\\\]))(\\\\][^\\\\]]*($|\\\\]))*)',\n '\"\"': '((\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*(\"|$))+)',\n \"''\": \"(('[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*('|$))+)\",\n \"N''\": \"((N'[^N'\\\\\\\\]*(?:\\\\\\\\.[^N'\\\\\\\\]*)*('|$))+)\"\n };\n return stringTypes.map(function (t) {\n return patterns[t];\n }).join('|');\n }\n }, {\n key: \"createParenRegex\",\n value: function createParenRegex(parens) {\n var _this = this;\n\n return new RegExp('^(' + parens.map(function (p) {\n return _this.escapeParen(p);\n }).join('|') + ')', 'iu');\n }\n }, {\n key: \"escapeParen\",\n value: function escapeParen(paren) {\n if (paren.length === 1) {\n // A single punctuation character\n return (0, _escapeRegExp[\"default\"])(paren);\n } else {\n // longer word\n return '\\\\b' + paren + '\\\\b';\n }\n }\n }, {\n key: \"createPlaceholderRegex\",\n value: function createPlaceholderRegex(types, pattern) {\n if ((0, _isEmpty[\"default\"])(types)) {\n return false;\n }\n\n var typesRegex = types.map(_escapeRegExp[\"default\"]).join('|');\n return new RegExp(\"^((?:\".concat(typesRegex, \")(?:\").concat(pattern, \"))\"), 'u');\n }\n /**\r\n * Takes a SQL string and breaks it into tokens.\r\n * Each token is an object with type and value.\r\n *\r\n * @param {String} input The SQL string\r\n * @return {Object[]} tokens An array of tokens.\r\n * @return {String} token.type\r\n * @return {String} token.value\r\n */\n\n }, {\n key: \"tokenize\",\n value: function tokenize(input) {\n if (!input) return [];\n var tokens = [];\n var token; // Keep processing the string until it is empty\n\n while (input.length) {\n // Get the next token and the token type\n token = this.getNextToken(input, token); // Advance the string\n\n input = input.substring(token.value.length);\n tokens.push(token);\n }\n\n return tokens;\n }\n }, {\n key: \"getNextToken\",\n value: function getNextToken(input, previousToken) {\n return this.getWhitespaceToken(input) || this.getCommentToken(input) || this.getStringToken(input) || this.getOpenParenToken(input) || this.getCloseParenToken(input) || this.getPlaceholderToken(input) || this.getNumberToken(input) || this.getReservedWordToken(input, previousToken) || this.getWordToken(input) || this.getOperatorToken(input);\n }\n }, {\n key: \"getWhitespaceToken\",\n value: function getWhitespaceToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].WHITESPACE,\n regex: this.WHITESPACE_REGEX\n });\n }\n }, {\n key: \"getCommentToken\",\n value: function getCommentToken(input) {\n return this.getLineCommentToken(input) || this.getBlockCommentToken(input);\n }\n }, {\n key: \"getLineCommentToken\",\n value: function getLineCommentToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].LINE_COMMENT,\n regex: this.LINE_COMMENT_REGEX\n });\n }\n }, {\n key: \"getBlockCommentToken\",\n value: function getBlockCommentToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].BLOCK_COMMENT,\n regex: this.BLOCK_COMMENT_REGEX\n });\n }\n }, {\n key: \"getStringToken\",\n value: function getStringToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].STRING,\n regex: this.STRING_REGEX\n });\n }\n }, {\n key: \"getOpenParenToken\",\n value: function getOpenParenToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].OPEN_PAREN,\n regex: this.OPEN_PAREN_REGEX\n });\n }\n }, {\n key: \"getCloseParenToken\",\n value: function getCloseParenToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].CLOSE_PAREN,\n regex: this.CLOSE_PAREN_REGEX\n });\n }\n }, {\n key: \"getPlaceholderToken\",\n value: function getPlaceholderToken(input) {\n return this.getIdentNamedPlaceholderToken(input) || this.getStringNamedPlaceholderToken(input) || this.getIndexedPlaceholderToken(input);\n }\n }, {\n key: \"getIdentNamedPlaceholderToken\",\n value: function getIdentNamedPlaceholderToken(input) {\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.IDENT_NAMED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return v.slice(1);\n }\n });\n }\n }, {\n key: \"getStringNamedPlaceholderToken\",\n value: function getStringNamedPlaceholderToken(input) {\n var _this2 = this;\n\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.STRING_NAMED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return _this2.getEscapedPlaceholderKey({\n key: v.slice(2, -1),\n quoteChar: v.slice(-1)\n });\n }\n });\n }\n }, {\n key: \"getIndexedPlaceholderToken\",\n value: function getIndexedPlaceholderToken(input) {\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.INDEXED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return v.slice(1);\n }\n });\n }\n }, {\n key: \"getPlaceholderTokenWithKey\",\n value: function getPlaceholderTokenWithKey(_ref) {\n var input = _ref.input,\n regex = _ref.regex,\n parseKey = _ref.parseKey;\n var token = this.getTokenOnFirstMatch({\n input: input,\n regex: regex,\n type: _tokenTypes[\"default\"].PLACEHOLDER\n });\n\n if (token) {\n token.key = parseKey(token.value);\n }\n\n return token;\n }\n }, {\n key: \"getEscapedPlaceholderKey\",\n value: function getEscapedPlaceholderKey(_ref2) {\n var key = _ref2.key,\n quoteChar = _ref2.quoteChar;\n return key.replace(new RegExp((0, _escapeRegExp[\"default\"])('\\\\' + quoteChar), 'gu'), quoteChar);\n } // Decimal, binary, or hex numbers\n\n }, {\n key: \"getNumberToken\",\n value: function getNumberToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].NUMBER,\n regex: this.NUMBER_REGEX\n });\n } // Punctuation and symbols\n\n }, {\n key: \"getOperatorToken\",\n value: function getOperatorToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].OPERATOR,\n regex: this.OPERATOR_REGEX\n });\n }\n }, {\n key: \"getReservedWordToken\",\n value: function getReservedWordToken(input, previousToken) {\n // A reserved word cannot be preceded by a \".\"\n // this makes it so in \"my_table.from\", \"from\" is not considered a reserved word\n if (previousToken && previousToken.value && previousToken.value === '.') {\n return;\n }\n\n return this.getTopLevelReservedToken(input) || this.getNewlineReservedToken(input) || this.getTopLevelReservedTokenNoIndent(input) || this.getPlainReservedToken(input);\n }\n }, {\n key: \"getTopLevelReservedToken\",\n value: function getTopLevelReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_TOP_LEVEL,\n regex: this.RESERVED_TOP_LEVEL_REGEX\n });\n }\n }, {\n key: \"getNewlineReservedToken\",\n value: function getNewlineReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_NEWLINE,\n regex: this.RESERVED_NEWLINE_REGEX\n });\n }\n }, {\n key: \"getTopLevelReservedTokenNoIndent\",\n value: function getTopLevelReservedTokenNoIndent(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_TOP_LEVEL_NO_INDENT,\n regex: this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX\n });\n }\n }, {\n key: \"getPlainReservedToken\",\n value: function getPlainReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED,\n regex: this.RESERVED_PLAIN_REGEX\n });\n }\n }, {\n key: \"getWordToken\",\n value: function getWordToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].WORD,\n regex: this.WORD_REGEX\n });\n }\n }, {\n key: \"getTokenOnFirstMatch\",\n value: function getTokenOnFirstMatch(_ref3) {\n var input = _ref3.input,\n type = _ref3.type,\n regex = _ref3.regex;\n var matches = input.match(regex);\n\n if (matches) {\n return {\n type: type,\n value: matches[1]\n };\n }\n }\n }]);\n\n return Tokenizer;\n}();\n\nexports[\"default\"] = Tokenizer;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\n/**\r\n * Constants for token types\r\n */\nvar _default = {\n WHITESPACE: 'whitespace',\n WORD: 'word',\n STRING: 'string',\n RESERVED: 'reserved',\n RESERVED_TOP_LEVEL: 'reserved-top-level',\n RESERVED_TOP_LEVEL_NO_INDENT: 'reserved-top-level-no-indent',\n RESERVED_NEWLINE: 'reserved-newline',\n OPERATOR: 'operator',\n OPEN_PAREN: 'open-paren',\n CLOSE_PAREN: 'close-paren',\n LINE_COMMENT: 'line-comment',\n BLOCK_COMMENT: 'block-comment',\n NUMBER: 'number',\n PLACEHOLDER: 'placeholder'\n};\nexports[\"default\"] = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar reservedWords = ['ABS', 'ACTIVATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALLOW', 'ALTER', 'ANY', 'ARE', 'ARRAY', 'AS', 'ASC', 'ASENSITIVE', 'ASSOCIATE', 'ASUTIME', 'ASYMMETRIC', 'AT', 'ATOMIC', 'ATTRIBUTES', 'AUDIT', 'AUTHORIZATION', 'AUX', 'AUXILIARY', 'AVG', 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BUFFERPOOL', 'BY', 'CACHE', 'CALL', 'CALLED', 'CAPTURE', 'CARDINALITY', 'CASCADED', 'CASE', 'CAST', 'CCSID', 'CEIL', 'CEILING', 'CHAR', 'CHARACTER', 'CHARACTER_LENGTH', 'CHAR_LENGTH', 'CHECK', 'CLOB', 'CLONE', 'CLOSE', 'CLUSTER', 'COALESCE', 'COLLATE', 'COLLECT', 'COLLECTION', 'COLLID', 'COLUMN', 'COMMENT', 'COMMIT', 'CONCAT', 'CONDITION', 'CONNECT', 'CONNECTION', 'CONSTRAINT', 'CONTAINS', 'CONTINUE', 'CONVERT', 'CORR', 'CORRESPONDING', 'COUNT', 'COUNT_BIG', 'COVAR_POP', 'COVAR_SAMP', 'CREATE', 'CROSS', 'CUBE', 'CUME_DIST', 'CURRENT', 'CURRENT_DATE', 'CURRENT_DEFAULT_TRANSFORM_GROUP', 'CURRENT_LC_CTYPE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_SCHEMA', 'CURRENT_SERVER', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_TIMEZONE', 'CURRENT_TRANSFORM_GROUP_FOR_TYPE', 'CURRENT_USER', 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATAPARTITIONNAME', 'DATAPARTITIONNUM', 'DATE', 'DAY', 'DAYS', 'DB2GENERAL', 'DB2GENRL', 'DB2SQL', 'DBINFO', 'DBPARTITIONNAME', 'DBPARTITIONNUM', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFINITION', 'DELETE', 'DENSERANK', 'DENSE_RANK', 'DEREF', 'DESCRIBE', 'DESCRIPTOR', 'DETERMINISTIC', 'DIAGNOSTICS', 'DISABLE', 'DISALLOW', 'DISCONNECT', 'DISTINCT', 'DO', 'DOCUMENT', 'DOUBLE', 'DROP', 'DSSIZE', 'DYNAMIC', 'EACH', 'EDITPROC', 'ELEMENT', 'ELSE', 'ELSEIF', 'ENABLE', 'ENCODING', 'ENCRYPTION', 'END', 'END-EXEC', 'ENDING', 'ERASE', 'ESCAPE', 'EVERY', 'EXCEPTION', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTS', 'EXIT', 'EXP', 'EXPLAIN', 'EXTENDED', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FENCED', 'FETCH', 'FIELDPROC', 'FILE', 'FILTER', 'FINAL', 'FIRST', 'FLOAT', 'FLOOR', 'FOR', 'FOREIGN', 'FREE', 'FULL', 'FUNCTION', 'FUSION', 'GENERAL', 'GENERATED', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GRAPHIC', 'GROUP', 'GROUPING', 'HANDLER', 'HASH', 'HASHED_VALUE', 'HINT', 'HOLD', 'HOUR', 'HOURS', 'IDENTITY', 'IF', 'IMMEDIATE', 'IN', 'INCLUDING', 'INCLUSIVE', 'INCREMENT', 'INDEX', 'INDICATOR', 'INDICATORS', 'INF', 'INFINITY', 'INHERIT', 'INNER', 'INOUT', 'INSENSITIVE', 'INSERT', 'INT', 'INTEGER', 'INTEGRITY', 'INTERSECTION', 'INTERVAL', 'INTO', 'IS', 'ISOBID', 'ISOLATION', 'ITERATE', 'JAR', 'JAVA', 'KEEP', 'KEY', 'LABEL', 'LANGUAGE', 'LARGE', 'LATERAL', 'LC_CTYPE', 'LEADING', 'LEAVE', 'LEFT', 'LIKE', 'LINKTYPE', 'LN', 'LOCAL', 'LOCALDATE', 'LOCALE', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'LOCATORS', 'LOCK', 'LOCKMAX', 'LOCKSIZE', 'LONG', 'LOOP', 'LOWER', 'MAINTAINED', 'MATCH', 'MATERIALIZED', 'MAX', 'MAXVALUE', 'MEMBER', 'MERGE', 'METHOD', 'MICROSECOND', 'MICROSECONDS', 'MIN', 'MINUTE', 'MINUTES', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODULE', 'MONTH', 'MONTHS', 'MULTISET', 'NAN', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEW_TABLE', 'NEXTVAL', 'NO', 'NOCACHE', 'NOCYCLE', 'NODENAME', 'NODENUMBER', 'NOMAXVALUE', 'NOMINVALUE', 'NONE', 'NOORDER', 'NORMALIZE', 'NORMALIZED', 'NOT', 'NULL', 'NULLIF', 'NULLS', 'NUMERIC', 'NUMPARTS', 'OBID', 'OCTET_LENGTH', 'OF', 'OFFSET', 'OLD', 'OLD_TABLE', 'ON', 'ONLY', 'OPEN', 'OPTIMIZATION', 'OPTIMIZE', 'OPTION', 'ORDER', 'OUT', 'OUTER', 'OVER', 'OVERLAPS', 'OVERLAY', 'OVERRIDING', 'PACKAGE', 'PADDED', 'PAGESIZE', 'PARAMETER', 'PART', 'PARTITION', 'PARTITIONED', 'PARTITIONING', 'PARTITIONS', 'PASSWORD', 'PATH', 'PERCENTILE_CONT', 'PERCENTILE_DISC', 'PERCENT_RANK', 'PIECESIZE', 'PLAN', 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PREVVAL', 'PRIMARY', 'PRIQTY', 'PRIVILEGES', 'PROCEDURE', 'PROGRAM', 'PSID', 'PUBLIC', 'QUERY', 'QUERYNO', 'RANGE', 'RANK', 'READ', 'READS', 'REAL', 'RECOVERY', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'REFRESH', 'REGR_AVGX', 'REGR_AVGY', 'REGR_COUNT', 'REGR_INTERCEPT', 'REGR_R2', 'REGR_SLOPE', 'REGR_SXX', 'REGR_SXY', 'REGR_SYY', 'RELEASE', 'RENAME', 'REPEAT', 'RESET', 'RESIGNAL', 'RESTART', 'RESTRICT', 'RESULT', 'RESULT_SET_LOCATOR', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUND_CEILING', 'ROUND_DOWN', 'ROUND_FLOOR', 'ROUND_HALF_DOWN', 'ROUND_HALF_EVEN', 'ROUND_HALF_UP', 'ROUND_UP', 'ROUTINE', 'ROW', 'ROWNUMBER', 'ROWS', 'ROWSET', 'ROW_NUMBER', 'RRN', 'RUN', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCRATCHPAD', 'SCROLL', 'SEARCH', 'SECOND', 'SECONDS', 'SECQTY', 'SECURITY', 'SENSITIVE', 'SEQUENCE', 'SESSION', 'SESSION_USER', 'SIGNAL', 'SIMILAR', 'SIMPLE', 'SMALLINT', 'SNAN', 'SOME', 'SOURCE', 'SPECIFIC', 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLID', 'SQLSTATE', 'SQLWARNING', 'SQRT', 'STACKED', 'STANDARD', 'START', 'STARTING', 'STATEMENT', 'STATIC', 'STATMENT', 'STAY', 'STDDEV_POP', 'STDDEV_SAMP', 'STOGROUP', 'STORES', 'STYLE', 'SUBMULTISET', 'SUBSTRING', 'SUM', 'SUMMARY', 'SYMMETRIC', 'SYNONYM', 'SYSFUN', 'SYSIBM', 'SYSPROC', 'SYSTEM', 'SYSTEM_USER', 'TABLE', 'TABLESAMPLE', 'TABLESPACE', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', 'TYPE', 'UESCAPE', 'UNDO', 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UNTIL', 'UPPER', 'USAGE', 'USER', 'USING', 'VALIDPROC', 'VALUE', 'VARCHAR', 'VARIABLE', 'VARIANT', 'VARYING', 'VAR_POP', 'VAR_SAMP', 'VCAT', 'VERSION', 'VIEW', 'VOLATILE', 'VOLUMES', 'WHEN', 'WHENEVER', 'WHILE', 'WIDTH_BUCKET', 'WINDOW', 'WITH', 'WITHIN', 'WITHOUT', 'WLM', 'WRITE', 'XMLELEMENT', 'XMLEXISTS', 'XMLNAMESPACES', 'YEAR', 'YEARS'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FETCH FIRST', 'FROM', 'GROUP BY', 'GO', 'HAVING', 'INSERT INTO', 'INTERSECT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'CROSS JOIN', 'INNER JOIN', 'JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'OR', 'OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN'];\nvar tokenizer;\n\nvar Db2Formatter =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg Different set of configurations\r\n */\n function Db2Formatter(cfg) {\n _classCallCheck(this, Db2Formatter);\n\n this.cfg = cfg;\n }\n /**\r\n * Formats DB2 query to make it easier to read\r\n *\r\n * @param {String} query The DB2 query string\r\n * @return {String} formatted string\r\n */\n\n\n _createClass(Db2Formatter, [{\n key: \"format\",\n value: function format(query) {\n if (!tokenizer) {\n tokenizer = new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``', '[]'],\n openParens: ['('],\n closeParens: [')'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [':'],\n lineCommentTypes: ['--'],\n specialWordChars: ['#', '@']\n });\n }\n\n return new _Formatter[\"default\"](this.cfg, tokenizer).format(query);\n }\n }]);\n\n return Db2Formatter;\n}();\n\nexports[\"default\"] = Db2Formatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar reservedWords = ['ALL', 'ALTER', 'ANALYZE', 'AND', 'ANY', 'ARRAY', 'AS', 'ASC', 'BEGIN', 'BETWEEN', 'BINARY', 'BOOLEAN', 'BREAK', 'BUCKET', 'BUILD', 'BY', 'CALL', 'CASE', 'CAST', 'CLUSTER', 'COLLATE', 'COLLECTION', 'COMMIT', 'CONNECT', 'CONTINUE', 'CORRELATE', 'COVER', 'CREATE', 'DATABASE', 'DATASET', 'DATASTORE', 'DECLARE', 'DECREMENT', 'DELETE', 'DERIVED', 'DESC', 'DESCRIBE', 'DISTINCT', 'DO', 'DROP', 'EACH', 'ELEMENT', 'ELSE', 'END', 'EVERY', 'EXCEPT', 'EXCLUDE', 'EXECUTE', 'EXISTS', 'EXPLAIN', 'FALSE', 'FETCH', 'FIRST', 'FLATTEN', 'FOR', 'FORCE', 'FROM', 'FUNCTION', 'GRANT', 'GROUP', 'GSI', 'HAVING', 'IF', 'IGNORE', 'ILIKE', 'IN', 'INCLUDE', 'INCREMENT', 'INDEX', 'INFER', 'INLINE', 'INNER', 'INSERT', 'INTERSECT', 'INTO', 'IS', 'JOIN', 'KEY', 'KEYS', 'KEYSPACE', 'KNOWN', 'LAST', 'LEFT', 'LET', 'LETTING', 'LIKE', 'LIMIT', 'LSM', 'MAP', 'MAPPING', 'MATCHED', 'MATERIALIZED', 'MERGE', 'MISSING', 'NAMESPACE', 'NEST', 'NOT', 'NULL', 'NUMBER', 'OBJECT', 'OFFSET', 'ON', 'OPTION', 'OR', 'ORDER', 'OUTER', 'OVER', 'PARSE', 'PARTITION', 'PASSWORD', 'PATH', 'POOL', 'PREPARE', 'PRIMARY', 'PRIVATE', 'PRIVILEGE', 'PROCEDURE', 'PUBLIC', 'RAW', 'REALM', 'REDUCE', 'RENAME', 'RETURN', 'RETURNING', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'SATISFIES', 'SCHEMA', 'SELECT', 'SELF', 'SEMI', 'SET', 'SHOW', 'SOME', 'START', 'STATISTICS', 'STRING', 'SYSTEM', 'THEN', 'TO', 'TRANSACTION', 'TRIGGER', 'TRUE', 'TRUNCATE', 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UNSET', 'UPDATE', 'UPSERT', 'USE', 'USER', 'USING', 'VALIDATE', 'VALUE', 'VALUED', 'VALUES', 'VIA', 'VIEW', 'WHEN', 'WHERE', 'WHILE', 'WITH', 'WITHIN', 'WORK', 'XOR'];\nvar reservedTopLevelWords = ['DELETE FROM', 'EXCEPT ALL', 'EXCEPT', 'EXPLAIN DELETE FROM', 'EXPLAIN UPDATE', 'EXPLAIN UPSERT', 'FROM', 'GROUP BY', 'HAVING', 'INFER', 'INSERT INTO', 'LET', 'LIMIT', 'MERGE', 'NEST', 'ORDER BY', 'PREPARE', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UNNEST', 'UPDATE', 'UPSERT', 'USE KEYS', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'INNER JOIN', 'JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'OR', 'OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'XOR'];\nvar tokenizer;\n\nvar N1qlFormatter =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg Different set of configurations\r\n */\n function N1qlFormatter(cfg) {\n _classCallCheck(this, N1qlFormatter);\n\n this.cfg = cfg;\n }\n /**\r\n * Format the whitespace in a N1QL string to make it easier to read\r\n *\r\n * @param {String} query The N1QL string\r\n * @return {String} formatted string\r\n */\n\n\n _createClass(N1qlFormatter, [{\n key: \"format\",\n value: function format(query) {\n if (!tokenizer) {\n tokenizer = new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``'],\n openParens: ['(', '[', '{'],\n closeParens: [')', ']', '}'],\n namedPlaceholderTypes: ['$'],\n lineCommentTypes: ['#', '--']\n });\n }\n\n return new _Formatter[\"default\"](this.cfg, tokenizer).format(query);\n }\n }]);\n\n return N1qlFormatter;\n}();\n\nexports[\"default\"] = N1qlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nvar _tokenTypes = _interopRequireDefault(require(\"../core/tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar reservedWords = ['A', 'ACCESSIBLE', 'AGENT', 'AGGREGATE', 'ALL', 'ALTER', 'ANY', 'ARRAY', 'AS', 'ASC', 'AT', 'ATTRIBUTE', 'AUTHID', 'AVG', 'BETWEEN', 'BFILE_BASE', 'BINARY_INTEGER', 'BINARY', 'BLOB_BASE', 'BLOCK', 'BODY', 'BOOLEAN', 'BOTH', 'BOUND', 'BREADTH', 'BULK', 'BY', 'BYTE', 'C', 'CALL', 'CALLING', 'CASCADE', 'CASE', 'CHAR_BASE', 'CHAR', 'CHARACTER', 'CHARSET', 'CHARSETFORM', 'CHARSETID', 'CHECK', 'CLOB_BASE', 'CLONE', 'CLOSE', 'CLUSTER', 'CLUSTERS', 'COALESCE', 'COLAUTH', 'COLLECT', 'COLUMNS', 'COMMENT', 'COMMIT', 'COMMITTED', 'COMPILED', 'COMPRESS', 'CONNECT', 'CONSTANT', 'CONSTRUCTOR', 'CONTEXT', 'CONTINUE', 'CONVERT', 'COUNT', 'CRASH', 'CREATE', 'CREDENTIAL', 'CURRENT', 'CURRVAL', 'CURSOR', 'CUSTOMDATUM', 'DANGLING', 'DATA', 'DATE_BASE', 'DATE', 'DAY', 'DECIMAL', 'DEFAULT', 'DEFINE', 'DELETE', 'DEPTH', 'DESC', 'DETERMINISTIC', 'DIRECTORY', 'DISTINCT', 'DO', 'DOUBLE', 'DROP', 'DURATION', 'ELEMENT', 'ELSIF', 'EMPTY', 'END', 'ESCAPE', 'EXCEPTIONS', 'EXCLUSIVE', 'EXECUTE', 'EXISTS', 'EXIT', 'EXTENDS', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', 'FIRST', 'FIXED', 'FLOAT', 'FOR', 'FORALL', 'FORCE', 'FROM', 'FUNCTION', 'GENERAL', 'GOTO', 'GRANT', 'GROUP', 'HASH', 'HEAP', 'HIDDEN', 'HOUR', 'IDENTIFIED', 'IF', 'IMMEDIATE', 'IN', 'INCLUDING', 'INDEX', 'INDEXES', 'INDICATOR', 'INDICES', 'INFINITE', 'INSTANTIABLE', 'INT', 'INTEGER', 'INTERFACE', 'INTERVAL', 'INTO', 'INVALIDATE', 'IS', 'ISOLATION', 'JAVA', 'LANGUAGE', 'LARGE', 'LEADING', 'LENGTH', 'LEVEL', 'LIBRARY', 'LIKE', 'LIKE2', 'LIKE4', 'LIKEC', 'LIMITED', 'LOCAL', 'LOCK', 'LONG', 'MAP', 'MAX', 'MAXLEN', 'MEMBER', 'MERGE', 'MIN', 'MINUTE', 'MLSLABEL', 'MOD', 'MODE', 'MONTH', 'MULTISET', 'NAME', 'NAN', 'NATIONAL', 'NATIVE', 'NATURAL', 'NATURALN', 'NCHAR', 'NEW', 'NEXTVAL', 'NOCOMPRESS', 'NOCOPY', 'NOT', 'NOWAIT', 'NULL', 'NULLIF', 'NUMBER_BASE', 'NUMBER', 'OBJECT', 'OCICOLL', 'OCIDATE', 'OCIDATETIME', 'OCIDURATION', 'OCIINTERVAL', 'OCILOBLOCATOR', 'OCINUMBER', 'OCIRAW', 'OCIREF', 'OCIREFCURSOR', 'OCIROWID', 'OCISTRING', 'OCITYPE', 'OF', 'OLD', 'ON', 'ONLY', 'OPAQUE', 'OPEN', 'OPERATOR', 'OPTION', 'ORACLE', 'ORADATA', 'ORDER', 'ORGANIZATION', 'ORLANY', 'ORLVARY', 'OTHERS', 'OUT', 'OVERLAPS', 'OVERRIDING', 'PACKAGE', 'PARALLEL_ENABLE', 'PARAMETER', 'PARAMETERS', 'PARENT', 'PARTITION', 'PASCAL', 'PCTFREE', 'PIPE', 'PIPELINED', 'PLS_INTEGER', 'PLUGGABLE', 'POSITIVE', 'POSITIVEN', 'PRAGMA', 'PRECISION', 'PRIOR', 'PRIVATE', 'PROCEDURE', 'PUBLIC', 'RAISE', 'RANGE', 'RAW', 'READ', 'REAL', 'RECORD', 'REF', 'REFERENCE', 'RELEASE', 'RELIES_ON', 'REM', 'REMAINDER', 'RENAME', 'RESOURCE', 'RESULT_CACHE', 'RESULT', 'RETURN', 'RETURNING', 'REVERSE', 'REVOKE', 'ROLLBACK', 'ROW', 'ROWID', 'ROWNUM', 'ROWTYPE', 'SAMPLE', 'SAVE', 'SAVEPOINT', 'SB1', 'SB2', 'SB4', 'SEARCH', 'SECOND', 'SEGMENT', 'SELF', 'SEPARATE', 'SEQUENCE', 'SERIALIZABLE', 'SHARE', 'SHORT', 'SIZE_T', 'SIZE', 'SMALLINT', 'SOME', 'SPACE', 'SPARSE', 'SQL', 'SQLCODE', 'SQLDATA', 'SQLERRM', 'SQLNAME', 'SQLSTATE', 'STANDARD', 'START', 'STATIC', 'STDDEV', 'STORED', 'STRING', 'STRUCT', 'STYLE', 'SUBMULTISET', 'SUBPARTITION', 'SUBSTITUTABLE', 'SUBTYPE', 'SUCCESSFUL', 'SUM', 'SYNONYM', 'SYSDATE', 'TABAUTH', 'TABLE', 'TDO', 'THE', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_ABBR', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TIMEZONE_REGION', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSACTIONAL', 'TRIGGER', 'TRUE', 'TRUSTED', 'TYPE', 'UB1', 'UB2', 'UB4', 'UID', 'UNDER', 'UNIQUE', 'UNPLUG', 'UNSIGNED', 'UNTRUSTED', 'USE', 'USER', 'USING', 'VALIDATE', 'VALIST', 'VALUE', 'VARCHAR', 'VARCHAR2', 'VARIABLE', 'VARIANCE', 'VARRAY', 'VARYING', 'VIEW', 'VIEWS', 'VOID', 'WHENEVER', 'WHILE', 'WITH', 'WORK', 'WRAPPED', 'WRITE', 'YEAR', 'ZONE'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'BEGIN', 'CONNECT BY', 'DECLARE', 'DELETE FROM', 'DELETE', 'END', 'EXCEPT', 'EXCEPTION', 'FETCH FIRST', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'LOOP', 'MODIFY', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'START WITH', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'CROSS APPLY', 'CROSS JOIN', 'ELSE', 'END', 'INNER JOIN', 'JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'OR', 'OUTER APPLY', 'OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'WHEN', 'XOR'];\n\nvar tokenOverride = function tokenOverride(token, previousReservedToken) {\n if (token.type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL && token.value === 'SET' && previousReservedToken.value === 'BY') {\n token.type = _tokenTypes[\"default\"].RESERVED;\n return token;\n }\n};\n\nvar tokenizer;\n\nvar PlSqlFormatter =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg Different set of configurations\r\n */\n function PlSqlFormatter(cfg) {\n _classCallCheck(this, PlSqlFormatter);\n\n this.cfg = cfg;\n }\n /**\r\n * Format the whitespace in a PL/SQL string to make it easier to read\r\n *\r\n * @param {String} query The PL/SQL string\r\n * @return {String} formatted string\r\n */\n\n\n _createClass(PlSqlFormatter, [{\n key: \"format\",\n value: function format(query) {\n if (!tokenizer) {\n tokenizer = new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"N''\", \"''\", '``'],\n openParens: ['(', 'CASE', 'BEGIN'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [':'],\n lineCommentTypes: ['--'],\n specialWordChars: ['_', '$', '#', '.', '@']\n });\n }\n\n return new _Formatter[\"default\"](this.cfg, tokenizer, tokenOverride).format(query);\n }\n }]);\n\n return PlSqlFormatter;\n}();\n\nexports[\"default\"] = PlSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar reservedWords = ['ACCESSIBLE', 'ACTION', 'AGAINST', 'AGGREGATE', 'ALGORITHM', 'ALL', 'ALTER', 'ANALYSE', 'ANALYZE', 'AS', 'ASC', 'AUTOCOMMIT', 'AUTO_INCREMENT', 'BACKUP', 'BEGIN', 'BETWEEN', 'BINLOG', 'BOTH', 'CASCADE', 'CASE', 'CHANGE', 'CHANGED', 'CHARACTER SET', 'CHARSET', 'CHECK', 'CHECKSUM', 'COLLATE', 'COLLATION', 'COLUMN', 'COLUMNS', 'COMMENT', 'COMMIT', 'COMMITTED', 'COMPRESSED', 'CONCURRENT', 'CONSTRAINT', 'CONTAINS', 'CONVERT', 'CREATE', 'CROSS', 'CURRENT_TIMESTAMP', 'DATABASE', 'DATABASES', 'DAY', 'DAY_HOUR', 'DAY_MINUTE', 'DAY_SECOND', 'DEFAULT', 'DEFINER', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DETERMINISTIC', 'DISTINCT', 'DISTINCTROW', 'DIV', 'DO', 'DROP', 'DUMPFILE', 'DUPLICATE', 'DYNAMIC', 'ELSE', 'ENCLOSED', 'END', 'ENGINE', 'ENGINES', 'ENGINE_TYPE', 'ESCAPE', 'ESCAPED', 'EVENTS', 'EXEC', 'EXECUTE', 'EXISTS', 'EXPLAIN', 'EXTENDED', 'FAST', 'FETCH', 'FIELDS', 'FILE', 'FIRST', 'FIXED', 'FLUSH', 'FOR', 'FORCE', 'FOREIGN', 'FULL', 'FULLTEXT', 'FUNCTION', 'GLOBAL', 'GRANT', 'GRANTS', 'GROUP_CONCAT', 'HEAP', 'HIGH_PRIORITY', 'HOSTS', 'HOUR', 'HOUR_MINUTE', 'HOUR_SECOND', 'IDENTIFIED', 'IF', 'IFNULL', 'IGNORE', 'IN', 'INDEX', 'INDEXES', 'INFILE', 'INSERT', 'INSERT_ID', 'INSERT_METHOD', 'INTERVAL', 'INTO', 'INVOKER', 'IS', 'ISOLATION', 'KEY', 'KEYS', 'KILL', 'LAST_INSERT_ID', 'LEADING', 'LEVEL', 'LIKE', 'LINEAR', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOCKS', 'LOGS', 'LOW_PRIORITY', 'MARIA', 'MASTER', 'MASTER_CONNECT_RETRY', 'MASTER_HOST', 'MASTER_LOG_FILE', 'MATCH', 'MAX_CONNECTIONS_PER_HOUR', 'MAX_QUERIES_PER_HOUR', 'MAX_ROWS', 'MAX_UPDATES_PER_HOUR', 'MAX_USER_CONNECTIONS', 'MEDIUM', 'MERGE', 'MINUTE', 'MINUTE_SECOND', 'MIN_ROWS', 'MODE', 'MODIFY', 'MONTH', 'MRG_MYISAM', 'MYISAM', 'NAMES', 'NATURAL', 'NOT', 'NOW()', 'NULL', 'OFFSET', 'ON DELETE', 'ON UPDATE', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION', 'OPTIONALLY', 'OUTFILE', 'PACK_KEYS', 'PAGE', 'PARTIAL', 'PARTITION', 'PARTITIONS', 'PASSWORD', 'PRIMARY', 'PRIVILEGES', 'PROCEDURE', 'PROCESS', 'PROCESSLIST', 'PURGE', 'QUICK', 'RAID0', 'RAID_CHUNKS', 'RAID_CHUNKSIZE', 'RAID_TYPE', 'RANGE', 'READ', 'READ_ONLY', 'READ_WRITE', 'REFERENCES', 'REGEXP', 'RELOAD', 'RENAME', 'REPAIR', 'REPEATABLE', 'REPLACE', 'REPLICATION', 'RESET', 'RESTORE', 'RESTRICT', 'RETURN', 'RETURNS', 'REVOKE', 'RLIKE', 'ROLLBACK', 'ROW', 'ROWS', 'ROW_FORMAT', 'SECOND', 'SECURITY', 'SEPARATOR', 'SERIALIZABLE', 'SESSION', 'SHARE', 'SHOW', 'SHUTDOWN', 'SLAVE', 'SONAME', 'SOUNDS', 'SQL', 'SQL_AUTO_IS_NULL', 'SQL_BIG_RESULT', 'SQL_BIG_SELECTS', 'SQL_BIG_TABLES', 'SQL_BUFFER_RESULT', 'SQL_CACHE', 'SQL_CALC_FOUND_ROWS', 'SQL_LOG_BIN', 'SQL_LOG_OFF', 'SQL_LOG_UPDATE', 'SQL_LOW_PRIORITY_UPDATES', 'SQL_MAX_JOIN_SIZE', 'SQL_NO_CACHE', 'SQL_QUOTE_SHOW_CREATE', 'SQL_SAFE_UPDATES', 'SQL_SELECT_LIMIT', 'SQL_SLAVE_SKIP_COUNTER', 'SQL_SMALL_RESULT', 'SQL_WARNINGS', 'START', 'STARTING', 'STATUS', 'STOP', 'STORAGE', 'STRAIGHT_JOIN', 'STRING', 'STRIPED', 'SUPER', 'TABLE', 'TABLES', 'TEMPORARY', 'TERMINATED', 'THEN', 'TO', 'TRAILING', 'TRANSACTIONAL', 'TRUE', 'TRUNCATE', 'TYPE', 'TYPES', 'UNCOMMITTED', 'UNIQUE', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USE', 'USING', 'VARIABLES', 'VIEW', 'WHEN', 'WITH', 'WORK', 'WRITE', 'YEAR_MONTH'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FETCH FIRST', 'FROM', 'GROUP BY', 'GO', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'MODIFY', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'CROSS APPLY', 'CROSS JOIN', 'ELSE', 'INNER JOIN', 'JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'OR', 'OUTER APPLY', 'OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'WHEN', 'XOR'];\nvar tokenizer;\n\nvar StandardSqlFormatter =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {Object} cfg Different set of configurations\r\n */\n function StandardSqlFormatter(cfg) {\n _classCallCheck(this, StandardSqlFormatter);\n\n this.cfg = cfg;\n }\n /**\r\n * Format the whitespace in a Standard SQL string to make it easier to read\r\n *\r\n * @param {String} query The Standard SQL string\r\n * @return {String} formatted string\r\n */\n\n\n _createClass(StandardSqlFormatter, [{\n key: \"format\",\n value: function format(query) {\n if (!tokenizer) {\n tokenizer = new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"N''\", \"''\", '``', '[]'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: ['@', ':'],\n lineCommentTypes: ['#', '--']\n });\n }\n\n return new _Formatter[\"default\"](this.cfg, tokenizer).format(query);\n }\n }]);\n\n return StandardSqlFormatter;\n}();\n\nexports[\"default\"] = StandardSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.format = void 0;\n\nvar _Db2Formatter = _interopRequireDefault(require(\"./languages/Db2Formatter\"));\n\nvar _N1qlFormatter = _interopRequireDefault(require(\"./languages/N1qlFormatter\"));\n\nvar _PlSqlFormatter = _interopRequireDefault(require(\"./languages/PlSqlFormatter\"));\n\nvar _StandardSqlFormatter = _interopRequireDefault(require(\"./languages/StandardSqlFormatter\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\r\n * Format whitespace in a query to make it easier to read.\r\n *\r\n * @param {String} query\r\n * @param {Object} cfg\r\n * @param {String} cfg.language Query language, default is Standard SQL\r\n * @param {String} cfg.indent Characters used for indentation, default is \" \" (2 spaces)\r\n * @param {Bool} cfg.uppercase Converts keywords to uppercase\r\n * @param {Integer} cfg.linesBetweenQueries How many line breaks between queries\r\n * @param {Object} cfg.params Collection of params for placeholder replacement\r\n * @return {String}\r\n */\nvar format = function format(query) {\n var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n switch (cfg.language) {\n case 'db2':\n return new _Db2Formatter[\"default\"](cfg).format(query);\n\n case 'n1ql':\n return new _N1qlFormatter[\"default\"](cfg).format(query);\n\n case 'pl/sql':\n return new _PlSqlFormatter[\"default\"](cfg).format(query);\n\n case 'sql':\n case undefined:\n return new _StandardSqlFormatter[\"default\"](cfg).format(query);\n\n default:\n throw Error(\"Unsupported SQL dialect: \".concat(cfg.language));\n }\n};\n\nexports.format = format;\nvar _default = {\n format: format\n};\nexports[\"default\"] = _default;","module.exports = require('./lib/SqlString');\n","var SqlString = exports;\n\nvar ID_GLOBAL_REGEXP = /`/g;\nvar QUAL_GLOBAL_REGEXP = /\\./g;\nvar CHARS_GLOBAL_REGEXP = /[\\0\\b\\t\\n\\r\\x1a\\\"\\'\\\\]/g; // eslint-disable-line no-control-regex\nvar CHARS_ESCAPE_MAP = {\n '\\0' : '\\\\0',\n '\\b' : '\\\\b',\n '\\t' : '\\\\t',\n '\\n' : '\\\\n',\n '\\r' : '\\\\r',\n '\\x1a' : '\\\\Z',\n '\"' : '\\\\\"',\n '\\'' : '\\\\\\'',\n '\\\\' : '\\\\\\\\'\n};\n\nSqlString.escapeId = function escapeId(val, forbidQualified) {\n if (Array.isArray(val)) {\n var sql = '';\n\n for (var i = 0; i < val.length; i++) {\n sql += (i === 0 ? '' : ', ') + SqlString.escapeId(val[i], forbidQualified);\n }\n\n return sql;\n } else if (forbidQualified) {\n return '`' + String(val).replace(ID_GLOBAL_REGEXP, '``') + '`';\n } else {\n return '`' + String(val).replace(ID_GLOBAL_REGEXP, '``').replace(QUAL_GLOBAL_REGEXP, '`.`') + '`';\n }\n};\n\nSqlString.escape = function escape(val, stringifyObjects, timeZone) {\n if (val === undefined || val === null) {\n return 'NULL';\n }\n\n switch (typeof val) {\n case 'boolean': return (val) ? 'true' : 'false';\n case 'number': return val + '';\n case 'object':\n if (Object.prototype.toString.call(val) === '[object Date]') {\n return SqlString.dateToString(val, timeZone || 'local');\n } else if (Array.isArray(val)) {\n return SqlString.arrayToList(val, timeZone);\n } else if (Buffer.isBuffer(val)) {\n return SqlString.bufferToString(val);\n } else if (typeof val.toSqlString === 'function') {\n return String(val.toSqlString());\n } else if (stringifyObjects) {\n return escapeString(val.toString());\n } else {\n return SqlString.objectToValues(val, timeZone);\n }\n default: return escapeString(val);\n }\n};\n\nSqlString.arrayToList = function arrayToList(array, timeZone) {\n var sql = '';\n\n for (var i = 0; i < array.length; i++) {\n var val = array[i];\n\n if (Array.isArray(val)) {\n sql += (i === 0 ? '' : ', ') + '(' + SqlString.arrayToList(val, timeZone) + ')';\n } else {\n sql += (i === 0 ? '' : ', ') + SqlString.escape(val, true, timeZone);\n }\n }\n\n return sql;\n};\n\nSqlString.format = function format(sql, values, stringifyObjects, timeZone) {\n if (values == null) {\n return sql;\n }\n\n if (!Array.isArray(values)) {\n values = [values];\n }\n\n var chunkIndex = 0;\n var placeholdersRegex = /\\?+/g;\n var result = '';\n var valuesIndex = 0;\n var match;\n\n while (valuesIndex < values.length && (match = placeholdersRegex.exec(sql))) {\n var len = match[0].length;\n\n if (len > 2) {\n continue;\n }\n\n var value = len === 2\n ? SqlString.escapeId(values[valuesIndex])\n : SqlString.escape(values[valuesIndex], stringifyObjects, timeZone);\n\n result += sql.slice(chunkIndex, match.index) + value;\n chunkIndex = placeholdersRegex.lastIndex;\n valuesIndex++;\n }\n\n if (chunkIndex === 0) {\n // Nothing was replaced\n return sql;\n }\n\n if (chunkIndex < sql.length) {\n return result + sql.slice(chunkIndex);\n }\n\n return result;\n};\n\nSqlString.dateToString = function dateToString(date, timeZone) {\n var dt = new Date(date);\n\n if (isNaN(dt.getTime())) {\n return 'NULL';\n }\n\n var year;\n var month;\n var day;\n var hour;\n var minute;\n var second;\n var millisecond;\n\n if (timeZone === 'local') {\n year = dt.getFullYear();\n month = dt.getMonth() + 1;\n day = dt.getDate();\n hour = dt.getHours();\n minute = dt.getMinutes();\n second = dt.getSeconds();\n millisecond = dt.getMilliseconds();\n } else {\n var tz = convertTimezone(timeZone);\n\n if (tz !== false && tz !== 0) {\n dt.setTime(dt.getTime() + (tz * 60000));\n }\n\n year = dt.getUTCFullYear();\n month = dt.getUTCMonth() + 1;\n day = dt.getUTCDate();\n hour = dt.getUTCHours();\n minute = dt.getUTCMinutes();\n second = dt.getUTCSeconds();\n millisecond = dt.getUTCMilliseconds();\n }\n\n // YYYY-MM-DD HH:mm:ss.mmm\n var str = zeroPad(year, 4) + '-' + zeroPad(month, 2) + '-' + zeroPad(day, 2) + ' ' +\n zeroPad(hour, 2) + ':' + zeroPad(minute, 2) + ':' + zeroPad(second, 2) + '.' +\n zeroPad(millisecond, 3);\n\n return escapeString(str);\n};\n\nSqlString.bufferToString = function bufferToString(buffer) {\n return 'X' + escapeString(buffer.toString('hex'));\n};\n\nSqlString.objectToValues = function objectToValues(object, timeZone) {\n var sql = '';\n\n for (var key in object) {\n var val = object[key];\n\n if (typeof val === 'function') {\n continue;\n }\n\n sql += (sql.length === 0 ? '' : ', ') + SqlString.escapeId(key) + ' = ' + SqlString.escape(val, true, timeZone);\n }\n\n return sql;\n};\n\nSqlString.raw = function raw(sql) {\n if (typeof sql !== 'string') {\n throw new TypeError('argument sql must be a string');\n }\n\n return {\n toSqlString: function toSqlString() { return sql; }\n };\n};\n\nfunction escapeString(val) {\n var chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex = 0;\n var escapedVal = '';\n var match;\n\n while ((match = CHARS_GLOBAL_REGEXP.exec(val))) {\n escapedVal += val.slice(chunkIndex, match.index) + CHARS_ESCAPE_MAP[match[0]];\n chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex;\n }\n\n if (chunkIndex === 0) {\n // Nothing was escaped\n return \"'\" + val + \"'\";\n }\n\n if (chunkIndex < val.length) {\n return \"'\" + escapedVal + val.slice(chunkIndex) + \"'\";\n }\n\n return \"'\" + escapedVal + \"'\";\n}\n\nfunction zeroPad(number, length) {\n number = number.toString();\n while (number.length < length) {\n number = '0' + number;\n }\n\n return number;\n}\n\nfunction convertTimezone(tz) {\n if (tz === 'Z') {\n return 0;\n }\n\n var m = tz.match(/([\\+\\-\\s])(\\d\\d):?(\\d\\d)?/);\n if (m) {\n return (m[1] === '-' ? -1 : 1) * (parseInt(m[2], 10) + ((m[3] ? parseInt(m[3], 10) : 0) / 60)) * 60;\n }\n return false;\n}\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n"],"names":["EditorHeader","children","styles","getStyles","theme","FlexItem","grow","shrink","__defProp","__defProps","__getOwnPropDescs","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","__spreadProps","__objRest","source","exclude","target","InlineSelect","_a","_b","labelProp","props","getSelectStyles","id","components","SelectContainer","ValueContainer","className","SELECT","FROM","WHERE","GROUP","ORDER","BY","DESC","ASC","LIMIT","WITH","AS","SCHEMA","AND","OR","LOGICAL_OPERATORS","EQUALS","NOT_EQUALS","COMPARISON_OPERATORS","STD_OPERATORS","conf","language","COLUMN","RELATIVE_TIME_STRING","MACROS","getStandardSQLCompletionProvider","monaco","_c","provider","f","operators","OperatorType","OperatorType2","MacroType","MacroType2","TokenType","TokenType2","StatementPosition","StatementPosition2","SuggestionKind","SuggestionKind2","CompletionItemPriority","CompletionItemPriority2","CompletionItemKind","CompletionItemKind2","CompletionItemInsertTextRule","CompletionItemInsertTextRule2","EditorMode","EditorMode2","getRandomValues","rnds8","rng","validate","uuid","byteToHex","i","stringify","arr","offset","v4","options","buf","rnds","global","factory","module","SLICE$0","createClass","ctor","superClass","Iterable","isIterable","Seq","KeyedIterable","isKeyed","KeyedSeq","IndexedIterable","isIndexed","IndexedSeq","SetIterable","isAssociative","SetSeq","maybeIterable","IS_ITERABLE_SENTINEL","maybeKeyed","IS_KEYED_SENTINEL","maybeIndexed","IS_INDEXED_SENTINEL","maybeAssociative","isOrdered","maybeOrdered","IS_ORDERED_SENTINEL","DELETE","SHIFT","SIZE","MASK","NOT_SET","CHANGE_LENGTH","DID_ALTER","MakeRef","ref","SetRef","OwnerID","arrCopy","len","newArr","ii","ensureSize","iter","returnTrue","wrapIndex","index","uint32Index","wholeSlice","begin","end","size","resolveBegin","resolveIndex","resolveEnd","defaultIndex","ITERATE_KEYS","ITERATE_VALUES","ITERATE_ENTRIES","REAL_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ITERATOR_SYMBOL","Iterator","next","iteratorValue","type","k","v","iteratorResult","iteratorDone","hasIterator","getIteratorFn","isIterator","maybeIterator","getIterator","iterable","iteratorFn","isArrayLike","emptySequence","seqFromValue","fn","reverse","seqIterate","seqIterator","keyedSeqFromValue","indexedSeqFromValue","isSeq","IS_SEQ_SENTINEL","ArraySeq","array","notSetValue","maxIndex","ObjectSeq","object","keys","IterableSeq","iterator","iterations","step","IteratorSeq","cache","val","maybeSeq","EMPTY_SEQ","seq","maybeIndexedSeqFromValue","useKeys","entry","fromJS","json","converter","fromJSWith","fromJSDefault","parentJSON","isPlainObj","is","valueA","valueB","deepEqual","notAssociative","entries","flipped","_","allEqual","bSize","Repeat","times","EMPTY_REPEAT","searchValue","this$0","other","invariant","condition","error","Range","start","EMPTY_RANGE","possibleIndex","offsetValue","Collection","KeyedCollection","IndexedCollection","SetCollection","imul","c","d","smi","i32","hash","o","h","STRING_HASH_CACHE_MIN_STRLEN","cachedHashString","hashString","hashJSObj","string","stringHashCache","STRING_HASH_CACHE_SIZE","STRING_HASH_CACHE_MAX_SIZE","usingWeakMap","weakMap","UID_HASH_KEY","canDefineProperty","getIENodeHash","objHashUID","isExtensible","node","assertNotInfinite","Map","emptyMap","isMap","map","keyValues","updateMap","keyPath","updater","updatedValue","updateInDeepMap","forceIterator","mergeIntoMapWith","merger","iters","m","deepMerger","deepMergerWith","comparator","OrderedMap","sortFactory","mapper","mutable","MapIterator","ownerID","makeMap","maybeMap","IS_MAP_SENTINEL","MapPrototype","ArrayMapNode","shift","keyHash","didChangeSize","didAlter","removed","idx","exists","MAX_ARRAY_MAP_SIZE","createNodes","isEditable","newEntries","BitmapIndexedNode","bitmap","nodes","bit","popCount","keyHashFrag","newNode","updateNode","MAX_BITMAP_INDEXED_SIZE","expandNodes","isLeafNode","newBitmap","newNodes","setIn","spliceOut","spliceIn","HashArrayMapNode","count","newCount","MIN_HASH_ARRAY_MAP_SIZE","packNodes","HashCollisionNode","mergeIntoNode","ValueNode","keyMatch","mapIteratorFrame","stack","mapIteratorValue","subNode","prev","root","EMPTY_MAP","newRoot","newSize","idx1","idx2","excluding","packedII","packedNodes","including","expandedNodes","iterables","mergeIntoCollectionWith","existing","nextValue","collection","x","mergeIntoMap","keyPathIter","isNotSet","existingValue","newValue","nextExisting","nextUpdated","canEdit","newArray","newLen","after","List","empty","emptyList","isList","makeList","VNode","list","listNodeFor","updateList","values","oldSize","setListBounds","mergeIntoListWith","iterateList","DONE","maybeList","IS_LIST_SENTINEL","ListPrototype","level","originIndex","removingFirst","newChild","oldChild","editable","editableVNode","sizeIndex","left","right","tailPos","getTailOffset","tail","iterateNodeOrLeaf","iterateLeaf","iterateNode","from","to","origin","capacity","EMPTY_LIST","newTail","updateVNode","nodeHas","lowerNode","newLowerNode","rawIndex","owner","oldOrigin","oldCapacity","newOrigin","newCapacity","newLevel","offsetShift","oldTailOffset","newTailOffset","oldTail","beginIndex","maxSize","emptyOrderedMap","isOrderedMap","updateOrderedMap","newMap","newList","makeOrderedMap","maybeOrderedMap","omap","EMPTY_ORDERED_MAP","has","ToKeyedSequence","indexed","reversedSequence","reverseFactory","context","mappedSequence","mapFactory","resolveSize","ToIndexedSequence","ToSetSequence","FromEntriesSequence","validateEntry","indexedIterable","cacheResultThrough","flipFactory","flipSequence","makeSequence","filterFactory","predicate","filterSequence","countByFactory","grouper","groups","groupByFactory","isKeyedIter","coerce","iterableClass","reify","sliceFactory","originalSize","resolvedBegin","resolvedEnd","resolvedSize","sliceSize","sliceSeq","skipped","isSkipping","takeWhileFactory","takeSequence","iterating","skipWhileFactory","skipSequence","skipping","concatFactory","isKeyedIterable","singleton","concatSeq","sum","flattenFactory","depth","flatSequence","stopped","flatDeep","currentDepth","flatMapFactory","interposeFactory","separator","interposedSequence","defaultComparator","maxFactory","maxCompare","comp","zipWithFactory","keyIter","zipper","zipSequence","iterators","isDone","steps","s","Record","defaultValues","name","hasInitialized","RecordType","setProps","RecordTypePrototype","RecordPrototype","recordName","defaultVal","makeRecord","likeRecord","record","prototype","names","setProp","Set","emptySet","isSet","set","updateSet","originalSet","OrderedSet","maybeSet","IS_SET_SENTINEL","SetPrototype","makeSet","EMPTY_SET","emptyOrderedSet","isOrderedSet","maybeOrderedSet","OrderedSetPrototype","makeOrderedSet","EMPTY_ORDERED_SET","Stack","emptyStack","isStack","head","makeStack","maybeStack","IS_STACK_SENTINEL","StackPrototype","EMPTY_STACK","mixin","methods","keyCopier","returnValue","sideEffect","joined","isFirst","reducer","initialReduction","reduction","useFirst","reversed","not","entriesSequence","entryMapper","found","searchKey","searchKeyPath","nested","keyMapper","neg","defaultNegComparator","amount","hashIterable","IterablePrototype","quoteString","KeyedIterablePrototype","removeNum","numArgs","spliced","zipped","interleaved","defaultZipper","ordered","keyed","hashMerge","murmurHashOfSize","Immutable","e","g","l","n","p","q","r","u","w","y","t","z","A","B","C","D","E","F","G","H","I","exports","clone","_instanceof","nativeMap","nativeSet","nativePromise","parent","circular","includeNonEnumerable","allParents","allChildren","useBuffer","Buffer","_clone","child","proto","resolve","reject","err","__getRegExpFlags","keyChild","valueChild","entryChild","attrs","symbols","symbol","descriptor","allPropertyNames","propertyName","__objToStr","__isDate","__isArray","__isRegExp","re","flags","QueryFormat","QUERY_FORMAT_OPTIONS","backWardToOption","toOption","ResponseParser","frame","textField","valueField","field","QueryEditorPropertyType","QueryEditorExpressionType","createSelectClause","sqlColumns","rawColumn","haveColumns","columns","haveColumn","haveFunction","setGroupByField","setPropertyField","createFunctionField","functionName","applyQueryDefaults","editorMode","ConfirmModal","isOpen","onCancel","onDiscard","onCopy","buttonRef","Modal","Icon","Button","isSqlDatasourceDatabaseSelectionFeatureFlagEnabled","config","DatasetSelector","dataset","db","dialect","onChange","preconfiguredDataset","hasPreconfigCondition","state","useAsync","Select","TableSelector","table","editorModes","QueryHeader","isQueryRunnable","onQueryRowChange","onRunQuery","query","queryRowFilter","copyToClipboard","useCopyToClipboard","showConfirm","setShowConfirm","toRawSql","onEditorModeChange","newEditorMode","onFormatChange","onDatasetChange","onTableChange","datasetDropdownIsAvailable","ev","Tooltip","RadioButtonGroup","Space","EditorRow","EditorField","getStatementPosition","currentToken","statementPositionResolversRegistry","previousNonWhiteSpace","previousKeyword","previousIsSlash","resolvers","positions","resolver","toCompletionItem","range","rest","getStandardSuggestions","suggestionKinds","positionContext","suggestionsRegistry","suggestions","suggestion","registeredSuggestions","su","initSuggestionsKindRegistry","getSuggestionKinds","statementPosition","suggestionsKindRegistry","result","LinkedToken","previous","isType","compareTokenWithValue","curr","ignoreTypes","tokens","token","linkedTokenBuilder","model","position","languageId","current","tokensPerLine","lineIndex","columnIndex","endColumn","sqlToken","getSelectToken","getFromKeywordToken","selectToken","getTableToken","fromToken","nextNonWhiteSpace","defaultTableNameParser","parts","TRIGGER_SUGGEST","initStandardSuggestions","functions","macros","templateSrv","variable","label","m2","createMacroSuggestionItem","argsString","args","initStatementPositionResolvers","sqlEditorLogger","sqlEditorLog","standardSQLLanguageDefinition","STANDARD_SQL_LANGUAGE","LANGUAGES_CACHE","INSTANCE_CACHE","SQLEditor","onBlur","width","height","monacoRef","langUid","uid","id2","formatQuery","onSqlBlur","text","CodeEditor","editor","registerLanguageAndSuggestions","resolveLanguage","languageDefinitionProp","custom","lid","languageDefinition","formatted","customProvider","extendStandardRegistries","languageSuggestionsRegistries","instanceSuggestionsRegistry","completionProvider","kind","ctx","initializeLanguageRegistries","languageRegistries","Registry","func","op","macro","placement","origResolve","ext","applyTo","stbBehaviour","standardSchemas","customSchemaCompletionItems","_a2","_d","_e","tableToken","tableIdentifier","oo","_a3","tableNameParser","QueryEditorRaw","editorLanguageDefinition","queryRef","onRawQueryChange","rawSql","processQuery","newQuery","QueryValidator","onValidate","validationResult","setValidationResult","valueFormatter","validateQuery","useAsyncFn","useDebounce","processErrorMessage","Spinner","splat","QueryToolbox","showTools","onFormatCode","onExpand","isExpanded","validatorProps","style","IconButton","RawEditor","queryToValidate","setIsExpanded","toolboxRef","toolboxMeasure","useMeasure","editorRef","editorMeasure","renderQueryEditor","renderEditor","standalone","renderPlaceholder","formatSQL","sqlFormatter","Preview","datasourceType","copyPreview","labelElement","Field","useSqlChange","onQueryChange","sql","GroupByRow","onSqlChange","onGroupByChange","item","cleaned","newSql","EditorList","makeRenderColumn","onChangeItem","onDeleteItem","InputGroup","AccessoryButton","SQLGroupByRow","fields","sortOrderOptions","OrderByRow","showOffset","onSortOrderChange","onLimitChange","event","onOffsetChange","onOrderByChange","Input","SQLOrderByRow","columnsWithIndices","COMMON_AGGREGATE_FNS","MACRO_NAMES","asteriskValue","SelectRow","format","columnsWithAsterisk","timeSeriesAliasOpts","onColumnChange","column","modifiedItem","onAggregationChange","aggregation","newItem","onAliasChange","alias","removeColumn","addColumn","getColumnValue","parameters","SQLSelectRow","query_builder_seed","timePart","isObject","widgetDefKeysToOmit","opDefKeysToOmit","defaultValue","_default","v1","v2","shallowEqual","deep","shallowEqualArrays","shallowEqualObjects","arrA","arrB","isEqual","objA","objB","aKeys","bKeys","isImmutable","toImmutableList","applyToJS","escapeRegExp","cleanJSX","jsx","jsxKeys","getName","el","_i","isDirtyJSX","_cleaned$props","isJSX","isJsonLogic","logic","isJL","sleep","delay","mergeArraysSmart","arr1","arr2","_ref","orig","_ref2","ind","_ref3","_ref4","_cop","ci","before","_ref5","_ref6","acc","_ref7","_ref8","newOp","rel","relOp","deepFreeze","isJsonCompatible","tpl","bag","path","tv","ov","_tv","_ov","isDev","getLogger","devMode","verbose","getFirstDefined","ret","settings","label2","fieldDefinition","isForDisplay","_createForOfIteratorHelper","allowArrayLike","it","_unsupportedIterableToArray","normalCompletion","didErr","_e2","minLen","_arrayLikeToArray","ownKeys","enumerableOnly","sym","_objectSpread","toListValue","title","makeCustomListValue","lv","listValuesToArray","listValuesObj","listValuesArr","getItemInListValues","listValues","getTitleInListValues","getValueInListValues","mapListValues","mapFn","_iterator","_step","_lv","searchListValue","search","getListValue","selectedValue","expandTreePath","_len","suffix","_key","expandTreeSubpath","_len2","_key2","getItemByPath","tree","res","removeIsLockedInTree","newTree","_processNode","isParentLocked","itemPath","isLocked","_childId","fixPathsInTree","lev","nodeId","currPath","currId","itemId","childId","fixEmptyGroupsInTree","allChildrenGone","getFlatTree","flat","items","realHeight","_flatizeTree","insideCollapsed","insideLocked","insideRuleGroup","info","parentType","caseId","collapsed","childrenIds","_child","isRuleGroup","isLeaf","hasChildren","itemsBefore","top","subinfo","itemsAfter","_bottom","prevId","nextId","getTotalReordableNodesCountInTree","cnt","getTotalRulesCountInTree","getTreeBadFields","badFields","valueError","getLightTree","children1AsArray","properties","getSwitchValues","vals","caseValue","isEmptyTree","getTree","immutableTree","light","loadTree","serTree","isImmutableTree","isTree","jsToImmutable","checkTree","extendedConfig","extendConfig","validateTree","isValidTree","imm","outValue","_outValue$get","_v$toJS","vJs","_e3","arrayUniq","arrayToObject","fc","createMeta","loadFromJsonLogic","logicTree","_loadFromJsonLogic","returnErrors","meta","conv","buildConv","jsTree","convertFromLogic","wrapInDefaultConj","immTree","opKey","opConfig","opk","_opk","conjunctions","conjKey","conjunctionDefinition","ck","funcs","iterateFuncs","_step$value","funcPath","funcConfig","fk","_config$settings$json","groupVarKey","altVarKey","expectedType","fieldConfig","widget","parentField","_isLockedLogic","beforeErrorsCnt","lockedOp","isEmptyOp","isRev","convertFieldRhs","convertFuncRhs","convertValRhs","convertConj","convertOp","afterErrorsCnt","_fieldConfig$fieldSet","widgetConfig","fieldType","valueFormat","dateVal","_dateVal","_valueFormat","asyncListValues","normalizeField","getFieldConfig","convertLhs","isGroup0","jlField","_parse","convertFieldLhs","convertFuncLhs","fieldSrc","having","isGroup","parsed","_v","_v2","filter","init","_v3","_v4","group","_filter","parsedGroup","_parsedGroup","argsArr","funcKey","jsonLogicIsMethod","opts","_vals","returnType","funcKeys","getFuncConfig","_iterator2","_step2","_step2$value","argKeys","argsObj","argKey","argConfig","argVal","_argVal","fieldSeparator","complexFields","_v$properties","_v$properties2","_f$includes","complexFieldsGroupAncestors","ancs","fp","_f","children1","groupToId","_v$properties3","groupAncestors","groupField","ch","parentFieldParts","getFieldParts","groupPath","isInParent","traverseGroupFields","gf","gfc","groupId","wrapInDefaultConjRuleGroup","rule","parentFieldConfig","conj","defaultConjunction","parseRule","arity","submeta","_parseRule","isRevArgs","isAllOrSomeInForMultiselect","eqOps","cardinality","opKeys","jlArgs","rangeOps","_vals2","_vals3","lhs","op2","parseRes","showNot","canRev","havingVals","havingNot","getWidgetForFieldOp","convertedArgs","asyncListValuesArr","SqlString","any_start","any_end","sqlEmptyValue","fieldDef","mongoEmptyValue","spelEscapeString","spelInlineList","toArray","javaType","jt","numberJavaTypes","escapedVals","spelEscape","spelFixList","numberToFloat","arrayToArray","spelFormatConcat","part","spelImportConcat","errors","stringifyForDisplay","compareToSign","TypesWithCompareTo","spelFormat","_spelFormat","formatItem","formatGroup","formatRule","formatSwitch","formatCase","_formatItemValue","formatItemValue","_formatItemValue2","formattedValue","valueSrc","valueType","cond","cases","currentChild","filteredCases","_filteredCases$_i","mode","conjunction","isRuleGroupArray","groupFieldDef","isSpelArray","groupOperator","realGroupOperator","checkOp","isGroupOpRev","realGroupOperatorDefinition","getOperatorConfig","_formatItemValue3","_formatItemValue4","omitBrackets","formattedField","formatField","sep","getSize","fullSize","filteredSize","groupValue","formatExpression","buildFnToFormatOp","operator","operatorDefinition","spelOp","isSign","isCompareTo","sop","opDef","operatorOptions","compareRes","reversedOp","revOpDef","canFormatOp","canFormatRevOp","realOp","_formatItemValue5","_formatItemValue6","formatLhs","formatFunc","expectedValueType","iValueSrc","iValueType","iValue","valueSrcs","valueTypes","fvalue","currentValue","cValue","completeValue","fieldWidgetDef","getFieldWidgetConfig","fv","formatValue","hasUndefinedValues","operatorDef","valFieldDefinition","fieldParts","fieldPartsConfigs","getFieldPartsConfigs","formatFieldFn","fieldName","formatFieldName","fieldPartsMeta","cnf","parentCnf","isSpelVariable","formattedArgs","gaps","missingArgKeys","_argConfig$spelEscape","_defaultValue","isOptional","defaultValueSrc","argValue","argValueSrc","argAsyncListValues","doEscape","formattedArgVal","formattedDefaultVal","defaultWidget","defaultFieldWidgetDef","finalFormattedVal","missedArgKey","_args","_formattedArgs$argKey","optionalArgs","_argKey","SpelPrimitiveTypes","SpelPrimitiveClasses","ListValueType","isFuncableProperty","loadFromSpel","_loadFromSpel","spelStr","compiledExpression","convertedObj","compileRes","postprocessCompiled","convertToTree","expr","parentExpr","canFlatize","isListFix","selection","lastChild","isSize","isLength","sourceParts","isAggr","convertPath","isThis","isRoot","_lastChild","_lastChild2","flatizeTernary","qid","cls","_qid","_cls","_val","methodName","_args2","_processTernaryChildren","tern","_tern","if_val","else_val","_loop","_loop2","fks","spelFunc","funcSignMain","_k","funcSignsOptional","optionalArgKeys","_iterator3","_step3","_fk","valueFuncs","widgetDef","spelImportFuncs","fs","argsOrder","opFuncs","_fs","_argsOrder","compareToSS","spel","parentSpel","canParseAsArg","_groupFilter","groupFieldValue","groupFilter","caseI","buildCase","convertArg","sw","buildSimpleSwitch","isUnary","isBetweenNormal","isBetweenRev","isBetween","_spel$children$0$chil","_spel$children$1$chil","isSameSource","compareArgs","_fromValue","_toValue","oneSpel","convertChildren","_newChildren","newChildren","_fieldObj$groupFieldV","_convertedArgs","fieldObj","opArg","_vals$","_vals$2","widgets","ws","needWrapReverse","buildRuleGroup","_field","buildRule","expectingField","isError","_meta$errors","_meta$errors$push","isVariable","_spel$children","_field2","_fieldConfig","_isVariable","_value","_valueType","_values$","_itemType","_value2","_valueType2","buildCaseValueConcat","maybe","convertFunc","buildFuncSignatures","brns","_buildFuncSignatures","params","isVar","currBrn","_currBrn$params","_buildFuncSignatures2","_buildFuncSignatures3","s1","params1","newBrn","_iterator4","_step4","_brn$objs","brn","_params","_buildFuncSignatures4","_buildFuncSignatures5","_fsigns$","convertFuncArg","fsigns","firstSign","maybeValue","convertFuncToValue","maybeOp","convertFuncToOp","_iterator5","_step5","_loop3","_step5$value","_funcConfig","_ref9","_ret","_iterator6","_step6","_step6$value","funcArgs","errs","foundSign","foundWidget","candidates","fj","_iterator7","_step7","_step7$value","_s","_iterator8","_step8","_loop4","_step8$value","_candidates","_candidates$_i","_w","_widgetDef","spelImportValue","_k2","_spelImportValue$call","_spelImportValue$call2","_iterator9","_step9","_step9$value","_iterator10","_step10","_loop5","_argsArr$filter$find","_step10$value","_ref10","_ret2","_field3","_ref11","groupOpRule","_map","_map2","leftSource","rightSource","_map3","_map4","leftVal","rightVal","valProperties","buildCaseValProperties","_processConcatChildren","convertedChild","convVal","importCaseValue","_importCaseValue","_importCaseValue2","normVal","normErrors","getDefaultField","canGetFirst","parentRuleGroupPath","defaultField","getDefaultSubField","getFirstField","_config$settings","parentRuleGroupConfig","getDefaultFieldSrc","_config$settings$fiel","getDefaultOperator","defaultOperator","fieldOperators","fieldDefaultOperator","getFirstOperator","fieldHasExplicitDefOp","defaultOperatorOptions","operatorConfig","defaultRuleProperties","canUseDefaultFieldAndOp","showErrorMessage","_item$properties","_item$properties2","_item$properties3","_getNewValueForFieldO","getNewValueForFieldOp","newValueSrc","newValueType","newValueError","conjs","defaultGroupProperties","defaultItemProperties","_item$properties4","defaultRule","defaultRoot","canAddDefaultRule","createListFromArray","ids","emptyProperies","typeOf","isTypeOf","validateAndFixTree","_oldTree","newConfig","oldConfig","removeEmptyGroups","removeIncompleteRules","validateItem","validateGroup","validateRule","oldChildren","sanitized","_field$toJS","_field2$toJS","oldSerialized","_wasValid","getFieldSrc","availOps","getOperatorsForField","_operatorCardinality","canFix","isEndValue","newSerialized","isValueCompleted","delta","isCompletedValue","isFieldCompleted","isCompleted","reason","_newSerialized$valueS","_newSerialized$valueS2","_oldSerialized$valueS","validateValue","leftField","isRawValue","validError","fixedValue","_validateFieldValue","validateFieldValue","_validateFieldValue2","_validateFuncValue","validateFuncValue","_validateFuncValue2","_validateNormalValue","validateNormalValue","_validateNormalValue2","fieldWidgetDefinition","rightFieldDefinition","fieldSettings","validResult","validateValueInList","removeInvalidMultiSelectValuesOnLoad","_values$reduce","goodVals","badVals","vv","_values$reduce2","goodValues","badValues","plural","wConfig","wType","jsType","isAsyncListValues","canSkipCheck","realListValues","_valueSrc","isFuncArg","leftFieldStr","rightFieldStr","argDef","_validateValue","_validateValue2","argValidError","fixedArgVal","completeFuncValue","complValue","tmpHasOptional","valueSources","filteredValueSources","filterValueSourcesForField","argDefaultValueSrc","completeArgValue","getDefaultArgValue","setFunc","oldFuncKey","oldArgs","newFuncSignature","getFuncSignature","oldFuncSignature","keepArgsKeys","getCompatibleArgsOnFuncChange","argsKeys","deleteArgsKeys","firstValueSrc","hasValue","setArgValue","setArgValueSrc","argValSrc","_argConfig","_config","s2","argVals","checkIndexes","compatibleKeys","arg2","arg1","oldInd","selectTypes","_fixedArgVal","newField","newOperator","changedProp","keepInputOnChangeFieldSrc","currentField","currentFieldType","currentOperator","currentValueSrc","currentValueType","currentAsyncListValues","convertableWidgets","clearValueOnChangeField","clearValueOnChangeOp","newOperatorConfig","operatorCardinality","currentFieldConfig","newFieldConfig","isOkWithoutField","currentType","newType","canReuseValue","newListValuesType","currentListValuesType","vs","currentWidget","newWidget","currentValueWidget","newValueWidget","canReuseWidget","firstWidgetConfig","getValueSourcesForFieldOp","valueFixes","valueErrors","vType","vSrc","isValidSrc","validateError","isValid","fixValue","dropValue","showValueError","_ignore","_newFieldConfig$field","jsValues","rangeValidateError","vt","parentPathArr","getFieldRawConfig","firstField","keysPath","_firstField","subfields","getOperatorsForType","_config$types$fieldTy","fieldOps","_fieldOps$","getFuncPathLabels","getFieldPathLabels","fieldsKey","subfieldsKey","parentParts","_curr","parentFieldDef","isDescendant","isFieldDescendantOfField","getValueLabel","isSpecialRange","showLabels","fieldWidgetConfig","mergedOpConfig","valueLabels","placeholder","_getWidgetsAndSrcsForFieldOp","widgetValueSrc","canAdd","_fieldConfig$valueSou","_opConfig$valueSource","canAddValueSrc","widgetWeight","wg","w1","w2","getWidgetsForFieldOp","_getWidgetsAndSrcsFor","_fieldDefinition$type","minCnt","_getWidgetsAndSrcsFor2","filteredValueSrcs","_getWidgetsAndSrcsFor3","fieldPartsCopy","parentFieldName","isEmptyItem","liteCheck","isEmptyRuleGroupExt","isEmptyGroup","isEmptyRule","isEmptyRuleGroupExtPropertiesAndChildren","_config$operators$ope","_config$operators$ope2","filledParts","isEmptyRuleProperties","isEmptyGroupChildren","filledCnt","isFilled","_config$operators$ope3","_config$operators$ope4","_valueSrc$get","applyJsonLogic","data","addJsonLogicOperation","customJsonLogicOperations","obj1","obj2","str","pattern","date","dim","addRequiredJsonLogicOperations","applyJsonLogicWithPath","callContextFn","_this","configKeys","compileMetaFieldSettings","compileMetaWidget","compileMetaOperator","compileMetaConjunction","compileMetaWidgetForType","compileMetaFunc","compileMetaSettings","compileMeta","compressConfig","baseConfig","zipConfig","_clean","base","_base","_configKeys","rootKey","decompressConfig","unzipConfig","_mergeDeep","_resolveAndMergeDeep","resolved","_i2","_configKeys2","compileConfig","logs","_compileConfigParts","subconfig","newPath","targetObj","newVal","renderReactElement","_newVal","_targetObj","_newVal2","compileJsonLogicReact","_targetObj2","_val2","_newVal3","compileJsonLogic","_newVal4","def","_def","jl","ignore","argNames","getReactComponentFromCtx","_ctx$components","_props","Cmp","_marked","_marked2","iterateFields","configId","canCompile","mergeCustomizerNoArrays","_extendTypesConfig","_extendFieldsConfig","_extendFuncArgsConfig","momentLocale","typesConfig","typeConfig","_extendTypeConfig","typeWidgetConfig","typeWidgetOperators","_extendFieldConfig","funcDef","tmpIsOptional","excludeOperatorsForField","keysToPutInFieldSettings","_keysToPutInFieldSett","excludeOperatorsForType","excludeOperators","shouldIncludeOperators","addOperators","_addOperators","_computeFieldName","computeFieldName","inGroup","objValue","srcValue","_object","_source","_stack","_context","_iterateFields","_context2","_callee","_config$settings2","fieldKey","_context3","_config$settings3","targetFields","pathKey","_reduce","computedPath","computed","fullPath","fConfig","_config$__fieldNames$","_config$__fieldNames$2","findStr","normalizedPath","argsSignature","argSignature","signature","getFuncArgConfig","_config$settings4","getFieldPath","parentPath","_config$settings5","_config$settings6","_field$get","_field$split","_field$get2","getFieldPathParts","onlyKeys","_field$get3","_field$get4","widgetOpProps","fieldWidgetOpProps","fieldWidgetProps","valueFieldSettings","mergedConfig","_widgetDefKeysToOmit","queryBuilderFormat","resultQuery","secondField","ruleQuery","jsonLogicFormat","usedFields","ff","tmp","pdef","groupOperatorDefinition","formatLogic","revOperatorDefinition","oldUsedFields","funcParts","funcLastKey","formattedArgsArr","funcName","isMethod","jsonLogic","varName","formatteOp","isReverseArgs","opOpts","mongodbFormat","_mongodbFormat","parents","_not","_canWrapExpr","_formatFieldName","canShortMongoQuery","hasParentRuleGroup","realParentPath","groupFieldName","canHaveEmptyChildren","reversedConj","mongoConj","rules","canShort","prevOp","nextOp","totalQuery","filterQuery","useExpr","_formatFunc","_formatFunc2","_formatValue","_formatValue2","fvUseExpr","wrapExpr","_formatRightField","formatRightField","_formatRightField2","_formatFunc3","_formatFunc4","rightField","fieldPartsLabels","fieldFullLabel","rightFieldName","mongoArgsAsObject","argsCnt","lastArg","_formatValue3","_formatValue4","_argUseExpr","_formatValue5","_formatValue6","sqlFormat","_sqlFormat","sqlOp","valFrom","valTo","argsStr","queryString","conjStr","aggrArgs","_operator","fop","returnArgs","revOperatorDef","_fn","cutParentField","fieldSeparatorDisplay","fieldLabel2","funcValue","formattedArgsWithNames","argName","missedArgName","buildEsGeoPoint","geoPointString","coordsNumberArray","buildEsRangeParameters","dateTime","buildEsWildcardParameters","determineOccurrence","combinator","buildRegexpParameters","determineField","buildParameters","queryType","syntax","ES_7_SYNTAX","buildEsRule","_opConfig","elasticSearchQueryType","_opConfig2","elasticSearchFormatValue","buildEsGroup","recursiveFxn","childrenArray","occurrence","resultFlat","ES_6_SYNTAX","elasticSearchFormat","_properties$get","_properties$get2","asyncGeneratorStep","gen","_next","_throw","arg","self","_excluded","findLastIndex","simulateAsyncFetch","all","cPageSize","pageSize","filtered","pages","currentOffset","currentPage","newOffset","hasMore","_x","_x2","_x3","mergeListValues","newValues","toStart","hideNewValues","old","newFiltered","av","merged","optionToListValue","allowCustomValues","_val$value","customItem","listValue","lvs","optionsToListValues","newSelectedListValues","_val$value2","newSelectedValues","_o$value","listValueToOption","disabled","groupTitle","grouplabel","renderTitle","isCustom","isHidden","option","fixListValuesGroupOrder","groupTitles","lv1","_lv1$groupTitle","_lv$groupTitle","nv","NOW","RELATIVE_DATETIME","dimPlural","method","_spel$methodName","matchRes","LOWER","UPPER","LINEAR_REGRESSION","coef","bias","_a$children","mongoFormatOp1","mop","mc","_op","$field","mv","mongoFormatOp2","mops","_$not3","opStr","_this$utils","_this$utils2","_this$utils3","_len3","_key3","_this$utils4","_len4","_key4","_this$utils5","_len5","_key5","_this$utils6","_len6","_key6","_this$utils7","_len7","_key7","_this$utils8","_this2","_len8","_key8","_this$utils9","_this3","_len9","_key9","_this$utils10","_this4","_len10","_key10","_this$utils11","_len11","_key11","_this$utils12","_len12","_key12","_this$utils13","_this5","_len13","_key13","_this$utils14","_this6","_len14","_key14","_this$utils15","_len15","_key15","_this$utils16","_len16","_key16","_this$utils17","_len17","_key17","_this$utils18","_len18","_key18","_this$utils19","_len19","_key19","_this$utils20","_len20","_key20","_this$utils21","_len21","_key21","_this7","_this$utils22","_len22","_key22","_this8","_this$utils23","_len23","_key23","val1","val2","prox","aVal1","aVal2","_this$utils24","_len24","_key24","_this$utils25","_len25","_key25","_this$utils26","_len26","_key26","wgtDef","isFloat","valLabel","_this9","valsLabels","_this10","isCallable","fmt","_args$fmt","_args$fmt$includes","_args$fmt2","_args$fmt2$toLowerCas","_args$fmt3","_args$fmt3$toLowerCas","_args$fmt4","_args$fmt5","_args$fmt5$includes","rightFieldDef","partsExt","_this11","whereStr","aggrField","aggrFieldDef","labelForFormat","_cond","_cond2","leftFieldConfig","rightFieldConfig","_addMixins","mixins","doAdd","mixinFuncs","mixinWidgetRangeslider","mixinWidgetTreeselect","mixinWidgetTreemultiselect","mixinRangeableWidget","mixName","mixinFunc","addMixins","removeMixins","addMixin","types","treeData","_this12","_this13","ConfigMixins","ADD_GROUP","ADD_CASE_GROUP","REMOVE_GROUP","SET_CONJUNCTION","SET_NOT","ADD_RULE","REMOVE_RULE","SET_FIELD","SET_FIELD_SRC","SET_OPERATOR","SET_VALUE","SET_VALUE_SRC","SET_OPERATOR_OPTION","SET_LOCK","SET_TREE","MOVE_ITEM","PLACEMENT_AFTER","PLACEMENT_BEFORE","PLACEMENT_APPEND","PLACEMENT_PREPEND","SET_DRAG_PROGRESS","SET_DRAG_START","SET_DRAG_END","addNewGroup","groupUuid","shouldCreateEmptyGroup","canAddNewRule","isDefaultCase","origState","addItem","removeGroup","removeItem","canLeaveEmptyGroup","isEmptyParentGroup","removeRule","parentOperator","parentValue","parentOperatorConfig","hasGroupCountRule","isParentRuleGroup","canLeaveEmpty","setNot","setLock","lock","setConjunction","_addChildren1","id1","it1","maxNumberOfCases","maxNumberOfRules","maxNesting","rootType","isTernary","targetItem","caseGroup","childrenPath","targetChildren","targetChildrenSize","currentNumber","maxNumber","isLastDefaultCase","_Immutable$OrderedMap2","last","newChildrenWithLast","moveItem","fromPath","toPath","sourcePath","sourceChildren","targetPath","isSameParent","isSourceInsideTarget","isTargetInsideSource","sourceSubpathFromTarget","targetSubpathFromSource","newTargetChildren","newSourceChildren","_oldChildren","setFieldSrc","srcKey","currentRule","currentProperties","currentFielType","keepInput","setField","__isInternal","_newFieldConfig$opera","isInternalValueChange","setOpOnChangeField","wasRuleGroup","currentFieldSrc","currentOperatorOptions","_currentValueSrc","_currentValueType","isRuleGroupExt","isChangeToAnotherType","wasOkWithoutField","lastOp","strategy","groupProperties","_getNewValueForFieldO2","newOperatorOptions","setOperator","_currentValue","_currentOperator","_getNewValueForFieldO3","setValue","calculatedValueType","calculateValueType","lastValueArr","lastValue","lastError","isLastEmpty","isLastError","setValueSrc","_getNewValueForFieldO4","setOperatorOption","checkEmptyGroups","getField","emptyDrag","getActionMeta","action","actionKeysToOmit","actionTypesToIgnore","affectedField","_affectedField","getMemoizedTree","setLastTree","initTree","emptyState","unset","actionMeta","validatedTree","_setField","_tree","_setValue","_tree2","_isInternalValueChange","setTree","addRule","ruleType","addDefaultCaseGroup","addCaseGroup","addGroup","Utils","defaultNoopBatch","callback","batch","setBatch","newBatch","getBatch","createListenerCollection","first","listener","listeners","isSubscribed","nullListeners","store","parentSub","unsubscribe","addNestedSub","trySubscribe","notifyNestedSubs","handleChangeWrapper","subscription","tryUnsubscribe","Provider","contextValue","previousState","Context","_excluded2","EMPTY_ARRAY","NO_SUBSCRIPTION_ARRAY","stringifyComponent","Comp","storeStateUpdatesReducer","updateCount","useIsomorphicLayoutEffectWithArgs","effectFunc","effectArgs","dependencies","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","actualChildProps","childPropsFromStoreUpdate","subscribeUpdates","shouldHandleStateChanges","childPropsSelector","forceComponentUpdateDispatch","didUnsubscribe","lastThrownError","checkForUpdates","latestStoreState","newChildProps","unsubscribeWrapper","initStateUpdates","connectAdvanced","selectorFactory","_ref2$getDisplayName","getDisplayName","_ref2$methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","_ref2$storeKey","storeKey","_ref2$withRef","withRef","_ref2$forwardRef","forwardRef","_ref2$context","connectOptions","WrappedComponent","wrappedComponentName","displayName","selectorFactoryOptions","pure","createChildSelector","usePureOnlyMemo","ConnectFunction","_useMemo","reactReduxForwardedRef","propsContext","ContextToUse","didStoreComeFromProps","didStoreComeFromContext","_useMemo2","overriddenContextValue","_useReducer","_useReducer$","previousStateUpdateResult","renderedWrappedComponent","renderedChild","Connect","forwarded","keysA","keysB","bindActionCreators","actionCreators","dispatch","boundActionCreators","actionCreator","wrapMapToPropsConstant","getConstant","constant","constantSelector","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","proxy","stateOrDispatch","ownProps","whenMapDispatchToPropsIsFunction","mapDispatchToProps","whenMapDispatchToPropsIsMissing","whenMapDispatchToPropsIsObject","whenMapStateToPropsIsFunction","mapStateToProps","whenMapStateToPropsIsMissing","defaultMergeProps","stateProps","dispatchProps","wrapMergePropsFunc","mergeProps","areMergedPropsEqual","hasRunOnce","mergedProps","nextMergedProps","whenMergePropsIsFunction","whenMergePropsIsOmitted","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","handleFirstCall","firstState","firstOwnProps","handleNewPropsAndNewState","handleNewProps","handleNewState","nextStateProps","statePropsChanged","handleSubsequentCalls","nextState","nextOwnProps","propsChanged","stateChanged","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","match","factories","strictEqual","createConnect","_temp","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","_ref$selectorFactory","_ref3$pure","_ref3$areStatesEqual","_ref3$areOwnPropsEqua","_ref3$areStatePropsEq","_ref3$areMergedPropsE","extraOptions","useReduxContext","_useReduxContext","useStore","createDispatchHook","useDispatch","refEquality","useSelectorWithStoreAndSubscription","selector","equalityFn","contextSub","forceRender","latestSubscriptionCallbackError","latestSelector","latestSelectedState","storeState","selectedState","newSelectedState","newStoreState","_newSelectedState","createSelectorHook","useSelector","setDragProgress","mousePos","dragging","setDragStart","dragStart","setDragEnd","_Utils$ConfigUtils","pickConfig","createConfigMemo","configStore","extendAndStore","findBasic","findConfig","basicConfig","extConfig","findExtended","savedConfig","_ret3","findOrExtend","truncateString","useWordBoundary","subString","immutableEqual","createValidationMemo","originalTree","sanitizeTree","getReactContainerType","getReactRootNodeType","isUsingLegacyReactDomRender","liteShouldComponentUpdate","nextProps","prevProps","prevState","should","chs","changed","pureShouldComponentUpdate","canUseOldComponentWillReceiveProps","useOnPropsChanged","origShouldComponentUpdate","newShouldComponentUpdate","shouldNotify","shouldUpdate","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","NewTarget","Query","_Component","_super","oldTree","validatedTreeChanged","newBasicConfig","_this$props","renderBuilder","__isInternalValueChange","builderProps","ConnectedQuery","connect","QueryContainer","lastTree","prevValue","_createConfigMemo","getExtended","getBasic","emptyTree","pr","nextConfig","isConfigChanged","storeValue","isTreeChanged","currentTree","isTreeTrulyChanged","get_children","QueryWrapper","createRuleContainer","Rule","_class","RuleContainer","draggingId","isDraggingMe","_isGroup","isInDraggingTempo","oneValueError","hasError","ConnectedRuleContainer","_isReorderingTree","createSortableContainer","Builder","CanMoveFn","SortableContainer","dom","treeEl","treeElContainer","scrollTop","_dragEl","_plhEl","tmpAllGroups","anyGroup","groupPadding","doHandleDrag","startDragging","paddingLeft","startMousePos","dragEl","plhEl","_treeEl","_plhEl2","startX","startY","startClientX","startClientY","startScrollTop","pos","moved","_prevProps","_prevState","plX","plY","oldPlX","oldPlY","indexId","ignoreCache","els","overflowY","dragInfo","canMoveFn","canMoveBeforeAfterGroup","itemInfo","moveInfo","dragId","dragRect","plhRect","hovRect","treeRect","dragDirs","trgCoord","hovCNodeEl","hovNodeEl","_hovNodeEl$firstChild","rootGroupContainer","hovNodeId","hovEl","doAppend","doPrepend","hovHeight","hovII","trgRect","trgEl","trgII","altII","hovInnerEl","hovEl2","hovRect2","hovHeight2","isOverHover","isClimbToHover","_isOverHover","_isOverHover2","isSamePos","dragLeftOffset","trgLeftOffset","_trgLev","dragLev","availMoves","altMoves","isToRoot","isToCase","prevCaseId","nextCaseId","prevCase","nextCase","addCaseII","am","toII","fromCaseII","toCaseII","trg","isInside","_lev","_fromCaseII","_toCaseII","toParentII","bestMode","filteredMoves","levs","curLev","allLevs","closestDragLev","fromII","_this$props$config$se","canRegroup","canRegroupCases","canLeaveEmptyCase","newLev","newDepthLev","isBeforeAfter","isPend","isLev1","isParentChange","isStructChange","isForbiddenStructChange","isLockedChange","isLastFromCase","newRulesInTargetCase","ConnectedSortableContainer","GroupOrRule","_PureComponent","Draggable","isDraggingTempo","otherProps","isTrueLocked","cn","Operator","keysForMeta","needUpdateMeta","_config$types$selecte","selectedField","selectedFieldType","selectedOperator","operatorsOptions","_opts","selectedOpts","selectedKey","selectedKeys","selectedPath","selectedLabel","ops","customProps","readonly","renderOperator","renderProps","Col","dummyFn","DragIcon","WithConfirmFn","useConfirm","confirmFn","OperatorWrapper","selectedFieldSrc","selectedFieldParts","showOperator","showOperatorLabel","selectedFieldWidgetConfig","hiddenOperator","maxLabelsLength","fieldPlaceholder","isFieldSelected","currField","partsLabels","selectedFullLabel","selectedAltLabel","parentFieldPath","sourceFields","lookingForFieldType","errorText","fieldOpts","optGroup","prefix","countFieldsMatchesType","fullFieldPath","fullLabel","altLabel","tooltip","hasItemsMatchesType","matchesType","renderField","_Utils$RuleUtils","FuncSelect","keysForItems","needUpdateItems","isLHS","parentFuncs","canUseFuncForField","filteredFuncs","_leftFieldConfig$widg","funcPlaceholder","selectedFuncKey","isFuncSelected","leftFieldWidgetField","leftFieldWidgetFieldProps","currFunc","isRootFuncAtLHS","leftFieldFullkey","_relyOnWidgetType","targetDefinition","subpath","funcFullkey","_targetDefinition","canUse","_arg","fullFuncPath","funcOpts","renderFunc","immValue","immValueError","widgetDefinition","widgetValueLabel","textSeparators","setValueHandler","widgetFactory","isConst","widgetProps","funcArgDummyOpDef","Widget","widgetType","oldRange","iValues","aField","_widgets$delta","valueLabel","hasValueSources","widgetLabel","WidgetFactory","_widgets$delta2","setValueSrcHandler","valueSourcesInfo","renderValueSources","valueSourcesOptions","ValueSources","sourceLabel","sepText","sepLabel","sources","widgetCmp","simpleField","fieldFunc","fieldArg","isForRuleGroup","isCaseValue","iValueSrcs","isSpecialRangeForSrcField","isTrueSpecialRange","_widgetDefinition","_this$meta","_Utils$FuncUtils","FuncWidget","funcDefinition","argDefinition","selectProps","funcLabel","showPrefix","forceShow","_this$props2","defaultValueSource","ArgWidget","argIndex","renderSeps","renderBrackets","_Component2","_super2","_delta","_widgetType","_this2$props","_this2$props2","newParentFuncs","FieldWrapper","classname","supportedFieldSrcs","fieldLabel","fieldSources","fieldSourcesOptions","_this$props3","canSelectFieldSource","OperatorOptions","operatorDefinitions","_operatorDefinitions$","optionsFactory","basicOptionsProps","optionsProps","optionsCmp","reordableNodesCnt","selectedFieldConfig","isSelectedGroup","isFieldAndOpSelected","selectedOperatorConfig","selectedOperatorHasOptions","hideOperator","showDragIcon","showWidget","showOperatorOptions","renderConfirm","confirmOptions","doRemove","ruleData","immutableFieldsMode","immutableOpsMode","_this$props4","immutableValuesMode","renderBeforeWidget","renderAfterWidget","_this$props5","renderRuleError","handleDraggerMouseDown","renderIcon","icon","_this$props6","deleteLabel","immutableGroupsMode","renderButton","canDeleteLocked","Btn","_this$props7","lockLabel","lockedLabel","showLock","renderSwitch","Switch","_this$meta2","_this$props8","canShrinkValue","renderButtonGroup","BtnGrp","body","drag","del","createGroupContainer","Group","itemType","GroupContainer","oldConjunction","currentNesting","allowFurtherNesting","ConnectedGroupContainer","groupActionsPositionList","defaultPosition","GroupActions","removeSelf","canAddGroup","canAddRule","canDeleteGroup","addRuleLabel","addGroupLabel","delGroupLabel","groupActionsPosition","setLockSwitch","addRuleBtn","addGroupBtn","delGroupBtn","BasicGroup","BeforeActions","AfterActions","conjunctionOptions","conjunctionCount","isGroupTopPosition","totalRulesCnt","actions","onDragStart","Item","_item","selectedConjunction","renderConjs","_showNot","notLabel","_superPropBase","property","getPrototypeOf","_get","receiver","desc","RuleGroupActions","RuleGroup","_BasicGroup","RuleGroupExtActions","addSubRuleLabel","RuleGroupExt","SwitchGroupActions","canAddDefault","addCaseLabel","addDefaultCaseLabel","addCaseGroupBtn","addDefaultCaseGroupBtn","_Utils$TreeUtils","SwitchGroup","_this$props$children","_this$props$children2","totalCasesCnt","_this$props$children3","casesToReorder","_this$props$children4","nodesInCase","renderSwitchPrefix","CaseGroup","defaultCaseLabel","oneValue","getProperties","_props$properties","typeMap","_props$properties2","postfix","renderItem","_Utils$DefaultUtils","ValueField","canCompareFieldWithField","filteredFields","customPlaceholder","rightFieldKey","rightFieldFullkey","labelYes","labelNo","_props$customProps","customRadioYesProps","customRadioNoProps","onCheckboxChange","onRadioChange","maxLength","textValue","maxRows","fullWidth","use12Hours","dtValue","renderOptions","getMultiSelectValues","multiselect","opt","min","max","numberValue","customInputProps","customSliderProps","conjsCount","lessThenTwo","forceShowConj","showConj","_conjunctionOptions$k","checked","renderNot","onNotChange","typeToLabel","onClick","btnLabel","typeToIcon","onOk","okText","cancelText","VanillaProvider","Proximity","defaults","optionLabel","optionPlaceholder","minProximity","maxProximity","optionTextBefore","defaultProximity","selectedProximity","proxValues","RCE","ProximityOperator","VanillaTextWidget","VanillaTextAreaWidget","VanillaNumberWidget","VanillaSliderWidget","VanillaSelectWidget","VanillaMultiSelectWidget","VanillaDateWidget","VanillaTimeWidget","VanillaDateTimeWidget","VanillaBooleanWidget","_ref12","ValueFieldWidget","_ref13","_ref14","_ref15","VanillaFieldSelect","_ref16","_ref17","_ref18","VanillaConjs","_ref19","VanillaSwitch","_ref20","VanillaButton","_ref21","VanillaIcon","_ref22","VanillaButtonGroup","_ref23","_ref24","VanillaValueSources","_ref25","_ref26","vanillaConfirm","P","_Utils$Autocomplete","_Utils$ListUtils","useListValuesAutocomplete","asyncFetch","useLoadMore","useAsyncSearch","forceAsyncSearch","selectedAsyncListValues","staticListValues","debounceTimeout","multiple","uif","knownSpecialValues","loadMoreTitle","loadingMoreTitle","aPlaceholder","_React$useState","_React$useState2","open","setOpen","_React$useState3","_React$useState4","asyncFetchMeta","setAsyncFetchMeta","_React$useState5","_React$useState6","loadingCnt","setLoadingCnt","_React$useState7","_React$useState8","isLoadingMore","setIsLoadingMore","_React$useState9","_React$useState10","inputValue","setInputValue","_React$useState11","_React$useState12","setAsyncListValues","asyncFectchCnt","componentIsMounted","isSelectedLoadMore","nSelectedAsyncListValues","listValuesToDisplay","isLoading","canInitialLoad","isInitialLoading","canLoadMore","canShowLoadMore","selectedListValue","fetchListValues","isLoadMore","newAsyncFetchCnt","isFetchCancelled","newMeta","nValues","assumeHasMore","realNewMeta","loadListValues","_callee2","loadListValuesDebounced","_callee3","onOpen","onClose","_callee4","isLoadMoreClick","resetValue","_context4","onInputChange","onDropdownVisibleChange","isSpecialValue","specialValue","_callee5","_option2","isClearingAll","isClearingInput","_option$value","_option","shouldIgnore","isAddingCustomOptionFromSearch","_optionsToListValues","_optionsToListValues2","_optionToListValue","_optionToListValue2","_context5","_x4","_callee6","newInputValue","eventType","canSearchAsync","_context6","_x5","_x6","_x7","extendOptions","getOptionSelected","valueOrOption","getOptionDisabled","getOptionIsCustom","_valueOrOption$value","getOptionLabel","fixedOptions","buttonLabels","emptyInitTree","TIME_FILTER","dateValue","DateTimePicker","conjProps","fieldProps","buttonProps","operatorProps","Op","customOperators","getCustomOperators","textWidget","opers","customTextWidget","customTypes","raqbConfig","noop","isSqlFormatOp","supportedOperators","sqlFormatInOpOrNoop","sqlFormatOp","customSqlInFormatter","splitIfString","sqlFormatNotInOpOrNoop","customSqlNotInFormatter","WhereRow","configWithDefaults","onTreeChange","changedTree","flex","direction","SQLWhereRow","mapFieldsToTypes","templateVars","removeQuotesForMultiVariables","col","multiVariableInWhereString","VisualEditor","EditorRows","SqlQueryEditor","datasource","queryHeaderProps","setIsQueryRunnable","preconfiguredDatabase","loading","queryWithDefaults","setQueryRowFilter","setQueryToValidate","isQueryValid","process","onQueryHeaderChange","migrateAnnotation","annotation","oldQuery","SqlDatasource","DataSourceWithBackend","instanceSettings","settingsData","queries","scopedVars","expandedQueries","request","databaseIssue","throwError","refId","interpolatedQuery","response","DataFrameView","lastValueFrom","queryWithoutMacros","toNumber","ConnectionLimits","onOptionsChange","jsonData","autoIdle","updateJsonData","newOpts","onJSONDataNumberChanged","number","onMaxConnectionsChanged","onConnectionIdleAutoChanged","idleConns","maxConns","labelWidth","ConfigSubSection","Label","InlineLabel","Divider","TLSSecretsConfig","editorProps","showCACert","showKeyPair","secureJsonFields","SecretTextArea","sqlPluginLogger","useMigrateDatabaseFields","newOptions","optionsUpdated","maxOpenConns","maxIdleConns","connMaxLifetime","arrayUnique","operations","temp","not_found","sub_props","missing","need_count","are_missing","scopedLogic","scopedData","initial","datum","accumulator","sub_ops","operation","code","pattern_op","rule_op","baseAssignValue","eq","assignMergeValue","baseFor","baseMergeDeep","keysIn","safeGet","baseMerge","srcIndex","customizer","cloneBuffer","cloneTypedArray","copyArray","initCloneObject","isArguments","isArray","isArrayLikeObject","isBuffer","isFunction","isPlainObject","isTypedArray","toPlainObject","mergeFunc","stacked","isCommon","isArr","isBuff","isTyped","MAX_SAFE_INTEGER","nativeFloor","baseRepeat","identity","overRest","setToString","baseRest","arrayMap","baseValues","isIterateeCall","createAssigner","assigner","length","guard","toString","reRegExpChar","reHasRegExpChar","baseIndexOf","isString","toInteger","nativeMax","includes","fromIndex","isObjectLike","baseKeys","getTag","isPrototype","mapTag","setTag","objectProto","hasOwnProperty","isEmpty","tag","baseGetTag","stringTag","baseForOwn","baseIteratee","mapValues","iteratee","merge","mergeWith","basePickBy","getAllKeysIn","pickBy","repeat","baseClamp","baseToString","startsWith","toFinite","remainder","copyObject","modules","installedModules","moduleId","getter","__webpack_require__","createSpelNode","nodeType","activeContext","childNode","parentNode","nodeContext","operands","operand","SpelNode","startingElements","TokenKind","_SpelExpressionEvaluator","_StandardContext","_SpelExpressionParser","_Stack","spelExpressionEvaluator","evalCompiled","locals","expression","_TokenKind","_Tokenizer","_BooleanLiteral","_NumberLiteral","_StringLiteral","_NullLiteral","_FunctionReference","_MethodReference","_PropertyReference","_VariableReference","_CompoundExpression","_Indexer","_Assign","_OpEQ","_OpNE","_OpGE","_OpGT","_OpLE","_OpLT","_OpPlus","_OpMinus","_OpMultiply","_OpDivide","_OpModulus","_OpPower","_OpInc","_OpDec","_OpNot","_OpAnd","_OpOr","_OpMatches","_Ternary","_Elvis","_InlineList","_InlineMap","_Selection","_Projection","_OpInstanceof","_OpBetween","_TypeReference","_BeanReference","_Identifier","_QualifiedIdentifier","_ConstructorReference","SpelExpressionParser","VALID_QUALIFIED_ID_PATTERN","configuration","constructedNodes","expressionString","tokenStream","tokenStreamLength","tokenStreamPointer","setConfiguration","parse","ast","eatExpression","moreTokens","raiseInternalException","peekToken","nextToken","eatLogicalOrExpression","toPosBounds","assignedValue","toPosToken","valueIfNull","ifTrueExprValue","eatToken","ifFalseExprValue","eatLogicalAndExpression","peekIdentifierToken","peekTokenOne","rhExpr","checkOperands","eatRelationalExpression","eatSumExpression","relationalOperatorToken","maybeEatRelationalOperator","tk","eatProductExpression","peekTokenAny","checkRightOperand","eatPowerIncDecExpression","eatUnaryExpression","eatPrimaryExpression","eatStartNode","maybeEatNode","pop","eatDottedNode","maybeEatNonDottedNode","push","maybeEatIndexer","nullSafeNavigation","maybeEatMethodOrProperty","maybeEatFunctionOrVar","maybeEatProjection","maybeEatSelection","functionOrVariableName","maybeEatMethodArgs","consumeArguments","eatConstructorArgs","accumulatedArguments","positionOf","maybeEatLiteral","maybeEatParenExpression","maybeEatTypeReference","maybeEatNullReference","maybeEatConstructorReference","maybeEatBeanReference","maybeEatInlineListOrMap","beanRefToken","beanNameToken","beanName","beanReference","typeName","eatPossiblyQualifiedId","dims","peekTokenConsumeIfMatched","nullToken","listElements","closingCurly","firstExpression","mapElements","peekSelectToken","qualifiedIdPieces","isValidQualifiedId","methodOrPropertyName","newToken","possiblyQualifiedConstructorName","dimensions","idString","expectedKind","desiredTokenKind","consumeIfMatched","identifierString","message","expected","actual","checkLeftOperand","operandExpression","_Token","ALTERNATIVE_OPERATOR_NAMES","FLAGS","IS_DIGIT","IS_HEXDIGIT","IS_ALPHA","tokenize","inputData","toProcess","isAlphabetic","lexIdentifier","isTwoCharToken","pushPairToken","pushCharToken","lexNumericLiteral","lexQuotedStringLiteral","lexDoubleQuotedStringLiteral","terminated","subarray","firstCharIsZero","isReal","isHex","dotpos","endOfNumber","possibleSign","isHexadecimalDigit","isChar","pushHexIntToken","isDigit","pushIntToken","isExponentChar","isFloatSuffix","isDoubleSuffix","pushRealToken","substring","asString","isIdentifier","pushOneCharOrTwoCharToken","isLong","Tokenizer","Token","tokenKind","tokenData","startPos","endPos","_SpelNode","createNode","BooleanLiteral","NumberLiteral","stripQuotes","StringLiteral","NullLiteral","compiledArgs","currentActiveContext","FunctionReference","maybeHandleNullSafeNavigation","member","MethodReference","PropertyReference","variableName","VariableReference","expressionComponents","buildContextStack","childrenCount","unbuildContextStack","childCount","CompoundExpression","Indexer","Assign","OpEQ","OpNE","OpGE","OpGT","OpLE","OpLT","OpPlus","OpMinus","leftValue","rightValue","OpMultiply","OpDivide","OpModulus","exp","OpPower","int","cur","OpInc","OpDec","OpNot","OpAnd","OpOr","regexpString","regexp","OpMatches","ifTrue","ifFalse","Ternary","Elvis","elements","element","InlineList","mapPieces","keyValue","piece","InlineMap","_typeof","matches","doesMatch","selectFromArray","whichElement","newCollection","selectFromMap","Selection","projectCollection","Projection","OpInstanceof","OpBetween","_dims","TypeReference","BeanReference","identifierName","Identifier","_toConsumableArray","pieces","QualifiedIdentifier","_toArray","dimension","_nodes","_nodes2","_qualifiedIdentifier","ConstructorReference","create","authentication","principal","role","hasRole","grantedAuthority","StandardContext","_includes","_interopRequireDefault","_tokenTypes","_Indentation","_InlineBlock","_Params","_classCallCheck","instance","Constructor","_defineProperties","_createClass","protoProps","staticProps","trimSpacesEnd","Formatter","cfg","tokenizer","tokenOverride","formattedQuery","comment","preserveWhitespaceFor","_repeat","_last","INDENT_TYPE_TOP_LEVEL","INDENT_TYPE_BLOCK_LEVEL","Indentation","indent","INLINE_MAX_LENGTH","InlineBlock","Params","_isEmpty","_escapeRegExp","lineCommentTypes","reservedWords","reservedWordsPattern","specialChars","stringTypes","patterns","parens","paren","typesRegex","input","previousToken","regex","parseKey","quoteChar","_Formatter","reservedTopLevelWords","reservedTopLevelWordsNoIndent","reservedNewlineWords","Db2Formatter","N1qlFormatter","previousReservedToken","PlSqlFormatter","StandardSqlFormatter","_Db2Formatter","_N1qlFormatter","_PlSqlFormatter","_StandardSqlFormatter","ID_GLOBAL_REGEXP","QUAL_GLOBAL_REGEXP","CHARS_GLOBAL_REGEXP","CHARS_ESCAPE_MAP","forbidQualified","stringifyObjects","timeZone","escapeString","chunkIndex","placeholdersRegex","valuesIndex","dt","year","month","day","hour","minute","second","millisecond","tz","convertTimezone","zeroPad","buffer","escapedVal","_regeneratorRuntime","define","wrap","Generator","makeInvokeMethod","tryCatch","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","AsyncIterator","invoke","callInvokeWithMethodAndArg","maybeInvokeDelegate","pushTryEntry","resetTryEntry","handle","runtime"],"sourceRoot":""}