id
stringlengths 1
6
| tokens
sequence | labels
sequence |
---|---|---|
661100 | [
"internal",
"export",
"function",
"toAngularJSON",
"(",
"obj",
",",
"pretty",
"?",
")",
"{",
"if",
"(",
"obj",
"===",
"undefined",
")",
"return",
"''",
";",
"if",
"(",
"typeof",
"pretty",
"===",
"'number'",
")",
"{",
"pretty",
"=",
"pretty",
"?",
"2",
":",
"null",
";",
"}",
"return",
"JSON",
".",
"stringify",
"(",
"obj",
",",
"toJsonReplacer",
",",
"pretty",
")",
";",
"}",
"function",
"isWindow",
"(",
"obj",
")",
"{",
"return",
"obj",
"&&",
"obj",
".",
"window",
"===",
"obj",
";",
"}",
"function",
"isScope",
"(",
"obj",
")",
"{",
"return",
"obj",
"&&",
"obj",
".",
"$evalAsync",
"&&",
"obj",
".",
"$watch",
";",
"}",
"function",
"toJsonReplacer",
"(",
"key",
",",
"value",
")",
"{",
"let",
"val",
"=",
"value",
";",
"if",
"(",
"typeof",
"key",
"===",
"'string'",
"&&",
"key",
".",
"charAt",
"(",
"0",
")",
"===",
"'$'",
"&&",
"key",
".",
"charAt",
"(",
"1",
")",
"===",
"'$'",
")",
"{",
"val",
"=",
"undefined",
";",
"}",
"else",
"if",
"(",
"isWindow",
"(",
"value",
")",
")",
"{",
"val",
"=",
"'$WINDOW'",
";",
"}",
"else",
"if",
"(",
"value",
"&&",
"window",
".",
"document",
"===",
"value",
")",
"{",
"val",
"=",
"'$DOCUMENT'",
";",
"}",
"else",
"if",
"(",
"isScope",
"(",
"value",
")",
")",
"{",
"val",
"=",
"'$SCOPE'",
";",
"}",
"return",
"val",
";",
"}"
] | [
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661101 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"SavedObjectNotFound",
"}",
"from",
"'../../../../../opensearch_dashboards_utils/common'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./base'",
";",
"import",
"{",
"propFilter",
"}",
"from",
"'../utils'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../osd_field_types/types'",
";",
"import",
"{",
"isNestedField",
",",
"IndexPatternField",
"}",
"from",
"'../../../index_patterns/fields'",
";",
"const",
"filterByType",
"=",
"propFilter",
"(",
"'type'",
")",
";",
"export",
"type",
"FieldTypes",
"=",
"OSD_FIELD_TYPES",
"|",
"OSD_FIELD_TYPES",
"[",
"]",
"|",
"'*'",
";",
"export",
"type",
"IFieldParamType",
"=",
"FieldParamType",
";",
"export",
"class",
"FieldParamType",
"extends",
"BaseParamType",
"{",
"required",
"=",
"true",
";",
"scriptable",
"=",
"true",
";",
"filterFieldTypes",
":",
"FieldTypes",
";",
"onlyAggregatable",
":",
"boolean",
";",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"this",
".",
"filterFieldTypes",
"=",
"config",
".",
"filterFieldTypes",
"||",
"'*'",
";",
"this",
".",
"onlyAggregatable",
"=",
"config",
".",
"onlyAggregatable",
"!==",
"false",
";",
"if",
"(",
"!",
"config",
".",
"write",
")",
"{",
"this",
".",
"write",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"const",
"field",
"=",
"aggConfig",
".",
"getField",
"(",
")",
";",
"if",
"(",
"!",
"field",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.paramTypes.field.requiredFieldParameterErrorMessage'",
",",
"{",
"defaultMessage",
":",
"'{fieldParameter} is a required parameter'",
",",
"values",
":",
"{",
"fieldParameter",
":",
"'\"field\"'",
",",
"}",
",",
"}",
")",
")",
";",
"}",
"if",
"(",
"field",
".",
"scripted",
")",
"{",
"output",
".",
"params",
".",
"script",
"=",
"{",
"source",
":",
"field",
".",
"script",
",",
"lang",
":",
"field",
".",
"lang",
",",
"}",
";",
"}",
"else",
"{",
"output",
".",
"params",
".",
"field",
"=",
"field",
".",
"name",
";",
"}",
"}",
";",
"}",
"this",
".",
"serialize",
"=",
"(",
"field",
")",
"=>",
"{",
"return",
"field",
".",
"name",
";",
"}",
";",
"this",
".",
"deserialize",
"=",
"(",
"fieldName",
",",
"aggConfig",
"?",
")",
"=>",
"{",
"if",
"(",
"!",
"aggConfig",
")",
"{",
"throw",
"new",
"Error",
"(",
"'aggConfig was not provided to FieldParamType deserialize function'",
")",
";",
"}",
"const",
"field",
"=",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
".",
"fields",
".",
"getByName",
"(",
"fieldName",
")",
";",
"if",
"(",
"!",
"field",
")",
"{",
"throw",
"new",
"SavedObjectNotFound",
"(",
"'index-pattern-field'",
",",
"fieldName",
")",
";",
"}",
"const",
"validField",
"=",
"this",
".",
"getAvailableFields",
"(",
"aggConfig",
")",
".",
"find",
"(",
"(",
"f",
")",
"=>",
"f",
".",
"name",
"===",
"fieldName",
")",
";",
"if",
"(",
"!",
"validField",
")",
"{",
"throw",
"new",
"Error",
"(",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage'",
",",
"{",
"defaultMessage",
":",
"'Saved field \"{fieldParameter}\" is invalid for use with the \"{aggType}\" aggregation. Please select a new field.'",
",",
"values",
":",
"{",
"fieldParameter",
":",
"fieldName",
",",
"aggType",
":",
"aggConfig",
"?.",
"type",
"?.",
"title",
",",
"}",
",",
"}",
")",
")",
";",
"}",
"return",
"validField",
";",
"}",
";",
"}",
"/**\n * filter the fields to the available ones\n */",
"getAvailableFields",
"=",
"(",
"aggConfig",
")",
"=>",
"{",
"const",
"fields",
"=",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
".",
"fields",
";",
"const",
"filteredFields",
"=",
"fields",
".",
"filter",
"(",
"(",
"field",
")",
"=>",
"{",
"const",
"{",
"onlyAggregatable",
",",
"scriptable",
",",
"filterFieldTypes",
"}",
"=",
"this",
";",
"if",
"(",
"(",
"onlyAggregatable",
"&&",
"(",
"!",
"field",
".",
"aggregatable",
"||",
"isNestedField",
"(",
"field",
")",
")",
")",
"||",
"(",
"!",
"scriptable",
"&&",
"field",
".",
"scripted",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"filterByType",
"(",
"[",
"field",
"]",
",",
"filterFieldTypes",
")",
".",
"length",
"!==",
"0",
";",
"}",
")",
";",
"return",
"filteredFields",
";",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
941,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
668,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
941,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
668,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
668,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
941,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
668,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661102 | [
"import",
"_",
"from",
"'lodash'",
";",
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./base'",
";",
"export",
"class",
"JsonParamType",
"extends",
"BaseParamType",
"{",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"this",
".",
"name",
"=",
"config",
".",
"name",
"||",
"'json'",
";",
"if",
"(",
"!",
"config",
".",
"write",
")",
"{",
"this",
".",
"write",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"let",
"paramJson",
";",
"const",
"param",
"=",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
";",
"if",
"(",
"!",
"param",
")",
"{",
"return",
";",
"}",
"try",
"{",
"paramJson",
"=",
"JSON",
".",
"parse",
"(",
"param",
")",
";",
"}",
"catch",
"(",
"err",
")",
"{",
"return",
";",
"}",
"function",
"filteredCombine",
"(",
"srcA",
",",
"srcB",
")",
"{",
"function",
"mergeObjs",
"(",
"a",
",",
"b",
")",
"{",
"return",
"_",
"(",
"a",
")",
".",
"keys",
"(",
")",
".",
"union",
"(",
"_",
".",
"keys",
"(",
"b",
")",
")",
".",
"transform",
"(",
"function",
"(",
"dest",
",",
"key",
")",
"{",
"const",
"val",
"=",
"compare",
"(",
"a",
"[",
"key",
"]",
",",
"b",
"[",
"key",
"]",
")",
";",
"if",
"(",
"val",
"!==",
"undefined",
")",
"dest",
"[",
"key",
"]",
"=",
"val",
";",
"}",
",",
"{",
"}",
")",
".",
"value",
"(",
")",
";",
"}",
"function",
"mergeArrays",
"(",
"a",
",",
"b",
")",
"{",
"return",
"_",
".",
"times",
"(",
"Math",
".",
"max",
"(",
"a",
".",
"length",
",",
"b",
".",
"length",
")",
",",
"function",
"(",
"i",
")",
"{",
"return",
"compare",
"(",
"a",
"[",
"i",
"]",
",",
"b",
"[",
"i",
"]",
")",
";",
"}",
")",
";",
"}",
"function",
"compare",
"(",
"a",
",",
"b",
")",
"{",
"if",
"(",
"_",
".",
"isPlainObject",
"(",
"a",
")",
"&&",
"_",
".",
"isPlainObject",
"(",
"b",
")",
")",
"return",
"mergeObjs",
"(",
"a",
",",
"b",
")",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"a",
")",
"&&",
"Array",
".",
"isArray",
"(",
"b",
")",
")",
"return",
"mergeArrays",
"(",
"a",
",",
"b",
")",
";",
"if",
"(",
"b",
"===",
"null",
")",
"return",
"undefined",
";",
"if",
"(",
"b",
"!==",
"undefined",
")",
"return",
"b",
";",
"return",
"a",
";",
"}",
"return",
"compare",
"(",
"srcA",
",",
"srcB",
")",
";",
"}",
"output",
".",
"params",
"=",
"filteredCombine",
"(",
"output",
".",
"params",
",",
"paramJson",
")",
";",
"return",
";",
"}",
";",
"}",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
941,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661103 | [
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./base'",
";",
"export",
"interface",
"OptionedValueProp",
"{",
"value",
":",
"string",
";",
"text",
":",
"string",
";",
"disabled",
"?",
":",
"boolean",
";",
"isCompatible",
":",
"(",
"agg",
":",
"IAggConfig",
")",
"=>",
"boolean",
";",
"}",
"export",
"class",
"OptionedParamType",
"extends",
"BaseParamType",
"{",
"options",
":",
"OptionedValueProp",
"[",
"]",
";",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"if",
"(",
"!",
"config",
".",
"write",
")",
"{",
"this",
".",
"write",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
".",
"value",
";",
"}",
";",
"}",
"if",
"(",
"!",
"config",
".",
"serialize",
")",
"{",
"this",
".",
"serialize",
"=",
"(",
"selected",
")",
"=>",
"{",
"return",
"selected",
".",
"value",
";",
"}",
";",
"}",
"if",
"(",
"!",
"config",
".",
"deserialize",
")",
"{",
"this",
".",
"deserialize",
"=",
"(",
"value",
")",
"=>",
"{",
"return",
"this",
".",
"options",
".",
"find",
"(",
"(",
"option",
")",
"=>",
"option",
".",
"value",
"===",
"value",
")",
";",
"}",
";",
"}",
"this",
".",
"options",
"=",
"config",
".",
"options",
"||",
"[",
"]",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
941,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8956,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8956,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661104 | [
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./base'",
";",
"export",
"class",
"StringParamType",
"extends",
"BaseParamType",
"{",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"if",
"(",
"!",
"config",
".",
"write",
")",
"{",
"this",
".",
"write",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"if",
"(",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
"&&",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
".",
"length",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
";",
"}",
"}",
";",
"}",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
941,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661105 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"AggType",
",",
"AggTypeConfig",
"}",
"from",
"'../agg_type'",
";",
"import",
"{",
"AggParamType",
"}",
"from",
"'../param_types/agg'",
";",
"import",
"{",
"AggConfig",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"FieldTypes",
"}",
"from",
"'../param_types'",
";",
"export",
"interface",
"IMetricAggConfig",
"extends",
"AggConfig",
"{",
"type",
":",
"InstanceType",
"<",
"typeof",
"MetricAggType",
">",
";",
"}",
"export",
"interface",
"MetricAggParam",
"<",
"TMetricAggConfig",
"extends",
"AggConfig",
">",
"extends",
"AggParamType",
"<",
"TMetricAggConfig",
">",
"{",
"filterFieldTypes",
"?",
":",
"FieldTypes",
";",
"onlyAggregatable",
"?",
":",
"boolean",
";",
"}",
"const",
"metricType",
"=",
"'metrics'",
";",
"interface",
"MetricAggTypeConfig",
"<",
"TMetricAggConfig",
"extends",
"AggConfig",
">",
"extends",
"AggTypeConfig",
"<",
"TMetricAggConfig",
",",
"MetricAggParam",
"<",
"TMetricAggConfig",
">",
">",
"{",
"isScalable",
"?",
":",
"(",
")",
"=>",
"boolean",
";",
"subtype",
"?",
":",
"string",
";",
"}",
"export",
"type",
"IMetricAggType",
"=",
"MetricAggType",
";",
"export",
"class",
"MetricAggType",
"<",
"TMetricAggConfig",
"extends",
"AggConfig",
"=",
"IMetricAggConfig",
">",
"extends",
"AggType",
"<",
"TMetricAggConfig",
",",
"MetricAggParam",
"<",
"TMetricAggConfig",
">",
">",
"{",
"subtype",
":",
"string",
";",
"isScalable",
":",
"(",
")",
"=>",
"boolean",
";",
"type",
"=",
"metricType",
";",
"getKey",
"=",
"(",
")",
"=>",
"{",
"}",
";",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"this",
".",
"getValue",
"=",
"config",
".",
"getValue",
"||",
"(",
"(",
"agg",
",",
"bucket",
")",
"=>",
"{",
"const",
"isSettableToZero",
"=",
"[",
"METRIC_TYPES",
".",
"CARDINALITY",
",",
"METRIC_TYPES",
".",
"SUM",
"]",
".",
"includes",
"(",
"agg",
".",
"type",
".",
"name",
"as",
"METRIC_TYPES",
")",
";",
"if",
"(",
"!",
"bucket",
"[",
"agg",
".",
"id",
"]",
"&&",
"isSettableToZero",
")",
"return",
"0",
";",
"return",
"bucket",
"[",
"agg",
".",
"id",
"]",
"&&",
"bucket",
"[",
"agg",
".",
"id",
"]",
".",
"value",
";",
"}",
")",
";",
"this",
".",
"subtype",
"=",
"config",
".",
"subtype",
"||",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.metricAggregationsSubtypeTitle'",
",",
"{",
"defaultMessage",
":",
"'Metric Aggregations'",
",",
"}",
")",
";",
"this",
".",
"isScalable",
"=",
"config",
".",
"isScalable",
"||",
"(",
"(",
")",
"=>",
"false",
")",
";",
"}",
"}",
"export",
"function",
"isMetricAggType",
"(",
"aggConfig",
")",
"{",
"return",
"aggConfig",
"&&",
"aggConfig",
".",
"type",
"===",
"metricType",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26093,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26094,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661106 | [
"import",
"{",
"buildRangeFilter",
",",
"RangeFilterParams",
"}",
"from",
"'../../../../../common'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'../../agg_types'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"internal",
"export",
"const",
"createFilterHistogram",
"=",
"(",
"getFieldFormatsStart",
")",
"=>",
"{",
"return",
"(",
"aggConfig",
",",
"key",
")",
"=>",
"{",
"const",
"{",
"deserialize",
"}",
"=",
"getFieldFormatsStart",
"(",
")",
";",
"const",
"value",
"=",
"parseInt",
"(",
"key",
",",
"10",
")",
";",
"const",
"params",
"=",
"{",
"gte",
":",
"value",
",",
"lt",
":",
"value",
"+",
"aggConfig",
".",
"params",
".",
"interval",
"}",
";",
"return",
"buildRangeFilter",
"(",
"aggConfig",
".",
"params",
".",
"field",
",",
"params",
",",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
",",
"deserialize",
"(",
"aggConfig",
".",
"toSerializedFieldFormat",
"(",
")",
")",
".",
"convert",
"(",
"key",
")",
")",
";",
"}",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1865,
null,
null,
null,
null,
null,
null,
null,
null,
1278,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4088,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661107 | [
"import",
"{",
"isAutoInterval",
"}",
"from",
"'../_interval_options'",
";",
"import",
"{",
"OPENSEARCH_FIELD_TYPES",
"}",
"from",
"'../../../../types'",
";",
"interface",
"IntervalValuesRange",
"{",
"min",
":",
"number",
";",
"max",
":",
"number",
";",
"}",
"export",
"interface",
"CalculateHistogramIntervalParams",
"{",
"interval",
":",
"string",
";",
"maxBucketsUiSettings",
":",
"number",
";",
"maxBucketsUserInput",
"?",
":",
"number",
"|",
"''",
";",
"esTypes",
":",
"OPENSEARCH_FIELD_TYPES",
"[",
"]",
";",
"intervalBase",
"?",
":",
"number",
";",
"values",
"?",
":",
"IntervalValuesRange",
";",
"}",
"/**\n * Round interval by order of magnitude to provide clean intervals\n */",
"const",
"roundInterval",
"=",
"(",
"minInterval",
")",
"=>",
"{",
"const",
"orderOfMagnitude",
"=",
"Math",
".",
"pow",
"(",
"10",
",",
"Math",
".",
"floor",
"(",
"Math",
".",
"log10",
"(",
"minInterval",
")",
")",
")",
";",
"let",
"interval",
"=",
"orderOfMagnitude",
";",
"while",
"(",
"interval",
"<",
"minInterval",
")",
"{",
"interval",
"+=",
"orderOfMagnitude",
";",
"}",
"return",
"interval",
";",
"}",
";",
"const",
"calculateForGivenInterval",
"=",
"(",
"diff",
",",
"interval",
",",
"maxBucketsUiSettings",
")",
"=>",
"{",
"const",
"bars",
"=",
"diff",
"/",
"interval",
";",
"if",
"(",
"bars",
">",
"maxBucketsUiSettings",
")",
"{",
"const",
"minInterval",
"=",
"diff",
"/",
"maxBucketsUiSettings",
";",
"return",
"roundInterval",
"(",
"minInterval",
")",
";",
"}",
"return",
"interval",
";",
"}",
";",
"/**\n * Algorithm for determining auto-interval\n\n 1. Define maxBars as Math.min(<user input>, <max buckets setting>)\n 2. Find the min and max values in the data\n 3. Subtract the min from max to get diff\n 4. Set exactInterval to diff / maxBars\n 5. Based on exactInterval, find the power of 10 that's lower and higher\n 6. Find the number of expected buckets that lowerPower would create: diff / lowerPower\n 7. Find the number of expected buckets that higherPower would create: diff / higherPower\n 8. There are three possible final intervals, pick the one that's closest to maxBars:\n - The lower power of 10\n - The lower power of 10, times 2\n - The lower power of 10, times 5\n **/",
"const",
"calculateAutoInterval",
"=",
"(",
"diff",
",",
"maxBars",
",",
"esTypes",
")",
"=>",
"{",
"const",
"exactInterval",
"=",
"diff",
"/",
"maxBars",
";",
"if",
"(",
"diff",
"<",
"maxBars",
"&&",
"esTypes",
".",
"every",
"(",
"(",
"opensearchType",
")",
"=>",
"[",
"OPENSEARCH_FIELD_TYPES",
".",
"INTEGER",
",",
"OPENSEARCH_FIELD_TYPES",
".",
"LONG",
",",
"OPENSEARCH_FIELD_TYPES",
".",
"SHORT",
",",
"OPENSEARCH_FIELD_TYPES",
".",
"BYTE",
",",
"]",
".",
"includes",
"(",
"opensearchType",
")",
")",
")",
"{",
"return",
"1",
";",
"}",
"const",
"lowerPower",
"=",
"Math",
".",
"pow",
"(",
"10",
",",
"Math",
".",
"floor",
"(",
"Math",
".",
"log10",
"(",
"exactInterval",
")",
")",
")",
";",
"const",
"autoBuckets",
"=",
"diff",
"/",
"lowerPower",
";",
"if",
"(",
"autoBuckets",
">",
"maxBars",
")",
"{",
"if",
"(",
"autoBuckets",
"/",
"2",
"<=",
"maxBars",
")",
"{",
"return",
"lowerPower",
"*",
"2",
";",
"}",
"else",
"if",
"(",
"autoBuckets",
"/",
"5",
"<=",
"maxBars",
")",
"{",
"return",
"lowerPower",
"*",
"5",
";",
"}",
"else",
"{",
"return",
"lowerPower",
"*",
"10",
";",
"}",
"}",
"return",
"lowerPower",
";",
"}",
";",
"export",
"const",
"calculateHistogramInterval",
"=",
"(",
"{",
"interval",
",",
"maxBucketsUiSettings",
",",
"maxBucketsUserInput",
",",
"intervalBase",
",",
"values",
",",
"esTypes",
",",
"}",
")",
"=>",
"{",
"const",
"isAuto",
"=",
"isAutoInterval",
"(",
"interval",
")",
";",
"let",
"calculatedInterval",
"=",
"isAuto",
"?",
"0",
":",
"parseFloat",
"(",
"interval",
")",
";",
"if",
"(",
"Number",
".",
"isNaN",
"(",
"calculatedInterval",
")",
")",
"{",
"return",
"calculatedInterval",
";",
"}",
"if",
"(",
"values",
")",
"{",
"const",
"diff",
"=",
"values",
".",
"max",
"-",
"values",
".",
"min",
";",
"if",
"(",
"diff",
")",
"{",
"calculatedInterval",
"=",
"isAuto",
"?",
"calculateAutoInterval",
"(",
"diff",
",",
"Math",
".",
"min",
"(",
"maxBucketsUiSettings",
",",
"maxBucketsUserInput",
"||",
"maxBucketsUiSettings",
")",
",",
"esTypes",
")",
":",
"calculateForGivenInterval",
"(",
"diff",
",",
"calculatedInterval",
",",
"maxBucketsUiSettings",
")",
";",
"}",
"}",
"if",
"(",
"intervalBase",
")",
"{",
"if",
"(",
"calculatedInterval",
"<",
"intervalBase",
")",
"{",
"calculatedInterval",
"=",
"intervalBase",
";",
"}",
"else",
"if",
"(",
"calculatedInterval",
"%",
"intervalBase",
"!==",
"0",
")",
"{",
"calculatedInterval",
"=",
"Math",
".",
"round",
"(",
"calculatedInterval",
"/",
"intervalBase",
")",
"*",
"intervalBase",
";",
"}",
"}",
"const",
"defaultValueForUnspecifiedInterval",
"=",
"1",
";",
"return",
"calculatedInterval",
"||",
"defaultValueForUnspecifiedInterval",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
3,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
3,
null,
3,
null,
5,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9410,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661108 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
",",
"UI_SETTINGS",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'../agg_types'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"createFilterHistogram",
"}",
"from",
"'./create_filter/histogram'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"ExtendedBounds",
"}",
"from",
"'./lib/extended_bounds'",
";",
"import",
"{",
"isAutoInterval",
",",
"autoInterval",
"}",
"from",
"'./_interval_options'",
";",
"import",
"{",
"calculateHistogramInterval",
"}",
"from",
"'./lib/histogram_calculate_interval'",
";",
"export",
"interface",
"AutoBounds",
"{",
"min",
":",
"number",
";",
"max",
":",
"number",
";",
"}",
"export",
"interface",
"HistogramBucketAggDependencies",
"{",
"getConfig",
":",
"<",
"T",
"=",
"any",
">",
"(",
"key",
":",
"string",
")",
"=>",
"T",
";",
"getFieldFormatsStart",
":",
"AggTypesDependencies",
"[",
"'getFieldFormatsStart'",
"]",
";",
"}",
"export",
"interface",
"IBucketHistogramAggConfig",
"extends",
"IBucketAggConfig",
"{",
"setAutoBounds",
":",
"(",
"bounds",
":",
"AutoBounds",
")",
"=>",
"void",
";",
"getAutoBounds",
":",
"(",
")",
"=>",
"AutoBounds",
";",
"}",
"export",
"interface",
"AggParamsHistogram",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"interval",
":",
"string",
";",
"maxBars",
"?",
":",
"number",
";",
"intervalBase",
"?",
":",
"number",
";",
"min_doc_count",
"?",
":",
"boolean",
";",
"has_extended_bounds",
"?",
":",
"boolean",
";",
"extended_bounds",
"?",
":",
"ExtendedBounds",
";",
"}",
"export",
"const",
"getHistogramBucketAgg",
"=",
"(",
"{",
"getConfig",
",",
"getFieldFormatsStart",
",",
"}",
")",
"=>",
"new",
"BucketAggType",
"<",
"IBucketHistogramAggConfig",
">",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"HISTOGRAM",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogramTitle'",
",",
"{",
"defaultMessage",
":",
"'Histogram'",
",",
"}",
")",
",",
"ordered",
":",
"{",
"}",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
";",
"}",
",",
"createFilter",
":",
"createFilterHistogram",
"(",
"getFieldFormatsStart",
")",
",",
"decorateAggConfig",
"(",
")",
"{",
"let",
"autoBounds",
";",
"return",
"{",
"setAutoBounds",
":",
"{",
"configurable",
":",
"true",
",",
"value",
"(",
"newValue",
")",
"{",
"autoBounds",
"=",
"newValue",
";",
"}",
",",
"}",
",",
"getAutoBounds",
":",
"{",
"configurable",
":",
"true",
",",
"value",
"(",
")",
"{",
"return",
"autoBounds",
";",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"}",
",",
"{",
"name",
":",
"'intervalBase'",
",",
"default",
":",
"null",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'interval'",
",",
"default",
":",
"autoInterval",
",",
"modifyAggConfigOnSearchRequestStart",
"(",
"aggConfig",
",",
"searchSource",
",",
"options",
")",
"{",
"const",
"field",
"=",
"aggConfig",
".",
"getField",
"(",
")",
";",
"const",
"aggBody",
"=",
"field",
".",
"scripted",
"?",
"{",
"script",
":",
"{",
"source",
":",
"field",
".",
"script",
",",
"lang",
":",
"field",
".",
"lang",
"}",
"}",
":",
"{",
"field",
":",
"field",
".",
"name",
"}",
";",
"const",
"childSearchSource",
"=",
"searchSource",
".",
"createChild",
"(",
")",
".",
"setField",
"(",
"'size'",
",",
"0",
")",
".",
"setField",
"(",
"'aggs'",
",",
"{",
"maxAgg",
":",
"{",
"max",
":",
"aggBody",
",",
"}",
",",
"minAgg",
":",
"{",
"min",
":",
"aggBody",
",",
"}",
",",
"}",
")",
";",
"return",
"childSearchSource",
".",
"fetch",
"(",
"options",
")",
".",
"then",
"(",
"(",
"resp",
")",
"=>",
"{",
"const",
"min",
"=",
"resp",
".",
"aggregations",
"?.",
"minAgg",
"?.",
"value",
"??",
"0",
";",
"const",
"max",
"=",
"resp",
".",
"aggregations",
"?.",
"maxAgg",
"?.",
"value",
"??",
"0",
";",
"aggConfig",
".",
"setAutoBounds",
"(",
"{",
"min",
",",
"max",
",",
"}",
")",
";",
"}",
")",
".",
"catch",
"(",
"(",
"e",
")",
"=>",
"{",
"if",
"(",
"e",
".",
"name",
"===",
"'AbortError'",
")",
"return",
";",
"throw",
"new",
"Error",
"(",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.histogram.missingMaxMinValuesWarning'",
",",
"{",
"defaultMessage",
":",
"'Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance.'",
",",
"}",
")",
")",
";",
"}",
")",
";",
"}",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"const",
"values",
"=",
"aggConfig",
".",
"getAutoBounds",
"(",
")",
";",
"output",
".",
"params",
".",
"interval",
"=",
"calculateHistogramInterval",
"(",
"{",
"values",
",",
"interval",
":",
"aggConfig",
".",
"params",
".",
"interval",
",",
"maxBucketsUiSettings",
":",
"getConfig",
"(",
"UI_SETTINGS",
".",
"HISTOGRAM_MAX_BARS",
")",
",",
"maxBucketsUserInput",
":",
"aggConfig",
".",
"params",
".",
"maxBars",
",",
"intervalBase",
":",
"aggConfig",
".",
"params",
".",
"intervalBase",
",",
"esTypes",
":",
"aggConfig",
".",
"params",
".",
"field",
"?.",
"spec",
"?.",
"esTypes",
"||",
"[",
"]",
",",
"}",
")",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'maxBars'",
",",
"shouldShow",
"(",
"agg",
")",
"{",
"return",
"isAutoInterval",
"(",
"get",
"(",
"agg",
",",
"'params.interval'",
")",
")",
";",
"}",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'min_doc_count'",
",",
"default",
":",
"false",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"if",
"(",
"aggConfig",
".",
"params",
".",
"min_doc_count",
")",
"{",
"output",
".",
"params",
".",
"min_doc_count",
"=",
"0",
";",
"}",
"else",
"{",
"output",
".",
"params",
".",
"min_doc_count",
"=",
"1",
";",
"}",
"}",
",",
"}",
",",
"{",
"name",
":",
"'has_extended_bounds'",
",",
"default",
":",
"false",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'extended_bounds'",
",",
"default",
":",
"{",
"min",
":",
"''",
",",
"max",
":",
"''",
",",
"}",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"const",
"{",
"min",
",",
"max",
"}",
"=",
"aggConfig",
".",
"params",
".",
"extended_bounds",
";",
"if",
"(",
"aggConfig",
".",
"params",
".",
"has_extended_bounds",
"&&",
"(",
"min",
"||",
"min",
"===",
"0",
")",
"&&",
"(",
"max",
"||",
"max",
"===",
"0",
")",
")",
"{",
"output",
".",
"params",
".",
"extended_bounds",
"=",
"{",
"min",
",",
"max",
"}",
";",
"}",
"}",
",",
"shouldShow",
":",
"(",
"aggConfig",
")",
"=>",
"aggConfig",
".",
"params",
".",
"has_extended_bounds",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661109 | [
"import",
"moment",
"from",
"'moment'",
";",
"import",
"{",
"IBucketDateHistogramAggConfig",
"}",
"from",
"'../date_histogram'",
";",
"import",
"{",
"buildRangeFilter",
"}",
"from",
"'../../../../../common'",
";",
"export",
"const",
"createFilterDateHistogram",
"=",
"(",
"agg",
",",
"key",
")",
"=>",
"{",
"const",
"start",
"=",
"moment",
"(",
"key",
")",
";",
"const",
"interval",
"=",
"agg",
".",
"buckets",
".",
"getInterval",
"(",
")",
";",
"return",
"buildRangeFilter",
"(",
"agg",
".",
"params",
".",
"field",
",",
"{",
"gte",
":",
"start",
".",
"toISOString",
"(",
")",
",",
"lt",
":",
"start",
".",
"add",
"(",
"interval",
")",
".",
"toISOString",
"(",
")",
",",
"format",
":",
"'strict_date_optional_time'",
",",
"}",
",",
"agg",
".",
"getIndexPattern",
"(",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1865,
null,
null,
4530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5480,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661110 | [
"import",
"{",
"get",
",",
"noop",
",",
"find",
",",
"every",
"}",
"from",
"'lodash'",
";",
"import",
"moment",
"from",
"'moment-timezone'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
",",
"TimeRange",
",",
"TimeRangeBounds",
",",
"UI_SETTINGS",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"intervalOptions",
",",
"autoInterval",
",",
"isAutoInterval",
"}",
"from",
"'./_interval_options'",
";",
"import",
"{",
"createFilterDateHistogram",
"}",
"from",
"'./create_filter/date_histogram'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"ExtendedBounds",
"}",
"from",
"'./lib/extended_bounds'",
";",
"import",
"{",
"TimeBuckets",
"}",
"from",
"'./lib/time_buckets'",
";",
"import",
"{",
"writeParams",
"}",
"from",
"'../agg_params'",
";",
"import",
"{",
"isMetricAggType",
"}",
"from",
"'../metrics/metric_agg_type'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"import",
"{",
"dateHistogramInterval",
"}",
"from",
"'../utils'",
";",
"internal",
"export",
"type",
"CalculateBoundsFn",
"=",
"(",
"timeRange",
":",
"TimeRange",
")",
"=>",
"TimeRangeBounds",
";",
"const",
"updateTimeBuckets",
"=",
"(",
"agg",
",",
"calculateBounds",
",",
"customBuckets",
"?",
")",
"=>",
"{",
"const",
"bounds",
"=",
"agg",
".",
"params",
".",
"timeRange",
"&&",
"(",
"agg",
".",
"fieldIsTimeField",
"(",
")",
"||",
"isAutoInterval",
"(",
"agg",
".",
"params",
".",
"interval",
")",
")",
"?",
"calculateBounds",
"(",
"agg",
".",
"params",
".",
"timeRange",
")",
":",
"undefined",
";",
"const",
"buckets",
"=",
"customBuckets",
"||",
"agg",
".",
"buckets",
";",
"buckets",
".",
"setBounds",
"(",
"bounds",
")",
";",
"buckets",
".",
"setInterval",
"(",
"agg",
".",
"params",
".",
"interval",
")",
";",
"}",
";",
"export",
"interface",
"DateHistogramBucketAggDependencies",
"{",
"calculateBounds",
":",
"CalculateBoundsFn",
";",
"isDefaultTimezone",
":",
"(",
")",
"=>",
"boolean",
";",
"getConfig",
":",
"<",
"T",
"=",
"any",
">",
"(",
"key",
":",
"string",
")",
"=>",
"T",
";",
"}",
"export",
"interface",
"IBucketDateHistogramAggConfig",
"extends",
"IBucketAggConfig",
"{",
"buckets",
":",
"TimeBuckets",
";",
"}",
"export",
"function",
"isDateHistogramBucketAggConfig",
"(",
"agg",
")",
"{",
"return",
"Boolean",
"(",
"agg",
".",
"buckets",
")",
";",
"}",
"export",
"interface",
"AggParamsDateHistogram",
"extends",
"BaseAggParams",
"{",
"field",
"?",
":",
"string",
";",
"timeRange",
"?",
":",
"TimeRange",
";",
"useNormalizedOpenSearchInterval",
"?",
":",
"boolean",
";",
"scaleMetricValues",
"?",
":",
"boolean",
";",
"interval",
"?",
":",
"string",
";",
"time_zone",
"?",
":",
"string",
";",
"drop_partials",
"?",
":",
"boolean",
";",
"format",
"?",
":",
"string",
";",
"min_doc_count",
"?",
":",
"number",
";",
"extended_bounds",
"?",
":",
"ExtendedBounds",
";",
"}",
"export",
"const",
"getDateHistogramBucketAgg",
"=",
"(",
"{",
"calculateBounds",
",",
"isDefaultTimezone",
",",
"getConfig",
",",
"}",
")",
"=>",
"new",
"BucketAggType",
"<",
"IBucketDateHistogramAggConfig",
">",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"DATE_HISTOGRAM",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogramTitle'",
",",
"{",
"defaultMessage",
":",
"'Date Histogram'",
",",
"}",
")",
",",
"ordered",
":",
"{",
"date",
":",
"true",
",",
"}",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"let",
"output",
"=",
"{",
"}",
";",
"if",
"(",
"this",
".",
"params",
")",
"{",
"output",
"=",
"writeParams",
"(",
"this",
".",
"params",
",",
"agg",
")",
";",
"}",
"const",
"field",
"=",
"agg",
".",
"getFieldDisplayName",
"(",
")",
";",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogramLabel'",
",",
"{",
"defaultMessage",
":",
"'{fieldName} per {intervalDescription}'",
",",
"values",
":",
"{",
"fieldName",
":",
"field",
",",
"intervalDescription",
":",
"output",
".",
"metricScaleText",
"||",
"output",
".",
"bucketInterval",
".",
"description",
",",
"}",
",",
"}",
")",
";",
"}",
",",
"createFilter",
":",
"createFilterDateHistogram",
",",
"decorateAggConfig",
"(",
")",
"{",
"let",
"buckets",
";",
"return",
"{",
"buckets",
":",
"{",
"configurable",
":",
"true",
",",
"get",
"(",
")",
"{",
"if",
"(",
"buckets",
")",
"return",
"buckets",
";",
"buckets",
"=",
"new",
"TimeBuckets",
"(",
"{",
"'histogram:maxBars'",
":",
"getConfig",
"(",
"UI_SETTINGS",
".",
"HISTOGRAM_MAX_BARS",
")",
",",
"'histogram:barTarget'",
":",
"getConfig",
"(",
"UI_SETTINGS",
".",
"HISTOGRAM_BAR_TARGET",
")",
",",
"dateFormat",
":",
"getConfig",
"(",
"'dateFormat'",
")",
",",
"'dateFormat:scaled'",
":",
"getConfig",
"(",
"'dateFormat:scaled'",
")",
",",
"}",
")",
";",
"updateTimeBuckets",
"(",
"this",
",",
"calculateBounds",
",",
"buckets",
")",
";",
"return",
"buckets",
";",
"}",
",",
"}",
"as",
"any",
",",
"}",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'date'",
",",
"params",
":",
"{",
"pattern",
":",
"agg",
".",
"buckets",
".",
"getScaledDateFormat",
"(",
")",
",",
"}",
",",
"}",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"default",
"(",
"agg",
")",
"{",
"return",
"agg",
".",
"getIndexPattern",
"(",
")",
".",
"timeFieldName",
";",
"}",
",",
"onChange",
"(",
"agg",
")",
"{",
"if",
"(",
"isAutoInterval",
"(",
"get",
"(",
"agg",
",",
"'params.interval'",
")",
")",
"&&",
"!",
"agg",
".",
"fieldIsTimeField",
"(",
")",
")",
"{",
"delete",
"agg",
".",
"params",
".",
"interval",
";",
"}",
"}",
",",
"}",
",",
"{",
"name",
":",
"'timeRange'",
",",
"default",
":",
"null",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'useNormalizedOpenSearchInterval'",
",",
"default",
":",
"true",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'scaleMetricValues'",
",",
"default",
":",
"false",
",",
"write",
":",
"noop",
",",
"advanced",
":",
"true",
",",
"}",
",",
"{",
"name",
":",
"'interval'",
",",
"deserialize",
"(",
"state",
",",
"agg",
")",
"{",
"if",
"(",
"state",
"===",
"'custom'",
")",
"{",
"return",
"get",
"(",
"agg",
",",
"'params.customInterval'",
")",
";",
"}",
"const",
"interval",
"=",
"find",
"(",
"intervalOptions",
",",
"{",
"val",
":",
"state",
"}",
")",
";",
"if",
"(",
"!",
"interval",
"&&",
"state",
"===",
"'year'",
")",
"{",
"return",
"'y'",
";",
"}",
"return",
"state",
";",
"}",
",",
"default",
":",
"autoInterval",
",",
"options",
":",
"intervalOptions",
",",
"write",
"(",
"agg",
",",
"output",
",",
"aggs",
")",
"{",
"updateTimeBuckets",
"(",
"agg",
",",
"calculateBounds",
")",
";",
"const",
"{",
"useNormalizedOpenSearchInterval",
",",
"scaleMetricValues",
"}",
"=",
"agg",
".",
"params",
";",
"const",
"interval",
"=",
"agg",
".",
"buckets",
".",
"getInterval",
"(",
"useNormalizedOpenSearchInterval",
")",
";",
"output",
".",
"bucketInterval",
"=",
"interval",
";",
"if",
"(",
"interval",
".",
"expression",
"===",
"'0ms'",
")",
"{",
"return",
";",
"}",
"output",
".",
"params",
"=",
"{",
"...",
"output",
".",
"params",
",",
"...",
"dateHistogramInterval",
"(",
"interval",
".",
"expression",
")",
",",
"}",
";",
"const",
"scaleMetrics",
"=",
"scaleMetricValues",
"&&",
"interval",
".",
"scaled",
"&&",
"interval",
".",
"scale",
"&&",
"interval",
".",
"scale",
"<",
"1",
";",
"if",
"(",
"scaleMetrics",
"&&",
"aggs",
")",
"{",
"const",
"metrics",
"=",
"aggs",
".",
"aggs",
".",
"filter",
"(",
"(",
"a",
")",
"=>",
"isMetricAggType",
"(",
"a",
".",
"type",
")",
")",
";",
"const",
"all",
"=",
"every",
"(",
"metrics",
",",
"(",
"a",
")",
"=>",
"{",
"const",
"{",
"type",
"}",
"=",
"a",
";",
"if",
"(",
"isMetricAggType",
"(",
"type",
")",
")",
"{",
"return",
"type",
".",
"isScalable",
"(",
")",
";",
"}",
"}",
")",
";",
"if",
"(",
"all",
")",
"{",
"output",
".",
"metricScale",
"=",
"interval",
".",
"scale",
";",
"output",
".",
"metricScaleText",
"=",
"interval",
".",
"preScaled",
"?.",
"description",
"||",
"''",
";",
"}",
"}",
"}",
",",
"}",
",",
"{",
"name",
":",
"'time_zone'",
",",
"default",
":",
"undefined",
",",
"serialize",
":",
"noop",
",",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"let",
"tz",
"=",
"agg",
".",
"params",
".",
"time_zone",
";",
"if",
"(",
"!",
"tz",
"&&",
"agg",
".",
"params",
".",
"field",
")",
"{",
"tz",
"=",
"get",
"(",
"agg",
".",
"getIndexPattern",
"(",
")",
",",
"[",
"'typeMeta'",
",",
"'aggs'",
",",
"'date_histogram'",
",",
"agg",
".",
"params",
".",
"field",
".",
"name",
",",
"'time_zone'",
",",
"]",
")",
";",
"}",
"if",
"(",
"!",
"tz",
")",
"{",
"const",
"detectedTimezone",
"=",
"moment",
".",
"tz",
".",
"guess",
"(",
")",
";",
"const",
"tzOffset",
"=",
"moment",
"(",
")",
".",
"format",
"(",
"'Z'",
")",
";",
"tz",
"=",
"isDefaultTimezone",
"(",
")",
"?",
"detectedTimezone",
"||",
"tzOffset",
":",
"getConfig",
"(",
"'dateFormat:tz'",
")",
";",
"}",
"output",
".",
"params",
".",
"time_zone",
"=",
"tz",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'drop_partials'",
",",
"default",
":",
"false",
",",
"write",
":",
"noop",
",",
"shouldShow",
":",
"(",
"agg",
")",
"=>",
"{",
"const",
"field",
"=",
"agg",
".",
"params",
".",
"field",
";",
"return",
"field",
"&&",
"field",
".",
"name",
"&&",
"field",
".",
"name",
"===",
"agg",
".",
"getIndexPattern",
"(",
")",
".",
"timeFieldName",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'format'",
",",
"}",
",",
"{",
"name",
":",
"'min_doc_count'",
",",
"default",
":",
"1",
",",
"}",
",",
"{",
"name",
":",
"'extended_bounds'",
",",
"default",
":",
"{",
"}",
",",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"const",
"val",
"=",
"agg",
".",
"params",
".",
"extended_bounds",
";",
"if",
"(",
"val",
".",
"min",
"!=",
"null",
"||",
"val",
".",
"max",
"!=",
"null",
")",
"{",
"output",
".",
"params",
".",
"extended_bounds",
"=",
"{",
"min",
":",
"moment",
"(",
"val",
".",
"min",
")",
".",
"valueOf",
"(",
")",
",",
"max",
":",
"moment",
"(",
"val",
".",
"max",
")",
".",
"valueOf",
"(",
")",
",",
"}",
";",
"return",
";",
"}",
"}",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
4530,
null,
26097,
null,
null,
null,
null,
null,
null,
null,
2831,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11973,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661111 | [
"import",
"moment",
"from",
"'moment'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"import",
"{",
"DateRangeKey",
"}",
"from",
"'../lib/date_range'",
";",
"import",
"{",
"buildRangeFilter",
",",
"RangeFilterParams",
"}",
"from",
"'../../../../../common'",
";",
"export",
"const",
"createFilterDateRange",
"=",
"(",
"agg",
",",
"{",
"from",
",",
"to",
"}",
")",
"=>",
"{",
"const",
"filter",
"=",
"{",
"}",
";",
"if",
"(",
"from",
")",
"filter",
".",
"gte",
"=",
"moment",
"(",
"from",
")",
".",
"toISOString",
"(",
")",
";",
"if",
"(",
"to",
")",
"filter",
".",
"lt",
"=",
"moment",
"(",
"to",
")",
".",
"toISOString",
"(",
")",
";",
"if",
"(",
"to",
"&&",
"from",
")",
"filter",
".",
"format",
"=",
"'strict_date_optional_time'",
";",
"return",
"buildRangeFilter",
"(",
"agg",
".",
"params",
".",
"field",
",",
"filter",
",",
"agg",
".",
"getIndexPattern",
"(",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1865,
null,
null,
1278,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661112 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"moment",
"from",
"'moment-timezone'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"createFilterDateRange",
"}",
"from",
"'./create_filter/date_range'",
";",
"import",
"{",
"DateRangeKey",
"}",
"from",
"'./lib/date_range'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../osd_field_types/types'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"dateRangeTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRangeTitle'",
",",
"{",
"defaultMessage",
":",
"'Date Range'",
",",
"}",
")",
";",
"export",
"interface",
"DateRangeBucketAggDependencies",
"{",
"isDefaultTimezone",
":",
"(",
")",
"=>",
"boolean",
";",
"getConfig",
":",
"<",
"T",
"=",
"any",
">",
"(",
"key",
":",
"string",
")",
"=>",
"T",
";",
"}",
"export",
"interface",
"AggParamsDateRange",
"extends",
"BaseAggParams",
"{",
"field",
"?",
":",
"string",
";",
"ranges",
"?",
":",
"DateRangeKey",
"[",
"]",
";",
"time_zone",
"?",
":",
"string",
";",
"}",
"export",
"const",
"getDateRangeBucketAgg",
"=",
"(",
"{",
"isDefaultTimezone",
",",
"getConfig",
",",
"}",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"DATE_RANGE",
",",
"title",
":",
"dateRangeTitle",
",",
"createFilter",
":",
"createFilterDateRange",
",",
"getKey",
"(",
"{",
"from",
",",
"to",
"}",
")",
"{",
"return",
"{",
"from",
",",
"to",
"}",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'date_range'",
",",
"params",
":",
"agg",
".",
"params",
".",
"field",
"?",
"agg",
".",
"aggConfigs",
".",
"indexPattern",
".",
"getFormatterForField",
"(",
"agg",
".",
"params",
".",
"field",
")",
".",
"toJSON",
"(",
")",
":",
"{",
"}",
",",
"}",
";",
"}",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"+",
"' date ranges'",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"default",
"(",
"agg",
")",
"{",
"return",
"agg",
".",
"getIndexPattern",
"(",
")",
".",
"timeFieldName",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'ranges'",
",",
"default",
":",
"[",
"{",
"from",
":",
"'now-1w/w'",
",",
"to",
":",
"'now'",
",",
"}",
",",
"]",
",",
"}",
",",
"{",
"name",
":",
"'time_zone'",
",",
"default",
":",
"undefined",
",",
"serialize",
":",
"(",
")",
"=>",
"undefined",
",",
"write",
":",
"(",
"agg",
",",
"output",
")",
"=>",
"{",
"const",
"field",
"=",
"agg",
".",
"getParam",
"(",
"'field'",
")",
";",
"let",
"tz",
"=",
"agg",
".",
"getParam",
"(",
"'time_zone'",
")",
";",
"if",
"(",
"!",
"tz",
"&&",
"field",
")",
"{",
"tz",
"=",
"get",
"(",
"agg",
".",
"getIndexPattern",
"(",
")",
",",
"[",
"'typeMeta'",
",",
"'aggs'",
",",
"'date_range'",
",",
"field",
".",
"name",
",",
"'time_zone'",
",",
"]",
")",
";",
"}",
"if",
"(",
"!",
"tz",
")",
"{",
"const",
"detectedTimezone",
"=",
"moment",
".",
"tz",
".",
"guess",
"(",
")",
";",
"const",
"tzOffset",
"=",
"moment",
"(",
")",
".",
"format",
"(",
"'Z'",
")",
";",
"tz",
"=",
"isDefaultTimezone",
"(",
")",
"?",
"detectedTimezone",
"||",
"tzOffset",
":",
"getConfig",
"(",
"'dateFormat:tz'",
")",
";",
"}",
"output",
".",
"params",
".",
"time_zone",
"=",
"tz",
";",
"}",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661113 | [
"const",
"id",
"=",
"Symbol",
"(",
"'id'",
")",
";",
"export",
"class",
"RangeKey",
"{",
"[",
"id",
"]",
":",
"string",
";",
"gte",
":",
"string",
"|",
"number",
";",
"lt",
":",
"string",
"|",
"number",
";",
"constructor",
"(",
"bucket",
")",
"{",
"this",
".",
"gte",
"=",
"bucket",
".",
"from",
"==",
"null",
"?",
"-",
"Infinity",
":",
"bucket",
".",
"from",
";",
"this",
".",
"lt",
"=",
"bucket",
".",
"to",
"==",
"null",
"?",
"+",
"Infinity",
":",
"bucket",
".",
"to",
";",
"this",
"[",
"id",
"]",
"=",
"RangeKey",
".",
"idBucket",
"(",
"bucket",
")",
";",
"}",
"static",
"idBucket",
"(",
"bucket",
")",
"{",
"return",
"`from:${",
"bucket",
".",
"from",
"},to:${",
"bucket",
".",
"to",
"}`",
";",
"}",
"toString",
"(",
")",
"{",
"return",
"this",
"[",
"id",
"]",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661114 | [
"import",
"{",
"buildRangeFilter",
"}",
"from",
"'../../../../../common'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'../../agg_types'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"internal",
"export",
"const",
"createFilterRange",
"=",
"(",
"getFieldFormatsStart",
")",
"=>",
"{",
"return",
"(",
"aggConfig",
",",
"params",
")",
"=>",
"{",
"const",
"{",
"deserialize",
"}",
"=",
"getFieldFormatsStart",
"(",
")",
";",
"return",
"buildRangeFilter",
"(",
"aggConfig",
".",
"params",
".",
"field",
",",
"params",
",",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
",",
"deserialize",
"(",
"aggConfig",
".",
"toSerializedFieldFormat",
"(",
")",
")",
".",
"convert",
"(",
"params",
")",
")",
";",
"}",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1865,
null,
null,
null,
null,
null,
null,
null,
null,
1278,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661115 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'../agg_types'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"import",
"{",
"BucketAggType",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"RangeKey",
"}",
"from",
"'./range_key'",
";",
"import",
"{",
"createFilterRange",
"}",
"from",
"'./create_filter/range'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"const",
"rangeTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.rangeTitle'",
",",
"{",
"defaultMessage",
":",
"'Range'",
",",
"}",
")",
";",
"export",
"interface",
"RangeBucketAggDependencies",
"{",
"getFieldFormatsStart",
":",
"AggTypesDependencies",
"[",
"'getFieldFormatsStart'",
"]",
";",
"}",
"export",
"interface",
"AggParamsRange",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"ranges",
"?",
":",
"Array",
"<",
"{",
"from",
":",
"number",
";",
"to",
":",
"number",
";",
"}",
">",
";",
"}",
"export",
"const",
"getRangeBucketAgg",
"=",
"(",
"{",
"getFieldFormatsStart",
"}",
")",
"=>",
"{",
"const",
"keyCaches",
"=",
"new",
"WeakMap",
"(",
")",
";",
"return",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"RANGE",
",",
"title",
":",
"rangeTitle",
",",
"createFilter",
":",
"createFilterRange",
"(",
"getFieldFormatsStart",
")",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.aggTypesLabel'",
",",
"{",
"defaultMessage",
":",
"'{fieldName} ranges'",
",",
"values",
":",
"{",
"fieldName",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
",",
"}",
",",
"}",
")",
";",
"}",
",",
"getKey",
"(",
"bucket",
",",
"key",
",",
"agg",
")",
"{",
"let",
"keys",
"=",
"keyCaches",
".",
"get",
"(",
"agg",
")",
";",
"if",
"(",
"!",
"keys",
")",
"{",
"keys",
"=",
"new",
"Map",
"(",
")",
";",
"keyCaches",
".",
"set",
"(",
"agg",
",",
"keys",
")",
";",
"}",
"const",
"id",
"=",
"RangeKey",
".",
"idBucket",
"(",
"bucket",
")",
";",
"key",
"=",
"keys",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"!",
"key",
")",
"{",
"key",
"=",
"new",
"RangeKey",
"(",
"bucket",
")",
";",
"keys",
".",
"set",
"(",
"id",
",",
"key",
")",
";",
"}",
"return",
"key",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"const",
"format",
"=",
"agg",
".",
"params",
".",
"field",
"?",
"agg",
".",
"aggConfigs",
".",
"indexPattern",
".",
"getFormatterForField",
"(",
"agg",
".",
"params",
".",
"field",
")",
".",
"toJSON",
"(",
")",
":",
"{",
"id",
":",
"undefined",
",",
"params",
":",
"undefined",
"}",
";",
"return",
"{",
"id",
":",
"'range'",
",",
"params",
":",
"{",
"id",
":",
"format",
".",
"id",
",",
"params",
":",
"format",
".",
"params",
",",
"}",
",",
"}",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
"]",
",",
"}",
",",
"{",
"name",
":",
"'ranges'",
",",
"default",
":",
"[",
"{",
"from",
":",
"0",
",",
"to",
":",
"1000",
"}",
",",
"{",
"from",
":",
"1000",
",",
"to",
":",
"2000",
"}",
",",
"]",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"output",
".",
"params",
".",
"ranges",
"=",
"aggConfig",
".",
"params",
".",
"ranges",
";",
"output",
".",
"params",
".",
"keyed",
"=",
"true",
";",
"}",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661116 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BucketAggType",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"GeoBoundingBox",
"}",
"from",
"'./lib/geo_point'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"filterTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filterTitle'",
",",
"{",
"defaultMessage",
":",
"'Filter'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsFilter",
"extends",
"BaseAggParams",
"{",
"geo_bounding_box",
"?",
":",
"GeoBoundingBox",
";",
"}",
"export",
"const",
"getFilterBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"FILTER",
",",
"title",
":",
"filterTitle",
",",
"makeLabel",
":",
"(",
")",
"=>",
"filterTitle",
",",
"params",
":",
"[",
"{",
"name",
":",
"'geo_bounding_box'",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661117 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"import",
"{",
"buildQueryFilter",
"}",
"from",
"'../../../../../common'",
";",
"export",
"const",
"createFilterFilters",
"=",
"(",
"aggConfig",
",",
"key",
")",
"=>",
"{",
"const",
"dslFilters",
"=",
"get",
"(",
"aggConfig",
".",
"toDsl",
"(",
")",
",",
"'filters.filters'",
")",
";",
"const",
"filter",
"=",
"dslFilters",
"[",
"key",
"]",
";",
"const",
"indexPattern",
"=",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
";",
"if",
"(",
"filter",
"&&",
"indexPattern",
"&&",
"indexPattern",
".",
"id",
")",
"{",
"return",
"buildQueryFilter",
"(",
"filter",
",",
"indexPattern",
".",
"id",
",",
"key",
")",
";",
"}",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13398,
null,
null,
1278,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
584,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661118 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"size",
",",
"transform",
",",
"cloneDeep",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"createFilterFilters",
"}",
"from",
"'./create_filter/filters'",
";",
"import",
"{",
"toAngularJSON",
"}",
"from",
"'../utils'",
";",
"import",
"{",
"BucketAggType",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"getOpenSearchQueryConfig",
",",
"buildOpenSearchQuery",
",",
"Query",
",",
"UI_SETTINGS",
",",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"filtersTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filtersTitle'",
",",
"{",
"defaultMessage",
":",
"'Filters'",
",",
"description",
":",
"'The name of an aggregation, that allows to specify multiple individual filters to group data by.'",
",",
"}",
")",
";",
"interface",
"FilterValue",
"{",
"input",
":",
"Query",
";",
"label",
":",
"string",
";",
"id",
":",
"string",
";",
"}",
"export",
"interface",
"FiltersBucketAggDependencies",
"{",
"getConfig",
":",
"<",
"T",
"=",
"any",
">",
"(",
"key",
":",
"string",
")",
"=>",
"any",
";",
"}",
"export",
"interface",
"AggParamsFilters",
"extends",
"Omit",
"<",
"BaseAggParams",
",",
"'customLabel'",
">",
"{",
"filters",
"?",
":",
"Array",
"<",
"{",
"input",
":",
"Query",
";",
"label",
":",
"string",
";",
"}",
">",
";",
"}",
"export",
"const",
"getFiltersBucketAgg",
"=",
"(",
"{",
"getConfig",
"}",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"FILTERS",
",",
"title",
":",
"filtersTitle",
",",
"createFilter",
":",
"createFilterFilters",
",",
"customLabels",
":",
"false",
",",
"params",
":",
"[",
"{",
"name",
":",
"'filters'",
",",
"default",
":",
"(",
")",
"=>",
"[",
"{",
"input",
":",
"{",
"query",
":",
"''",
",",
"language",
":",
"getConfig",
"(",
"UI_SETTINGS",
".",
"SEARCH_QUERY_LANGUAGE",
")",
"}",
",",
"label",
":",
"''",
",",
"}",
",",
"]",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"const",
"inFilters",
"=",
"aggConfig",
".",
"params",
".",
"filters",
";",
"if",
"(",
"!",
"size",
"(",
"inFilters",
")",
")",
"return",
";",
"const",
"outFilters",
"=",
"transform",
"(",
"inFilters",
",",
"function",
"(",
"filters",
",",
"filter",
")",
"{",
"const",
"input",
"=",
"cloneDeep",
"(",
"filter",
".",
"input",
")",
";",
"if",
"(",
"!",
"input",
")",
"{",
"console",
".",
"log",
"(",
"'malformed filter agg params, missing \"input\" query'",
")",
";",
"return",
";",
"}",
"const",
"opensearchQueryConfigs",
"=",
"getOpenSearchQueryConfig",
"(",
"{",
"get",
":",
"getConfig",
"}",
")",
";",
"const",
"query",
"=",
"buildOpenSearchQuery",
"(",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
",",
"[",
"input",
"]",
",",
"[",
"]",
",",
"opensearchQueryConfigs",
")",
";",
"if",
"(",
"!",
"query",
")",
"{",
"console",
".",
"log",
"(",
"'malformed filter agg params, missing \"query\" on input'",
")",
";",
"return",
";",
"}",
"const",
"matchAllLabel",
"=",
"filter",
".",
"input",
".",
"query",
"===",
"''",
"?",
"'*'",
":",
"''",
";",
"const",
"label",
"=",
"filter",
".",
"label",
"||",
"matchAllLabel",
"||",
"(",
"typeof",
"filter",
".",
"input",
".",
"query",
"===",
"'string'",
"?",
"filter",
".",
"input",
".",
"query",
":",
"toAngularJSON",
"(",
"filter",
".",
"input",
".",
"query",
")",
")",
";",
"filters",
"[",
"label",
"]",
"=",
"query",
";",
"}",
",",
"{",
"}",
")",
";",
"if",
"(",
"!",
"size",
"(",
"outFilters",
")",
")",
"return",
";",
"const",
"params",
"=",
"output",
".",
"params",
"||",
"(",
"output",
".",
"params",
"=",
"{",
"}",
")",
";",
"params",
".",
"filters",
"=",
"outFilters",
";",
"}",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661119 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"noop",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'../metrics/metric_agg_types'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"geotileGridTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geotileGridTitle'",
",",
"{",
"defaultMessage",
":",
"'Geotile'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsGeoTile",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"useGeocentroid",
"?",
":",
"boolean",
";",
"precision",
"?",
":",
"number",
";",
"}",
"export",
"const",
"getGeoTitleBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"GEOTILE_GRID",
",",
"title",
":",
"geotileGridTitle",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"GEO_POINT",
",",
"}",
",",
"{",
"name",
":",
"'useGeocentroid'",
",",
"default",
":",
"true",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'precision'",
",",
"default",
":",
"0",
",",
"}",
",",
"]",
",",
"getRequestAggs",
"(",
"agg",
")",
"{",
"const",
"aggs",
"=",
"[",
"]",
";",
"const",
"useGeocentroid",
"=",
"agg",
".",
"getParam",
"(",
"'useGeocentroid'",
")",
";",
"aggs",
".",
"push",
"(",
"agg",
")",
";",
"if",
"(",
"useGeocentroid",
")",
"{",
"const",
"aggConfig",
"=",
"{",
"type",
":",
"METRIC_TYPES",
".",
"GEO_CENTROID",
",",
"enabled",
":",
"true",
",",
"params",
":",
"{",
"field",
":",
"agg",
".",
"getField",
"(",
")",
",",
"}",
",",
"}",
";",
"aggs",
".",
"push",
"(",
"agg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"aggConfig",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
")",
";",
"}",
"return",
"aggs",
"as",
"IBucketAggConfig",
"[",
"]",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661120 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"GeoBoundingBox",
"}",
"from",
"'./lib/geo_point'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"defaultBoundingBox",
"=",
"{",
"top_left",
":",
"{",
"lat",
":",
"1",
",",
"lon",
":",
"1",
"}",
",",
"bottom_right",
":",
"{",
"lat",
":",
"0",
",",
"lon",
":",
"0",
"}",
",",
"}",
";",
"const",
"defaultPrecision",
"=",
"2",
";",
"const",
"geohashGridTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geohashGridTitle'",
",",
"{",
"defaultMessage",
":",
"'Geohash'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsGeoHash",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"autoPrecision",
"?",
":",
"boolean",
";",
"precision",
"?",
":",
"number",
";",
"useGeocentroid",
"?",
":",
"boolean",
";",
"isFilteredByCollar",
"?",
":",
"boolean",
";",
"boundingBox",
"?",
":",
"GeoBoundingBox",
";",
"}",
"export",
"const",
"getGeoHashBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"<",
"IBucketAggConfig",
">",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"GEOHASH_GRID",
",",
"title",
":",
"geohashGridTitle",
",",
"makeLabel",
":",
"(",
")",
"=>",
"geohashGridTitle",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"GEO_POINT",
",",
"}",
",",
"{",
"name",
":",
"'autoPrecision'",
",",
"default",
":",
"true",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'precision'",
",",
"default",
":",
"defaultPrecision",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"output",
".",
"params",
".",
"precision",
"=",
"aggConfig",
".",
"params",
".",
"precision",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'useGeocentroid'",
",",
"default",
":",
"true",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'isFilteredByCollar'",
",",
"default",
":",
"true",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'boundingBox'",
",",
"default",
":",
"null",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"]",
",",
"getRequestAggs",
"(",
"agg",
")",
"{",
"const",
"aggs",
"=",
"[",
"]",
";",
"const",
"params",
"=",
"agg",
".",
"params",
";",
"if",
"(",
"params",
".",
"isFilteredByCollar",
"&&",
"agg",
".",
"getField",
"(",
")",
")",
"{",
"aggs",
".",
"push",
"(",
"agg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"{",
"type",
":",
"'filter'",
",",
"id",
":",
"'filter_agg'",
",",
"enabled",
":",
"true",
",",
"params",
":",
"{",
"geo_bounding_box",
":",
"{",
"ignore_unmapped",
":",
"true",
",",
"[",
"agg",
".",
"getField",
"(",
")",
".",
"name",
"]",
":",
"params",
".",
"boundingBox",
"||",
"defaultBoundingBox",
",",
"}",
",",
"}",
",",
"}",
"as",
"any",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
")",
";",
"}",
"aggs",
".",
"push",
"(",
"agg",
")",
";",
"if",
"(",
"params",
".",
"useGeocentroid",
")",
"{",
"aggs",
".",
"push",
"(",
"agg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"{",
"type",
":",
"'geo_centroid'",
",",
"enabled",
":",
"true",
",",
"params",
":",
"{",
"field",
":",
"agg",
".",
"getField",
"(",
")",
",",
"}",
",",
"}",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
")",
";",
"}",
"return",
"aggs",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661121 | [
"import",
"{",
"Ipv4Address",
"}",
"from",
"'../../utils'",
";",
"const",
"NUM_BITS",
"=",
"32",
";",
"function",
"throwError",
"(",
"mask",
")",
"{",
"throw",
"Error",
"(",
"'Invalid CIDR mask: '",
"+",
"mask",
")",
";",
"}",
"export",
"class",
"CidrMask",
"{",
"public",
"readonly",
"initialAddress",
":",
"Ipv4Address",
";",
"public",
"readonly",
"prefixLength",
":",
"number",
";",
"constructor",
"(",
"mask",
")",
"{",
"const",
"splits",
"=",
"mask",
".",
"split",
"(",
"'/'",
")",
";",
"if",
"(",
"splits",
".",
"length",
"!==",
"2",
")",
"{",
"throwError",
"(",
"mask",
")",
";",
"}",
"this",
".",
"initialAddress",
"=",
"new",
"Ipv4Address",
"(",
"splits",
"[",
"0",
"]",
")",
";",
"this",
".",
"prefixLength",
"=",
"Number",
"(",
"splits",
"[",
"1",
"]",
")",
";",
"if",
"(",
"isNaN",
"(",
"this",
".",
"prefixLength",
")",
"||",
"this",
".",
"prefixLength",
"<",
"1",
"||",
"this",
".",
"prefixLength",
">",
"NUM_BITS",
")",
"{",
"throwError",
"(",
"mask",
")",
";",
"}",
"}",
"public",
"getRange",
"(",
")",
"{",
"const",
"variableBits",
"=",
"NUM_BITS",
"-",
"this",
".",
"prefixLength",
";",
"const",
"fromAddress",
"=",
"(",
"(",
"this",
".",
"initialAddress",
".",
"valueOf",
"(",
")",
">>",
"variableBits",
")",
"<<",
"variableBits",
")",
">>>",
"0",
";",
"const",
"numAddresses",
"=",
"Math",
".",
"pow",
"(",
"2",
",",
"variableBits",
")",
";",
"return",
"{",
"from",
":",
"new",
"Ipv4Address",
"(",
"fromAddress",
")",
".",
"toString",
"(",
")",
",",
"to",
":",
"new",
"Ipv4Address",
"(",
"fromAddress",
"+",
"numAddresses",
"-",
"1",
")",
".",
"toString",
"(",
")",
",",
"}",
";",
"}",
"public",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"initialAddress",
".",
"toString",
"(",
")",
"+",
"'/'",
"+",
"this",
".",
"prefixLength",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
4,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661122 | [
"import",
"{",
"CidrMask",
"}",
"from",
"'../lib/cidr_mask'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"import",
"{",
"IpRangeKey",
"}",
"from",
"'../lib/ip_range'",
";",
"import",
"{",
"buildRangeFilter",
",",
"RangeFilterParams",
"}",
"from",
"'../../../../../common'",
";",
"export",
"const",
"createFilterIpRange",
"=",
"(",
"aggConfig",
",",
"key",
")",
"=>",
"{",
"let",
"range",
";",
"if",
"(",
"key",
".",
"type",
"===",
"'mask'",
")",
"{",
"range",
"=",
"new",
"CidrMask",
"(",
"key",
".",
"mask",
")",
".",
"getRange",
"(",
")",
";",
"}",
"else",
"{",
"range",
"=",
"{",
"from",
":",
"key",
".",
"from",
"?",
"key",
".",
"from",
":",
"-",
"Infinity",
",",
"to",
":",
"key",
".",
"to",
"?",
"key",
".",
"to",
":",
"Infinity",
",",
"}",
";",
"}",
"return",
"buildRangeFilter",
"(",
"aggConfig",
".",
"params",
".",
"field",
",",
"{",
"gte",
":",
"range",
".",
"from",
",",
"lte",
":",
"range",
".",
"to",
"}",
",",
"aggConfig",
".",
"getIndexPattern",
"(",
")",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1865,
null,
null,
1278,
null,
6651,
null,
null,
null,
null,
4088,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661123 | [
"import",
"{",
"noop",
",",
"map",
",",
"omitBy",
",",
"isNull",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BucketAggType",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"createFilterIpRange",
"}",
"from",
"'./create_filter/ip_range'",
";",
"import",
"{",
"IpRangeKey",
",",
"RangeIpRangeAggKey",
",",
"CidrMaskIpRangeAggKey",
"}",
"from",
"'./lib/ip_range'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"ipRangeTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRangeTitle'",
",",
"{",
"defaultMessage",
":",
"'IPv4 Range'",
",",
"}",
")",
";",
"export",
"enum",
"IP_RANGE_TYPES",
"{",
"FROM_TO",
"=",
"'fromTo'",
",",
"MASK",
"=",
"'mask'",
"}",
"export",
"interface",
"AggParamsIpRange",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"ipRangeType",
"?",
":",
"IP_RANGE_TYPES",
";",
"ranges",
"?",
":",
"Partial",
"<",
"{",
"[",
"IP_RANGE_TYPES",
".",
"FROM_TO",
"]",
":",
"RangeIpRangeAggKey",
"[",
"]",
";",
"[",
"IP_RANGE_TYPES",
".",
"MASK",
"]",
":",
"CidrMaskIpRangeAggKey",
"[",
"]",
";",
"}",
">",
";",
"}",
"export",
"const",
"getIpRangeBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"IP_RANGE",
",",
"title",
":",
"ipRangeTitle",
",",
"createFilter",
":",
"createFilterIpRange",
",",
"getKey",
"(",
"bucket",
",",
"key",
",",
"agg",
")",
"{",
"if",
"(",
"agg",
".",
"params",
".",
"ipRangeType",
"===",
"IP_RANGE_TYPES",
".",
"MASK",
")",
"{",
"return",
"{",
"type",
":",
"'mask'",
",",
"mask",
":",
"key",
"}",
";",
"}",
"return",
"{",
"type",
":",
"'range'",
",",
"from",
":",
"bucket",
".",
"from",
",",
"to",
":",
"bucket",
".",
"to",
"}",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'ip_range'",
",",
"params",
":",
"agg",
".",
"params",
".",
"field",
"?",
"agg",
".",
"aggConfigs",
".",
"indexPattern",
".",
"getFormatterForField",
"(",
"agg",
".",
"params",
".",
"field",
")",
".",
"toJSON",
"(",
")",
":",
"{",
"}",
",",
"}",
";",
"}",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRangeLabel'",
",",
"{",
"defaultMessage",
":",
"'{fieldName} IP ranges'",
",",
"values",
":",
"{",
"fieldName",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
",",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"IP",
",",
"}",
",",
"{",
"name",
":",
"'ipRangeType'",
",",
"default",
":",
"IP_RANGE_TYPES",
".",
"FROM_TO",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'ranges'",
",",
"default",
":",
"{",
"fromTo",
":",
"[",
"{",
"from",
":",
"'0.0.0.0'",
",",
"to",
":",
"'127.255.255.255'",
"}",
",",
"{",
"from",
":",
"'128.0.0.0'",
",",
"to",
":",
"'191.255.255.255'",
"}",
",",
"]",
",",
"mask",
":",
"[",
"{",
"mask",
":",
"'0.0.0.0/1'",
"}",
",",
"{",
"mask",
":",
"'128.0.0.0/2'",
"}",
"]",
",",
"}",
",",
"write",
"(",
"aggConfig",
",",
"output",
")",
"{",
"const",
"ipRangeType",
"=",
"aggConfig",
".",
"params",
".",
"ipRangeType",
";",
"let",
"ranges",
"=",
"aggConfig",
".",
"params",
".",
"ranges",
"[",
"ipRangeType",
"]",
";",
"if",
"(",
"ipRangeType",
"===",
"IP_RANGE_TYPES",
".",
"FROM_TO",
")",
"{",
"ranges",
"=",
"map",
"(",
"ranges",
",",
"(",
"range",
")",
"=>",
"omitBy",
"(",
"range",
",",
"isNull",
")",
")",
";",
"}",
"output",
".",
"params",
".",
"ranges",
"=",
"ranges",
";",
"}",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6651,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661124 | [
"import",
"{",
"isString",
",",
"isObject",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"IBucketAggConfig",
",",
"BucketAggType",
",",
"BucketAggParam",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"export",
"const",
"isType",
"=",
"(",
"...",
"types",
")",
"=>",
"{",
"return",
"(",
"agg",
")",
":",
"boolean",
"=>",
"{",
"const",
"field",
"=",
"agg",
".",
"params",
".",
"field",
";",
"return",
"types",
".",
"some",
"(",
"(",
"type",
")",
"=>",
"field",
"&&",
"field",
".",
"type",
"===",
"type",
")",
";",
"}",
";",
"}",
";",
"export",
"const",
"isNumberType",
"=",
"isType",
"(",
"'number'",
")",
";",
"export",
"const",
"isStringType",
"=",
"isType",
"(",
"'string'",
")",
";",
"export",
"const",
"isStringOrNumberType",
"=",
"isType",
"(",
"'string'",
",",
"'number'",
")",
";",
"export",
"const",
"migrateIncludeExcludeFormat",
"=",
"{",
"serialize",
"(",
"this",
",",
"value",
",",
"agg",
")",
"{",
"if",
"(",
"this",
".",
"shouldShow",
"&&",
"!",
"this",
".",
"shouldShow",
"(",
"agg",
")",
")",
"return",
";",
"if",
"(",
"!",
"value",
"||",
"isString",
"(",
"value",
")",
"||",
"Array",
".",
"isArray",
"(",
"value",
")",
")",
"return",
"value",
";",
"else",
"return",
"value",
".",
"pattern",
";",
"}",
",",
"write",
"(",
"this",
",",
"aggConfig",
",",
"output",
")",
"{",
"const",
"value",
"=",
"aggConfig",
".",
"getParam",
"(",
"this",
".",
"name",
")",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"value",
")",
"&&",
"value",
".",
"length",
">",
"0",
"&&",
"isNumberType",
"(",
"aggConfig",
")",
")",
"{",
"const",
"parsedValue",
"=",
"value",
".",
"filter",
"(",
"(",
"val",
")",
":",
"val",
"is",
"number",
"=>",
"Number",
".",
"isFinite",
"(",
"val",
")",
")",
";",
"if",
"(",
"parsedValue",
".",
"length",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"parsedValue",
";",
"}",
"}",
"else",
"if",
"(",
"isObject",
"(",
"value",
")",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"(",
"value",
"as",
"any",
")",
".",
"pattern",
";",
"}",
"else",
"if",
"(",
"value",
"&&",
"isStringType",
"(",
"aggConfig",
")",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"value",
";",
"}",
"}",
",",
"}",
"as",
"Partial",
"<",
"BucketAggParam",
"<",
"IBucketAggConfig",
">",
">",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
5,
null,
null,
null,
null,
null,
941,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20,
null,
null,
null,
null,
26102,
null,
null,
null,
1278,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2072,
null,
1278,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661125 | [
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'../bucket_agg_type'",
";",
"import",
"{",
"buildPhrasesFilter",
",",
"buildExistsFilter",
",",
"buildPhraseFilter",
",",
"Filter",
",",
"}",
"from",
"'../../../../../common'",
";",
"export",
"const",
"createFilterTerms",
"=",
"(",
"aggConfig",
",",
"key",
",",
"params",
")",
"=>",
"{",
"const",
"field",
"=",
"aggConfig",
".",
"params",
".",
"field",
";",
"const",
"indexPattern",
"=",
"aggConfig",
".",
"aggConfigs",
".",
"indexPattern",
";",
"if",
"(",
"key",
"===",
"'__other__'",
")",
"{",
"const",
"terms",
"=",
"params",
".",
"terms",
";",
"const",
"phraseFilter",
"=",
"buildPhrasesFilter",
"(",
"field",
",",
"terms",
",",
"indexPattern",
")",
";",
"phraseFilter",
".",
"meta",
".",
"negate",
"=",
"true",
";",
"const",
"filters",
"=",
"[",
"phraseFilter",
"]",
";",
"if",
"(",
"terms",
".",
"some",
"(",
"(",
"term",
")",
"=>",
"term",
"===",
"'__missing__'",
")",
")",
"{",
"filters",
".",
"push",
"(",
"buildExistsFilter",
"(",
"field",
",",
"indexPattern",
")",
")",
";",
"}",
"return",
"filters",
";",
"}",
"else",
"if",
"(",
"key",
"===",
"'__missing__'",
")",
"{",
"const",
"existsFilter",
"=",
"buildExistsFilter",
"(",
"field",
",",
"indexPattern",
")",
";",
"existsFilter",
".",
"meta",
".",
"negate",
"=",
"true",
";",
"return",
"existsFilter",
";",
"}",
"return",
"buildPhraseFilter",
"(",
"field",
",",
"key",
",",
"indexPattern",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1278,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
584,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6201,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8181,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661126 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BucketAggType",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"createFilterTerms",
"}",
"from",
"'./create_filter/terms'",
";",
"import",
"{",
"isStringType",
",",
"migrateIncludeExcludeFormat",
"}",
"from",
"'./migrate_include_exclude_format'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"significantTermsTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTermsTitle'",
",",
"{",
"defaultMessage",
":",
"'Significant Terms'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsSignificantTerms",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"size",
"?",
":",
"number",
";",
"exclude",
"?",
":",
"string",
";",
"include",
"?",
":",
"string",
";",
"}",
"export",
"const",
"getSignificantTermsBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"SIGNIFICANT_TERMS",
",",
"title",
":",
"significantTermsTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTermsLabel'",
",",
"{",
"defaultMessage",
":",
"'Top {size} unusual terms in {fieldName}'",
",",
"values",
":",
"{",
"size",
":",
"aggConfig",
".",
"params",
".",
"size",
",",
"fieldName",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
",",
"}",
",",
"}",
")",
";",
"}",
",",
"createFilter",
":",
"createFilterTerms",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"scriptable",
":",
"false",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"STRING",
",",
"}",
",",
"{",
"name",
":",
"'size'",
",",
"default",
":",
"''",
",",
"}",
",",
"{",
"name",
":",
"'exclude'",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.excludeLabel'",
",",
"{",
"defaultMessage",
":",
"'Exclude'",
",",
"}",
")",
",",
"type",
":",
"'string'",
",",
"advanced",
":",
"true",
",",
"shouldShow",
":",
"isStringType",
",",
"...",
"migrateIncludeExcludeFormat",
",",
"}",
",",
"{",
"name",
":",
"'include'",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.includeLabel'",
",",
"{",
"defaultMessage",
":",
"'Include'",
",",
"}",
")",
",",
"type",
":",
"'string'",
",",
"advanced",
":",
"true",
",",
"shouldShow",
":",
"isStringType",
",",
"...",
"migrateIncludeExcludeFormat",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661127 | [
"/**\n * This function collects statistics from a SearchSource and a response\n * for the usage in the inspector stats panel. Pass in a searchSource and a response\n * and the returned object can be passed to the `stats` method of the request\n * logger.\n */",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"SearchResponse",
"}",
"from",
"'elasticsearch'",
";",
"import",
"{",
"ISearchSource",
"}",
"from",
"'src/plugins/data/public'",
";",
"import",
"{",
"RequestStatistics",
"}",
"from",
"'src/plugins/inspector/common'",
";",
"public",
"export",
"function",
"getRequestInspectorStats",
"(",
"searchSource",
")",
"{",
"const",
"stats",
"=",
"{",
"}",
";",
"const",
"index",
"=",
"searchSource",
".",
"getField",
"(",
"'index'",
")",
";",
"if",
"(",
"index",
")",
"{",
"stats",
".",
"indexPattern",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.indexPatternLabel'",
",",
"{",
"defaultMessage",
":",
"'Index pattern'",
",",
"}",
")",
",",
"value",
":",
"index",
".",
"title",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.indexPatternDescription'",
",",
"{",
"defaultMessage",
":",
"'The index pattern that connected to the OpenSearch indices.'",
",",
"}",
")",
",",
"}",
";",
"stats",
".",
"indexPatternId",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.indexPatternIdLabel'",
",",
"{",
"defaultMessage",
":",
"'Index pattern ID'",
",",
"}",
")",
",",
"value",
":",
"index",
".",
"id",
"!",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.indexPatternIdDescription'",
",",
"{",
"defaultMessage",
":",
"'The ID in the {opensearchDashboardsIndexPattern} index.'",
",",
"values",
":",
"{",
"opensearchDashboardsIndexPattern",
":",
"'.kibana'",
"}",
",",
"}",
")",
",",
"}",
";",
"}",
"return",
"stats",
";",
"}",
"public",
"export",
"function",
"getResponseInspectorStats",
"(",
"resp",
",",
"searchSource",
"?",
")",
"{",
"const",
"lastRequest",
"=",
"searchSource",
"?.",
"history",
"&&",
"searchSource",
".",
"history",
"[",
"searchSource",
".",
"history",
".",
"length",
"-",
"1",
"]",
";",
"const",
"stats",
"=",
"{",
"}",
";",
"if",
"(",
"resp",
"&&",
"resp",
".",
"took",
")",
"{",
"stats",
".",
"queryTime",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.queryTimeLabel'",
",",
"{",
"defaultMessage",
":",
"'Query time'",
",",
"}",
")",
",",
"value",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.queryTimeValue'",
",",
"{",
"defaultMessage",
":",
"'{queryTime}ms'",
",",
"values",
":",
"{",
"queryTime",
":",
"resp",
".",
"took",
"}",
",",
"}",
")",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.queryTimeDescription'",
",",
"{",
"defaultMessage",
":",
"'The time it took to process the query. '",
"+",
"'Does not include the time to send the request or parse it in the browser.'",
",",
"}",
")",
",",
"}",
";",
"}",
"if",
"(",
"resp",
"&&",
"resp",
".",
"hits",
")",
"{",
"stats",
".",
"hitsTotal",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.hitsTotalLabel'",
",",
"{",
"defaultMessage",
":",
"'Hits (total)'",
",",
"}",
")",
",",
"value",
":",
"`${",
"resp",
".",
"hits",
".",
"total",
"}`",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.hitsTotalDescription'",
",",
"{",
"defaultMessage",
":",
"'The number of documents that match the query.'",
",",
"}",
")",
",",
"}",
";",
"stats",
".",
"hits",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.hitsLabel'",
",",
"{",
"defaultMessage",
":",
"'Hits'",
",",
"}",
")",
",",
"value",
":",
"`${",
"resp",
".",
"hits",
".",
"hits",
".",
"length",
"}`",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.hitsDescription'",
",",
"{",
"defaultMessage",
":",
"'The number of documents returned by the query.'",
",",
"}",
")",
",",
"}",
";",
"}",
"if",
"(",
"lastRequest",
"&&",
"(",
"lastRequest",
".",
"ms",
"===",
"0",
"||",
"lastRequest",
".",
"ms",
")",
")",
"{",
"stats",
".",
"requestTime",
"=",
"{",
"label",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.requestTimeLabel'",
",",
"{",
"defaultMessage",
":",
"'Request time'",
",",
"}",
")",
",",
"value",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.requestTimeValue'",
",",
"{",
"defaultMessage",
":",
"'{requestTime}ms'",
",",
"values",
":",
"{",
"requestTime",
":",
"lastRequest",
".",
"ms",
"}",
",",
"}",
")",
",",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.searchSource.requestTimeDescription'",
",",
"{",
"defaultMessage",
":",
"'The time of the request from the browser to OpenSearch and back. '",
"+",
"'Does not include the time the requested waited in the queue.'",
",",
"}",
")",
",",
"}",
";",
"}",
"return",
"stats",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5194,
null,
3208,
null,
null,
null,
5194,
null,
null,
null,
null,
null,
584,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5194,
null,
3681,
null,
3208,
null,
null,
null,
null,
1441,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5194,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661128 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"$Values",
"}",
"from",
"'@osd/utility-types'",
";",
"export",
"const",
"AggGroupNames",
"=",
"Object",
".",
"freeze",
"(",
"{",
"Buckets",
":",
"'buckets'",
"as",
"'buckets'",
",",
"Metrics",
":",
"'metrics'",
"as",
"'metrics'",
",",
"None",
":",
"'none'",
"as",
"'none'",
",",
"}",
")",
";",
"export",
"type",
"AggGroupName",
"=",
"$Values",
"<",
"typeof",
"AggGroupNames",
">",
";",
"export",
"const",
"AggGroupLabels",
"=",
"{",
"[",
"AggGroupNames",
".",
"Buckets",
"]",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.aggGroups.bucketsText'",
",",
"{",
"defaultMessage",
":",
"'Buckets'",
",",
"}",
")",
",",
"[",
"AggGroupNames",
".",
"Metrics",
"]",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.aggGroups.metricsText'",
",",
"{",
"defaultMessage",
":",
"'Metrics'",
",",
"}",
")",
",",
"[",
"AggGroupNames",
".",
"None",
"]",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.aggGroups.noneText'",
",",
"{",
"defaultMessage",
":",
"'None'",
",",
"}",
")",
",",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
51,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661129 | [
"import",
"{",
"isNumber",
",",
"keys",
",",
"values",
",",
"find",
",",
"each",
",",
"cloneDeep",
",",
"flatten",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"buildExistsFilter",
",",
"buildPhrasesFilter",
",",
"buildQueryFromFilters",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"AggGroupNames",
"}",
"from",
"'../agg_groups'",
";",
"import",
"{",
"IAggConfigs",
"}",
"from",
"'../agg_configs'",
";",
"import",
"{",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"param",
"aggNestedDsl",
"param",
"startFromId",
"const",
"getNestedAggDSL",
"=",
"(",
"aggNestedDsl",
",",
"startFromAggId",
")",
":",
"any",
"=>",
"{",
"if",
"(",
"aggNestedDsl",
"[",
"startFromAggId",
"]",
")",
"{",
"return",
"aggNestedDsl",
"[",
"startFromAggId",
"]",
";",
"}",
"const",
"nestedAggs",
"=",
"values",
"(",
"aggNestedDsl",
")",
";",
"let",
"aggs",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"nestedAggs",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"nestedAggs",
"[",
"i",
"]",
".",
"aggs",
"&&",
"(",
"aggs",
"=",
"getNestedAggDSL",
"(",
"nestedAggs",
"[",
"i",
"]",
".",
"aggs",
",",
"startFromAggId",
")",
")",
")",
"{",
"return",
"aggs",
";",
"}",
"}",
"}",
";",
"param",
"aggConfigs",
"param",
"response",
"param",
"aggWithOtherBucket",
"param",
"key",
"const",
"getAggResultBuckets",
"=",
"(",
"aggConfigs",
",",
"response",
",",
"aggWithOtherBucket",
",",
"key",
")",
"=>",
"{",
"const",
"keyParts",
"=",
"key",
".",
"split",
"(",
"'-'",
")",
";",
"let",
"responseAgg",
"=",
"response",
";",
"for",
"(",
"const",
"i",
"in",
"keyParts",
")",
"{",
"if",
"(",
"keyParts",
"[",
"i",
"]",
")",
"{",
"const",
"responseAggs",
"=",
"values",
"(",
"responseAgg",
")",
";",
"for",
"(",
"let",
"aggId",
"=",
"0",
";",
"aggId",
"<",
"responseAggs",
".",
"length",
";",
"aggId",
"++",
")",
"{",
"const",
"aggById",
"=",
"responseAggs",
"[",
"aggId",
"]",
";",
"const",
"aggKey",
"=",
"keys",
"(",
"responseAgg",
")",
"[",
"aggId",
"]",
";",
"const",
"aggConfig",
"=",
"find",
"(",
"aggConfigs",
".",
"aggs",
",",
"(",
"agg",
")",
"=>",
"agg",
".",
"id",
"===",
"aggKey",
")",
";",
"if",
"(",
"aggConfig",
")",
"{",
"const",
"aggResultBucket",
"=",
"find",
"(",
"aggById",
".",
"buckets",
",",
"(",
"bucket",
",",
"bucketObjKey",
")",
"=>",
"{",
"const",
"bucketKey",
"=",
"aggConfig",
".",
"getKey",
"(",
"bucket",
",",
"isNumber",
"(",
"bucketObjKey",
")",
"?",
"undefined",
":",
"bucketObjKey",
")",
".",
"toString",
"(",
")",
";",
"return",
"bucketKey",
"===",
"keyParts",
"[",
"i",
"]",
";",
"}",
")",
";",
"if",
"(",
"aggResultBucket",
")",
"{",
"responseAgg",
"=",
"aggResultBucket",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"responseAgg",
"[",
"aggWithOtherBucket",
".",
"id",
"]",
")",
"{",
"return",
"responseAgg",
"[",
"aggWithOtherBucket",
".",
"id",
"]",
".",
"buckets",
";",
"}",
"return",
"[",
"]",
";",
"}",
";",
"param",
"responseAggs",
"param",
"aggId",
"const",
"getAggConfigResultMissingBuckets",
"=",
"(",
"responseAggs",
",",
"aggId",
")",
"=>",
"{",
"const",
"missingKey",
"=",
"'__missing__'",
";",
"let",
"resultBuckets",
"=",
"[",
"]",
";",
"if",
"(",
"responseAggs",
"[",
"aggId",
"]",
")",
"{",
"const",
"matchingBucket",
"=",
"responseAggs",
"[",
"aggId",
"]",
".",
"buckets",
".",
"find",
"(",
"(",
"bucket",
")",
"=>",
"bucket",
".",
"key",
"===",
"missingKey",
")",
";",
"if",
"(",
"matchingBucket",
")",
"resultBuckets",
".",
"push",
"(",
"matchingBucket",
")",
";",
"return",
"resultBuckets",
";",
"}",
"each",
"(",
"responseAggs",
",",
"(",
"agg",
")",
"=>",
"{",
"if",
"(",
"agg",
".",
"buckets",
")",
"{",
"each",
"(",
"agg",
".",
"buckets",
",",
"(",
"bucket",
")",
"=>",
"{",
"resultBuckets",
"=",
"[",
"...",
"resultBuckets",
",",
"...",
"getAggConfigResultMissingBuckets",
"(",
"bucket",
",",
"aggId",
")",
"]",
";",
"}",
")",
";",
"}",
"}",
")",
";",
"return",
"resultBuckets",
";",
"}",
";",
"param",
"requestAgg",
"param",
"key",
"param",
"otherAgg",
"const",
"getOtherAggTerms",
"=",
"(",
"requestAgg",
",",
"key",
",",
"otherAgg",
")",
"=>",
"{",
"return",
"requestAgg",
"[",
"'other-filter'",
"]",
".",
"filters",
".",
"filters",
"[",
"key",
"]",
".",
"bool",
".",
"must_not",
".",
"filter",
"(",
"(",
"filter",
")",
"=>",
"filter",
".",
"match_phrase",
"&&",
"filter",
".",
"match_phrase",
"[",
"otherAgg",
".",
"params",
".",
"field",
".",
"name",
"]",
")",
".",
"map",
"(",
"(",
"filter",
")",
"=>",
"filter",
".",
"match_phrase",
"[",
"otherAgg",
".",
"params",
".",
"field",
".",
"name",
"]",
")",
";",
"}",
";",
"export",
"const",
"buildOtherBucketAgg",
"=",
"(",
"aggConfigs",
",",
"aggWithOtherBucket",
",",
"response",
")",
"=>",
"{",
"const",
"bucketAggs",
"=",
"aggConfigs",
".",
"aggs",
".",
"filter",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"type",
".",
"type",
"===",
"AggGroupNames",
".",
"Buckets",
")",
";",
"const",
"index",
"=",
"bucketAggs",
".",
"findIndex",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"id",
"===",
"aggWithOtherBucket",
".",
"id",
")",
";",
"const",
"aggs",
"=",
"aggConfigs",
".",
"toDsl",
"(",
")",
";",
"const",
"indexPattern",
"=",
"aggWithOtherBucket",
".",
"aggConfigs",
".",
"indexPattern",
";",
"const",
"filterAgg",
"=",
"aggConfigs",
".",
"createAggConfig",
"(",
"{",
"type",
":",
"'filters'",
",",
"id",
":",
"'other'",
",",
"params",
":",
"{",
"filters",
":",
"[",
"]",
",",
"}",
",",
"enabled",
":",
"false",
",",
"}",
",",
"{",
"addToAggConfigs",
":",
"false",
",",
"}",
")",
";",
"const",
"resultAgg",
"=",
"{",
"aggs",
":",
"getNestedAggDSL",
"(",
"aggs",
",",
"aggWithOtherBucket",
".",
"id",
")",
".",
"aggs",
",",
"filters",
":",
"filterAgg",
".",
"toDsl",
"(",
")",
",",
"}",
";",
"let",
"noAggBucketResults",
"=",
"false",
";",
"const",
"walkBucketTree",
"=",
"(",
"aggIndex",
",",
"aggregations",
",",
"aggId",
",",
"filters",
",",
"key",
")",
"=>",
"{",
"if",
"(",
"aggregations",
"[",
"aggId",
"]",
".",
"buckets",
".",
"length",
"<",
"1",
")",
"{",
"noAggBucketResults",
"=",
"true",
";",
"return",
";",
"}",
"const",
"agg",
"=",
"aggregations",
"[",
"aggId",
"]",
";",
"const",
"newAggIndex",
"=",
"aggIndex",
"+",
"1",
";",
"const",
"newAgg",
"=",
"bucketAggs",
"[",
"newAggIndex",
"]",
";",
"const",
"currentAgg",
"=",
"bucketAggs",
"[",
"aggIndex",
"]",
";",
"if",
"(",
"aggIndex",
"<",
"index",
")",
"{",
"each",
"(",
"agg",
".",
"buckets",
",",
"(",
"bucket",
",",
"bucketObjKey",
")",
"=>",
"{",
"const",
"bucketKey",
"=",
"currentAgg",
".",
"getKey",
"(",
"bucket",
",",
"isNumber",
"(",
"bucketObjKey",
")",
"?",
"undefined",
":",
"bucketObjKey",
")",
";",
"const",
"filter",
"=",
"cloneDeep",
"(",
"bucket",
".",
"filters",
")",
"||",
"currentAgg",
".",
"createFilter",
"(",
"bucketKey",
")",
";",
"const",
"newFilters",
"=",
"flatten",
"(",
"[",
"...",
"filters",
",",
"filter",
"]",
")",
";",
"walkBucketTree",
"(",
"newAggIndex",
",",
"bucket",
",",
"newAgg",
".",
"id",
",",
"newFilters",
",",
"`${",
"key",
"}-${",
"bucketKey",
".",
"toString",
"(",
")",
"}`",
")",
";",
"}",
")",
";",
"return",
";",
"}",
"const",
"hasScriptedField",
"=",
"!",
"!",
"aggWithOtherBucket",
".",
"params",
".",
"field",
".",
"scripted",
";",
"const",
"hasMissingBucket",
"=",
"!",
"!",
"aggWithOtherBucket",
".",
"params",
".",
"missingBucket",
";",
"const",
"hasMissingBucketKey",
"=",
"agg",
".",
"buckets",
".",
"some",
"(",
"(",
"bucket",
")",
"=>",
"bucket",
".",
"key",
"===",
"'__missing__'",
")",
";",
"if",
"(",
"!",
"hasScriptedField",
"&&",
"(",
"!",
"hasMissingBucket",
"||",
"hasMissingBucketKey",
")",
")",
"{",
"filters",
".",
"push",
"(",
"buildExistsFilter",
"(",
"aggWithOtherBucket",
".",
"params",
".",
"field",
",",
"aggWithOtherBucket",
".",
"aggConfigs",
".",
"indexPattern",
")",
")",
";",
"}",
"each",
"(",
"agg",
".",
"buckets",
",",
"(",
"bucket",
")",
"=>",
"{",
"if",
"(",
"bucket",
".",
"key",
"===",
"'__missing__'",
")",
"return",
";",
"const",
"filter",
"=",
"currentAgg",
".",
"createFilter",
"(",
"bucket",
".",
"key",
")",
";",
"filter",
".",
"meta",
".",
"negate",
"=",
"true",
";",
"filters",
".",
"push",
"(",
"filter",
")",
";",
"}",
")",
";",
"resultAgg",
".",
"filters",
".",
"filters",
"[",
"key",
"]",
"=",
"{",
"bool",
":",
"buildQueryFromFilters",
"(",
"filters",
",",
"indexPattern",
")",
",",
"}",
";",
"}",
";",
"walkBucketTree",
"(",
"0",
",",
"response",
".",
"aggregations",
",",
"bucketAggs",
"[",
"0",
"]",
".",
"id",
",",
"[",
"]",
",",
"''",
")",
";",
"if",
"(",
"noAggBucketResults",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
")",
"=>",
"{",
"return",
"{",
"'other-filter'",
":",
"resultAgg",
",",
"}",
";",
"}",
";",
"}",
";",
"export",
"const",
"mergeOtherBucketAggResponse",
"=",
"(",
"aggsConfig",
",",
"response",
",",
"otherResponse",
",",
"otherAgg",
",",
"requestAgg",
")",
"=>",
"{",
"const",
"updatedResponse",
"=",
"cloneDeep",
"(",
"response",
")",
";",
"each",
"(",
"otherResponse",
".",
"aggregations",
"[",
"'other-filter'",
"]",
".",
"buckets",
",",
"(",
"bucket",
",",
"key",
")",
"=>",
"{",
"if",
"(",
"!",
"bucket",
".",
"doc_count",
"||",
"key",
"===",
"undefined",
")",
"return",
";",
"const",
"bucketKey",
"=",
"key",
".",
"replace",
"(",
"/^-/",
",",
"''",
")",
";",
"const",
"aggResultBuckets",
"=",
"getAggResultBuckets",
"(",
"aggsConfig",
",",
"updatedResponse",
".",
"aggregations",
",",
"otherAgg",
",",
"bucketKey",
")",
";",
"const",
"requestFilterTerms",
"=",
"getOtherAggTerms",
"(",
"requestAgg",
",",
"key",
",",
"otherAgg",
")",
";",
"const",
"phraseFilter",
"=",
"buildPhrasesFilter",
"(",
"otherAgg",
".",
"params",
".",
"field",
",",
"requestFilterTerms",
",",
"otherAgg",
".",
"aggConfigs",
".",
"indexPattern",
")",
";",
"phraseFilter",
".",
"meta",
".",
"negate",
"=",
"true",
";",
"bucket",
".",
"filters",
"=",
"[",
"phraseFilter",
"]",
";",
"bucket",
".",
"key",
"=",
"'__other__'",
";",
"if",
"(",
"aggResultBuckets",
".",
"some",
"(",
"(",
"aggResultBucket",
")",
"=>",
"aggResultBucket",
".",
"key",
"===",
"'__missing__'",
")",
")",
"{",
"bucket",
".",
"filters",
".",
"push",
"(",
"buildExistsFilter",
"(",
"otherAgg",
".",
"params",
".",
"field",
",",
"otherAgg",
".",
"aggConfigs",
".",
"indexPattern",
")",
")",
";",
"}",
"aggResultBuckets",
".",
"push",
"(",
"bucket",
")",
";",
"}",
")",
";",
"return",
"updatedResponse",
";",
"}",
";",
"export",
"const",
"updateMissingBucket",
"=",
"(",
"response",
",",
"aggConfigs",
",",
"agg",
")",
"=>",
"{",
"const",
"updatedResponse",
"=",
"cloneDeep",
"(",
"response",
")",
";",
"const",
"aggResultBuckets",
"=",
"getAggConfigResultMissingBuckets",
"(",
"updatedResponse",
".",
"aggregations",
",",
"agg",
".",
"id",
")",
";",
"aggResultBuckets",
".",
"forEach",
"(",
"(",
"bucket",
")",
"=>",
"{",
"bucket",
".",
"key",
"=",
"'__missing__'",
";",
"}",
")",
";",
"return",
"updatedResponse",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2050,
null,
null,
null,
1278,
null,
2,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
2,
null,
null,
null,
null,
2,
null,
null,
null,
null,
13,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
2,
null,
1278,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2050,
null,
1278,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
584,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
4,
null,
null,
3,
null,
null,
null,
2,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2050,
null,
null,
null,
null,
null,
1278,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6201,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2050,
null,
1278,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661130 | [
"import",
"{",
"noop",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"BucketAggType",
",",
"IBucketAggConfig",
"}",
"from",
"'./bucket_agg_type'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./bucket_agg_types'",
";",
"import",
"{",
"createFilterTerms",
"}",
"from",
"'./create_filter/terms'",
";",
"import",
"{",
"isStringOrNumberType",
",",
"migrateIncludeExcludeFormat",
",",
"}",
"from",
"'./migrate_include_exclude_format'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"getRequestInspectorStats",
",",
"getResponseInspectorStats",
"}",
"from",
"'../../expressions'",
";",
"import",
"{",
"buildOtherBucketAgg",
",",
"mergeOtherBucketAggResponse",
",",
"updateMissingBucket",
",",
"}",
"from",
"'./_terms_other_bucket_helper'",
";",
"export",
"const",
"termsAggFilter",
"=",
"[",
"'!top_hits'",
",",
"'!percentiles'",
",",
"'!median'",
",",
"'!std_dev'",
",",
"'!derivative'",
",",
"'!moving_avg'",
",",
"'!serial_diff'",
",",
"'!cumulative_sum'",
",",
"'!avg_bucket'",
",",
"'!max_bucket'",
",",
"'!min_bucket'",
",",
"'!sum_bucket'",
",",
"]",
";",
"const",
"termsTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.termsTitle'",
",",
"{",
"defaultMessage",
":",
"'Terms'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsTerms",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"orderBy",
":",
"string",
";",
"orderAgg",
"?",
":",
"AggConfigSerialized",
";",
"order",
"?",
":",
"'asc'",
"|",
"'desc'",
";",
"size",
"?",
":",
"number",
";",
"missingBucket",
"?",
":",
"boolean",
";",
"missingBucketLabel",
"?",
":",
"string",
";",
"otherBucket",
"?",
":",
"boolean",
";",
"otherBucketLabel",
"?",
":",
"string",
";",
"exclude",
"?",
":",
"string",
";",
"include",
"?",
":",
"string",
";",
"}",
"export",
"const",
"getTermsBucketAgg",
"=",
"(",
")",
"=>",
"new",
"BucketAggType",
"(",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"TERMS",
",",
"expressionName",
":",
"'aggTerms'",
",",
"title",
":",
"termsTitle",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"const",
"params",
"=",
"agg",
".",
"params",
";",
"return",
"agg",
".",
"getFieldDisplayName",
"(",
")",
"+",
"': '",
"+",
"params",
".",
"order",
".",
"text",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"const",
"format",
"=",
"agg",
".",
"params",
".",
"field",
"?",
"agg",
".",
"aggConfigs",
".",
"indexPattern",
".",
"getFormatterForField",
"(",
"agg",
".",
"params",
".",
"field",
")",
".",
"toJSON",
"(",
")",
":",
"{",
"id",
":",
"undefined",
",",
"params",
":",
"undefined",
"}",
";",
"return",
"{",
"id",
":",
"'terms'",
",",
"params",
":",
"{",
"id",
":",
"format",
".",
"id",
",",
"otherBucketLabel",
":",
"agg",
".",
"params",
".",
"otherBucketLabel",
",",
"missingBucketLabel",
":",
"agg",
".",
"params",
".",
"missingBucketLabel",
",",
"...",
"format",
".",
"params",
",",
"}",
",",
"}",
";",
"}",
",",
"createFilter",
":",
"createFilterTerms",
",",
"postFlightRequest",
":",
"async",
"(",
"resp",
",",
"aggConfigs",
",",
"aggConfig",
",",
"searchSource",
",",
"inspectorRequestAdapter",
",",
"abortSignal",
")",
"=>",
"{",
"if",
"(",
"!",
"resp",
".",
"aggregations",
")",
"return",
"resp",
";",
"const",
"nestedSearchSource",
"=",
"searchSource",
".",
"createChild",
"(",
")",
";",
"if",
"(",
"aggConfig",
".",
"params",
".",
"otherBucket",
")",
"{",
"const",
"filterAgg",
"=",
"buildOtherBucketAgg",
"(",
"aggConfigs",
",",
"aggConfig",
",",
"resp",
")",
";",
"if",
"(",
"!",
"filterAgg",
")",
"return",
"resp",
";",
"nestedSearchSource",
".",
"setField",
"(",
"'aggs'",
",",
"filterAgg",
")",
";",
"const",
"request",
"=",
"inspectorRequestAdapter",
".",
"start",
"(",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.otherBucketTitle'",
",",
"{",
"defaultMessage",
":",
"'Other bucket'",
",",
"}",
")",
",",
"{",
"description",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.otherBucketDescription'",
",",
"{",
"defaultMessage",
":",
"'This request counts the number of documents that fall '",
"+",
"'outside the criterion of the data buckets.'",
",",
"}",
")",
",",
"}",
")",
";",
"nestedSearchSource",
".",
"getSearchRequestBody",
"(",
")",
".",
"then",
"(",
"(",
"body",
")",
"=>",
"{",
"request",
".",
"json",
"(",
"body",
")",
";",
"}",
")",
";",
"request",
".",
"stats",
"(",
"getRequestInspectorStats",
"(",
"nestedSearchSource",
")",
")",
";",
"const",
"response",
"=",
"await",
"nestedSearchSource",
".",
"fetch",
"(",
"{",
"abortSignal",
"}",
")",
";",
"request",
".",
"stats",
"(",
"getResponseInspectorStats",
"(",
"response",
",",
"nestedSearchSource",
")",
")",
".",
"ok",
"(",
"{",
"json",
":",
"response",
"}",
")",
";",
"resp",
"=",
"mergeOtherBucketAggResponse",
"(",
"aggConfigs",
",",
"resp",
",",
"response",
",",
"aggConfig",
",",
"filterAgg",
"(",
")",
")",
";",
"}",
"if",
"(",
"aggConfig",
".",
"params",
".",
"missingBucket",
")",
"{",
"resp",
"=",
"updateMissingBucket",
"(",
"resp",
",",
"aggConfigs",
",",
"aggConfig",
")",
";",
"}",
"return",
"resp",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"BOOLEAN",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"OSD_FIELD_TYPES",
".",
"IP",
",",
"OSD_FIELD_TYPES",
".",
"STRING",
",",
"]",
",",
"}",
",",
"{",
"name",
":",
"'orderBy'",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'orderAgg'",
",",
"type",
":",
"'agg'",
",",
"allowedAggs",
":",
"termsAggFilter",
",",
"default",
":",
"null",
",",
"makeAgg",
"(",
"termsAgg",
",",
"state",
"=",
"{",
"type",
":",
"'count'",
"}",
")",
"{",
"state",
".",
"schema",
"=",
"'orderAgg'",
";",
"const",
"orderAgg",
"=",
"termsAgg",
".",
"aggConfigs",
".",
"createAggConfig",
"<",
"IBucketAggConfig",
">",
"(",
"state",
",",
"{",
"addToAggConfigs",
":",
"false",
",",
"}",
")",
";",
"orderAgg",
".",
"id",
"=",
"termsAgg",
".",
"id",
"+",
"'-orderAgg'",
";",
"return",
"orderAgg",
";",
"}",
",",
"write",
"(",
"agg",
",",
"output",
",",
"aggs",
")",
"{",
"const",
"dir",
"=",
"agg",
".",
"params",
".",
"order",
".",
"value",
";",
"const",
"order",
"=",
"(",
"output",
".",
"params",
".",
"order",
"=",
"{",
"}",
")",
";",
"let",
"orderAgg",
"=",
"agg",
".",
"params",
".",
"orderAgg",
"||",
"aggs",
"!",
".",
"getResponseAggById",
"(",
"agg",
".",
"params",
".",
"orderBy",
")",
";",
"if",
"(",
"output",
".",
"params",
".",
"script",
")",
"{",
"output",
".",
"params",
".",
"value_type",
"=",
"agg",
".",
"getField",
"(",
")",
".",
"type",
"===",
"'number'",
"?",
"'float'",
":",
"agg",
".",
"getField",
"(",
")",
".",
"type",
";",
"}",
"if",
"(",
"agg",
".",
"params",
".",
"missingBucket",
"&&",
"agg",
".",
"params",
".",
"field",
".",
"type",
"===",
"'string'",
")",
"{",
"output",
".",
"params",
".",
"missing",
"=",
"'__missing__'",
";",
"}",
"if",
"(",
"!",
"orderAgg",
")",
"{",
"order",
"[",
"agg",
".",
"params",
".",
"orderBy",
"||",
"'_count'",
"]",
"=",
"dir",
";",
"return",
";",
"}",
"if",
"(",
"orderAgg",
".",
"type",
".",
"name",
"===",
"'count'",
")",
"{",
"order",
".",
"_count",
"=",
"dir",
";",
"return",
";",
"}",
"const",
"orderAggId",
"=",
"orderAgg",
".",
"id",
";",
"if",
"(",
"orderAgg",
".",
"parentId",
"&&",
"aggs",
")",
"{",
"orderAgg",
"=",
"aggs",
".",
"byId",
"(",
"orderAgg",
".",
"parentId",
")",
";",
"}",
"output",
".",
"subAggs",
"=",
"(",
"output",
".",
"subAggs",
"||",
"[",
"]",
")",
".",
"concat",
"(",
"orderAgg",
")",
";",
"order",
"[",
"orderAggId",
"]",
"=",
"dir",
";",
"}",
",",
"}",
",",
"{",
"name",
":",
"'order'",
",",
"type",
":",
"'optioned'",
",",
"default",
":",
"'desc'",
",",
"options",
":",
"[",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.orderDescendingTitle'",
",",
"{",
"defaultMessage",
":",
"'Descending'",
",",
"}",
")",
",",
"value",
":",
"'desc'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.orderAscendingTitle'",
",",
"{",
"defaultMessage",
":",
"'Ascending'",
",",
"}",
")",
",",
"value",
":",
"'asc'",
",",
"}",
",",
"]",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'size'",
",",
"default",
":",
"5",
",",
"}",
",",
"{",
"name",
":",
"'otherBucket'",
",",
"default",
":",
"false",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'otherBucketLabel'",
",",
"type",
":",
"'string'",
",",
"default",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.otherBucketLabel'",
",",
"{",
"defaultMessage",
":",
"'Other'",
",",
"}",
")",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.otherBucket.labelForOtherBucketLabel'",
",",
"{",
"defaultMessage",
":",
"'Label for other bucket'",
",",
"}",
")",
",",
"shouldShow",
":",
"(",
"agg",
")",
"=>",
"agg",
".",
"getParam",
"(",
"'otherBucket'",
")",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'missingBucket'",
",",
"default",
":",
"false",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'missingBucketLabel'",
",",
"default",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.missingBucketLabel'",
",",
"{",
"defaultMessage",
":",
"'Missing'",
",",
"description",
":",
"`Default label used in charts when documents are missing a field.\n Visible when you create a chart with a terms aggregation and enable \"Show missing values\"`",
",",
"}",
")",
",",
"type",
":",
"'string'",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.otherBucket.labelForMissingValuesLabel'",
",",
"{",
"defaultMessage",
":",
"'Label for missing values'",
",",
"}",
")",
",",
"shouldShow",
":",
"(",
"agg",
")",
"=>",
"agg",
".",
"getParam",
"(",
"'missingBucket'",
")",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'exclude'",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.excludeLabel'",
",",
"{",
"defaultMessage",
":",
"'Exclude'",
",",
"}",
")",
",",
"type",
":",
"'string'",
",",
"advanced",
":",
"true",
",",
"shouldShow",
":",
"isStringOrNumberType",
",",
"...",
"migrateIncludeExcludeFormat",
",",
"}",
",",
"{",
"name",
":",
"'include'",
",",
"displayName",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.includeLabel'",
",",
"{",
"defaultMessage",
":",
"'Include'",
",",
"}",
")",
",",
"type",
":",
"'string'",
",",
"advanced",
":",
"true",
",",
"shouldShow",
":",
"isStringOrNumberType",
",",
"...",
"migrateIncludeExcludeFormat",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2072,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661131 | [
"import",
"{",
"IMetricAggConfig",
",",
"MetricAggParam",
"}",
"from",
"'../metric_agg_type'",
";",
"param",
"{",
"string",
"}",
"paramName",
"returns",
"{",
"function",
"}",
"export",
"const",
"forwardModifyAggConfigOnSearchRequestStart",
"=",
"(",
"paramName",
")",
"=>",
"{",
"return",
"(",
"aggConfig",
",",
"searchSource",
"?",
",",
"request",
"?",
")",
"=>",
"{",
"if",
"(",
"!",
"aggConfig",
"||",
"!",
"aggConfig",
".",
"params",
")",
"{",
"return",
";",
"}",
"const",
"nestedAggConfig",
"=",
"aggConfig",
".",
"getParam",
"(",
"paramName",
")",
";",
"if",
"(",
"nestedAggConfig",
"&&",
"nestedAggConfig",
".",
"type",
"&&",
"nestedAggConfig",
".",
"type",
".",
"params",
")",
"{",
"nestedAggConfig",
".",
"type",
".",
"params",
".",
"forEach",
"(",
"(",
"param",
")",
"=>",
"{",
"if",
"(",
"param",
".",
"modifyAggConfigOnSearchRequestStart",
")",
"{",
"param",
".",
"modifyAggConfigOnSearchRequestStart",
"(",
"nestedAggConfig",
",",
"searchSource",
",",
"request",
")",
";",
"}",
"}",
")",
";",
"}",
"}",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
2,
null,
null,
null,
null,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26103,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661132 | [
"import",
"{",
"IAggConfigs",
"}",
"from",
"'../../agg_configs'",
";",
"import",
"{",
"IMetricAggConfig",
"}",
"from",
"'../metric_agg_type'",
";",
"export",
"const",
"parentPipelineAggWriter",
"=",
"(",
"agg",
",",
"output",
",",
"aggConfigs",
"?",
")",
":",
"void",
"=>",
"{",
"const",
"customMetric",
"=",
"agg",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"const",
"metricAgg",
"=",
"agg",
".",
"getParam",
"(",
"'metricAgg'",
")",
";",
"const",
"selectedMetric",
"=",
"customMetric",
"||",
"(",
"aggConfigs",
"&&",
"aggConfigs",
".",
"getResponseAggById",
"(",
"metricAgg",
")",
")",
";",
"if",
"(",
"customMetric",
"&&",
"customMetric",
".",
"type",
".",
"name",
"!==",
"'count'",
")",
"{",
"output",
".",
"parentAggs",
"=",
"(",
"output",
".",
"parentAggs",
"||",
"[",
"]",
")",
".",
"concat",
"(",
"selectedMetric",
")",
";",
"}",
"output",
".",
"params",
"=",
"{",
"buckets_path",
":",
"selectedMetric",
".",
"type",
".",
"name",
"===",
"'count'",
"?",
"'_count'",
":",
"selectedMetric",
".",
"id",
",",
"}",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
1921,
null,
17,
null,
2050,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661133 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"noop",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"forwardModifyAggConfigOnSearchRequestStart",
"}",
"from",
"'./nested_agg_helpers'",
";",
"import",
"{",
"IMetricAggConfig",
",",
"MetricAggParam",
"}",
"from",
"'../metric_agg_type'",
";",
"import",
"{",
"parentPipelineAggWriter",
"}",
"from",
"'./parent_pipeline_agg_writer'",
";",
"const",
"metricAggFilter",
"=",
"[",
"'!top_hits'",
",",
"'!percentiles'",
",",
"'!percentile_ranks'",
",",
"'!median'",
",",
"'!std_dev'",
",",
"'!geo_bounds'",
",",
"'!geo_centroid'",
",",
"]",
";",
"export",
"const",
"parentPipelineType",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.parentPipelineAggregationsSubtypeTitle'",
",",
"{",
"defaultMessage",
":",
"'Parent Pipeline Aggregations'",
",",
"}",
")",
";",
"export",
"const",
"parentPipelineAggHelper",
"=",
"{",
"subtype",
":",
"parentPipelineType",
",",
"params",
"(",
")",
"{",
"return",
"[",
"{",
"name",
":",
"'metricAgg'",
",",
"default",
":",
"'custom'",
",",
"write",
":",
"parentPipelineAggWriter",
",",
"}",
",",
"{",
"name",
":",
"'customMetric'",
",",
"type",
":",
"'agg'",
",",
"allowedAggs",
":",
"metricAggFilter",
",",
"makeAgg",
"(",
"termsAgg",
",",
"state",
"=",
"{",
"type",
":",
"'count'",
"}",
")",
"{",
"const",
"metricAgg",
"=",
"termsAgg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"state",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
";",
"metricAgg",
".",
"id",
"=",
"termsAgg",
".",
"id",
"+",
"'-metric'",
";",
"return",
"metricAgg",
";",
"}",
",",
"modifyAggConfigOnSearchRequestStart",
":",
"forwardModifyAggConfigOnSearchRequestStart",
"(",
"'customMetric'",
")",
",",
"write",
":",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'buckets_path'",
",",
"write",
":",
"noop",
",",
"}",
",",
"]",
"as",
"Array",
"<",
"MetricAggParam",
"<",
"IMetricAggConfig",
">",
">",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"let",
"subAgg",
";",
"const",
"customMetric",
"=",
"agg",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"if",
"(",
"customMetric",
")",
"{",
"subAgg",
"=",
"customMetric",
";",
"}",
"else",
"{",
"subAgg",
"=",
"agg",
".",
"aggConfigs",
".",
"byId",
"(",
"agg",
".",
"getParam",
"(",
"'metricAgg'",
")",
")",
";",
"}",
"return",
"subAgg",
"?",
"subAgg",
".",
"type",
".",
"getSerializedFormat",
"(",
"subAgg",
")",
":",
"{",
"}",
";",
"}",
",",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661134 | [
"import",
"{",
"IMetricAggConfig",
"}",
"from",
"'../metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'../metric_agg_types'",
";",
"export",
"const",
"siblingPipelineAggWriter",
"=",
"(",
"agg",
",",
"output",
")",
"=>",
"{",
"const",
"customMetric",
"=",
"agg",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"if",
"(",
"!",
"customMetric",
")",
"return",
";",
"const",
"metricAgg",
"=",
"customMetric",
";",
"const",
"bucketAgg",
"=",
"agg",
".",
"getParam",
"(",
"'customBucket'",
")",
";",
"if",
"(",
"metricAgg",
".",
"type",
".",
"name",
"!==",
"METRIC_TYPES",
".",
"COUNT",
")",
"{",
"bucketAgg",
".",
"subAggs",
"=",
"(",
"output",
".",
"subAggs",
"||",
"[",
"]",
")",
".",
"concat",
"(",
"metricAgg",
")",
";",
"output",
".",
"params",
".",
"buckets_path",
"=",
"`${",
"bucketAgg",
".",
"id",
"}>${",
"metricAgg",
".",
"id",
"}`",
";",
"}",
"else",
"{",
"output",
".",
"params",
".",
"buckets_path",
"=",
"bucketAgg",
".",
"id",
"+",
"'>_count'",
";",
"}",
"output",
".",
"parentAggs",
"=",
"(",
"output",
".",
"parentAggs",
"||",
"[",
"]",
")",
".",
"concat",
"(",
"bucketAgg",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
1921,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661135 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"siblingPipelineAggWriter",
"}",
"from",
"'./sibling_pipeline_agg_writer'",
";",
"import",
"{",
"forwardModifyAggConfigOnSearchRequestStart",
"}",
"from",
"'./nested_agg_helpers'",
";",
"import",
"{",
"IMetricAggConfig",
",",
"MetricAggParam",
"}",
"from",
"'../metric_agg_type'",
";",
"const",
"metricAggFilter",
"=",
"[",
"'!top_hits'",
",",
"'!percentiles'",
",",
"'!percentile_ranks'",
",",
"'!median'",
",",
"'!std_dev'",
",",
"'!sum_bucket'",
",",
"'!avg_bucket'",
",",
"'!min_bucket'",
",",
"'!max_bucket'",
",",
"'!derivative'",
",",
"'!moving_avg'",
",",
"'!serial_diff'",
",",
"'!cumulative_sum'",
",",
"'!geo_bounds'",
",",
"'!geo_centroid'",
",",
"]",
";",
"const",
"bucketAggFilter",
"=",
"[",
"]",
";",
"export",
"const",
"siblingPipelineType",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.siblingPipelineAggregationsSubtypeTitle'",
",",
"{",
"defaultMessage",
":",
"'Sibling pipeline aggregations'",
",",
"}",
")",
";",
"export",
"const",
"siblingPipelineAggHelper",
"=",
"{",
"subtype",
":",
"siblingPipelineType",
",",
"params",
"(",
")",
"{",
"return",
"[",
"{",
"name",
":",
"'customBucket'",
",",
"type",
":",
"'agg'",
",",
"allowedAggs",
":",
"bucketAggFilter",
",",
"default",
":",
"null",
",",
"makeAgg",
"(",
"agg",
",",
"state",
"=",
"{",
"type",
":",
"'date_histogram'",
"}",
")",
"{",
"const",
"orderAgg",
"=",
"agg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"state",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
";",
"orderAgg",
".",
"id",
"=",
"agg",
".",
"id",
"+",
"'-bucket'",
";",
"return",
"orderAgg",
";",
"}",
",",
"modifyAggConfigOnSearchRequestStart",
":",
"forwardModifyAggConfigOnSearchRequestStart",
"(",
"'customBucket'",
")",
",",
"write",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
",",
"{",
"name",
":",
"'customMetric'",
",",
"type",
":",
"'agg'",
",",
"allowedAggs",
":",
"metricAggFilter",
",",
"default",
":",
"null",
",",
"makeAgg",
"(",
"agg",
",",
"state",
"=",
"{",
"type",
":",
"'count'",
"}",
")",
"{",
"const",
"orderAgg",
"=",
"agg",
".",
"aggConfigs",
".",
"createAggConfig",
"(",
"state",
",",
"{",
"addToAggConfigs",
":",
"false",
"}",
")",
";",
"orderAgg",
".",
"id",
"=",
"agg",
".",
"id",
"+",
"'-metric'",
";",
"return",
"orderAgg",
";",
"}",
",",
"modifyAggConfigOnSearchRequestStart",
":",
"forwardModifyAggConfigOnSearchRequestStart",
"(",
"'customMetric'",
")",
",",
"write",
":",
"siblingPipelineAggWriter",
",",
"}",
",",
"]",
"as",
"Array",
"<",
"MetricAggParam",
"<",
"IMetricAggConfig",
">",
">",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"const",
"customMetric",
"=",
"agg",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"return",
"customMetric",
"?",
"customMetric",
".",
"type",
".",
"getSerializedFormat",
"(",
"customMetric",
")",
":",
"{",
"}",
";",
"}",
",",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661136 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"averageTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.averageTitle'",
",",
"{",
"defaultMessage",
":",
"'Average'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsAvg",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getAvgMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"AVG",
",",
"title",
":",
"averageTitle",
",",
"makeLabel",
":",
"(",
"aggConfig",
")",
"=>",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.averageLabel'",
",",
"{",
"defaultMessage",
":",
"'Average {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
"]",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661137 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
",",
"IMetricAggConfig",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"uniqueCountTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.uniqueCountTitle'",
",",
"{",
"defaultMessage",
":",
"'Unique Count'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsCardinality",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getCardinalityMetricAgg",
"=",
"(",
")",
"=>",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"CARDINALITY",
",",
"title",
":",
"uniqueCountTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.uniqueCountLabel'",
",",
"{",
"defaultMessage",
":",
"'Unique count of {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'number'",
",",
"}",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"Object",
".",
"values",
"(",
"OSD_FIELD_TYPES",
")",
".",
"filter",
"(",
"(",
"type",
")",
"=>",
"type",
"!==",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
")",
",",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3001,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661138 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsGeoBounds",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"const",
"geoBoundsTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geoBoundsTitle'",
",",
"{",
"defaultMessage",
":",
"'Geo Bounds'",
",",
"}",
")",
";",
"const",
"geoBoundsLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geoBoundsLabel'",
",",
"{",
"defaultMessage",
":",
"'Geo Bounds'",
",",
"}",
")",
";",
"export",
"const",
"getGeoBoundsMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"GEO_BOUNDS",
",",
"title",
":",
"geoBoundsTitle",
",",
"makeLabel",
":",
"(",
")",
"=>",
"geoBoundsLabel",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"GEO_POINT",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661139 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsGeoCentroid",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"const",
"geoCentroidTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geoCentroidTitle'",
",",
"{",
"defaultMessage",
":",
"'Geo Centroid'",
",",
"}",
")",
";",
"const",
"geoCentroidLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geoCentroidLabel'",
",",
"{",
"defaultMessage",
":",
"'Geo Centroid'",
",",
"}",
")",
";",
"export",
"const",
"getGeoCentroidMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"GEO_CENTROID",
",",
"title",
":",
"geoCentroidTitle",
",",
"makeLabel",
":",
"(",
")",
"=>",
"geoCentroidLabel",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"GEO_POINT",
",",
"}",
",",
"]",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"return",
"bucket",
"[",
"agg",
".",
"id",
"]",
"&&",
"bucket",
"[",
"agg",
".",
"id",
"]",
".",
"location",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661140 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"maxTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.maxTitle'",
",",
"{",
"defaultMessage",
":",
"'Max'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsMax",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getMaxMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MAX",
",",
"title",
":",
"maxTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.maxLabel'",
",",
"{",
"defaultMessage",
":",
"'Max {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
"]",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661141 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"medianTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.medianTitle'",
",",
"{",
"defaultMessage",
":",
"'Median'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsMedian",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getMedianMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MEDIAN",
",",
"dslName",
":",
"'percentiles'",
",",
"title",
":",
"medianTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.medianLabel'",
",",
"{",
"defaultMessage",
":",
"'Median {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
"]",
",",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"output",
".",
"params",
".",
"field",
"=",
"agg",
".",
"getParam",
"(",
"'field'",
")",
".",
"name",
";",
"output",
".",
"params",
".",
"percents",
"=",
"[",
"50",
"]",
";",
"}",
",",
"}",
",",
"]",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"return",
"bucket",
"[",
"agg",
".",
"id",
"]",
".",
"values",
"[",
"'50.0'",
"]",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661142 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"minTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.minTitle'",
",",
"{",
"defaultMessage",
":",
"'Min'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsMin",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getMinMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MIN",
",",
"title",
":",
"minTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.minLabel'",
",",
"{",
"defaultMessage",
":",
"'Min {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
"]",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661143 | [
"import",
"{",
"assignIn",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"IMetricAggConfig",
"}",
"from",
"'../metric_agg_type'",
";",
"param",
"{",
"AggConfig",
"}",
"agg",
"param",
"{",
"object",
"}",
"props",
"return",
"{",
"Constructor",
"}",
"export",
"const",
"getResponseAggConfigClass",
"=",
"(",
"agg",
",",
"props",
")",
"=>",
"{",
"if",
"(",
"agg",
".",
"$$_ResponseAggConfigClass",
")",
"{",
"return",
"agg",
".",
"$$_ResponseAggConfigClass",
";",
"}",
"else",
"{",
"return",
"(",
"agg",
".",
"$$_ResponseAggConfigClass",
"=",
"create",
"(",
"agg",
",",
"props",
")",
")",
";",
"}",
"}",
";",
"export",
"interface",
"IResponseAggConfig",
"extends",
"IMetricAggConfig",
"{",
"key",
":",
"string",
"|",
"number",
";",
"parentId",
":",
"IMetricAggConfig",
"[",
"'id'",
"]",
";",
"}",
"export",
"const",
"create",
"=",
"(",
"parentAgg",
",",
"props",
")",
"=>",
"{",
"param",
"{",
"string",
"|",
"number",
"}",
"key",
"function",
"ResponseAggConfig",
"(",
"this",
",",
"key",
")",
"{",
"const",
"parentId",
"=",
"parentAgg",
".",
"id",
";",
"let",
"id",
";",
"const",
"subId",
"=",
"String",
"(",
"key",
")",
";",
"if",
"(",
"subId",
".",
"indexOf",
"(",
"'.'",
")",
">",
"-",
"1",
")",
"{",
"id",
"=",
"parentId",
"+",
"\"['\"",
"+",
"subId",
".",
"replace",
"(",
"/'/g",
",",
"\"\\\\'\"",
")",
"+",
"\"']\"",
";",
"}",
"else",
"{",
"id",
"=",
"parentId",
"+",
"'.'",
"+",
"subId",
";",
"}",
"this",
".",
"id",
"=",
"id",
";",
"this",
".",
"key",
"=",
"key",
";",
"this",
".",
"parentId",
"=",
"parentId",
";",
"}",
"ResponseAggConfig",
".",
"prototype",
"=",
"Object",
".",
"create",
"(",
"parentAgg",
")",
";",
"ResponseAggConfig",
".",
"prototype",
".",
"constructor",
"=",
"ResponseAggConfig",
";",
"assignIn",
"(",
"ResponseAggConfig",
".",
"prototype",
",",
"props",
")",
";",
"return",
"ResponseAggConfig",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
1921,
null,
20,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
26104,
null,
2,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661144 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"getResponseAggConfigClass",
",",
"IResponseAggConfig",
"}",
"from",
"'./lib/get_response_agg_config_class'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsStdDeviation",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"interface",
"ValProp",
"{",
"valProp",
":",
"string",
"[",
"]",
";",
"title",
":",
"string",
";",
"}",
"export",
"interface",
"IStdDevAggConfig",
"extends",
"IResponseAggConfig",
"{",
"keyedDetails",
":",
"(",
"customLabel",
":",
"string",
",",
"fieldDisplayName",
"?",
":",
"string",
")",
"=>",
"Record",
"<",
"string",
",",
"ValProp",
">",
";",
"valProp",
":",
"(",
")",
"=>",
"string",
"[",
"]",
";",
"}",
"const",
"responseAggConfigProps",
"=",
"{",
"valProp",
"(",
"this",
")",
"{",
"const",
"customLabel",
"=",
"this",
".",
"getParam",
"(",
"'customLabel'",
")",
";",
"const",
"details",
"=",
"this",
".",
"keyedDetails",
"(",
"customLabel",
")",
"[",
"this",
".",
"key",
"]",
";",
"return",
"details",
".",
"valProp",
";",
"}",
",",
"makeLabel",
"(",
"this",
")",
"{",
"const",
"fieldDisplayName",
"=",
"this",
".",
"getFieldDisplayName",
"(",
")",
";",
"const",
"customLabel",
"=",
"this",
".",
"getParam",
"(",
"'customLabel'",
")",
";",
"const",
"details",
"=",
"this",
".",
"keyedDetails",
"(",
"customLabel",
",",
"fieldDisplayName",
")",
";",
"return",
"get",
"(",
"details",
",",
"[",
"this",
".",
"key",
",",
"'title'",
"]",
")",
";",
"}",
",",
"keyedDetails",
"(",
"this",
",",
"customLabel",
",",
"fieldDisplayName",
")",
"{",
"const",
"label",
"=",
"customLabel",
"||",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.standardDeviation.keyDetailsLabel'",
",",
"{",
"defaultMessage",
":",
"'Standard Deviation of {fieldDisplayName}'",
",",
"values",
":",
"{",
"fieldDisplayName",
"}",
",",
"}",
")",
";",
"return",
"{",
"std_lower",
":",
"{",
"valProp",
":",
"[",
"'std_deviation_bounds'",
",",
"'lower'",
"]",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.standardDeviation.lowerKeyDetailsTitle'",
",",
"{",
"defaultMessage",
":",
"'Lower {label}'",
",",
"values",
":",
"{",
"label",
"}",
",",
"}",
")",
",",
"}",
",",
"std_upper",
":",
"{",
"valProp",
":",
"[",
"'std_deviation_bounds'",
",",
"'upper'",
"]",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.standardDeviation.upperKeyDetailsTitle'",
",",
"{",
"defaultMessage",
":",
"'Upper {label}'",
",",
"values",
":",
"{",
"label",
"}",
",",
"}",
")",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
";",
"export",
"const",
"getStdDeviationMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"<",
"IStdDevAggConfig",
">",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"STD_DEV",
",",
"dslName",
":",
"'extended_stats'",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.standardDeviationTitle'",
",",
"{",
"defaultMessage",
":",
"'Standard Deviation'",
",",
"}",
")",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.standardDeviationLabel'",
",",
"{",
"defaultMessage",
":",
"'Standard Deviation of {field}'",
",",
"values",
":",
"{",
"field",
":",
"agg",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"}",
",",
"]",
",",
"getResponseAggs",
"(",
"agg",
")",
"{",
"const",
"ValueAggConfig",
"=",
"getResponseAggConfigClass",
"(",
"agg",
",",
"responseAggConfigProps",
")",
";",
"return",
"[",
"new",
"ValueAggConfig",
"(",
"'std_lower'",
")",
",",
"new",
"ValueAggConfig",
"(",
"'std_upper'",
")",
"]",
";",
"}",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"return",
"get",
"(",
"bucket",
"[",
"agg",
".",
"parentId",
"]",
",",
"agg",
".",
"valProp",
"(",
")",
")",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
5,
null,
8957,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28012,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8957,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
8957,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661145 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"const",
"sumTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sumTitle'",
",",
"{",
"defaultMessage",
":",
"'Sum'",
",",
"}",
")",
";",
"export",
"interface",
"AggParamsSum",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"}",
"export",
"const",
"getSumMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SUM",
",",
"title",
":",
"sumTitle",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sumLabel'",
",",
"{",
"defaultMessage",
":",
"'Sum of {field}'",
",",
"values",
":",
"{",
"field",
":",
"aggConfig",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"isScalable",
"(",
")",
"{",
"return",
"true",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
"]",
",",
"}",
",",
"]",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661146 | [
"import",
"{",
"startCase",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"IMetricAggConfig",
"}",
"from",
"'../metric_agg_type'",
";",
"export",
"const",
"makeNestedLabel",
"=",
"(",
"aggConfig",
",",
"label",
")",
"=>",
"{",
"const",
"uppercaseLabel",
"=",
"startCase",
"(",
"label",
")",
";",
"const",
"customMetric",
"=",
"aggConfig",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"const",
"metricAgg",
"=",
"aggConfig",
".",
"getParam",
"(",
"'metricAgg'",
")",
";",
"if",
"(",
"customMetric",
")",
"{",
"let",
"metricLabel",
"=",
"customMetric",
".",
"makeLabel",
"(",
")",
";",
"if",
"(",
"metricLabel",
".",
"includes",
"(",
"`${",
"uppercaseLabel",
"} of `",
")",
")",
"{",
"metricLabel",
"=",
"metricLabel",
".",
"substring",
"(",
"`${",
"uppercaseLabel",
"} of `",
".",
"length",
")",
";",
"metricLabel",
"=",
"`2. ${",
"label",
"} of ${",
"metricLabel",
"}`",
";",
"}",
"else",
"if",
"(",
"metricLabel",
".",
"includes",
"(",
"`${",
"label",
"} of `",
")",
")",
"{",
"metricLabel",
"=",
"parseInt",
"(",
"metricLabel",
".",
"substring",
"(",
"0",
",",
"1",
")",
",",
"10",
")",
"+",
"1",
"+",
"metricLabel",
".",
"substring",
"(",
"1",
")",
";",
"}",
"else",
"{",
"metricLabel",
"=",
"`${",
"uppercaseLabel",
"} of ${",
"metricLabel",
"}`",
";",
"}",
"return",
"metricLabel",
";",
"}",
"const",
"metric",
"=",
"aggConfig",
".",
"aggConfigs",
".",
"byId",
"(",
"metricAgg",
")",
";",
"if",
"(",
"!",
"metric",
")",
"{",
"return",
"''",
";",
"}",
"return",
"`${",
"uppercaseLabel",
"} of ${",
"metric",
".",
"makeLabel",
"(",
")",
"}`",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1921,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661147 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"siblingPipelineAggHelper",
"}",
"from",
"'./lib/sibling_pipeline_agg_helper'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsBucketAvg",
"extends",
"BaseAggParams",
"{",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"customBucket",
"?",
":",
"AggConfigSerialized",
";",
"}",
"const",
"overallAverageLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.overallAverageLabel'",
",",
"{",
"defaultMessage",
":",
"'overall average'",
",",
"}",
")",
";",
"const",
"averageBucketTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.averageBucketTitle'",
",",
"{",
"defaultMessage",
":",
"'Average Bucket'",
",",
"}",
")",
";",
"export",
"const",
"getBucketAvgMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"siblingPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"AVG_BUCKET",
",",
"title",
":",
"averageBucketTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"overallAverageLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"const",
"customMetric",
"=",
"agg",
".",
"getParam",
"(",
"'customMetric'",
")",
";",
"const",
"customBucket",
"=",
"agg",
".",
"getParam",
"(",
"'customBucket'",
")",
";",
"const",
"scaleMetrics",
"=",
"customMetric",
".",
"type",
"&&",
"customMetric",
".",
"type",
".",
"isScalable",
"(",
")",
";",
"let",
"value",
"=",
"bucket",
"[",
"agg",
".",
"id",
"]",
"&&",
"bucket",
"[",
"agg",
".",
"id",
"]",
".",
"value",
";",
"if",
"(",
"scaleMetrics",
"&&",
"customBucket",
".",
"type",
".",
"name",
"===",
"'date_histogram'",
")",
"{",
"const",
"aggInfo",
"=",
"customBucket",
".",
"write",
"(",
")",
";",
"value",
"*=",
"get",
"(",
"aggInfo",
",",
"'bucketInterval.scale'",
",",
"1",
")",
";",
"}",
"return",
"value",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661148 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"siblingPipelineAggHelper",
"}",
"from",
"'./lib/sibling_pipeline_agg_helper'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsBucketMax",
"extends",
"BaseAggParams",
"{",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"customBucket",
"?",
":",
"AggConfigSerialized",
";",
"}",
"const",
"overallMaxLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.overallMaxLabel'",
",",
"{",
"defaultMessage",
":",
"'overall max'",
",",
"}",
")",
";",
"const",
"maxBucketTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.maxBucketTitle'",
",",
"{",
"defaultMessage",
":",
"'Max Bucket'",
",",
"}",
")",
";",
"export",
"const",
"getBucketMaxMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"siblingPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MAX_BUCKET",
",",
"title",
":",
"maxBucketTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"overallMaxLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661149 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"siblingPipelineAggHelper",
"}",
"from",
"'./lib/sibling_pipeline_agg_helper'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsBucketMin",
"extends",
"BaseAggParams",
"{",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"customBucket",
"?",
":",
"AggConfigSerialized",
";",
"}",
"const",
"overallMinLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.overallMinLabel'",
",",
"{",
"defaultMessage",
":",
"'overall min'",
",",
"}",
")",
";",
"const",
"minBucketTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.minBucketTitle'",
",",
"{",
"defaultMessage",
":",
"'Min Bucket'",
",",
"}",
")",
";",
"export",
"const",
"getBucketMinMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"siblingPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MIN_BUCKET",
",",
"title",
":",
"minBucketTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"overallMinLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661150 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"siblingPipelineAggHelper",
"}",
"from",
"'./lib/sibling_pipeline_agg_helper'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsBucketSum",
"extends",
"BaseAggParams",
"{",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"customBucket",
"?",
":",
"AggConfigSerialized",
";",
"}",
"const",
"overallSumLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.overallSumLabel'",
",",
"{",
"defaultMessage",
":",
"'overall sum'",
",",
"}",
")",
";",
"const",
"sumBucketTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sumBucketTitle'",
",",
"{",
"defaultMessage",
":",
"'Sum Bucket'",
",",
"}",
")",
";",
"export",
"const",
"getBucketSumMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"siblingPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SUM_BUCKET",
",",
"title",
":",
"sumBucketTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"overallSumLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661151 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"parentPipelineAggHelper",
"}",
"from",
"'./lib/parent_pipeline_agg_helper'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsCumulativeSum",
"extends",
"BaseAggParams",
"{",
"buckets_path",
":",
"string",
";",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"metricAgg",
"?",
":",
"string",
";",
"}",
"const",
"cumulativeSumLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulativeSumLabel'",
",",
"{",
"defaultMessage",
":",
"'cumulative sum'",
",",
"}",
")",
";",
"const",
"cumulativeSumTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulativeSumTitle'",
",",
"{",
"defaultMessage",
":",
"'Cumulative Sum'",
",",
"}",
")",
";",
"export",
"const",
"getCumulativeSumMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"parentPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"CUMULATIVE_SUM",
",",
"title",
":",
"cumulativeSumTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"cumulativeSumLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661152 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"parentPipelineAggHelper",
"}",
"from",
"'./lib/parent_pipeline_agg_helper'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsDerivative",
"extends",
"BaseAggParams",
"{",
"buckets_path",
":",
"string",
";",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"metricAgg",
"?",
":",
"string",
";",
"}",
"const",
"derivativeLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivativeLabel'",
",",
"{",
"defaultMessage",
":",
"'derivative'",
",",
"}",
")",
";",
"const",
"derivativeTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivativeTitle'",
",",
"{",
"defaultMessage",
":",
"'Derivative'",
",",
"}",
")",
";",
"export",
"const",
"getDerivativeMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"parentPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"DERIVATIVE",
",",
"title",
":",
"derivativeTitle",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"return",
"makeNestedLabel",
"(",
"agg",
",",
"derivativeLabel",
")",
";",
"}",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661153 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"parentPipelineAggHelper",
"}",
"from",
"'./lib/parent_pipeline_agg_helper'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsMovingAvg",
"extends",
"BaseAggParams",
"{",
"buckets_path",
":",
"string",
";",
"window",
"?",
":",
"number",
";",
"script",
"?",
":",
"string",
";",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"metricAgg",
"?",
":",
"string",
";",
"}",
"const",
"movingAvgTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.movingAvgTitle'",
",",
"{",
"defaultMessage",
":",
"'Moving Avg'",
",",
"}",
")",
";",
"const",
"movingAvgLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.movingAvgLabel'",
",",
"{",
"defaultMessage",
":",
"'moving avg'",
",",
"}",
")",
";",
"export",
"const",
"getMovingAvgMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"parentPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MOVING_FN",
",",
"dslName",
":",
"'moving_fn'",
",",
"title",
":",
"movingAvgTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"movingAvgLabel",
")",
",",
"subtype",
",",
"getSerializedFormat",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
",",
"{",
"name",
":",
"'window'",
",",
"default",
":",
"5",
",",
"}",
",",
"{",
"name",
":",
"'script'",
",",
"default",
":",
"'MovingFunctions.unweightedAvg(values)'",
",",
"}",
",",
"]",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"/**\n * The previous implementation using `moving_avg` did not\n * return any bucket in case there are no documents or empty window.\n * The `moving_fn` aggregation returns buckets with the value null if the\n * window is empty or doesn't return any value if the sibiling metric\n * is null. Since our generic MetricAggType.getValue implementation\n * would return the value 0 for null buckets, we need a specific\n * implementation here, that preserves the null value.\n */",
"return",
"bucket",
"[",
"agg",
".",
"id",
"]",
"?",
"bucket",
"[",
"agg",
".",
"id",
"]",
".",
"value",
":",
"null",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661154 | [
"import",
"{",
"find",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"IResponseAggConfig",
"}",
"from",
"'./lib/get_response_agg_config_class'",
";",
"export",
"const",
"getPercentileValue",
"=",
"<",
"TAggConfig",
"extends",
"IResponseAggConfig",
">",
"(",
"agg",
",",
"bucket",
")",
"=>",
"{",
"const",
"{",
"values",
"}",
"=",
"bucket",
"[",
"agg",
".",
"parentId",
"]",
";",
"const",
"percentile",
"=",
"find",
"(",
"values",
",",
"(",
"{",
"key",
"}",
")",
"=>",
"key",
"===",
"agg",
".",
"key",
")",
";",
"return",
"percentile",
"?",
"percentile",
".",
"value",
":",
"NaN",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2433,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661155 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'../agg_types'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"getResponseAggConfigClass",
",",
"IResponseAggConfig",
"}",
"from",
"'./lib/get_response_agg_config_class'",
";",
"import",
"{",
"getPercentileValue",
"}",
"from",
"'./percentiles_get_value'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"export",
"interface",
"AggParamsPercentileRanks",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"values",
"?",
":",
"number",
"[",
"]",
";",
"}",
"export",
"type",
"IPercentileRanksAggConfig",
"=",
"IResponseAggConfig",
";",
"export",
"interface",
"PercentileRanksMetricAggDependencies",
"{",
"getFieldFormatsStart",
":",
"AggTypesDependencies",
"[",
"'getFieldFormatsStart'",
"]",
";",
"}",
"const",
"getValueProps",
"=",
"(",
"getFieldFormatsStart",
")",
"=>",
"{",
"return",
"{",
"makeLabel",
"(",
"this",
")",
"{",
"const",
"{",
"getDefaultInstance",
"}",
"=",
"getFieldFormatsStart",
"(",
")",
";",
"const",
"field",
"=",
"this",
".",
"getField",
"(",
")",
";",
"const",
"format",
"=",
"(",
"field",
"&&",
"field",
".",
"format",
")",
"||",
"getDefaultInstance",
"(",
"OSD_FIELD_TYPES",
".",
"NUMBER",
")",
";",
"const",
"customLabel",
"=",
"this",
".",
"getParam",
"(",
"'customLabel'",
")",
";",
"const",
"label",
"=",
"customLabel",
"||",
"this",
".",
"getFieldDisplayName",
"(",
")",
";",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentileRanks.valuePropsLabel'",
",",
"{",
"defaultMessage",
":",
"'Percentile rank {format} of \"{label}\"'",
",",
"values",
":",
"{",
"format",
":",
"format",
".",
"convert",
"(",
"this",
".",
"key",
",",
"'text'",
")",
",",
"label",
"}",
",",
"}",
")",
";",
"}",
",",
"}",
";",
"}",
";",
"export",
"const",
"getPercentileRanksMetricAgg",
"=",
"(",
"{",
"getFieldFormatsStart",
",",
"}",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"<",
"IPercentileRanksAggConfig",
">",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"PERCENTILE_RANKS",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentileRanksTitle'",
",",
"{",
"defaultMessage",
":",
"'Percentile Ranks'",
",",
"}",
")",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentileRanksLabel'",
",",
"{",
"defaultMessage",
":",
"'Percentile ranks of {field}'",
",",
"values",
":",
"{",
"field",
":",
"agg",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
"]",
",",
"}",
",",
"{",
"name",
":",
"'values'",
",",
"default",
":",
"[",
"]",
",",
"}",
",",
"{",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"output",
".",
"params",
".",
"keyed",
"=",
"false",
";",
"}",
",",
"}",
",",
"]",
",",
"getResponseAggs",
"(",
"agg",
")",
"{",
"const",
"ValueAggConfig",
"=",
"getResponseAggConfigClass",
"(",
"agg",
",",
"getValueProps",
"(",
"getFieldFormatsStart",
")",
")",
";",
"const",
"values",
"=",
"agg",
".",
"getParam",
"(",
"'values'",
")",
";",
"return",
"values",
".",
"map",
"(",
"(",
"value",
")",
"=>",
"new",
"ValueAggConfig",
"(",
"value",
")",
")",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'percent'",
",",
"}",
";",
"}",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"return",
"getPercentileValue",
"(",
"agg",
",",
"bucket",
")",
"/",
"100",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661156 | [
"export",
"function",
"ordinalSuffix",
"(",
"num",
")",
"{",
"return",
"num",
"+",
"''",
"+",
"suffix",
"(",
"num",
")",
";",
"}",
"function",
"suffix",
"(",
"num",
")",
"{",
"const",
"int",
"=",
"Math",
".",
"floor",
"(",
"parseFloat",
"(",
"num",
")",
")",
";",
"const",
"hunth",
"=",
"int",
"%",
"100",
";",
"if",
"(",
"hunth",
">=",
"11",
"&&",
"hunth",
"<=",
"13",
")",
"return",
"'th'",
";",
"const",
"tenth",
"=",
"int",
"%",
"10",
";",
"if",
"(",
"tenth",
"===",
"1",
")",
"return",
"'st'",
";",
"if",
"(",
"tenth",
"===",
"2",
")",
"return",
"'nd'",
";",
"if",
"(",
"tenth",
"===",
"3",
")",
"return",
"'rd'",
";",
"return",
"'th'",
";",
"}"
] | [
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661157 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"getResponseAggConfigClass",
",",
"IResponseAggConfig",
"}",
"from",
"'./lib/get_response_agg_config_class'",
";",
"import",
"{",
"getPercentileValue",
"}",
"from",
"'./percentiles_get_value'",
";",
"import",
"{",
"ordinalSuffix",
"}",
"from",
"'./lib/ordinal_suffix'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsPercentiles",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"percents",
"?",
":",
"number",
"[",
"]",
";",
"}",
"export",
"type",
"IPercentileAggConfig",
"=",
"IResponseAggConfig",
";",
"const",
"valueProps",
"=",
"{",
"makeLabel",
"(",
"this",
")",
"{",
"const",
"customLabel",
"=",
"this",
".",
"getParam",
"(",
"'customLabel'",
")",
";",
"const",
"label",
"=",
"customLabel",
"||",
"this",
".",
"getFieldDisplayName",
"(",
")",
";",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.valuePropsLabel'",
",",
"{",
"defaultMessage",
":",
"'{percentile} percentile of {label}'",
",",
"values",
":",
"{",
"percentile",
":",
"ordinalSuffix",
"(",
"this",
".",
"key",
")",
",",
"label",
"}",
",",
"}",
")",
";",
"}",
",",
"}",
";",
"export",
"const",
"getPercentilesMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"<",
"IPercentileAggConfig",
">",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"PERCENTILES",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentilesTitle'",
",",
"{",
"defaultMessage",
":",
"'Percentiles'",
",",
"}",
")",
",",
"makeLabel",
"(",
"agg",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentilesLabel'",
",",
"{",
"defaultMessage",
":",
"'Percentiles of {field}'",
",",
"values",
":",
"{",
"field",
":",
"agg",
".",
"getFieldDisplayName",
"(",
")",
"}",
",",
"}",
")",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
"]",
",",
"}",
",",
"{",
"name",
":",
"'percents'",
",",
"default",
":",
"[",
"1",
",",
"5",
",",
"25",
",",
"50",
",",
"75",
",",
"95",
",",
"99",
"]",
",",
"}",
",",
"{",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"output",
".",
"params",
".",
"keyed",
"=",
"false",
";",
"}",
",",
"}",
",",
"]",
",",
"getResponseAggs",
"(",
"agg",
")",
"{",
"const",
"ValueAggConfig",
"=",
"getResponseAggConfigClass",
"(",
"agg",
",",
"valueProps",
")",
";",
"return",
"agg",
".",
"getParam",
"(",
"'percents'",
")",
".",
"map",
"(",
"(",
"percent",
")",
"=>",
"new",
"ValueAggConfig",
"(",
"percent",
")",
")",
";",
"}",
",",
"getValue",
":",
"getPercentileValue",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
26107,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661158 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"parentPipelineAggHelper",
"}",
"from",
"'./lib/parent_pipeline_agg_helper'",
";",
"import",
"{",
"makeNestedLabel",
"}",
"from",
"'./lib/make_nested_label'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"AggConfigSerialized",
",",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsSerialDiff",
"extends",
"BaseAggParams",
"{",
"buckets_path",
":",
"string",
";",
"customMetric",
"?",
":",
"AggConfigSerialized",
";",
"metricAgg",
"?",
":",
"string",
";",
"}",
"const",
"serialDiffTitle",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serialDiffTitle'",
",",
"{",
"defaultMessage",
":",
"'Serial Diff'",
",",
"}",
")",
";",
"const",
"serialDiffLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serialDiffLabel'",
",",
"{",
"defaultMessage",
":",
"'serial diff'",
",",
"}",
")",
";",
"export",
"const",
"getSerialDiffMetricAgg",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"subtype",
",",
"params",
",",
"getSerializedFormat",
"}",
"=",
"parentPipelineAggHelper",
";",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SERIAL_DIFF",
",",
"title",
":",
"serialDiffTitle",
",",
"makeLabel",
":",
"(",
"agg",
")",
"=>",
"makeNestedLabel",
"(",
"agg",
",",
"serialDiffLabel",
")",
",",
"subtype",
",",
"params",
":",
"[",
"...",
"params",
"(",
")",
"]",
",",
"getSerializedFormat",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661159 | [
"import",
"_",
"from",
"'lodash'",
";",
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"IMetricAggConfig",
",",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"import",
"{",
"OSD_FIELD_TYPES",
"}",
"from",
"'../../../../common'",
";",
"import",
"{",
"BaseAggParams",
"}",
"from",
"'../types'",
";",
"export",
"interface",
"AggParamsTopHit",
"extends",
"BaseAggParams",
"{",
"field",
":",
"string",
";",
"aggregate",
":",
"'min'",
"|",
"'max'",
"|",
"'sum'",
"|",
"'average'",
"|",
"'concat'",
";",
"sortField",
"?",
":",
"string",
";",
"size",
"?",
":",
"number",
";",
"sortOrder",
"?",
":",
"'desc'",
"|",
"'asc'",
";",
"}",
"const",
"isNumericFieldSelected",
"=",
"(",
"agg",
")",
"=>",
"{",
"const",
"field",
"=",
"agg",
".",
"getParam",
"(",
"'field'",
")",
";",
"return",
"field",
"&&",
"field",
".",
"type",
"&&",
"field",
".",
"type",
"===",
"OSD_FIELD_TYPES",
".",
"NUMBER",
";",
"}",
";",
"export",
"const",
"getTopHitMetricAgg",
"=",
"(",
")",
"=>",
"{",
"return",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"TOP_HITS",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHitTitle'",
",",
"{",
"defaultMessage",
":",
"'Top Hit'",
",",
"}",
")",
",",
"makeLabel",
"(",
"aggConfig",
")",
"{",
"const",
"lastPrefixLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.lastPrefixLabel'",
",",
"{",
"defaultMessage",
":",
"'Last'",
",",
"}",
")",
";",
"const",
"firstPrefixLabel",
"=",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.firstPrefixLabel'",
",",
"{",
"defaultMessage",
":",
"'First'",
",",
"}",
")",
";",
"let",
"prefix",
"=",
"aggConfig",
".",
"getParam",
"(",
"'sortOrder'",
")",
".",
"value",
"===",
"'desc'",
"?",
"lastPrefixLabel",
":",
"firstPrefixLabel",
";",
"const",
"size",
"=",
"aggConfig",
".",
"getParam",
"(",
"'size'",
")",
";",
"if",
"(",
"size",
"!==",
"1",
")",
"{",
"prefix",
"+=",
"` ${",
"size",
"}`",
";",
"}",
"const",
"field",
"=",
"aggConfig",
".",
"getParam",
"(",
"'field'",
")",
";",
"return",
"`${",
"prefix",
"} ${",
"field",
"?",
"field",
".",
"displayName",
":",
"''",
"}`",
";",
"}",
",",
"params",
":",
"[",
"{",
"name",
":",
"'field'",
",",
"type",
":",
"'field'",
",",
"onlyAggregatable",
":",
"false",
",",
"filterFieldTypes",
":",
"Object",
".",
"values",
"(",
"OSD_FIELD_TYPES",
")",
".",
"filter",
"(",
"(",
"type",
")",
"=>",
"type",
"!==",
"OSD_FIELD_TYPES",
".",
"HISTOGRAM",
")",
",",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"const",
"field",
"=",
"agg",
".",
"getParam",
"(",
"'field'",
")",
";",
"output",
".",
"params",
"=",
"{",
"}",
";",
"if",
"(",
"field",
".",
"scripted",
")",
"{",
"output",
".",
"params",
".",
"script_fields",
"=",
"{",
"[",
"field",
".",
"name",
"]",
":",
"{",
"script",
":",
"{",
"source",
":",
"field",
".",
"script",
",",
"lang",
":",
"field",
".",
"lang",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
"else",
"{",
"if",
"(",
"field",
".",
"readFromDocValues",
")",
"{",
"output",
".",
"params",
".",
"docvalue_fields",
"=",
"[",
"{",
"field",
":",
"field",
".",
"name",
",",
"...",
"(",
"field",
".",
"type",
"===",
"OSD_FIELD_TYPES",
".",
"DATE",
"&&",
"{",
"format",
":",
"'date_time'",
"}",
")",
",",
"}",
",",
"]",
";",
"}",
"output",
".",
"params",
".",
"_source",
"=",
"field",
".",
"name",
"===",
"'_source'",
"?",
"true",
":",
"field",
".",
"name",
";",
"}",
"}",
",",
"}",
",",
"{",
"name",
":",
"'aggregate'",
",",
"type",
":",
"'optioned'",
",",
"options",
":",
"[",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.minLabel'",
",",
"{",
"defaultMessage",
":",
"'Min'",
",",
"}",
")",
",",
"isCompatible",
":",
"isNumericFieldSelected",
",",
"disabled",
":",
"true",
",",
"value",
":",
"'min'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.maxLabel'",
",",
"{",
"defaultMessage",
":",
"'Max'",
",",
"}",
")",
",",
"isCompatible",
":",
"isNumericFieldSelected",
",",
"disabled",
":",
"true",
",",
"value",
":",
"'max'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.sumLabel'",
",",
"{",
"defaultMessage",
":",
"'Sum'",
",",
"}",
")",
",",
"isCompatible",
":",
"isNumericFieldSelected",
",",
"disabled",
":",
"true",
",",
"value",
":",
"'sum'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.averageLabel'",
",",
"{",
"defaultMessage",
":",
"'Average'",
",",
"}",
")",
",",
"isCompatible",
":",
"isNumericFieldSelected",
",",
"disabled",
":",
"true",
",",
"value",
":",
"'average'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.concatenateLabel'",
",",
"{",
"defaultMessage",
":",
"'Concatenate'",
",",
"}",
")",
",",
"isCompatible",
"(",
"aggConfig",
")",
"{",
"return",
"_",
".",
"get",
"(",
"aggConfig",
".",
"params",
",",
"'field.filterFieldTypes'",
",",
"'*'",
")",
"===",
"'*'",
";",
"}",
",",
"disabled",
":",
"true",
",",
"value",
":",
"'concat'",
",",
"}",
",",
"]",
",",
"write",
":",
"_",
".",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'size'",
",",
"default",
":",
"1",
",",
"}",
",",
"{",
"name",
":",
"'sortField'",
",",
"type",
":",
"'field'",
",",
"filterFieldTypes",
":",
"[",
"OSD_FIELD_TYPES",
".",
"NUMBER",
",",
"OSD_FIELD_TYPES",
".",
"DATE",
",",
"OSD_FIELD_TYPES",
".",
"IP",
",",
"OSD_FIELD_TYPES",
".",
"STRING",
",",
"]",
",",
"default",
"(",
"agg",
")",
"{",
"return",
"agg",
".",
"getIndexPattern",
"(",
")",
".",
"timeFieldName",
";",
"}",
",",
"write",
":",
"_",
".",
"noop",
",",
"}",
",",
"{",
"name",
":",
"'sortOrder'",
",",
"type",
":",
"'optioned'",
",",
"default",
":",
"'desc'",
",",
"options",
":",
"[",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.descendingLabel'",
",",
"{",
"defaultMessage",
":",
"'Descending'",
",",
"}",
")",
",",
"value",
":",
"'desc'",
",",
"}",
",",
"{",
"text",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.topHit.ascendingLabel'",
",",
"{",
"defaultMessage",
":",
"'Ascending'",
",",
"}",
")",
",",
"value",
":",
"'asc'",
",",
"}",
",",
"]",
",",
"write",
"(",
"agg",
",",
"output",
")",
"{",
"const",
"sortField",
"=",
"agg",
".",
"params",
".",
"sortField",
";",
"const",
"sortOrder",
"=",
"agg",
".",
"params",
".",
"sortOrder",
";",
"if",
"(",
"sortField",
".",
"scripted",
")",
"{",
"output",
".",
"params",
".",
"sort",
"=",
"[",
"{",
"_script",
":",
"{",
"script",
":",
"{",
"source",
":",
"sortField",
".",
"script",
",",
"lang",
":",
"sortField",
".",
"lang",
",",
"}",
",",
"type",
":",
"sortField",
".",
"type",
",",
"order",
":",
"sortOrder",
".",
"value",
",",
"}",
",",
"}",
",",
"]",
";",
"}",
"else",
"{",
"output",
".",
"params",
".",
"sort",
"=",
"[",
"{",
"[",
"sortField",
".",
"name",
"]",
":",
"{",
"order",
":",
"sortOrder",
".",
"value",
",",
"}",
",",
"}",
",",
"]",
";",
"}",
"}",
",",
"}",
",",
"]",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"const",
"hits",
"=",
"_",
".",
"get",
"(",
"bucket",
",",
"`${",
"agg",
".",
"id",
"}.hits.hits`",
")",
";",
"if",
"(",
"!",
"hits",
"||",
"!",
"hits",
".",
"length",
")",
"{",
"return",
"null",
";",
"}",
"const",
"path",
"=",
"agg",
".",
"getParam",
"(",
"'field'",
")",
".",
"name",
";",
"let",
"values",
"=",
"_",
".",
"flatten",
"(",
"hits",
".",
"map",
"(",
"(",
"hit",
")",
"=>",
"path",
"===",
"'_source'",
"?",
"hit",
".",
"_source",
":",
"agg",
".",
"getIndexPattern",
"(",
")",
".",
"flattenHit",
"(",
"hit",
",",
"true",
")",
"[",
"path",
"]",
")",
")",
";",
"if",
"(",
"values",
".",
"length",
"===",
"1",
")",
"{",
"values",
"=",
"values",
"[",
"0",
"]",
";",
"}",
"if",
"(",
"Array",
".",
"isArray",
"(",
"values",
")",
")",
"{",
"if",
"(",
"!",
"_",
".",
"compact",
"(",
"values",
")",
".",
"length",
")",
"{",
"return",
"null",
";",
"}",
"const",
"aggregate",
"=",
"agg",
".",
"getParam",
"(",
"'aggregate'",
")",
";",
"switch",
"(",
"aggregate",
".",
"value",
")",
"{",
"case",
"'max'",
":",
"return",
"_",
".",
"max",
"(",
"values",
")",
";",
"case",
"'min'",
":",
"return",
"_",
".",
"min",
"(",
"values",
")",
";",
"case",
"'sum'",
":",
"return",
"_",
".",
"sum",
"(",
"values",
")",
";",
"case",
"'average'",
":",
"return",
"_",
".",
"sum",
"(",
"values",
")",
"/",
"values",
".",
"length",
";",
"}",
"}",
"return",
"values",
";",
"}",
",",
"}",
")",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3001,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
1921,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661160 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metric_agg_type'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metric_agg_types'",
";",
"export",
"const",
"getCountMetricAgg",
"=",
"(",
")",
"=>",
"new",
"MetricAggType",
"(",
"{",
"name",
":",
"METRIC_TYPES",
".",
"COUNT",
",",
"title",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.countTitle'",
",",
"{",
"defaultMessage",
":",
"'Count'",
",",
"}",
")",
",",
"hasNoDsl",
":",
"true",
",",
"json",
":",
"false",
",",
"makeLabel",
"(",
")",
"{",
"return",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.countLabel'",
",",
"{",
"defaultMessage",
":",
"'Count'",
",",
"}",
")",
";",
"}",
",",
"getSerializedFormat",
"(",
"agg",
")",
"{",
"return",
"{",
"id",
":",
"'number'",
",",
"}",
";",
"}",
",",
"getValue",
"(",
"agg",
",",
"bucket",
")",
"{",
"return",
"bucket",
".",
"doc_count",
";",
"}",
",",
"isScalable",
"(",
")",
"{",
"return",
"true",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1302,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661161 | [
"param",
"data",
"{",
"Object",
"}",
"param",
"key",
"{",
"string",
"}",
"internal",
"export",
"const",
"getParsedValue",
"=",
"(",
"data",
",",
"key",
")",
"=>",
"{",
"try",
"{",
"return",
"data",
"[",
"key",
"]",
"?",
"JSON",
".",
"parse",
"(",
"data",
"[",
"key",
"]",
")",
":",
"undefined",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"throw",
"new",
"Error",
"(",
"`Unable to parse ${",
"key",
"} argument string`",
")",
";",
"}",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661162 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggFilter'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"FILTER",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"geo_bounding_box",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggFilter",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.filter.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Filter agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"geo_bounding_box",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.geoBoundingBox.help'",
",",
"{",
"defaultMessage",
":",
"'Filter results based on a point location within a bounding box'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filter.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"FILTER",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"geo_bounding_box",
":",
"getParsedValue",
"(",
"args",
",",
"'geo_bounding_box'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661163 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggFilters'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"FILTERS",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"filters",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggFilters",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.filters.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Filter agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filters.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filters.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filters.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"filters",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filters.filters.help'",
",",
"{",
"defaultMessage",
":",
"'Filters to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.filters.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"FILTERS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"filters",
":",
"getParsedValue",
"(",
"args",
",",
"'filters'",
")",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661164 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggSignificantTerms'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"SIGNIFICANT_TERMS",
">",
";",
"type",
"Arguments",
"=",
"AggArgs",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggSignificantTerms",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.significantTerms.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Significant Terms agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"size",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.size.help'",
",",
"{",
"defaultMessage",
":",
"'Max number of buckets to retrieve'",
",",
"}",
")",
",",
"}",
",",
"exclude",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.exclude.help'",
",",
"{",
"defaultMessage",
":",
"'Specific bucket values to exclude from results'",
",",
"}",
")",
",",
"}",
",",
"include",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.include.help'",
",",
"{",
"defaultMessage",
":",
"'Specific bucket values to include in results'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.significantTerms.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"SIGNIFICANT_TERMS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661165 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggIpRange'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"IP_RANGE",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"ranges",
"?",
":",
"string",
";",
"ipRangeType",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggIpRange",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.ipRange.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Ip Range agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"ipRangeType",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"options",
":",
"[",
"'mask'",
",",
"'fromTo'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.ipRangeType.help'",
",",
"{",
"defaultMessage",
":",
"'IP range type to use for this aggregation. Takes one of the following values: mask, fromTo.'",
",",
"}",
")",
",",
"}",
",",
"ranges",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.ranges.help'",
",",
"{",
"defaultMessage",
":",
"'Serialized ranges to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.ipRange.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"IP_RANGE",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"ranges",
":",
"getParsedValue",
"(",
"args",
",",
"'ranges'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661166 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggDateRange'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"DATE_RANGE",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"ranges",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggDateRange",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.dateRange.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Date Range agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"ranges",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.ranges.help'",
",",
"{",
"defaultMessage",
":",
"'Serialized ranges to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"time_zone",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.timeZone.help'",
",",
"{",
"defaultMessage",
":",
"'Time zone to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to Elasticsearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateRange.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"DATE_RANGE",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"ranges",
":",
"getParsedValue",
"(",
"args",
",",
"'ranges'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661167 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggRange'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"RANGE",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"ranges",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggRange",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.range.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Range agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"ranges",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.ranges.help'",
",",
"{",
"defaultMessage",
":",
"'Serialized ranges to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.range.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"RANGE",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"ranges",
":",
"getParsedValue",
"(",
"args",
",",
"'ranges'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661168 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggGeoTile'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"GEOTILE_GRID",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggGeoTile",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.geoTile.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Geo Tile agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"useGeocentroid",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.useGeocentroid.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use geocentroid for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"precision",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.precision.help'",
",",
"{",
"defaultMessage",
":",
"'Precision to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoTile.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"GEOTILE_GRID",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661169 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggGeoHash'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"GEOHASH_GRID",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"boundingBox",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggGeoHash",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.geoHash.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Geo Hash agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"useGeocentroid",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.useGeocentroid.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use geocentroid for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"autoPrecision",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.autoPrecision.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use auto precision for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"isFilteredByCollar",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.isFilteredByCollar.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to filter by collar'",
",",
"}",
")",
",",
"}",
",",
"boundingBox",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.boundingBox.help'",
",",
"{",
"defaultMessage",
":",
"'Filter results based on a point location within a bounding box'",
",",
"}",
")",
",",
"}",
",",
"precision",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.precision.help'",
",",
"{",
"defaultMessage",
":",
"'Precision to use for this aggregation.'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.geoHash.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"GEOHASH_GRID",
",",
"params",
":",
"{",
"...",
"rest",
",",
"boundingBox",
":",
"getParsedValue",
"(",
"args",
",",
"'boundingBox'",
")",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661170 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggHistogram'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"HISTOGRAM",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"extended_bounds",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggHistogram",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.histogram.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Histogram agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"interval",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.interval.help'",
",",
"{",
"defaultMessage",
":",
"'Interval to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"intervalBase",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.intervalBase.help'",
",",
"{",
"defaultMessage",
":",
"'IntervalBase to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"min_doc_count",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.minDocCount.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use min_doc_count for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"maxBars",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.maxBars.help'",
",",
"{",
"defaultMessage",
":",
"'Calculate interval to get approximately this many bars'",
",",
"}",
")",
",",
"}",
",",
"has_extended_bounds",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.hasExtendedBounds.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use has_extended_bounds for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"extended_bounds",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.extendedBounds.help'",
",",
"{",
"defaultMessage",
":",
"'With extended_bounds setting, you now can \"force\" the histogram aggregation to start building buckets on a specific min value and also keep on building buckets up to a max value '",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.histogram.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"HISTOGRAM",
",",
"params",
":",
"{",
"...",
"rest",
",",
"extended_bounds",
":",
"getParsedValue",
"(",
"args",
",",
"'extended_bounds'",
")",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661171 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggDateHistogram'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"DATE_HISTOGRAM",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"timeRange",
"?",
":",
"string",
";",
"extended_bounds",
"?",
":",
"string",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggDateHistogram",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.dateHistogram.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Histogram agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"useNormalizedOpenSearchInterval",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.useNormalizedOpenSearchInterval.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use useNormalizedOpenSearchInterval for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"time_zone",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.timeZone.help'",
",",
"{",
"defaultMessage",
":",
"'Time zone to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"format",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.format.help'",
",",
"{",
"defaultMessage",
":",
"'Format to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"scaleMetricValues",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.scaleMetricValues.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use scaleMetricValues for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"interval",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.interval.help'",
",",
"{",
"defaultMessage",
":",
"'Interval to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"timeRange",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.timeRange.help'",
",",
"{",
"defaultMessage",
":",
"'Time Range to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"min_doc_count",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.minDocCount.help'",
",",
"{",
"defaultMessage",
":",
"'Minimum document count to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"drop_partials",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.dropPartials.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether to use drop_partials for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"extended_bounds",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.extendedBounds.help'",
",",
"{",
"defaultMessage",
":",
"'With extended_bounds setting, you now can \"force\" the histogram aggregation to start building buckets on a specific min value and also keep on building buckets up to a max value '",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.dateHistogram.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"DATE_HISTOGRAM",
",",
"params",
":",
"{",
"...",
"rest",
",",
"timeRange",
":",
"getParsedValue",
"(",
"args",
",",
"'timeRange'",
")",
",",
"extended_bounds",
":",
"getParsedValue",
"(",
"args",
",",
"'extended_bounds'",
")",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661172 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"BUCKET_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggTerms'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"BUCKET_TYPES",
".",
"TERMS",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"orderAgg",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggTerms",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.buckets.terms.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Terms agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"order",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"options",
":",
"[",
"'asc'",
",",
"'desc'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.order.help'",
",",
"{",
"defaultMessage",
":",
"'Order in which to return the results: asc or desc'",
",",
"}",
")",
",",
"}",
",",
"orderBy",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.orderBy.help'",
",",
"{",
"defaultMessage",
":",
"'Field to order results by'",
",",
"}",
")",
",",
"}",
",",
"orderAgg",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.orderAgg.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for ordering results'",
",",
"}",
")",
",",
"}",
",",
"size",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.size.help'",
",",
"{",
"defaultMessage",
":",
"'Max number of buckets to retrieve'",
",",
"}",
")",
",",
"}",
",",
"missingBucket",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.missingBucket.help'",
",",
"{",
"defaultMessage",
":",
"'When set to true, groups together any buckets with missing fields'",
",",
"}",
")",
",",
"}",
",",
"missingBucketLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.missingBucketLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Default label used in charts when documents are missing a field.'",
",",
"}",
")",
",",
"}",
",",
"otherBucket",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.otherBucket.help'",
",",
"{",
"defaultMessage",
":",
"'When set to true, groups together any buckets beyond the allowed size'",
",",
"}",
")",
",",
"}",
",",
"otherBucketLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.otherBucketLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Default label used in charts for documents in the Other bucket'",
",",
"}",
")",
",",
"}",
",",
"exclude",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.exclude.help'",
",",
"{",
"defaultMessage",
":",
"'Specific bucket values to exclude from results'",
",",
"}",
")",
",",
"}",
",",
"include",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.include.help'",
",",
"{",
"defaultMessage",
":",
"'Specific bucket values to include in results'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.buckets.terms.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"BUCKET_TYPES",
".",
"TERMS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"orderAgg",
":",
"args",
".",
"orderAgg",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661173 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggAvg'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"AVG",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggAvg",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.avg.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Avg agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.avg.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"AVG",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661174 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggBucketAvg'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"AVG_BUCKET",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customBucket",
"?",
":",
"AggExpressionType",
";",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggBucketAvg",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.bucket_avg.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Avg Bucket agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"customBucket",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.customBucket.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_avg.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"AVG_BUCKET",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customBucket",
":",
"args",
".",
"customBucket",
"?.",
"value",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661175 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggBucketMax'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MAX_BUCKET",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customBucket",
"?",
":",
"AggExpressionType",
";",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggBucketMax",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.bucket_max.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Max Bucket agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"customBucket",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.customBucket.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_max.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MAX_BUCKET",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customBucket",
":",
"args",
".",
"customBucket",
"?.",
"value",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661176 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggBucketMin'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MIN_BUCKET",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customBucket",
"?",
":",
"AggExpressionType",
";",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggBucketMin",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.bucket_min.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Min Bucket agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"customBucket",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.customBucket.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_min.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MIN_BUCKET",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customBucket",
":",
"args",
".",
"customBucket",
"?.",
"value",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661177 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggBucketSum'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"SUM_BUCKET",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customBucket",
"?",
":",
"AggExpressionType",
";",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggBucketSum",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.bucket_sum.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Sum Bucket agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"customBucket",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.customBucket.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building sibling pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.bucket_sum.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"SUM_BUCKET",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customBucket",
":",
"args",
".",
"customBucket",
"?.",
"value",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661178 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggCardinality'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"CARDINALITY",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggCardinality",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.cardinality.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Cardinality agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cardinality.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"CARDINALITY",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661179 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"const",
"fnName",
"=",
"'aggCount'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"COUNT",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggCount",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.count.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Count agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.count.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.count.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.count.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.count.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"COUNT",
",",
"params",
":",
"rest",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661180 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggCumulativeSum'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"CUMULATIVE_SUM",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggCumulativeSum",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.cumulative_sum.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Cumulative Sum agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"metricAgg",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.metricAgg.help'",
",",
"{",
"defaultMessage",
":",
"'Id for finding agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"buckets_path",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.buckets_path.help'",
",",
"{",
"defaultMessage",
":",
"'Path to the metric of interest'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.cumulative_sum.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"CUMULATIVE_SUM",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661181 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggDerivative'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"DERIVATIVE",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggDerivative",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.derivative.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Derivative agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"metricAgg",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.metricAgg.help'",
",",
"{",
"defaultMessage",
":",
"'Id for finding agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"buckets_path",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.buckets_path.help'",
",",
"{",
"defaultMessage",
":",
"'Path to the metric of interest'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"DERIVATIVE",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661182 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggGeoBounds'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"GEO_BOUNDS",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggGeoBounds",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.geo_bounds.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Geo Bounds agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_bounds.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"GEO_BOUNDS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661183 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggGeoCentroid'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"GEO_CENTROID",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggGeoCentroid",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.geo_centroid.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Geo Centroid agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.geo_centroid.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"GEO_CENTROID",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661184 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggMax'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MAX",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggMax",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.max.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Max agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.max.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MAX",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661185 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggMedian'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MEDIAN",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggMedian",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.median.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Median agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.median.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MEDIAN",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661186 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggMin'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MIN",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggMin",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.min.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Min agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.min.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MIN",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661187 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggMovingAvg'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"MOVING_FN",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggMovingAvg",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.moving_avg.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Moving Average agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"metricAgg",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.metricAgg.help'",
",",
"{",
"defaultMessage",
":",
"'Id for finding agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"window",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.window.help'",
",",
"{",
"defaultMessage",
":",
"'The size of window to \"slide\" across the histogram.'",
",",
"}",
")",
",",
"}",
",",
"buckets_path",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.derivative.buckets_path.help'",
",",
"{",
"defaultMessage",
":",
"'Path to the metric of interest'",
",",
"}",
")",
",",
"}",
",",
"script",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.script.help'",
",",
"{",
"defaultMessage",
":",
"'Id for finding agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.moving_avg.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"MOVING_FN",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661188 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggPercentileRanks'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"PERCENTILE_RANKS",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggPercentileRanks",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.percentile_ranks.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Percentile Ranks agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"values",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"multi",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.values.help'",
",",
"{",
"defaultMessage",
":",
"'Range of percentiles ranks'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentile_ranks.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"PERCENTILE_RANKS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661189 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggPercentiles'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"PERCENTILES",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggPercentiles",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.percentiles.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Percentiles agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"percents",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"multi",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.percents.help'",
",",
"{",
"defaultMessage",
":",
"'Range of percentiles ranks'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.percentiles.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"PERCENTILES",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661190 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggSerialDiff'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"SERIAL_DIFF",
">",
";",
"type",
"Arguments",
"=",
"Assign",
"<",
"AggArgs",
",",
"{",
"customMetric",
"?",
":",
"AggExpressionType",
";",
"}",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"Arguments",
",",
"Output",
">",
";",
"export",
"const",
"aggSerialDiff",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.serial_diff.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Serial Differencing agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"metricAgg",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.metricAgg.help'",
",",
"{",
"defaultMessage",
":",
"'Id for finding agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"customMetric",
":",
"{",
"types",
":",
"[",
"'agg_type'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.customMetric.help'",
",",
"{",
"defaultMessage",
":",
"'Agg config to use for building parent pipeline aggregations'",
",",
"}",
")",
",",
"}",
",",
"buckets_path",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.buckets_path.help'",
",",
"{",
"defaultMessage",
":",
"'Path to the metric of interest'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.serial_diff.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"SERIAL_DIFF",
",",
"params",
":",
"{",
"...",
"rest",
",",
"customMetric",
":",
"args",
".",
"customMetric",
"?.",
"value",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661191 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggStdDeviation'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"STD_DEV",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggStdDeviation",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.std_deviation.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Standard Deviation agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.std_deviation.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"STD_DEV",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661192 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggSum'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"SUM",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggSum",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.sum.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Sum agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.sum.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"SUM",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661193 | [
"import",
"{",
"i18n",
"}",
"from",
"'@osd/i18n'",
";",
"import",
"{",
"ExpressionFunctionDefinition",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"AggExpressionType",
",",
"AggExpressionFunctionArgs",
",",
"METRIC_TYPES",
"}",
"from",
"'../'",
";",
"import",
"{",
"getParsedValue",
"}",
"from",
"'../utils/get_parsed_value'",
";",
"const",
"fnName",
"=",
"'aggTopHit'",
";",
"type",
"Input",
"=",
"any",
";",
"type",
"AggArgs",
"=",
"AggExpressionFunctionArgs",
"<",
"typeof",
"METRIC_TYPES",
".",
"TOP_HITS",
">",
";",
"type",
"Output",
"=",
"AggExpressionType",
";",
"type",
"FunctionDefinition",
"=",
"ExpressionFunctionDefinition",
"<",
"typeof",
"fnName",
",",
"Input",
",",
"AggArgs",
",",
"Output",
">",
";",
"export",
"const",
"aggTopHit",
"=",
"(",
")",
":",
"FunctionDefinition",
"=>",
"(",
"{",
"name",
":",
"fnName",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.function.metrics.top_hit.help'",
",",
"{",
"defaultMessage",
":",
"'Generates a serialized agg config for a Top Hit agg'",
",",
"}",
")",
",",
"type",
":",
"'agg_type'",
",",
"args",
":",
"{",
"id",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.id.help'",
",",
"{",
"defaultMessage",
":",
"'ID for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"enabled",
":",
"{",
"types",
":",
"[",
"'boolean'",
"]",
",",
"default",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.enabled.help'",
",",
"{",
"defaultMessage",
":",
"'Specifies whether this aggregation should be enabled'",
",",
"}",
")",
",",
"}",
",",
"schema",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.schema.help'",
",",
"{",
"defaultMessage",
":",
"'Schema to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"field",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.field.help'",
",",
"{",
"defaultMessage",
":",
"'Field to use for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"aggregate",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"required",
":",
"true",
",",
"options",
":",
"[",
"'min'",
",",
"'max'",
",",
"'sum'",
",",
"'average'",
",",
"'concat'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.aggregate.help'",
",",
"{",
"defaultMessage",
":",
"'Aggregate type'",
",",
"}",
")",
",",
"}",
",",
"size",
":",
"{",
"types",
":",
"[",
"'number'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.size.help'",
",",
"{",
"defaultMessage",
":",
"'Max number of buckets to retrieve'",
",",
"}",
")",
",",
"}",
",",
"sortOrder",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"options",
":",
"[",
"'desc'",
",",
"'asc'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.sortOrder.help'",
",",
"{",
"defaultMessage",
":",
"'Order in which to return the results: asc or desc'",
",",
"}",
")",
",",
"}",
",",
"sortField",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.sortField.help'",
",",
"{",
"defaultMessage",
":",
"'Field to order results by'",
",",
"}",
")",
",",
"}",
",",
"json",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.json.help'",
",",
"{",
"defaultMessage",
":",
"'Advanced json to include when the agg is sent to OpenSearch'",
",",
"}",
")",
",",
"}",
",",
"customLabel",
":",
"{",
"types",
":",
"[",
"'string'",
"]",
",",
"help",
":",
"i18n",
".",
"translate",
"(",
"'data.search.aggs.metrics.top_hit.customLabel.help'",
",",
"{",
"defaultMessage",
":",
"'Represents a custom label for this aggregation'",
",",
"}",
")",
",",
"}",
",",
"}",
",",
"fn",
":",
"(",
"input",
",",
"args",
")",
"=>",
"{",
"const",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"...",
"rest",
"}",
"=",
"args",
";",
"return",
"{",
"type",
":",
"'agg_type'",
",",
"value",
":",
"{",
"id",
",",
"enabled",
",",
"schema",
",",
"type",
":",
"METRIC_TYPES",
".",
"TOP_HITS",
",",
"params",
":",
"{",
"...",
"rest",
",",
"json",
":",
"getParsedValue",
"(",
"args",
",",
"'json'",
")",
",",
"}",
",",
"}",
",",
"}",
";",
"}",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
636,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1900,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661194 | [
"import",
"{",
"FieldFormatsStartCommon",
"}",
"from",
"'../../field_formats'",
";",
"import",
"{",
"BUCKET_TYPES",
"}",
"from",
"'./buckets'",
";",
"import",
"{",
"METRIC_TYPES",
"}",
"from",
"'./metrics'",
";",
"import",
"{",
"getCountMetricAgg",
"}",
"from",
"'./metrics/count'",
";",
"import",
"{",
"getAvgMetricAgg",
"}",
"from",
"'./metrics/avg'",
";",
"import",
"{",
"getSumMetricAgg",
"}",
"from",
"'./metrics/sum'",
";",
"import",
"{",
"getMedianMetricAgg",
"}",
"from",
"'./metrics/median'",
";",
"import",
"{",
"getMinMetricAgg",
"}",
"from",
"'./metrics/min'",
";",
"import",
"{",
"getMaxMetricAgg",
"}",
"from",
"'./metrics/max'",
";",
"import",
"{",
"getTopHitMetricAgg",
"}",
"from",
"'./metrics/top_hit'",
";",
"import",
"{",
"getStdDeviationMetricAgg",
"}",
"from",
"'./metrics/std_deviation'",
";",
"import",
"{",
"getCardinalityMetricAgg",
"}",
"from",
"'./metrics/cardinality'",
";",
"import",
"{",
"getPercentilesMetricAgg",
"}",
"from",
"'./metrics/percentiles'",
";",
"import",
"{",
"getGeoBoundsMetricAgg",
"}",
"from",
"'./metrics/geo_bounds'",
";",
"import",
"{",
"getGeoCentroidMetricAgg",
"}",
"from",
"'./metrics/geo_centroid'",
";",
"import",
"{",
"getPercentileRanksMetricAgg",
"}",
"from",
"'./metrics/percentile_ranks'",
";",
"import",
"{",
"getDerivativeMetricAgg",
"}",
"from",
"'./metrics/derivative'",
";",
"import",
"{",
"getCumulativeSumMetricAgg",
"}",
"from",
"'./metrics/cumulative_sum'",
";",
"import",
"{",
"getMovingAvgMetricAgg",
"}",
"from",
"'./metrics/moving_avg'",
";",
"import",
"{",
"getSerialDiffMetricAgg",
"}",
"from",
"'./metrics/serial_diff'",
";",
"import",
"{",
"getDateHistogramBucketAgg",
",",
"CalculateBoundsFn",
"}",
"from",
"'./buckets/date_histogram'",
";",
"import",
"{",
"getHistogramBucketAgg",
"}",
"from",
"'./buckets/histogram'",
";",
"import",
"{",
"getRangeBucketAgg",
"}",
"from",
"'./buckets/range'",
";",
"import",
"{",
"getDateRangeBucketAgg",
"}",
"from",
"'./buckets/date_range'",
";",
"import",
"{",
"getIpRangeBucketAgg",
"}",
"from",
"'./buckets/ip_range'",
";",
"import",
"{",
"getTermsBucketAgg",
"}",
"from",
"'./buckets/terms'",
";",
"import",
"{",
"getFilterBucketAgg",
"}",
"from",
"'./buckets/filter'",
";",
"import",
"{",
"getFiltersBucketAgg",
"}",
"from",
"'./buckets/filters'",
";",
"import",
"{",
"getSignificantTermsBucketAgg",
"}",
"from",
"'./buckets/significant_terms'",
";",
"import",
"{",
"getGeoHashBucketAgg",
"}",
"from",
"'./buckets/geo_hash'",
";",
"import",
"{",
"getGeoTitleBucketAgg",
"}",
"from",
"'./buckets/geo_tile'",
";",
"import",
"{",
"getBucketSumMetricAgg",
"}",
"from",
"'./metrics/bucket_sum'",
";",
"import",
"{",
"getBucketAvgMetricAgg",
"}",
"from",
"'./metrics/bucket_avg'",
";",
"import",
"{",
"getBucketMinMetricAgg",
"}",
"from",
"'./metrics/bucket_min'",
";",
"import",
"{",
"getBucketMaxMetricAgg",
"}",
"from",
"'./metrics/bucket_max'",
";",
"internal",
"export",
"interface",
"AggTypesDependencies",
"{",
"calculateBounds",
":",
"CalculateBoundsFn",
";",
"getConfig",
":",
"<",
"T",
"=",
"any",
">",
"(",
"key",
":",
"string",
")",
"=>",
"T",
";",
"getFieldFormatsStart",
":",
"(",
")",
"=>",
"Pick",
"<",
"FieldFormatsStartCommon",
",",
"'deserialize'",
"|",
"'getDefaultInstance'",
">",
";",
"isDefaultTimezone",
":",
"(",
")",
"=>",
"boolean",
";",
"}",
"export",
"const",
"getAggTypes",
"=",
"(",
")",
"=>",
"(",
"{",
"metrics",
":",
"[",
"{",
"name",
":",
"METRIC_TYPES",
".",
"COUNT",
",",
"fn",
":",
"getCountMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"AVG",
",",
"fn",
":",
"getAvgMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SUM",
",",
"fn",
":",
"getSumMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MEDIAN",
",",
"fn",
":",
"getMedianMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MIN",
",",
"fn",
":",
"getMinMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MAX",
",",
"fn",
":",
"getMaxMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"STD_DEV",
",",
"fn",
":",
"getStdDeviationMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"CARDINALITY",
",",
"fn",
":",
"getCardinalityMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"PERCENTILES",
",",
"fn",
":",
"getPercentilesMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"PERCENTILE_RANKS",
",",
"fn",
":",
"getPercentileRanksMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"TOP_HITS",
",",
"fn",
":",
"getTopHitMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"DERIVATIVE",
",",
"fn",
":",
"getDerivativeMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"CUMULATIVE_SUM",
",",
"fn",
":",
"getCumulativeSumMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MOVING_FN",
",",
"fn",
":",
"getMovingAvgMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SERIAL_DIFF",
",",
"fn",
":",
"getSerialDiffMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"AVG_BUCKET",
",",
"fn",
":",
"getBucketAvgMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"SUM_BUCKET",
",",
"fn",
":",
"getBucketSumMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MIN_BUCKET",
",",
"fn",
":",
"getBucketMinMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"MAX_BUCKET",
",",
"fn",
":",
"getBucketMaxMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"GEO_BOUNDS",
",",
"fn",
":",
"getGeoBoundsMetricAgg",
"}",
",",
"{",
"name",
":",
"METRIC_TYPES",
".",
"GEO_CENTROID",
",",
"fn",
":",
"getGeoCentroidMetricAgg",
"}",
",",
"]",
",",
"buckets",
":",
"[",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"DATE_HISTOGRAM",
",",
"fn",
":",
"getDateHistogramBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"HISTOGRAM",
",",
"fn",
":",
"getHistogramBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"RANGE",
",",
"fn",
":",
"getRangeBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"DATE_RANGE",
",",
"fn",
":",
"getDateRangeBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"IP_RANGE",
",",
"fn",
":",
"getIpRangeBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"TERMS",
",",
"fn",
":",
"getTermsBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"FILTER",
",",
"fn",
":",
"getFilterBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"FILTERS",
",",
"fn",
":",
"getFiltersBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"SIGNIFICANT_TERMS",
",",
"fn",
":",
"getSignificantTermsBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"GEOHASH_GRID",
",",
"fn",
":",
"getGeoHashBucketAgg",
"}",
",",
"{",
"name",
":",
"BUCKET_TYPES",
".",
"GEOTILE_GRID",
",",
"fn",
":",
"getGeoTitleBucketAgg",
"}",
",",
"]",
",",
"}",
")",
";",
"/** Buckets: **/",
"import",
"{",
"aggFilter",
"}",
"from",
"'./buckets/filter_fn'",
";",
"import",
"{",
"aggFilters",
"}",
"from",
"'./buckets/filters_fn'",
";",
"import",
"{",
"aggSignificantTerms",
"}",
"from",
"'./buckets/significant_terms_fn'",
";",
"import",
"{",
"aggIpRange",
"}",
"from",
"'./buckets/ip_range_fn'",
";",
"import",
"{",
"aggDateRange",
"}",
"from",
"'./buckets/date_range_fn'",
";",
"import",
"{",
"aggRange",
"}",
"from",
"'./buckets/range_fn'",
";",
"import",
"{",
"aggGeoTile",
"}",
"from",
"'./buckets/geo_tile_fn'",
";",
"import",
"{",
"aggGeoHash",
"}",
"from",
"'./buckets/geo_hash_fn'",
";",
"import",
"{",
"aggHistogram",
"}",
"from",
"'./buckets/histogram_fn'",
";",
"import",
"{",
"aggDateHistogram",
"}",
"from",
"'./buckets/date_histogram_fn'",
";",
"import",
"{",
"aggTerms",
"}",
"from",
"'./buckets/terms_fn'",
";",
"/** Metrics: **/",
"import",
"{",
"aggAvg",
"}",
"from",
"'./metrics/avg_fn'",
";",
"import",
"{",
"aggBucketAvg",
"}",
"from",
"'./metrics/bucket_avg_fn'",
";",
"import",
"{",
"aggBucketMax",
"}",
"from",
"'./metrics/bucket_max_fn'",
";",
"import",
"{",
"aggBucketMin",
"}",
"from",
"'./metrics/bucket_min_fn'",
";",
"import",
"{",
"aggBucketSum",
"}",
"from",
"'./metrics/bucket_sum_fn'",
";",
"import",
"{",
"aggCardinality",
"}",
"from",
"'./metrics/cardinality_fn'",
";",
"import",
"{",
"aggCount",
"}",
"from",
"'./metrics/count_fn'",
";",
"import",
"{",
"aggCumulativeSum",
"}",
"from",
"'./metrics/cumulative_sum_fn'",
";",
"import",
"{",
"aggDerivative",
"}",
"from",
"'./metrics/derivative_fn'",
";",
"import",
"{",
"aggGeoBounds",
"}",
"from",
"'./metrics/geo_bounds_fn'",
";",
"import",
"{",
"aggGeoCentroid",
"}",
"from",
"'./metrics/geo_centroid_fn'",
";",
"import",
"{",
"aggMax",
"}",
"from",
"'./metrics/max_fn'",
";",
"import",
"{",
"aggMedian",
"}",
"from",
"'./metrics/median_fn'",
";",
"import",
"{",
"aggMin",
"}",
"from",
"'./metrics/min_fn'",
";",
"import",
"{",
"aggMovingAvg",
"}",
"from",
"'./metrics/moving_avg_fn'",
";",
"import",
"{",
"aggPercentileRanks",
"}",
"from",
"'./metrics/percentile_ranks_fn'",
";",
"import",
"{",
"aggPercentiles",
"}",
"from",
"'./metrics/percentiles_fn'",
";",
"import",
"{",
"aggSerialDiff",
"}",
"from",
"'./metrics/serial_diff_fn'",
";",
"import",
"{",
"aggStdDeviation",
"}",
"from",
"'./metrics/std_deviation_fn'",
";",
"import",
"{",
"aggSum",
"}",
"from",
"'./metrics/sum_fn'",
";",
"import",
"{",
"aggTopHit",
"}",
"from",
"'./metrics/top_hit_fn'",
";",
"export",
"const",
"getAggTypesFunctions",
"=",
"(",
")",
"=>",
"[",
"aggAvg",
",",
"aggBucketAvg",
",",
"aggBucketMax",
",",
"aggBucketMin",
",",
"aggBucketSum",
",",
"aggCardinality",
",",
"aggCount",
",",
"aggCumulativeSum",
",",
"aggDerivative",
",",
"aggGeoBounds",
",",
"aggGeoCentroid",
",",
"aggMax",
",",
"aggMedian",
",",
"aggMin",
",",
"aggMovingAvg",
",",
"aggPercentileRanks",
",",
"aggPercentiles",
",",
"aggSerialDiff",
",",
"aggStdDeviation",
",",
"aggSum",
",",
"aggTopHit",
",",
"aggFilter",
",",
"aggFilters",
",",
"aggSignificantTerms",
",",
"aggIpRange",
",",
"aggDateRange",
",",
"aggRange",
",",
"aggGeoTile",
",",
"aggGeoHash",
",",
"aggDateHistogram",
",",
"aggHistogram",
",",
"aggTerms",
",",
"]",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661195 | [
"import",
"{",
"BucketAggType",
"}",
"from",
"'./buckets/bucket_agg_type'",
";",
"import",
"{",
"MetricAggType",
"}",
"from",
"'./metrics/metric_agg_type'",
";",
"import",
"{",
"AggTypesDependencies",
"}",
"from",
"'./agg_types'",
";",
"export",
"type",
"AggTypesRegistrySetup",
"=",
"ReturnType",
"<",
"AggTypesRegistry",
"[",
"'setup'",
"]",
">",
";",
"internal",
"export",
"interface",
"AggTypesRegistryStart",
"{",
"get",
":",
"(",
"id",
":",
"string",
")",
"=>",
"BucketAggType",
"<",
"any",
">",
"|",
"MetricAggType",
"<",
"any",
">",
";",
"getAll",
":",
"(",
")",
"=>",
"{",
"buckets",
":",
"Array",
"<",
"BucketAggType",
"<",
"any",
">",
">",
";",
"metrics",
":",
"Array",
"<",
"MetricAggType",
"<",
"any",
">",
">",
";",
"}",
";",
"}",
"export",
"class",
"AggTypesRegistry",
"{",
"private",
"readonly",
"bucketAggs",
"=",
"new",
"Map",
"(",
")",
";",
"private",
"readonly",
"metricAggs",
"=",
"new",
"Map",
"(",
")",
";",
"setup",
"=",
"(",
")",
"=>",
"{",
"return",
"{",
"registerBucket",
":",
"<",
"N",
"extends",
"string",
",",
"T",
"extends",
"(",
"deps",
":",
"AggTypesDependencies",
")",
"=>",
"BucketAggType",
"<",
"any",
">",
">",
"(",
"name",
",",
"type",
")",
":",
"void",
"=>",
"{",
"if",
"(",
"this",
".",
"bucketAggs",
".",
"get",
"(",
"name",
")",
"||",
"this",
".",
"metricAggs",
".",
"get",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"`Agg has already been registered with name: ${",
"name",
"}`",
")",
";",
"}",
"this",
".",
"bucketAggs",
".",
"set",
"(",
"name",
",",
"type",
")",
";",
"}",
",",
"registerMetric",
":",
"<",
"N",
"extends",
"string",
",",
"T",
"extends",
"(",
"deps",
":",
"AggTypesDependencies",
")",
"=>",
"MetricAggType",
"<",
"any",
">",
">",
"(",
"name",
",",
"type",
")",
":",
"void",
"=>",
"{",
"if",
"(",
"this",
".",
"bucketAggs",
".",
"get",
"(",
"name",
")",
"||",
"this",
".",
"metricAggs",
".",
"get",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"`Agg has already been registered with name: ${",
"name",
"}`",
")",
";",
"}",
"this",
".",
"metricAggs",
".",
"set",
"(",
"name",
",",
"type",
")",
";",
"}",
",",
"}",
";",
"}",
";",
"start",
"=",
"(",
")",
"=>",
"{",
"return",
"{",
"get",
":",
"(",
"name",
")",
"=>",
"{",
"return",
"this",
".",
"bucketAggs",
".",
"get",
"(",
"name",
")",
"||",
"this",
".",
"metricAggs",
".",
"get",
"(",
"name",
")",
";",
"}",
",",
"getAll",
":",
"(",
")",
"=>",
"{",
"return",
"{",
"buckets",
":",
"Array",
".",
"from",
"(",
"this",
".",
"bucketAggs",
".",
"values",
"(",
")",
")",
",",
"metrics",
":",
"Array",
".",
"from",
"(",
"this",
".",
"metricAggs",
".",
"values",
"(",
")",
")",
",",
"}",
";",
"}",
",",
"}",
";",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
709,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
709,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661196 | [
"import",
"_",
"from",
"'lodash'",
";",
"import",
"{",
"Assign",
"}",
"from",
"'@osd/utility-types'",
";",
"import",
"{",
"ISearchOptions",
",",
"ISearchSource",
"}",
"from",
"'src/plugins/data/public'",
";",
"import",
"{",
"AggConfig",
",",
"AggConfigSerialized",
",",
"IAggConfig",
"}",
"from",
"'./agg_config'",
";",
"import",
"{",
"IAggType",
"}",
"from",
"'./agg_type'",
";",
"import",
"{",
"AggTypesRegistryStart",
"}",
"from",
"'./agg_types_registry'",
";",
"import",
"{",
"AggGroupNames",
"}",
"from",
"'./agg_groups'",
";",
"import",
"{",
"IndexPattern",
"}",
"from",
"'../../index_patterns/index_patterns/index_pattern'",
";",
"import",
"{",
"TimeRange",
"}",
"from",
"'../../../common'",
";",
"function",
"removeParentAggs",
"(",
"obj",
")",
"{",
"for",
"(",
"const",
"prop",
"in",
"obj",
")",
"{",
"if",
"(",
"prop",
"===",
"'parentAggs'",
")",
"delete",
"obj",
"[",
"prop",
"]",
";",
"else",
"if",
"(",
"typeof",
"obj",
"[",
"prop",
"]",
"===",
"'object'",
")",
"removeParentAggs",
"(",
"obj",
"[",
"prop",
"]",
")",
";",
"}",
"}",
"function",
"parseParentAggs",
"(",
"dslLvlCursor",
",",
"dsl",
")",
"{",
"if",
"(",
"dsl",
".",
"parentAggs",
")",
"{",
"_",
".",
"each",
"(",
"dsl",
".",
"parentAggs",
",",
"(",
"agg",
",",
"key",
")",
"=>",
"{",
"dslLvlCursor",
"[",
"key",
"as",
"string",
"]",
"=",
"agg",
";",
"parseParentAggs",
"(",
"dslLvlCursor",
",",
"agg",
")",
";",
"}",
")",
";",
"}",
"}",
"export",
"interface",
"AggConfigsOptions",
"{",
"typesRegistry",
":",
"AggTypesRegistryStart",
";",
"}",
"export",
"type",
"CreateAggConfigParams",
"=",
"Assign",
"<",
"AggConfigSerialized",
",",
"{",
"type",
":",
"string",
"|",
"IAggType",
";",
"}",
">",
";",
"name",
"description",
"internal",
"export",
"type",
"IAggConfigs",
"=",
"AggConfigs",
";",
"export",
"class",
"AggConfigs",
"{",
"public",
"indexPattern",
":",
"IndexPattern",
";",
"public",
"timeRange",
"?",
":",
"TimeRange",
";",
"private",
"readonly",
"typesRegistry",
":",
"AggTypesRegistryStart",
";",
"aggs",
":",
"IAggConfig",
"[",
"]",
";",
"constructor",
"(",
"indexPattern",
",",
"configStates",
"=",
"[",
"]",
",",
"opts",
")",
"{",
"this",
".",
"typesRegistry",
"=",
"opts",
".",
"typesRegistry",
";",
"configStates",
"=",
"AggConfig",
".",
"ensureIds",
"(",
"configStates",
")",
";",
"this",
".",
"aggs",
"=",
"[",
"]",
";",
"this",
".",
"indexPattern",
"=",
"indexPattern",
";",
"configStates",
".",
"forEach",
"(",
"(",
"params",
")",
"=>",
"this",
".",
"createAggConfig",
"(",
"params",
")",
")",
";",
"}",
"setTimeRange",
"(",
"timeRange",
")",
"{",
"this",
".",
"timeRange",
"=",
"timeRange",
";",
"const",
"updateAggTimeRange",
"=",
"(",
"agg",
")",
"=>",
"{",
"_",
".",
"each",
"(",
"agg",
".",
"params",
",",
"(",
"param",
")",
"=>",
"{",
"if",
"(",
"param",
"instanceof",
"AggConfig",
")",
"{",
"updateAggTimeRange",
"(",
"param",
")",
";",
"}",
"}",
")",
";",
"if",
"(",
"_",
".",
"get",
"(",
"agg",
",",
"'type.name'",
")",
"===",
"'date_histogram'",
")",
"{",
"agg",
".",
"params",
".",
"timeRange",
"=",
"timeRange",
";",
"}",
"}",
";",
"this",
".",
"aggs",
".",
"forEach",
"(",
"updateAggTimeRange",
")",
";",
"}",
"clone",
"(",
"{",
"enabledOnly",
"=",
"true",
"}",
"=",
"{",
"}",
")",
"{",
"const",
"filterAggs",
"=",
"(",
"agg",
")",
"=>",
"{",
"if",
"(",
"!",
"enabledOnly",
")",
"return",
"true",
";",
"return",
"agg",
".",
"enabled",
";",
"}",
";",
"const",
"aggConfigs",
"=",
"new",
"AggConfigs",
"(",
"this",
".",
"indexPattern",
",",
"this",
".",
"aggs",
".",
"filter",
"(",
"filterAggs",
")",
",",
"{",
"typesRegistry",
":",
"this",
".",
"typesRegistry",
",",
"}",
")",
";",
"return",
"aggConfigs",
";",
"}",
"createAggConfig",
"=",
"<",
"T",
"extends",
"AggConfig",
"=",
"AggConfig",
">",
"(",
"params",
",",
"{",
"addToAggConfigs",
"=",
"true",
"}",
"=",
"{",
"}",
")",
"=>",
"{",
"const",
"{",
"type",
"}",
"=",
"params",
";",
"let",
"aggConfig",
";",
"if",
"(",
"params",
"instanceof",
"AggConfig",
")",
"{",
"aggConfig",
"=",
"params",
";",
"params",
".",
"parent",
"=",
"this",
";",
"}",
"else",
"{",
"aggConfig",
"=",
"new",
"AggConfig",
"(",
"this",
",",
"{",
"...",
"params",
",",
"type",
":",
"typeof",
"type",
"===",
"'string'",
"?",
"this",
".",
"typesRegistry",
".",
"get",
"(",
"type",
")",
":",
"type",
",",
"}",
")",
";",
"}",
"if",
"(",
"addToAggConfigs",
")",
"{",
"this",
".",
"aggs",
".",
"push",
"(",
"aggConfig",
")",
";",
"}",
"return",
"aggConfig",
"as",
"T",
";",
"}",
";",
"param",
"aggConfigs",
"jsonDataEquals",
"(",
"aggConfigs",
")",
"{",
"if",
"(",
"aggConfigs",
".",
"length",
"!==",
"this",
".",
"aggs",
".",
"length",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"aggs",
".",
"length",
";",
"i",
"+=",
"1",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isEqual",
"(",
"aggConfigs",
"[",
"i",
"]",
".",
"toJSON",
"(",
")",
",",
"this",
".",
"aggs",
"[",
"i",
"]",
".",
"toJSON",
"(",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"toDsl",
"(",
"hierarchical",
"=",
"false",
")",
"{",
"const",
"dslTopLvl",
"=",
"{",
"}",
";",
"let",
"dslLvlCursor",
";",
"let",
"nestedMetrics",
";",
"if",
"(",
"hierarchical",
")",
"{",
"nestedMetrics",
"=",
"this",
".",
"aggs",
".",
"filter",
"(",
"function",
"(",
"agg",
")",
"{",
"return",
"agg",
".",
"type",
".",
"type",
"===",
"'metrics'",
"&&",
"agg",
".",
"type",
".",
"name",
"!==",
"'count'",
";",
"}",
")",
".",
"map",
"(",
"(",
"agg",
")",
"=>",
"{",
"return",
"{",
"config",
":",
"agg",
",",
"dsl",
":",
"agg",
".",
"toDsl",
"(",
"this",
")",
",",
"}",
";",
"}",
")",
";",
"}",
"this",
".",
"getRequestAggs",
"(",
")",
".",
"filter",
"(",
"(",
"config",
")",
"=>",
"!",
"config",
".",
"type",
".",
"hasNoDsl",
")",
".",
"forEach",
"(",
"(",
"config",
",",
"i",
",",
"list",
")",
"=>",
"{",
"if",
"(",
"!",
"dslLvlCursor",
")",
"{",
"dslLvlCursor",
"=",
"dslTopLvl",
";",
"}",
"else",
"{",
"const",
"prevConfig",
"=",
"list",
"[",
"i",
"-",
"1",
"]",
";",
"const",
"prevDsl",
"=",
"dslLvlCursor",
"[",
"prevConfig",
".",
"id",
"]",
";",
"dslLvlCursor",
"=",
"prevDsl",
".",
"aggs",
"||",
"dslLvlCursor",
";",
"}",
"const",
"dsl",
"=",
"(",
"dslLvlCursor",
"[",
"config",
".",
"id",
"]",
"=",
"config",
".",
"toDsl",
"(",
"this",
")",
")",
";",
"let",
"subAggs",
";",
"parseParentAggs",
"(",
"dslLvlCursor",
",",
"dsl",
")",
";",
"if",
"(",
"config",
".",
"type",
".",
"type",
"===",
"AggGroupNames",
".",
"Buckets",
"&&",
"i",
"<",
"list",
".",
"length",
"-",
"1",
")",
"{",
"subAggs",
"=",
"dsl",
".",
"aggs",
"||",
"(",
"dsl",
".",
"aggs",
"=",
"{",
"}",
")",
";",
"}",
"if",
"(",
"subAggs",
"&&",
"nestedMetrics",
")",
"{",
"nestedMetrics",
".",
"forEach",
"(",
"(",
"agg",
")",
"=>",
"{",
"subAggs",
"[",
"agg",
".",
"config",
".",
"id",
"]",
"=",
"agg",
".",
"dsl",
";",
"if",
"(",
"agg",
".",
"dsl",
".",
"parentAggs",
")",
"{",
"Object",
".",
"entries",
"(",
"agg",
".",
"dsl",
".",
"parentAggs",
")",
".",
"forEach",
"(",
"(",
"[",
"parentAggId",
",",
"parentAgg",
"]",
")",
"=>",
"{",
"subAggs",
"[",
"parentAggId",
"]",
"=",
"parentAgg",
";",
"}",
")",
";",
"}",
"}",
")",
";",
"}",
"}",
")",
";",
"removeParentAggs",
"(",
"dslTopLvl",
")",
";",
"return",
"dslTopLvl",
";",
"}",
"getAll",
"(",
")",
"{",
"return",
"[",
"...",
"this",
".",
"aggs",
"]",
";",
"}",
"byIndex",
"(",
"index",
")",
"{",
"return",
"this",
".",
"aggs",
"[",
"index",
"]",
";",
"}",
"byId",
"(",
"id",
")",
"{",
"return",
"this",
".",
"aggs",
".",
"find",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"id",
"===",
"id",
")",
";",
"}",
"byName",
"(",
"name",
")",
"{",
"return",
"this",
".",
"aggs",
".",
"filter",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"type",
"?.",
"name",
"===",
"name",
")",
";",
"}",
"byType",
"(",
"type",
")",
"{",
"return",
"this",
".",
"aggs",
".",
"filter",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"type",
"?.",
"type",
"===",
"type",
")",
";",
"}",
"byTypeName",
"(",
"type",
")",
"{",
"return",
"this",
".",
"byName",
"(",
"type",
")",
";",
"}",
"bySchemaName",
"(",
"schema",
")",
"{",
"return",
"this",
".",
"aggs",
".",
"filter",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"schema",
"===",
"schema",
")",
";",
"}",
"getRequestAggs",
"(",
")",
"{",
"const",
"aggregations",
"=",
"this",
".",
"aggs",
".",
"filter",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"enabled",
"&&",
"agg",
".",
"type",
")",
".",
"reduce",
"(",
"(",
"requestValuesAggs",
",",
"agg",
")",
"=>",
"{",
"const",
"aggs",
"=",
"agg",
".",
"getRequestAggs",
"(",
")",
";",
"return",
"aggs",
"?",
"requestValuesAggs",
".",
"concat",
"(",
"aggs",
")",
":",
"requestValuesAggs",
";",
"}",
",",
"[",
"]",
"as",
"AggConfig",
"[",
"]",
")",
";",
"return",
"_",
".",
"sortBy",
"(",
"aggregations",
",",
"(",
"agg",
")",
"=>",
"agg",
".",
"type",
".",
"type",
"===",
"AggGroupNames",
".",
"Metrics",
"?",
"1",
":",
"0",
")",
";",
"}",
"getRequestAggById",
"(",
"id",
")",
"{",
"return",
"this",
".",
"aggs",
".",
"find",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"id",
"===",
"id",
")",
";",
"}",
"return",
"{",
"array",
"[",
"AggConfig",
"]",
"}",
"getResponseAggs",
"(",
")",
"{",
"return",
"this",
".",
"getRequestAggs",
"(",
")",
".",
"reduce",
"(",
"function",
"(",
"responseValuesAggs",
",",
"agg",
")",
"{",
"const",
"aggs",
"=",
"agg",
".",
"getResponseAggs",
"(",
")",
";",
"return",
"aggs",
"?",
"responseValuesAggs",
".",
"concat",
"(",
"aggs",
")",
":",
"responseValuesAggs",
";",
"}",
",",
"[",
"]",
"as",
"AggConfig",
"[",
"]",
")",
";",
"}",
"param",
"{",
"string",
"}",
"id",
"return",
"{",
"AggConfig",
"}",
"getResponseAggById",
"(",
"id",
")",
"{",
"id",
"=",
"String",
"(",
"id",
")",
";",
"const",
"reqAgg",
"=",
"_",
".",
"find",
"(",
"this",
".",
"getRequestAggs",
"(",
")",
",",
"function",
"(",
"agg",
")",
"{",
"return",
"id",
".",
"substr",
"(",
"0",
",",
"String",
"(",
"agg",
".",
"id",
")",
".",
"length",
")",
"===",
"agg",
".",
"id",
";",
"}",
")",
";",
"if",
"(",
"!",
"reqAgg",
")",
"return",
";",
"return",
"_",
".",
"find",
"(",
"reqAgg",
".",
"getResponseAggs",
"(",
")",
",",
"{",
"id",
"}",
")",
";",
"}",
"onSearchRequestStart",
"(",
"searchSource",
",",
"options",
"?",
")",
"{",
"return",
"Promise",
".",
"all",
"(",
"this",
".",
"getRequestAggs",
"(",
")",
".",
"map",
"(",
"(",
"agg",
")",
"=>",
"agg",
".",
"onSearchRequestStart",
"(",
"searchSource",
",",
"options",
")",
")",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
584,
null,
5,
null,
null,
null,
null,
26108,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
1285,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9190,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9190,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26109,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
8,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
3,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
530,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
530,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
3208,
null,
1488,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661197 | [
"import",
"{",
"ISearchOptions",
",",
"ISearchSource",
"}",
"from",
"'src/plugins/data/public'",
";",
"import",
"{",
"ExpressionAstFunction",
"}",
"from",
"'src/plugins/expressions/common'",
";",
"import",
"{",
"IAggConfigs",
"}",
"from",
"'../agg_configs'",
";",
"import",
"{",
"IAggConfig",
"}",
"from",
"'../agg_config'",
";",
"export",
"class",
"BaseParamType",
"<",
"TAggConfig",
"extends",
"IAggConfig",
"=",
"IAggConfig",
">",
"{",
"name",
":",
"string",
";",
"type",
":",
"string",
";",
"displayName",
":",
"string",
";",
"required",
":",
"boolean",
";",
"advanced",
":",
"boolean",
";",
"default",
":",
"any",
";",
"write",
":",
"(",
"aggConfig",
":",
"TAggConfig",
",",
"output",
":",
"Record",
"<",
"string",
",",
"any",
">",
",",
"aggConfigs",
"?",
":",
"IAggConfigs",
",",
"locals",
"?",
":",
"Record",
"<",
"string",
",",
"any",
">",
")",
"=>",
"void",
";",
"serialize",
":",
"(",
"value",
":",
"any",
",",
"aggConfig",
"?",
":",
"TAggConfig",
")",
"=>",
"any",
";",
"deserialize",
":",
"(",
"value",
":",
"any",
",",
"aggConfig",
"?",
":",
"TAggConfig",
")",
"=>",
"any",
";",
"toExpressionAst",
"?",
":",
"(",
"value",
":",
"any",
")",
"=>",
"ExpressionAstFunction",
"|",
"undefined",
";",
"options",
":",
"any",
"[",
"]",
";",
"valueType",
"?",
":",
"any",
";",
"onChange",
"?",
"(",
"agg",
")",
";",
"shouldShow",
"?",
"(",
"agg",
")",
";",
"param",
"{",
"AggConfig",
"}",
"aggConfig",
"param",
"{",
"Courier",
".",
"SearchSource",
"}",
"searchSource",
"returns",
"{",
"Promise",
"<",
"undefined",
">",
"|",
"undefined",
"}",
"modifyAggConfigOnSearchRequestStart",
":",
"(",
"aggConfig",
":",
"TAggConfig",
",",
"searchSource",
"?",
":",
"ISearchSource",
",",
"options",
"?",
":",
"ISearchOptions",
")",
"=>",
"void",
";",
"constructor",
"(",
"config",
")",
"{",
"this",
".",
"name",
"=",
"config",
".",
"name",
";",
"this",
".",
"type",
"=",
"config",
".",
"type",
";",
"this",
".",
"displayName",
"=",
"config",
".",
"displayName",
"||",
"this",
".",
"name",
";",
"this",
".",
"required",
"=",
"config",
".",
"required",
"===",
"true",
";",
"this",
".",
"advanced",
"=",
"config",
".",
"advanced",
"||",
"false",
";",
"this",
".",
"onChange",
"=",
"config",
".",
"onChange",
";",
"this",
".",
"shouldShow",
"=",
"config",
".",
"shouldShow",
";",
"this",
".",
"default",
"=",
"config",
".",
"default",
";",
"const",
"defaultWrite",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"if",
"(",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
"||",
"this",
".",
"default",
";",
"}",
"}",
";",
"this",
".",
"write",
"=",
"config",
".",
"write",
"||",
"defaultWrite",
";",
"this",
".",
"serialize",
"=",
"config",
".",
"serialize",
";",
"this",
".",
"deserialize",
"=",
"config",
".",
"deserialize",
";",
"this",
".",
"toExpressionAst",
"=",
"config",
".",
"toExpressionAst",
";",
"this",
".",
"options",
"=",
"config",
".",
"options",
";",
"this",
".",
"modifyAggConfigOnSearchRequestStart",
"=",
"config",
".",
"modifyAggConfigOnSearchRequestStart",
"||",
"function",
"(",
")",
"{",
"}",
";",
"this",
".",
"valueType",
"=",
"config",
".",
"valueType",
"||",
"config",
".",
"type",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
2433,
null,
null,
8,
null,
null,
2433,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
2433,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661198 | [
"import",
"{",
"AggConfig",
",",
"IAggConfig",
",",
"AggConfigSerialized",
"}",
"from",
"'../agg_config'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./base'",
";",
"export",
"class",
"AggParamType",
"<",
"TAggConfig",
"extends",
"IAggConfig",
"=",
"IAggConfig",
">",
"extends",
"BaseParamType",
"<",
"TAggConfig",
">",
"{",
"makeAgg",
":",
"(",
"agg",
":",
"TAggConfig",
",",
"state",
"?",
":",
"AggConfigSerialized",
")",
"=>",
"TAggConfig",
";",
"allowedAggs",
":",
"string",
"[",
"]",
"=",
"[",
"]",
";",
"constructor",
"(",
"config",
")",
"{",
"super",
"(",
"config",
")",
";",
"if",
"(",
"config",
".",
"allowedAggs",
")",
"{",
"this",
".",
"allowedAggs",
"=",
"config",
".",
"allowedAggs",
";",
"}",
"if",
"(",
"!",
"config",
".",
"write",
")",
"{",
"this",
".",
"write",
"=",
"(",
"aggConfig",
",",
"output",
")",
"=>",
"{",
"if",
"(",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
"&&",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
".",
"length",
")",
"{",
"output",
".",
"params",
"[",
"this",
".",
"name",
"]",
"=",
"aggConfig",
".",
"params",
"[",
"this",
".",
"name",
"]",
";",
"}",
"}",
";",
"}",
"if",
"(",
"!",
"config",
".",
"serialize",
")",
"{",
"this",
".",
"serialize",
"=",
"(",
"agg",
")",
"=>",
"{",
"return",
"agg",
".",
"serialize",
"(",
")",
";",
"}",
";",
"}",
"if",
"(",
"!",
"config",
".",
"deserialize",
")",
"{",
"this",
".",
"deserialize",
"=",
"(",
"state",
",",
"agg",
"?",
")",
":",
"TAggConfig",
"=>",
"{",
"if",
"(",
"!",
"agg",
")",
"{",
"throw",
"new",
"Error",
"(",
"'aggConfig was not provided to AggParamType deserialize function'",
")",
";",
"}",
"return",
"this",
".",
"makeAgg",
"(",
"agg",
",",
"state",
")",
";",
"}",
";",
"}",
"if",
"(",
"!",
"config",
".",
"toExpressionAst",
")",
"{",
"this",
".",
"toExpressionAst",
"=",
"(",
"agg",
")",
"=>",
"{",
"if",
"(",
"!",
"agg",
"||",
"!",
"agg",
".",
"toExpressionAst",
")",
"{",
"throw",
"new",
"Error",
"(",
"'aggConfig was not provided to AggParamType toExpressionAst function'",
")",
";",
"}",
"return",
"agg",
".",
"toExpressionAst",
"(",
")",
";",
"}",
";",
"}",
"this",
".",
"makeAgg",
"=",
"config",
".",
"makeAgg",
";",
"this",
".",
"valueType",
"=",
"AggConfig",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2433,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2433,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8958,
null,
2433,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2433,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661199 | [
"import",
"{",
"AggParamType",
"}",
"from",
"'./param_types/agg'",
";",
"import",
"{",
"FieldParamType",
"}",
"from",
"'./param_types/field'",
";",
"import",
"{",
"OptionedParamType",
"}",
"from",
"'./param_types/optioned'",
";",
"import",
"{",
"StringParamType",
"}",
"from",
"'./param_types/string'",
";",
"import",
"{",
"JsonParamType",
"}",
"from",
"'./param_types/json'",
";",
"import",
"{",
"BaseParamType",
"}",
"from",
"'./param_types/base'",
";",
"import",
"{",
"AggConfig",
"}",
"from",
"'./agg_config'",
";",
"import",
"{",
"IAggConfigs",
"}",
"from",
"'./agg_configs'",
";",
"const",
"paramTypeMap",
"=",
"{",
"field",
":",
"FieldParamType",
",",
"optioned",
":",
"OptionedParamType",
",",
"string",
":",
"StringParamType",
",",
"json",
":",
"JsonParamType",
",",
"agg",
":",
"AggParamType",
",",
"_default",
":",
"BaseParamType",
",",
"}",
"as",
"Record",
"<",
"string",
",",
"any",
">",
";",
"export",
"type",
"AggParam",
"=",
"BaseParamType",
";",
"export",
"interface",
"AggParamOption",
"{",
"val",
":",
"string",
";",
"display",
":",
"string",
";",
"enabled",
"?",
"(",
"agg",
")",
":",
"boolean",
";",
"}",
"export",
"const",
"initParams",
"=",
"<",
"TAggParam",
"extends",
"AggParamType",
"=",
"AggParamType",
">",
"(",
"params",
")",
":",
"TAggParam",
"[",
"]",
"=>",
"params",
".",
"map",
"(",
"(",
"config",
")",
"=>",
"{",
"const",
"Class",
"=",
"paramTypeMap",
"[",
"config",
".",
"type",
"]",
"||",
"paramTypeMap",
".",
"_default",
";",
"return",
"new",
"Class",
"(",
"config",
")",
";",
"}",
")",
"as",
"TAggParam",
"[",
"]",
";",
"method",
"param",
"{",
"AggConfig",
"}",
"aggConfig",
"param",
"{",
"object",
"}",
"locals",
"return",
"{",
"object",
"}",
"export",
"const",
"writeParams",
"=",
"<",
"TAggConfig",
"extends",
"AggConfig",
"=",
"AggConfig",
",",
"TAggParam",
"extends",
"AggParamType",
"<",
"TAggConfig",
">",
"=",
"AggParamType",
"<",
"TAggConfig",
">",
">",
"(",
"params",
"=",
"[",
"]",
",",
"aggConfig",
",",
"aggs",
"?",
",",
"locals",
"?",
")",
"=>",
"{",
"const",
"output",
"=",
"{",
"params",
":",
"{",
"}",
"as",
"Record",
"<",
"string",
",",
"any",
">",
",",
"}",
";",
"locals",
"=",
"locals",
"||",
"{",
"}",
";",
"params",
".",
"forEach",
"(",
"(",
"param",
")",
"=>",
"{",
"if",
"(",
"param",
".",
"write",
")",
"{",
"param",
".",
"write",
"(",
"aggConfig",
",",
"output",
",",
"aggs",
",",
"locals",
")",
";",
"}",
"else",
"{",
"if",
"(",
"param",
"&&",
"param",
".",
"name",
")",
"{",
"output",
".",
"params",
"[",
"param",
".",
"name",
"]",
"=",
"aggConfig",
".",
"params",
"[",
"param",
".",
"name",
"]",
";",
"}",
"}",
"}",
")",
";",
"return",
"output",
";",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
530,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
26110,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13,
null,
null,
null,
null,
2433,
null,
2050,
null,
null,
17,
null,
null,
null,
null,
null,
17,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
20,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |