1(function(modules){function webpackJsonpCallback(data){var chunkIds=data[0];var moreModules=data[1];var moduleId,chunkId,i=0,resolves=[];for(;i<chunkIds.length;i++){chunkId=chunkIds[i];if(Object.prototype.hasOwnProperty.call(installedChunks,chunkId)&&installedChunks[chunkId]){resolves.push(installedChunks[chunkId][0])}installedChunks[chunkId]=0}for(moduleId in moreModules){if(Object.prototype.hasOwnProperty.call(moreModules,moduleId)){modules[moduleId]=moreModules[moduleId]}}if(parentJsonpFunction)parentJsonpFunction(data);while(resolves.length){resolves.shift()()}}var installedModules={};var installedChunks={2:0};function jsonpScriptSrc(chunkId){return __webpack_require__.p+"indexManagementDashboards.chunk."+chunkId+".js"}function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.e=function requireEnsure(chunkId){var promises=[];var installedChunkData=installedChunks[chunkId];if(installedChunkData!==0){if(installedChunkData){promises.push(installedChunkData[2])}else{var promise=new Promise((function(resolve,reject){installedChunkData=installedChunks[chunkId]=[resolve,reject]}));promises.push(installedChunkData[2]=promise);var script=document.createElement("script");var onScriptComplete;script.charset="utf-8";script.timeout=120;if(__webpack_require__.nc){script.setAttribute("nonce",__webpack_require__.nc)}script.src=jsonpScriptSrc(chunkId);var error=new Error;onScriptComplete=function(event){script.onerror=script.onload=null;clearTimeout(timeout);var chunk=installedChunks[chunkId];if(chunk!==0){if(chunk){var errorType=event&&(event.type==="load"?"missing":event.type);var realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")";error.name="ChunkLoadError";error.type=errorType;error.request=realSrc;chunk[1](error)}installedChunks[chunkId]=undefined}};var timeout=setTimeout((function(){onScriptComplete({type:"timeout",target:script})}),12e4);script.onerror=script.onload=onScriptComplete;document.head.appendChild(script)}}return Promise.all(promises)};__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__webpack_require__.r=function(exports){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if(mode&4&&typeof value==="object"&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,"default",{enumerable:true,value:value});if(mode&2&&typeof value!="string")for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";__webpack_require__.oe=function(err){console.error(err);throw err};var jsonpArray=window["indexManagementDashboards_bundle_jsonpfunction"]=window["indexManagementDashboards_bundle_jsonpfunction"]||[];var oldJsonpFunction=jsonpArray.push.bind(jsonpArray);jsonpArray.push=webpackJsonpCallback;jsonpArray=jsonpArray.slice();for(var i=0;i<jsonpArray.length;i++)webpackJsonpCallback(jsonpArray[i]);var parentJsonpFunction=oldJsonpFunction;return __webpack_require__(__webpack_require__.s=172)})([function(module,exports){module.exports=__osdSharedDeps__.React},function(module,exports){module.exports=__osdSharedDeps__.ElasticEui},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"y",(function(){return PLUGIN_NAME}));__webpack_require__.d(__webpack_exports__,"i",(function(){return DEFAULT_EMPTY_DATA}));__webpack_require__.d(__webpack_exports__,"j",(function(){return DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"z",(function(){return POLICY_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"a",(function(){return ACTIONS_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"H",(function(){return STATES_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"k",(function(){return ERROR_NOTIFICATION_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"M",(function(){return TRANSITION_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"v",(function(){return INDEX_SETTINGS_U
1RL}));__webpack_require__.d(__webpack_exports__,"G",(function(){return SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"g",(function(){return CRON_EXPRESSION_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"C",(function(){return RESTORE_SNAPSHOT_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"B",(function(){return REPOSITORY_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"l",(function(){return FS_REPOSITORY_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"E",(function(){return S3_REPOSITORY_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"F",(function(){return SHRINK_DOCUMENTATION_URL}));__webpack_require__.d(__webpack_exports__,"D",(function(){return ROUTES}));__webpack_require__.d(__webpack_exports__,"f",(function(){return BREADCRUMBS}));__webpack_require__.d(__webpack_exports__,"I",(function(){return SortDirection}));__webpack_require__.d(__webpack_exports__,"m",(function(){return FixedTimeunitOptions}));__webpack_require__.d(__webpack_exports__,"h",(function(){return CalendarTimeunitOptions}));__webpack_require__.d(__webpack_exports__,"x",(function(){return IntervalType}));__webpack_require__.d(__webpack_exports__,"N",(function(){return browseIndicesCols}));__webpack_require__.d(__webpack_exports__,"O",(function(){return restoreIndicesCols}));__webpack_require__.d(__webpack_exports__,"o",(function(){return INDEX_IMPORT_SETTINGS}));__webpack_require__.d(__webpack_exports__,"n",(function(){return INDEX_DYNAMIC_SETTINGS}));__webpack_require__.d(__webpack_exports__,"p",(function(){return INDEX_MAPPING_TYPES}));__webpack_require__.d(__webpack_exports__,"w",(function(){return IndicesUpdateMode}));__webpack_require__.d(__webpack_exports__,"q",(function(){return INDEX_MAPPING_TYPES_WITH_CHILDREN}));__webpack_require__.d(__webpack_exports__,"e",(function(){return ALIAS_STATUS_OPTIONS}));__webpack_require__.d(__webpack_exports__,"r",(function(){return INDEX_NAMING_MESSAGE}));__webpack_require__.d(__webpack_exports__,"J",(function(){return TEMPLATE_NAMING_MESSAGE}));__webpack_require__.d(__webpack_exports__,"A",(function(){return REPLICA_NUMBER_MESSAGE}));__webpack_require__.d(__webpack_exports__,"L",(function(){return TEMPLATE_TYPE}));__webpack_require__.d(__webpack_exports__,"s",(function(){return INDEX_NAMING_PATTERN}));__webpack_require__.d(__webpack_exports__,"K",(function(){return TEMPLATE_NAMING_PATTERN}));__webpack_require__.d(__webpack_exports__,"b",(function(){return ALIAS_NAMING_MESSAGE}));__webpack_require__.d(__webpack_exports__,"c",(function(){return ALIAS_NAMING_PATTERN}));__webpack_require__.d(__webpack_exports__,"d",(function(){return ALIAS_SELECT_RULE}));__webpack_require__.d(__webpack_exports__,"t",(function(){return INDEX_OP_BLOCKS_TYPE}));__webpack_require__.d(__webpack_exports__,"u",(function(){return INDEX_OP_TARGET_TYPE}));const PLUGIN_NAME="opensearch_index_management_dashboards";const DEFAULT_EMPTY_DATA="-";const DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/index/";const POLICY_DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/policies/";const ACTIONS_DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/policies/#actions";const STATES_DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/policies/#states";const ERROR_NOTIFICATION_DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/policies/#error-notifications";const TRANSITION_DOCUMENTATION_URL="https://opensearch.org/docs/im-plugin/ism/policies/#transitions";const INDEX_SETTINGS_URL="https://opensearch.org/docs/latest/api-reference/index-apis/create-index#index-settings";const SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL="https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-management/";const CRON_EXPRESSION_DOCUMENTATION_URL="https://opensearch.org/docs/latest/monitoring-plugins/alerting/cron/";const RESTORE_SNAPSHOT_DOCUMENTATION_URL="https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/#restore-snapshots";const REPOSITORY_DOCUMENTATION_URL="https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/#register-repository";const FS_REPOSITORY_DOCUMENTATION_URL="https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/#shared-file-system";const S3_REPOSITORY_DOCUMENTATION_URL="https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/#amazon-s3";const SHRINK_DOCUMENTATION_URL="https://opensearch.org/docs/latest/api-reference/index-apis/shrink-index";
1const ROUTES=Object.freeze({CHANGE_POLICY:"/change-policy",CREATE_POLICY:"/create-policy",EDIT_POLICY:"/edit-policy",MANAGED_INDICES:"/managed-indices",INDEX_POLICIES:"/index-policies",POLICY_DETAILS:"/policy-details",INDICES:"/indices",ROLLUPS:"/rollups",CREATE_ROLLUP:"/create-rollup",EDIT_ROLLUP:"/edit-rollup",ROLLUP_DETAILS:"/rollup-details",TRANSFORMS:"/transforms",CREATE_TRANSFORM:"/create-transform",EDIT_TRANSFORM:"/edit-transform",TRANSFORM_DETAILS:"/transform-details",SNAPSHOT_POLICIES:"/snapshot-policies",SNAPSHOT_POLICY_DETAILS:"/snapshot-policy-details",CREATE_SNAPSHOT_POLICY:"/create-snapshot-policy",EDIT_SNAPSHOT_POLICY:"/edit-snapshot-policy",SNAPSHOTS:"/snapshots",CREATE_SNAPSHOT:"/create-snapshot",EDIT_SNAPSHOT:"/edit-snapshot",REPOSITORIES:"/repositories",CREATE_REPOSITORY:"/create-repository",EDIT_REPOSITORY:"/edit-repository",CREATE_INDEX:"/create-index",INDEX_DETAIL:"/index-detail",REINDEX:"/reindex",ALIASES:"/aliases",TEMPLATES:"/templates",CREATE_TEMPLATE:"/create-template",SPLIT_INDEX:"/split-index",SHRINK_INDEX:"/shrink-index",ROLLOVER:"/rollover",DATA_STREAMS:"/data-streams",CREATE_DATA_STREAM:"/create-data-stream",FORCE_MERGE:"/force-merge",NOTIFICATIONS:"/notifications",COMPOSABLE_TEMPLATES:"/composable-templates",CREATE_COMPOSABLE_TEMPLATE:"/create-composable-template"});const BREADCRUMBS=Object.freeze({INDEX_MANAGEMENT:{text:"Index Management",href:"#/"},INDICES:{text:"Indexes",href:`#${ROUTES.INDICES}`},INDEX_POLICIES:{text:"State management policies",href:`#${ROUTES.INDEX_POLICIES}`},INDEX_POLICIES_NEW:{text:"Index state management policies",href:`#${ROUTES.INDEX_POLICIES}`},MANAGED_INDICES:{text:"Policy managed indexes",href:`#${ROUTES.MANAGED_INDICES}`},EDIT_POLICY:{text:"Edit policy"},CREATE_POLICY:{text:"Create policy"},CREATE_POLICY_NEW:{text:"Create index state management policy"},CHANGE_POLICY:{text:"Change policy"},POLICY_DETAILS:{text:"Policy details"},ROLLUPS:{text:"Rollup jobs",href:`#${ROUTES.ROLLUPS}`},CREATE_ROLLUP:{text:"Create rollup job"},EDIT_ROLLUP:{text:"Edit rollup job"},ROLLUP_DETAILS:{text:"Rollup details"},TRANSFORMS:{text:"Transform jobs",href:`#${ROUTES.TRANSFORMS}`},CREATE_TRANSFORM:{text:"Create transform job"},EDIT_TRANSFORM:{text:"Edit transform job"},TRANSFORM_DETAILS:{text:"Transform details"},SNAPSHOT_MANAGEMENT:{text:"Snapshot Management",href:`#${ROUTES.SNAPSHOT_POLICIES}`},SNAPSHOT_POLICIES:{text:"Snapshot policies",href:`#${ROUTES.SNAPSHOT_POLICIES}`},SNAPSHOT_POLICY_DETAILS:{text:"Snapshot policy details"},CREATE_SNAPSHOT_POLICY:{text:"Create snapshot policy"},EDIT_SNAPSHOT_POLICY:{text:"Edit snapshot policy"},SNAPSHOTS:{text:"Snapshots",href:`#${ROUTES.SNAPSHOTS}`},INDEX_SNAPSHOTS:{text:"Index snapshots",href:`#${ROUTES.SNAPSHOTS}`},SNAPSHOT_RESTORE:{text:"Restore activities in progress"},INDEX_SNAPSHOT_RESTORE:{text:"Index snapshots"},CREATE_SNAPSHOT:{text:"Create repository",href:`#${ROUTES.CREATE_REPOSITORY}`},EDIT_SNAPSHOT:{text:"Edit repository",href:`#${ROUTES.EDIT_REPOSITORY}`},REPOSITORIES:{text:"Repositories",href:`#${ROUTES.REPOSITORIES}`},SNAPSHOT_REPOSITORIES:{text:"Snapshot repositories",href:`#${ROUTES.REPOSITORIES}`},CREATE_REPOSITORY:{text:"Create repository",href:`#${ROUTES.CREATE_REPOSITORY}`},EDIT_REPOSITORY:{text:"Edit repository",href:`#${ROUTES.EDIT_REPOSITORY}`},CREATE_INDEX:{text:"Create Index",href:`#${ROUTES.CREATE_INDEX}`},EDIT_INDEX:{text:"Edit Index",href:`#${ROUTES.CREATE_INDEX}`},INDEX_DETAIL:{text:"Index Detail",href:"#"},REINDEX:{text:"Reindex",href:`#${ROUTES.REINDEX}`},ALIASES:{text:"Aliases",href:`#${ROUTES.ALIASES}`},NEW_ALIASES:{text:"Index aliases",href:`#${ROUTES.ALIASES}`},TEMPLATES:{text:"Templates",href:`#${ROUTES.TEMPLATES}`},NEW_TEMPLATES:{text:"Index templates",href:`#${ROUTES.TEMPLATES}`},CREATE_TEMPLATE:{text:"Create index template",href:`#${ROUTES.CREATE_TEMPLATE}`},EDIT_TEMPLATE:{text:"Edit template",href:`#${ROUTES.CREATE_TEMPLATE}`},SPLIT_INDEX:{text:"Split Index",href:`#${ROUTES.SPLIT_INDEX}`},SHRINK_INDEX:{text:"Shrink index",href:`#${ROUTES.SHRINK_INDEX}`},ROLLOVER:{text:"Rollover",href:`#${ROUTES.ROLLOVER}`},DATA_STREAMS:{text:"Data streams",href:`#${ROUTES.DATA_STREAMS}`},CREATE_DATA_STREAM:{text:"Create data stream",href:`#${ROUTES.CREATE_DATA_STREAM}`},FORCE_MERGE:{text:"Force merge",href:`#${ROUTES.FORCE_MERGE}`},COMPOSABLE_TEMPLATES:{text:"Component templates",href:`#${ROUTES.COMPOSABLE_TEMPLATES}`},CREATE_COMPOSABLE_TEMPLATE:{text:"Create component template",href:`#${ROUTES.CREATE_COMPOSABLE_TEMPLATE}`},NOTIFICATION_SETTINGS:{text:"Notification settings",href:`#${ROUTES.NOTIFICATIONS}`},INDEX_NOTIFICATION_SETTINGS:{text:"Index operations notifications",href:`#${ROUTES.NOTIFICATIONS}`}}
1);let SortDirection=function(SortDirection){SortDirection["ASC"]="asc";SortDirection["DESC"]="desc";return SortDirection}({});const FixedTimeunitOptions=[{value:"ms",text:"Millisecond(s)"},{value:"s",text:"Second(s)"},{value:"m",text:"Minute(s)"},{value:"h",text:"Hour(s)"},{value:"d",text:"Day(s)"}];const CalendarTimeunitOptions=[{value:"m",text:"Minute"},{value:"h",text:"Hour"},{value:"d",text:"Day"},{value:"w",text:"Week"},{value:"M",text:"Month"},{value:"q",text:"Quarter"},{value:"y",text:"Year"}];let IntervalType=function(IntervalType){IntervalType["FIXED"]="fixed";IntervalType["CALENDAR"]="calendar";return IntervalType}({});const browseIndicesCols=[{field:"index",name:"Index",width:"100%",truncateText:true,sortable:true}];const restoreIndicesCols=[{field:"index",name:"Index",width:"75%",truncateText:true,sortable:true},{field:"restore_status",name:"Restore status",width:"25%",sortable:true}];const INDEX_IMPORT_SETTINGS=["index.number_of_replicas","index.number_of_shards","index.refresh_interval"];const INDEX_DYNAMIC_SETTINGS=["index.number_of_replicas","index.auto_expand_replicas","index.search.idle.after","index.refresh_interval","index.max_result_window","index.max_inner_result_window","index.max_rescore_window","index.max_docvalue_fields_search","index.max_script_fields","index.max_ngram_diff","index.max_shingle_diff","index.max_refresh_listeners","index.analyze.max_token_count","index.highlight.max_analyzed_offset","index.max_terms_count","index.max_regex_length","index.query.default_field","index.routing.allocation.enable","index.gc_deletes","index.default_pipeline","index.final_pipeline","index.hidden"];const INDEX_MAPPING_TYPES=[{label:"alias",options:{fields:[{label:"Path",name:"path",type:"Input",validateType:"string",rules:[{required:true,message:"Path is required."}]}]}},{label:"boolean"},{label:"binary"},{label:"completion"},{label:"date"},{label:"date_range"},{label:"double"},{label:"double_range"},{label:"float"},{label:"geo_point"},{label:"geo_shape"},{label:"half_float"},{label:"integer"},{label:"ip"},{label:"ip_range"},{label:"keyword"},{label:"long"},{label:"long_range"},{label:"object",hasChildren:true},{label:"percolator"},{label:"rank_feature"},{label:"rank_features"},{label:"search_as_you_type"},{label:"text"},{label:"token_count",options:{fields:[{label:"Analyzer",name:"analyzer",initValue:"standard",type:"Input",validateType:"string",rules:[{required:true,message:"Analyzer is required."}]}]}}];let IndicesUpdateMode=function(IndicesUpdateMode){IndicesUpdateMode["mappings"]="mappings";IndicesUpdateMode["settings"]="settings";IndicesUpdateMode["alias"]="aliases";return IndicesUpdateMode}({});const INDEX_MAPPING_TYPES_WITH_CHILDREN=INDEX_MAPPING_TYPES.filter(item=>item.hasChildren).map(item=>item.label);const DEFAULT_LEGACY_ERROR_NOTIFICATION={destination:{slack:{url:"<url>"}},message_template:{source:"The index {{ctx.index}} failed during policy execution."}};const ALIAS_STATUS_OPTIONS=["open","closed","hidden","none","all"].map(item=>({label:item,value:item}));const INDEX_NAMING_MESSAGE=`Must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, , |, ?, #, > are not allowed.`;const TEMPLATE_NAMING_MESSAGE=`Must be in lowercase letters. Cannot begin with underscores. Spaces, commas, and characters *, # are not allowed.`;const REPLICA_NUMBER_MESSAGE="Specify the number of replicas each primary shard should have. Default is 1.";const TEMPLATE_TYPE={INDEX_TEMPLATE:"Indexes",DATA_STREAM:"Data streams"};const INDEX_NAMING_PATTERN=/^[^A-Z-_"*+/\\|?#<>][^A-Z"*+/\\|?#<>]*$/;const TEMPLATE_NAMING_PATTERN=/^[^A-Z_*,\s#][^A-Z*,\s#]*$/;const ALIAS_NAMING_MESSAGE="An alias must be 1-255 characters long"+', cannot be ".", or ".."'+", cannot start with _, -, or +"+', and cannot contain spaces, commas, \\, /, *, ?, ", <, >, |, #, or :.';const ALIAS_NAMING_PATTERN=/^(?![_\-\+])(?!.*\.\.)[^\s,\\\/\*\?"<>|#:\.]{1,255}$/;const ALIAS_SELECT_RULE=[{validator:(rules,valueObject)=>{const value=Object.keys(valueObject||{});if(Array.isArray(value)&&value.length){const notMatchedAliases=value.filter(item=>!item.match(INDEX_NAMING_PATTERN));if(notMatchedAliases.length){return Promise.reject(`\n Invalid alias name for ${notMatchedAliases.join(", ")}.\n\n Rule for alias name: ${INDEX_NAMING_MESSAGE}\n `)}}return Promise.resolve("")}}];let INDEX_OP_BLOCKS_TYPE=function(INDEX_OP_BLOCKS_TYPE){INDEX_OP_BLOCKS_TYPE["CLOSED"]="4";INDEX_OP_BLOCKS_TYPE["READ_ONLY"]="5";INDEX_OP_BLOCKS_TYPE["META_DATA"]="9";INDEX_OP_BLOCKS_TYPE["READ_ONLY_ALLOW_DELETE"]="12";return INDEX_OP_BLOCKS_TYPE}({});let INDEX_OP_TARGET_TYPE=function(INDEX_OP_TARGET_TYPE){INDEX_OP_TARGET_TYPE["INDEX"]="indexes";INDEX_OP_TARGET_TYPE["ALIAS"]="aliases";INDEX_OP_TARGET_TYPE["DATA_STREAM"]="data streams";return INDEX_OP_TARGET_TYPE}({})},function(module,exports){module.exports=__osdSharedDeps__.Lodash},function(module,exports,__webpack_require__){"use strict";module.exports=function(cssWithMappingToString){var list=[];list.toString=function toString(){return this.map((function(item){var content=cssWithMappingToString(item);if(item[2]){return"@media ".concat(item[2]," {").concat(content,"}")}return content})).join("")};list.i=function(modules,mediaQuery,dedupe){if(typeof modules==="str
1ing"){modules=[[null,modules,""]]}var alreadyImportedModules={};if(dedupe){for(var i=0;i<this.length;i++){var id=this[i][0];if(id!=null){alreadyImportedModules[id]=true}}}for(var _i=0;_i<modules.length;_i++){var item=[].concat(modules[_i]);if(dedupe&&alreadyImportedModules[item[0]]){continue}if(mediaQuery){if(!item[2]){item[2]=mediaQuery}else{item[2]="".concat(mediaQuery," and ").concat(item[2])}}list.push(item)}};return list}},function(module,exports){module.exports=__osdSharedDeps__.OsdI18n},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"d",(function(){return getErrorMessage}));__webpack_require__.d(__webpack_exports__,"e",(function(){return makeId}));__webpack_require__.d(__webpack_exports__,"f",(function(){return wildcardOption}));__webpack_require__.d(__webpack_exports__,"a",(function(){return diffJson}));__webpack_require__.d(__webpack_exports__,"c",(function(){return getClusterInfo}));__webpack_require__.d(__webpack_exports__,"b",(function(){return filterBlockedItems}));var _elastic_eui_lib_services__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(59);var _elastic_eui_lib_services__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_elastic_eui_lib_services__WEBPACK_IMPORTED_MODULE_0__);var lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3);var lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);var _constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(2);function getErrorMessage(err,defaultMessage){if(err&&err.message)return err.message;return defaultMessage}const makeId=Object(_elastic_eui_lib_services__WEBPACK_IMPORTED_MODULE_0__["htmlIdGenerator"])();const wildcardOption=searchValue=>searchValue.endsWith("*")?searchValue:`${searchValue}*`;function diffJson(oldJson,newJson){let initial=0;const oldKeys=Object.keys(oldJson||{});const addOrChanged=Object.entries(newJson||{}).reduce((total,_ref)=>{let[key,value]=_ref;if(Object.prototype.toString.call(value)==="[object Object]"){total+=diffJson(oldJson===null||oldJson===void 0?void 0:oldJson[key],value)}else{total+=Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEqual"])(oldJson===null||oldJson===void 0?void 0:oldJson[key],value)?0:1}const findIndex=oldKeys.findIndex(item=>item===key);if(findIndex>-1){oldKeys.splice(findIndex,1)}return total},0);if((oldJson===undefined||oldJson===null)&&addOrChanged===0&&newJson){initial+=1}return initial+addOrChanged+oldKeys.length}const getClusterInfo=props=>props.commonService.apiCaller({endpoint:"cluster.health"}).then(res=>{if(res&&res.ok){var _res$response;return{cluster_name:res===null||res===void 0||(_res$response=res.response)===null||_res$response===void 0?void 0:_res$response.cluster_name}}return{}});async function getRedIndicesInOpenStatus(browserServices){const result=await browserServices.commonService.apiCaller({endpoint:"cat.indices",data:{h:"i,s",health:"red"}});if(!result.ok){throw result.error}if(!result.response){return[]}return result.response.split("\n").filter(s=>s!==""&&s.endsWith("open")).map(s=>s.split(" ")[0])}async function getBlockedIndices(browserServices){const result=await browserServices.commonService.apiCaller({endpoint:"cluster.state",data:{metric:"blocks"}});if(!result.ok){throw result.error}const blocksResponse=result.response.blocks;if(!blocksResponse.indices){return{}}const blockedIndices={};Object.keys(blocksResponse.indices).forEach(indexName=>{const innerBlocksInfo=blocksResponse.indices[indexName];const indexOpBlocksIds=Object.keys(innerBlocksInfo);blockedIndices[indexName]=indexOpBlocksIds});return blockedIndices}async function getBlockedIndicesSetWithBlocksType(browserServices,blocksTypes){const blocksTypesSet=new Set(Array.isArray(blocksTypes)?blocksTypes:[blocksTypes]);const blockedIndices=await getBlockedIndices(browserServices);return new Set(Object.entries(blockedIndices).filter(blockedIndex=>blockedIndex[1].find(s=>blocksTypesSet.has(s))).map(blockedIndex=>blockedIndex[0]))}function indexBlockedPredicate(item,blockedItemsSet){return blockedItemsSet.has(item.index)}function aliasBlockedPredicate(item,blockedItemsSet){return!!item.indexArray.find(indexName=>blockedItemsSet.has(indexName))}function dataStreamBlockedPredicate(item,blockedItemsSet){return!!item.indices.find(dataStreamIndex=>blockedItemsSet.has(dataStreamIndex.index_name))}async function filterBlockedItems(browserServices,originInputItems,blocksTypes,indexOpTargetType){let filterRedIndices=arguments.length>
14&&arguments[4]!==undefined?arguments[4]:false;const result={unBlockedItems:[],blockedItems:[]};var redIndices=[];if(filterRedIndices){if(!originInputItems.length&&indexOpTargetType!==_constants__WEBPACK_IMPORTED_MODULE_2__["u"].INDEX){throw new Error("Can only filter red indexes for type index.")}redIndices=await getRedIndicesInOpenStatus(browserServices)}if(!originInputItems.length){result.blockedItems=redIndices;return result}var filteredBlockedIndicesSet=await getBlockedIndicesSetWithBlocksType(browserServices,blocksTypes);filteredBlockedIndicesSet=new Set([...filteredBlockedIndicesSet,...redIndices]);var inputItems;switch(indexOpTargetType){case _constants__WEBPACK_IMPORTED_MODULE_2__["u"].ALIAS:inputItems=originInputItems;inputItems.forEach(item=>{if(aliasBlockedPredicate(item,filteredBlockedIndicesSet))result.blockedItems.push(item.alias);else result.unBlockedItems.push(item.alias)});break;case _constants__WEBPACK_IMPORTED_MODULE_2__["u"].DATA_STREAM:inputItems=originInputItems;inputItems.forEach(item=>{if(dataStreamBlockedPredicate(item,filteredBlockedIndicesSet))result.blockedItems.push(item.name);else result.unBlockedItems.push(item.name)});break;case _constants__WEBPACK_IMPORTED_MODULE_2__["u"].INDEX:inputItems=originInputItems;inputItems.forEach(item=>{if(indexBlockedPredicate(item,filteredBlockedIndicesSet))result.blockedItems.push(item.index);else result.unBlockedItems.push(item.index)});break;default:throw new Error(`Unexpected INDEX_OP_TARGET_TYPE: ${indexOpTargetType}`)}return result}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return CoreServicesContext}));__webpack_require__.d(__webpack_exports__,"a",(function(){return CoreServicesConsumer}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);const CoreServicesContext=Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null);const CoreServicesConsumer=CoreServicesContext.Consumer},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return ServicesContext}));__webpack_require__.d(__webpack_exports__,"a",(function(){return ServicesConsumer}));__webpack_require__.d(__webpack_exports__,"e",(function(){return getUISettings}));__webpack_require__.d(__webpack_exports__,"h",(function(){return setUISettings}));__webpack_require__.d(__webpack_exports__,"d",(function(){return getNavigationUI}));__webpack_require__.d(__webpack_exports__,"g",(function(){return setNavigationUI}));__webpack_require__.d(__webpack_exports__,"c",(function(){return getApplication}));__webpack_require__.d(__webpack_exports__,"f",(function(){return setApplication}));var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Defer{constructor(){_defineProperty(this,"resolve",void 0);_defineProperty(this,"reject",void 0);_defineProperty(this,"promise",new Promise((resolve,reject)=>{this.resolve=resolve;this.reject=reject}))}}const defer=()=>new Defer;var external_osdSharedDeps_Lodash_=__webpack_require__(3);const field_wildcard_makeRegEx=Object(external_osdSharedDeps_Lodash_["memoize"])((function makeRegEx(glob){const globRegex=glob.split("*").map(external_osdSharedDeps_Lodash_["escapeRegExp"]).join(".*");return new RegExp(`^${globRegex}$`)}));function fieldWildcardMatcher(){let globs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];let metaFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return function matcher(val){if(metaFields.indexOf(val)!==-1){return false}return globs.some(p=>field_wildcard_makeRegEx(p).test(`${val}`))}}function fieldWildcardFilter(){let globs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];let metaFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];const matcher=fieldWildcardMatcher(globs,metaFields);return function filter(val){return!matcher(val)}}const of=async promise=>{try{return[await promise,undefined,true]}catch(error){return[undefined,error,false]}};var external_osdSharedDeps_Rxjs_=__webpack_require__(10);var external_osdSharedDeps_RxjsOperators_=__webpack_require__(9);var deep_freeze_strict=__webpack_require__(162);var deep_freeze_strict_default=__webpack_require__.n(deep_freeze_strict);const $$observable=typeof Symbol==="function"&&Symbol.observable||"@@observable";const $$setActionType="@@SET";const isProduction=typeof window==="object"?"production"==="production":false||"production"==="production";const defaultFreeze=isProduction?value=>value:value=>{const isFreezable=value!==null&&typeof value==="object";if(isFreezable)return deep_freeze_strict_default()(value);return value};function createStateContainer(defaultState){let pureTransitions=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let pureSelectors=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};let options=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};const{freeze:freeze=defaultFreeze}=options;const data$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](freeze(defaultState));const state$=data$.pipe(Object(external_osdSharedDeps_RxjsOperators_["skip"])(1));const get=()=>data$.getValue();const container={get:get,state$:state$,getState:()=>data$.getValue(),set:state=>
1{container.dispatch({type:$$setActionType,args:[state]})},reducer:(state,action)=>{if(action.type===$$setActionType){return freeze(action.args[0])}const pureTransition=pureTransitions[action.type];return pureTransition?freeze(pureTransition(state)(...action.args)):state},replaceReducer:nextReducer=>container.reducer=nextReducer,dispatch:action=>data$.next(container.reducer(get(),action)),transitions:Object.keys(pureTransitions).reduce((acc,type)=>({...acc,[type]:function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return container.dispatch({type:type,args:args})}}),{}),selectors:Object.keys(pureSelectors).reduce((acc,selector)=>({...acc,[selector]:function(){return pureSelectors[selector](get())(...arguments)}}),{}),addMiddleware:middleware=>container.dispatch=middleware(container)(container.dispatch),subscribe:listener=>{const subscription=state$.subscribe(listener);return()=>subscription.unsubscribe()},[$$observable]:state$};return container}var useObservable=__webpack_require__(22);var useObservable_default=__webpack_require__.n(useObservable);var fast_deep_equal=__webpack_require__(53);var fast_deep_equal_default=__webpack_require__.n(fast_deep_equal);const{useContext:useContext,useLayoutEffect:useLayoutEffect,useRef:useRef,createElement:h}=external_osdSharedDeps_React_default.a;const useContainerState=container=>useObservable_default()(container.state$,container.get());const useContainerSelector=function(container,selector){let comparator=arguments.length>2&&arguments[2]!==undefined?arguments[2]:fast_deep_equal_default.a;const{state$:state$,get:get}=container;const lastValueRef=useRef(get());const[value,setValue]=external_osdSharedDeps_React_default.a.useState(()=>{const newValue=selector(get());lastValueRef.current=newValue;return newValue});useLayoutEffect(()=>{const subscription=state$.subscribe(currentState=>{const newValue=selector(currentState);if(!comparator(lastValueRef.current,newValue)){lastValueRef.current=newValue;setValue(newValue)}});return()=>subscription.unsubscribe()},[state$,comparator]);return value};const createStateContainerReactHelpers=()=>{const context=external_osdSharedDeps_React_default.a.createContext(null);const useContainer=()=>useContext(context);const useState=()=>{const container=useContainer();return useContainerState(container)};const useTransitions=()=>useContainer().transitions;const useSelector=function(selector){let comparator=arguments.length>1&&arguments[1]!==undefined?arguments[1]:fast_deep_equal_default.a;const container=useContainer();return useContainerSelector(container,selector,comparator)};const connect=mapStateToProp=>component=>props=>h(component,{...useSelector(mapStateToProp),...props});return{Provider:context.Provider,Consumer:context.Consumer,context:context,useContainer:useContainer,useState:useState,useTransitions:useTransitions,useSelector:useSelector,connect:connect}};function errors_defineProperty(e,r,t){return(r=errors_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function errors_toPropertyKey(t){var i=errors_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function errors_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class OsdError extends Error{constructor(message){super(message);Object.setPrototypeOf(this,new.target.prototype)}}class DuplicateField extends OsdError{constructor(name){super(`The field "${name}" already exists in this mapping`)}}class SavedObjectNotFound extends OsdError{constructor(type,id,link){const idMsg=id?` (id: ${id})`:"";let message=`Could not locate that ${type}${idMsg}`;if(link){message+=`, [click here to re-create it](${link})`}super(message);errors_defineProperty(this,"savedObjectType",void 0);errors_defineProperty(this,"savedObjectId",void 0);this.savedObjectType=type;this.savedObjectId=id}}class InvalidJSONProperty extends OsdError{constructor(message){super(message)}}const createGetterSetter=name=>{let value;const get=()=>{if(!value)throw new Error(`${name} was not set.`);return value};const set=newValue=>{value=newValue};return[get,set]};function distinctUntilChangedWithInitialValue(initialValue,compare){return input$=>Object(external_osdSharedDeps_Rxjs_["scheduled"])([isPromise(initialValue)?Object(external_osdSharedDeps_Rxjs_["from"])(initialValue):[initialValue],input$],external_osdSharedDeps_Rxjs_["queueScheduler"]).pipe(Object(external_osdSharedDeps_RxjsOperators_["concatAll"])(),Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(compare),Object(external_osdSharedDeps_RxjsOperators_["skip"])(1))}function isPromise(value){return!!value&&typeof value==="object"&&"then"in value&&typeof value.then==="function"&&!("subscribe"in value)}function encodeUriQuery(val){let pctEncodeSpaces=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,pctEncodeSpaces?"%20":"+")}const encodeQuery=function(query){let encodeFunction=arguments.length>1&&arguments[1]!==undefined?arguments[1]:encodeUriQuery;return Object(external_osdSharedDeps_Lodash_["transform"])(query,(result,value,key)=>{if(key){const singleValue=Array.isArray(value)?value.join(","):value;result[key]=encodeFunction(singleValue===undefined||singleValue===null?"":singleValue,true)}})};const url_url={encodeQuery:encodeQuery,encodeUriQuery:encodeUriQuery};const now=typeof performance==="object"?performance.now.bind(performance):Date.now;function pad(hash,len){while(hash.length<len){hash="0"+hash}return hash}function fold(hash,text){let i;let chr;let len;if(text.length===0){return hash}for(i=0,len=text.length;i<len;i++){chr=text.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0}return hash<0?hash*-2:hash}function foldObject(hash,o,seen){function foldKey(h,key){return foldValue(h,o[key],key,seen)}return Object.keys(o).sort().reduce(foldKey,hash)}function foldValue(input,value,key,seen){const hash=fold(fold(fold(input,key),calculate_object_hash_toString(value)),typeof value);if(value===null){return fold(hash,"null")}if(value===undefined){return fold(hash,"undefined")}if(typeof value==="object"){if(key==="vis"&&value.constructor.name==="Vis"){return hash}if(seen.indexOf(value)!==-1){return fold(hash,"[Circular]"+key)}seen.push(value);return foldObject(hash,value,seen)}return fold(hash,value.toString())}function calculate_object_hash_toString(o){return Object.prototype.toString.call(o)}function sum(o){return pad(foldValue(0,o,"",[]).toString(16),8)}const calculateObjectHash=sum;const createStartServicesGetter=accessor=>{let services;accessor().then(_ref=>{let[core,plugins,self]=_ref;services={core:core,plugins:plugins,self:self}},error=>{console.error("Could not access start services.",error)});return()=>{if(!services)throw new Error("Trying to access start services before start.");return services}};function render_complete_listener_defineProperty(e,r,t){return(r=render_complete_listener_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function render_complete_listener_toPropertyKey(t){var i=render_complete_listener_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function render_complete_listener_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RenderCompleteListener{constructor(element){this.element=element;render_complete_listener_defineProperty(this,"attributeName","data-render-complete");render_complete_listener_defineProperty(this,"destroy",()=>{this.element.removeEventListener("renderStart",this.start);this.element.removeEventListener("renderComplete",this.complete)});render_complete_listener_defineProperty(this,"setup",()=>{this.element.setAttribute(this.attributeName,"false");this.element.addEventListener("renderStart",this.start);this.element.addEventListener("renderComplete",this.complete)});render_complete_listener_defineProperty(this,"disable",()=>{this.element.setAttribute(this.attributeName,"disabled");this.destroy()});render_complete_listener_defineProperty(this,"start",()=>{this.element.setAttribute(this.attributeName,"false");return true});render_complete_listener_defineProperty(this,"complete",()=>{this.element.setAttribute(this.attributeName,"true");return true});this.setup()}}function render_complete_dispatcher_defineProperty(e,r,t){return(r=render_complete_dispatcher_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function render_complete_dispatcher_toPropertyKey(t){var i=render_complete_dispatcher_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function render_complete_dispatcher_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const dispatchEvent=(el,eventName)=>{el.dispatchEvent(new CustomEvent(eventName,{bubbles:true}))};function dispatchRenderComplete(el){dispatchEvent(el,"renderComplete")}
1function dispatchRenderStart(el){dispatchEvent(el,"renderStart")}class RenderCompleteDispatcher{constructor(el){render_complete_dispatcher_defineProperty(this,"count",0);render_complete_dispatcher_defineProperty(this,"el",void 0);this.setEl(el)}setEl(el){this.el=el;this.count=0;if(el)this.dispatchInProgress()}dispatchInProgress(){if(!this.el)return;this.el.setAttribute("data-render-complete","false");this.el.setAttribute("data-rendering-count",String(this.count));dispatchRenderStart(this.el)}dispatchComplete(){if(!this.el)return;this.count++;this.el.setAttribute("data-render-complete","true");this.el.setAttribute("data-rendering-count",String(this.count));dispatchRenderComplete(this.el)}dispatchError(){if(!this.el)return;this.count++;this.el.setAttribute("data-render-complete","false");this.el.setAttribute("data-rendering-count",String(this.count))}setTitle(title){if(!this.el)return;this.el.setAttribute("data-title",title)}}var events=__webpack_require__(163);var ResizeObserver=__webpack_require__(164);var ResizeObserver_default=__webpack_require__.n(ResizeObserver);function resize_checker_defineProperty(e,r,t){return(r=resize_checker_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function resize_checker_toPropertyKey(t){var i=resize_checker_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function resize_checker_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function getSize(el){return[el.clientWidth,el.clientHeight]}class resize_checker_ResizeChecker extends events["EventEmitter"]{constructor(el){let args=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};super();resize_checker_defineProperty(this,"destroyed",false);resize_checker_defineProperty(this,"el",void 0);resize_checker_defineProperty(this,"observer",void 0);resize_checker_defineProperty(this,"expectedSize",null);this.el=el;this.observer=new ResizeObserver_default.a(()=>{if(this.expectedSize){const sameSize=Object(external_osdSharedDeps_Lodash_["isEqual"])(getSize(el),this.expectedSize);this.expectedSize=null;if(sameSize){return}}this.emit("resize")});if(!args.disabled){this.enable()}}enable(){if(this.destroyed){return}this.expectedSize=getSize(this.el);this.observer.observe(this.el)}modifySizeWithoutTriggeringResize(block){try{block()}finally{if(this.el){this.expectedSize=getSize(this.el)}}}destroy(){if(this.destroyed){return}this.destroyed=true;this.observer.disconnect();this.observer=null;this.expectedSize=null;this.el=null;this.removeAllListeners()}}function storage_defineProperty(e,r,t){return(r=storage_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function storage_toPropertyKey(t){var i=storage_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function storage_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Storage{constructor(store){storage_defineProperty(this,"store",void 0);storage_defineProperty(this,"get",key=>{if(!this.store){return null}const storageItem=this.store.getItem(key);if(storageItem===null){return null}try{return JSON.parse(storageItem)}catch(error){return null}});storage_defineProperty(this,"set",(key,value)=>{try{return this.store.setItem(key,JSON.stringify(value))}catch(e){return false}});storage_defineProperty(this,"remove",key=>this.store.removeItem(key));storage_defineProperty(this,"clear",()=>this.store.clear());this.store=store}}function hashed_item_store_defineProperty(e,r,t){return(r=hashed_item_store_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hashed_item_store_toPropertyKey(t){var i=hashed_item_store_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function hashed_item_store_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class hashed_item_store_HashedItemStore{constructor(storage){hashed_item_store_defineProperty(this,"storage",void 0);hashed_item_store_defineProperty(this,"ensuredSorting",false);this.storage=storage}setItem(hash,item){const isItemPersisted=this.persistItem(hash,item);if(isItemPersisted){this.touchHash(hash)}return isItemPersisted}getItem(hash){const item=this.storage.getItem(hash);if(item!==null){this.touchHash(hash)}return item}removeItem(hash){const indexedItems=this.getIndexedItems();const itemToRemove=this.storage.getItem(hash);const indexedItemToRemove=this.getIndexedItem(hash,indexedItems);if(indexedItemToRemove){Object(external_osdSharedDeps_Lodash_["pull"])(indexedItems,indexedItemToRemove);this.setIndexedItems(indexedItems)}if(itemToRemove){this.storage.removeItem(hash)}return itemToRemove||null}clear(){const indexedItems=this.getIndexedItems();
1indexedItems.forEach(_ref=>{let{hash:hash}=_ref;this.storage.removeItem(hash)});this.setIndexedItems([])}getIndexedItems(){const persistedItemIndex=this.storage.getItem(hashed_item_store_HashedItemStore.PERSISTED_INDEX_KEY);let items=persistedItemIndex?JSON.parse(persistedItemIndex)||[]:[];if(!this.ensuredSorting){items=Object(external_osdSharedDeps_Lodash_["sortBy"])(items,"touched");this.setIndexedItems(items);this.ensuredSorting=true}return items}setIndexedItems(items){this.storage.setItem(hashed_item_store_HashedItemStore.PERSISTED_INDEX_KEY,JSON.stringify(items))}getIndexedItem(hash){let indexedItems=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.getIndexedItems();return indexedItems.find(indexedItem=>indexedItem.hash===hash)}persistItem(hash,item){try{this.storage.setItem(hash,item);return true}catch(e){if(this.getIndexedItems().length===0){return false}this.removeOldestItem();return this.persistItem(hash,item)}}removeOldestItem(){const indexedItems=this.getIndexedItems();const oldestIndexedItem=indexedItems.shift();if(oldestIndexedItem){this.storage.removeItem(oldestIndexedItem.hash);this.setIndexedItems(indexedItems)}}touchHash(hash){const indexedItems=this.getIndexedItems();const indexedItem=this.getIndexedItem(hash,indexedItems)||{hash:hash};indexedItem.touched=Date.now();Object(external_osdSharedDeps_Lodash_["pull"])(indexedItems,indexedItem);indexedItems.push(indexedItem);this.setIndexedItems(indexedItems)}}hashed_item_store_defineProperty(hashed_item_store_HashedItemStore,"PERSISTED_INDEX_KEY","osd.hashedItemsIndex.v1");const hashedItemStore=new hashed_item_store_HashedItemStore(window.sessionStorage);var external_osdSharedDeps_OsdI18n_=__webpack_require__(5);var utils=__webpack_require__(26);const HASH_PREFIX="h@";function createStateHash(json,existingJsonProvider){if(typeof json!=="string"){throw new Error("createHash only accepts strings (JSON).")}const hash=(new utils["b"]).update(json,"utf8").digest("hex");let shortenedHash;for(let i=7;i<hash.length;i++){shortenedHash=hash.slice(0,i);const existingJson=existingJsonProvider?existingJsonProvider(shortenedHash):hashedItemStore.getItem(shortenedHash);if(existingJson===null||existingJson===json)break}return`${HASH_PREFIX}${shortenedHash}`}function isStateHash(str){return String(str).indexOf(HASH_PREFIX)===0}function retrieveState(stateHash){const json=hashedItemStore.getItem(stateHash);const throwUnableToRestoreUrlError=()=>{throw new Error(external_osdSharedDeps_OsdI18n_["i18n"].translate("opensearch_dashboards_utils.stateManagement.stateHash.unableToRestoreUrlErrorMessage",{defaultMessage:"Unable to completely restore the URL, be sure to use the share functionality."}))};if(json===null){return throwUnableToRestoreUrlError()}try{return JSON.parse(json)}catch(e){return throwUnableToRestoreUrlError()}}function persistState(state){const json=JSON.stringify(state);const hash=createStateHash(json);const isItemSet=hashedItemStore.setItem(hash,json);if(isItemSet)return hash;const message=external_osdSharedDeps_OsdI18n_["i18n"].translate("opensearch_dashboards_utils.stateManagement.stateHash.unableToStoreHistoryInSessionErrorMessage",{defaultMessage:"OpenSearch Dashboards is unable to store history items in your session "+`because it is full and there don't seem to be items any items safe `+"to delete.\n\n"+"This can usually be fixed by moving to a fresh tab, but could "+"be caused by a larger issue. If you are seeing this message regularly, "+"please file an issue at {gitHubIssuesUrl}.",values:{gitHubIssuesUrl:"https://github.com/opensearch-project/OpenSearch-Dashboards/issues"}});throw new Error(message)}var rison=__webpack_require__(128);var rison_default=__webpack_require__.n(rison);function decodeState(expandedOrHashedState){if(isStateHash(expandedOrHashedState)){return retrieveState(expandedOrHashedState)}else{return rison_default.a.decode(expandedOrHashedState)}}function encodeState(state,useHash){if(useHash){return persistState(state)}else{return rison_default.a.encode(state)}}function hashedStateToExpandedState(expandedOrHashedState){if(isStateHash(expandedOrHashedState)){return encodeState(retrieveState(expandedOrHashedState),false)}return expandedOrHashedState}function expandedStateToHashedState(expandedOrHashedState){if(isStateHash(expandedOrHashedState)){return expandedOrHashedState}return persistState(decodeState(expandedOrHashedState))}var node_modules_url_url=__webpack_require__(27);var query_string=__webpack_require__(16);const parseUrl=url=>Object(node_modules_url_url["parse"])(url,true);const parseUrlHash=url=>{const hash=parseUrl(url).hash;return hash?parseUrl(hash.slice(1)):null};const getCurrentUrl=history=>history.createHref(history.location);function replaceUrlQuery(rawUrl,queryReplacer){const url=parseUrl(rawUrl);const newQuery=queryReplacer(url.query||{});const searchQueryString=Object(query_string["stringify"])(url_url.encodeQuery(newQuery),{sort:false,encode:false});if(!url.search&&!searchQueryString)return rawUrl;return Object(node_modules_url_url["format"])({...url,search:searchQueryString})}function replaceUrlHashQuery(rawUrl,queryReplacer){const url=parseUrl(rawUrl);const hash=parseUrlHash(rawUrl);const newQuery=queryReplacer((hash===null||hash===void 0?void 0:hash.query
1)||{});const searchQueryString=Object(query_string["stringify"])(url_url.encodeQuery(newQuery),{sort:false,encode:false});if((!hash||!hash.search)&&!searchQueryString)return rawUrl;return Object(node_modules_url_url["format"])({...url,hash:Object(node_modules_url_url["format"])({pathname:(hash===null||hash===void 0?void 0:hash.pathname)||"",search:searchQueryString})})}const unhashQuery=createQueryMapper(hashedStateToExpandedState);const hashQuery=createQueryMapper(expandedStateToHashedState);const unhashUrl=createQueryReplacer(unhashQuery);const hashUrl=createQueryReplacer(hashQuery);const __HACK_HARDCODED_LEGACY_HASHABLE_PARAMS=["_g","_a","_s"];function createQueryMapper(queryParamMapper){return function(query){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{hashableParams:__HACK_HARDCODED_LEGACY_HASHABLE_PARAMS};return Object.fromEntries(Object.entries(query||{}).map(_ref=>{let[name,value]=_ref;if(!options.hashableParams.includes(name))return[name,value];return[name,queryParamMapper(value)||value]}))}}function createQueryReplacer(queryMapper,options){return url=>replaceUrlHashQuery(url,query=>queryMapper(query,options))}var node_modules_history=__webpack_require__(51);function getStatesFromOsdUrl(){var _parseUrlHash;let url=arguments.length>0&&arguments[0]!==undefined?arguments[0]:window.location.href;let keys=arguments.length>1?arguments[1]:undefined;const query=(_parseUrlHash=parseUrlHash(url))===null||_parseUrlHash===void 0?void 0:_parseUrlHash.query;if(!query)return{};const decoded={};Object.entries(query).filter(_ref=>{let[key]=_ref;return keys?keys.includes(key):true}).forEach(_ref2=>{let[q,value]=_ref2;decoded[q]=decodeState(value)});return decoded}function getStateFromOsdUrl(key){let url=arguments.length>1&&arguments[1]!==undefined?arguments[1]:window.location.href;return getStatesFromOsdUrl(url,[key])[key]||null}function setStateToOsdUrl(key,state){let{useHash:useHash=false,storeInHashQuery:storeInHashQuery=true}=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{useHash:false,storeInHashQuery:true};let rawUrl=arguments.length>3&&arguments[3]!==undefined?arguments[3]:window.location.href;const replacer=storeInHashQuery?replaceUrlHashQuery:replaceUrlQuery;return replacer(rawUrl,query=>{const encoded=encodeState(state,useHash);return{...query,[key]:encoded}})}const createOsdUrlControls=function(){let history=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object(node_modules_history["createBrowserHistory"])();const updateQueue=[];let shouldReplace=true;function updateUrl(newUrl){let replace=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;const currentUrl=getCurrentUrl(history);if(newUrl===currentUrl)return undefined;const historyPath=getRelativeToHistoryPath(newUrl,history);if(replace){history.replace(historyPath)}else{history.push(historyPath)}return getCurrentUrl(history)}function cleanUp(){updateQueue.splice(0,updateQueue.length);shouldReplace=true}function flush(){let replace=arguments.length>0&&arguments[0]!==undefined?arguments[0]:shouldReplace;const nextUrl=getPendingUrl();if(!nextUrl)return;cleanUp();const newUrl=updateUrl(nextUrl,replace);return newUrl}function getPendingUrl(){if(updateQueue.length===0)return undefined;const resultUrl=updateQueue.reduce((url,nextUpdate)=>{var _nextUpdate;return(_nextUpdate=nextUpdate(url))!==null&&_nextUpdate!==void 0?_nextUpdate:url},getCurrentUrl(history));return resultUrl}return{listen:cb=>history.listen(()=>{cb()}),update:function(newUrl){let replace=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return updateUrl(newUrl,replace)},updateAsync:function(updater){let replace=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;updateQueue.push(updater);if(shouldReplace){shouldReplace=replace}return Promise.resolve().then(()=>flush())},flush:replace=>flush(replace),cancel:()=>{cleanUp()},getPendingUrl:()=>getPendingUrl()}};function getRelativeToHistoryPath(absoluteUrl,history){function stripBasename(path){if(path===null)path="";const stripLeadingHash=_=>_.charAt(0)==="#"?_.substr(1):_;const stripTrailingSlash=_=>_.charAt(_.length-1)==="/"?_.substr(0,_.length-1):_;const baseName=stripLeadingHash(stripTrailingSlash(history.createHref({})));return path.startsWith(baseName)?path.substr(baseName.length):path}const isHashHistory=history.createHref({}).includes("#");const parsedUrl=isHashHistory?parseUrlHash(absoluteUrl):parseUrl(absoluteUrl);const parsedHash=isHashHistory?null:parseUrlHash(absoluteUrl);return Object(node_modules_url_url["format"])({pathname:stripBasename(parsedUrl.pathname),search:Object(query_string["stringify"])(url_url.encodeQuery(parsedUrl.query),{sort:false,encode:false}),hash:parsedHash?Object(node_modules_url_url["format"])({pathname:parsedHash.pathname,search:Object(query_string["stringify"])(url_url.encodeQuery(parsedHash.query
1),{sort:false,encode:false})}):parsedUrl.hash})}function createOsdUrlTracker(_ref){let{baseUrl:baseUrl,defaultSubUrl:defaultSubUrl,storageKey:storageKey,stateParams:stateParams,navLinkUpdater$:navLinkUpdater$,toastNotifications:toastNotifications,history:history,getHistory:getHistory,storage:storage,shouldTrackUrlUpdate:shouldTrackUrlUpdate=(()=>true)}=_ref;const storageInstance=storage||sessionStorage;let previousActiveUrl="";let activeUrl="";let unsubscribeURLHistory;let unsubscribeGlobalState;function setNavLink(hash){navLinkUpdater$.next(()=>({defaultPath:hash}))}function getActiveSubUrl(url){return url.substr(baseUrl.length)}function unsubscribe(){if(unsubscribeURLHistory){unsubscribeURLHistory();unsubscribeURLHistory=undefined}if(unsubscribeGlobalState){unsubscribeGlobalState.forEach(sub=>sub.unsubscribe());unsubscribeGlobalState=undefined}}function setActiveUrl(newUrl){const urlWithHashes=baseUrl+"#"+newUrl;let urlWithStates="";try{urlWithStates=unhashUrl(urlWithHashes)}catch(e){toastNotifications.addDanger(e.message)}previousActiveUrl=activeUrl;activeUrl=getActiveSubUrl(urlWithStates||urlWithHashes);storageInstance.setItem(storageKey,activeUrl)}function onMountApp(){unsubscribe();const historyInstance=history||getHistory&&getHistory()||Object(node_modules_history["createHashHistory"])();unsubscribeURLHistory=historyInstance.listen(location=>{if(shouldTrackUrlUpdate(location.hash)){setActiveUrl(location.hash.substr(1))}})}function onUnmountApp(){unsubscribe();unsubscribeGlobalState=stateParams.map(_ref2=>{let{stateUpdate$:stateUpdate$,osdUrlKey:osdUrlKey}=_ref2;return stateUpdate$.subscribe(state=>{const updatedUrl=setStateToOsdUrl(osdUrlKey,state,{useHash:false},baseUrl+(activeUrl||defaultSubUrl));previousActiveUrl=activeUrl;activeUrl=getActiveSubUrl(updatedUrl);storageInstance.setItem(storageKey,activeUrl);setNavLink(activeUrl)})})}onUnmountApp();const storedUrl=storageInstance.getItem(storageKey);if(storedUrl){activeUrl=storedUrl;previousActiveUrl=storedUrl;setNavLink(storedUrl)}return{appMounted(){onMountApp();setNavLink(defaultSubUrl)},appUnMounted(){onUnmountApp();setNavLink(activeUrl)},stop(){unsubscribe()},setActiveUrl:setActiveUrl,getActiveUrl(){return activeUrl}
1,restorePreviousUrl(){activeUrl=previousActiveUrl}}}function createUrlTracker(key){let storage=arguments.length>1&&arguments[1]!==undefined?arguments[1]:sessionStorage;return{startTrackingUrl(){let history=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object(node_modules_history["createBrowserHistory"])();const track=location=>{const url=getRelativeToHistoryPath(history.createHref(location),history);storage.setItem(key,url)};track(history.location);return history.listen(track)},getTrackedUrl(){return storage.getItem(key)},trackUrl(url){storage.setItem(key,url)}}}const restoreUrlErrorTitle=external_osdSharedDeps_OsdI18n_["i18n"].translate("opensearch_dashboards_utils.stateManagement.url.restoreUrlErrorTitle",{defaultMessage:`Error restoring state from URL`});const saveStateInUrlErrorTitle=external_osdSharedDeps_OsdI18n_["i18n"].translate("opensearch_dashboards_utils.stateManagement.url.saveStateInUrlErrorTitle",{defaultMessage:`Error saving state in URL`});const withNotifyOnErrors=toasts=>({onGetError:error=>{toasts.addError(error,{id:"opensearch_dashboards_utils.state_management.url.restoreUrlError",title:restoreUrlErrorTitle})},onSetError:error=>{toasts.addError(error,{id:"opensearch_dashboards_utils.state_management.url.saveStateInUrlError",title:saveStateInUrlErrorTitle})}});const createOsdUrlStateStorage=function(){let{useHash:useHash=false,history:history,onGetError:onGetError,onSetError:onSetError}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{useHash:false};const url=createOsdUrlControls(history);return{set:function(key,state){let{replace:replace=false}=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{replace:false};return url.updateAsync(currentUrl=>{try{return setStateToOsdUrl(key,state,{useHash:useHash},currentUrl)}catch(error){if(onSetError)onSetError(error)}},replace)},get:key=>{try{return getStateFromOsdUrl(key,url.getPendingUrl())}catch(e){if(onGetError)onGetError(e);return null}},change$:key=>new external_osdSharedDeps_Rxjs_["Observable"](observer=>{const unlisten=url.listen(()=>{observer.next()});return()=>{unlisten()}}).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(()=>getStateFromOsdUrl(key)),Object(external_osdSharedDeps_RxjsOperators_["catchError"])(error=>{if(onGetError)onGetError(error);return Object(external_osdSharedDeps_Rxjs_["of"])(null)}),Object(external_osdSharedDeps_RxjsOperators_["share"])()),flush:function(){let{replace:replace=false}=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return!!url.flush(replace)},cancel(){url.cancel()}}};const createSessionStorageStateStorage=function(){let storage=arguments.length>0&&arguments[0]!==undefined?arguments[0]:window.sessionStorage;return{set:(key,state)=>storage.setItem(key,JSON.stringify(state)),get:key=>JSON.parse(storage.getItem(key))}};const filterPrivateAndMethods=function(obj){return function(key){if(Object(external_osdSharedDeps_Lodash_["isFunction"])(obj[key]))return false;if(key.charAt(0)==="$")return false;return key.charAt(0)!=="_"}};function applyDiff(target,source){const diff={removed:[],added:[],changed:[],keys:[]};const targetKeys=Object(external_osdSharedDeps_Lodash_["keys"])(target).filter(filterPrivateAndMethods(target));const sourceKeys=Object(external_osdSharedDeps_Lodash_["keys"])(source).filter(filterPrivateAndMethods(source));diff.removed=Object(external_osdSharedDeps_Lodash_["difference"])(targetKeys,sourceKeys);diff.added=Object(external_osdSharedDeps_Lodash_["difference"])(sourceKeys,targetKeys);diff.changed=Object(external_osdSharedDeps_Lodash_["filter"])(sourceKeys,key=>!Object(external_osdSharedDeps_Lodash_["isEqual"])(target[key],source[key]));diff.keys=Object(external_osdSharedDeps_Lodash_["union"])(diff.changed,diff.removed,diff.added);Object(external_osdSharedDeps_Lodash_["each"])(diff.removed,key=>{delete target[key]});Object(external_osdSharedDeps_Lodash_["assign"])(target,Object(external_osdSharedDeps_Lodash_["pick"])(source,diff.changed));Object(external_osdSharedDeps_Lodash_["assign"])(target,Object(external_osdSharedDeps_Lodash_["pick"])(source,diff.added));return diff}function syncState(_ref){let{storageKey:storageKey,stateStorage:stateStorage,stateContainer:stateContainer}=_ref;const subscriptions=[];const updateState=()=>{const newState=stateStorage.get(storageKey);const oldState=stateContainer.get();if(newState){const mergedState={...oldState};const diff=applyDiff(mergedState,newState);if(diff.keys.length>0){stateContainer.set(mergedState)}}else if(oldState!==newState){stateContainer.set(newState)}};const updateStorage=()=>{const newStorageState=stateContainer.get();const oldStorageState=stateStorage.get(storageKey);if(!fast_deep_equal_default()(newStorageState,oldStorageState)){stateStorage.set(storageKey,newStorageState)}};const onStateChange$=stateContainer.state$.pipe(distinctUntilChangedWithInitialValue(stateContainer.get(),fast_deep_equal_default.a),Object(external_osdSharedDeps_RxjsOperators_["tap"])(()=>updateStorage()));const onStorageChange$=stateStorage.change$?stateStorage.change$(storageKey).pipe(distinctUntilChangedWithInitialValue(stateStorage.get(storageKey),fast_deep_equal_default.a),Object(external_osdSharedDeps_RxjsOperators_["tap"])(()=>{updateState()})):external_osdSharedDeps_Rxjs_["EMPTY"];return{stop:()=>
1{if(stateStorage.cancel){stateStorage.cancel()}subscriptions.forEach(s=>s.unsubscribe());subscriptions.splice(0,subscriptions.length)},start:()=>{if(subscriptions.length>0){throw new Error("syncState: can't start syncing state, when syncing is in progress")}subscriptions.push(onStateChange$.subscribe(),onStorageChange$.subscribe())}}}function syncStates(stateSyncConfigs){const syncRefs=stateSyncConfigs.map(config=>syncState(config));return{stop:()=>{syncRefs.forEach(s=>s.stop())},start:()=>{syncRefs.forEach(s=>s.start())}}}function removeQueryParam(history,param){let replace=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;const oldLocation=history.location;const search=(oldLocation.search||"").replace(/^\?/,"");const query=Object(query_string["parse"])(search,{sort:false});delete query[param];const newSearch=Object(query_string["stringify"])(url_url.encodeQuery(query),{sort:false,encode:false});const newLocation={...oldLocation,search:newSearch};if(replace){history.replace(newLocation)}else{history.push(newLocation)}}var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var external_osdSharedDeps_ReactDom_=__webpack_require__(23);var external_osdSharedDeps_ReactDom_default=__webpack_require__.n(external_osdSharedDeps_ReactDom_);const ErrorRenderer=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Suspense,{fallback:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],null)},external_osdSharedDeps_React_default.a.createElement("span",null,props.children));function addNotFoundToPath(path,error){return path+(path.indexOf("?")>=0?"&":"?")+`notFound=${error.savedObjectType}¬FoundMessage=${error.message}`}function redirectWhenMissing(_ref){let{history:history,navigateToApp:navigateToApp,basePath:basePath,mapping:mapping,toastNotifications:toastNotifications,onBeforeRedirect:onBeforeRedirect}=_ref;let localMappingObject;if(typeof mapping==="string"){localMappingObject={"*":mapping}}else{localMappingObject=mapping}return error=>{if(!error.savedObjectType){throw error}let redirectTarget=localMappingObject[error.savedObjectType]||localMappingObject["*"]||"/";if(typeof redirectTarget!=="string"){redirectTarget.path=addNotFoundToPath(redirectTarget.path,error)}else{redirectTarget=addNotFoundToPath(redirectTarget,error)}toastNotifications.addWarning({title:external_osdSharedDeps_OsdI18n_["i18n"].translate("opensearch_dashboards_utils.history.savedObjectIsMissingNotificationMessage",{defaultMessage:"Saved object is missing"}),text:element=>{external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(ErrorRenderer,null,error.message),element);return()=>external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}});if(onBeforeRedirect){onBeforeRedirect(error)}if(typeof redirectTarget!=="string"){if(redirectTarget.app==="opensearch-dashboards"){window.location.href=basePath.prepend(`/app/opensearch-dashboards${redirectTarget.path}`)}else{navigateToApp(redirectTarget.app,{path:redirectTarget.path})}}else{history.replace(redirectTarget)}}}function public_plugin(){return new class OpenSearchUtilsPlugin{setup(){}start(){}}}const ServicesContext=Object(external_osdSharedDeps_React_["createContext"])(null);const ServicesConsumer=ServicesContext.Consumer;const[getUISettings,setUISettings]=createGetterSetter("UISettings");const[getNavigationUI,setNavigationUI]=createGetterSetter("navigation");const[getApplication,setApplication]=createGetterSetter("application")},function(module,exports){module.exports=__osdSharedDeps__.RxjsOperators},function(module,exports){module.exports=__osdSharedDeps__.Rxjs},function(module,exports,__webpack_require__){"use strict";var isOldIE=function isOldIE(){var memo;return function memorize(){if(typeof memo==="undefined"){memo=Boolean(window&&document&&document.all&&!window.atob)}return memo}}();var getTarget=function getTarget(){var memo={};return function memorize(target){if(typeof memo[target]==="undefined"){var styleTarget=document.querySelector(target);if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement){try{styleTarget=styleTarget.contentDocument.head}catch(e){styleTarget=null}}memo[target]=styleTarget}return memo[target]}}();var stylesInDom=[];function getIndexByIdentifier(identifier){var result=-1;for(var i=0;i<stylesInDom.length;i++){if(stylesInDom[i].identifier===identifier){result=i;break}}return result}function modulesToDom(list,options){var idCountMap={};var identifiers=[];for(var i=0;i<list.length;i++){var item=list[i];var id=options.base?item[0]+options.base:item[0];var count=idCountMap[id]||0;var identifier="".concat(id," ").concat(count);idCountMap[id]=count+1;var index=getIndexByIdentifier(identifier);var obj={css:item[1],media:item[2],sourceMap:item[3]};if(index!==-1){stylesInDom[index].references++;stylesInDom[index].updater(obj)}else{stylesInDom.push({identifier:identifier,updater:addStyle(obj,options),references:1})}identifiers.push(identifier)}return identifiers}function insertStyleElement(options){var style=document.createElement("style");var attributes=options.attributes||{};if(typeof attributes.nonce==="undefined"){var nonce=true?__webpack_require__.nc:undefined;if(nonce){attributes.nonce=nonce}}
1Object.keys(attributes).forEach((function(key){style.setAttribute(key,attributes[key])}));if(typeof options.insert==="function"){options.insert(style)}else{var target=getTarget(options.insert||"head");if(!target){throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.")}target.appendChild(style)}return style}function removeStyleElement(style){if(style.parentNode===null){return false}style.parentNode.removeChild(style)}var replaceText=function replaceText(){var textStore=[];return function replace(index,replacement){textStore[index]=replacement;return textStore.filter(Boolean).join("\n")}}();function applyToSingletonTag(style,index,remove,obj){var css=remove?"":obj.media?"@media ".concat(obj.media," {").concat(obj.css,"}"):obj.css;if(style.styleSheet){style.styleSheet.cssText=replaceText(index,css)}else{var cssNode=document.createTextNode(css);var childNodes=style.childNodes;if(childNodes[index]){style.removeChild(childNodes[index])}if(childNodes.length){style.insertBefore(cssNode,childNodes[index])}else{style.appendChild(cssNode)}}}function applyToTag(style,options,obj){var css=obj.css;var media=obj.media;var sourceMap=obj.sourceMap;if(media){style.setAttribute("media",media)}else{style.removeAttribute("media")}if(sourceMap&&typeof btoa!=="undefined"){css+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))," */")}if(style.styleSheet){style.styleSheet.cssText=css}else{while(style.firstChild){style.removeChild(style.firstChild)}style.appendChild(document.createTextNode(css))}}var singleton=null;var singletonCounter=0;function addStyle(obj,options){var style;var update;var remove;if(options.singleton){var styleIndex=singletonCounter++;style=singleton||(singleton=insertStyleElement(options));update=applyToSingletonTag.bind(null,style,styleIndex,false);remove=applyToSingletonTag.bind(null,style,styleIndex,true)}else{style=insertStyleElement(options);update=applyToTag.bind(null,style,options);remove=function remove(){removeStyleElement(style)}}update(obj);return function updateStyle(newObj){if(newObj){if(newObj.css===obj.css&&newObj.media===obj.media&&newObj.sourceMap===obj.sourceMap){return}update(obj=newObj)}else{remove()}}}module.exports=function(list,options){options=options||{};if(!options.singleton&&typeof options.singleton!=="boolean"){options.singleton=isOldIE()}list=list||[];var lastIdentifiers=modulesToDom(list,options);return function update(newList){newList=newList||[];if(Object.prototype.toString.call(newList)!=="[object Array]"){return}for(var i=0;i<lastIdentifiers.length;i++){var identifier=lastIdentifiers[i];var index=getIndexByIdentifier(identifier);stylesInDom[index].references--}var newLastIdentifiers=modulesToDom(newList,options);for(var _i=0;_i<lastIdentifiers.length;_i++){var _identifier=lastIdentifiers[_i];var _index=getIndexByIdentifier(_identifier);if(stylesInDom[_index].references===0){stylesInDom[_index].updater();stylesInDom.splice(_index,1)}}lastIdentifiers=newLastIdentifiers}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"g",(function(){return Services["a"]}));__webpack_require__.d(__webpack_exports__,"h",(function(){return Services["b"]}));__webpack_require__.d(__webpack_exports__,"b",(function(){return IndexService_IndexService}));__webpack_require__.d(__webpack_exports__,"c",(function(){return ManagedIndexService_ManagedIndexService}));__webpack_require__.d(__webpack_exports__,"e",(function(){return PolicyService_PolicyService}));__webpack_require__.d(__webpack_exports__,"f",(function(){return RollupService_RollupService}));__webpack_require__.d(__webpack_exports__,"j",(function(){return TransformService_TransformService}));__webpack_require__.d(__webpack_exports__,"d",(function(){return NotificationService_NotificationService}));__webpack_require__.d(__webpack_exports__,"i",(function(){return SnapshotManagementService_SnapshotManagementService}));__webpack_require__.d(__webpack_exports__,"a",(function(){return CommonService_CommonService}));var Services=__webpack_require__(8);var constants=__webpack_require__(14);var utils_constants=__webpack_require__(60);function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class MDSEnabledClientService{constructor(httpClient){let dataSourceId=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";let mdsEnabled=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;_defineProperty(this,"httpClient",void 0);_defineProperty(this,"dataSourceId",void 0);_defineProperty(this,"mdsEnabled",void 0);this.httpClient=httpClient;this.dataSourceId=dataSourceId;this.mdsEnabled=mdsEnabled}patchQueryObjectWithDataSourceId(queryObject){if(this.mdsEnabled){queryObject=queryObject||{};queryObject.dataSourceId=this.dataSourceId}return queryObject}}function IndexService_defineProperty(e,r,t){return(r=IndexService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IndexService_toPropertyKey(t){var i=IndexService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function IndexService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class IndexService_IndexService extends MDSEnabledClientService{constructor(){var _this;super(...arguments);_this=this;IndexService_defineProperty(this,"getIndices",async queryObject=>{let url=`..${constants["a"]._INDICES}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};return await this.httpClient.get(url,params)});
1IndexService_defineProperty(this,"getDataStreams",async queryObject=>{const url=`..${constants["a"]._DATA_STREAMS}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};return await this.httpClient.get(url,params)});IndexService_defineProperty(this,"getAliases",async queryObject=>{const url=`..${constants["a"]._ALIASES}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};return await this.httpClient.get(url,params)});IndexService_defineProperty(this,"getDataStreamsAndIndicesNames",async searchValue=>{const[getIndicesResponse,getDataStreamsResponse]=await Promise.all([this.getIndices({from:0,size:10,search:searchValue,terms:[searchValue],sortDirection:"desc",sortField:"index",showDataStreams:true}),this.getDataStreams({search:searchValue})]);if(!getIndicesResponse.ok){return{ok:false,error:getIndicesResponse.error}}if(!getDataStreamsResponse.ok){if(getDataStreamsResponse.error.startsWith(utils_constants["a"])){return{ok:true,response:{dataStreams:[],indices:getIndicesResponse.response.indices.map(index=>index.index)}}}return{ok:false,error:getDataStreamsResponse.error}}return{ok:true,response:{dataStreams:getDataStreamsResponse.response.dataStreams.map(ds=>ds.name),indices:getIndicesResponse.response.indices.map(index=>index.index)}}});IndexService_defineProperty(this,"applyPolicy",async(indices,policyId,queryObject)=>{const body={indices:indices,policyId:policyId};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const url=`..${constants["a"].APPLY_POLICY}`;return await this.httpClient.post(url,{body:JSON.stringify(body),...params})});IndexService_defineProperty(this,"editRolloverAlias",async(index,alias,queryObject)=>{const body={index:index,alias:alias};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const url=`..${constants["a"].EDIT_ROLLOVER_ALIAS}`;return await this.httpClient.post(url,{body:JSON.stringify(body),...params})});IndexService_defineProperty(this,"searchPolicies",(async function(searchValue){let source=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;const str=searchValue.trim();const query=_this.patchQueryObjectWithDataSourceId({from:0,size:10,search:str,sortDirection:"desc",sortField:"id"});const params=query?{query:query}:{};const url=`..${constants["a"].POLICIES}`;return await _this.httpClient.get(url,params)}))}}function ManagedIndexService_defineProperty(e,r,t){return(r=ManagedIndexService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ManagedIndexService_toPropertyKey(t){var i=ManagedIndexService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ManagedIndexService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ManagedIndexService_ManagedIndexService extends MDSEnabledClientService{constructor(){super(...arguments);ManagedIndexService_defineProperty(this,"getManagedIndex",async(managedIndexUuid,queryObject)=>{let url=`..${constants["a"].MANAGED_INDICES}/${managedIndexUuid}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});ManagedIndexService_defineProperty(this,"getManagedIndices",async queryObject=>{let url=`..${constants["a"].MANAGED_INDICES}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});ManagedIndexService_defineProperty(this,"getDataStreams",async queryObject=>{let url=`..${constants["a"]._DATA_STREAMS}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});ManagedIndexService_defineProperty(this,"retryManagedIndexPolicy",async(index,state,queryObject)=>{const body={index:index,state:state};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.post(`..${constants["a"].RETRY}`,{body:JSON.stringify(body),...params});return response});ManagedIndexService_defineProperty(this,"removePolicy",async(indices,queryObject)=>{const body={indices:indices};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.post(`..${constants["a"].REMOVE_POLICY}`,{body:JSON.stringify(body),...params});return response});ManagedIndexService_defineProperty(this,"changePolicy",async(indices,policyId,state,include,queryObject)=>{const body={indices:indices,policyId:policyId,state:state,include:include};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.post(`..${constants["a"].CHANGE_POLICY}`,{body:JSON.stringify(body),...params});return response})}}function PolicyService_defineProperty(e,r,t){return(r=PolicyService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function PolicyService_toPropertyKey(t){var i=PolicyService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function PolicyService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class PolicyService_PolicyService extends MDSEnabledClientService{constructor(){super(...arguments);PolicyService_defineProperty(this,"getPolicies",async queryObject=>{let url=`..${constants["a"].POLICIES}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});PolicyService_defineProperty(this,"putPolicy",async(policy,policyId,seqNo,primaryTerm)=>{let url=`..${constants["a"].POLICIES}/${policyId}`;let queryObject={seqNo:seqNo,primaryTerm:primaryTerm};const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.put(url,{body:JSON.stringify(policy),...params});return response});PolicyService_defineProperty(this,"getPolicy",async policyId=>{const url=`..${constants["a"].POLICIES}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});PolicyService_defineProperty(this,"deletePolicy",async policyId=>{const url=`..${constants["a"].POLICIES}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.delete(url,params);return response})}}function RollupService_defineProperty(e,r,t){return(r=RollupService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RollupService_toPropertyKey(t){var i=RollupService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RollupService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RollupService_RollupService extends MDSEnabledClientService{constructor(){super(...arguments);RollupService_defineProperty(this,"getRollups",async queryObject=>{let url=`..${constants["a"].ROLLUPS}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});RollupService_defineProperty(this,"putRollup",async(rollup,rollupId,seqNo,primaryTerm)=>{let url=`..${constants["a"].ROLLUPS}/${rollupId}`;const query=this.patchQueryObjectWithDataSourceId({seqNo:seqNo,primaryTerm:primaryTerm});const params=query?{query:query}:{};const response=await this.httpClient.put(url,{body:JSON.stringify(rollup),...params});return response});RollupService_defineProperty(this,"getRollup",async rollupId=>{const url=`..${constants["a"].ROLLUPS}/${rollupId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});RollupService_defineProperty(this,"deleteRollup",async rollupId=>{const url=`..${constants["a"].ROLLUPS}/${rollupId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.delete(url,params);return response});RollupService_defineProperty(this,"startRollup",async rollupId=>{const url=`..${constants["a"].ROLLUPS}/${rollupId}/_start`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,params);return response});RollupService_defineProperty(this,"stopRollup",async rollupId=>{const url=`..${constants["a"].ROLLUPS}/${rollupId}/_stop`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,params);return response});RollupService_defineProperty(this,"getMappings",async index=>{const url=`..${constants["a"]._MAPPINGS}`;const body={index:index};const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,{body:JSON.stringify(body),...params});return response})}}function TransformService_defineProperty(e,r,t){return(r=TransformService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function TransformService_toPropertyKey(t){var i=TransformService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function TransformService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class TransformService_TransformService extends MDSEnabledClientService{constructor(){super(...arguments);TransformService_defineProperty(this,"getTransforms",async queryObject=>{const url=`..${constants["a"].TRANSFORMS}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};return await this.httpClient.get(url,params)});TransformService_defineProperty(this,"putTransform",async(transform,transformId,seqNo,primaryTerm)=>{const url=`..${constants["a"].TRANSFORMS}/${transformId}`;const query=this.patchQueryObjectWithDataSourceId({seqNo:seqNo,primaryTerm:primaryTerm});const params=query?{query:query}:{};return await this.httpClient.put(url,{body:JSON.stringify(transform),...params})});TransformService_defineProperty(this,"getTransform",async transformId=>{const url=`..${constants["a"].TRANSFORMS}/${transformId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};return await this.httpClient.get(url,params)});TransformService_defineProperty(this,"deleteTransform",async transformId=>{const url=`..${constants["a"].TRANSFORMS}/${transformId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};return await this.httpClient.delete(url,params)});TransformService_defineProperty(this,"startTransform",async transformId=>{const url=`..${constants["a"].TRANSFORMS}/${transformId}/_start`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};return await this.httpClient.post(url,params)});TransformService_defineProperty(this,"stopTransform",async transformId=>{const url=`..${constants["a"].TRANSFORMS}/${transformId}/_stop`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};return await this.httpClient.post(url,params)});TransformService_defineProperty(this,"previewTransform",async transform=>{const url=`..${constants["a"].TRANSFORMS}/_preview`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};return await this.httpClient.post(url,{body:JSON.stringify(transform),...params})});TransformService_defineProperty(this,"getMappings",async index=>{const url=`..${constants["a"]._MAPPINGS}`;const body={index:index};const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,{body:JSON.stringify(body),...params});return response});TransformService_defineProperty(this,"searchSampleData",async(index,body,queryObject)=>{const url=`..${constants["a"]._SEARCH_SAMPLE_DATA}/${index}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.post(url,{body:body,...params});return response})}}function NotificationService_defineProperty(e,r,t){return(r=NotificationService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function NotificationService_toPropertyKey(t){var i=NotificationService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function NotificationService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class NotificationService_NotificationService extends MDSEnabledClientService{constructor(){super(...arguments);NotificationService_defineProperty(this,"getChannels",async()=>{let url=`..${constants["a"].CHANNELS}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});NotificationService_defineProperty(this,"getChannel",async channelId=>{let url=`..${constants["a"].CHANNELS}/${channelId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response})}}function SnapshotManagementService_defineProperty(e,r,t){return(r=SnapshotManagementService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SnapshotManagementService_toPropertyKey(t){var i=SnapshotManagementService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SnapshotManagementService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SnapshotManagementService_SnapshotManagementService extends MDSEnabledClientService{constructor(){super(...arguments);SnapshotManagementService_defineProperty(this,"getAllSnapshotsWithPolicy",async()=>{let url=`..${constants["a"]._SNAPSHOTS}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"getSnapshot",async(snapshotId,repository)=>{let url=`..${constants["a"]._SNAPSHOTS}/${snapshotId}`;const query=this.patchQueryObjectWithDataSourceId({repository:repository});const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"deleteSnapshot",async(snapshotId,repository)=>{let url=`..${constants["a"]._SNAPSHOTS}/${snapshotId}`;const query=this.patchQueryObjectWithDataSourceId({repository:repository});const params=query?{query:query}:{};const response=await this.httpClient.delete(url,params);return response});SnapshotManagementService_defineProperty(this,"createSnapshot",async(snapshotId,repository,snapshot)=>{let url=`..${const
1ants["a"]._SNAPSHOTS}/${snapshotId}`;const query=this.patchQueryObjectWithDataSourceId({repository:repository});const params=query?{query:query}:{};const response=await this.httpClient.put(url,{body:JSON.stringify(snapshot),...params});return response});SnapshotManagementService_defineProperty(this,"restoreSnapshot",async(snapshotId,repository,options)=>{let url=`..${constants["a"]._SNAPSHOTS}/${snapshotId}`;const query=this.patchQueryObjectWithDataSourceId({repository:repository});const params=query?{query:query}:{};const response=await this.httpClient.post(url,{body:JSON.stringify(options),...params});return response});SnapshotManagementService_defineProperty(this,"getIndexRecovery",async()=>{const url=constants["a"]._RECOVERY;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"createPolicy",async(policyId,policy)=>{let url=`..${constants["a"].SMPolicies}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.post(url,{body:JSON.stringify(policy),...params});return response});SnapshotManagementService_defineProperty(this,"updatePolicy",async(policyId,policy,seqNo,primaryTerm)=>{let url=`..${constants["a"].SMPolicies}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId({seqNo:seqNo,primaryTerm:primaryTerm});const params=query?{query:query}:{};const response=await this.httpClient.put(url,{body:JSON.stringify(policy),...params});return response});SnapshotManagementService_defineProperty(this,"getPolicies",async queryObject=>{let url=`..${constants["a"].SMPolicies}`;const query=this.patchQueryObjectWithDataSourceId(queryObject);const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"getPolicy",async policyId=>{const url=`..${constants["a"].SMPolicies}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"deletePolicy",async policyId=>{const url=`..${constants["a"].SMPolicies}/${policyId}`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.delete(url,params);return response});SnapshotManagementService_defineProperty(this,"startPolicy",async policyId=>{const url=`..${constants["a"].SMPolicies}/${policyId}/_start`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,params);return response});SnapshotManagementService_defineProperty(this,"stopPolicy",async policyId=>{const url=`..${constants["a"].SMPolicies}/${policyId}/_stop`;const query=this.patchQueryObjectWithDataSourceId();const params=query?{query:query}:{};const response=await this.httpClient.post(url,params);return response});SnapshotManagementService_defineProperty(this,"catRepositories",async()=>{const url=`..${constants["a"]._REPOSITORIES}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url,params);return response});SnapshotManagementService_defineProperty(this,"catSnapshotIndices",async indices=>{const url=`..${constants["a"]._INDICES}/${indices}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url);return response});SnapshotManagementService_defineProperty(this,"getRepository",async repo=>{const url=`..${constants["a"]._REPOSITORIES}/${repo}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.get(url);return response});SnapshotManagementService_defineProperty(this,"createRepository",async(repo,createRepoBody)=>{const url=`..${constants["a"]._REPOSITORIES}/${repo}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.put(url,{body:JSON.stringify(createRepoBody),...params});return response});SnapshotManagementService_defineProperty(this,"deleteRepository",async repo=>{const url=`..${constants["a"]._REPOSITORIES}/${repo}`;const query=this.patchQueryObjectWithDataSourceId({});const params=query?{query:query}:{};const response=await this.httpClient.delete(url,params);return response})}}function CommonService_defineProperty(e,r,t){return(r=CommonService_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CommonService_toPropertyKey(t){var i=CommonService_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CommonService_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CommonService_CommonService extends MDSEnabledClientService{constructor(){super(...arguments);CommonService_defineProperty(this,"apiCaller",async(params,queryObject)=>{let url=`${constants["a"].API_CALLER}`;const payload={};queryObject=this.patchQueryObjectWithDataSourceId(queryObject);payload.method="POST";payload.body=JSON.stringify({data:params.data,endpoint:params.endpoint,hideL
1og:params.hideLog});payload.query=queryObject;return await this.httpClient.fetch(url,payload)});CommonService_defineProperty(this,"accountInfo",async params=>{let url=`${constants["a"].ACCOUNT_INFO}`;const payload={};payload.method="POST";payload.body=JSON.stringify({data:params.data,endpoint:params.endpoint,hideLog:params.hideLog});return await this.httpClient.fetch(url,payload)})}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return OptionalLabel}));__webpack_require__.d(__webpack_exports__,"b",(function(){return CustomFormRow}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function OptionalLabel(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i",null," â optional")}function CustomFormRow(props){const{helpText:helpText,children:children,position:position="top",direction:direction="ver",label:label,isOptional:isOptional,...others}=props;if(direction==="hoz"){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiDescribedFormGroup"],{fullWidth:true,descriptionFlexItemProps:{style:{maxWidth:700}},title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,label,isOptional?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(OptionalLabel,null):null),description:helpText},children?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiCompressedFormRow"],others,children):null)}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiCompressedFormRow"],_extends({},others,{label:isOptional?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,label,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(OptionalLabel,null)):label,helpText:position==="bottom"?helpText:undefined}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,helpText&&position==="top"?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{paddingTop:0,paddingBottom:4},className:"euiFormHelpText euiFormRow__text"},helpText):null,children))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return NODE_API}));__webpack_require__.d(__webpack_exports__,"b",(function(){return REQUEST}));__webpack_require__.d(__webpack_exports__,"d",(function(){return SYSTEM_INDEX}));__webpack_require__.d(__webpack_exports__,"c",(function(){return SYSTEM_ALIAS}));const BASE_API_PATH="/api/ism";const NODE_API=Object.freeze({_SEARCH:`${BASE_API_PATH}/_search`,_SEARCH_SAMPLE_DATA:`${BASE_API_PATH}/_searchSampleData`,_INDICES:`${BASE_API_PATH}/_indices`,_DATA_STREAMS:`${BASE_API_PATH}/_data_streams`,_ALIASES:`${BASE_API_PATH}/_aliases`,_MAPPINGS:`${BASE_API_PATH}/_mappings`,APPLY_POLICY:`${BASE_API_PATH}/applyPolicy`,EDIT_ROLLOVER_ALIAS:`${BASE_API_PATH}/editRolloverAlias`,POLICIES:`${BASE_API_PATH}/policies`,_RECOVERY:`${BASE_API_PATH}/_recovery`,ROLLUPS:`${BASE_API_PATH}/rollups`,TRANSFORMS:`${BASE_API_PATH}/transforms`,MANAGED_INDICES:`${BASE_API_PATH}/managedIndices`,CHANNELS:`${BASE_API_PATH}/_notifications/channels`,RETRY:`${BASE_API_PATH}/retry`,CHANGE_POLICY:`${BASE_API_PATH}/changePolicy`,REMOVE_POLICY:`${BASE_API_PATH}/removePolicy`,SMPolicies:`${BASE_API_PATH}/smPolicies`,_SNAPSHOTS:`${BASE_API_PATH}/_snapshots`,_REPOSITORIES:`${BASE_API_PATH}/_repositores`,PUT_INDEX:`${BASE_API_PATH}/putIndex`,API_CALLER:`${BASE_API_PATH}/apiCaller`,ACCOUNT_INFO:`${BASE_API_PATH}/accountInfo`});const REQUEST=Object.freeze({PUT:"PUT",DELETE:"DELETE",GET:"GET",POST:"POST",HEAD:"HEAD"});const SYSTEM_INDEX=[".plugins-ml-model",".plugins-ml-task",".opendistro-alerting-config",".opendistro-alerting-alert*",".opendistro-anomaly-results*",".opendistro-anomaly-detector*",".opendistro-anomaly-checkpoints",".opendistro-anomaly-detection-state",".opendistro-reports-*",".opensearch-notifications-*",".opensearch-notebooks",".opensearch-observability",".opendistro-asynchronous-search-response*",".opendistro_security",".opendistro-job-scheduler-lock",".opendistro-ism-config",".replication-metadata-store","kibana*",".kibana*",".tasks"];const SYSTEM_ALIAS=[".plugins*",".opendistro*",".opensearch*",".replication-metadata-store","kibana*",".kibana*",".tasks"]},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ActionType}));__webpack_require__.d(__webpack_exports__,"q",(function(){return EMPTY_DEFAULT_POLICY}));__webpack_require__.d(__webpack_exports__,"b",(function(){return DEFAULT_ALIAS}));__webpack_require__.d(__webpack_exports__,"c",(function(){return DEFAULT_ALLOCATION}));__webpack_require__.d(__webpack_exports__,"d",(function(){return DEFAULT_CLOSE}));__webpack_require__.d(__webpack_exports__,"e",(function(){return DEFAULT_DELETE}));__webpack_require__.d(__webpack_exports__,"f",(function(){return DEFAULT_FORCE_MERGE}));__webpack_require__.d(__webpack_exports__,"g",(function(){return DEFAULT_INDEX_PRIORITY}));__webpack_require__.d(__webpack_exports__,"h",(function(){return DEFAULT_NOTIFICATION}));__webpack_require__.d(__webpack_exports__,"i",(function(){return DEFAULT_OPEN}));__webpack_require__.d(__webpack_exports__,"j",(function(){return DEFAULT_READ_ONLY}));__webpack_require__.d(__webpack_exports__,"k",(function(){return DEFAULT_READ_WRITE}));__webpack_require__.d(__webpack_exports__,"l",(function(){return DEFAULT_REPLICA_COUNT}));__webpack_require__.d(__webpack_exports__,"m",(function(){return DEFAULT_ROLLOVER}));__webpack_require__.d(__webpack_exports__,"n",(function(){return DEFAULT_ROLLUP}));__webpack_require__.d(__webpack_exports__,"o",(function(){return DEFAULT_SHRINK}));__webpack_require__.d(__webpack_exports__,"p",(function(){return DEFAULT_SNAPSHOT}));__webpack_require__.d(__webpack_exports__,"r",(function(){return ISM_TEMPLATE_INPUT_MAX_WIDTH}));let ActionType=function(ActionType){ActionType["Alias"]="alias";ActionType["Allocation"]="allocation";ActionType["Close"]="close";ActionType["Delete"]="delete";ActionType["ForceMerge"]="force_merge";ActionType["IndexPriority"]="index_priority";ActionType["Notification"]="notification";ActionType["Open"]="open";ActionType["ReadOnly"]="read_only";ActionType["ReadWrite"]="read_write";ActionType["ReplicaCount"]="replica_count";ActionType["Rollover"]="rollover";ActionType["Rollup"]="rollup";ActionType["Shrink"]="shrink";ActionType["Snapshot"]="snapshot";return ActionType}({});const DEFAULT_POLICY={description:"A simple default policy that changes the replica count between hot and cold states.",default_state:"hot",states:[{name:"hot",actions:[{replica_count:{number_of_replicas:5}}],transitions:[{state_name:"cold",conditions:{min_index_age:"30d"}}]},{name:"cold",actions:[{replica_count:{number_of_replicas:2}}],transitions:[]}],ism_template:[]};const EMPTY_DEFAULT_POLICY={description:"A sample description of the policy",default_state:"",states:[],ism_template:[]};const DEFAULT_LEGACY_ERROR_NOTIFICATION={destination:{slack:{url:"<url>"}},message_template:{source:"The index {{ctx.index}} failed during policy execution."}};const DEFAULT_ALIAS={alias:{actions:[]}};const DEFAULT_ALLOCATION={allocation:{require:{},include:{},exclude:{},wait_for:false}};const DEFAULT_CLOSE={close:{}};const DEFAULT_DELETE={delete:{}};const DEFAULT_FORCE_MERGE={force_merge:{max_num_segments:1}};const DEFAULT_INDEX_PRIORITY={index_priority:{priority:1}};const DEFAULT_NOTIFICATION={notification:{channel:{id:""},message_template:{source:""}}};const DEFAULT_OPEN={open:{}};const DEFAULT_READ_ONLY={read_only:{}};const DEFAULT_READ_WRITE={read_write:{}};const DEFAULT_REPLICA_COUNT={replica_count:{number_of_replicas:1}};const DEFAULT_ROLLOVER={rollover:{min_doc_count:5}};const DEFAULT_ROLLUP={rollup:{jsonString:JSON.stringify({ism_rollup:{target_index:"rollup-nyc-taxi-data",description:"Example rollup job",page_size:200,dimensions:[{date_histogram:{source_field:"tpep_pickup_datetime",fixed_interval:"1h",timezone:"America/Los_Angeles"}},{terms:{source_field:"PULocationID"}}],metrics:[{source_field:"passenger_count",metrics:[{avg:{}},{sum:{}},{max:{}},{min:{}},{value_count:{}}]}]}},null,4)}};const DEFAULT_SHRINK={shrink:{percentage_of_source_shards:.5,force_unsafe:false,target_index_name_template:{source:"{{ctx.index}}_shrunken"}},force_unsafe_input:"no"};const DEFAULT_SNAPSHOT={snapshot:{repository:"example-repository",snapshot:"example-snapsh
1ot"}};const actions=[DEFAULT_ALIAS,DEFAULT_ALLOCATION,DEFAULT_CLOSE,DEFAULT_DELETE,DEFAULT_FORCE_MERGE,DEFAULT_INDEX_PRIORITY,DEFAULT_NOTIFICATION,DEFAULT_OPEN,DEFAULT_READ_ONLY,DEFAULT_READ_WRITE,DEFAULT_REPLICA_COUNT,DEFAULT_ROLLOVER,DEFAULT_ROLLUP,DEFAULT_SHRINK,DEFAULT_SNAPSHOT];const ISM_TEMPLATE_INPUT_MAX_WIDTH="400px"},function(module,exports,__webpack_require__){"use strict";const strictUriEncode=__webpack_require__(441);const decodeComponent=__webpack_require__(442);const splitOnFirst=__webpack_require__(443);const filterObject=__webpack_require__(444);const isNullOrUndefined=value=>value===null||value===undefined;function encoderForArrayFormat(options){switch(options.arrayFormat){case"index":return key=>(result,value)=>{const index=result.length;if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===""){return result}if(value===null){return[...result,[encode(key,options),"[",index,"]"].join("")]}return[...result,[encode(key,options),"[",encode(index,options),"]=",encode(value,options)].join("")]};case"bracket":return key=>(result,value)=>{if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===""){return result}if(value===null){return[...result,[encode(key,options),"[]"].join("")]}return[...result,[encode(key,options),"[]=",encode(value,options)].join("")]};case"comma":case"separator":return key=>(result,value)=>{if(value===null||value===undefined||value.length===0){return result}if(result.length===0){return[[encode(key,options),"=",encode(value,options)].join("")]}return[[result,encode(value,options)].join(options.arrayFormatSeparator)]};default:return key=>(result,value)=>{if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===""){return result}if(value===null){return[...result,encode(key,options)]}return[...result,[encode(key,options),"=",encode(value,options)].join("")]}}}function parserForArrayFormat(options){let result;switch(options.arrayFormat){case"index":return(key,value,accumulator)=>{result=/\[(\d*)\]$/.exec(key);key=key.replace(/\[\d*\]$/,"");if(!result){accumulator[key]=value;return}if(accumulator[key]===undefined){accumulator[key]={}}accumulator[key][result[1]]=value};case"bracket":return(key,value,accumulator)=>{result=/(\[\])$/.exec(key);key=key.replace(/\[\]$/,"");if(!result){accumulator[key]=value;return}if(accumulator[key]===undefined){accumulator[key]=[value];return}accumulator[key]=[].concat(accumulator[key],value)};case"comma":case"separator":return(key,value,accumulator)=>{const isArray=typeof value==="string"&&value.includes(options.arrayFormatSeparator);const isEncodedArray=typeof value==="string"&&!isArray&&decode(value,options).includes(options.arrayFormatSeparator);value=isEncodedArray?decode(value,options):value;const newValue=isArray||isEncodedArray?value.split(options.arrayFormatSeparator).map(item=>decode(item,options)):value===null?value:decode(value,options);accumulator[key]=newValue};default:return(key,value,accumulator)=>{if(accumulator[key]===undefined){accumulator[key]=value;return}accumulator[key]=[].concat(accumulator[key],value)}}}function validateArrayFormatSeparator(value){if(typeof value!=="string"||value.length!==1){throw new TypeError("arrayFormatSeparator must be single character string")}}function encode(value,options){if(options.encode){return options.strict?strictUriEncode(value):encodeURIComponent(value)}return value}function decode(value,options){if(options.decode){return decodeComponent(value)}return value}function keysSorter(input){if(Array.isArray(input)){return input.sort()}if(typeof input==="object"){return keysSorter(Object.keys(input)).sort((a,b)=>Number(a)-Number(b)).map(key=>input[key])}return input}function removeHash(input){const hashStart=input.indexOf("#");if(hashStart!==-1){input=input.slice(0,hashStart)}return input}function getHash(url){let hash="";const hashStart=url.indexOf("#");if(hashStart!==-1){hash=url.slice(hashStart)}return hash}
1function extract(input){input=removeHash(input);const queryStart=input.indexOf("?");if(queryStart===-1){return""}return input.slice(queryStart+1)}function parseValue(value,options){if(options.parseNumbers&&!Number.isNaN(Number(value))&&(typeof value==="string"&&value.trim()!=="")){value=Number(value)}else if(options.parseBooleans&&value!==null&&(value.toLowerCase()==="true"||value.toLowerCase()==="false")){value=value.toLowerCase()==="true"}return value}function parse(query,options){options=Object.assign({decode:true,sort:true,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:false,parseBooleans:false},options);validateArrayFormatSeparator(options.arrayFormatSeparator);const formatter=parserForArrayFormat(options);const ret=Object.create(null);if(typeof query!=="string"){return ret}query=query.trim().replace(/^[?#&]/,"");if(!query){return ret}for(const param of query.split("&")){if(param===""){continue}let[key,value]=splitOnFirst(options.decode?param.replace(/\+/g," "):param,"=");value=value===undefined?null:["comma","separator"].includes(options.arrayFormat)?value:decode(value,options);formatter(decode(key,options),value,ret)}for(const key of Object.keys(ret)){const value=ret[key];if(typeof value==="object"&&value!==null){for(const k of Object.keys(value)){value[k]=parseValue(value[k],options)}}else{ret[key]=parseValue(value,options)}}if(options.sort===false){return ret}return(options.sort===true?Object.keys(ret).sort():Object.keys(ret).sort(options.sort)).reduce((result,key)=>{const value=ret[key];if(Boolean(value)&&typeof value==="object"&&!Array.isArray(value)){result[key]=keysSorter(value)}else{result[key]=value}return result},Object.create(null))}exports.extract=extract;exports.parse=parse;exports.stringify=(object,options)=>{if(!object){return""}options=Object.assign({encode:true,strict:true,arrayFormat:"none",arrayFormatSeparator:","},options);validateArrayFormatSeparator(options.arrayFormatSeparator);const shouldFilter=key=>options.skipNull&&isNullOrUndefined(object[key])||options.skipEmptyString&&object[key]==="";const formatter=encoderForArrayFormat(options);const objectCopy={};for(const key of Object.keys(object)){if(!shouldFilter(key)){objectCopy[key]=object[key]}}const keys=Object.keys(objectCopy);if(options.sort!==false){keys.sort(options.sort)}return keys.map(key=>{const value=object[key];if(value===undefined){return""}if(value===null){return encode(key,options)}if(Array.isArray(value)){return value.reduce(formatter(key),[]).join("&")}return encode(key,options)+"="+encode(value,options)}).filter(x=>x.length>0).join("&")};exports.parseUrl=(url,options)=>{options=Object.assign({decode:true},options);const[url_,hash]=splitOnFirst(url,"#");return Object.assign({url:url_.split("?")[0]||"",query:parse(extract(url),options)},options&&options.parseFragmentIdentifier&&hash?{fragmentIdentifier:decode(hash,options)}:{})};exports.stringifyUrl=(object,options)=>{options=Object.assign({encode:true,strict:true},options);const url=removeHash(object.url).split("?")[0]||"";const queryFromUrl=exports.extract(object.url);const parsedQueryFromUrl=exports.parse(queryFromUrl,{sort:false});const query=Object.assign(parsedQueryFromUrl,object.query);let queryString=exports.stringify(query,options);if(queryString){queryString=`?${queryString}`}let hash=getHash(object.url);if(object.fragmentIdentifier){hash=`#${encode(object.fragmentIdentifier,options)}`}return`${url}${queryString}${hash}`};exports.pick=(input,filter,options)=>{options=Object.assign({parseFragmentIdentifier:true},options);const{url:url,query:query,fragmentIdentifier:fragmentIdentifier}=exports.parseUrl(input,options);return exports.stringifyUrl({url:url,query:filterObject(query,filter),fragmentIdentifier:fragmentIdentifier},options)};exports.exclude=(input,filter,options)=>{const exclusionFilter=Array.isArray(filter)?key=>!filter.includes(key):(key,value)=>!filter(key,value);return exports.pick(input,exclusionFilter,options)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return ModalConsumer}));__webpack_require__.d(__webpack_exports__,"c",(function(){return Modal_ModalProvider}));__webpack_require__.d(__webpack_exports__,"d",(function(){return Modal_ModalRoot}));__webpack_require__.d(__webpack_exports__,"a",(function(){return Modal}));var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ReactDom_=__webpack_require__(23);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ModalContext=Object(external_osdSharedDeps_React_["createContext"])({component:null,props:{},onShow:(component,props)=>{},onClose:()=>{}});const ModalConsumer=ModalContext.Consumer;class Modal_ModalProvider extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);_defineProperty(this,"state",{component:null,props:{}});_defineProperty(this,"onShow",(component,props)=>{this.setState({component:component,props:props})});_defineProperty(this,"onClose",()=>{this.setState({component:null,props:{}})})}render(){return external_osdSharedDeps_React_default.a.createElement(ModalContext.Provider,{value:{...this.state,onShow:this.onShow,onClose:this.onClose}},this.props.children)}}const blank=()=>null;const SimpleModal=props=>{const[modalVisible,setModalVisible]=Object(external_osdSharedDeps_React_["useState"])(props.visible===undefined?true:props.visible);const{title:title,content:content,locale:locale,onOk:onOk=blank,onCancel:onCancel=blank,onClose:onClose
1=blank,visible:visible,footer:footer=["confirm","cancel"],confirmButtonProps:confirmButtonProps,CancelButtonComponent:CancelButtonComponent=external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],...others}=props;const testSubj=props["data-test-subj"]||title||Date.now();const defaultLocale={ok:"OK",confirm:"Confirm",cancel:"Cancel"};const finalLocale={...defaultLocale,...locale};const close=()=>{if(props.visible===undefined){setModalVisible(false)}onClose()};Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible!==undefined){setModalVisible(visible)}},[visible]);return modalVisible?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],_extends({},others,{onClose:close}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],{style:{width:"100%"}},external_osdSharedDeps_React_default.a.createElement("h1",null,title))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],props.bodyProps,content),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,props.type==="confirm"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,footer.map(item=>{if(item==="confirm"){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],_extends({key:item,fill:true,color:"primary","data-test-subj":`${testSubj}-confirm`,onClick:async()=>{try{await onOk();close()}catch(e){}}},confirmButtonProps),finalLocale.confirm)}else if(item==="cancel"){return external_osdSharedDeps_React_default.a.createElement(CancelButtonComponent,{key:item,"data-test-subj":`${testSubj}-cancel`,onClick:async()=>{await onCancel();close()}},finalLocale.cancel)}})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,color:"primary","data-test-subj":`${testSubj}-ok`,onClick:async()=>{try{await onOk();close()}catch(e){}}},finalLocale.ok)))):null};const Modal={show:props=>{const dom=document.createElement("div");document.body.appendChild(dom);const close=()=>{dom.remove()};Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(SimpleModal,_extends({},props,{onClose:close})),dom)},SimpleModal:SimpleModal};function ModalRoot_extends(){return ModalRoot_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ModalRoot_extends.apply(null,arguments)}const ModalRoot=_ref=>{let{services:services}=_ref;return external_osdSharedDeps_React_default.a.createElement(ModalConsumer,null,_ref2=>{let{component:Komponent,props:props,onClose:onClose}=_ref2;return Komponent?external_osdSharedDeps_React_default.a.createElement(Komponent,ModalRoot_extends({},props,{onClose:onClose,services:services})):null})};var Modal_ModalRoot=ModalRoot},function(module,exports){module.exports=__osdSharedDeps__.ReactRouterDom},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return NavGroupType}));__webpack_require__.d(__webpack_exports__,"a",(function(){return NavGroupStatus}));var capabilities=__webpack_require__(70);let UiSettingScope=function(UiSettingScope){UiSettingScope["GLOBAL"]="global";UiSettingScope["USER"]="user";UiSettingScope["WORKSPACE"]="workspace";return UiSettingScope}({});let PermissionModeId=function(PermissionModeId){PermissionModeId["Read"]="read";PermissionModeId["ReadAndWrite"]="read+write";PermissionModeId["Owner"]="owner";return PermissionModeId}({});let WorkspacePermissionMode=function(WorkspacePermissionMode){WorkspacePermissionMode["Read"]="read";
1WorkspacePermissionMode["Write"]="write";WorkspacePermissionMode["LibraryRead"]="library_read";WorkspacePermissionMode["LibraryWrite"]="library_write";return WorkspacePermissionMode}({});let NavGroupType=function(NavGroupType){NavGroupType["SYSTEM"]="system";return NavGroupType}({});let NavGroupStatus=function(NavGroupStatus){NavGroupStatus[NavGroupStatus["Visible"]=0]="Visible";NavGroupStatus[NavGroupStatus["Hidden"]=1]="Hidden";return NavGroupStatus}({})},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return AliasActions}));__webpack_require__.d(__webpack_exports__,"c",(function(){return GROUP_TYPES}));__webpack_require__.d(__webpack_exports__,"d",(function(){return TRANSFORM_AGG_TYPE}));let AliasActions=function(AliasActions){AliasActions["ADD"]="add";AliasActions["REMOVE"]="remove";return AliasActions}({});let GROUP_TYPES=function(GROUP_TYPES){GROUP_TYPES["histogram"]="histogram";GROUP_TYPES["dateHistogram"]="date_histogram";GROUP_TYPES["terms"]="terms";return GROUP_TYPES}({});let TRANSFORM_AGG_TYPE=function(TRANSFORM_AGG_TYPE){TRANSFORM_AGG_TYPE["sum"]="sum";TRANSFORM_AGG_TYPE["max"]="max";TRANSFORM_AGG_TYPE["min"]="min";TRANSFORM_AGG_TYPE["avg"]="avg";TRANSFORM_AGG_TYPE["value_count"]="value_count";TRANSFORM_AGG_TYPE["percentiles"]="percentiles";TRANSFORM_AGG_TYPE["scripted_metric"]="scripted_metric";TRANSFORM_AGG_TYPE["terms"]="terms";TRANSFORM_AGG_TYPE["histogram"]="histogram";TRANSFORM_AGG_TYPE["date_histogram"]="date_histogram";return TRANSFORM_AGG_TYPE}({})},function(module,exports){module.exports=__osdSharedDeps__.OsdI18nReact},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var tslib_1=__webpack_require__(240);var react_1=__webpack_require__(0);var useIsomorphicLayoutEffect_1=tslib_1.__importDefault(__webpack_require__(241));function useObservable(observable$,initialValue){var _a=react_1.useState(initialValue),value=_a[0],update=_a[1];useIsomorphicLayoutEffect_1.default((function(){var s=observable$.subscribe(update);return function(){return s.unsubscribe()}}),[observable$]);return value}exports.default=useObservable},function(module,exports){module.exports=__osdSharedDeps__.ReactDom},function(module,__webpack_exports__,__webpack_require__){"use strict";var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);const EuiFormCustomLabel=_ref=>{let{title:title,helpText:helpText,learnMore:learnMore=null,textStyle:textStyle={marginBottom:"5px"},headerStyle:headerStyle={marginBottom:"2px"},isInvalid:isInvalid=false,isOptional:isOptional=false}=_ref;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{style:textStyle,size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",{style:headerStyle,className:`euiFormLabel ${isInvalid?"euiFormLabel-isInvalid":""}`},title,isOptional?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("span",{className:"euiTextColor euiTextColor--subdued"},external_osdSharedDeps_React_default.a.createElement("em",null,"â optional"))):null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{style:textStyle,size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null," ",helpText&&external_osdSharedDeps_React_default.a.createElement("span",{style:{fontWeight:300,fontSize:"14px"}},helpText," ",learnMore))))};var EuiFormCustomLabel_EuiFormCustomLabel=EuiFormCustomLabel;var components_EuiFormCustomLabel=__webpack_exports__["a"]=EuiFormCustomLabel_EuiFormCustomLabel},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"d",(function(){return listenEvent}));__webpack_require__.d(__webpack_exports__,"c",(function(){return destroyListener}));__webpack_require__.d(__webpack_exports__,"a",(function(){return EVENT_MAP}));__webpack_require__.d(__webpack_exports__,"b",(function(){return JobHandlerRegister}));var JobSchedulerContext=__webpack_require__(35);var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var services=__webpack_require__(12);const EVENT_MAP={REINDEX_COMPLETE:"REINDEX_COMPLETE",SPLIT_COMPLETE:"SPLIT_COMPLETE",SHRINK_COMPLETE:"SHRINK_COMPLETE",FORCE_MERGE_COMPLETE:"FORCE_MERGE_COMPLETE",OPEN_COMPLETE:"OPEN_COMPLETE"};const triggerEvent=(eventName,data)=>{const event=new CustomEvent(eventName,{detail:data});window.dispatchEvent(event)};const listenEvent=(eventName,callback)=>{window.addEventListener(eventName,callback)};const destroyListener=(eventName,callback)=>{window.removeEventListener(eventName,callback)};var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var constants=__webpack_require__(2);
1const FormatResourceWithClusterInfo=props=>{var _props$clusterInfo;return(_props$clusterInfo=props.clusterInfo)!==null&&_props$clusterInfo!==void 0&&_props$clusterInfo.cluster_name?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,props.clusterInfo.cluster_name,"/",props.resource):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,props.resource)};const FormatResourcesWithClusterInfo=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,props.resources.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("span",{key:item},index>0&&", ",external_osdSharedDeps_React_default.a.createElement(FormatResourceWithClusterInfo,{resource:item,clusterInfo:props.clusterInfo}))));const DetailLink=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].INDEX_DETAIL}/${props.writingIndex?props.writingIndex:props.index}`},external_osdSharedDeps_React_default.a.createElement(FormatResourceW
1ithClusterInfo,{resource:props.index,clusterInfo:props.clusterInfo}));var Modal=__webpack_require__(17);const ErrorToastContentForJob=props=>{const{shortError:shortError=null,fullError:fullError}=props;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement("div",null,shortError),fullError?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{Modal["a"].show({locale:{ok:"Close"},title:shortError||"",content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("div",null,fullError))})},style:{float:"right"},color:"danger"},"See full error")):null)};const callbackForReindex=async(job,_ref)=>{let{core:core}=_ref;const extras=job.extras;const commonService=new services["a"](core.http);const tasksResult=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/_tasks/${extras.taskId}`,method:"GET"}});if(tasksResult.ok){const _source=tasksResult.response;const{completed:completed,response:response,error:error}=_source||{};const{failures:failures,canceled:canceled}=response||{};if(completed){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}if(canceled){core.notifications.toasts.addDanger({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Reindex operation on ",external_osdSharedDeps_React_default.a.createElement(FormatResourceW
1ithClusterInfo,{resource:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has been cancelled"),text:`The reindex job has been cancelled ${canceled}.`},{toastLifeTimeMs:1e3*60*60*24*5});return true}if(failures!==null&&failures!==void 0&&failures.length||error!==null&&error!==void 0&&error.reason){core.notifications.toasts.addDanger({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Reindex operation on ",external_osdSharedDeps_React_default.a.createElement(FormatResourceWithClusterInfo,{resource:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has failed"),text:external_osdSharedDeps_React_default.a.createElement(ErrorToastContentForJob,{shortError:(error===null||error===void 0?void 0:error.reason)||external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,(failures===null||failures===void 0?void 0:failures.length)||0," error(s) were found"),fullError:failures!==null&&failures!==void 0&&failures.length?external_osdSharedDeps_React_default.a.createElement("ul",{key:"response.failures"},failures.map(item=>{var _item$cause;return external_osdSharedDeps_React_default.a.createElement("li",{key:item.id},item.id||"",": ",(_item$cause=item.cause)===null||_item$cause===void 0?void 0:_item$cause.reason)})):undefined})},{toastLifeTimeMs:1e3*60*60*24*5});return true}triggerEvent(EVENT_MAP.REINDEX_COMPLETE,job);core.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Reindex operation on ",external_osdSharedDeps_React_default.a.createElement(FormatResourceW
1ithClusterInfo,{resource:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has been completed."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The reindexed index is ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.writingIndex,clusterInfo:extras.clusterInfo}),".")},{toastLifeTimeMs:1e3*60*60*24*5});return true}}return false};const callbackForReindexTimeout=(job,_ref2)=>{let{core:core}=_ref2;const extras=job.extras;if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addWarning({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Reindex on ",external_osdSharedDeps_React_default.a.createElement(FormatResourceWithClusterInfo,{resource:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has timed out."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The reindex operation has taken more than one hour to complete. To see the latest status, use `GET /_tasks/",extras.taskId,"`")},{toastLifeTimeMs:1e3*60*60*24*5});return Promise.resolve(true)};const callbackForSplit=async(job,_ref)=>{let{core:core}=_ref;const extras=job.extras;const commonService=new services["a"](core.http);if(job.extras.taskId){const tasksResult=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/_tasks/${extras.taskId}`,method:"GET"}});if(tasksResult.ok){const _source=tasksResult.response;const{completed:completed,error:error}=_source||{};if(completed){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}if(!(error!==null&&error!==void 0&&error.reason)){triggerEvent(EVENT_MAP.SPLIT_COMPLETE,job);core.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Split operation on ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has been completed."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The split index is ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.destIndex,clusterInfo:extras.clusterInfo}),".")},{toastLifeTimeMs:1e3*60*60*24*5})}else{core.notifications.toasts.addDanger({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Split operation on ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has failed."),text:external_osdSharedDeps_React_default.a.createElement("div",{style:{maxHeight:"30vh",overflowY:"auto"}},error.reason)},{toastLifeTimeMs:1e3*60*60*24*5})}return true}}}return false};const callbackForSplitTimeout=(job,_ref2)=>{let{core:core}=_ref2;const extras=job.extras;if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addWarning({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Split operation on ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has timed out."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The split operation has taken more than one hour to complete. To see the latest status, use `GET /_tasks/",extras.taskId,"`")},{toastLifeTimeMs:1e3*60*60*24*5});return Promise.resolve(true)};const callbackForShrink=async(job,_ref)=>{let{core:core}=_ref;const extras=job.extras;const commonService=new services["a"](core.http);if(extras.taskId){const tasksResult=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/_tasks/${extras.taskId}`,method:"GET"}});if(tasksResult.ok){const _source=tasksResult.response;const{completed:completed,error:error}=_source||{};if(completed){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}if(!(error!==null&&error!==void 0&&error.reason)){triggerEvent(EVENT_MAP.SHRINK_COMPLETE,job);core.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Shrink operation on ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has been completed."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The shrunken index is ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.destIndex,clusterInfo:extras.clusterInfo}),".")},{toastLifeTimeMs:1e3*60*60*24*5})}else{core.notifications.toasts.addDanger({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Shrink operation on ",external_osdSharedDeps_React_default.a.createElement(FormatResourceW
1ithClusterInfo,{resource:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has failed."),text:external_osdSharedDeps_React_default.a.createElement("div",{style:{maxHeight:"30vh",overflowY:"auto"}},error.reason)},{toastLifeTimeMs:1e3*60*60*24*5})}return true}}}return false};const callbackForShrinkTimeout=(job,_ref2)=>{let{core:core}=_ref2;const extras=job.extras;if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addWarning({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Shrink operation on ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{index:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has timed out."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The shrink operation has taken more than one hour to complete. To see the latest status, use `GET /_tasks/",extras.taskId,"`")},{toastLifeTimeMs:1e3*60*60*24*5});return Promise.resolve(true)};var store_localstorage=__webpack_require__(84);var OpenSearch_Dashboards_package=__webpack_require__(129);var JobScheduler=__webpack_require__(34);const callbackForForceMerge=async(job,_ref)=>{let{core:core}=_ref;const extras=job.extras;const commonService=new services["a"](core.http);const tasksResult=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/_tasks/${extras.taskId}`,method:"GET"}});if(tasksResult.ok){const _source=tasksResult.response;const{completed:completed,error:error}=_source||{};if(completed){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}if(!(error!==null&&error!==void 0&&error.reason)){triggerEvent(EVENT_MAP.FORCE_MERGE_COMPLETE,job);const{_shards:_shards}=_source.response||{};const{successful:successful=0,total:total=0,failures:failures=[]}=_shards||{};if(successful===total){core.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The indexes ",external_osdSharedDeps_React_default.a.createElement(FormatResourcesWithClusterInfo,{resources:extras.sourceIndex,clusterInfo:extras.clusterInfo})," are successfully force merged.")},{toastLifeTimeMs:1e3*60*60*24*5})}else{core.notifications.toasts.addWarning({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Some shards of ",external_osdSharedDeps_React_default.a.createElement(FormatResourcesWithClusterInfo,{resources:extras.sourceIndex,clusterInfo:extras.clusterInfo}),"could not be force merged."),text:external_osdSharedDeps_React_default.a.createElement(ErrorToastContentForJob,{shortError:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,total-successful," out of ",total," could not be force merged."),fullError:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",null,"The following reasons may prevent shards from performing a force merge:"),external_osdSharedDeps_React_default.a.createElement("ul",null,failures.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:`${item.index}-${item.index}-${item.status}`},"The shard ",item.shard," of index ",item.index," failed to merge because of ",item.status,".")),external_osdSharedDeps_React_default.a.createElement("li",null,"Some shards are unassigned."),external_osdSharedDeps_React_default.a.createElement("li",null,"Insufficient disk space: Force merging requires disk space to create a new, larger segment. If the disk does not have enough space, the merge process may fail."),external_osdSharedDeps_React_default.a.createElement("li",null,"Index read-only: If the index is marked as read-only, a force merge operation cannot modify the index, and the merge process will fail."),external_osdSharedDeps_React_default.a.createElement("li",null,"Too many open files: The operating system may limit the number of files that a process can have open simultaneously, and a force merge operation may exceed this limit, causing the merge process to fail."),external_osdSharedDeps_React_default.a.createElement("li",null,"Index corruption: If the index is corrupted or has some inconsistencies, the force merge operation may fail.")))})},{toastLifeTimeMs:1e3*60*60*24*5})}}else{core.notifications.toasts.addDanger({iconType:"alert",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Force merge from ",external_osdSharedDeps_React_default.a.createElement(FormatResourcesWithClusterInfo,{resources:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has some errors, please check the errors below:"),text:external_osdSharedDeps_React_default.a.createElement("div",{style:{maxHeight:"30vh",overflowY:"auto"}},external_osdSharedDeps_React_default.a.createElement("ul",{key:"error.reason"},external_osdSharedDeps_React_default.a.createElement("li",null,error.reason)))},{toastLifeTimeMs:1e3*60*60*24*5})}return true}}return false};const callbackForForceMergeTimeout=(job,_ref2)=>{let{core:core}=_ref2;const extras=job.extras;if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addWarning({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Force merging ",external_osdSharedDeps_React_default.a.createElement(FormatResourcesWithClusterInfo,{resources:extras.sourceIndex,clusterInfo:extras.clusterInfo})," has failed."),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"The force merge operation has taken more than one hour to complete. To see the latest status, use `GET /_tasks/",extras.taskId,"`")},{toastLifeTimeMs:1e3*60*60*24*5});return Promise.resolve(true)};const callbackForOpen=async(job,_ref)=>{let{core:core}=_ref;const extras=job.extras;const commonService=new services["a"](core.http);const tasksResult=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/_tasks/${extras.taskId}`,method:"GET"}});if(tasksResult.ok){const _source=tasksResult.response;const{completed:completed,error:error}=_source||{};if(completed){const{acknowledged:acknowledged,shards_acknowledged:shards_acknowledged}=_source.response||{};if(acknowledged&&shards_acknowledged){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}triggerEvent(EVENT_MAP.OPEN_COMPLETE,job);core.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,extras.indexes.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("span",{key:item},index>0&&", ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{key:item,index:item,clusterInfo:extras.clusterInfo})))," ","have been opened.")},{toastLifeTimeMs:1e3*60*60*24*5});return true}else if(error!==null&&error!==void 0&&error.reason){if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addDanger({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,extras.indexes.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("span",{key:item},index>0&&", ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{key:item,index:item,clusterInfo:extras.clusterInfo})))," ","has failed to open."),text:external_osdSharedDeps_React_default.a.createElement(ErrorToastContentForJob,{fullError:external_osdSharedDeps_React_default.a.createElement("div",{style:{maxHeight:"30vh",overflowY:"auto"}},error===null||error===void 0?void 0:error.reason)})},{toastLifeTimeMs:1e3*60*60*24*5});return true}}}return false};const callbackForOpenTimeout=(job,_ref2)=>{let{core:core}=_ref2;const extras=job.extras;if(extras.toastId){core.notifications.toasts.remove(extras.toastId)}core.notifications.toasts.addWarning({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Opening the index(es)"," ",extras.indexes.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("span",{key:item},index>0&&", ",external_osdSharedDeps_React_default.a.createElement(DetailLink,{key:item,index:item,clusterInfo:extras.clusterInfo})))," ","has timed out"),text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Opening the index has taken more than one hour to complete. To see the latest status, use `GET /_tasks/",extras.taskId,"`")},{toastLifeTimeMs:1e3*60*60*24*5});return Promise.resolve(true)};async function JobHandlerRegister(core){const commonService=new services["a"](core.http);const accountResult=await commonService.accountInfo({endpoint:"transport.request",data:{path:"/_plugins/_security/api/account"}});let storeLocalStorageKey=`OSD_VERSION_${OpenSearch_Dashboards_package.version}_ISM_JOBS`;if(accountResult&&accountResult.ok&&accountResult.response&&accountResult.response.user_name){storeLocalStorageKey=`OSD_VERSION_${OpenSearch_Dashboards_package.version}_${accountResult.response.user_name}_ISM_JOBS`}JobSchedulerContext["a"].setStorage(new store_localstorage["a"](storeLocalStorageKey));
1JobSchedulerContext["a"].addCallback({callbackName:"callbackForReindex",callback:job=>callbackForReindex(job,{core:core}),timeoutCallback:job=>callbackForReindexTimeout(job,{core:core}),listenType:JobScheduler["b"].REINDEX});JobSchedulerContext["a"].addCallback({callbackName:"callbackForSplit",callback:job=>callbackForSplit(job,{core:core}),timeoutCallback:job=>callbackForSplitTimeout(job,{core:core}),listenType:JobScheduler["b"].SPLIT});JobSchedulerContext["a"].addCallback({callbackName:"callbackForShrink",callback:job=>callbackForShrink(job,{core:core}),timeoutCallback:job=>callbackForShrinkTimeout(job,{core:core}),listenType:JobScheduler["b"].SHRINK});JobSchedulerContext["a"].addCallback({callbackName:"callbackForForceMerge",callback:job=>callbackForForceMerge(job,{core:core}),timeoutCallback:job=>callbackForForceMergeTimeout(job,{core:core}),listenType:JobScheduler["b"].FORCE_MERGE});JobSchedulerContext["a"].addCallback({callbackName:"callbackForOpen",callback:job=>callbackForOpen(job,{core:core}),timeoutCallback:job=>callbackForOpenTimeout(job,{core:core}),listenType:JobScheduler["b"].OPEN})}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return sha256["a"]}));__webpack_require__.d(__webpack_exports__,"a",(function(){return mount["a"]}));__webpack_require__.d(__webpack_exports__,"e",(function(){return mount["b"]}));__webpack_require__.d(__webpack_exports__,"c",(function(){return utils["d"]}));__webpack_require__.d(__webpack_exports__,"d",(function(){return utils["e"]}));__webpack_require__.d(__webpack_exports__,"f",(function(){return useObservableValue}));var external_osdSharedDeps_Rxjs_=__webpack_require__(10);var external_osdSharedDeps_RxjsOperators_=__webpack_require__(9);function shareWeakReplay(bufferSize){return source=>{let subject;const stop$=new external_osdSharedDeps_Rxjs_["Subject"];return new external_osdSharedDeps_Rxjs_["Observable"](observer=>{if(!subject){subject=new external_osdSharedDeps_Rxjs_["ReplaySubject"](bufferSize)}subject.subscribe(observer).add(()=>{if(!subject){return}if(subject.observers.length===0){stop$.next()}if(subject.closed||subject.isStopped){subject=undefined}});if(subject&&subject.observers.length===1){source.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(stop$)).subscribe(subject)}})}}var sha256=__webpack_require__(136);var mount=__webpack_require__(58);var utils=__webpack_require__(29);const debounce=(func,delay,leading)=>{let timerId;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(!timerId&&leading){func(...args)}clearTimeout(timerId);timerId=setTimeout(()=>func(...args),delay)}};var external_osdSharedDeps_React_=__webpack_require__(0);var useObservable=__webpack_require__(22);var useObservable_default=__webpack_require__.n(useObservable);const useObservableValue=(observableValue$,initialValue)=>{const initialValueRef=Object(external_osdSharedDeps_React_["useRef"])(initialValue?{value:initialValue}:undefined);const observable$=Object(external_osdSharedDeps_React_["useMemo"])(()=>observableValue$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(value=>({value:value}))),[observableValue$]);const observableValue=useObservable_default()(observable$,initialValueRef.current);return observableValue===null||observableValue===void 0?void 0:observableValue.value}},function(module,exports,__webpack_require__){"use strict";var punycode=__webpack_require__(187);function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=__webpack_require__(189);function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&typeof url==="object"&&url instanceof Url){return url}var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(typeof url!=="string"){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter),slashRegex=/\\/g;uSplit[0]=uSplit[0].replace(slashRegex,"/");url=uSplit.join(splitter);var rest=url;rest=rest.trim();
1if(!slashesDenoteHost&&url.split("#").length===1){var simplePath=simplePathPattern.exec(rest);if(simplePath){this.path=rest;this.href=rest;this.pathname=simplePath[1];if(simplePath[2]){this.search=simplePath[2];if(parseQueryString){this.query=querystring.parse(this.search.substr(1))}else{this.query=this.search.substr(1)}}else if(parseQueryString){this.search="";this.query={}}return this}}var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@/]+@[^@/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd)){hostEnd=hec}}var auth,atSign;if(hostEnd===-1){atSign=rest.lastIndexOf("@")}else{atSign=rest.lastIndexOf("@",hostEnd)}if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd)){hostEnd=hec}}if(hostEnd===-1){hostEnd=rest.length}this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part){continue}if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++){if(part.charCodeAt(j)>127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){this.hostname=punycode.toASCII(this.hostname)}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];if(rest.indexOf(ae)===-1){continue}var esc=encodeURIComponent(ae);if(esc===ae){esc=escape(ae)}rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString){this.query=querystring.parse(this.query)}rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest){this.pathname=rest}if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(typeof obj==="string"){obj=urlParse(obj)}if(!(obj instanceof Url)){return Url.prototype.format.call(obj)}return obj.format()}Url.prototype.format=function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host){host=auth+this.host}else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){host+=":"+this.port}}if(this.query&&typeof this.query==="object"&&Object.keys(this.query).length){query=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:false})}var search=this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":"){protocol+=":"}if(this.slashes||(!protocol||slashedProtocol[protocol])&&host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/"){pathname="/"+pathname}}else if(!host){host=""}if(hash&&hash.charAt(0)!=="#"){hash="#"+hash}if(search&&search.charAt(0)!=="?"){search="?"+search}pathname=pathname.replace(/[?#]/g,(function(match){return encodeURIComponent(match)}));search=search.replace("#","%23");return protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,false,true)).format()};function urlResolveObject(source,relative){if(!source){return relative}return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(typeof relative==="string"){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;var tkeys=Object.keys(this);for(var tk=0;tk<tkeys.length;tk++){var tkey=tkeys[tk];result[tkey]=this[tkey]}result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&!relative.protocol){var rkeys=Object.keys(relative);for(var rk=0;rk<rkeys.length;rk++){var rkey=rkeys[rk];if(rkey!=="protocol"){result[rkey]=relative[rkey]}}if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname){result.pathname="/";result.path=result.pathname}result.href=result.format();return result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slas
1hedProtocol[relative.protocol]){var keys=Object.keys(relative);for(var v=0;v<keys.length;v++){var k=keys[v];result[k]=relative[k]}result.href=result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift())){}if(!relative.host){relative.host=""}if(!relative.hostname){relative.hostname=""}if(relPath[0]!==""){relPath.unshift("")}if(relPath.length<2){relPath.unshift("")}result.pathname=relPath.join("/")}else{result.pathname=relative.pathname}result.search=relative.search;result.query=relative.query;result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host){if(srcPath[0]===""){srcPath[0]=result.host}else{srcPath.unshift(result.host)}}result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host){if(relPath[0]===""){relPath[0]=relative.host}else{relPath.unshift(relative.host)}}relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath){srcPath=[]}srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(relative.search!=null){if(psychotic){result.host=srcPath.shift();result.hostname=result.host;var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.hostname=authInHost.shift();result.host=result.hostname}}result.search=relative.search;result.query=relative.query;if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last==="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=isAbsolute?"":srcPath.length?srcPath.shift():"";result.host=result.hostname;var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.hostname=authInHost.shift();result.host=result.hostname}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(srcPath.length>0){result.pathname=srcPath.join("/")}else{result.pathname=null;result.path=null}if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);
1if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host){this.hostname=host}};exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url},function(module,exports){module.exports=__osdSharedDeps__.Moment},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return DEFAULT_APP_CATEGORIES}));__webpack_require__.d(__webpack_exports__,"e",(function(){return getWorkspaceIdFromUrl}));__webpack_require__.d(__webpack_exports__,"d",(function(){return formatUrlWithWorkspaceId}));__webpack_require__.d(__webpack_exports__,"c",(function(){return DEFAULT_NAV_GROUPS}));__webpack_require__.d(__webpack_exports__,"a",(function(){return ALL_USE_CASE_ID}));var context=__webpack_require__(38);var external_osdSharedDeps_OsdI18n_=__webpack_require__(5);const DEFAULT_APP_CATEGORIES=Object.freeze({opensearchDashboards:{id:"opensearchDashboards",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.opensearchDashboardsNavList.label",{defaultMessage:"OpenSearch Dashboards"}),euiIconType:"inputOutput",order:1e3},enterpriseSearch:{id:"enterpriseSearch",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.enterpriseSearchNavList.label",{defaultMessage:"Enterprise Search"}),order:2e3,euiIconType:"logoEnterpriseSearch"},observability:{id:"observability",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.observabilityNavList.label",{defaultMessage:"Observability"}),euiIconType:"logoObservability",order:3e3},security:{id:"securitySolution",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.securityNavList.label",{defaultMessage:"Security"}),order:4e3,euiIconType:"logoSecurity"},management:{id:"management",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.managementNavList.label",{defaultMessage:"Management"}),order:5e3,euiIconType:"managementApp"},investigate:{id:"investigate",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.investigate.label",{defaultMessage:"Investigate"}),order:2e3},dashboardAndReport:{id:"visualizeAndReport",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.visualizeAndReport.label",{defaultMessage:"Visualize and report"}),order:2e3},visualizeAndReport:{id:"visualizeAndReport",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.visualizeAndReport.label",{defaultMessage:"Visualize and report"}),order:1e3},analyzeSearch:{id:"analyzeSearch",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.analyzeSearch.label",{defaultMessage:"Analyze search"}),order:4e3},detect:{id:"detect",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.detect.label",{defaultMessage:"Detect"}),order:8e3},configure:{id:"configure",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.configure.label",{defaultMessage:"Configure"}),order:3e3},manage:{id:"manage",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.manageNav.label",{defaultMessage:"Manage"}),order:8e3},manageData:{id:"manageData",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.manageDataNav.label",{defaultMessage:"Manage data"}),order:1e3},manageWorkspace:{id:"manageWorkspace",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.manageWorkspaceNav.label",{defaultMessage:"Manage workspace"}),order:9e3}});var constants=__webpack_require__(52);const getWorkspaceIdFromUrl=(url,basePath)=>{const regexp=new RegExp(`^${basePath||""}/w/([^/]*)`);
1const urlObject=new URL(url);const matchedResult=urlObject.pathname.match(regexp);if(matchedResult){return matchedResult[1]}return""};const cleanWorkspaceId=path=>path.replace(/^\/w\/([^\/]*)/,"");const formatUrlWithWorkspaceId=(url,workspaceId,basePath)=>{const newUrl=new URL(url,window.location.href);newUrl.pathname=basePath.remove(newUrl.pathname);if(workspaceId){newUrl.pathname=`${constants["a"]}/${workspaceId}${newUrl.pathname}`}else{newUrl.pathname=cleanWorkspaceId(newUrl.pathname)}newUrl.pathname=basePath.prepend(newUrl.pathname,{withoutClientBasePath:true});return newUrl.toString()};var types=__webpack_require__(19);const ALL_USE_CASE_ID="all";const OBSERVABILITY_USE_CASE_ID="observability";const SECURITY_ANALYTICS_USE_CASE_ID="security-analytics";const ESSENTIAL_USE_CASE_ID="essentials";const SEARCH_USE_CASE_ID="search";const defaultNavGroups={dataAdministration:{id:"dataAdministration",title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.dataAdministration.title",{defaultMessage:"Data administration"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.dataAdministration.description",{defaultMessage:"Apply policies or security on your data."}),order:1e3,type:types["b"].SYSTEM,icon:"database"},settingsAndSetup:{id:"settingsAndSetup",title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.settingsAndSetup.title",{defaultMessage:"Settings and setup"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.settingsAndSetup.description",{defaultMessage:"Set up your cluster with index patterns."}),order:2e3,type:types["b"].SYSTEM,icon:"gear"},all:{id:ALL_USE_CASE_ID,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.all.title",{defaultMessage:"Analytics"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.all.description",{defaultMessage:"If you arenât sure where to start with OpenSearch, or if you have needs that cut across multiple use cases."}),order:3e3,icon:"wsAnalytics"},observability:{id:OBSERVABILITY_USE_CASE_ID,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.observability.title",{defaultMessage:"Observability"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.observability.description",{defaultMessage:"Gain visibility into system health, performance, and reliability through monitoring of logs, metrics and traces."}),order:4e3,icon:"wsObservability"},"security-analytics":{id:SECURITY_ANALYTICS_USE_CASE_ID,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.security.analytics.title",{defaultMessage:"Security Analytics"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.security.analytics.description",{defaultMessage:"Detect and investigate potential security threats and vulnerabilities across your systems and data."}),order:5e3,icon:"wsSecurityAnalytics"},essentials:{id:ESSENTIAL_USE_CASE_ID,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.essential.title",{defaultMessage:"Essentials"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.essential.description",{defaultMessage:"Analyze data to derive insights, identify patterns and trends, and make data-driven decisions."}),order:7e3,icon:"wsEssentials"},search:{id:SEARCH_USE_CASE_ID,title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.search.title",{defaultMessage:"Search"}),description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.group.search.description",{defaultMessage:"Quickly find and explore relevant information across your organization's data sources."}),order:6e3,icon:"wsSearch"}};const DEFAULT_NAV_GROUPS=Object.freeze(defaultNavGroups)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__; 2/*! 3 Copyright (c) 2018 Jed Watson. 4 Licensed under the MIT License (MIT), see 5 http://jedwatson.github.io/classnames 6*/(function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(!arg)continue;var argType=typeof arg;if(argType==="string"||argType==="number"){classes.push(arg)}else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);
6if(inner){classes.push(inner)}}}else if(argType==="object"){if(arg.toString===Object.prototype.toString){for(var key in arg){if(hasOwn.call(arg,key)&&arg[key]){classes.push(key)}}}else{classes.push(arg.toString())}}}return classes.join(" ")}if(true&&module.exports){classNames.default=classNames;module.exports=classNames}else if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}else{}})()},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"d",(function(){return getConditionContent}));__webpack_require__.d(__webpack_exports__,"c",(function(){return getActionOptions}));__webpack_require__.d(__webpack_exports__,"a",(function(){return actionRepoSingleton}));__webpack_require__.d(__webpack_exports__,"b",(function(){return convertTemplatesToArray}));__webpack_require__.d(__webpack_exports__,"e",(function(){return getOrderInfo}));__webpack_require__.d(__webpack_exports__,"f",(function(){return getUpdatedPolicy}));var constants=__webpack_require__(15);var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var interfaces=__webpack_require__(20);var helpers=__webpack_require__(6);var utils_constants=__webpack_require__(2);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);const inputLimitText=function(){let currCount=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;let limit=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;let singularKeyword=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";let pluralKeyword=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"";let styleProps=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};const difference=limit-currCount;const remainingLimit=`You can add up to ${difference} ${limit===1?"":"more"} ${difference===1?singularKeyword:pluralKeyword}.`;const reachedLimit=`You have reached the limit of ${limit} ${limit===1?singularKeyword:pluralKeyword}.`;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs",style:styleProps},difference>0?remainingLimit:reachedLimit)};function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class AliasUIActionComponent_AliasUIActionComponent extends external_osdSharedDeps_React_["Component"]{constructor(props){var _this,_selectedItems$add,_selectedItems$remove;super(props);_this=this;_defineProperty(this,"onCreateOption",(value,options,aliasAction)=>{const{action:action,clone:clone,onChangeAction:onChangeAction}=this.props;options.push({label:value});const aliasActions=action.alias.actions.concat(this.parseToAliasActionItems(options,aliasAction));onChangeAction(clone({...action,alias:{actions:aliasActions}}))});_defineProperty(this,"parseToAliasActionItems",(function(options){let aliasActionType=arguments.length>1&&arguments[1]!==undefined?arguments[1]:interfaces["b"].ADD;return options.map(option=>({[aliasActionType]:{alias:option.label}}))}));_defineProperty(this,"onAddAliasChange",(function(){let options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const{action:action,clone:clone,selectedItems:selectedItems,onChangeAction:onChangeAction}=_this.props;const parsedOptions=_this.parseToAliasActionItems(options,interfaces["b"].ADD);const parseSelectedItems=_this.parseToAliasActionItems(selectedItems.remove||[],interfaces["b"].REMOVE);
6onChangeAction(clone({...action,alias:{actions:parsedOptions.concat(parseSelectedItems)}}))}));_defineProperty(this,"onRemoveAliasChange",options=>{const{action:action,clone:clone,selectedItems:selectedItems,onChangeAction:onChangeAction}=this.props;const parsedOptions=this.parseToAliasActionItems(options,interfaces["b"].REMOVE);const parseSelectedItems=this.parseToAliasActionItems(selectedItems.add||[],interfaces["b"].ADD);onChangeAction(clone({...action,alias:{actions:parsedOptions.concat(parseSelectedItems)}}))});const{selectedItems:_selectedItems}=props;this.state={addAliasToggle:((_selectedItems$add=_selectedItems.add)===null||_selectedItems$add===void 0?void 0:_selectedItems$add.length)>0,removeAliasToggle:((_selectedItems$remove=_selectedItems.remove)===null||_selectedItems$remove===void 0?void 0:_selectedItems$remove.length)>0}}componentDidMount(){}render(){var _selectedItems$add3,_selectedItems$remove3;const{errors:errors,selectedItems:selectedItems}=this.props;const{addAliasToggle:addAliasToggle,removeAliasToggle:removeAliasToggle}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Add aliases",checked:addAliasToggle,onChange:e=>{var _selectedItems$add2;if(addAliasToggle&&((_selectedItems$add2=selectedItems.add)===null||_selectedItems$add2===void 0?void 0:_selectedItems$add2.length)>0)this.onAddAliasChange([]);this.setState({...this.state,addAliasToggle:e.target.checked})},"data-test-subj":"add-alias-toggle"}),addAliasToggle&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Select aliases to add to indexes",fullWidth:true,style:{maxWidth:"100%"},isInvalid:errors.add!==undefined,error:errors.add,"data-test-subj":"add-alias-row"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"Enter aliases to add",noSuggestions:true,selectedOptions:selectedItems.add||[],onCreateOption:(selectedItems.add||[]).length<MAX_ALIAS_ACTIONS&&((searchValue,options)=>this.onCreateOption(searchValue,options,interfaces["b"].ADD)),onChange:options=>this.onAddAliasChange(options),isInvalid:errors.add!==undefined,"data-test-subj":"add-alias-combo-box"}),inputLimitText((_selectedItems$add3=selectedItems.add)===null||_selectedItems$add3===void 0?void 0:_selectedItems$add3.length,MAX_ALIAS_ACTIONS,"alias","aliases")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Remove aliases",checked:removeAliasToggle,onChange:e=>{var _selectedItems$remove2;if(removeAliasToggle&&((_selectedItems$remove2=selectedItems.remove)===null||_selectedItems$remove2===void 0?void 0:_selectedItems$remove2.length)>0)this.onRemoveAliasChange([]);this.setState({...this.state,removeAliasToggle:e.target.checked})},"data-test-subj":"remove-alias-toggle"}),removeAliasToggle&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Select aliases to remove from indexes",fullWidth:true,style:{maxWidth:"100%"},isInvalid:errors.remove!==undefined,error:errors.remove,"data-test-subj":"remove-alias-row"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"Enter aliases to remove",noSuggestions:true,selectedOptions:selectedItems.remove||[],onCreateOption:(selectedItems.remove||[]).length<MAX_ALIAS_ACTIONS&&((searchValue,options)=>this.onCreateOption(searchValue,options,interfaces["b"].REMOVE)),onChange:options=>this.onRemoveAliasChange(options),isInvalid:errors.remove!==undefined,"data-test-subj":"remove-alias-combo-box"}),inputLimitText((_selectedItems$remove3=selectedItems.remove)===null||_selectedItems$remove3===void 0?void 0:_selectedItems$remove3.length,MAX_ALIAS_ACTIONS,"alias","aliases")))))}}function AliasUIAction_defineProperty(e,r,t){return(r=AliasUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function AliasUIAction_toPropertyKey(t){var i=AliasUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function AliasUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const MAX_ALIAS_ACTIONS=10;const DUPLICATED_ALIAS_TEXT="An alias cannot be added and removed in the same action.";class AliasUIAction_AliasUIAction{constructor(_action){var _this=this;let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();AliasUIAction_defineProperty(this,"customDisplayText","Add / remove aliases");AliasUIAction_defineProperty(this,"id",void 0);AliasUIAction_defineProperty(this,"action",void 0);AliasUIAction_defineProperty(this,"type",constants["a"].Alias);AliasUIAction_defineProperty(this,"errors",{});AliasUIAction_defineProperty(this,"selectedItems",{});AliasUIAction_defineProperty(this,"content",()=>this.customDisplayText);AliasUIAction_defineProperty(this,"clone",(function(){let action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.action;return new AliasUIAction_AliasUIAction(action,_this.id)}));AliasUIAction_defineProperty(this,"isValid",()=>{if(this.action.alias.actions.length===0)return false;return!Object.entries(this.errors).some(_ref=>{let[_,error]=_ref;return error})});AliasUIAction_defineProperty(this,"getAliasActionErrorText",selectedItems=>{const errors={};let aliasError;this.action.alias.actions.forEach(action=>{const aliasActionType=Object.keys(action)[0];aliasError=this.getAliasErrorText(action,selectedItems);errors[aliasActionType]=aliasError});return errors});AliasUIAction_defineProperty(this,"getAliasErrorText",(action,selectedItems)=>{const aliasActionType=Object.keys(action)[0];const alias=action[aliasActionType].alias;if(alias&&!utils_constants["c"].test(alias))return utils_constants["b"];switch(aliasActionType){case interfaces["b"].ADD:if((selectedItems[interfaces["b"].REMOVE]||[]).some(option=>(option===null||option===void 0?void 0:option.label)===alias))return DUPLICATED_ALIAS_TEXT;break;case interfaces["b"].REMOVE:if((selectedItems[interfaces["b"].ADD]||[]).some(option=>(option===null||option===void 0?void 0:option.label)===alias))return DUPLICATED_ALIAS_TEXT;break}});AliasUIAction_defineProperty(this,"parseToComboBoxOptions",aliasAction=>{var _aliasAction$alias$ac;const allOptions={};(_aliasAction$alias$ac=aliasAction.alias.actions)===null||_aliasAction$alias$ac===void 0||_aliasAction$alias$ac.forEach(action=>{var _action$aliasActionTy;const aliasActionType=Object.keys(action)[0];if(!allOptions[aliasActionType])allOptions[aliasActionType]=[];if(action[aliasActionType].alias)allOptions[aliasActionType].push({label:(_action$aliasActionTy=action[aliasActionType])===null||_action$aliasActionTy===void 0?void 0:_action$aliasActionTy.alias});if(action[aliasActionType].aliases)allOptions[aliasActionType]=allOptions[aliasActionType].concat(action[aliasActionType].aliases.map(alias=>({label:alias})))});return allOptions});AliasUIAction_defineProperty(this,"render",(uiAction,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement(AliasUIActionComponent_AliasUIActionComponent,{action:uiAction.action,clone:this.clone,errors:this.errors,onChangeAction:onChangeAction,selectedItems:this.selectedItems}));AliasUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id;this.selectedItems=this.parseToComboBoxOptions(_action);this.errors=this.getAliasActionErrorText(this.selectedItems)}}var DarkMode=__webpack_require__(46);function AllocationUIAction_defineProperty(e,r,t){return(r=AllocationUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function AllocationUIAction_toPropertyKey(t){var i=AllocationUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function AllocationUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class AllocationUIAction_AllocationUIAction{constructor(_action){var _this=this;let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();AllocationUIAction_defineProperty(this,"id",void 0);AllocationUIAction_defineProperty(this,"action",void 0);AllocationUIAction_defineProperty(this,"type",constants["a"].Allocation);AllocationUIAction_defineProperty(this,"content",()=>`Allocation`);AllocationUIAction_defineProperty(this,"clone",(function(){let action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.action;return new AllocationUIAction_AllocationUIAction(action,_this.id)}));AllocationUIAction_defineProperty(this,"isValid",()=>
6{try{JSON.parse(this.getActionJsonString(this.action));return true}catch(err){return false}});AllocationUIAction_defineProperty(this,"getActionJsonString",action=>{const allocation=action.allocation;return allocation.hasOwnProperty("jsonString")?allocation.jsonString:JSON.stringify(allocation,null,4)});AllocationUIAction_defineProperty(this,"getActionJson",action=>{const allocation=action.allocation;return allocation.hasOwnProperty("jsonString")?JSON.parse(allocation.jsonString):allocation});AllocationUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:this.getActionJsonString(action.action),onChange:str=>{onChangeAction(this.clone({...action.action,allocation:{jsonString:str}}))},setOptions:{fontSize:"14px"},"aria-label":"Code Editor"}))));AllocationUIAction_defineProperty(this,"toAction",()=>({...this.action,allocation:this.getActionJson(this.action)}));this.action=_action;this.id=id}}function CloseUIAction_defineProperty(e,r,t){return(r=CloseUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CloseUIAction_toPropertyKey(t){var i=CloseUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CloseUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CloseUIAction_CloseUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();CloseUIAction_defineProperty(this,"id",void 0);CloseUIAction_defineProperty(this,"action",void 0);CloseUIAction_defineProperty(this,"type",constants["a"].Close);CloseUIAction_defineProperty(this,"content",()=>`Close`);CloseUIAction_defineProperty(this,"clone",action=>new CloseUIAction_CloseUIAction(action,this.id));CloseUIAction_defineProperty(this,"isValid",()=>true);CloseUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement("div",null));CloseUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function DeleteUIAction_defineProperty(e,r,t){return(r=DeleteUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DeleteUIAction_toPropertyKey(t){var i=DeleteUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function DeleteUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class DeleteUIAction_DeleteUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();DeleteUIAction_defineProperty(this,"id",void 0);DeleteUIAction_defineProperty(this,"action",void 0);DeleteUIAction_defineProperty(this,"type",constants["a"].Delete);DeleteUIAction_defineProperty(this,"content",()=>`Delete`);DeleteUIAction_defineProperty(this,"clone",action=>new DeleteUIAction_DeleteUIAction(action,this.id));DeleteUIAction_defineProperty(this,"isValid",()=>true);DeleteUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement("div",null));DeleteUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}var EuiFormCustomLabel=__webpack_require__(24);function ForceMergeUIAction_defineProperty(e,r,t){return(r=ForceMergeUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ForceMergeUIAction_toPropertyKey(t){var i=ForceMergeUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ForceMergeUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ForceMergeUIAction_ForceMergeUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();ForceMergeUIAction_defineProperty(this,"id",void 0);ForceMergeUIAction_defineProperty(this,"action",void 0);ForceMergeUIAction_defineProperty(this,"type",constants["a"].ForceMerge);ForceMergeUIAction_defineProperty(this,"content",()=>`Force merge to ${this.action.force_merge.max_num_segments} segments`);ForceMergeUIAction_defineProperty(this,"clone",action=>new ForceMergeUIAction_ForceMergeUIAction(action,this.id));ForceMergeUIAction_defineProperty(this,"isValid",()=>{const segments=this.action.force_merge.max_num_segments;return!!segments&&segments>0});ForceMergeUIAction_defineProperty(this,"render",(action,onChangeAction)=>{const segments=action.action.force_merge.max_num_segments;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Max num segments",helpText:"The number of segments to merge to.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{fullWidth:true,value:typeof segments==="undefined"?"":segments,onChange:e=>{const maxNumSegments=e.target.valueAsNumber;const forceMerge={max_num_segments:maxNumSegments};if(isNaN(maxNumSegments))delete forceMerge.max_num_segments;
6onChangeAction(this.clone({force_merge:forceMerge}))},"data-test-subj":"action-render-force-merge"})))});ForceMergeUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function IndexPriorityUIAction_defineProperty(e,r,t){return(r=IndexPriorityUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IndexPriorityUIAction_toPropertyKey(t){var i=IndexPriorityUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function IndexPriorityUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class IndexPriorityUIAction_IndexPriorityUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();IndexPriorityUIAction_defineProperty(this,"id",void 0);IndexPriorityUIAction_defineProperty(this,"action",void 0);IndexPriorityUIAction_defineProperty(this,"type",constants["a"].IndexPriority);IndexPriorityUIAction_defineProperty(this,"content",()=>`Set index priority to ${this.action.index_priority.priority}`);IndexPriorityUIAction_defineProperty(this,"clone",action=>new IndexPriorityUIAction_IndexPriorityUIAction(action,this.id));IndexPriorityUIAction_defineProperty(this,"isValid",()=>{const priority=this.action.index_priority.priority;return typeof priority!=="undefined"&&priority>=0});IndexPriorityUIAction_defineProperty(this,"render",(action,onChangeAction)=>{const priority=action.action.index_priority.priority;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Priority",helpText:"Higher priority indices are recovered first when possible.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{fullWidth:true,value:typeof priority==="undefined"?"":priority,onChange:e=>{const priority=e.target.valueAsNumber;const indexPriority={priority:priority};if(isNaN(priority))delete indexPriority.priority;onChangeAction(this.clone({index_priority:indexPriority}))},"data-test-subj":"action-render-index-priority"})))});IndexPriorityUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}var public_services=__webpack_require__(12);var LegacyNotification=__webpack_require__(85);var ChannelNotification=__webpack_require__(86);function NotificationUIAction_defineProperty(e,r,t){return(r=NotificationUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function NotificationUIAction_toPropertyKey(t){var i=NotificationUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function NotificationUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class NotificationUIAction_NotifUI extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);NotificationUIAction_defineProperty(this,"state",{channels:[],loadingChannels:true});NotificationUIAction_defineProperty(this,"getChannels",async()=>{this.setState({loadingChannels:true});try{const{notificationService:notificationService}=this.props;const response=await notificationService.getChannels();if(response.ok){this.setState({channels:response.response.channel_list})}else{this.context.notifications.toasts.addDanger(`Could not load notification channels: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the notification channels"))}this.setState({loadingChannels:false})});NotificationUIAction_defineProperty(this,"onChangeChannelId",e=>{const{action:action,clone:clone,onChangeAction:onChangeAction}=this.props;const id=e.target.value;onChangeAction(clone({...action,notification:{...action.notification,channel:{id:id}}}))});NotificationUIAction_defineProperty(this,"onChangeMessage",e=>{const{action:action,clone:clone,onChangeAction:onChangeAction}=this.props;const message=e.target.value;onChangeAction(clone({...action,notification:{...action.notification,message_template:{source:message}}}))});NotificationUIAction_defineProperty(this,"onChangeNotificationJsonString",str=>{const{action:action,clone:clone,onChangeAction:onChangeAction}=this.props;onChangeAction(clone({...action,notificationJsonString:str}))});NotificationUIAction_defineProperty(this,"onSwitchToChannels",()=>{const{action:action,clone:clone,onChangeAction:onChangeAction}=this.props;const newAction={...action,...constants["h"]};delete newAction.notificationJsonString;onChangeAction(clone(newAction))})}componentDidMount(){this.getChannels()}render(){var _action$notification,_action$notification2;const{action:action,isInvalid:isInvalid}=this.props;const{channels:channels,loadingChannels:loadingChannels}=this.state;const hasDestination=!!((_action$notification=action.notification)!==null&&_action$notification!==void 0&&_action$notification.destination);if(hasDestination){return external_osdSharedDeps_React_default.a.createElement(LegacyNotification["a"],{notificationJsonString:action.notificationJsonString||"",onChangeNotificationJsonString:this.onChangeNotificationJsonString,onSwitchToChannels:this.onSwitchToChannels,actionNotification:true})}return external_osdSharedDeps_React_default.a.createElement(ChannelNotification["a"],{channelId:((_action$notification2=action.notification)===null||_action$notification2===void 0||(_action$notification2=_action$notification2.channel)===null||_action$notification2===void 0?void 0:_action$notification2.id)||"",channels:channels,loadingChannels:loadingChannels,message:action.notification.message_template.source,onCh
6angeChannelId:this.onChangeChannelId,onChangeMessage:this.onChangeMessage,getChannels:this.getChannels,actionNotification:true,isInvalid:isInvalid})}}class NotificationUIAction_NotificationUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();NotificationUIAction_defineProperty(this,"id",void 0);NotificationUIAction_defineProperty(this,"action",void 0);NotificationUIAction_defineProperty(this,"type",constants["a"].Notification);NotificationUIAction_defineProperty(this,"content",()=>`Notification`);NotificationUIAction_defineProperty(this,"clone",action=>new NotificationUIAction_NotificationUIAction(action,this.id));NotificationUIAction_defineProperty(this,"isValid",()=>{try{if(this.action.notificationJsonString){JSON.parse(this.action.notificationJsonString)}return true}catch(err){console.error(err);return false}});NotificationUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement(public_services["g"],null,services=>services&&external_osdSharedDeps_React_default.a.createElement(NotificationUIAction_NotifUI,{onChangeAction:onChangeAction,action:this.action,clone:this.clone,isInvalid:!this.isValid(),notificationService:services.notificationService})));NotificationUIAction_defineProperty(this,"toAction",()=>{const newAction={...this.action};let notification=newAction.notification;if(!!newAction.notificationJsonString){notification=JSON.parse(newAction.notificationJsonString)}delete newAction.notificationJsonString;return{...newAction,notification:notification}});let notificationJsonString="";if(!!_action.notification.destination){notificationJsonString=JSON.stringify(_action.notification,null,4)}if(_action.notificationJsonString){notificationJsonString=_action.notificationJsonString}this.action={..._action,notificationJsonString:notificationJsonString};this.id=id}}function OpenUIAction_defineProperty(e,r,t){return(r=OpenUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function OpenUIAction_toPropertyKey(t){var i=OpenUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function OpenUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class OpenUIAction_OpenUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();OpenUIAction_defineProperty(this,"id",void 0);OpenUIAction_defineProperty(this,"action",void 0);OpenUIAction_defineProperty(this,"type",constants["a"].Open);OpenUIAction_defineProperty(this,"content",()=>`Open`);OpenUIAction_defineProperty(this,"clone",action=>new OpenUIAction_OpenUIAction(action,this.id));OpenUIAction_defineProperty(this,"isValid",()=>true);OpenUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement("div",null));OpenUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function ReadOnlyUIAction_defineProperty(e,r,t){return(r=ReadOnlyUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ReadOnlyUIAction_toPropertyKey(t){var i=ReadOnlyUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ReadOnlyUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ReadOnlyUIAction_ReadOnlyUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();ReadOnlyUIAction_defineProperty(this,"id",void 0);ReadOnlyUIAction_defineProperty(this,"action",void 0);ReadOnlyUIAction_defineProperty(this,"type",constants["a"].ReadOnly);ReadOnlyUIAction_defineProperty(this,"content",()=>`Read only`);ReadOnlyUIAction_defineProperty(this,"clone",action=>new ReadOnlyUIAction_ReadOnlyUIAction(action,this.id));ReadOnlyUIAction_defineProperty(this,"isValid",()=>true);ReadOnlyUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement("div",null));ReadOnlyUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function ReadWriteUIAction_defineProperty(e,r,t){return(r=ReadWriteUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ReadWriteUIAction_toPropertyKey(t){var i=ReadWriteUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ReadWriteUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ReadWriteUIAction_ReadWriteUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();ReadWriteUIAction_defineProperty(this,"id",void 0);ReadWriteUIAction_defineProperty(this,"action",void 0);ReadWriteUIAction_defineProperty(this,"type",constants["a"].ReadWrite);ReadWriteUIAction_defineProperty(this,"content",()=>`Read write`);ReadWriteUIAction_defineProperty(this,"clone",action=>new ReadWriteUIAction_ReadWriteUIAction(action,this.id));ReadWriteUIAction_defineProperty(this,"isValid",()=>true);ReadWriteUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement("div",null));ReadWriteUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function ReplicaCountUIAction_defineProperty(e,r,t){return(r=ReplicaCountUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ReplicaCountUIAction_toPropertyKey(t){var i=ReplicaCountUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ReplicaCountUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ReplicaCountUIAction_ReplicaCountUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();ReplicaCountUIAction_defineProperty(this,"id",void 0);ReplicaCountUIAction_defineProperty(this,"action",void 0);ReplicaCountUIAction_defineProperty(this,"type",constants["a"].ReplicaCount);ReplicaCountUIAction_defineProperty(this,"content",()=>`Set number of replicas to ${this.action.replica_count.number_of_replicas}`);ReplicaCountUIAction_defineProperty(this,"clone",action=>new ReplicaCountUIAction_ReplicaCountUIAction(action,this.id));ReplicaCountUIAction_defineProperty(this,"isValid",()=>{const numberOfReplicas=this.action.replica_count.number_of_replicas;return typeof numberOfReplicas!=="undefined"&&numberOfReplicas>=0});ReplicaCountUIAction_defineProperty(this,"render",(action,onChangeAction)=>{const replicas=action.action.replica_count.number_of_replicas;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Number of replicas",helpText:"The number of replicas to set for the index.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{fullWidth:true,value:typeof replicas==="undefined"?"":replicas,onChange:e=>{const numberOfReplicas=e.target.valueAsNumber;const replicaCount={number_of_replicas:numberOfReplicas};if(isNaN(numberOfReplicas))delete replicaCount.number_of_replicas;onChangeAction(this.clone({replica_count:replicaCount}))},"data-test-subj":"action-render-replica-count"})))});ReplicaCountUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function RolloverUIAction_defineProperty(e,r,t){return(r=RolloverUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RolloverUIAction_toPropertyKey(t){var i=RolloverUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RolloverUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RolloverUIAction_RolloverUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();RolloverUIAction_defineProperty(this,"id",void 0);RolloverUIAction_defineProperty(this,"action",void 0);RolloverUIAction_defineProperty(this,"type",constants["a"].Rollover);RolloverUIAction_defineProperty(this,"content",()=>`Rollover`);RolloverUIAction_defineProperty(this,"clone",action=>new RolloverUIAction_RolloverUIAction(action,this.id));RolloverUIAction_defineProperty(this,"isValid",()=>{const minIndexAge=this.action.rollover.min_index_age;const minDocCount=this.action.rollover.min_doc_count;const minSize=this.action.rollover.min_size;const minPrimaryShardSize=this.action.rollover.min_primary_shard_size;if(typeof minDocCount!=="undefined"){if(minDocCount<=0)return false}return true});RolloverUIAction_defineProperty(this,"render",(action,onChangeAction)=>{const rollover=action.action.rollover;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum index age",helpText:`The minimum age required to roll over the index. Accepts time units, e.g. "5h" or "1d".`,isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:rollover.min_index_age||"",onChange:e=>{const minIndexAge=e.target.value;const rollover={...action.action.rollover};if(minIndexAge)rollover.min_index_age=minIndexAge;else delete rollover.min_index_age;onChangeAction(this.clone({rollover:rollover}))},"data-test-subj":"action-render-rollover-min-index-age"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum doc count",helpText:"The minimum number of documents required to roll over the index.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{fullWidth:true,value:typeof rollover.min_doc_count==="undefined"?"":rollover.min_doc_count,onChange:e=>{const minDocCount=e.target.valueAsNumber;const rollover={...action.action.rollover};if(!isNaN(minDocCount))rollover.min_doc_count=minDocCount;else delete rollover.min_doc_count;onChangeAction(this.clone({rollover:rollover}))},"data-test-subj":"action-render-rollover-min-doc-count"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum index size",helpText:`The minimum size of the total primary shard storage required to roll over the index. Accepts byte units, e.g. "500mb" or "50gb".`,isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:rollover.min_size||"",onChange:e=>{const minSize=e.target.value;const rollover={...action.action.rollover};if(minSize)rollover.min_size=minSize;else delete rollover.min_size;onChangeAction(this.clone({rollover:rollover}))},"data-test-subj":"action-render-rollover-min-size"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum primary shard size",helpText:`The minimum size of a single primary shard required to roll over the index. Accepts byte units, e.g. "500mb" or "50gb".`,isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:rollover.min_primary_shard_size||"",onChange:e=>{const minPrimaryShardSize=e.target.value;const rollover={...action.action.rollover};if(minPrimaryShardSize)rollover.min_primary_shard_size=minPrimaryShardSize;else delete rollover.min_primary_shard_size;onChangeAction(this.clone({rollover:rollover}))},"data-test-subj":"action-render-rollover-min-primary-shard-size"})))});RolloverUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function RollupUIAction_defineProperty(e,r,t){return(r=RollupUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RollupUIAction_toPropertyKey(t){var i=RollupUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RollupUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RollupUIAction_RollupUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();RollupUIAction_defineProperty(this,"id",void 0);RollupUIAction_defineProperty(this,"action",void 0);RollupUIAction_defineProperty(this,"type",constants["a"].Rollup);RollupUIAction_defineProperty(this,"content",()=>`Rollup`);RollupUIAction_defineProperty(this,"clone",action=>new RollupUIAction_RollupUIAction(action,this.id));RollupUIAction_defineProperty(this,"isValid",()=>
6{try{JSON.parse(this.getActionJsonString(this.action));return true}catch(err){return false}});RollupUIAction_defineProperty(this,"getActionJsonString",action=>{const rollup=action.rollup;return rollup.hasOwnProperty("jsonString")?rollup.jsonString:JSON.stringify(rollup,null,4)});RollupUIAction_defineProperty(this,"getActionJson",action=>{const rollup=action.rollup;return rollup.hasOwnProperty("jsonString")?JSON.parse(rollup.jsonString):rollup});RollupUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:this.getActionJsonString(action.action),onChange:str=>{onChangeAction(this.clone({...action.action,rollup:{jsonString:str}}))},setOptions:{fontSize:"14px"},"aria-label":"Code Editor"}))));RollupUIAction_defineProperty(this,"toAction",()=>({...this.action,rollup:this.getActionJson(this.action)}));this.action=_action;this.id=id}}function ShrinkUIAction_defineProperty(e,r,t){return(r=ShrinkUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ShrinkUIAction_toPropertyKey(t){var i=ShrinkUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ShrinkUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const radios=[{id:"no",label:"No"},{id:"yes",label:"Yes"}];class ShrinkUIAction_ShrinkUIAction{constructor(_action){var _this=this;let _id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();let useJsons=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;ShrinkUIAction_defineProperty(this,"id",void 0);ShrinkUIAction_defineProperty(this,"action",void 0);ShrinkUIAction_defineProperty(this,"type",constants["a"].Shrink);ShrinkUIAction_defineProperty(this,"content",()=>`Shrink`);ShrinkUIAction_defineProperty(this,"clone",(function(){let action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.action;return new ShrinkUIAction_ShrinkUIAction(action,_this.id)}));ShrinkUIAction_defineProperty(this,"cloneUsingString",action=>new ShrinkUIAction_ShrinkUIAction(action,this.id,true));ShrinkUIAction_defineProperty(this,"isValid",()=>this.isValidNumShards()&&this.isValidAliasesJson()&&this.isValidIndexNameTemplateJson());ShrinkUIAction_defineProperty(this,"isValidNumShards",()=>{const shrink=this.action.shrink;const numSet=[shrink.num_new_shards!=null,shrink.percentage_of_source_shards!=null,shrink.max_shard_size!=null].filter(it=>it).length;return numSet==1});ShrinkUIAction_defineProperty(this,"isValidAliasesJson",()=>{var _this$action$aliases_;if(this.action.aliases_json&&((_this$action$aliases_=this.action.aliases_json)===null||_this$action$aliases_===void 0?void 0:_this$action$aliases_.length)>0){try{JSON.parse(this.getAliasesJsonString(this.action));return true}catch(err){return false}}return true});ShrinkUIAction_defineProperty(this,"getAliasesJsonString",action=>{const shrink=action.shrink;return action.hasOwnProperty("aliases_json")?action.aliases_json:JSON.stringify(shrink.aliases,null,4)});ShrinkUIAction_defineProperty(this,"isValidIndexNameTemplateJson",()=>{var _this$action$target_i;if(this.action.target_index_name_template_json&&((_this$action$target_i=this.action.target_index_name_template_json)===null||_this$action$target_i===void 0?void 0:_this$action$target_i.length)>0){try{JSON.parse(this.getIndexNameTemplateJsonString(this.action));return true}catch(err){return false}}return true});ShrinkUIAction_defineProperty(this,"getIndexNameTemplateJsonString",action=>{if(action.hasOwnProperty("target_index_name_template_json")){return action.target_index_name_template_json}else{return JSON.stringify(action.shrink.target_index_name_template,null,4)}});ShrinkUIAction_defineProperty(this,"render",(action,onChangeAction)=>{const shrink=action.action.shrink;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",hidden:this.isValidNumShards()},external_osdSharedDeps_React_default.a.createElement("p",null,"Exactly one setting specifying the number of primary shards to shrink to must be used.")),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Number of new shards",helpText:"The number of primary shards to attempt to shrink the index down to. This must be a factor of the "+"number of source index primary shards or else the greatest factor lower than your requested number of targeted primary shards "+"will be used.",isInvalid:!this.isValidNumShards()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValidNumShards(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:typeof shrink.num_new_shards==="undefined"?"":shrink.num_new_shards,onChange:e=>{const numNewShards=e.target.value;const shrinkObject={...action.action};
6if(numNewShards)shrinkObject.shrink.num_new_shards=numNewShards;else delete shrinkObject.shrink.num_new_shards;onChangeAction(this.cloneUsingString(shrinkObject))},"data-test-subj":"action-render-shrink-num-new-shards"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Maximum shard size",helpText:"The maximum size of each primary shard following the shrink. This will be used to calculate the lowest factor of "+"the number of source index primary shards to shrink to which satisfies the maximum shard size requirement. Accepts byte units, "+'e.g. "500mb" or "50gb".',isInvalid:!this.isValidNumShards()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValidNumShards(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:shrink.max_shard_size||"",onChange:e=>{const maxShardSize=e.target.value;const shrinkObject={...action.action};if(maxShardSize)shrinkObject.shrink.max_shard_size=maxShardSize;else delete shrinkObject.shrink.max_shard_size;onChangeAction(this.cloneUsingString(shrinkObject))},"data-test-subj":"action-render-shrink-max-shard-size"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Percentage of source shards",helpText:"The percentage of source shards to shrink to. This will be used to calculate the greatest factor of "+"the number of source index primary shards to shrink to which is less than the number of source shards times the percentage to shrink to. "+"Accepts a percentage as a decimal, e.g. 0.5",isInvalid:!this.isValidNumShards()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValidNumShards(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:typeof shrink.percentage_of_source_shards==="undefined"?"":shrink.percentage_of_source_shards,onChange:e=>{const percentageOfSourceShards=e.target.value;const shrinkObject={...action.action};if(percentageOfSourceShards)shrinkObject.shrink.percentage_of_source_shards=percentageOfSourceShards;else delete shrinkObject.shrink.percentage_of_source_shards;onChangeAction(this.cloneUsingString(shrinkObject))},"data-test-subj":"action-render-shrink-percentage-of-source-shards"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Target Index Name Template",helpText:`The mustache template to use to form the name of the output shrunken index.\n If not provided, a default suffix of "_shrunken" will be appended.`,isInvalid:!this.isValidIndexNameTemplateJson(),isOptional:true}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValidIndexNameTemplateJson(),error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:action.action.target_index_name_template_json,onChange:str=>{const indexNameTemplateJSON=str;const shrinkObject={...action.action};if(indexNameTemplateJSON)shrinkObject.target_index_name_template_json=indexNameTemplateJSON;else delete shrinkObject.target_index_name_template_json;onChangeAction(this.cloneUsingString(shrinkObject))},setOptions:{fontSize:"14px"},"aria-label":"Code Editor",height:"100px"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",hidden:!this.action.shrink.force_unsafe},external_osdSharedDeps_React_default.a.createElement("p",null,"Warning: shrinking without replicas will allocate all primaries to one node, which could result in a complete loss of the index in the case of a node crashing.")),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Force unsafe",helpText:`If this is set to 'No' then the shrink action will fail for indices which do not have replica shards.`,isInvalid:false}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:radios,idSelected:this.action.force_unsafe_input,onChange:id=>
6{const forceUnsafe=id==="yes";const shrinkObject={...action.action};if(forceUnsafe){shrinkObject.shrink.force_unsafe=forceUnsafe;shrinkObject.force_unsafe_input=id}else{shrinkObject.shrink.force_unsafe=false;shrinkObject.force_unsafe_input="no"}onChangeAction(this.cloneUsingString(shrinkObject))},name:"forceUnsafe"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Aliases",helpText:`The aliases to be applied to the output shrunken index.`,isInvalid:!this.isValidAliasesJson(),isOptional:true}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValidAliasesJson(),error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:action.action.aliases_json,onChange:str=>{const aliasesJSON=str;const shrinkObject={...action.action};if(aliasesJSON)shrinkObject.aliases_json=aliasesJSON;else delete shrinkObject.aliases_json;onChangeAction(this.cloneUsingString(shrinkObject))},setOptions:{fontSize:"14px"},"aria-label":"Code Editor",height:"100px"}))))});ShrinkUIAction_defineProperty(this,"toAction",()=>{const shrink={...this.action};if(shrink.aliases_json!=null){shrink.shrink.aliases=JSON.parse(shrink.aliases_json)}if(shrink.target_index_name_template_json!=null){shrink.shrink.target_index_name_template=JSON.parse(shrink.target_index_name_template_json)}delete shrink.aliases_json;delete shrink.force_unsafe_input;delete shrink.target_index_name_template_json;return shrink});this.action={..._action};this.id=_id;if(!useJsons){this.action.target_index_name_template_json=JSON.stringify(this.action.shrink.target_index_name_template,null,4);this.action.aliases_json=JSON.stringify(this.action.shrink.aliases,null,4);this.action.force_unsafe_input=this.action.shrink.force_unsafe?"yes":"no"}}}function SnapshotUIAction_defineProperty(e,r,t){return(r=SnapshotUIAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SnapshotUIAction_toPropertyKey(t){var i=SnapshotUIAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SnapshotUIAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SnapshotUIAction_SnapshotUIAction{constructor(_action){let id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object(helpers["e"])();SnapshotUIAction_defineProperty(this,"id",void 0);SnapshotUIAction_defineProperty(this,"action",void 0);SnapshotUIAction_defineProperty(this,"type",constants["a"].Snapshot);SnapshotUIAction_defineProperty(this,"content",()=>`Snapshot`);SnapshotUIAction_defineProperty(this,"clone",action=>new SnapshotUIAction_SnapshotUIAction(action,this.id));SnapshotUIAction_defineProperty(this,"isValid",()=>!!this.action.snapshot.snapshot&&!!this.action.snapshot.repository);SnapshotUIAction_defineProperty(this,"render",(action,onChangeAction)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Repository",helpText:"The repository name that you register through the native snapshot API operations.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:action.action.snapshot.repository,onChange:e=>{const repository=e.target.value;onChangeAction(this.clone({snapshot:{...action.action.snapshot,repository:repository}}))},"data-test-subj":"action-render-snapshot-repository"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Snapshot",helpText:"The name of the snapshot.",isInvalid:!this.isValid()}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!this.isValid(),error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:action.action.snapshot.snapshot,onChange:e=>{const snapshot=e.target.value;onChangeAction(this.clone({snapshot:{...action.action.snapshot,snapshot:snapsh
6ot}}))},"data-test-subj":"action-render-snapshot-snapshot"}))));SnapshotUIAction_defineProperty(this,"toAction",()=>this.action);this.action=_action;this.id=id}}function helpers_defineProperty(e,r,t){return(r=helpers_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function helpers_toPropertyKey(t){var i=helpers_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function helpers_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const getConditionContent=transition=>{const{conditions:{min_doc_count:minDocCount=undefined,min_index_age:minIndexAge=undefined,min_size:minSize=undefined,min_rollover_age:minRolloverAge=undefined,cron:cron=undefined}={}}=transition;if(minSize!=undefined)return`Minimum index size is ${minSize}`;if(minDocCount!=undefined)return`Minimum index doc count is ${minDocCount}`;if(minIndexAge!=undefined)return`Minimum index age is ${minIndexAge}`;if(minRolloverAge!=undefined)return`Minimum rollover age is ${minRolloverAge}`;if(cron!=undefined)return`After cron expression "${cron.cron.expression}" in ${cron.cron.timezone}`;return"No condition"};const getUIActionFromData=action=>{const actionType=Object.keys(action).filter(key=>key!=="timeout"&&key!=="retry").pop();if(!actionType)throw new Error(`Failed to get action using type [${actionType}]`);const uiAction=getUIAction(actionType);return uiAction.clone(action)};const getUIAction=actionType=>{switch(actionType){case constants["a"].Alias:return new AliasUIAction_AliasUIAction(constants["b"]);case constants["a"].Allocation:return new AllocationUIAction_AllocationUIAction(constants["c"]);case constants["a"].Close:return new CloseUIAction_CloseUIAction(constants["d"]);case constants["a"].Delete:return new DeleteUIAction_DeleteUIAction(constants["e"]);case constants["a"].ForceMerge:return new ForceMergeUIAction_ForceMergeUIAction(constants["f"]);case constants["a"].IndexPriority:return new IndexPriorityUIAction_IndexPriorityUIAction(constants["g"]);case constants["a"].Notification:return new NotificationUIAction_NotificationUIAction(constants["h"]);case constants["a"].Open:return new OpenUIAction_OpenUIAction(constants["i"]);case constants["a"].ReadOnly:return new ReadOnlyUIAction_ReadOnlyUIAction(constants["j"]);case constants["a"].ReadWrite:return new ReadWriteUIAction_ReadWriteUIAction(constants["k"]);case constants["a"].ReplicaCount:return new ReplicaCountUIAction_ReplicaCountUIAction(constants["l"]);case constants["a"].Rollover:return new RolloverUIAction_RolloverUIAction(constants["m"]);case constants["a"].Rollup:return new RollupUIAction_RollupUIAction(constants["n"]);case constants["a"].Shrink:return new ShrinkUIAction_ShrinkUIAction(constants["o"]);case constants["a"].Snapshot:return new SnapshotUIAction_SnapshotUIAction(constants["p"]);default:throw new Error(`Action type [${actionType}] not supported`)}};const getActionOptions=actionRepoSingleton=>actionRepoSingleton.getAllActionTypes().map(key=>{let uiAction;let text=key.split("_").map(str=>capitalizeFirstLetter(str)).join(" ");try{var _getUIAction;uiAction=(_getUIAction=getUIAction(key))===null||_getUIAction===void 0?void 0:_getUIAction.customDisplayText;if(uiAction!==undefined)text=uiAction}catch(e){}return{value:key,text:text}});class helpers_ActionRepository{constructor(){helpers_defineProperty(this,"repository",{alias:[AliasUIAction_AliasUIAction,constants["b"]],allocation:[AllocationUIAction_AllocationUIAction,constants["c"]],close:[CloseUIAction_CloseUIAction,constants["d"]],delete:[DeleteUIAction_DeleteUIAction,constants["e"]],force_merge:[ForceMergeUIAction_ForceMergeUIAction,constants["f"]],index_priority:[IndexPriorityUIAction_IndexPriorityUIAction,constants["g"]],notification:[NotificationUIAction_NotificationUIAction,constants["h"]],open:[OpenUIAction_OpenUIAction,constants["i"]],read_only:[ReadOnlyUIAction_ReadOnlyUIAction,constants["j"]],read_write:[ReadWriteUIAction_ReadWriteUIAction,constants["k"]],replica_count:[ReplicaCountUIAction_ReplicaCountUIAction,constants["l"]],rollover:[RolloverUIAction_RolloverUIAction,constants["m"]],rollup:[RollupUIAction_RollupUIAction,constants["n"]],shrink:[ShrinkUIAction_ShrinkUIAction,constants["o"]],snapshot:[SnapshotUIAction_SnapshotUIAction,constants["p"]]});helpers_defineProperty(this,"getAllActionTypes",()=>
6Object.keys(this.repository));helpers_defineProperty(this,"registerAction",(actionType,uiActionCtor,defaultAction)=>{if(this.repository.hasOwnProperty(actionType)){throw new Error(`Cannot register an action twice in the repository [type=${actionType}]`)}this.repository[actionType]=[uiActionCtor,defaultAction]});helpers_defineProperty(this,"getUIActionFromData",action=>{const actionType=Object.keys(action).filter(key=>key!=="timeout"&&key!=="retry").pop();if(!actionType)throw new Error(`Failed to get action using type [${actionType}]`);const uiAction=this.getUIAction(actionType);return uiAction.clone(action)});helpers_defineProperty(this,"getUIAction",actionType=>{const uiAction=this.repository[actionType];if(!uiAction)throw new Error(`Action type [${actionType}] not supported`);return new uiAction[0](uiAction[1])})}}const actionRepoSingleton=new helpers_ActionRepository;const convertTemplatesToArray=ismTemplates=>{const templates=[];if(Array.isArray(ismTemplates)){templates.push(...ismTemplates)}else if(ismTemplates){templates.push(ismTemplates)}return templates};const capitalizeFirstLetter=function(_ref){let[first,...rest]=_ref;let locale=arguments.length>1&&arguments[1]!==undefined?arguments[1]:navigator.language;return first.toLocaleUpperCase(locale)+rest.join("")};const getOrderInfo=(state,states)=>{const isEditing=!!state;const editingStateIdx=states.findIndex(s=>s===state);let afterBeforeState="";let order="after";let disableOrderSelections=false;if(isEditing){if(states.length===1){disableOrderSelections=true}else{if(editingStateIdx===0){var _states;afterBeforeState=(_states=states[editingStateIdx+1])===null||_states===void 0?void 0:_states.name;order="before"}else{var _states2;afterBeforeState=(_states2=states[editingStateIdx-1])===null||_states2===void 0?void 0:_states2.name}}}else{if(!states.length){disableOrderSelections=true}else{var _states3;afterBeforeState=(_states3=states[states.length-1])===null||_states3===void 0?void 0:_states3.name}}return{order:order,afterBeforeState:afterBeforeState,disableOrderSelections:disableOrderSelections}};const getUpdatedStates=(state,editingState,states,order,afterBeforeState)=>{const someStates=[];const isEditing=!!editingState;if(isEditing&&states.length===1||!isEditing&&!states.length)return[state];states.forEach((s,idx)=>{if(s.name===afterBeforeState&&order==="before")someStates.push(state);if(s.name!==(editingState===null||editingState===void 0?void 0:editingState.name))someStates.push(s);if(s.name===afterBeforeState&&order==="after")someStates.push(state)});return someStates};const getUpdatedPolicy=(currentPolicy,updatedState,editingState,currentStates,order,afterBeforeState)=>{const updatedStates=getUpdatedStates(updatedState,editingState,currentStates,order,afterBeforeState);let defaultState=currentPolicy.default_state;if(updatedStates.length===1){defaultState=updatedStates[0].name}if(editingState&&editingState.name===defaultState){defaultState=updatedState.name}return{...currentPolicy,states:updatedStates,default_state:defaultState}}},function(module,exports){module.exports=__osdSharedDeps__.MomentTimezone},function(module,exports){module.exports=flatten;flatten.flatten=flatten;flatten.unflatten=unflatten;function isBuffer(obj){return obj&&obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function keyIdentity(key){return key}function flatten(target,opts){opts=opts||{};const delimiter=opts.delimiter||".";const maxDepth=opts.maxDepth;const transformKey=opts.transformKey||keyIdentity;const output={};function step(object,prev,currentDepth){currentDepth=currentDepth||1;Object.keys(object).forEach((function(key){const value=object[key];const isarray=opts.safe&&Array.isArray(value);const type=Object.prototype.toString.call(value);const isbuffer=isBuffer(value);const isobject=type==="[object Object]"||type==="[object Array]";const newKey=prev?prev+delimiter+transformKey(key):transformKey(key);if(!isarray&&!isbuffer&&isobject&&Object.keys(value).length&&(!opts.maxDepth||currentDepth<maxDepth)){return step(value,newKey,currentDepth+1)}output[newKey]=value}))}step(target);return output}function unflatten(target,opts){opts=opts||{};const delimiter=opts.delimiter||".";
6const overwrite=opts.overwrite||false;const transformKey=opts.transformKey||keyIdentity;const result={};const isbuffer=isBuffer(target);if(isbuffer||Object.prototype.toString.call(target)!=="[object Object]"){return target}function getkey(key){const parsedKey=Number(key);return isNaN(parsedKey)||key.indexOf(".")!==-1||opts.object?key:parsedKey}function addKeys(keyPrefix,recipient,target){return Object.keys(target).reduce((function(result,key){result[keyPrefix+delimiter+key]=target[key];return result}),recipient)}function isEmpty(val){const type=Object.prototype.toString.call(val);const isArray=type==="[object Array]";const isObject=type==="[object Object]";if(!val){return true}else if(isArray){return!val.length}else if(isObject){return!Object.keys(val).length}}target=Object.keys(target).reduce((function(result,key){const type=Object.prototype.toString.call(target[key]);const isObject=type==="[object Object]"||type==="[object Array]";if(!isObject||isEmpty(target[key])){result[key]=target[key];return result}else{return addKeys(key,result,flatten(target[key],opts))}}),{});Object.keys(target).forEach((function(key){const split=key.split(delimiter).map(transformKey);let key1=getkey(split.shift());let key2=getkey(split[0]);let recipient=result;while(key2!==undefined){if(key1==="__proto__"){return}const type=Object.prototype.toString.call(recipient[key1]);const isobject=type==="[object Object]"||type==="[object Array]";if(!overwrite&&!isobject&&typeof recipient[key1]!=="undefined"){return}if(overwrite&&!isobject||!overwrite&&recipient[key1]==null){recipient[key1]=typeof key2==="number"&&!opts.object?[]:{}}recipient=recipient[key1];if(split.length>0){key1=getkey(split.shift());key2=getkey(split[0])}}recipient[key1]=unflatten(target[key],opts)}));return result}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return ListenType}));__webpack_require__.d(__webpack_exports__,"a",(function(){return JobScheduler_JobScheduler}));let ListenType=function(ListenType){ListenType["REINDEX"]="reindex";ListenType["SPLIT"]="split";ListenType["SHRINK"]="shrink";ListenType["FORCE_MERGE"]="forceMerge";ListenType["OPEN"]="open";return ListenType}({});var store_localstorage=__webpack_require__(84);function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class JobScheduler_JobScheduler{constructor(options){_defineProperty(this,"options",void 0);_defineProperty(this,"runningJobMap",{});_defineProperty(this,"storage",void 0);this.options=options;this.storage=options.storage||new store_localstorage["a"]}setStorage(storage){this.storage=storage;return this}
6async init(){this.loopJob();return true}getId(){return`${Date.now()}_${Math.floor(Math.random()*10)}`}formatJob(job){const{firstRunTimeout:firstRunTimeout,...others}=job;const formattedJob={...others};if(!formattedJob.id){formattedJob.id=this.getId()}if(!formattedJob.createTime){formattedJob.createTime=Date.now()}if(!formattedJob.timeout){formattedJob.timeout=1e3*60*60}return formattedJob}isStaledJob(job){if(!job.latestRunTime){return false}return job.timeout+job.createTime<job.latestRunTime}async loopJob(){const jobs=await this.storage.getAll();jobs.forEach(async job=>{if(this.isStaledJob(job)){await this.runStaledJob(job.id);await this.deleteJob(job.id);return}if(!this.runningJobMap[job.id]){const timeoutCallback=setTimeout(async()=>{if(!this.isStaledJob(job)){this.runJob(job.id)}else{await this.runStaledJob(job.id);await this.deleteJob(job.id)}},job.interval);this.runningJobMap[job.id]=timeoutCallback}})}async runStaledJob(jobId){const job=await this.getJob(jobId);if(!job){return undefined}const filteredCallbacks=this.options.callbacks.filter(callbackItem=>callbackItem.listenType===job.type||!callbackItem.listenType);await Promise.all(filteredCallbacks.map(async callbackItem=>{try{return callbackItem.timeoutCallback(job)}catch(e){return false}}))}async runJob(jobId){const job=await this.getJob(jobId);if(!job){return undefined}const filteredCallbacks=this.options.callbacks.filter(callbackItem=>callbackItem.listenType===job.type||!callbackItem.listenType);job.latestRunTime=Date.now();const result=await Promise.all(filteredCallbacks.map(async callbackItem=>{try{return await callbackItem.callback(job)}catch(e){return false}}));const hasFinish=result.some(res=>res===true);await this.deleteJob(job.id);if(!hasFinish){await this.addJob(job)}}addCallback(callback){this.options.callbacks.push(callback)}deleteCallback(callbackName){const findIndex=this.options.callbacks.findIndex(item=>item.callbackName===callbackName);if(findIndex>-1){this.options.callbacks.splice(findIndex,1)}}getAllCallbacks(){return this.options.callbacks}async addJob(job){const formattedJob=this.formatJob(job);if(this.runningJobMap[formattedJob.id]){return formattedJob}await this.storage.set(formattedJob.id,formattedJob);if(job.firstRunTimeout){setTimeout(()=>{this.runJob(formattedJob.id)},job.firstRunTimeout)}this.loopJob();return formattedJob}async deleteJob(jobId){clearTimeout(this.runningJobMap[jobId]);delete this.runningJobMap[jobId];const storageResult=await this.storage.delete(jobId);return storageResult||true}getJob(jobId){return this.storage.get(jobId)}getAllJobs(){return this.storage.getAll()}async changeJob(jobId,jobMeta){const nowJob=await this.getJob(jobId);if(!nowJob){return false}return this.storage.set(jobId,{...nowJob,...jobMeta,id:jobId})}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return jobSchedulerInstance}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var _lib_JobScheduler__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(34);const jobSchedulerInstance=new _lib_JobScheduler__WEBPACK_IMPORTED_MODULE_1__["a"]({callbacks:[]});jobSchedulerInstance.init();const JobSchedulerContext=react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(jobSchedulerInstance)},function(module,exports,__webpack_require__){const debug=__webpack_require__(72);const{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=__webpack_require__(71);const{safeRe:re,t:t}=__webpack_require__(63);const parseOptions=__webpack_require__(104);const{compareIdentifiers:compareIdentifiers}=__webpack_require__(137);class SemVer{constructor(version,options){options=parseOptions(options);if(version instanceof SemVer){if(version.loose===!!options.loose&&version.includePrerelease===!!options.includePrerelease){return version}else{version=version.version}}else if(typeof version!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)}if(version.length>MAX_LENGTH){throw new TypeError(`version is longer than ${MAX_LENGTH} characters`)}debug("SemVer",version,options);this.options=options;this.loose=!!options.loose;this.includePrerelease=!!options.includePrerelease;const m=version.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m){throw new TypeError(`Invalid Version: ${version}`)}this.raw=version;this.major=+m[1];this.minor=+m[2];this.patch=+m[3];
6if(this.major>MAX_SAFE_INTEGER||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>MAX_SAFE_INTEGER||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>MAX_SAFE_INTEGER||this.patch<0){throw new TypeError("Invalid patch version")}if(!m[4]){this.prerelease=[]}else{this.prerelease=m[4].split(".").map(id=>{if(/^[0-9]+$/.test(id)){const num=+id;if(num>=0&&num<MAX_SAFE_INTEGER){return num}}return id})}this.build=m[5]?m[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(other){debug("SemVer.compare",this.version,this.options,other);if(!(other instanceof SemVer)){if(typeof other==="string"&&other===this.version){return 0}other=new SemVer(other,this.options)}if(other.version===this.version){return 0}return this.compareMain(other)||this.comparePre(other)}compareMain(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}return compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)}comparePre(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}if(this.prerelease.length&&!other.prerelease.length){return-1}else if(!this.prerelease.length&&other.prerelease.length){return 1}else if(!this.prerelease.length&&!other.prerelease.length){return 0}let i=0;do{const a=this.prerelease[i];const b=other.prerelease[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}compareBuild(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}let i=0;do{const a=this.build[i];const b=other.build[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}inc(release,identifier,identifierBase){switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier,identifierBase);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier,identifierBase);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier,identifierBase);this.inc("pre",identifier,identifierBase);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",identifier,identifierBase)}this.inc("pre",identifier,identifierBase);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const base=Number(identifierBase)?1:0;if(!identifier&&identifierBase===false){throw new Error("invalid increment argument: identifier is empty")}if(this.prerelease.length===0){this.prerelease=[base]}else{let i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(identifier===this.prerelease.join(".")&&identifierBase===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(base)}}if(identifier){let prerelease=[identifier,base];if(identifierBase===false){prerelease=[identifier]}if(compareIdentifiers(this.prerelease[0],identifier)===0){if(isNaN(this.prerelease[1])){this.prerelease=prerelease}}else{this.prerelease=prerelease}}break}default:throw new Error(`invalid increment argument: ${release}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}module.exports=SemVer},function(module,exports,__webpack_require__){"use strict";const debug=__webpack_require__(80);const{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=__webpack_require__(79);const{safeRe:re,t:t}=__webpack_require__(64);const parseOptions=__webpack_require__(116);const{compareIdentifiers:compareIdentifiers}=__webpack_require__(145);class SemVer{constructor(version,options){options=parseOptions(options);if(version instanceof SemVer){if(version.loose===!!options.loose&&version.includePrerelease===!!options.includePrerelease){return version}else{version=version.version}}
vendor: 5,858 bytes, line 6
6else if(typeof version!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)}if(version.length>MAX_LENGTH){throw new TypeError(`version is longer than ${MAX_LENGTH} characters`)}debug("SemVer",version,options);this.options=options;this.loose=!!options.loose;this.includePrerelease=!!options.includePrerelease;const m=version.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m){throw new TypeError(`Invalid Version: ${version}`)}this.raw=version;this.major=+m[1];this.minor=+m[2];this.patch=+m[3];if(this.major>MAX_SAFE_INTEGER||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>MAX_SAFE_INTEGER||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>MAX_SAFE_INTEGER||this.patch<0){throw new TypeError("Invalid patch version")}if(!m[4]){this.prerelease=[]}else{this.prerelease=m[4].split(".").map(id=>{if(/^[0-9]+$/.test(id)){const num=+id;if(num>=0&&num<MAX_SAFE_INTEGER){return num}}return id})}this.build=m[5]?m[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(other){debug("SemVer.compare",this.version,this.options,other);if(!(other instanceof SemVer)){if(typeof other==="string"&&other===this.version){return 0}other=new SemVer(other,this.options)}if(other.version===this.version){return 0}return this.compareMain(other)||this.comparePre(other)}compareMain(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}if(this.major<other.major){return-1}if(this.major>other.major){return 1}if(this.minor<other.minor){return-1}if(this.minor>other.minor){return 1}if(this.patch<other.patch){return-1}if(this.patch>other.patch){return 1}return 0}comparePre(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}if(this.prerelease.length&&!other.prerelease.length){return-1}else if(!this.prerelease.length&&other.prerelease.length){return 1}else if(!this.prerelease.length&&!other.prerelease.length){return 0}let i=0;do{const a=this.prerelease[i];const b=other.prerelease[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}compareBuild(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}let i=0;do{const a=this.build[i];const b=other.build[i];debug("build compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}inc(release,identifier,identifierBase){if(release.startsWith("pre")){if(!identifier&&identifierBase===false){throw new Error("invalid increment argument: identifier is empty")}if(identifier){const match=`-${identifier}`.match(this.options.loose?re[t.PRERELEASELOOSE]:re[t.PRERELEASE]);if(!match||match[1]!==identifier){throw new Error(`invalid identifier: ${identifier}`)}}}switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier,identifierBase);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier,identifierBase);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier,identifierBase);this.inc("pre",identifier,identifierBase);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",identifier,identifierBase)}this.inc("pre",identifier,identifierBase);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const base=Number(identifierBase)?1:0;if(this.prerelease.length===0){this.prerelease=[base]}else{let i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(identifier===this.prerelease.join(".")&&identifierBase===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(base)}}if(identifier){let prerelease=[identifier,base];if(identifierBase===false){prerelease=[identifier]}if(compareIdentifiers(this.prerelease[0],identifier)===0){if(isNaN(this.prerelease[1])){this.prerelease=prerelease}}else{this.prerelease=prerelease}}break}default:throw new Error(`invalid increment argument: ${release}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}module.exports=SemVer},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ContextContainer}));var lodash__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3);var lodash__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);var _osd_std__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(624);function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
6class ContextContainer{constructor(pluginDependencies,coreId){var _this=this;this.pluginDependencies=pluginDependencies;this.coreId=coreId;_defineProperty(this,"contextProviders",new Map);_defineProperty(this,"contextNamesBySource",void 0);_defineProperty(this,"registerContext",(source,contextName,provider)=>{if(this.contextProviders.has(contextName)){throw new Error(`Context provider for ${contextName} has already been registered.`)}if(source!==this.coreId&&!this.pluginDependencies.has(source)){throw new Error(`Cannot register context for unknown plugin: ${source.toString()}`)}this.contextProviders.set(contextName,{provider:provider,source:source});this.contextNamesBySource.set(source,[...this.contextNamesBySource.get(source)||[],contextName]);return this});_defineProperty(this,"createHandler",(source,handler)=>{if(source!==this.coreId&&!this.pluginDependencies.has(source)){throw new Error(`Cannot create handler for unknown plugin: ${source.toString()}`)}return async function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}const context=await _this.buildContext(source,...args);return handler(context,...args)}});this.contextNamesBySource=new Map([[coreId,[]]])}async buildContext(source){for(var _len2=arguments.length,contextArgs=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){contextArgs[_key2-1]=arguments[_key2]}const contextsToBuild=new Set(this.getContextNamesForSource(source));return[...this.contextProviders].sort(sortByCoreFirst(this.coreId)).filter(_ref=>{let[contextName]=_ref;return contextsToBuild.has(contextName)}).reduce(async(contextPromise,_ref2)=>{let[contextName,{provider:provider,source:providerSource}]=_ref2;const resolvedContext=await contextPromise;const exposedContext=Object(_osd_std__WEBPACK_IMPORTED_MODULE_1__["a"])(resolvedContext,[...this.getContextNamesForSource(providerSource)]);return{...resolvedContext,[contextName]:await provider(exposedContext,...contextArgs)}},Promise.resolve({}))}getContextNamesForSource(source){if(source===this.coreId){return this.getContextNamesForCore()}else{return this.getContextNamesForPluginId(source)}}getContextNamesForCore(){return new Set(this.contextNamesBySource.get(this.coreId))}getContextNamesForPluginId(pluginId){const pluginDeps=this.pluginDependencies.get(pluginId);if(!pluginDeps){throw new Error(`Cannot create context for unknown plugin: ${pluginId.toString()}`)}return new Set([...this.contextNamesBySource.get(this.coreId),...this.contextNamesBySource.get(pluginId)||[],...Object(lodash__WEBPACK_IMPORTED_MODULE_0__["flatten"])(pluginDeps.map(p=>this.contextNamesBySource.get(p)||[]))])}}const sortByCoreFirst=coreId=>(_ref3,_ref4)=>{let[leftName,leftProvider]=_ref3;let[rightName,rightProvider]=_ref4;if(leftProvider.source===coreId){return rightProvider.source===coreId?0:-1}else{return rightProvider.source===coreId?1:0}}},,function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const compare=(a,b,loose)=>new SemVer(a,loose).compare(new SemVer(b,loose));module.exports=compare},function(module,exports,__webpack_require__){class Range{constructor(range,options){options=parseOptions(options);if(range instanceof Range){if(range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease){return range}else{return new Range(range.raw,options)}}if(range instanceof Comparator){this.raw=range.value;this.set=[[range]];this.format();return this}this.options=options;this.loose=!!options.loose;this.includePrerelease=!!options.includePrerelease;this.raw=range.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(c=>c.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const first=this.set[0];this.set=this.set.filter(c=>!isNullSet(c[0]));if(this.set.length===0){this.set=[first]}else if(this.set.length>1){for(const c of this.set){if(c.length===1&&isAny(c[0])){this.set=[c];break}}}}this.format()}format(){this.range=this.set.map(comps=>comps.join(" ").trim()).join("||").trim();return this.range}toString(){return this.range}parseRange(range){const memoOpts=(this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE);const memoKey=memoOpts+":"+range;const cached=cache.get(memoKey);if(cached){return cached}const loose=this.options.loose;const hr=loose?re[t.HYPHENRANGELOOSE]:re[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace(this.options.includePrerelease));debug("hyphen replace",range);range=range.replace(re[t.COMPARATORTRIM],comparatorTrimReplace);debug("comparator trim",range);range=range.replace(re[t.TILDETRIM],tildeTrimReplace);debug("tilde trim",range);range=range.replace(re[t.CARETTRIM],caretTrimReplace);debug("caret trim",range);let rangeList=range.split(" ").map(comp=>parseComparator(comp,this.options)).join(" ").split(/\s+/).map(comp=>replaceGTE0(comp,this.options));if(loose){rangeList=rangeList.filter(comp=>{debug("loose invalid filter",comp,this.options);return!!comp.match(re[t.COMPARATORLOOSE])})}debug("range list",rangeList);const rangeMap=new Map;const comparators=rangeList.map(comp=>new Comparator(comp,this.options));
6for(const comp of comparators){if(isNullSet(comp)){return[comp]}rangeMap.set(comp.value,comp)}if(rangeMap.size>1&&rangeMap.has("")){rangeMap.delete("")}const result=[...rangeMap.values()];cache.set(memoKey,result);return result}intersects(range,options){if(!(range instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(thisComparators=>isSatisfiable(thisComparators,options)&&range.set.some(rangeComparators=>isSatisfiable(rangeComparators,options)&&thisComparators.every(thisComparator=>rangeComparators.every(rangeComparator=>thisComparator.intersects(rangeComparator,options)))))}test(version){if(!version){return false}if(typeof version==="string"){try{version=new SemVer(version,this.options)}catch(er){return false}}for(let i=0;i<this.set.length;i++){if(testSet(this.set[i],version,this.options)){return true}}return false}}module.exports=Range;const LRU=__webpack_require__(384);const cache=new LRU({max:1e3});const parseOptions=__webpack_require__(104);const Comparator=__webpack_require__(74);const debug=__webpack_require__(72);const SemVer=__webpack_require__(36);const{safeRe:re,t:t,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=__webpack_require__(63);const{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=__webpack_require__(71);const isNullSet=c=>c.value==="<0.0.0-0";const isAny=c=>c.value==="";const isSatisfiable=(comparators,options)=>{let result=true;const remainingComparators=comparators.slice();let testComparator=remainingComparators.pop();while(result&&remainingComparators.length){result=remainingComparators.every(otherComparator=>testComparator.intersects(otherComparator,options));testComparator=remainingComparators.pop()}return result};const parseComparator=(comp,options)=>{debug("comp",comp,options);comp=replaceCarets(comp,options);debug("caret",comp);comp=replaceTildes(comp,options);debug("tildes",comp);comp=replaceXRanges(comp,options);debug("xrange",comp);comp=replaceStars(comp,options);debug("stars",comp);return comp};const isX=id=>!id||id.toLowerCase()==="x"||id==="*";const replaceTildes=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceTilde(c,options)).join(" ");const replaceTilde=(comp,options)=>{const r=options.loose?re[t.TILDELOOSE]:re[t.TILDE];return comp.replace(r,(_,M,m,p,pr)=>{debug("tilde",comp,_,M,m,p,pr);let ret;if(isX(M)){ret=""}else if(isX(m)){ret=`>=${M}.0.0 <${+M+1}.0.0-0`}else if(isX(p)){ret=`>=${M}.${m}.0 <${M}.${+m+1}.0-0`}else if(pr){debug("replaceTilde pr",pr);ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`}else{ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`}debug("tilde return",ret);return ret})};const replaceCarets=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceCaret(c,options)).join(" ");const replaceCaret=(comp,options)=>{debug("caret",comp,options);const r=options.loose?re[t.CARETLOOSE]:re[t.CARET];const z=options.includePrerelease?"-0":"";return comp.replace(r,(_,M,m,p,pr)=>{debug("caret",comp,_,M,m,p,pr);let ret;if(isX(M)){ret=""}else if(isX(m)){ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`}else if(isX(p)){if(M==="0"){ret=`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`}else{ret=`>=${M}.${m}.0${z} <${+M+1}.0.0-0`}}else if(pr){debug("replaceCaret pr",pr);if(M==="0"){if(m==="0"){ret=`>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p+1}-0`}else{ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`}}else{ret=`>=${M}.${m}.${p}-${pr} <${+M+1}.0.0-0`}}else{debug("no pr");if(M==="0"){if(m==="0"){ret=`>=${M}.${m}.${p}${z} <${M}.${m}.${+p+1}-0`}else{ret=`>=${M}.${m}.${p}${z} <${M}.${+m+1}.0-0`}}else{ret=`>=${M}.${m}.${p} <${+M+1}.0.0-0`}}debug("caret return",ret);return ret})};const replaceXRanges=(comp,options)=>{debug("replaceXRanges",comp,options);return comp.split(/\s+/).map(c=>replaceXRange(c,options)).join(" ")};const replaceXRange=(comp,options)=>{comp=comp.trim();const r=options.loose?re[t.XRANGELOOSE]:re[t.XRANGE];return comp.replace(r,(ret,gtlt,M,m,p,pr)=>{debug("xRange",comp,ret,gtlt,M,m,p,pr);const xM=isX(M);const xm=xM||isX(m);const xp=xm||isX(p);const anyX=xp;if(gtlt==="="&&anyX){gtlt=""}pr=options.includePrerelease?"-0":"";if(xM){if(gtlt===">"||gtlt==="<"){ret="<0.0.0-0"}else{ret="*"}}else if(gtlt&&anyX){if(xm){m=0}p=0;if(gtlt===">"){gtlt=">=";if(xm){M=+M+1;m=0;p=0}else{m=+m+1;p=0}}else if(gtlt==="<="){gtlt="<";if(xm){M=+M+1}else{m=+m+1}}if(gtlt==="<"){pr="-0"}ret=`${gtlt+M}.${m}.${p}${pr}`}else if(xm){ret=`>=${M}.0.0${pr} <${+M+1}.0.0-0`}else if(xp){ret=`>=${M}.${m}.0${pr} <${M}.${+m+1}.0-0`}debug("xRange return",ret);return ret})};const replaceStars=(comp,options)=>{debug("replaceStars",comp,options);return comp.trim().replace(re[t.STAR],"")};const replaceGTE0=(comp,options)=>{debug("replaceGTE0",comp,options);return comp.trim().replace(re[options.includePrerelease?t.GTE0PRE:t.GTE0],"")};const hyphenReplace=incPr=>($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr,tb)=>{if(isX(fM)){from=""}else if(isX(fm)){from=`>=${fM}.0.0${incPr?"-0":""}`}else if(isX(fp)){from=`>=${fM}.${fm}.0${incPr?"-0":""}`}else if(fpr){from=`>=${from}`}else{from=`>=${from}${incPr?"-0":""}`}if(isX(tM)){to=""}else if(isX(tm)){to=`<${+tM+1}.0.0-0`}else if(isX(tp)){to=`<${tM}.${+tm+1}.0-0`}else if(tpr){to=`<=${tM}.${tm}.${tp}-${tpr}`}else if(incPr){to=`<${tM}.${tm}.${+tp+1}-0`}else{to=`<=${to}`}return`${from} ${to}`.trim()};const testSet=(set,version,options)=>{for(let i=0;i<set.length;i++){if(!set[i].test(version)){return false}}if(version.prerelease.length&&!options.includePrerelease){for(let i=0;i<set.length;i++){debug(set[i].semver);if(set[i].semver===Comparator.ANY){continue}if(set[i].semver.prerelease.length>0){const allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch){return true}}}return false}return true}},function(module,exports){ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"],(function(acequire,exports,module){exp
6orts.isDark=false;exports.cssClass="ace-github";exports.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var dom=acequire("../lib/dom");dom.importCssString(exports.cssText,exports.cssClass)}))},function(module,exports,__webpack_require__){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop");var TextHighlightRules=acequire("./text_highlight_rules").TextHighlightRules;var JsonHighlightRules=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};oop.inherits(JsonHighlightRules,TextHighlightRules);exports.JsonHighlightRules=JsonHighlightRules}));ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(acequire,exports,module){"use strict";var Range=acequire("../range").Range;var MatchingBraceOutdent=function(){};(function(){this.checkOutdent=function(line,input){if(!/^\s+$/.test(line))return false;return/^\s*\}/.test(input)};this.autoOutdent=function(doc,row){var line=doc.getLine(row);var match=line.match(/^(\s*\})/);if(!match)return 0;var column=match[1].length;var openBracePos=doc.findMatchingBracket({row:row,column:column});if(!openBracePos||openBracePos.row==row)return 0;var indent=this.$getIndent(doc.getLine(openBracePos.row));doc.replace(new Range(row,0,row,column-1),indent)}
6;this.$getIndent=function(line){return line.match(/^\s*/)[0]}}).call(MatchingBraceOutdent.prototype);exports.MatchingBraceOutdent=MatchingBraceOutdent}));ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(acequire,exports,module){"use strict";var oop=acequire("../../lib/oop");var Range=acequire("../../range").Range;var BaseFoldMode=acequire("./fold_mode").FoldMode;var FoldMode=exports.FoldMode=function(commentRegex){if(commentRegex){this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+commentRegex.start));this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+commentRegex.end))}};oop.inherits(FoldMode,BaseFoldMode);(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/;this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/;this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/;this._getFoldWidgetBase=this.getFoldWidget;this.getFoldWidget=function(session,foldStyle,row){var line=session.getLine(row);if(this.singleLineBlockCommentRe.test(line)){if(!this.startRegionRe.test(line)&&!this.tripleStarBlockCommentRe.test(line))return""}var fw=this._getFoldWidgetBase(session,foldStyle,row);if(!fw&&this.startRegionRe.test(line))return"start";return fw};this.getFoldWidgetRange=function(session,foldStyle,row,forceMultiline){var line=session.getLine(row);if(this.startRegionRe.test(line))return this.getCommentRegionBlock(session,line,row);var match=line.match(this.foldingStartMarker);if(match){var i=match.index;if(match[1])return this.openingBracketBlock(session,match[1],row,i);var range=session.getCommentFoldRange(row,i+match[0].length,1);if(range&&!range.isMultiLine()){if(forceMultiline){range=this.getSectionRange(session,row)}else if(foldStyle!="all")range=null}return range}if(foldStyle==="markbegin")return;var match=line.match(this.foldingStopMarker);if(match){var i=match.index+match[0].length;if(match[1])return this.closingBracketBlock(session,match[1],row,i);return session.getCommentFoldRange(row,i,-1)}};this.getSectionRange=function(session,row){var line=session.getLine(row);var startIndent=line.search(/\S/);var startRow=row;var startColumn=line.length;row=row+1;var endRow=row;var maxRow=session.getLength();while(++row<maxRow){line=session.getLine(row);var indent=line.search(/\S/);if(indent===-1)continue;if(startIndent>indent)break;var subRange=this.getFoldWidgetRange(session,"all",row);if(subRange){if(subRange.start.row<=startRow){break}else if(subRange.isMultiLine()){row=subRange.end.row}else if(startIndent==indent){break}}endRow=row}return new Range(startRow,startColumn,endRow,session.getLine(endRow).length)};this.getCommentRegionBlock=function(session,line,row){var startColumn=line.search(/\s*$/);var maxRow=session.getLength();var startRow=row;var re=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;var depth=1;while(++row<maxRow){line=session.getLine(row);var m=re.exec(line);if(!m)continue;if(m[1])depth--;else depth++;if(!depth)break}var endRow=row;if(endRow>startRow){return new Range(startRow,startColumn,endRow,line.length)}}}).call(FoldMode.prototype)}));ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop");var TextMode=acequire("./text").Mode;var HighlightRules=acequire("./json_highlight_rules").JsonHighlightRules;var MatchingBraceOutdent=acequire("./matching_brace_outdent").MatchingBraceOutdent;var CstyleBehaviour=acequire("./behaviour/cstyle").CstyleBehaviour;var CStyleFoldMode=acequire("./folding/cstyle").FoldMode;var WorkerClient=acequire("../worker/worker_client").WorkerClient;var Mode=function(){this.HighlightRules=HighlightRules;this.$outdent=new MatchingBraceOutdent;this.$behaviour=new CstyleBehaviour;this.foldingRules=new CStyleFoldMode};oop.inherits(Mode,TextMode);(function(){this.getNextLineIndent=function(state,line,tab){var indent=this.$getIndent(line);if(state=="start"){var match=line.match(/^.*[\{\(\[]\s*$/);if(match){indent+=tab}}return indent};this.checkOutdent=function(state,line,input){return this.$outdent.checkOutdent(line,input)};this.autoOutdent=function(state,doc,row){this.$outdent.autoOutdent(doc,row)};this.createWorker=function(session){var worker=new WorkerClient(["ace"],__webpack_require__(445),"JsonWorker");worker.attachToDocument(session.getDocument());worker.on("annotate",(function(e){session.setAnnotations(e.data)}));worker.on("terminate",(function(){session.clearAnnotations()}));return worker};this.$id="ace/mode/json"}).call(Mode.prototype);exports.Mode=Mode}))},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const compare=(a,b,loose)=>new SemVer(a,loose).compare(new SemVer(b,loose));module.exports=compare},function(module,exports,__webpack_require__){"use strict";const SPACE_CHARACTERS=/\s+/g;class Range{constructor(range,options){options=parseOptions(options);if(range instanceof Range){if(range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease){return range}else{return new Range(range.raw,options)}}if(range instanceof Comparator){this.raw=range.value;this.set=[[range]];this.formatted=undefined;return this}this.options=options;this.loose=!!options.loose;this.includePrerelease=!!options.includePrerelease;this.raw=range.trim().replace(SPACE_CHARACTERS," ");this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(c=>c.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const first=this.set[0];this.set=this.set.filter(c=>!isNullSet(c[0]));if(this.set.length===0){this.set=[first]}else if(this.set.length>1){for(const c of this.set){if(c.length===1&&isAny(c[0])){this.set=[c];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let i=0;i<this.set.length;i++){if(i>0){this.formatted+="||"}const comps=this.set[i];for(let k=0;k<comps.length;k++){if(k>0){this.formatted+=" "}this.formatted+=comps[k].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(range){const memoOpts=(this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE);const memoKey=memoOpts+":"+range;const cached=cache.get(memoKey);if(cached){return cached}const loose=this.options.loose;const hr=loose?re[t.HYPHENRANGELOOSE]:re[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace(this.options.includePrerelease));debug("hyphen replace",range);range=range.replace(re[t.COMPARATORTRIM],comparatorTrimReplace);debug("comparator trim",range);range=range.replace(re[t.TILDETRIM],tildeTrimReplace);debug("tilde trim",range);range=range.replace(re[t.CARETTRIM],caretTrimReplace);debug("caret trim",range);let rangeList=range.split(" ").map(comp=>parseComparator(comp,this.options)).join(" ").split(/\s+/).map(comp=>replaceGTE0(comp,this.options));if(loose){rangeList=rangeList.filter(comp=>{debug("loose invalid filter",comp,this.options);return!!comp.match(re[t.COMPARATORLOOSE])})}debug("range list",rangeList);const rangeMap=new Map;const comparators=rangeList.map(comp=>new Comparator(comp,this.options));
6for(const comp of comparators){if(isNullSet(comp)){return[comp]}rangeMap.set(comp.value,comp)}if(rangeMap.size>1&&rangeMap.has("")){rangeMap.delete("")}const result=[...rangeMap.values()];cache.set(memoKey,result);return result}intersects(range,options){if(!(range instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(thisComparators=>isSatisfiable(thisComparators,options)&&range.set.some(rangeComparators=>isSatisfiable(rangeComparators,options)&&thisComparators.every(thisComparator=>rangeComparators.every(rangeComparator=>thisComparator.intersects(rangeComparator,options)))))}test(version){if(!version){return false}if(typeof version==="string"){try{version=new SemVer(version,this.options)}catch(er){return false}}for(let i=0;i<this.set.length;i++){if(testSet(this.set[i],version,this.options)){return true}}return false}}module.exports=Range;const LRU=__webpack_require__(459);const cache=new LRU;const parseOptions=__webpack_require__(116);const Comparator=__webpack_require__(82);const debug=__webpack_require__(80);const SemVer=__webpack_require__(37);const{safeRe:re,t:t,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=__webpack_require__(64);const{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=__webpack_require__(79);const isNullSet=c=>c.value==="<0.0.0-0";const isAny=c=>c.value==="";const isSatisfiable=(comparators,options)=>{let result=true;const remainingComparators=comparators.slice();let testComparator=remainingComparators.pop();while(result&&remainingComparators.length){result=remainingComparators.every(otherComparator=>testComparator.intersects(otherComparator,options));testComparator=remainingComparators.pop()}return result};const parseComparator=(comp,options)=>{comp=comp.replace(re[t.BUILD],"");debug("comp",comp,options);comp=replaceCarets(comp,options);debug("caret",comp);comp=replaceTildes(comp,options);debug("tildes",comp);comp=replaceXRanges(comp,options);debug("xrange",comp);comp=replaceStars(comp,options);debug("stars",comp);return comp};const isX=id=>!id||id.toLowerCase()==="x"||id==="*";const replaceTildes=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceTilde(c,options)).join(" ");const replaceTilde=(comp,options)=>{const r=options.loose?re[t.TILDELOOSE]:re[t.TILDE];return comp.replace(r,(_,M,m,p,pr)=>{debug("tilde",comp,_,M,m,p,pr);let ret;if(isX(M)){ret=""}else if(isX(m)){ret=`>=${M}.0.0 <${+M+1}.0.0-0`}else if(isX(p)){ret=`>=${M}.${m}.0 <${M}.${+m+1}.0-0`}else if(pr){debug("replaceTilde pr",pr);ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`}else{ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`}debug("tilde return",ret);return ret})};const replaceCarets=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceCaret(c,options)).join(" ");const replaceCaret=(comp,options)=>{debug("caret",comp,options);const r=options.loose?re[t.CARETLOOSE]:re[t.CARET];const z=options.includePrerelease?"-0":"";return comp.replace(r,(_,M,m,p,pr)=>{debug("caret",comp,_,M,m,p,pr);let ret;if(isX(M)){ret=""}else if(isX(m)){ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`}else if(isX(p)){if(M==="0"){ret=`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`}else{ret=`>=${M}.${m}.0${z} <${+M+1}.0.0-0`}}else if(pr){debug("replaceCaret pr",pr);if(M==="0"){if(m==="0"){ret=`>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p+1}-0`}else{ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`}}else{ret=`>=${M}.${m}.${p}-${pr} <${+M+1}.0.0-0`}}else{debug("no pr");if(M==="0"){if(m==="0"){ret=`>=${M}.${m}.${p}${z} <${M}.${m}.${+p+1}-0`}else{ret=`>=${M}.${m}.${p}${z} <${M}.${+m+1}.0-0`}}else{ret=`>=${M}.${m}.${p} <${+M+1}.0.0-0`}}debug("caret return",ret);return ret})};const replaceXRanges=(comp,options)=>{debug("replaceXRanges",comp,options);return comp.split(/\s+/).map(c=>replaceXRange(c,options)).join(" ")};const replaceXRange=(comp,options)=>{comp=comp.trim();const r=options.loose?re[t.XRANGELOOSE]:re[t.XRANGE];return comp.replace(r,(ret,gtlt,M,m,p,pr)=>{debug("xRange",comp,ret,gtlt,M,m,p,pr);const xM=isX(M);const xm=xM||isX(m);const xp=xm||isX(p);const anyX=xp;if(gtlt==="="&&anyX){gtlt=""}pr=options.includePrerelease?"-0":"";if(xM){if(gtlt===">"||gtlt==="<"){ret="<0.0.0-0"}else{ret="*"}}else if(gtlt&&anyX){if(xm){m=0}p=0;if(gtlt===">"){gtlt=">=";if(xm){M=+M+1;m=0;p=0}else{m=+m+1;p=0}}else if(gtlt==="<="){gtlt="<";if(xm){M=+M+1}else{m=+m+1}}if(gtlt==="<"){pr="-0"}ret=`${gtlt+M}.${m}.${p}${pr}`}else if(xm){ret=`>=${M}.0.0${pr} <${+M+1}.0.0-0`}else if(xp){ret=`>=${M}.${m}.0${pr} <${M}.${+m+1}.0-0`}debug("xRange return",ret);return ret})};const replaceStars=(comp,options)=>{debug("replaceStars",comp,options);return comp.trim().replace(re[t.STAR],"")};const replaceGTE0=(comp,options)=>{debug("replaceGTE0",comp,options);return comp.trim().replace(re[options.includePrerelease?t.GTE0PRE:t.GTE0],"")};const hyphenReplace=incPr=>($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr)=>{if(isX(fM)){from=""}else if(isX(fm)){from=`>=${fM}.0.0${incPr?"-0":""}`}else if(isX(fp)){from=`>=${fM}.${fm}.0${incPr?"-0":""}`}else if(fpr){from=`>=${from}`}else{from=`>=${from}${incPr?"-0":""}`}if(isX(tM)){to=""}else if(isX(tm)){to=`<${+tM+1}.0.0-0`}else if(isX(tp)){to=`<${tM}.${+tm+1}.0-0`}else if(tpr){to=`<=${tM}.${tm}.${tp}-${tpr}`}else if(incPr){to=`<${tM}.${tm}.${+tp+1}-0`}else{to=`<=${to}`}return`${from} ${to}`.trim()};const testSet=(set,version,options)=>{for(let i=0;i<set.length;i++){if(!set[i].test(version)){return false}}if(version.prerelease.length&&!options.includePrerelease){for(let i=0;i<set.length;i++){debug(set[i].semver);if(set[i].semver===Comparator.ANY){continue}if(set[i].semver.prerelease.length>0){const allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch){return true}}}return false}return true}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return DarkModeConsumer}));__webpack_require__.d(__webpack_exports__,"b",(function(){return DarkModeContext}));var external_osdSharedDeps_React_=__webpack_require__(0);const DarkModeContext=Object(external_osdSharedDeps_React_["createContext"])({isDarkMode:false});const DarkModeConsumer=DarkModeContext.Consumer},function(module,__webpack_exports__,__webpack_require__){"use strict";var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}const JSONEditor=Object(external_osdSharedDeps_React_["forwardRef"])((_ref,ref)=>{let{value:value,onChange:onChange,disabled:disabled,...others}=_ref;const[tempEditorValue,setTempEditorValue]=Object(external_osdSharedDeps_React_["useState"])(value);const[confirmModalVisible,setConfirmModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const valueRef=Object(external_osdSharedDeps_React_["useRef"])(tempEditorValue);valueRef.current=tempEditorValue;Object(external_osdSharedDeps_React_["useEffect"])(()=>{setTempEditorValue(value)},[value]);Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({validate:()=>new Promise((resolve,reject)=>{try{JSON.parse(tempEditorValue);setConfirmModalVisible(false);resolve("")}catch(e){setConfirmModalVisible(true);reject("Format validate error")}}),getValue:()=>valueRef.current,setValue:val=>setTempEditorValue(val)}));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("textarea",{readOnly:true,style:{display:"none"},value:tempEditorValue,"data-test-subj":`${others["data-test-subj"]||"jsonEditor"}-valueDisplay`}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],_extends({readOnly:disabled},others,{style:{...others.style,border:confirmModalVisible?"1px solid red":undefined},mode:"json",value:tempEditorValue,onChange:setTempEditorValue,onBlur:()=>{if(others.readOnly){return}try{JSON.parse(tempEditorValue);onChange&&onChange(tempEditorValue);setConfirmModalVisible(false)}catch(e){setConfirmModalVisible(true)}}})),confirmModalVisible&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:confirmModalVisible,error:"Your input does not match the validation of json format, please fix the error line with error aside."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)))});var JSONEditor_JSONEditor=JSONEditor;var components_JSONEditor=__webpack_exports__["a"]=JSONEditor_JSONEditor},function(module,exports){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(e){if(typeof window==="object")g=window}module.exports=g},function(module,exports,__webpack_require__){"use strict";module.exports=TypeError},function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(203);module.exports=Function.prototype.bind||implementation},function(module,exports,__webpack_require__){"use strict";if(true){module.exports=__webpack_require__(242)}else{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return WORKSPACE_PATH_PREFIX}));const WORKSPACE_TYPE="workspace";const WORKSPACE_PATH_PREFIX="/w"},function(module,exports,__webpack_require__){"use strict";module.exports=function equal(a,b){if(a===b)return true;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;for(i=length;i--!==0;){var key=keys[i];if(!equal(a[key],b[key]))return false}return true}return a!==a&&b!==b}},function(module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const parse=(version,options,throwErrors=false)=>{if(version instanceof SemVer){return version}try{return new SemVer(version,options)}catch(er){if(!throwErrors){return null}throw er}};
6module.exports=parse},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const parse=(version,options,throwErrors=false)=>{if(version instanceof SemVer){return version}try{return new SemVer(version,options)}catch(er){if(!throwErrors){return null}throw er}};module.exports=parse},function(module,exports,__webpack_require__){"use strict";module.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:__webpack_require__(123),ucs2length:__webpack_require__(553),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(o,to){to=to||{};for(var key in o)to[key]=o[key];return to}function checkDataType(dataType,data,strictNumbers,negate){var EQUAL=negate?" !== ":" === ",AND=negate?" || ":" && ",OK=negate?"!":"",NOT=negate?"":"!";switch(dataType){case"null":return data+EQUAL+"null";case"array":return OK+"Array.isArray("+data+")";case"object":return"("+OK+data+AND+"typeof "+data+EQUAL+'"object"'+AND+NOT+"Array.isArray("+data+"))";case"integer":return"(typeof "+data+EQUAL+'"number"'+AND+NOT+"("+data+" % 1)"+AND+data+EQUAL+data+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";case"number":return"(typeof "+data+EQUAL+'"'+dataType+'"'+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";default:return"typeof "+data+EQUAL+'"'+dataType+'"'}}function checkDataTypes(dataTypes,data,strictNumbers){switch(dataTypes.length){case 1:return checkDataType(dataTypes[0],data,strictNumbers,true);default:var code="";var types=toHash(dataTypes);
vendor: 5,217 bytes, line 6
6if(types.array&&types.object){code=types.null?"(":"(!"+data+" || ";code+="typeof "+data+' !== "object")';delete types.null;delete types.array;delete types.object}if(types.number)delete types.integer;for(var t in types)code+=(code?" && ":"")+checkDataType(t,data,strictNumbers,true);return code}}var COERCE_TO_TYPES=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(optionCoerceTypes,dataTypes){if(Array.isArray(dataTypes)){var types=[];for(var i=0;i<dataTypes.length;i++){var t=dataTypes[i];if(COERCE_TO_TYPES[t])types[types.length]=t;else if(optionCoerceTypes==="array"&&t==="array")types[types.length]=t}if(types.length)return types}else if(COERCE_TO_TYPES[dataTypes]){return[dataTypes]}else if(optionCoerceTypes==="array"&&dataTypes==="array"){return["array"]}}function toHash(arr){var hash={};for(var i=0;i<arr.length;i++)hash[arr[i]]=true;return hash}var IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var SINGLE_QUOTE=/'|\\/g;function getProperty(key){return typeof key=="number"?"["+key+"]":IDENTIFIER.test(key)?"."+key:"['"+escapeQuotes(key)+"']"}function escapeQuotes(str){return str.replace(SINGLE_QUOTE,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(str,dataVar){dataVar+="[^0-9]";var matches=str.match(new RegExp(dataVar,"g"));return matches?matches.length:0}function varReplace(str,dataVar,expr){dataVar+="([^0-9])";expr=expr.replace(/\$/g,"$$$$");return str.replace(new RegExp(dataVar,"g"),expr+"$1")}function schemaHasRules(schema,rules){if(typeof schema=="boolean")return!schema;for(var key in schema)if(rules[key])return true}function schemaHasRulesExcept(schema,rules,exceptKeyword){if(typeof schema=="boolean")return!schema&&exceptKeyword!="not";for(var key in schema)if(key!=exceptKeyword&&rules[key])return true}function schemaUnknownRules(schema,rules){if(typeof schema=="boolean")return;for(var key in schema)if(!rules[key])return key}function toQuotedString(str){return"'"+escapeQuotes(str)+"'"}function getPathExpr(currentPath,expr,jsonPointers,isNumber){var path=jsonPointers?"'/' + "+expr+(isNumber?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):isNumber?"'[' + "+expr+" + ']'":"'[\\'' + "+expr+" + '\\']'";return joinPaths(currentPath,path)}function getPath(currentPath,prop,jsonPointers){var path=jsonPointers?toQuotedString("/"+escapeJsonPointer(prop)):toQuotedString(getProperty(prop));return joinPaths(currentPath,path)}var JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/;var RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,lvl,paths){var up,jsonPointer,data,matches;if($data==="")return"rootData";if($data[0]=="/"){if(!JSON_POINTER.test($data))throw new Error("Invalid JSON-pointer: "+$data);jsonPointer=$data;data="rootData"}else{matches=$data.match(RELATIVE_JSON_POINTER);if(!matches)throw new Error("Invalid JSON-pointer: "+$data);up=+matches[1];jsonPointer=matches[2];if(jsonPointer=="#"){if(up>=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);data="data"+(lvl-up||"");if(!jsonPointer)return data}var expr=data;var segments=jsonPointer.split("/");for(var i=0;i<segments.length;i++){var segment=segments[i];if(segment){data+=getProperty(unescapeJsonPointer(segment));expr+=" && "+data}}return expr}function joinPaths(a,b){if(a=='""')return b;return(a+" + "+b).replace(/([^\\])' \+ '/g,"$1")}function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}function escapeJsonPointer(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(str){return str.replace(/~1/g,"/").replace(/~0/g,"~")}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return MountWrapper}));__webpack_require__.d(__webpack_exports__,"b",(function(){return mountReactNode}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var react_dom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(23);var react_dom__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(21);var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__);const defaultWrapperClass="osdMountWrapper";const MountWrapper=_ref=>{let{mount:mount,className:className=defaultWrapperClass}=_ref;const element=Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(null);Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(()=>mount(element.current),[mount]);return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:className,ref:element})};const mountReactNode=node=>element=>{Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["render"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["I18nProvider"],null,
6node),element);return()=>Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["unmountComponentAtNode"])(element)}},function(module,exports){module.exports=__osdSharedDeps__.ElasticEuiLibServices},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return SECURITY_EXCEPTION_PREFIX}));const API_ROUTE_PREFIX="/_plugins/_ism";const API_ROUTE_PREFIX_ROLLUP="/_plugins/_rollup";const TRANSFORM_ROUTE_PREFIX="/_plugins/_transform";const NOTIFICATIONS_API_ROUTE_PREFIX="/_plugins/_notifications";const CHANNELS_ROUTE=`${NOTIFICATIONS_API_ROUTE_PREFIX}/channels`;const NOTIFICATION_CONFIGS_ROUTE=`${NOTIFICATIONS_API_ROUTE_PREFIX}/configs`;const SM_ROUTE_PREFIX="/_plugins/_sm";const API={POLICY_BASE:`${API_ROUTE_PREFIX}/policies`,EXPLAIN_BASE:`${API_ROUTE_PREFIX}/explain`,RETRY_BASE:`${API_ROUTE_PREFIX}/retry`,ADD_POLICY_BASE:`${API_ROUTE_PREFIX}/add`,REMOVE_POLICY_BASE:`${API_ROUTE_PREFIX}/remove`,CHANGE_POLICY_BASE:`${API_ROUTE_PREFIX}/change_policy`,ROLLUP_JOBS_BASE:`${API_ROUTE_PREFIX_ROLLUP}/jobs`,TRANSFORM_BASE:`${TRANSFORM_ROUTE_PREFIX}`,CHANNELS_BASE:`${CHANNELS_ROUTE}`,NOTIFICATION_CONFIGS_BASE:`${NOTIFICATION_CONFIGS_ROUTE}`,SM_POLICY_BASE:`${SM_ROUTE_PREFIX}/policies`};const DEFAULT_HEADERS={"Content-Type":"application/json",Accept:"application/json"};let CLUSTER=function(CLUSTER){CLUSTER["ADMIN"]="admin";CLUSTER["ISM"]="opendistro_ism";CLUSTER["DATA"]="data";return CLUSTER}({});let INDEX=function(INDEX){INDEX["OPENDISTRO_ISM_CONFIG"]=".opendistro-ism-config";return INDEX}({});let Setting=function(Setting){Setting["RolloverAlias"]="plugins.index_state_management.rollover_alias";return Setting}({});const SECURITY_EXCEPTION_PREFIX="[security_exception]"},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(process){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__);var _JSONEditor__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(47);var _index_scss__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(486);var _index_scss__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_3__);var _interface__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(149);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}const LazyBaseEditor=react__WEBPACK_IMPORTED_MODULE_0___default.a.lazy(()=>{var _process;return((_process=process)===null||_process===void 0||(_process=Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}))===null||_process===void 0?void 0:_process.NODE_ENV)==="test"?__webpack_require__.e(1).then(__webpack_require__.bind(null,171)):Promise.all([__webpack_require__.e(7),__webpack_require__.e(6)]).then(__webpack_require__.bind(null,629))});const Fallback=()=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiDelayRender"],null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiLoadingContent"],{lines:3}));const MonacoJSONEditor=Object(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Suspense,{fallback:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Fallback,null)},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LazyBaseEditor,_extends({},props,{ref:ref}))));__webpack_exports__["a"]=MonacoJSONEditor}).call(this,__webpack_require__(54))},function(module,exports,__webpack_require__){"use strict";module.exports=Function.prototype.call}
6,function(module,exports,__webpack_require__){const{MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH:MAX_SAFE_BUILD_LENGTH,MAX_LENGTH:MAX_LENGTH}=__webpack_require__(71);const debug=__webpack_require__(72);exports=module.exports={};const re=exports.re=[];const safeRe=exports.safeRe=[];const src=exports.src=[];const t=exports.t={};let R=0;const LETTERDASHNUMBER="[a-zA-Z0-9-]";const safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],[LETTERDASHNUMBER,MAX_SAFE_BUILD_LENGTH]];const makeSafeRegex=value=>{for(const[token,max]of safeRegexReplacements){value=value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`)}return value};const createToken=(name,value,isGlobal)=>{const safe=makeSafeRegex(value);const index=R++;debug(name,index,value);t[name]=index;src[index]=value;re[index]=new RegExp(value,isGlobal?"g":undefined);safeRe[index]=new RegExp(safe,isGlobal?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${LETTERDASHNUMBER}+`);createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);createToken("FULL",`^${src[t.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",src[t.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,true);exports.tildeTrimReplace="$1~";createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,true);exports.caretTrimReplace="$1^";createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,true);exports.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},function(module,exports,__webpack_require__){"use strict";
6const{MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH:MAX_SAFE_BUILD_LENGTH,MAX_LENGTH:MAX_LENGTH}=__webpack_require__(79);const debug=__webpack_require__(80);exports=module.exports={};const re=exports.re=[];const safeRe=exports.safeRe=[];const src=exports.src=[];const safeSrc=exports.safeSrc=[];const t=exports.t={};let R=0;const LETTERDASHNUMBER="[a-zA-Z0-9-]";const safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],[LETTERDASHNUMBER,MAX_SAFE_BUILD_LENGTH]];const makeSafeRegex=value=>{for(const[token,max]of safeRegexReplacements){value=value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`)}return value};const createToken=(name,value,isGlobal)=>{const safe=makeSafeRegex(value);const index=R++;debug(name,index,value);t[name]=index;src[index]=value;safeSrc[index]=safe;re[index]=new RegExp(value,isGlobal?"g":undefined);safeRe[index]=new RegExp(safe,isGlobal?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${LETTERDASHNUMBER}+`);createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);createToken("FULL",`^${src[t.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);createToken("COERCE",`${src[t.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",src[t.COERCEPLAIN]+`(?:${src[t.PRERELEASE]})?`+`(?:${src[t.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",src[t.COERCE],true);createToken("COERCERTLFULL",src[t.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,true);exports.tildeTrimReplace="$1~";createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,true);exports.caretTrimReplace="$1^";createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,true);exports.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},function(module,exports,__webpack_require__){(function(global,factory){true?factory(exports):undefined})(this,(function(exports){"use strict";function Diff(){}Diff.prototype={diff:function diff(oldString,newString){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=options.callback;if(typeof options==="function"){callback=options;options={}}this.options=options;var self=this;function done(value){if(callback){setTimeout((function(){callback(undefined,value)}),0);return true}else{return value}}oldString=this.castInput(oldString);newString=this.castInput(newString);oldString=this.removeEmpty(this.tokenize(oldString));newString=this.removeEmpty(this.tokenize(newString));var newLen=newString.length,oldLen=oldString.length;var editLength=1;var maxEditLength=newLen+oldLen;var bestPath=[{newPos:-1,components:[]}];var oldPos=this.extractCommon(bestPath[0],newString,oldString,0);if(bestPath[0].newPos+1>=newLen&&oldPos+1>=oldLen){return done([{value:this.join(newString),count:newString.length}])}function execEditLength(){for(var diagonalPath=-1*editLength;diagonalPath<=editLength;diagonalPath+=2){var basePath=void 0;var addPath=bestPath[diagonalPath-1],removePath=bestPath[diagonalPath+1],_oldPos=(removePath?removePath.newPos:0)-diagonalPath;if(addPath){bestPath[diagonalPath-1]=undefined}var canAdd=addPath&&addPath.newPos+1<newLen,canRemove=removePath&&0<=_oldPos&&_oldPos<oldLe
6n;if(!canAdd&&!canRemove){bestPath[diagonalPath]=undefined;continue}if(!canAdd||canRemove&&addPath.newPos<removePath.newPos){basePath=clonePath(removePath);self.pushComponent(basePath.components,undefined,true)}else{basePath=addPath;basePath.newPos++;self.pushComponent(basePath.components,true,undefined)}_oldPos=self.extractCommon(basePath,newString,oldString,diagonalPath);if(basePath.newPos+1>=newLen&&_oldPos+1>=oldLen){return done(buildValues(self,basePath.components,newString,oldString,self.useLongestToken))}else{bestPath[diagonalPath]=basePath}}editLength++}if(callback){(function exec(){setTimeout((function(){if(editLength>maxEditLength){return callback()}if(!execEditLength()){exec()}}),0)})()}else{while(editLength<=maxEditLength){var ret=execEditLength();if(ret){return ret}}}},pushComponent:function pushComponent(components,added,removed){var last=components[components.length-1];if(last&&last.added===added&&last.removed===removed){components[components.length-1]={count:last.count+1,added:added,removed:removed}}else{components.push({count:1,added:added,removed:removed})}},extractCommon:function extractCommon(basePath,newString,oldString,diagonalPath){var newLen=newString.length,oldLen=oldString.length,newPos=basePath.newPos,oldPos=newPos-diagonalPath,commonCount=0;while(newPos+1<newLen&&oldPos+1<oldLen&&this.equals(newString[newPos+1],oldString[oldPos+1])){newPos++;oldPos++;commonCount++}if(commonCount){basePath.components.push({count:commonCount})}basePath.newPos=newPos;return oldPos},equals:function equals(left,right){if(this.options.comparator){return this.options.comparator(left,right)}else{return left===right||this.options.ignoreCase&&left.toLowerCase()===right.toLowerCase()}},removeEmpty:function removeEmpty(array){var ret=[];for(var i=0;i<array.length;i++){if(array[i]){ret.push(array[i])}}return ret},castInput:function castInput(value){return value},tokenize:function tokenize(value){return value.split("")},join:function join(chars){return chars.join("")}};function buildValues(diff,components,newString,oldString,useLongestToken){var componentPos=0,componentLen=components.length,newPos=0,oldPos=0;for(;componentPos<componentLen;componentPos++){var component=components[componentPos];if(!component.removed){if(!component.added&&useLongestToken){var value=newString.slice(newPos,newPos+component.count);value=value.map((function(value,i){var oldValue=oldString[oldPos+i];return oldValue.length>value.length?oldValue:value}));component.value=diff.join(value)}else{component.value=diff.join(newString.slice(newPos,newPos+component.count))}newPos+=component.count;if(!component.added){oldPos+=component.count}}else{component.value=diff.join(oldString.slice(oldPos,oldPos+component.count));oldPos+=component.count;if(componentPos&&components[componentPos-1].added){var tmp=components[componentPos-1];components[componentPos-1]=components[componentPos];components[componentPos]=tmp}}}var lastComponent=components[componentLen-1];if(componentLen>1&&typeof lastComponent.value==="string"&&(lastComponent.added||lastComponent.removed)&&diff.equals("",lastComponent.value)){components[componentLen-2].value+=lastComponent.value;components.pop()}return components}function clonePath(path){return{newPos:path.newPos,components:path.components.slice(0)}}var characterDiff=new Diff;function diffChars(oldStr,newStr,options){return characterDiff.diff(oldStr,newStr,options)}function generateOptions(options,defaults){if(typeof options==="function"){defaults.callback=options}else if(options){for(var name in options){if(options.hasOwnProperty(name)){defaults[name]=options[name]}}}return defaults}var extendedWordChars=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;var reWhitespace=/\S/;var wordDiff=new Diff;wordDiff.equals=function(left,right){if(this.options.ignoreCase){left=left.toLowerCase();right=right.toLowerCase()}return left===right||this.options.ignoreWhitespace&&!reWhitespace.test(left)&&!reWhitespace.test(right)};wordDiff.tokenize=function(value){var tokens=value.split(/(\s+|[()[\]{}'"]|\b)/);for(var i=0;i<tokens.length-1;i++){if(!tokens[i+1]&&tokens[i+2]&&extendedWordChars.test(tokens[i])&&extendedWordChars.test(tokens[i+2])){tokens[i]+=tokens[i+2];tokens.splice(i+1,2);i--}}return tokens}
6;function diffWords(oldStr,newStr,options){options=generateOptions(options,{ignoreWhitespace:true});return wordDiff.diff(oldStr,newStr,options)}function diffWordsWithSpace(oldStr,newStr,options){return wordDiff.diff(oldStr,newStr,options)}var lineDiff=new Diff;lineDiff.tokenize=function(value){var retLines=[],linesAndNewlines=value.split(/(\n|\r\n)/);if(!linesAndNewlines[linesAndNewlines.length-1]){linesAndNewlines.pop()}for(var i=0;i<linesAndNewlines.length;i++){var line=linesAndNewlines[i];if(i%2&&!this.options.newlineIsToken){retLines[retLines.length-1]+=line}else{if(this.options.ignoreWhitespace){line=line.trim()}retLines.push(line)}}return retLines};function diffLines(oldStr,newStr,callback){return lineDiff.diff(oldStr,newStr,callback)}function diffTrimmedLines(oldStr,newStr,callback){var options=generateOptions(callback,{ignoreWhitespace:true});return lineDiff.diff(oldStr,newStr,options)}var sentenceDiff=new Diff;sentenceDiff.tokenize=function(value){return value.split(/(\S.+?[.!?])(?=\s+|$)/)};function diffSentences(oldStr,newStr,callback){return sentenceDiff.diff(oldStr,newStr,callback)}var cssDiff=new Diff;cssDiff.tokenize=function(value){return value.split(/([{}:;,]|\s+)/)};function diffCss(oldStr,newStr,callback){return cssDiff.diff(oldStr,newStr,callback)}function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(obj){return typeof obj}}else{_typeof=function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var objectPrototypeToString=Object.prototype.toString;var jsonDiff=new Diff;jsonDiff.useLongestToken=true;jsonDiff.tokenize=lineDiff.tokenize;jsonDiff.castInput=function(value){var _this$options=this.options,undefinedReplacement=_this$options.undefinedReplacement,_this$options$stringi=_this$options.stringifyReplacer,stringifyReplacer=_this$options$stringi===void 0?function(k,v){return typeof v==="undefined"?undefinedReplacement:v}:_this$options$stringi;return typeof value==="string"?value:JSON.stringify(canonicalize(value,null,null,stringifyReplacer),stringifyReplacer," ")};jsonDiff.equals=function(left,right){return Diff.prototype.equals.call(jsonDiff,left.replace(/,([\r\n])/g,"$1"),right.replace(/,([\r\n])/g,"$1"))};function diffJson(oldObj,newObj,options){return jsonDiff.diff(oldObj,newObj,options)}function canonicalize(obj,stack,replacementStack,replacer,key){stack=stack||[];replacementStack=replacementStack||[];if(replacer){obj=replacer(key,obj)}var i;for(i=0;i<stack.length;i+=1){if(stack[i]===obj){return replacementStack[i]}}var canonicalizedObj;if("[object Array]"===objectPrototypeToString.call(obj)){stack.push(obj);canonicalizedObj=new Array(obj.length);replacementStack.push(canonicalizedObj);for(i=0;i<obj.length;i+=1){canonicalizedObj[i]=canonicalize(obj[i],stack,replacementStack,replacer,key)}stack.pop();replacementStack.pop();return canonicalizedObj}if(obj&&obj.toJSON){obj=obj.toJSON()}if(_typeof(obj)==="object"&&obj!==null){stack.push(obj);canonicalizedObj={};replacementStack.push(canonicalizedObj);var sortedKeys=[],_key;for(_key in obj){if(obj.hasOwnProperty(_key)){sortedKeys.push(_key)}}sortedKeys.sort();for(i=0;i<sortedKeys.length;i+=1){_key=sortedKeys[i];canonicalizedObj[_key]=canonicalize(obj[_key],stack,replacementStack,replacer,_key)}stack.pop();replacementStack.pop()}else{canonicalizedObj=obj}return canonicalizedObj}var arrayDiff=new Diff;arrayDiff.tokenize=function(value){return value.slice()};arrayDiff.join=arrayDiff.removeEmpty=function(value){return value};function diffArrays(oldArr,newArr,callback){return arrayDiff.diff(oldArr,newArr,callback)}function parsePatch(uniDiff){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var diffstr=uniDiff.split(/\r\n|[\n\v\f\r\x85]/),delimiters=uniDiff.match(/\r\n|[\n\v\f\r\x85]/g)||[],list=[],i=0;function parseIndex(){var index={};list.push(index);while(i<diffstr.length){var line=diffstr[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(line)){break}var headerMatch=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line);if(headerMatch){index.index=line.substring(headerMatch[0].length).trim()}i++}parseFileHeader(index);parseFileHeader(index);index.hunks=[];while(i<diffstr.length){var _line=diffstr[i];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)){break}else if(/^@@/.test(_line)){index.hunks.push(parseHunk())}else if(_line&&options.strict){throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(_line))}else{i++}}}function parseFileHeader(index){var fileHeaderMatch=/^(---|\+\+\+)\s+/.exec(diffstr[i]);if(fileHeaderMatch){var keyPrefix=fileHeaderMatch[1]==="---"?"old":"new";var data=diffstr[i].substring(3).trim().split("\t",2);var fileName=data[0].replace(/\\\\/g,"\\");if(fileName.startsWith('"')&&fileName.endsWith('"')){fileName=fileName.substr(1,fileName.length-2)}index[keyPrefix+"FileName"]=fileName;index[keyPrefix+"Header"]=(data[1]||"").trim();i++}}function parseHunk(){var chunkHeaderIndex=i,chunkHeaderLine=diffstr[i++],chunkHeader=chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);var hunk={oldStart:+chunkHeader[1],oldLines:+chunkHeader[2]||1,newStart:+chunkHeader[3],newLines:+chunkHeader[4]||
61,lines:[],linedelimiters:[]};var addCount=0,removeCount=0;for(;i<diffstr.length;i++){if(diffstr[i].indexOf("--- ")===0&&i+2<diffstr.length&&diffstr[i+1].indexOf("+++ ")===0&&diffstr[i+2].indexOf("@@")===0){break}var operation=diffstr[i].length==0&&i!=diffstr.length-1?" ":diffstr[i][0];if(operation==="+"||operation==="-"||operation===" "||operation==="\\"){hunk.lines.push(diffstr[i]);hunk.linedelimiters.push(delimiters[i]||"\n");if(operation==="+"){addCount++}else if(operation==="-"){removeCount++}else if(operation===" "){addCount++;removeCount++}}else{break}}if(!addCount&&hunk.newLines===1){hunk.newLines=0}if(!removeCount&&hunk.oldLines===1){hunk.oldLines=0}if(options.strict){if(addCount!==hunk.newLines){throw new Error("Added line count did not match for hunk at line "+(chunkHeaderIndex+1))}if(removeCount!==hunk.oldLines){throw new Error("Removed line count did not match for hunk at line "+(chunkHeaderIndex+1))}}return hunk}while(i<diffstr.length){parseIndex()}return list}function distanceIterator(start,minLine,maxLine){var wantForward=true,backwardExhausted=false,forwardExhausted=false,localOffset=1;return function iterator(){if(wantForward&&!forwardExhausted){if(backwardExhausted){localOffset++}else{wantForward=false}if(start+localOffset<=maxLine){return localOffset}forwardExhausted=true}if(!backwardExhausted){if(!forwardExhausted){wantForward=true}if(minLine<=start-localOffset){return-localOffset++}backwardExhausted=true;return iterator()}}}function applyPatch(source,uniDiff){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(typeof uniDiff==="string"){uniDiff=parsePatch(uniDiff)}if(Array.isArray(uniDiff)){if(uniDiff.length>1){throw new Error("applyPatch only works with a single input.")}uniDiff=uniDiff[0]}var lines=source.split(/\r\n|[\n\v\f\r\x85]/),delimiters=source.match(/\r\n|[\n\v\f\r\x85]/g)||[],hunks=uniDiff.hunks,compareLine=options.compareLine||function(lineNumber,line,operation,patchContent){return line===patchContent},errorCount=0,fuzzFactor=options.fuzzFactor||0,minLine=0,offset=0,removeEOFNL,addEOFNL;function hunkFits(hunk,toPos){for(var j=0;j<hunk.lines.length;j++){var line=hunk.lines[j],operation=line.length>0?line[0]:" ",content=line.length>0?line.substr(1):line;if(operation===" "||operation==="-"){if(!compareLine(toPos+1,lines[toPos],operation,content)){errorCount++;if(errorCount>fuzzFactor){return false}}toPos++}}return true}for(var i=0;i<hunks.length;i++){var hunk=hunks[i],maxLine=lines.length-hunk.oldLines,localOffset=0,toPos=offset+hunk.oldStart-1;var iterator=distanceIterator(toPos,minLine,maxLine);for(;localOffset!==undefined;localOffset=iterator()){if(hunkFits(hunk,toPos+localOffset)){hunk.offset=offset+=localOffset;break}}if(localOffset===undefined){return false}minLine=hunk.offset+hunk.oldStart+hunk.oldLines}var diffOffset=0;for(var _i=0;_i<hunks.length;_i++){var _hunk=hunks[_i],_toPos=_hunk.oldStart+_hunk.offset+diffOffset-1;diffOffset+=_hunk.newLines-_hunk.oldLines;if(_toPos<0){_toPos=0}for(var j=0;j<_hunk.lines.length;j++){var line=_hunk.lines[j],operation=line.length>0?line[0]:" ",content=line.length>0?line.substr(1):line,delimiter=_hunk.linedelimiters[j];if(operation===" "){_toPos++}else if(operation==="-"){lines.splice(_toPos,1);delimiters.splice(_toPos,1)}else if(operation==="+"){lines.splice(_toPos,0,content);delimiters.splice(_toPos,0,delimiter);_toPos++}else if(operation==="\\"){var previousOperation=_hunk.lines[j-1]?_hunk.lines[j-1][0]:null;if(previousOperation==="+"){removeEOFNL=true}else if(previousOperation==="-"){addEOFNL=true}}}}if(removeEOFNL){while(!lines[lines.length-1]){lines.pop();delimiters.pop()}}else if(addEOFNL){lines.push("");delimiters.push("\n")}for(var _k=0;_k<lines.length-1;_k++){lines[_k]=lines[_k]+delimiters[_k]}return lines.join("")}function applyPatches(uniDiff,options){if(typeof uniDiff==="string"){uniDiff=parsePatch(uniDiff)}var currentIndex=0;function processIndex(){var index=uniDiff[currentIndex++];if(!index){return options.complete()}options.loadFile(index,(function(err,data){if(err){return options.complete(err)}var updatedContent=applyPatch(data,index,options);options.patched(index,updatedContent,(function(err){if(err){return options.complete(err)}processIndex()}))}))}processIndex()}function structuredPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options){if(!options){options={}}if(typeof options.context==="undefined"){options.context=4}var diff=diffLines(oldStr,newStr,options);diff.push({value:"",lines:[]});function contextLines(lines){return lines.map((function(entry){return" "+entry}))}var hunks=[];var oldRangeStart=0,newRangeStart=0,curRange=[],oldLine=1,newLine=1;var _loop=function _loop(i){var current=diff[i],lines=current.lines||current.value.replace(/\n$/,"").split("\n");current.lines=lines;if(current.added||current.removed){var _curRange;if(!oldRangeStart){var prev=diff[i-1];oldRangeStart=oldLine;newRangeStart=newLine;if(prev){curRange=options.context>0?contextLines(prev.lines.slice(-options.context)):[];oldRangeStart-=curRange.length;newRangeStart-=curRange.length}}(_curRange=curRange).push.apply(_curRange,_toConsumableArray(lines.map((function(entry){return(current.added?"+":"-")+entry}))));if(current.added){newLine+=lines.length}else{oldLine+=lines.length}}else{if(oldRangeStart){if(lines.length<=options.context*2&&i<diff.length-2){var _curRange2;(_curRange2=curRange).push.apply(_curRange2,_toConsumableArray(contextLines(lines)))}else{var _curRange3;var contextSize=Math.min(lines.length,options.context);(_curRange3=curRange).push.apply(_curRange3,_toConsumableArray(contextLines(lines.slice(0,contextSize))));
6var hunk={oldStart:oldRangeStart,oldLines:oldLine-oldRangeStart+contextSize,newStart:newRangeStart,newLines:newLine-newRangeStart+contextSize,lines:curRange};if(i>=diff.length-2&&lines.length<=options.context){var oldEOFNewline=/\n$/.test(oldStr);var newEOFNewline=/\n$/.test(newStr);var noNlBeforeAdds=lines.length==0&&curRange.length>hunk.oldLines;if(!oldEOFNewline&&noNlBeforeAdds){curRange.splice(hunk.oldLines,0,"\\ No newline at end of file")}if(!oldEOFNewline&&!noNlBeforeAdds||!newEOFNewline){curRange.push("\\ No newline at end of file")}}hunks.push(hunk);oldRangeStart=0;newRangeStart=0;curRange=[]}}oldLine+=lines.length;newLine+=lines.length}};for(var i=0;i<diff.length;i++){_loop(i)}return{oldFileName:oldFileName,newFileName:newFileName,oldHeader:oldHeader,newHeader:newHeader,hunks:hunks}}function createTwoFilesPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options){var diff=structuredPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options);var ret=[];if(oldFileName==newFileName){ret.push("Index: "+oldFileName)}ret.push("===================================================================");ret.push("--- "+diff.oldFileName+(typeof diff.oldHeader==="undefined"?"":"\t"+diff.oldHeader));ret.push("+++ "+diff.newFileName+(typeof diff.newHeader==="undefined"?"":"\t"+diff.newHeader));for(var i=0;i<diff.hunks.length;i++){var hunk=diff.hunks[i];ret.push("@@ -"+hunk.oldStart+","+hunk.oldLines+" +"+hunk.newStart+","+hunk.newLines+" @@");ret.push.apply(ret,hunk.lines)}return ret.join("\n")+"\n"}function createPatch(fileName,oldStr,newStr,oldHeader,newHeader,options){return createTwoFilesPatch(fileName,fileName,oldStr,newStr,oldHeader,newHeader,options)}function arrayEqual(a,b){if(a.length!==b.length){return false}return arrayStartsWith(a,b)}function arrayStartsWith(array,start){if(start.length>array.length){return false}for(var i=0;i<start.length;i++){if(start[i]!==array[i]){return false}}return true}function calcLineCount(hunk){var _calcOldNewLineCount=calcOldNewLineCount(hunk.lines),oldLines=_calcOldNewLineCount.oldLines,newLines=_calcOldNewLineCount.newLines;if(oldLines!==undefined){hunk.oldLines=oldLines}else{delete hunk.oldLines}if(newLines!==undefined){hunk.newLines=newLines}else{delete hunk.newLines}}function merge(mine,theirs,base){mine=loadPatch(mine,base);theirs=loadPatch(theirs,base);var ret={};if(mine.index||theirs.index){ret.index=mine.index||theirs.index}if(mine.newFileName||theirs.newFileName){if(!fileNameChanged(mine)){ret.oldFileName=theirs.oldFileName||mine.oldFileName;ret.newFileName=theirs.newFileName||mine.newFileName;ret.oldHeader=theirs.oldHeader||mine.oldHeader;ret.newHeader=theirs.newHeader||mine.newHeader}else if(!fileNameChanged(theirs)){ret.oldFileName=mine.oldFileName;ret.newFileName=mine.newFileName;ret.oldHeader=mine.oldHeader;ret.newHeader=mine.newHeader}else{ret.oldFileName=selectField(ret,mine.oldFileName,theirs.oldFileName);ret.newFileName=selectField(ret,mine.newFileName,theirs.newFileName);ret.oldHeader=selectField(ret,mine.oldHeader,theirs.oldHeader);ret.newHeader=selectField(ret,mine.newHeader,theirs.newHeader)}}ret.hunks=[];var mineIndex=0,theirsIndex=0,mineOffset=0,theirsOffset=0;while(mineIndex<mine.hunks.length||theirsIndex<theirs.hunks.length){var mineCurrent=mine.hunks[mineIndex]||{oldStart:Infinity},theirsCurrent=theirs.hunks[theirsIndex]||{oldStart:Infinity};if(hunkBefore(mineCurrent,theirsCurrent)){ret.hunks.push(cloneHunk(mineCurrent,mineOffset));mineIndex++;theirsOffset+=mineCurrent.newLines-mineCurrent.oldLines}else if(hunkBefore(theirsCurrent,mineCurrent)){ret.hunks.push(cloneHunk(theirsCurrent,theirsOffset));theirsIndex++;mineOffset+=theirsCurrent.newLines-theirsCurrent.oldLines}else{var mergedHunk={oldStart:Math.min(mineCurrent.oldStart,theirsCurrent.oldStart),oldLines:0,newStart:Math.min(mineCurrent.newStart+mineOffset,theirsCurrent.oldStart+theirsOffset),newLines:0,lines:[]};mergeLines(mergedHunk,mineCurrent.oldStart,mineCurrent.lines,theirsCurrent.oldStart,theirsCurrent.lines);theirsIndex++;mineIndex++;ret.hunks.push(mergedHunk)}}return ret}function loadPatch(param,base){if(typeof param==="string"){if(/^@@/m.test(param)||/^Index:/m.test(param)){return parsePatch(param)[0]}
6if(!base){throw new Error("Must provide a base reference or pass in a patch")}return structuredPatch(undefined,undefined,base,param)}return param}function fileNameChanged(patch){return patch.newFileName&&patch.newFileName!==patch.oldFileName}function selectField(index,mine,theirs){if(mine===theirs){return mine}else{index.conflict=true;return{mine:mine,theirs:theirs}}}function hunkBefore(test,check){return test.oldStart<check.oldStart&&test.oldStart+test.oldLines<check.oldStart}function cloneHunk(hunk,offset){return{oldStart:hunk.oldStart,oldLines:hunk.oldLines,newStart:hunk.newStart+offset,newLines:hunk.newLines,lines:hunk.lines}}function mergeLines(hunk,mineOffset,mineLines,theirOffset,theirLines){var mine={offset:mineOffset,lines:mineLines,index:0},their={offset:theirOffset,lines:theirLines,index:0};insertLeading(hunk,mine,their);insertLeading(hunk,their,mine);while(mine.index<mine.lines.length&&their.index<their.lines.length){var mineCurrent=mine.lines[mine.index],theirCurrent=their.lines[their.index];if((mineCurrent[0]==="-"||mineCurrent[0]==="+")&&(theirCurrent[0]==="-"||theirCurrent[0]==="+")){mutualChange(hunk,mine,their)}else if(mineCurrent[0]==="+"&&theirCurrent[0]===" "){var _hunk$lines;(_hunk$lines=hunk.lines).push.apply(_hunk$lines,_toConsumableArray(collectChange(mine)))}else if(theirCurrent[0]==="+"&&mineCurrent[0]===" "){var _hunk$lines2;(_hunk$lines2=hunk.lines).push.apply(_hunk$lines2,_toConsumableArray(collectChange(their)))}else if(mineCurrent[0]==="-"&&theirCurrent[0]===" "){removal(hunk,mine,their)}else if(theirCurrent[0]==="-"&&mineCurrent[0]===" "){removal(hunk,their,mine,true)}else if(mineCurrent===theirCurrent){hunk.lines.push(mineCurrent);mine.index++;their.index++}else{conflict(hunk,collectChange(mine),collectChange(their))}}insertTrailing(hunk,mine);insertTrailing(hunk,their);calcLineCount(hunk)}function mutualChange(hunk,mine,their){var myChanges=collectChange(mine),theirChanges=collectChange(their);if(allRemoves(myChanges)&&allRemoves(theirChanges)){if(arrayStartsWith(myChanges,theirChanges)&&skipRemoveSuperset(their,myChanges,myChanges.length-theirChanges.length)){var _hunk$lines3;(_hunk$lines3=hunk.lines).push.apply(_hunk$lines3,_toConsumableArray(myChanges));return}else if(arrayStartsWith(theirChanges,myChanges)&&skipRemoveSuperset(mine,theirChanges,theirChanges.length-myChanges.length)){var _hunk$lines4;(_hunk$lines4=hunk.lines).push.apply(_hunk$lines4,_toConsumableArray(theirChanges));return}}else if(arrayEqual(myChanges,theirChanges)){var _hunk$lines5;(_hunk$lines5=hunk.lines).push.apply(_hunk$lines5,_toConsumableArray(myChanges));return}conflict(hunk,myChanges,theirChanges)}function removal(hunk,mine,their,swap){var myChanges=collectChange(mine),theirChanges=collectContext(their,myChanges);if(theirChanges.merged){var _hunk$lines6;(_hunk$lines6=hunk.lines).push.apply(_hunk$lines6,_toConsumableArray(theirChanges.merged))}else{conflict(hunk,swap?theirChanges:myChanges,swap?myChanges:theirChanges)}}function conflict(hunk,mine,their){hunk.conflict=true;hunk.lines.push({conflict:true,mine:mine,theirs:their})}function insertLeading(hunk,insert,their){while(insert.offset<their.offset&&insert.index<insert.lines.length){var line=insert.lines[insert.index++];hunk.lines.push(line);insert.offset++}}function insertTrailing(hunk,insert){while(insert.index<insert.lines.length){var line=insert.lines[insert.index++];hunk.lines.push(line)}}function collectChange(state){var ret=[],operation=state.lines[state.index][0];while(state.index<state.lines.length){var line=state.lines[state.index];if(operation==="-"&&line[0]==="+"){operation="+"}if(operation===line[0]){ret.push(line);state.index++}else{break}}return ret}function collectContext(state,matchChanges){var changes=[],merged=[],matchIndex=0,contextChanges=false,conflicted=false;while(matchIndex<matchChanges.length&&state.index<state.lines.length){var change=state.lines[state.index],match=matchChanges[matchIndex];if(match[0]==="+"){break}contextChanges=contextChanges||change[0]!==" ";merged.push(match);matchIndex++;if(change[0]==="+"){conflicted=true;
6while(change[0]==="+"){changes.push(change);change=state.lines[++state.index]}}if(match.substr(1)===change.substr(1)){changes.push(change);state.index++}else{conflicted=true}}if((matchChanges[matchIndex]||"")[0]==="+"&&contextChanges){conflicted=true}if(conflicted){return changes}while(matchIndex<matchChanges.length){merged.push(matchChanges[matchIndex++])}return{merged:merged,changes:changes}}function allRemoves(changes){return changes.reduce((function(prev,change){return prev&&change[0]==="-"}),true)}function skipRemoveSuperset(state,removeChanges,delta){for(var i=0;i<delta;i++){var changeContent=removeChanges[removeChanges.length-delta+i].substr(1);if(state.lines[state.index+i]!==" "+changeContent){return false}}state.index+=delta;return true}function calcOldNewLineCount(lines){var oldLines=0;var newLines=0;lines.forEach((function(line){if(typeof line!=="string"){var myCount=calcOldNewLineCount(line.mine);var theirCount=calcOldNewLineCount(line.theirs);if(oldLines!==undefined){if(myCount.oldLines===theirCount.oldLines){oldLines+=myCount.oldLines}else{oldLines=undefined}}if(newLines!==undefined){if(myCount.newLines===theirCount.newLines){newLines+=myCount.newLines}else{newLines=undefined}}}else{if(newLines!==undefined&&(line[0]==="+"||line[0]===" ")){newLines++}if(oldLines!==undefined&&(line[0]==="-"||line[0]===" ")){oldLines++}}}));return{oldLines:oldLines,newLines:newLines}}function convertChangesToDMP(changes){var ret=[],change,operation;for(var i=0;i<changes.length;i++){change=changes[i];if(change.added){operation=1}else if(change.removed){operation=-1}else{operation=0}ret.push([operation,change.value])}return ret}function convertChangesToXML(changes){var ret=[];for(var i=0;i<changes.length;i++){var change=changes[i];if(change.added){ret.push("<ins>")}else if(change.removed){ret.push("<del>")}ret.push(escapeHTML(change.value));if(change.added){ret.push("</ins>")}else if(change.removed){ret.push("</del>")}}return ret.join("")}function escapeHTML(s){var n=s;n=n.replace(/&/g,"&");n=n.replace(/</g,"<");n=n.replace(/>/g,">");n=n.replace(/"/g,""");return n}exports.Diff=Diff;exports.diffChars=diffChars;exports.diffWords=diffWords;exports.diffWordsWithSpace=diffWordsWithSpace;exports.diffLines=diffLines;exports.diffTrimmedLines=diffTrimmedLines;exports.diffSentences=diffSentences;exports.diffCss=diffCss;exports.diffJson=diffJson;exports.diffArrays=diffArrays;exports.structuredPatch=structuredPatch;exports.createTwoFilesPatch=createTwoFilesPatch;exports.createPatch=createPatch;exports.applyPatch=applyPatch;exports.applyPatches=applyPatches;exports.parsePatch=parsePatch;exports.merge=merge;exports.convertChangesToDMP=convertChangesToDMP;exports.convertChangesToXML=convertChangesToXML;exports.canonicalize=canonicalize;Object.defineProperty(exports,"__esModule",{value:true})}))},function(module,exports,__webpack_require__){"use strict";module.exports=Object},function(module,exports,__webpack_require__){"use strict";module.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null},function(module,exports,__webpack_require__){"use strict";var $Object=__webpack_require__(66);module.exports=$Object.getPrototypeOf||null},function(module,exports,__webpack_require__){"use strict";module.exports=Function.prototype.apply},function(module,__webpack_exports__,__webpack_require__){"use strict"},function(module,exports){const SEMVER_SPEC_VERSION="2.0.0";const MAX_LENGTH=256;const MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;const MAX_SAFE_COMPONENT_LENGTH=16;const MAX_SAFE_BUILD_LENGTH=MAX_LENGTH-6;const RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];module.exports={MAX_LENGTH:MAX_LENGTH,MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH:MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},function(module,exports,__webpack_require__){(function(process){const debug=typeof process==="object"&&Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"})&&Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}).NODE_DEBUG&&/\bsemver\b/i.test(Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}).NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};module.exports=debug}).call(this,__webpack_require__(54))},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const gt=(a,b,loose)=>compare(a,b,loose)>0;module.exports=gt},function(module,exports,__webpack_require__){const ANY=Symbol("SemVer ANY");class Comparator{static get ANY(){return ANY}constructor(comp,options){options=parseOptions(options);if(comp instanceof Comparator){if(comp.loose===!!options.loose){return comp}else{comp=comp.value}}comp=comp.trim().split(/\s+/).join(" ");debug("comparator",comp,options);this.options=options;this.loose=!!options.loose;this.parse(comp);if(this.semver===ANY){this.value=""}else{this.value=this.operator+this.semver.version}debug("comp",this)}parse(comp){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR];const m=comp.match(r);if(!m){throw new TypeError(`Invalid comparator: ${comp}`)}this.operator=m[1]!==undefined?m[1]:"";if(this.operator==="="){this.operator=""}if(!m[2]){this.semver=ANY}else{this.semver=new SemVer(m[2],this.options.loose)}}toString(){return this.value}test(version){debug("Comparator.test",version,this.options.loose);if(this.semver===ANY||version===ANY){return true}if(typeof version==="string"){try{version=new SemVer(version,this.options)}catch(er){return false}}return cmp(version,this.operator,this.semver,this.options)}intersects(comp,options){if(!(comp instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Range(comp.value,options).test(this.value)}else if(comp.operator===""){if(comp.value===""){return true}return new Range(this.value,options).test(comp.semver)}options=parseOptions(options);if(options.includePrerelease&&(this.value==="<0.0.0-0"||comp.value==="<0.0.0-0")){return false}if(!options.includePrerelease&&(this.value.startsWith("<0.0.0")||comp.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&comp.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&comp.operator.startsWith("<")){return true}if(this.semver.version===comp.semver.version&&this.operator.includes("=")&&comp.operator.includes("=")){return true}if(cmp(this.semver,"<",comp.semver,options)&&this.operator.startsWith(">")&&comp.operator.startsWith("<")){return true}if(cmp(this.semver,">",comp.semver,options)&&this.operator.startsWith("<")&&comp.operator.startsWith(">")){return true}return false}}module.exports=Comparator;const parseOptions=__webpack_require__(104);const{safeRe:re,t:t}=__webpack_require__(63);const cmp=__webpack_require__(140);const debug=__webpack_require__(72);const SemVer=__webpack_require__(36);const Range=__webpack_require__(41)},function(module,exports,__webpack_require__){const Range=__webpack_require__(41);const satisfies=(version,range,options)=>{try{range=new Range(range,options)}catch(er){return false}return range.test(version)};module.exports=satisfies},function(module,exports,__webpack_require__){var getNative=__webpack_require__(110);var nativeCreate=getNative(Object,"create");module.exports=nativeCreate},function(module,exports,__webpack_require__){var eq=__webpack_require__(144);function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}module.exports=assocIndexOf},function(module,exports,__webpack_require__){var isKeyable=__webpack_require__(431);function getMapData(map,key){var data=map.__data__;
6return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}module.exports=getMapData},function(module,exports,__webpack_require__){"use strict";const SEMVER_SPEC_VERSION="2.0.0";const MAX_LENGTH=256;const MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;const MAX_SAFE_COMPONENT_LENGTH=16;const MAX_SAFE_BUILD_LENGTH=MAX_LENGTH-6;const RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];module.exports={MAX_LENGTH:MAX_LENGTH,MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH:MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},function(module,exports,__webpack_require__){"use strict";(function(process){const debug=typeof process==="object"&&Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"})&&Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}).NODE_DEBUG&&/\bsemver\b/i.test(Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}).NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};module.exports=debug}).call(this,__webpack_require__(54))},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const gt=(a,b,loose)=>compare(a,b,loose)>0;module.exports=gt},function(module,exports,__webpack_require__){"use strict";const ANY=Symbol("SemVer ANY");class Comparator{static get ANY(){return ANY}constructor(comp,options){options=parseOptions(options);if(comp instanceof Comparator){if(comp.loose===!!options.loose){return comp}else{comp=comp.value}}comp=comp.trim().split(/\s+/).join(" ");debug("comparator",comp,options);this.options=options;this.loose=!!options.loose;this.parse(comp);if(this.semver===ANY){this.value=""}else{this.value=this.operator+this.semver.version}debug("comp",this)}parse(comp){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR];const m=comp.match(r);if(!m){throw new TypeError(`Invalid comparator: ${comp}`)}this.operator=m[1]!==undefined?m[1]:"";if(this.operator==="="){this.operator=""}if(!m[2]){this.semver=ANY}else{this.semver=new SemVer(m[2],this.options.loose)}}toString(){return this.value}test(version){debug("Comparator.test",version,this.options.loose);if(this.semver===ANY||version===ANY){return true}if(typeof version==="string"){try{version=new SemVer(version,this.options)}catch(er){return false}}return cmp(version,this.operator,this.semver,this.options)}intersects(comp,options){if(!(comp instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Range(comp.value,options).test(this.value)}else if(comp.operator===""){if(comp.value===""){return true}return new Range(this.value,options).test(comp.semver)}options=parseOptions(options);if(options.includePrerelease&&(this.value==="<0.0.0-0"||comp.value==="<0.0.0-0")){return false}if(!options.includePrerelease&&(this.value.startsWith("<0.0.0")||comp.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&comp.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&comp.operator.startsWith("<")){return true}if(this.semver.version===comp.semver.version&&this.operator.includes("=")&&comp.operator.includes("=")){return true}if(cmp(this.semver,"<",comp.semver,options)&&this.operator.startsWith(">")&&comp.operator.startsWith("<")){return true}if(cmp(this.semver,">",comp.semver,options)&&this.operator.startsWith("<")&&comp.operator.startsWith(">")){return true}return false}}module.exports=Comparator;const parseOptions=__webpack_require__(116);const{safeRe:re,t:t}=__webpack_require__(64);const cmp=__webpack_require__(148);const debug=__webpack_require__(80);const SemVer=__webpack_require__(37);const Range=__webpack_require__(45)},function(module,exports,__webpack_require__){"use strict";const Range=__webpack_require__(45);const satisfies=(version,range,options)=>{try{range=new Range(range,options)}catch(er){return false}return range.test(version)};module.exports=satisfies},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return StoreLocalStorage}));function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class StoreLocalStorage{constructor(key){_defineProperty(this,"JOB_STORAGE_KEY","ISM_JOBS");if(key){this.JOB_STORAGE_KEY=key}}async setup(){return true}async getAll(){return JSON.parse(localStorage.getItem(this.JOB_STORAGE_KEY)||"[]")}async set(key,value){try{const result=await this.getAll();const findIndex=result.findIndex(item=>item.id===key);if(findIndex>-1){result[findIndex]=value}else{result.push(value)}this.saveToDisk(result);return true}catch(e){return false}}async get(key){const all=await this.getAll();return all.find(item=>item.id===key)}async delete(key){const result=await this.getAll();return this.saveToDisk(result.filter(item=>item.id!==key))}saveToDisk(payload){try{localStorage.setItem(this.JOB_STORAGE_KEY,JSON.stringify(payload));return true}catch(e){return false}}}},function(module,__webpack_exports__,__webpack_require__){"use strict";var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var github=__webpack_require__(42);var json=__webpack_require__(43);var DarkMode=__webpack_require__(46);const LegacyNotification=_ref=>{let{notificationJsonString:notificationJsonString,onChangeNotificationJsonString:onChangeNotificationJsonString,onSwitchToChannels:onSwitchToChannels,actionNotification:actionNotification=false,isInvalid:isInvalid=false}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Update your notifications to use Channel ID",iconType:"iInCircle",size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"Using Channel ID will give you more control to manage notifications across OpenSearch dashboards. If you do decide to switch, you will lose your current error notification settings."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onSwitchToChannels},"Switch to using Channel ID")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:isInvalid,error:null,style:{maxWidth:"100%"}},external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:notificationJsonString,onChange:onChangeNotificationJsonString,setOptions:{fontSize:"14px"},"aria-label":"Code Editor",height:"300px","data-test-subj":actionNotification?"create-policy-action-legacy-notification":"create-policy-legacy-notification"}))))};var LegacyNotification_LegacyNotification=LegacyNotification;var components_LegacyNotification=__webpack_exports__["a"]=LegacyNotification_LegacyNotification},function(module,__webpack_exports__,__webpack_require__){"use strict";var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var github=__webpack_require__(42);var json=__webpack_require__(43);var EuiFormCustomLabel=__webpack_require__(24);const ChannelNotification=_ref=>{let{channelId:channelId,channels:channels,loadingChannels:loadingChannels,message:message,onChangeChannelId:onChangeChannelId,onChangeMessage:onChangeMessage,getChannels:getChannels,actionNotification:actionNotification=false}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Channel ID"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",style:{maxWidth:600}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:actionNotification?"action-channel-id":"
6channel-id",placeholder:"Select channel ID",hasNoInitialSelection:true,isLoading:loadingChannels,options:channels.map(channel=>({value:channel.config_id,text:channel.name})),value:channelId,onChange:onChangeChannelId,"data-test-subj":actionNotification?"create-policy-notification-action-channel-id":"create-policy-notification-channel-id"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:getChannels,disabled:loadingChannels,className:"refresh-button","data-test-subj":"channel-notification-refresh"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"popout",href:"notifications-dashboards#/channels",target:"_blank",iconSide:"right"},"Manage channels"))),!!channelId&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Notification message",helpText:"Embed variables in your message using Mustache template."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{placeholder:"The index {{ctx.index}} failed during policy execution.",style:{minHeight:"150px"},compressed:true,value:message,onChange:onChangeMessage,"data-test-subj":actionNotification?"create-policy-notification-action-message":"create-policy-notification-message"}))))};var ChannelNotification_ChannelNotification=ChannelNotification;var components_ChannelNotification=__webpack_exports__["a"]=ChannelNotification_ChannelNotification},function(module,exports,__webpack_require__){"use strict";module.exports=Error},function(module,exports,__webpack_require__){"use strict";module.exports=EvalError},function(module,exports,__webpack_require__){"use strict";module.exports=RangeError},function(module,exports,__webpack_require__){"use strict";module.exports=ReferenceError},function(module,exports,__webpack_require__){"use strict";module.exports=SyntaxError},function(module,exports,__webpack_require__){"use strict";module.exports=URIError},function(module,exports,__webpack_require__){"use strict";module.exports=Math.abs},function(module,exports,__webpack_require__){"use strict";module.exports=Math.floor},function(module,exports,__webpack_require__){"use strict";module.exports=Math.max},function(module,exports,__webpack_require__){"use strict";module.exports=Math.min},function(module,exports,__webpack_require__){"use strict";module.exports=Math.pow},function(module,exports,__webpack_require__){"use strict";module.exports=Math.round},function(module,exports,__webpack_require__){"use strict";var $isNaN=__webpack_require__(197);module.exports=function sign(number){if($isNaN(number)||number===0){return number}return number<0?-1:+1}},function(module,exports,__webpack_require__){"use strict";var $defineProperty=Object.defineProperty||false;if($defineProperty){try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=false}}module.exports=$defineProperty},function(module,exports,__webpack_require__){"use strict";var reflectGetProto=__webpack_require__(67);var originalGetProto=__webpack_require__(68);var getDunderProto=__webpack_require__(202);module.exports=reflectGetProto?function getProto(O){return reflectGetProto(O)}:originalGetProto?function getProto(O){if(!O||typeof O!=="object"&&typeof O!=="function"){throw new TypeError("getProto: not an object")}return originalGetProto(O)}:getDunderProto?function getProto(O){return getDunderProto(O)}:null},function(module,exports,__webpack_require__){"use strict";var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:Format.RFC3986,formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return String(value)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986}},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(292);case"v7light":return __webpack_require__(294);case"v8dark":return __webpack_require__(296);case"v8light":return __webpack_require__(298);case"v9dark":return __webpack_require__(300);case"v9light":return __webpack_require__(302)}},function(module,exports){const looseOption=Object.freeze({loose:true});const emptyOpts=Object.freeze({});const parseOptions=options=>{if(!options){return emptyOpts}if(typeof options!=="object"){return looseOption}return options};
6module.exports=parseOptions},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const compareBuild=(a,b,loose)=>{const versionA=new SemVer(a,loose);const versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)};module.exports=compareBuild},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const lt=(a,b,loose)=>compare(a,b,loose)<0;module.exports=lt},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const gte=(a,b,loose)=>compare(a,b,loose)>=0;module.exports=gte},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const lte=(a,b,loose)=>compare(a,b,loose)<=0;module.exports=lte},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const Comparator=__webpack_require__(74);const{ANY:ANY}=Comparator;const Range=__webpack_require__(41);const satisfies=__webpack_require__(75);const gt=__webpack_require__(73);const lt=__webpack_require__(106);const lte=__webpack_require__(108);const gte=__webpack_require__(107);const outside=(version,range,hilo,options)=>{version=new SemVer(version,options);range=new Range(range,options);let gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt;ltefn=lte;ltfn=lt;comp=">";ecomp=">=";break;case"<":gtfn=lt;ltefn=gte;ltfn=gt;comp="<";ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version,range,options)){return false}for(let i=0;i<range.set.length;++i){const comparators=range.set[i];let high=null;let low=null;comparators.forEach(comparator=>{if(comparator.semver===ANY){comparator=new Comparator(">=0.0.0")}high=high||comparator;low=low||comparator;if(gtfn(comparator.semver,high.semver,options)){high=comparator}else if(ltfn(comparator.semver,low.semver,options)){low=comparator}});if(high.operator===comp||high.operator===ecomp){return false}if((!low.operator||low.operator===comp)&<efn(version,low.semver)){return false}else if(low.operator===ecomp&<fn(version,low.semver)){return false}}return true};module.exports=outside},function(module,exports,__webpack_require__){var baseIsNative=__webpack_require__(401),getValue=__webpack_require__(408);function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}module.exports=getNative},function(module,exports,__webpack_require__){var root=__webpack_require__(112);var Symbol=root.Symbol;module.exports=Symbol},function(module,exports,__webpack_require__){var freeGlobal=__webpack_require__(402);var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();module.exports=root},function(module,exports){function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}module.exports=isObject},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(143),isObjectLike=__webpack_require__(411);var symbolTag="[object Symbol]";function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&baseGetTag(value)==symbolTag}module.exports=isSymbol},function(module,exports,__webpack_require__){"use strict";const looseOption=Object.freeze({loose:true});const emptyOpts=Object.freeze({});const parseOptions=options=>{if(!options){return emptyOpts}if(typeof options!=="object"){return looseOption}return options};module.exports=parseOptions},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const compareBuild=(a,b,loose)=>{const versionA=new SemVer(a,loose);const versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)};module.exports=compareBuild},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const lt=(a,b,loose)=>compare(a,b,loose)<0;module.exports=lt},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const gte=(a,b,loose)=>compare(a,b,loose)>=0;module.exports=gte},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const lte=(a,b,loose)=>compare(a,b,loose)<=0;module.exports=lte},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const Comparator=__webpack_require__(82);const{ANY:ANY}=Comparator;const Range=__webpack_require__(45);const satisfies=__webpack_require__(83);const gt=__webpack_require__(81);const lt=__webpack_require__(118);const lte=__webpack_require__(120);const gte=__webpack_require__(119);const outside=(version,range,hilo,options)=>{version=new SemVer(version,options);range=new Range(range,options);let gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt;ltefn=lte;ltfn=lt;comp=">";ecomp=">=";break;case"<":gtfn=lt;ltefn=gte;ltfn=gt;comp="<";ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version,range,options)){return false}for(let i=0;i<range.set.length;++i){const comparators=range.set[i];let high=null;let low=null;
vendor: 5,297 bytes, line 6
6comparators.forEach(comparator=>{if(comparator.semver===ANY){comparator=new Comparator(">=0.0.0")}high=high||comparator;low=low||comparator;if(gtfn(comparator.semver,high.semver,options)){high=comparator}else if(ltfn(comparator.semver,low.semver,options)){low=comparator}});if(high.operator===comp||high.operator===ecomp){return false}if((!low.operator||low.operator===comp)&<efn(version,low.semver)){return false}else if(low.operator===ecomp&<fn(version,low.semver)){return false}}return true};module.exports=outside},function(module,exports,__webpack_require__){"use strict";var URI=__webpack_require__(552),equal=__webpack_require__(123),util=__webpack_require__(57),SchemaObject=__webpack_require__(151),traverse=__webpack_require__(554);module.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(compile,root,ref){var refVal=this._refs[ref];if(typeof refVal=="string"){if(this._refs[refVal])refVal=this._refs[refVal];else return resolve.call(this,compile,root,refVal)}refVal=refVal||this._schemas[ref];if(refVal instanceof SchemaObject){return inlineRef(refVal.schema,this._opts.inlineRefs)?refVal.schema:refVal.validate||this._compile(refVal)}var res=resolveSchema.call(this,root,ref);var schema,v,baseId;if(res){schema=res.schema;root=res.root;baseId=res.baseId}if(schema instanceof SchemaObject){v=schema.validate||compile.call(this,schema.schema,root,undefined,baseId)}else if(schema!==undefined){v=inlineRef(schema,this._opts.inlineRefs)?schema:compile.call(this,schema,root,undefined,baseId)}return v}function resolveSchema(root,ref){var p=URI.parse(ref),refPath=_getFullPath(p),baseId=getFullPath(this._getId(root.schema));if(Object.keys(root.schema).length===0||refPath!==baseId){var id=normalizeId(refPath);var refVal=this._refs[id];if(typeof refVal=="string"){return resolveRecursive.call(this,root,refVal,p)}else if(refVal instanceof SchemaObject){if(!refVal.validate)this._compile(refVal);root=refVal}else{refVal=this._schemas[id];if(refVal instanceof SchemaObject){if(!refVal.validate)this._compile(refVal);if(id==normalizeId(ref))return{schema:refVal,root:root,baseId:baseId};root=refVal}else{return}}if(!root.schema)return;baseId=getFullPath(this._getId(root.schema))}return getJsonPointer.call(this,p,baseId,root.schema,root)}function resolveRecursive(root,ref,parsedRef){var res=resolveSchema.call(this,root,ref);if(res){var schema=res.schema;var baseId=res.baseId;root=res.root;var id=this._getId(schema);if(id)baseId=resolveUrl(baseId,id);return getJsonPointer.call(this,parsedRef,baseId,schema,root)}}var PREVENT_SCOPE_CHANGE=util.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(parsedRef,baseId,schema,root){parsedRef.fragment=parsedRef.fragment||"";if(parsedRef.fragment.slice(0,1)!="/")return;var parts=parsedRef.fragment.split("/");for(var i=1;i<parts.length;i++){var part=parts[i];if(part){part=util.unescapeFragment(part);schema=schema[part];if(schema===undefined)break;var id;if(!PREVENT_SCOPE_CHANGE[part]){id=this._getId(schema);if(id)baseId=resolveUrl(baseId,id);if(schema.$ref){var $ref=resolveUrl(baseId,schema.$ref);var res=resolveSchema.call(this,root,$ref);if(res){schema=res.schema;root=res.root;baseId=res.baseId}}}}}if(schema!==undefined&&schema!==root.schema)return{schema:schema,root:root,baseId:baseId}}var SIMPLE_INLINED=util.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(schema,limit){if(limit===false)return false;if(limit===undefined||limit===true)return checkNoRef(schema);else if(limit)return countKeys(schema)<=limit}function checkNoRef(schema){var item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++){item=schema[i];if(typeof item=="object"&&!checkNoRef(item))return false}}else{for(var key in schema){if(key=="$ref")return false;item=schema[key];if(typeof item=="object"&&!checkNoRef(item))return false}}return true}function countKeys(schema){var count=0,item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++){item=schema[i];if(typeof item=="object")count+=countKeys(item);if(count==Infinity)return Infinity}}else{for(var key in schema){if(key=="$ref")return Infinity;if(SIMPLE_INLINED[key]){count++}else{item=schema[key];if(typeof item=="object")count+=countKeys(item)+1;if(count==Infinity)return Infinity}}}return count}function getFullPath(id,normalize){if(normalize!==false)id=normalizeId(id);var p=URI.parse(id);return _getFullPath(p)}function _getFullPath(p){return URI.serialize(p).split("#")[0]+"#"}var TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id){return id?id.replace(TRAILING_SLASH_HASH,""):""}function resolveUrl(baseId,id){id=normalizeId(id);return URI.resolve(baseId,id)}function resolveIds(schema){var schemaId=normalizeId(this._getId(schema));var baseIds={"":schemaId};var fullPaths={"":getFullPath(schemaId,false)};var localRefs={};var self=this;traverse(schema,{allKeys:true},(function(sch,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(jsonPtr==="")return;var id=self._getId(sch);var baseId=baseIds[parentJsonPtr];
6var fullPath=fullPaths[parentJsonPtr]+"/"+parentKeyword;if(keyIndex!==undefined)fullPath+="/"+(typeof keyIndex=="number"?keyIndex:util.escapeFragment(keyIndex));if(typeof id=="string"){id=baseId=normalizeId(baseId?URI.resolve(baseId,id):id);var refVal=self._refs[id];if(typeof refVal=="string")refVal=self._refs[refVal];if(refVal&&refVal.schema){if(!equal(sch,refVal.schema))throw new Error('id "'+id+'" resolves to more than one schema')}else if(id!=normalizeId(fullPath)){if(id[0]=="#"){if(localRefs[id]&&!equal(sch,localRefs[id]))throw new Error('id "'+id+'" resolves to more than one schema');localRefs[id]=sch}else{self._refs[id]=fullPath}}}baseIds[jsonPtr]=baseId;fullPaths[jsonPtr]=fullPath}));return localRefs}},function(module,exports,__webpack_require__){"use strict";module.exports=function equal(a,b){if(a===b)return true;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;for(i=length;i--!==0;){var key=keys[i];if(!equal(a[key],b[key]))return false}return true}return a!==a&&b!==b}},function(module,exports,__webpack_require__){"use strict";var resolve=__webpack_require__(122);module.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(errors){this.message="validation failed";this.errors=errors;this.ajv=this.validation=true}MissingRefError.message=function(baseId,ref){return"can't resolve reference "+ref+" from id "+baseId};function MissingRefError(baseId,ref,message){this.message=message||MissingRefError.message(baseId,ref);this.missingRef=resolve.url(baseId,ref);this.missingSchema=resolve.normalizeId(resolve.fullPath(this.missingRef))}function errorSubclass(Subclass){Subclass.prototype=Object.create(Error.prototype);Subclass.prototype.constructor=Subclass;return Subclass}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return dataSourceObservable}));__webpack_require__.d(__webpack_exports__,"b",(function(){return Main_Main}));var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ReactRouterDom_=__webpack_require__(18);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var query_string=__webpack_require__(16);var query_string_default=__webpack_require__.n(query_string);var semver=__webpack_require__(165);var semver_default=__webpack_require__.n(semver);var external_osdSharedDeps_Lodash_=__webpack_require__(3);var external_osdSharedDeps_Lodash_default=__webpack_require__.n(external_osdSharedDeps_Lodash_);const renderSubTitleText=subTitleText=>{if(typeof subTitleText==="string"){if(!subTitleText)return null;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"subdued"},subTitleText))}return subTitleText};const ContentPanel=_ref=>{let{title:title="",titleSize:titleSize="l",subTitleText:subTitleText="",bodyStyles:bodyStyles={},panelStyles:panelStyles={},horizontalRuleClassName:horizontalRuleClassName="",actions:actions,children:children,itemCount:itemCount=0,color:color,noExtraPadding:noExtraPadding,accordion:accordion}=_ref;const[isAccordionOpen,setIsAccordionOpen]=Object(external_osdSharedDeps_React_["useState"])("closed");const toggleAccordion=isOpen=>{setIsAccordionOpen(isOpen?"open":"closed")};const isGhost=color==="ghost";const titleContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{...noExtraPadding?{marginTop:0,marginBottom:0}:{},padding:isGhost||accordion?undefined:"0px 16px"},justifyContent:"spaceBetween",alignItems:"flexStart"},title?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,typeof title==="string"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,title,external_osdSharedDeps_React_default.a.createElement("span",{className:"panel-header-count"}," ",itemCount>0?`(${itemCount}
6)`:null," "))):title,renderSubTitleText(subTitleText)):null,actions?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",alignItems:"center"},Array.isArray(actions)?actions.map((action,idx)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:idx},action)):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,actions))):null);const content=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,accordion?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:Object(external_osdSharedDeps_ElasticEui_["htmlIdGenerator"])()(),forceState:isAccordionOpen,onToggle:toggleAccordion,buttonContent:titleContent},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)):titleContent,isGhost?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:noExtraPadding?"none":"xs",className:horizontalRuleClassName}),children?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:isGhost?undefined:"0px 16px",...bodyStyles,display:accordion&&isAccordionOpen==="closed"?"none":undefined}},children):null);if(isGhost){return content}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{style:{...noExtraPadding?{paddingTop:0,paddingBottom:0}:{},paddingLeft:"0px",paddingRight:"0px",...panelStyles}},content)};var ContentPanel_ContentPanel=ContentPanel;var Modal=__webpack_require__(17);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}const ContentPanelActions=_ref=>{let{actions:actions,size:size}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",alignItems:"center"},actions.map((_ref2,index)=>{let{text:text,buttonProps:buttonProps={},flexItemProps:flexItemProps={},modal:modal=null,children:children}=_ref2;let button=children?children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],_extends({},buttonProps,{"data-test-subj":`${text}Button`}),text);if(modal){button=external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref3=>{let{onShow:onShow}=_ref3;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],_extends({},buttonProps,{onClick:modal.onClickModal(onShow),"data-test-subj":`${text}Button`}),text)})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],_extends({},flexItemProps,{grow:false,key:index}),button)}))};var ContentPanel_ContentPanelActions=ContentPanelActions;function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class PolicyControls_PolicyControls extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);_defineProperty(this,"state",{refreshInterval:0,isPaused:true});_defineProperty(this,"onRefreshChange",_ref=>{let{refreshInterval:refreshInterval,isPaused:isPaused}=_ref;this.setState({isPaused:isPaused,refreshInterval:refreshInterval})})}render(){const{activePage:activePage,pageCount:pageCount,search:search,onSearchChange:onSearchChange,onPageClick:onPageClick}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,value:search,placeholder:"Search",onChange:onSearchChange})),pageCount>1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{justifyContent:"center"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPagination"],{pageCount:pageCount,activePage:activePage,onPageClick:onPageClick,"data-test-subj":"policyControlsPagination"})))}}
6var components_PolicyControls=PolicyControls_PolicyControls;var constants=__webpack_require__(2);const CreatePolicyModal=_ref=>{let{isEdit:isEdit=false,onClose:onClose,onClickContinue:onClickContinue}=_ref;const[visual,setVisual]=Object(external_osdSharedDeps_React_["useState"])(true);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose,maxWidth:600},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configuration method")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"m",direction:"column",style:{margin:"-4px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",style:{marginTop:0}},external_osdSharedDeps_React_default.a.createElement("p",null,"Choose how you would like to ",isEdit?"modify":"define"," your policy, either using a visual editor or writing JSON."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{className:visual?"selected-radio-panel":""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:`Use the visual editor to ${isEdit?"update":"create"} your policy${isEdit?"":" using pre-defined options."}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:"create-policy-visual",label:"Visual editor",checked:visual,onChange:e=>setVisual(e.target.checked),"data-test-subj":"createPolicyModalVisualRadio"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{className:visual?"":"selected-radio-panel"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:`Use the JSON editor to ${isEdit?"update":"create or import"} your policy using JSON.`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:"create-policy-json",label:"JSON editor",checked:!visual,onChange:e=>setVisual(!e.target.checked),"data-test-subj":"createPolicyModalJsonRadio"})))))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"createPolicyModalCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{onClose();onClickContinue(visual)},fill:true,"data-test-subj":"createPolicyModalContinueButton"},"Continue"))))))};
6var CreatePolicyModal_CreatePolicyModal=CreatePolicyModal;var components_CreatePolicyModal=CreatePolicyModal_CreatePolicyModal;const TEXT={RESET_FILTERS:"There are no policies matching your applied filters. Reset your filters to view your policies.",NO_POLICIES:"There are no existing policies. Create a policy to apply to your indices.",LOADING:"Loading policies..."};const getMessagePrompt=_ref=>{let{filterIsApplied:filterIsApplied,loading:loading}=_ref;if(loading)return TEXT.LOADING;if(filterIsApplied)return TEXT.RESET_FILTERS;return TEXT.NO_POLICIES};const getActions=_ref2=>{let{history:history,filterIsApplied:filterIsApplied,loading:loading,resetFilters:resetFilters}=_ref2;if(loading){return null}if(filterIsApplied){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:resetFilters,"data-test-subj":"policyEmptyPromptRestFilters"},"Reset Filters")}const onClickCreate=visual=>{history.push(`${constants["D"].CREATE_POLICY}${visual?"?type=visual":""}`)};return external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref3=>{let{onShow:onShow}=_ref3;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"plus",fill:true,onClick:()=>onShow(components_CreatePolicyModal,{history:history,onClickContinue:onClickCreate})},"Create policy")})};const PolicyEmptyPrompt=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,getMessagePrompt(props))),actions:getActions(props)});var PolicyEmptyPrompt_PolicyEmptyPrompt=PolicyEmptyPrompt;var components_PolicyEmptyPrompt=PolicyEmptyPrompt_PolicyEmptyPrompt;const DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const DEFAULT_QUERY_PARAMS={from:0,size:20,search:"",sortField:"id",sortDirection:constants["I"].DESC};var external_osdSharedDeps_Moment_=__webpack_require__(28);var external_osdSharedDeps_Moment_default=__webpack_require__.n(external_osdSharedDeps_Moment_);function getURLQueryParams(location){const{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="string"?DEFAULT_QUERY_PARAMS.sortField:sortField,sortDirection:typeof sortDirection!=="string"?DEFAULT_QUERY_PARAMS.sortDirection:sortDirection}}const renderTime=time=>{const momentTime=external_osdSharedDeps_Moment_default()(time).local();if(time&&momentTime.isValid())return momentTime.format("MM/DD/YY h:mm a");return"-"};var helpers=__webpack_require__(6);function ConfirmationModal_extends(){return ConfirmationModal_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ConfirmationModal_extends.apply(null,arguments)}const ConfirmationModal=_ref=>{let{title:title,bodyMessage:bodyMessage,actionMessage:actionMessage,onClose:onClose,onAction:onAction,actionProps:actionProps={},modalProps:modalProps={}}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],ConfirmationModal_extends({onCancel:onClose,onClose:onClose,maxWidth:1e3},modalProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,title)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,bodyMessage))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"confirmationModalCloseButton"},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],ConfirmationModal_extends({onClick:()=>{onAction();onClose()},fill:true,"data-test-subj":"confirmationModalActionButton"},actionProps),actionMessage))))};
6var ConfirmationModal_ConfirmationModal=ConfirmationModal;var components_ConfirmationModal=ConfirmationModal_ConfirmationModal;var core_services=__webpack_require__(7);const DataSourceMenuContext=Object(external_osdSharedDeps_React_["createContext"])({dataSourceId:"",multiDataSourceEnabled:false});const DataSourceMenuConsumer=DataSourceMenuContext.Consumer;var external_osdSharedDeps_ReactRouter_=__webpack_require__(166);class MDSEnabledComponent_MDSEnabledComponent extends external_osdSharedDeps_React_default.a.Component{constructor(props){super(props);this.state={dataSourceId:props.dataSourceId,multiDataSourceEnabled:props.multiDataSourceEnabled}}static getDerivedStateFromProps(nextProps,prevState){if(nextProps.multiDataSourceEnabled&&nextProps.dataSourceId!==prevState.dataSourceId){return{dataSourceId:nextProps.dataSourceId}}return null}}function useUpdateUrlWithDataSourceProperties(){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);const{dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=dataSourceMenuProps;const history=Object(external_osdSharedDeps_ReactRouter_["useHistory"])();const currentSearch=history.location.search;const currentQuery=query_string_default.a.parse(currentSearch);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(multiDataSourceEnabled){history.replace({search:query_string_default.a.stringify({...currentQuery,dataSourceId:dataSourceId})})}},[dataSourceId,multiDataSourceEnabled])}var components_MDSEnabledComponent=MDSEnabledComponent_MDSEnabledComponent;var Services=__webpack_require__(8);function Policies_extends(){return Policies_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Policies_extends.apply(null,arguments)}function Policies_defineProperty(e,r,t){return(r=Policies_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Policies_toPropertyKey(t){var i=Policies_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Policies_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Policies_Policies extends components_MDSEnabledComponent{constructor(props){var _this;super(props);_this=this;Policies_defineProperty(this,"columns",void 0);Policies_defineProperty(this,"getPolicies",async()=>{this.setState({loadingPolicies:true});try{const{policyService:policyService,history:history}=this.props;const queryObject=Policies_Policies.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const getPoliciesResponse=await policyService.getPolicies(queryObject);if(getPoliciesResponse.ok){const{response:{policies:policies,totalPolicies:totalPolicies}}=getPoliciesResponse;this.setState({policies:policies,totalPolicies:totalPolicies})}else{this.context.notifications.toasts.addDanger(getPoliciesResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the policies"))}this.setState({loadingPolicies:false});if(this.state.useNewUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDEX_POLICIES_NEW.text.concat(` (${this.state.totalPolicies})`),href:constants["f"].INDEX_POLICIES_NEW.href}])}});Policies_defineProperty(this,"deletePolicy",async policyId=>{const{policyService:policyService}=this.props;try{const deletePolicyResponse=await policyService.deletePolicy(policyId);if(deletePolicyResponse.ok){this.context.notifications.toasts.addSuccess(`Deleted the policy: ${policyId}`);return true}else{this.context.notifications.toasts.addDanger(`Failed to delete the policy, ${deletePolicyResponse.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem deleting the policy"))}return false});Policies_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection})});Policies_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Policies_defineProperty(this,"onSearchChange",e=>{this.setState({from:0,search:e.target.value})});Policies_defineProperty(this,"onPageClick",page=>{const{size:size}=this.state;this.setState({from:page*size})});Policies_defineProperty(this,"resetFilters",()=>{this.setState({search:DEFAULT_QUERY_PARAMS.search})});Policies_defineProperty(this,"onClickEdit",visual=>{const{selectedItems:[{id:id}]}=this.state;if(id)this.props.history.push(`${constants["D"].EDIT_POLICY}?id=${id}${visual?"&type=visual":""}`)});Policies_defineProperty(this,"onClickCreate",visual=>{this.props.history.push(`${constants["D"].CREATE_POLICY}${visual?"?type=visual":""}`)});Policies_defineProperty(this,"onClickDelete",async policyIds=>{if(!policyIds.length)return;const deletePromises=policyIds.map(policyId=>this.deletePolicy(policyId));const deleted=(await Promise.all(deletePromises)).reduce((deleted,result)=>deleted&&result);if(deleted){await this.getPolicies();if(this.state.useNewUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDEX_POLICIES_NEW.text.concat(` (${this.state.totalPolicies})`),href:constants["f"].INDEX_POLICIES_NEW.href}])}}});Policies_defineProperty(this,"onClickModalEdit",(function(item,onClose){let visual=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;onClose();if(!item||!item.id)return;_this.props.history.push(`${constants["D"].EDIT_POLICY}?id=${item.id}${visual?"&type=visual":""}`)}));Policies_defineProperty(this,"onShowCreatePolicyModal",()=>{this.setState({showCreatePolicyModal:true})});Policies_defineProperty(this,"onCloseCreatePolicyModal",()=>{this.setState({showCreatePolicyModal:false})});Policies_defineProperty(this,"onShowDeleteModal",()=>{this.setState({showDeleteModal:true})});Policies_defineProperty(this,"onCloseDeleteModal",()=>{this.setState({showDeleteModal:false})});Policies_defineProperty(this,"onShowEditModal",()=>{this.setState({showEditModal:true})});Policies_defineProperty(this,"onCloseEditModal",()=>{this.setState({showEditModal:false})});Policies_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});Policies_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})});const{from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection}=getURLQueryParams(this.props.location);const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={...this.state,totalPolicies:0,from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],policies:[],loadingPolicies:true,useNewUX:useNewUx,showCreatePolicyModal:false,showDeleteModal:false,showEditModal:false,isPopoverOpen:false};this.getPolicies=external_osdSharedDeps_Lodash_default.a.debounce(this.getPolicies,500,{leading:true});this.columns=[{field:"id",name:"Policy",sortable:true,truncateText:true,textOnly:true,render:(name,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.props.history.push(`${constants["D"].POLICY_DETAILS}?id=${name}`),"data-test-subj":`policyLink_${name}`},name)},{field:"policy.description",name:"Description",sortable:true,truncateText:true,textOnly:true},{field:"policy.last_updated_time",name:"Last updated time",sortable:true,truncateText:false,render:renderTime,dataType:"date"}]}async componentDidMount(){const breadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getPolicies();if(this.state.useNewUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDEX_POLICIES_NEW.text.concat(` (${this.state.totalPolicies})`),href:constants["f"].INDEX_POLICIES_NEW.href}])}}async componentDidUpdate(prevProps,prevState){const prevQuery=Policies_Policies.getQueryObjectFromState(prevState);const currQuery=Policies_Policies.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getPolicies();if(this.state.useNewUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDEX_POLICIES_NEW.text.concat(` (${this.state.totalPolicies})`),href:constants["f"].INDEX_POLICIES_NEW.href}])}}}static getQueryObjectFromState(_ref2){let{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref2;return{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){const{totalPolicies:totalPolicies,from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,selectedItems:selectedItems,policies:policies,loadingPolicies:loadingPolicies,useNewUX:useNewUX,showCreatePolicyModal:showCreatePolicyModal,showDeleteModal:showDeleteModal,showEditModal:showEditModal,isPopoverOpen:isPopoverOpen}=this.state;const filterIsApplied=!!search;const page=Math.floor(from/size);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls}=Object(Services["c"])();const pagination={pageIndex:page,pageSize:size,pageSizeOptions:DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalPolicies};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const actions=[{text:"Delete",buttonProps:{disabled:!selectedItems.length},modal:{onClickModal:onShow=>()=>onShow(components_ConfirmationModal,{title:`Delete ${selectedItems.length===1?selectedItems[0].id:`${selectedItems.length} policies`}`,bodyMessage:`Delete ${selectedItems.length===1?selectedItems[0].id:`${selectedItems.length} policies`} permanently? This action cannot be undone.`,actionMessage:"Delete",onAction:()=>this.onClickDelete(selectedItems.map(item=>item.id))})}},{text:"Edit",buttonProps:{disabled:selectedItems.length!==1,onClick:this.onClickEdit},modal:{onClickModal:onShow=>()=>onShow(components_CreatePolicyModal,{isEdit:true,onClickContinue:this.onClickEdit})}},{text:"Create policy",modal:{onClickModal:onShow=>()=>onShow(components_CreatePolicyModal,{onClickContinue:this.onClickCreate})}}];const CommonTable=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:policies,itemId:"id",columns:this.columns,pagination:pagination,sorting:sorting,isSelectable:true,selection:selection,onChange:this.onTableChange,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_PolicyEmptyPrompt,{history:this.props.history,filterIsApplied:filterIsApplied,loading:loadingPolicies,resetFilters:this.resetFilters})});const CreateModal=()=>showCreatePolicyModal&&external_osdSharedDeps_React_default.a.createElement(components_CreatePolicyModal,{isEdit:false,onClose:this.onCloseCreatePolicyModal,onClickContinue:this.onClickCreate});const EditModal=()=>showEditModal&&external_osdSharedDeps_React_default.a.createElement(components_CreatePolicyModal,{isEdit:true,onClose:this.onCloseEditModal,onClickContinue:this.onClickEdit});const DeleteModal=()=>showDeleteModal&&external_osdSharedDeps_React_default.a.createElement(components_ConfirmationModal,{title:`Delete ${selectedItems.length===1?selectedItems[0].id:`${selectedItems.length} policies`}`,bodyMessage:`Delete ${selectedItems.length===1?selectedItems[0].id:`${selectedItems.length} policies`} permanently? This action cannot be undone.`,actionMessage:"Delete",onAction:()=>this.onClickDelete(selectedItems.map(item=>item.id)),onClose:this.onCloseDeleteModal});const actionsButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const popoverItems=[{id:0,width:159,items:[{name:"Edit",icon:"pencil",disabled:selectedItems.length!=1,onClick:()=>{this.closePopover();this.onShowEditModal()}},{name:"Delete",icon:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"trash",size:"m",color:"danger"}),disabled:!selectedItems.length,onClick:()=>{this.closePopover();this.onShowDeleteModal()}}]}];return!useNewUX?external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:actions}),bodyStyles:{padding:"initial"},title:"State management policies",itemCount:totalPolicies},external_osdSharedDeps_React_default.a.createElement(components_PolicyControls,{activePage:page,pageCount:Math.ceil(totalPolicies
6/size)||1,search:search,onSearchChange:this.onSearchChange,onPageClick:this.onPageClick,onRefresh:this.getPolicies}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:this.columns,isSelectable:true,itemId:"id",items:policies,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_PolicyEmptyPrompt,{history:this.props.history,filterIsApplied:filterIsApplied,loading:loadingPolicies,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Create policy",label:"Create policy",iconType:"plus",fill:true,testId:"createButton",controlType:"button",run:this.onShowCreatePolicyModal}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{autoFocus:true,placeholder:search,incremental:false,onChange:this.onSearchChange,"aria-label":search,fullWidth:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionsButton,isOpen:isPopoverOpen,closePopover:this.closePopover,anchorPosition:"downRight",panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,panels:popoverItems,size:"s"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),CommonTable()),CreateModal(),DeleteModal(),EditModal())}}Policies_defineProperty(Policies_Policies,"contextType",core_services["b"]);var containers_Policies_Policies=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Policies_Policies,Policies_extends({},props,dataSourceMenuProps))};var containers_Policies=containers_Policies_Policies;var pages_Policies=containers_Policies;function ManagedIndexControls_defineProperty(e,r,t){return(r=ManagedIndexControls_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ManagedIndexControls_toPropertyKey(t){var i=ManagedIndexControls_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ManagedIndexControls_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ManagedIndexControls_ManagedIndexControls extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);ManagedIndexControls_defineProperty(this,"state",{refreshInterval:0,isPaused:true});ManagedIndexControls_defineProperty(this,"onRefreshChange",_ref=>{let{refreshInterval:refreshInterval,isPaused:isPaused}=_ref;this.setState({isPaused:isPaused,refreshInterval:refreshInterval})});ManagedIndexControls_defineProperty(this,"getDataStreams",async()=>(await this.props.getDataStreams()).map(ds=>({value:ds.name})))}render(){const{search:search,onSearchChange:onSearchChange,showDataStreams:showDataStreams,toggleShowDataStreams:toggleShowDataStreams,Actions:Actions,onRefresh:onRefresh}=this.props;const schema={strict:true,fields:{indices:{type:"string"},data_streams:{type:"string"}}};
6const filters=showDataStreams?[{type:"field_value_selection",field:"data_streams",name:"Data streams",noOptionsMessage:"No data streams found",multiSelect:false,cache:6e4,options:()=>this.getDataStreams(),popoverProps:{button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{size:"s",iconType:"arrowDown",iconSide:"right",flush:"right"},"Data streams2")}}]:undefined;const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSearchBar"],{query:search,box:{placeholder:"Search",schema:schema,incremental:true,compressed:true},compressed:true,onChange:onSearchChange,filters:filters})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh","data-test-subj":"refreshButton",display:"base",size:"s",onClick:onRefresh}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},Actions),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Show data stream indexes",checked:showDataStreams,onChange:toggleShowDataStreams,"data-test-subj":"toggleShowDataStreams"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"},alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSearchBar"],{query:search,box:{placeholder:"Search index name",schema:schema,incremental:true},compressed:true,onChange:onSearchChange,filters:filters})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Show data stream indexes",checked:showDataStreams,onChange:toggleShowDataStreams,"data-test-subj":"toggleShowDataStreams"})))}}var components_ManagedIndexControls=ManagedIndexControls_ManagedIndexControls;const ManagedIndexEmptyPrompt_TEXT={RESET_FILTERS:"There are no managed indexes matching your applied filters. Reset your filters to view your managed indexes.",NO_MANAGED_INDICES:"There are no existing managed indexes. Create a policy to add to an index.",LOADING:"Loading managed indexes..."};const ManagedIndexEmptyPrompt_getMessagePrompt=_ref=>{let{filterIsApplied:filterIsApplied,loading:loading}=_ref;if(loading)return ManagedIndexEmptyPrompt_TEXT.LOADING;if(filterIsApplied)return ManagedIndexEmptyPrompt_TEXT.RESET_FILTERS;return ManagedIndexEmptyPrompt_TEXT.NO_MANAGED_INDICES};const ManagedIndexEmptyPrompt_getActions=_ref2=>{let{history:history,filterIsApplied:filterIsApplied,loading:loading,resetFilters:resetFilters}=_ref2;if(loading)return null;if(filterIsApplied){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:resetFilters,"data-test-subj":"managedIndexEmptyPromptResetFilters"},"Reset Filters")}const onClickCreate=visual=>{history.push(`${constants["D"].CREATE_POLICY}${visual?"?type=visual":""}`)};return external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref3=>{let{onShow:onShow}=_ref3;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>onShow(components_CreatePolicyModal,{history:history,onClickContinue:onClickCreate}),iconType:"plus"},"Create policy")})};const ManagedIndexEmptyPrompt=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,ManagedIndexEmptyPrompt_getMessagePrompt(props))),actions:ManagedIndexEmptyPrompt_getActions(props)});var ManagedIndexEmptyPrompt_ManagedIndexEmptyPrompt=ManagedIndexEmptyPrompt;var components_ManagedIndexEmptyPrompt=ManagedIndexEmptyPrompt_ManagedIndexEmptyPrompt;const constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const constants_DEFAULT_QUERY_PARAMS={from:0,size:20,search:"",sortField:"index",sortDirection:"desc",showDataStream
6s:false};const InfoModal=_ref=>{let{info:info,onClose:onClose}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose,maxWidth:1e3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Managed Index Info")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"s"},JSON.stringify(info,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onClose,"data-test-subj":"infoModalCloseButton"},"Close"))))};var InfoModal_InfoModal=InfoModal;var components_InfoModal=InfoModal_InfoModal;const PolicyModal=_ref=>{let{policyId:policyId,policy:policy,errorMessage:errorMessage,onClose:onClose,onEdit:onEdit}=_ref;const policyString=JSON.stringify(policy,null,4);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose,maxWidth:1e3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,policyId)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"s",style:{minWidth:600}},errorMessage!=null?errorMessage:policyString)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{marginRight:"auto"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCopy"],{textToCopy:policyString},copy=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{iconType:"copyClipboard",onClick:copy,disabled:!policy,"data-test-subj":"policyModalCopyButton"},"Copy"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"policyModalCloseButton"},"Close")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>onEdit(false),fill:true,disabled:!policyId||!policy,"data-test-subj":"policyModalEditJsonButton"},"Edit as JSON")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>onEdit(true),fill:true,disabled:!policyId||!policy,"data-test-subj":"policyModalEditButton"},"Edit"))))))};var PolicyModal_PolicyModal=PolicyModal;var components_PolicyModal=PolicyModal_PolicyModal;function helpers_getURLQueryParams(location){const{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStream
6s:showDataStreams}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?constants_DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?constants_DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?constants_DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="string"?constants_DEFAULT_QUERY_PARAMS.sortField:sortField,sortDirection:typeof sortDirection!=="string"?constants_DEFAULT_QUERY_PARAMS.sortDirection:sortDirection,showDataStreams:showDataStreams===undefined?constants_DEFAULT_QUERY_PARAMS.showDataStreams:"true"===showDataStreams}}function RetryModal_defineProperty(e,r,t){return(r=RetryModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RetryModal_toPropertyKey(t){var i=RetryModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RetryModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Radio=function(Radio){Radio["Current"]="current";Radio["State"]="state";return Radio}(Radio||{});class RetryModal_RetryModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);RetryModal_defineProperty(this,"state",{radioIdSelected:Radio.Current,stateSelected:"",stateOptions:[]});RetryModal_defineProperty(this,"initOptions",()=>{const{retryItems:retryItems}=this.props;if(!retryItems.length)return;const firstRetryItem=retryItems[0];if(!firstRetryItem.policy||!firstRetryItem.policy.states)return;let states=new Set(firstRetryItem.policy.states.map(state=>state.name));for(let i=1;i<retryItems.length;i++){if(!states.size)return;const retryItem=retryItems[i];if(!retryItem.policy||!retryItem.policy.states)return;const tempStates=new Set(retryItem.policy.states.map(state=>state.name));states=new Set([...states].filter(state=>tempStates.has(state)))}const stateOptions=[...states].map(state=>({value:state,text:state}));this.setState({stateOptions:stateOptions})});RetryModal_defineProperty(this,"onRetry",async()=>{const{radioIdSelected:radioIdSelected,stateSelected:stateSelected}=this.state;const{retryItems:retryItems,onClose:onClose,services:{managedIndexService:managedIndexService}}=this.props;try{const indices=retryItems.map(item=>item.index);const state=radioIdSelected==Radio.State?stateSelected:null;const response=await managedIndexService.retryManagedIndexPolicy(indices,state);if(response.ok){const{response:{updatedIndices:updatedIndices,failedIndices:failedIndices,failures:failures}}=response;if(failures){this.context.notifications.toasts.addDanger(`Failed to retry: ${failedIndices.map(failedIndex=>`[${failedIndex.indexName}, ${failedIndex.reason}]`).join(", ")}`)}if(updatedIndices){this.context.notifications.toasts.addSuccess(`Retried ${updatedIndices} managed indexes`)}}else{this.context.notifications.toasts.addDanger(response.error)}onClose()}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem retrying managed indexes"))}});RetryModal_defineProperty(this,"onChange",optionId=>{this.setState({radioIdSelected:optionId})});RetryModal_defineProperty(this,"onSelectChange",e=>{this.setState({stateSelected:e.target.value})})}componentDidMount(){this.initOptions()}render(){const{radioIdSelected:radioIdSelected,stateSelected:stateSelected,stateOptions:stateOptions}=this.state;const{onClose:onClose,retryItems:retryItems}=this.props;const currentRadio={id:Radio.Current,label:"Retry policy from current action"};const stateRadio={id:Radio.State,label:"Retry policy from selected state",disabled:!stateOptions.length};const radioOptions=[currentRadio,stateRadio];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Retry policy")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:radioOptions,idSelected:radioIdSelected,onChange:this.onChange}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Start state")),helpText:"Only common states shared across all selected indexes are available"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{disabled:radioIdSelected!==Radio.State,options:stateOptions,value:stateSelected,onChange:this.onSelectChange,"aria-label":"Retry failed policy from"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"retryModalCloseButton"},"Close"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onRetry,disabled:!retryItems.length,fill:true,"data-test-subj":"retryModalRetryButton"},"Retry"))))}}RetryModal_defineProperty(RetryModal_RetryModal,"contextType",core_services["b"]);var components_RetryModal=RetryModal_RetryModal;function RolloverAliasModal_defineProperty(e,r,t){return(r=RolloverAliasModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RolloverAliasModal_toPropertyKey(t){var i=RolloverAliasModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RolloverAliasModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RolloverAliasModal_RolloverAliasModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);RolloverAliasModal_defineProperty(this,"state",{rolloverAlias:""});RolloverAliasModal_defineProperty(this,"onEditRolloverAlias",async()=>{const{onClose:onClose,index:index,services:{indexService:indexService}}=this.props;const{rolloverAlias:rolloverAlias}=this.state;try{const response=await indexService.editRolloverAlias(index,rolloverAlias);if(response.ok){if(response.response.acknowledged){this.context.notifications.toasts.addSuccess(`Edited rollover alias on ${index}`)}else{this.context.notifications.toasts.addDanger(`Failed to edit rollover alias on ${index}`)}}else{this.context.notifications.toasts.addDanger(response.error)}onClose()}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`There was a problem editing rollover alias on ${index}`))}});RolloverAliasModal_defineProperty(this,"onChange",e=>{this.setState({rolloverAlias:e.target.value})})}render(){const{rolloverAlias:rolloverAlias}=this.state;const{onClose:onClose}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Edit rollover alias")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Rollover alias")),helpText:"A rollover alias is required when using the rollover action."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{placeholder:"Rollover alias",value:rolloverAlias,onChange:this.onChange}
6))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"editRolloverAliasModalCloseButton"},"Close"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onEditRolloverAlias,disabled:!rolloverAlias,fill:true,"data-test-subj":"editRolloverAliasModalAddButton"},"Edit"))))}}RolloverAliasModal_defineProperty(RolloverAliasModal_RolloverAliasModal,"contextType",core_services["b"]);var components_RolloverAliasModal=RolloverAliasModal_RolloverAliasModal;var utils_constants=__webpack_require__(60);function ManagedIndices_extends(){return ManagedIndices_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ManagedIndices_extends.apply(null,arguments)}function ManagedIndices_defineProperty(e,r,t){return(r=ManagedIndices_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ManagedIndices_toPropertyKey(t){var i=ManagedIndices_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ManagedIndices_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ManagedIndices_ManagedIndices extends components_MDSEnabledComponent{constructor(props){super(props);ManagedIndices_defineProperty(this,"columns",void 0);ManagedIndices_defineProperty(this,"managedIndicesColumns",isDataStreamColumnVisible=>isDataStreamColumnVisible?this.columns:this.columns.filter(col=>col["field"]!=="dataStream"));ManagedIndices_defineProperty(this,"renderPolicyId",(policyId,item)=>{var _item$managedIndexMet;let errorMessage=undefined;if(((_item$managedIndexMet=item.managedIndexMetaData)===null||_item$managedIndexMet===void 0?void 0:_item$managedIndexMet.policySeqNo)==null)errorMessage=`Still initializing, please wait a moment`;if(!item.policy)errorMessage=`Failed to load the policy: ${item.policyId}`;return external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow,onClose:onClose}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>onShow(components_PolicyModal,{policyId:policyId,policy:item.policy,onEdit:()=>this.onClickModalEdit(item,onClose),errorMessage:errorMessage})},policyId)})});ManagedIndices_defineProperty(this,"getManagedIndices",async()=>{this.setState({loadingManagedIndices:true});try{const{managedIndexService:managedIndexService,history:history}=this.props;const queryObject=ManagedIndices_ManagedIndices.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const getManagedIndicesResponse=await managedIndexService.getManagedIndices({...queryObject,terms:this.getTermClausesFromState(),indices:this.getFieldClausesFromState("indices"),dataStreams:this.getFieldClausesFromState("data_streams")});if(getManagedIndicesResponse.ok){const{response:{managedIndices:managedIndices,totalManagedIndices:totalManagedIndices}}=getManagedIndicesResponse;this.setState({managedIndices:managedIndices,totalManagedIndices:totalManagedIndices})}else{this.context.notifications.toasts.addDanger(getManagedIndicesResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the managed indexes"))}const{showDataStreams:showDataStreams}=this.state;this.setState({loadingManagedIndices:false,isDataStreamColumnVisible:showDataStreams})});ManagedIndices_defineProperty(this,"getDataStreams",async()=>{const{managedIndexService:managedIndexService}=this.props;
6const serverResponse=await managedIndexService.getDataStreams(undefined);if(!serverResponse.ok){if(serverResponse.error.startsWith(utils_constants["a"])){this.context.notifications.toasts.addWarning(serverResponse.error)}}return serverResponse.response.dataStreams});ManagedIndices_defineProperty(this,"toggleShowDataStreams",()=>{const{showDataStreams:showDataStreams}=this.state;this.setState({showDataStreams:!showDataStreams})});ManagedIndices_defineProperty(this,"getFieldClausesFromState",clause=>{const{query:query}=this.state;return external_osdSharedDeps_Lodash_default.a.flatten((query.ast.getFieldClauses(clause)||[]).map(field=>field.value))});ManagedIndices_defineProperty(this,"getTermClausesFromState",()=>{const{query:query}=this.state;return(query.ast.getTermClauses()||[]).map(term=>term.value)});ManagedIndices_defineProperty(this,"onClickRemovePolicy",async indices=>{try{if(!indices.length)return;const{managedIndexService:managedIndexService}=this.props;const removePolicyResponse=await managedIndexService.removePolicy(indices);if(removePolicyResponse.ok){const{updatedIndices:updatedIndices,failedIndices:failedIndices,failures:failures}=removePolicyResponse.response;if(updatedIndices){this.context.notifications.toasts.addSuccess(`Removed policy from ${updatedIndices} managed indexes`);await this.getManagedIndices()}if(failures){this.context.notifications.toasts.addDanger(`Failed to remove policy from ${failedIndices.map(failedIndex=>`[${failedIndex.indexName}, ${failedIndex.reason}]`).join(", ")}`)}}else{this.context.notifications.toasts.addDanger(removePolicyResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem removing the policies"))}});ManagedIndices_defineProperty(this,"onTableChange",_ref2=>{let{page:tablePage,sort:sort}=_ref2;const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection})});ManagedIndices_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});ManagedIndices_defineProperty(this,"onSearchChange",_ref3=>{let{query:query,queryText:queryText,error:error}=_ref3;if(error){return}this.setState({from:0,search:queryText,query:query})});ManagedIndices_defineProperty(this,"onClickModalEdit",(item,onClose)=>{onClose();if(!item||!item.policyId)return;this.props.history.push(`${constants["D"].EDIT_POLICY}?id=${item.policyId}`)});ManagedIndices_defineProperty(this,"resetFilters",()=>{this.setState({search:constants_DEFAULT_QUERY_PARAMS.search,query:external_osdSharedDeps_ElasticEui_["Query"].parse(constants_DEFAULT_QUERY_PARAMS.search)})});ManagedIndices_defineProperty(this,"onShowRetryModal",()=>{this.setState({showRetryModal:true})});ManagedIndices_defineProperty(this,"onCloseRetryModal",()=>{this.setState({showRetryModal:false})});ManagedIndices_defineProperty(this,"onShowRemoveModal",()=>{this.setState({showRemoveModal:true})});ManagedIndices_defineProperty(this,"onCloseRemoveModal",()=>{this.setState({showRemoveModal:false})});ManagedIndices_defineProperty(this,"onShowEditModal",()=>{this.setState({showEditModal:true})});ManagedIndices_defineProperty(this,"onCloseEditModal",()=>{this.setState({showEditModal:false})});ManagedIndices_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});ManagedIndices_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})});const{from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,showDataStreams:_showDataStreams}=helpers_getURLQueryParams(this.props.location);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={...this.state,totalManagedIndices:0,from:from,size:_size,search:search,query:external_osdSharedDeps_ElasticEui_["Query"].parse(search),sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],managedIndices:[],loadingManagedIndices:true,showDataStreams:_showDataStream
6s,isDataStreamColumnVisible:_showDataStreams,useUpdatedUX:useUpdatedUX,showRetryModal:false,showRemoveModal:false,showEditModal:false,isPopoverOpen:false};this.getManagedIndices=external_osdSharedDeps_Lodash_default.a.debounce(this.getManagedIndices,500,{leading:true});this.columns=[{field:"index",name:"Index",sortable:true,truncateText:true,textOnly:true,render:index=>external_osdSharedDeps_React_default.a.createElement("span",{title:index},index)},{field:"dataStream",name:"Data stream",sortable:true,truncateText:true,textOnly:true,render:dataStream=>dataStream||constants["i"]},{field:"policyId",name:"Policy",sortable:true,truncateText:true,textOnly:true,render:this.renderPolicyId},{field:"managedIndexMetaData.state.name",name:"State",sortable:false,truncateText:false,render:state=>state||constants["i"]},{field:"managedIndexMetaData.action.name",name:"Action",sortable:false,truncateText:false,render:action=>external_osdSharedDeps_React_default.a.createElement("span",{style:{textTransform:"capitalize"}},(action||constants["i"]).split("_").join(" "))},{field:"managedIndexMetaData.info",name:"Info",sortable:false,truncateText:true,textOnly:true,render:info=>external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref4=>{let{onShow:onShow}=_ref4;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{style:{width:"100%",overflow:"hidden",textOverflow:"ellipsis"},onClick:()=>onShow(components_InfoModal,{info:info})},external_osdSharedDeps_Lodash_default.a.get(info,"message",constants["i"]))})},{field:"index",name:"Job Status",sortable:false,truncateText:false,render:(index,item)=>{const{managedIndexMetaData:managedIndexMetaData}=item;if(!managedIndexMetaData)return"Initializing";const{policyCompleted:policyCompleted,retryInfo:retryInfo,action:action}=managedIndexMetaData;if(policyCompleted)return"Completed";if(retryInfo&&retryInfo.failed)return"Failed";if(action&&action.failed)return"Failed";return"Running"}}]}async componentDidMount(){const breadCrumbs=this.state.useUpdatedUX?[constants["f"].MANAGED_INDICES]:[constants["f"].INDEX_MANAGEMENT,constants["f"].MANAGED_INDICES];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getManagedIndices();if(this.state.useUpdatedUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].MANAGED_INDICES.text.concat(` (${this.state.totalManagedIndices})`),href:constants["f"].MANAGED_INDICES.href}])}}async componentDidUpdate(prevProps,prevState){const prevQuery=ManagedIndices_ManagedIndices.getQueryObjectFromState(prevState);const currQuery=ManagedIndices_ManagedIndices.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getManagedIndices()}if(this.state.useUpdatedUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].MANAGED_INDICES.text.concat(` (${this.state.totalManagedIndices})`),href:constants["f"].MANAGED_INDICES.href}])}}static getQueryObjectFromState(_ref5){let{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStreams:showDataStreams,dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref5;return{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStreams:showDataStreams,...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){const{totalManagedIndices:totalManagedIndices,from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,selectedItems:selectedItems,managedIndices:managedIndices,loadingManagedIndices:loadingManagedIndices,showDataStreams:showDataStreams,isDataStreamColumnVisible:isDataStreamColumnVisible,showRetryModal:showRetryModal,showRemoveModal:showRemoveModal,showEditModal:showEditModal,isPopoverOpen:isPopoverOpen}=this.state;const filterIsApplied=!!search;const page=Math.floor(from/size);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalManagedIndices};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const isRetryDisabled=!selectedItems.length||selectedItems.some(item=>{if(!item.managedIndexMetaData)return true;const{retryInfo:retryInfo,action:action}=item.managedIndexMetaData;
6return!(retryInfo&&retryInfo.failed)&&!(action&&action.failed)});const isDataStreamIndexSelected=selectedItems.some(item=>item.dataStream!==null);const actions=[{text:"Edit rollover alias",buttonProps:{disabled:selectedItems.length!==1||isDataStreamIndexSelected},modal:{onClickModal:onShow=>()=>onShow(components_RolloverAliasModal,{index:selectedItems[0].index,core:this.context})}},{text:"Remove policy",buttonProps:{disabled:!selectedItems.length},modal:{onClickModal:onShow=>()=>onShow(components_ConfirmationModal,{title:`Remove ${selectedItems.length===1?`policy from ${selectedItems[0].index}`:`policies from ${selectedItems.length} indexes`}`,bodyMessage:`Remove ${selectedItems.length===1?`policy from ${selectedItems[0].index}`:`policies from ${selectedItems.length} indexes`} permanently? This action cannot be undone.`,actionMessage:"Remove",onAction:()=>this.onClickRemovePolicy(selectedItems.map(item=>item.index))})}},{text:"Retry policy",buttonProps:{disabled:isRetryDisabled},modal:{onClickModal:onShow=>()=>onShow(components_RetryModal,{retryItems:external_osdSharedDeps_Lodash_default.a.cloneDeep(selectedItems)})}}];const RemovePolicyModal=()=>showRemoveModal&&external_osdSharedDeps_React_default.a.createElement(components_ConfirmationModal,{title:`Remove ${selectedItems.length===1?`policy from ${selectedItems[0].index}`:`policies from ${selectedItems.length} indexes`}`,bodyMessage:`Remove ${selectedItems.length===1?`policy from ${selectedItems[0].index}`:`policies from ${selectedItems.length} indexes`} permanently? This action cannot be undone.`,actionMessage:"Remove",onAction:()=>this.onClickRemovePolicy(selectedItems.map(item=>item.index)),onClose:this.onCloseRemoveModal});const actionsButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const popoverActionItems=[external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref6=>{let{onShow:onShow,onClose:onClose}=_ref6;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{size:"s",key:"Edit",toolTipPosition:"left",disabled:selectedItems.length!==1||isDataStreamIndexSelected,"data-test-subj":"editOption",onClick:()=>onShow(components_RolloverAliasModal,{index:selectedItems[0].index,core:this.context})},"Edit rollover alias")}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{size:"s",key:"Remove",toolTipPosition:"left",disabled:!selectedItems.length,"data-test-subj":"removeOption",onClick:()=>{this.closePopover();this.onShowRemoveModal()}},"Remove Policy"),external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref7=>{let{onShow:onShow,onClose:onClose}=_ref7;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{size:"s",key:"Retry",toolTipPosition:"left",disabled:isRetryDisabled,"data-test-subj":"RetryOption",onClick:()=>onShow(components_RetryModal,{retryItems:external_osdSharedDeps_Lodash_default.a.cloneDeep(selectedItems)})},"Retry Policy")})];const Action=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionsButton,isOpen:isPopoverOpen,closePopover:this.closePopover,anchorPosition:"downLeft",panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:popoverActionItems,size:"s"})));const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const CommonTable=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:this.managedIndicesColumns(isDataStreamColumnVisible),isSelectable:true,itemId:"index",items:managedIndices,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_ManagedIndexEmptyPrompt,{history:this.props.history,filterIsApplied:filterIsApplied,loading:loadingManagedIndices,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting});const onClickChange=()=>{this.props.history.push(constants["D"].CHANGE_POLICY)};return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Change policy",label:"Change Policy",fill:true,run:onClickChange,testId:"changePolicyButton",controlType:"button",color:"primary"}]}),external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(components_ManagedIndexControls,{search:search,onSearchChange:this.onSearchChange,onRefresh:this.getManagedIndices,showDataStream
6s:showDataStreams,getDataStreams:this.getDataStreams,toggleShowDataStreams:this.toggleShowDataStreams,Actions:Action()}),CommonTable()),RemovePolicyModal())):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 25px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getManagedIndices,"data-test-subj":"refreshButton"},"Refresh")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{href:`${constants["y"]}#/change-policy`,"data-test-subj":"changePolicyButton"},"Change policy"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:actions}),bodyStyles:{padding:"initial"},title:"Policy managed indexes",itemCount:totalManagedIndices},external_osdSharedDeps_React_default.a.createElement(components_ManagedIndexControls,{search:search,onSearchChange:this.onSearchChange,onRefresh:this.getManagedIndices,showDataStreams:showDataStreams,getDataStreams:this.getDataStreams,toggleShowDataStreams:this.toggleShowDataStreams}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),CommonTable()))}}ManagedIndices_defineProperty(ManagedIndices_ManagedIndices,"contextType",core_services["b"]);var containers_ManagedIndices_ManagedIndices=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(ManagedIndices_ManagedIndices,ManagedIndices_extends({},props,dataSourceMenuProps))};var containers_ManagedIndices=containers_ManagedIndices_ManagedIndices;var pages_ManagedIndices=containers_ManagedIndices;function ApplyPolicyModal_defineProperty(e,r,t){return(r=ApplyPolicyModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ApplyPolicyModal_toPropertyKey(t){var i=ApplyPolicyModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ApplyPolicyModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ApplyPolicyModal_ApplyPolicyModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);ApplyPolicyModal_defineProperty(this,"state",{isLoading:false,selectedPolicy:null,selectedPolicyError:"",hasRolloverAction:false,policyOptions:[],rolloverAlias:"",rolloverAliasError:"",hasSubmitted:false});ApplyPolicyModal_defineProperty(this,"onApplyPolicy",async(selectedPolicy,hasRolloverAction,rolloverAlias)=>{try{const{onClose:onClose,indices:indices,services:{indexService:indexService}}=this.props;const policyId=selectedPolicy.label;const applyPolicyResponse=await indexService.applyPolicy(indices,policyId);if(applyPolicyResponse.ok){const{updatedIndices:updatedIndices,failedIndices:failedIndices,failures:failures}=applyPolicyResponse.response;if(updatedIndices){this.context.notifications.toasts.addSuccess(`Applied policy to ${updatedIndices} indices`);if(hasRolloverAction&&rolloverAlias&&indices.length===1){await this.onEditRolloverAlias(indices[0],rolloverAlias)}}if(failures){this.context.notifications.toasts.addDanger(`Failed to apply policy to ${failedIndices.map(failedIndex=>`[${failedIndex.indexName}, ${failedIndex.reason}]`).join(", ")}`)}onClose()}else{this.context.notifications.toasts.addDanger(applyPolicyResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem adding policy to indices"))}});ApplyPolicyModal_defineProperty(this,"onEditRolloverAlias",async(index,rolloverAlias)=>{const{services:{indexService:indexService}}=this.props;try{const response=await indexService.editRolloverAlias(index,rolloverAlias);if(response.ok){if(response.response.acknowledged){this.context.notifications.toasts.addSuccess(`Edited rollover alias on ${index}`)}else{this.context.notifications.toasts.addDanger(`Failed to edit rollover alias on ${index}`)}}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`There was a problem editing rollover alias on ${index}`))}});ApplyPolicyModal_defineProperty(this,"onPolicySearchChange",async searchValue=>{const{services:{indexService:indexService}}=this.props;this.setState({isLoading:true,policyOptions:[]});try{const searchPoliciesResponse=await indexService.searchPolicies(searchValue,true);if(searchPoliciesResponse.ok){const policies=searchPoliciesResponse.response.policies.map(p=>({label:p.id,policy:p.policy}));this.setState({policyOptions:policies})}else{if(searchPoliciesResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("You have not created a policy yet")}else{this.context.notifications.toasts.addDanger(searchPoliciesResponse.error)}}}catch(err){if(this.context!=null)this.context.notifications.toasts.addDanger(err.message)}this.setState({isLoading:false})});ApplyPolicyModal_defineProperty(this,"onChangeSelectedPolicy",selectedPolicies=>{const selectedPolicy=selectedPolicies.length?selectedPolicies[0]:null;const hasRolloverAction=this.hasRolloverAction(selectedPolicy);this.setState({selectedPolicy:selectedPolicy,hasRolloverAction:hasRolloverAction,selectedPolicyError:this.getSelectedPolicyError(selectedPolicy)})});ApplyPolicyModal_defineProperty(this,"onChangeRolloverAlias",e=>{const rolloverAlias=e.target.value;this.setState({rolloverAlias:rolloverAlias,rolloverAliasError:this.getRolloverAliasError(rolloverAlias)})});ApplyPolicyModal_defineProperty(this,"onSubmit",async()=>{const{selectedPolicy:selectedPolicy,rolloverAlias:rolloverAlias}=this.state;const selectedPolicyError=this.getSelectedPolicyError(selectedPolicy);const rolloverAliasError=this.getRolloverAliasError(rolloverAlias);const hasSubmitError=!!selectedPolicyError||!!rolloverAliasError;if(hasSubmitError){this.setState({selectedPolicyError:selectedPolicyError,rolloverAliasError:rolloverAliasError,hasSubmitted:true})}else{await this.onApplyPolicy(selectedPolicy,this.hasRolloverAction(selectedPolicy),rolloverAlias)}});ApplyPolicyModal_defineProperty(this,"getRolloverAliasError",rolloverAlias=>{const{hasRolloverAction:hasRolloverAction}=this.state;const{indices:indices}=this.props;const isDataStream=indices[0].includes(".ds");const hasSingleIndexSelected=indices.length===1;const requiresAlias=hasRolloverAction&&hasSingleIndexSelected&&!isDataStream;const hasAliasError=requiresAlias&&!rolloverAlias;return hasAliasError?"Required":""});ApplyPolicyModal_defineProperty(this,"getSelectedPolicyError",selectedPolicy=>
6selectedPolicy?"":"You must select a policy");ApplyPolicyModal_defineProperty(this,"hasRolloverAction",selectedPolicy=>external_osdSharedDeps_Lodash_default.a.get(selectedPolicy,"policy.states",[]).some(state=>state.actions.some(action=>action.hasOwnProperty("rollover"))));ApplyPolicyModal_defineProperty(this,"renderRollover",()=>{const{rolloverAlias:rolloverAlias,hasRolloverAction:hasRolloverAction,rolloverAliasError:rolloverAliasError,hasSubmitted:hasSubmitted}=this.state;const{indices:indices}=this.props;const hasSingleIndexSelected=indices.length===1;if(!hasRolloverAction)return null;if(hasSingleIndexSelected){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Rollover alias",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",grow:false},external_osdSharedDeps_React_default.a.createElement("p",null,"This policy includes a rollover action. Specify a rollover alias."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["j"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),isInvalid:hasSubmitted&&!!rolloverAliasError,error:rolloverAliasError,fullWidth:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:hasSubmitted&&!!rolloverAliasError,placeholder:"Rollover alias",value:rolloverAlias,onChange:this.onChangeRolloverAlias,fullWidth:true}))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{style:{width:"350px"},title:external_osdSharedDeps_React_default.a.createElement("p",null,"You are applying a policy with rollover to multiple indices. You will need to add a unique rollover_alias setting to each index."),iconType:"alert",size:"s",color:"warning"})});ApplyPolicyModal_defineProperty(this,"renderPreview",()=>{const{selectedPolicy:selectedPolicy}=this.state;if(!selectedPolicy)return null;let policyString="";try{policyString=JSON.stringify({policy:selectedPolicy.policy},null,4)}catch(err){console.error(err)}if(!policyString){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",grow:false},external_osdSharedDeps_React_default.a.createElement("h4",null,"Preview")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"s",style:{height:"200px"}},policyString),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}))})}async componentDidMount(){await this.onPolicySearchChange("")}render(){const{policyOptions:policyOptions,selectedPolicy:selectedPolicy,selectedPolicyError:selectedPolicyError,isLoading:isLoading,hasSubmitted:hasSubmitted}=this.state;const{onClose:onClose}=this.props;const selectedOptions=selectedPolicy?[selectedPolicy]:[];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h2",null,"Apply policy")," ")," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",grow:false},external_osdSharedDeps_React_default.a.createElement("p",null,"Choose the policy you want to use for the selected indices. A copy of the policy will be created and applied to the indices.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Policy ID")),isInvalid:hasSubmitted&&!!selectedPolicyError,error:selectedPolicyError,fullWidth:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"Search policies",async:true,options:policyOptions,singleSelection:{asPlainText:true},selectedOptions:selectedOptions,isLoading:isLoading,isInvalid:hasSubmitted&&!!selectedPolicyError,onChange:this.onChangeSelectedPolicy,onSearchChange:this.onPolicySearchChange,fullWidth:true})),this.renderPreview(),this.renderRollover()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"applyPolicyModalCloseButton"},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onSubmit,fill:true,"data-test-subj":"applyPolicyModalEditButton"},"Apply"))))}}ApplyPolicyModal_defineProperty(ApplyPolicyModal_ApplyPolicyModal,"contextType",core_services["b"]);var components_ApplyPolicyModal=ApplyPolicyModal_ApplyPolicyModal;function SimplePopover_extends(){return SimplePopover_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SimplePopover_extends.apply(null,arguments)}const loopToGetPath=element=>{if(!element){return[]}const path=[element];while(element=element.parentNode){path.push(element)}return path};const SimplePopover=props=>{const{triggerType:triggerType="click",...others}=props;const[popVisible,setPopVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const popoverRef=Object(external_osdSharedDeps_React_["useRef"])(null);const panelRef=Object(external_osdSharedDeps_React_["useRef"])(null);const buttonProps={};const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);
6if(triggerType==="click"){buttonProps.onClick=e=>{e.stopPropagation();setPopVisible(!popVisible)}}if(triggerType==="hover"){buttonProps.onMouseEnter=()=>{setPopVisible(true)}}const outsideClick=Object(external_osdSharedDeps_React_["useCallback"])(()=>{setTimeout(()=>{if(destroyRef.current){return}setPopVisible(false)},0)},[popVisible,setPopVisible]);const outsideHover=Object(external_osdSharedDeps_React_["useCallback"])(Object(external_osdSharedDeps_Lodash_["throttle"])(e=>{if(popVisible&&popoverRef.current&&panelRef.current){const path=loopToGetPath(e.target);if(!(path.includes(popoverRef.current)||path.includes(panelRef.current))){setPopVisible(false)}}},100),[popVisible,setPopVisible]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(popVisible&&triggerType==="click"){window.addEventListener("click",outsideClick)}return()=>{window.removeEventListener("click",outsideClick)}},[outsideClick,triggerType]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(popVisible&&triggerType==="hover"){window.addEventListener("mousemove",outsideHover)}return()=>{window.removeEventListener("mousemove",outsideHover)}},[popVisible,outsideHover,triggerType]);Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>{destroyRef.current=true},[]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],SimplePopover_extends({},others,{popoverRef:popoverRef,panelRef:ref=>panelRef.current=ref,button:props.button&&Object(external_osdSharedDeps_React_["cloneElement"])(props.button,buttonProps),isOpen:popVisible,closePopover:()=>{}}))};var SimplePopover_SimplePopover=SimplePopover;var components_SimplePopover=SimplePopover_SimplePopover;var minimatch=__webpack_require__(167);var minimatch_default=__webpack_require__.n(minimatch);const filterByMinimatch=(input,rules)=>rules.some(item=>minimatch_default()(input,item,{dot:true}));const getOrderedJson=json=>{const entries=Object.entries(json);entries.sort((a,b)=>a[0]<b[0]?-1:1);return entries.reduce((total,_ref)=>{let[key,value]=_ref;return{...total,[key]:value}},{})};var utils_constants_0=__webpack_require__(14);function DeleteIndexModal(props){const[value,setValue]=Object(external_osdSharedDeps_React_["useState"])("");const{onClose:onClose,onConfirm:onConfirm,visible:visible,selectedItems:selectedItems}=props;Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible){setValue("")}},[visible]);if(!visible){return null}const hasSystemIndex=props.selectedItems.some(index=>filterByMinimatch(index,utils_constants_0["d"]));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete indexes")," ")," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,hasSystemIndex?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",size:"s"},"These indexes may contain critical system data. Deleting system indexes may break OpenSearch."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"The following index will be permanently deleted. This action cannot be undone.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s"},"To confirm your action, type ",external_osdSharedDeps_React_default.a.createElement("b",{style:{color:"#000"}},"delete"),"."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{placeholder:"delete",fullWidth:true,value:value,onChange:e=>setValue(e.target.value)}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"Delete Confirm button",onClick:onConfirm,fill:true,color:"danger",disabled:value!=="delete"},"Delete")))}var components_DeleteIndexModal=DeleteIndexModal;var public_services=__webpack_require__(12);function CloseIndexModal(props){const[value,setValue]=Object(external_osdSharedDeps_React_["useState"])("");const{onClose:onClose,onConfirm:onConfirm,visible:visible,selectedItems:selectedItems}=props;Object(external_osdSharedDeps_React_["useEffect"])(()=>
6{if(visible){setValue("")}},[visible]);if(!visible){return null}const showWarning=selectedItems.filter(item=>filterByMinimatch(item,utils_constants_0["d"])).length>0;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Close indexes")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",size:"s",hidden:!showWarning},"This index may contain critical system data. Closing system indexes may break OpenSearch.",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))),external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"The following index will be closed. It is not possible to index documents or to search for documents in a closed index.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s"},"To confirm your action, type ",external_osdSharedDeps_React_default.a.createElement("b",{style:{color:"#000"}},"close"),"."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{placeholder:"close",fullWidth:true,value:value,onChange:e=>setValue(e.target.value)}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{"data-test-subj":"Close Cancel button",onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"Close Confirm button",onClick:onConfirm,fill:true,disabled:value!=="close"},"Close")))}var components_CloseIndexModal=CloseIndexModal;function OpenIndexModal(props){const{onClose:onClose,onConfirm:onConfirm,visible:visible,selectedItems:selectedItems}=props;if(!visible){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h2",null,"Open indexes")," ")," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"The following index will be opened.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{"data-test-subj":"Open Cancel button",onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"Open Confirm button",onClick:onConfirm,fill:true},"Open")))}var components_OpenIndexModal=OpenIndexModal;function ClearCacheModal(props){const{onClose:onClose,visible:visible,selectedItems:selectedItems,type:type}=props;const[hint,setHint]=Object(external_osdSharedDeps_React_["useState"])("");const[blockHint,setBlockHint]=Object(external_osdSharedDeps_React_["useState"])("");const[unBlockedItems,setUnBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[blockedItems,setBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(true);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{const indexBlocksTypes=[constants["t"].CLOSED,constants["t"].META_DATA,constants["t"].READ_ONLY,constants["t"].READ_ONLY_ALLOW_DELETE];if(!!services&&visible){switch(type){case constants["u"].DATA_STREAM:setHint("Cache will be cleared for the following data streams.");setBlockHint("Cache will not be cleared for the following data streams because one or more backing indexes are closed or blocked.");Object(helpers["b"])(services,selectedItems,indexBlocksTypes,constants["u"].DATA_STREAM,false).then(filteredDataStream
6sResult=>{setUnBlockedItems(filteredDataStreamsResult.unBlockedItems);setBlockedItems(filteredDataStreamsResult.blockedItems)}).catch(()=>{setUnBlockedItems(selectedItems.map(item=>item.name))}).finally(()=>{setLoading(false)});break;case constants["u"].ALIAS:setHint("Cache will be cleared for the following aliases.");setBlockHint("Cache will not be cleared for the following aliases because one or more indexes are closed or blocked.");Object(helpers["b"])(services,selectedItems,indexBlocksTypes,constants["u"].ALIAS,false).then(filteredAliasesResult=>{setUnBlockedItems(filteredAliasesResult.unBlockedItems);setBlockedItems(filteredAliasesResult.blockedItems)}).catch(()=>{setUnBlockedItems(selectedItems.map(item=>item.alias))}).finally(()=>{setLoading(false)});break;default:setHint("Cache will be cleared for the following indexes.");setBlockHint("Cache will not be cleared for the following indexes because they may be closed or blocked.");Object(helpers["b"])(services,selectedItems,indexBlocksTypes,constants["u"].INDEX,false).then(filteredIndexesResult=>{setUnBlockedItems(filteredIndexesResult.unBlockedItems);setBlockedItems(filteredIndexesResult.blockedItems)}).catch(()=>{setUnBlockedItems(selectedItems.map(item=>item.index))}).finally(()=>{setLoading(false)})}}else if(!visible){setUnBlockedItems([]);setBlockedItems([]);setLoading(true)}},[services,visible,type,selectedItems]);const onConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{if(!!services){try{const result=await services.commonService.apiCaller({endpoint:"indices.clearCache",data:{index:unBlockedItems.join(",")||"_all"}});if(result&&result.ok){onClose();let toast="";if(unBlockedItems.length>1){toast=`Cache for ${unBlockedItems.length} ${type} [${unBlockedItems.join(", ")}] have been successfully cleared.`}else if(unBlockedItems.length==1){toast=`Cache for ${unBlockedItems[0]} has been successfully cleared.`}if(!selectedItems||selectedItems.length==0){toast="Cache for all open indexes have been successfully cleared."}coreServices.notifications.toasts.addSuccess(toast)}else{if(result.error.includes("cluster_block_exception")){coreServices.notifications.toasts.addError(new Error(result.error),{title:"Clear cache failed.",toastMessage:"One or more indexes are blocked."})}else{coreServices.notifications.toasts.addError(new Error(result.error),{title:"Clear cache failed."})}}}catch(err){coreServices.notifications.toasts.addDanger({title:"Unable to clear cache",text:Object(helpers["d"])(err,"There was a problem clearing cache.")})}}},[services,coreServices,onClose,unBlockedItems,selectedItems,type]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible&&selectedItems.length>0&&selectedItems.length==blockedItems.length){if(selectedItems.length==1){coreServices.notifications.toasts.addDanger({title:"Unable to clear cache",text:`Cache cannot be cleared for ${blockedItems[0]} because it is closed or blocked.`})}else{coreServices.notifications.toasts.addDanger({title:"Unable to clear cache",text:`Cache cannot be cleared for the selected ${type} because they are closed or blocked.`})}onClose()}},[visible,unBlockedItems,blockedItems,coreServices,onClose,type]);if(!visible||loading){return null}const specificIndexesChildren=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},unBlockedItems.length>0&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,hint)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},unBlockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",iconType:"warning",hidden:blockedItems.length==0,size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,blockHint)),external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},blockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("li",{key:item},item))))));const noSpecificIndexesChildren=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"Cache will be cleared for all open indexes.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Clear cache for ",type)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,!!selectedItems&&selectedItems.length>0?specificIndexesChildren:noSpecificIndexesChildren),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{"data-test-subj":"ClearCacheCancelButton",onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"ClearCacheConfirmButton",onClick:onConfirm,fill:true,isDisabled:selectedItems.length>0&&unBlockedItems.length==0},"Clear cache")))}var containers_ClearCacheModal=ClearCacheModal;const pluralToSingular={[constants["u"].INDEX]:"index",[constants["u"].DATA_STREAM]:"data stream",[constants["u"].ALIAS]:"alias"};const flushAllMessage="All open indexes will be flushed.";const blockedItemsMessageTemplate=flushTarget=>{var blockedReason;switch(flushTarget){case constants["u"].ALIAS:blockedReason="one or more indexes";break;case constants["u"].DATA_STREAM:blockedReason="one or more backing indexes";break;default:blockedReason="they"}return`The following ${flushTarget} will not be flushed because ${blockedReason} are either closed or in red status:`};const successToastTemplate=(flushTarget,unBlockedItems)=>{if(!unBlockedItems.length){return"All open indexes have been successfully flushed."}else if(unBlockedItems.length===1){return`The ${pluralToSingular[flushTarget]} ${unBlockedItems[0]} has been successfully flushed.`}else{return`${unBlockedItems.length} ${flushTarget} have been successfully flushed.`}};function FlushIndexModal(props){const{onClose:onClose,flushTarget:flushTarget,visible:visible,selectedItems:selectedItems}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const flushAll=!selectedItems.length&&flushTarget===constants["u"].INDEX;const[unBlockedItems,setUnBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[blockedItems,setBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(true);const onFlushConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>
6{if(!services){coreServices.notifications.toasts.addDanger({title:`Unable to flush ${flushTarget}`,text:"Something is wrong in ServiceContext"});setLoading(true);onClose();return}const indexPayload=unBlockedItems.join(", ");const result=await services.commonService.apiCaller({endpoint:"indices.flush",data:{index:indexPayload}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(successToastTemplate(flushTarget,unBlockedItems))}else{coreServices.notifications.toasts.addDanger({title:`Unable to flush ${flushTarget}`,text:result.error})}setLoading(true);onClose()},[unBlockedItems,services,coreServices,onClose,flushAll]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(!!services&&visible){Object(helpers["b"])(services,selectedItems,constants["t"].CLOSED,flushTarget,true).then(filterResultItems=>{if(visible){if(!!selectedItems.length&&selectedItems.length===filterResultItems.blockedItems.length){coreServices.notifications.toasts.addDanger({title:`Unable to flush ${flushTarget}`,text:`The selected ${flushTarget} cannot be flushed because they are either closed or in red status.`});setLoading(true);onClose();return}if(!selectedItems.length&&!!filterResultItems.blockedItems.length){coreServices.notifications.toasts.addDanger({title:`Unable to flush ${flushTarget}`,text:`Can not flush all open indexes because indexes [${filterResultItems.blockedItems.join(",")}] are in red status.`});setLoading(true);onClose();return}setBlockedItems(filterResultItems.blockedItems);setUnBlockedItems(filterResultItems.unBlockedItems);setLoading(false)}}).catch(err=>{if(visible){switch(flushTarget){case constants["u"].ALIAS:setUnBlockedItems(selectedItems.map(item=>item.alias));break;case constants["u"].DATA_STREAM:setUnBlockedItems(selectedItems.map(item=>item.name));break;default:setUnBlockedItems(selectedItems.map(item=>item.index))}setLoading(false)}})}else{setBlockedItems([]);setUnBlockedItems([]);setLoading(true)}},[visible,flushTarget,selectedItems,services]);if(!visible||loading){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],{"data-test-subj":"flushModalTitle"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Flush ",flushTarget)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},flushAll&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,flushAllMessage)),!!unBlockedItems.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,`The following ${flushTarget} will be flushed:`)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},unBlockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{"data-test-subj":"flushBlockedCallout",color:"warning",size:"s",hidden:!blockedItems.length},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,blockedItemsMessageTemplate(flushTarget))),external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},blockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("li",{key:item},item))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{"data-test-subj":"flushCancelButton",onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"flushConfirmButton",onClick:onFlushConfirm,fill:true},"Flush")))}var containers_FlushIndexModal=FlushIndexModal;function IndexDetail(props){const{index:index,history:history}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCopy"],{textToCopy:index},copy=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{size:"xs",flush:"right",iconType:"copyClipboard",onClick:copy,color:"text"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>history.push(`${constants["D"].INDEX_DETAIL}/${index}`),"data-test-subj":`viewIndexDetailButton-${index}`},index))}function constants_extends(){return constants_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},constants_extends.apply(null,arguments)}const renderNumber=value=>value||"-";const utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const utils_constants_DEFAULT_QUERY_PARAMS={from:0,size:20,search:"",sortField:"name",sortDirection:constants["I"].DESC,showDataStream
6s:false};const HEALTH_TO_COLOR={green:"success",yellow:"warning",red:"danger"};const getColumns=props=>[{field:"index",name:"Index",sortable:true,truncateText:false,textOnly:true,width:"250px",render:index=>external_osdSharedDeps_React_default.a.createElement(IndexDetail,constants_extends({},props,{index:index}))},{field:"health",name:"Health",sortable:true,truncateText:true,textOnly:true,render:(health,item)=>{const color=health?HEALTH_TO_COLOR[health]:"subdued";const text=health||item.status;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text)}},{field:"data_stream",name:"Data stream",sortable:true,truncateText:true,textOnly:true,width:"120px",render:data_stream=>data_stream?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].CREATE_DATA_STREAM}/${data_stream}`},data_stream):"-"},{field:"managed",name:"Managed by policy",sortable:true,truncateText:true,textOnly:true,render:renderNumber},{field:"status",name:"Status",sortable:true,truncateText:true,textOnly:true,render:(status,item)=>external_osdSharedDeps_React_default.a.createElement("span",{className:"camel-first-letter"},item.extraStatus||status)},{field:"store.size",name:"Total size",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:renderNumber},{field:"pri.store.size",name:"Size of primaries",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:renderNumber},{field:"docs.count",name:"Total documents",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:count=>external_osdSharedDeps_React_default.a.createElement("span",{title:count},count||"-")},{field:"docs.deleted",name:"Deleted documents",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:deleted=>external_osdSharedDeps_React_default.a.createElement("span",{title:deleted},deleted||"-")},{field:"pri",name:"Primaries",sortable:true,truncateText:true,textOnly:true,dataType:"number"},{field:"rep",name:"Replicas",sortable:true,truncateText:true,textOnly:true,dataType:"number"}];const indicesColumns=(isDataStreamColumnVisible,options)=>isDataStreamColumnVisible?getColumns(options):getColumns(options).filter(col=>col["field"]!=="data_stream");const DEFAULT_QUERY=JSON.stringify({query:{match_all:{}}},null,4);const REINDEX_ERROR_PROMPT={DEST_REQUIRED:"Destination is required.",DEST_DIFF_WITH_SOURCE:"Destination must be different with source",SLICES_FORMAT_ERROR:"Slices must be positive integer or auto"};var JobSchedulerContext=__webpack_require__(35);var JobScheduler=__webpack_require__(34);function utils_helpers_getURLQueryParams(location){const{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStreams:showDataStreams}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?utils_constants_DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?utils_constants_DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?utils_constants_DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="string"?"index":sortField,sortDirection:typeof sortDirection!=="string"?utils_constants_DEFAULT_QUERY_PARAMS.sortDirection:sortDirection,showDataStreams:showDataStreams===undefined?utils_constants_DEFAULT_QUERY_PARAMS.showDataStreams:showDataStreams==="true"}}async function openIndices(props){const indexPayload=props.indices.join(",");const result=await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"POST",path:`/${indexPayload}/_open?wait_for_completion=false`}});if(result&&result.ok){var _result$response;const toast=`Successfully started opening ${indexPayload}.`;const toastInstance=props.coreServices.notifications.toasts.addSuccess(toast,{toastLifeTimeMs:1e3*60*60*24*5});const clusterInfo=await Object(helpers["c"])({commonService:props.commonService});await JobSchedulerContext["a"].addJob({type:JobScheduler["b"].OPEN,extras:{clusterInfo:clusterInfo,toastId:toastInstance.id,taskId:(_result$response=result.response)===null||_result$response===void 0?void 0:_result$response.task,indexes:props.indices},interval:3e3,...props.jobConfig})}else{props.coreServices.notifications.toasts.addDanger(result.error)}return result}async function helpers_getIndexSettings(props){const result=await props.commonService.apiCaller({endpoint:"indices.getSettings",method:"GET",data:{index:props.indexName,flat_settings:props.flat}});if(result&&result.ok){return result.response}else{const errorMessage=`There is a problem getting index setting for ${props.indexName}, please check with Admin`;props.coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage);throw new Error((result===null||result===void 0?void 0:result.error)||errorMessage)}}async function getSingleIndice(props){const result=await props.commonService.apiCaller({endpoint:"cat.indices",method:"GET",data:{format:"json",index:[`${props.indexName||""}`]}});if(result&&result.ok&&result.response.length==1){return result.response[0]}else{const errorMessage=`There is a problem getting index for ${props.indexName}, please check with Admin`;props.coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage);throw new Error((result===null||result===void 0?void 0:result.error)||errorMessage)}}async function helpers_setIndexSettings(props){const result=await props.commonService.apiCaller({endpoint:"indices.putSettings",method:"PUT",data:{index:props.indexName,flat_settings:props.flat,body:{settings:{...props.settings}}}});if(result&&result.ok){props.coreServices.notifications.toasts.addSuccess(`Successfully update index setting for ${props.indexName}`)}else{const errorMessage=`There is a problem set index setting for ${props.indexName}, please check with Admin`;props.coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage);throw new Error((result===null||result===void 0?void 0:result.error)||errorMessage)}}async function helpers_getAlias(props){return await props.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${props.aliasName||""}*`,s:"alias:desc"}})}async function splitIndex(props){const{aliases:aliases,...settings}=props.settingsPayload;const result=await props.commonService.apiCaller({endpoint:"transport.request",data:{path:`/${props.sourceIndex}/_split/${props.targetIndex}
6?wait_for_completion=false`,method:"PUT",body:{settings:{...settings},aliases:aliases}}});if(result&&result.ok){var _result$response2;const toastInstance=props.coreServices.notifications.toasts.addSuccess(`Successfully started splitting ${props.sourceIndex}. The split index will be named ${props.targetIndex}`,{toastLifeTimeMs:1e3*60*60*24*5});const clusterInfo=await Object(helpers["c"])({commonService:props.commonService});await JobSchedulerContext["a"].addJob({interval:3e4,extras:{clusterInfo:clusterInfo,toastId:toastInstance.id,sourceIndex:props.sourceIndex,destIndex:props.targetIndex,taskId:(_result$response2=result.response)===null||_result$response2===void 0?void 0:_result$response2.task},type:JobScheduler["b"].SPLIT});return result}else{const errorMessage=`There was a problem submit split index request, please check with admin`;props.coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage);throw new Error((result===null||result===void 0?void 0:result.error)||errorMessage)}}function getSplitShardOptions(sourceShards){const MAX_SHARDS_NUMBER=1024;const shardsSelectOptions=[];if(sourceShards==1){for(let i=2;i<=MAX_SHARDS_NUMBER;i++){shardsSelectOptions.push({label:i.toString()})}}else{const SHARDS_HARD_LIMIT=MAX_SHARDS_NUMBER/2;let shardsLimit=sourceShards;while(shardsLimit<=SHARDS_HARD_LIMIT){shardsLimit=shardsLimit*2;shardsSelectOptions.push({label:shardsLimit.toString()})}}return shardsSelectOptions}const wordingMap={[constants["u"].ALIAS]:"alias",[constants["u"].DATA_STREAM]:"data stream",[constants["u"].INDEX]:"index"};const getClosedTypeWording=props=>props.type===constants["u"].INDEX?"they":`each ${wordingMap[props.type]} has one or more indexes that`;function RefreshActionModal(props){const{onClose:onClose,visible:visible,selectedItems:selectedItems,type:type}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[unBlockedItems,setUnBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[blockedItems,setBlockedItems]=Object(external_osdSharedDeps_React_["useState"])([]);const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(true);let unblockedWording="";let blockedWording="";let toastWording="";if(unBlockedItems.length===1){unblockedWording=`The following ${wordingMap[type]}`;toastWording=`The ${wordingMap[type]} [${unBlockedItems.join(", ")}] has been successfully refreshed.`}else if(unBlockedItems.length>1){unblockedWording=`The following ${type}`;toastWording=`${unBlockedItems.length} ${type} [${unBlockedItems.join(", ")}] have been successfully refreshed.`}if(blockedItems.length===1){blockedWording=`The following ${wordingMap[type]} cannot be refreshed because ${getClosedTypeWording({type:type})} are either closed or in red status.`}else{blockedWording=`The following ${type} cannot be refreshed because ${getClosedTypeWording({type:type})} are either closed or in red status.`}if(!selectedItems.length&&!blockedItems.length){toastWording=`All open indexes have been successfully refreshed.`}Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(!!services&&visible){const filterRedStatus=true;Object(helpers["b"])(services,selectedItems,constants["t"].CLOSED,type,filterRedStatus).then(filteredStreamsResult=>{const{blockedItems:blockedItems,unBlockedItems:unBlockedItems}=filteredStreamsResult;setBlockedItems(blockedItems);setUnBlockedItems(unBlockedItems);if(!selectedItems.length){if(!blockedItems.length){setLoading(false)}else if(blockedItems.length===1){coreServices.notifications.toasts.addDanger({title:`Unable to refresh indexes.`,text:`Cannot refresh all open indexes because [${blockedItems.join(", ")}] is in red status.`});onClose()}else{coreServices.notifications.toasts.addDanger({title:`Unable to refresh indexes.`,text:`Cannot refresh all open indexes because [${blockedItems.join(", ")}] are in red status.`});onClose()}}else if(selectedItems.length!=0&&unBlockedItems.length==0){coreServices.notifications.toasts.addDanger({title:`Unable to refresh ${type}.`,text:`All selected ${type} cannot be refreshed because ${getClosedTypeWording({type:type})} are either closed or in red status.`});onClose()}
6else{setLoading(false)}}).catch(()=>{if(selectedItems.length>0){let unBlocked;switch(type){case constants["u"].ALIAS:unBlocked=selectedItems.map(item=>item.alias);break;case constants["u"].DATA_STREAM:unBlocked=selectedItems.map(item=>item.name);break;default:unBlocked=selectedItems.map(item=>item.index);break}setBlockedItems([]);setUnBlockedItems(unBlocked)}setLoading(false)})}else{setUnBlockedItems([]);setBlockedItems([]);setLoading(true)}},[visible,services,type,selectedItems,onClose]);const onConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{if(!!services){const result=await services.commonService.apiCaller({endpoint:"indices.refresh",data:{index:unBlockedItems.join(",")}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(toastWording);onClose()}else{coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}}},[unBlockedItems,toastWording,services,coreServices,onClose]);if(!visible||loading){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Refresh ",type)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},selectedItems.length===0&&blockedItems.length===0&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"All open indexes will be refreshed."))),!!unBlockedItems.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,unblockedWording," will be refreshed.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},unBlockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item,"data-test-subj":`UnblockedItem-${item}`},item))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),!!blockedItems.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",iconType:"alert",size:"s",title:`${blockedWording}`},external_osdSharedDeps_React_default.a.createElement("p",null),external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},blockedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item,"data-test-subj":`BlockedItem-${item}`},item))))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"refreshConfirmButton",onClick:onConfirm,fill:true},"Refresh")))}function IndicesActions(props){const{selectedItems:selectedItems,onDelete:onDelete,onClose:onClose}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[closeIndexModalVisible,setCloseIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[clearCacheModalVisible,setClearCacheModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[openIndexModalVisible,setOpenIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[flushIndexModalVisible,setFlushIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[refreshModalVisible,setRefreshModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};const onDeleteIndexModalConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{const indexPayload=selectedItems.map(item=>item.index).join(",");const result=await services.commonService.apiCaller({endpoint:"indices.delete",data:{index:indexPayload}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`Delete [${indexPayload}] successfully`);onDeleteIndexModalClose();onDelete()}else{coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}},[selectedItems,services,coreServices,onDelete,onDeleteIndexModalClose]);const onClearCacheModalClose=()=>{setClearCacheModalVisible(false)};const onOpenIndexModalClose=()=>{setOpenIndexModalVisible(false)};const openIndicesHandler=async(indices,callback)=>{const result=await openIndices({commonService:services.commonService,coreServices:coreServices,indices:indices});if(result.ok){callback&&callback()}};const onOpenIndexModalConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{await openIndicesHandler(selectedItems.map(item=>item.index),()=>{onOpenIndexModalClose()})},[services,coreServices,props.onClose,onOpenIndexModalClose]);const onCloseIndexModalClose=()=>{setCloseIndexModalVisible(false)};const onCloseIndexModalConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{try{const indexPayload=selectedItems.map(item=>item.index).join(",");const result=await services.commonService.apiCaller({endpoint:"indices.close",data:{index:indexPayload}});if(result&&result.ok){onCloseIndexModalClose();coreServices.notifications.toasts.addSuccess(`Close [${indexPayload}] successfully`);onClose()}else{coreServices.notifications.toasts.addDanger(result.error)}}catch(err){coreServices.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem closing index."))}},[services,coreServices,props.onClose,onCloseIndexModalClose]);const onFlushIndexModalClose=()=>{setFlushIndexModalVisible(false)};const onRefreshModalClose=()=>{setRefreshModalVisible(false)};const renderKey=Object(external_osdSharedDeps_React_["useMemo"])(()=>Date.now(),[selectedItems]);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");const size=useUpdatedUX?"s":undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow}=_ref;return external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{"data-test-subj":"moreAction",panelPaddingSize:"s",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right"},"Actions")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,size:"s",key:renderKey,panels:[{id:0,items:[{name:"Apply policy",disabled:!selectedItems.length,"data-test-subj":"Apply policyButton",onClick:()=>onShow(components_ApplyPolicyModal,{indices:selectedItems.map(item=>item.index),core:core_services["b"]})},{isSeparator:true},{name:"Close",disabled:!selectedItems.length,"data-test-subj":"Close Action",onClick:()=>setCloseIndexModalVisible(true)},{name:"Open",disabled:!selectedItems.length,"data-test-subj":"Open Action",onClick:()=>setOpenIndexModalVisible(true)},{isSeparator:true},{name:"Reindex","data-test-subj":"Reindex Action",onClick:()=>{let source="";if(selectedItems.length>0){source=`?source=${selectedItems.map(item=>item.index).join(",")}`}props.history.push(`${constants["D"].REINDEX}${source}`)}},{name:"Shrink",disabled:!selectedItems.length||selectedItems.length>1||!!selectedItems[0].data_stream,"data-test-subj":"Shrink Action",onClick:()=>{let source="";if(selectedItems.length>0){source=`?source=${selectedItems[0].index}`}props.history.push(`${constants["D"].SHRINK_INDEX}${source}`)}},{name:"Split","data-test-subj":"Split Action",disabled:!selectedItems.length||selectedItems.length>1||selectedItems[0].data_stream!==null,onClick:()=>{const source=`?source=${selectedItems[0].index}`;props.history.push(`${constants["D"].SPLIT_INDEX}${source}`)}},{name:"Force merge","data-test-subj":"ForceMergeAction",onClick:()=>{props.history.push(`${constants["D"].FORCE_MERGE}/${selectedItems.map(item=>item.index).join(",")}`)}},{isSeparator:true},{name:"Clear cache","data-test-subj":"Clear cache Action",onClick:()=>setClearCacheModalVisible(true)},{name:"Flush","data-test-subj":"Flush Action",onClick:()=>setFlushIndexModalVisible(true)},{name:"Refresh","data-test-subj":"Refresh Index Action",onClick:()=>setRefreshModalVisible(true)},{isSeparator:true},{name:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteAction",onClick:()=>setDeleteIndexModalVisible(true)}]}]}))}),external_osdSharedDeps_React_default.a.createElement(components_DeleteIndexModal,{selectedItems:selectedItems.map(item=>item.index),visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onConfirm:onDeleteIndexModalConfirm}),external_osdSharedDeps_React_default.a.createElement(components_OpenIndexModal,{selectedItems:selectedItems.map(item=>item.index),visible:openIndexModalVisible,onClose:onOpenIndexModalClose,onConfirm:onOpenIndexModalConfirm}),external_osdSharedDeps_React_default.a.createElement(components_CloseIndexModal,{selectedItems:selectedItems.map(item=>item.index),visible:closeIndexModalVisible,onClose:onCloseIndexModalClose,onConfirm:onCloseIndexModalConfirm}),external_osdSharedDeps_React_default.a.createElement(containers_ClearCacheModal,{selectedItems:selectedItems,visible:clearCacheModalVisible,onClose:onClearCacheModalClose,type:constants["u"].INDEX}),external_osdSharedDeps_React_default.a.createElement(containers_FlushIndexModal,{selectedItems:selectedItems,visible:flushIndexModalVisible,onClose:onFlushIndexModalClose,flushTarget:constants["u"].INDEX}),external_osdSharedDeps_React_default.a.createElement(RefreshActionModal,{selectedItems:selectedItems,visible:refreshModalVisible,onClose:onRefreshModalClose,type:constants["u"].INDEX}))}function IndexControls_defineProperty(e,r,t){return(r=IndexControls_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IndexControls_toPropertyKey(t){var i=IndexControls_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function IndexControls_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class IndexControls_IndexControls extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);IndexControls_defineProperty(this,"state",{refreshInterval:0,isPaused:true});IndexControls_defineProperty(this,"onRefreshChange",_ref=>{let{refreshInterval:refreshInterval,isPaused:isPaused}=_ref;this.setState({isPaused:isPaused,refreshInterval:refreshInterval})});
6IndexControls_defineProperty(this,"getDataStreams",async()=>(await this.props.getDataStreams()).map(ds=>({value:ds.name})))}render(){const{search:search,onSearchChange:onSearchChange,showDataStreams:showDataStreams,toggleShowDataStreams:toggleShowDataStreams,onRefresh:onRefresh,selectedItems:selectedItems,history:history}=this.props;const schema={strict:true,fields:{indices:{type:"string"},data_streams:{type:"string"}}};const filters=showDataStreams?[{type:"field_value_selection",field:"data_streams",name:"Data streams",noOptionsMessage:"No data streams found",multiSelect:"or",cache:6e4,options:()=>this.getDataStreams()}]:undefined;const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSearchBar"],{compressed:true,query:search,box:{placeholder:"Search",schema:schema,incremental:true,compressed:true},onChange:onSearchChange,filters:filters})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh","data-test-subj":"refreshButton",display:"base",size:"s",onClick:onRefresh}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(IndicesActions,{history:this.props.history,onDelete:onRefresh,onClose:onRefresh,onShrink:onRefresh,selectedItems:selectedItems,getIndices:onRefresh})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Show data stream indexes",checked:showDataStreams,onChange:toggleShowDataStreams,"data-test-subj":"toggleShowDataStreams"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"},alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSearchBar"],{compressed:true,query:search,box:{placeholder:"Search",schema:schema,incremental:true},onChange:onSearchChange,filters:filters})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Show data stream indexes",checked:showDataStreams,onChange:toggleShowDataStreams,"data-test-subj":"toggleShowDataStreams"})))}}var components_IndexControls=IndexControls_IndexControls;const IndexEmptyPrompt_TEXT={RESET_FILTERS:"There are no indices matching your applied filters. Reset your filters to view your indices.",NO_INDICES:"There are no existing indices. Create an index to view it here.",LOADING:"Loading indices..."};const IndexEmptyPrompt_getMessagePrompt=_ref=>{let{filterIsApplied:filterIsApplied,loading:loading}=_ref;if(loading)return IndexEmptyPrompt_TEXT.LOADING;if(filterIsApplied)return IndexEmptyPrompt_TEXT.RESET_FILTERS;return IndexEmptyPrompt_TEXT.NO_INDICES};const IndexEmptyPrompt_getActions=_ref2=>{let{filterIsApplied:filterIsApplied,loading:loading,resetFilters:resetFilters}=_ref2;if(loading){return null}if(filterIsApplied){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:resetFilters,"data-test-subj":"indexEmptyPromptResetFilters"},"Reset Filters")}return null};const IndexEmptyPrompt=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,IndexEmptyPrompt_getMessagePrompt(props))),actions:IndexEmptyPrompt_getActions(props)});var IndexEmptyPrompt_IndexEmptyPrompt=IndexEmptyPrompt;var components_IndexEmptyPrompt=IndexEmptyPrompt_IndexEmptyPrompt;var JobHandler=__webpack_require__(25);var containers_Indices=__webpack_require__(473);var messages={default:"%s verification failed",required:"%s is a required field",format:{number:"%s is not a legal number",email:"%s is not a valid email address",url:"%s is not a valid URL address",tel:"%s is not a valid phone number"},number:{length:"%s length must be %s",min:"%s field value must not be less than %s",max:"%s field value must not be greater than %s",minLength:"%s field character length must be at least %s",maxLength:"%s field character length cannot exceed %s"},string:{length:"%s length must be %s",min:"%s field value must not be less than %s",max:"%s field value must not be greater than %s",minLength:"%s field character length must be at least %s",maxLength:"%s field character length cannot exceed %s"},array:{length:"%s length must be %s",minLength:"%s must not be less than %s",maxLength:"%s must not exceed %s"},pattern:"%s field value %s does not match the regular %s"};const formatRegExp=/%[sdj%]/g;function format(){for(var _len=arguments.length,args=new Array(_len),_
6key=0;_key<_len;_key++){args[_key]=arguments[_key]}let i=1;const f=args[0];const len=args.length;if(typeof f==="string"){const str=String(f).replace(formatRegExp,x=>{if(x==="%%"){return"%"}if(i>=len){return x}switch(x){case"%s":return String(args[i++]);case"%d":return`${Number(args[i++])}`;case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});return str}return f}const rules_pattern={email:/[\wä¸-é¾¥]+([-+.][\wä¸-é¾¥]+)*@[\wä¸-é¾¥]+([-.][\wä¸-é¾¥]+)*\.[\wä¸-é¾¥]+([-.][\wä¸-é¾¥]+)*/,url:/^(?:(?:http|https|ftp):\/\/|\/\/)(?:(?:(?:[-\w¡-ï¿¿]+)(?:\.[-\w¡-ï¿¿]+)+|localhost)(?::\d{2,5})?(?:(?:\/|#)[^\s]*)?)$/,number:/\d*/,tel:/^(1\d{10})$|(((400)-(\d{3})-(\d{4}))|^((\d{7,8})|(\d{3,4})-(\d{7,8})|(\d{7,8})-(\d{1,4}))$)$|^([ ]?)$/};const types={number(value){if(isNaN(value)){return false}return typeof value==="number"||typeof value==="string"&&!!value.match(rules_pattern.number)},email(value){return typeof value==="string"&&!!value.match(rules_pattern.email)&&value.length<255},url(value){return typeof value==="string"&&!!value.match(rules_pattern.url)},tel(value){return typeof value==="string"&&!!value.match(rules_pattern.tel)}};const rules_rules={required:(rule,value)=>{if(value===undefined||value===null||value===""||value.length===0){return format(rule.message||messages.required,rule.aliasName||rule.field)}},format:(rule,value)=>{const custom=["email","number","url","tel"];const ruleType=rule.format;if(ruleType&&custom.indexOf(ruleType)>-1&&!types[ruleType](value)){return format(rule.message||messages.format[ruleType],rule.aliasName||rule.field,ruleType)}},size:(rule,value)=>{let key=null;const isNum=typeof value==="number";const isStr=typeof value==="string";if(value===""){return""}if(isNum){key="number"}else if(isStr){key="string"}if(!key){return false}if(typeof rule.min==="number"||typeof rule.max==="number"){let val=value;const max=Number(rule.max);const min=Number(rule.min);if(isStr){val=Number(val)}if(val<min){return format(rule.message||messages[key].min,rule.aliasName||rule.field,""+rule.min)}else if(val>max){return format(rule.message||messages[key].max,rule.aliasName||rule.field,""+rule.max)}}},pattern:(rule,value)=>{if(rule.pattern){if(rule.pattern instanceof RegExp){if(!rule.pattern.test(value||"")){return format(rule.message||messages.pattern,rule.aliasName||rule.field,value,rule.pattern.toString())}}else if(typeof rule.pattern==="string"){const _pattern=new RegExp(rule.pattern);if(!_pattern.test(value||"")){return format(rule.message||messages.pattern,rule.aliasName||rule.field,value,rule.pattern)}}}}};var field_rules=rules_rules;function transformNameToString(name){if(Array.isArray(name)){return name.join(".")}else{return name}}function useField(options){const[,setValuesState]=Object(external_osdSharedDeps_React_["useState"])((options===null||options===void 0?void 0:options.values)||{});const[,setOriginalValuesState]=Object(external_osdSharedDeps_React_["useState"])((options===null||options===void 0?void 0:options.values)||{});const[,setErrorsState]=Object(external_osdSharedDeps_React_["useState"])({});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const values=Object(external_osdSharedDeps_React_["useRef"])((options===null||options===void 0?void 0:options.values)||{});const errors=Object(external_osdSharedDeps_React_["useRef"])({});const originalValuesRef=Object(external_osdSharedDeps_React_["useRef"])((options===null||options===void 0?void 0:options.originalValues)||{});const fieldsMapRef=Object(external_osdSharedDeps_React_["useRef"])({});const setValues=obj=>{if(destroyRef.current){return}values.current={...values.current,...obj};setValuesState(values.current)};const resetValues=obj=>{if(destroyRef.current){return}values.current=obj;setValuesState(values.current)};const setValue=(name,value)=>{const payload={...values.current};if(!Array.isArray(name)){name=[name]}Object(external_osdSharedDeps_Lodash_["set"])(payload,name,value);setValues(payload)};const setErrors=errs=>{if(destroyRef.current){return}errors.current=errs;setErrorsState(errors.current)};const setError=(name,error)=>{setErrors({...errors.current,[transformNameToString(name)]:error})};const validateField=async name=>{const fieldOptions=fieldsMapRef.current[transformNameToString(name)];const rules=fieldOptions.rules||[];const result=await Promise.all(rules.map(async item=>{let validateFunction=()=>undefined;if(item.validator){validateFunction=item.validator}else if(item.required){validateFunction=field_rules.required}else if(item.format){validateFunction=field_rules.format}else if(typeof item.min==="number"||typeof item.max==="number"){validateFunction=field_rules.size}else if(item.pattern){validateFunction=field_rules.pattern}let errorInfo=null;try{const result=validateFunction({...item,field:transformNameToString(name)},Object(external_osdSharedDeps_Lodash_["get"])(values.current,name));if(result&&result.then){await result}else{errorInfo=result}}catch(e){errorInfo=e||item.message}return errorInfo}));const fieldErrors=result.filter(item=>item);return fieldErrors};Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>
6{destroyRef.current=true},[]);const refCallbacks=Object(external_osdSharedDeps_React_["useRef"])({});return{registerField:initOptions=>{const fieldName=transformNameToString(initOptions.name);fieldsMapRef.current[fieldName]=initOptions;const payload={...initOptions.props,value:Object(external_osdSharedDeps_Lodash_["get"])(values.current,initOptions.name),onChange:async val=>{var _options$onBeforeChan,_options$onChange;options===null||options===void 0||(_options$onBeforeChan=options.onBeforeChange)===null||_options$onBeforeChan===void 0||_options$onBeforeChan.call(options,initOptions.name,val);setValue(initOptions.name,val);options===null||options===void 0||(_options$onChange=options.onChange)===null||_options$onChange===void 0||_options$onChange.call(options,initOptions.name,val);const validateErros=await validateField(initOptions.name);setError(initOptions.name,validateErros.length?validateErros:null)}};if(options!==null&&options!==void 0&&options.unmountComponent){if(!refCallbacks.current[fieldName]){refCallbacks.current[fieldName]=ref=>{if(!ref){delete fieldsMapRef.current[fieldName];delete refCallbacks.current[fieldName]}}}payload.ref=refCallbacks.current[fieldName]}return payload},setValue:setValue,setValues:setValues,getValue:name=>Object(external_osdSharedDeps_Lodash_["get"])(values.current,name),getValues:()=>values.current,getError:name=>errors.current[transformNameToString(name)],getErrors:()=>Object.entries(errors.current||{}).reduce((total,_ref)=>{let[key,value]=_ref;if(value){return{...total,[key]:value}}return total},{}),validatePromise:async()=>{const result=await Promise.all(Object.values(fieldsMapRef.current).map(_ref2=>{let{name:name}=_ref2;return validateField(name).then(res=>{if(res.length){return{[transformNameToString(name)]:res}}return null})}));const resultArray=result.filter(item=>item);const resultPayload=resultArray.reduce((total,current)=>({...total,...current}),{});setErrors(resultPayload);return{errors:resultArray.length?resultPayload:null,values:values.current}},setError:setError,setErrors:setErrors,resetValues:resetValues,deleteValue:key=>{const newValues={...values.current};Object(external_osdSharedDeps_Lodash_["unset"])(newValues,key);resetValues(newValues)},setOriginalValues:obj=>{originalValuesRef.current=obj;setOriginalValuesState(originalValuesRef.current)},getOriginalValues:()=>originalValuesRef.current,computeDifference:()=>{const originalValues=getOrderedJson(originalValuesRef.current);const currentValues=getOrderedJson(values.current);return Object(helpers["a"])(originalValues,currentValues)}}}var external_osdSharedDeps_ReactDom_=__webpack_require__(23);let ActionType=function(ActionType){ActionType["REINDEX"]="REINDEX";ActionType["RESIZE"]="RESIZE";ActionType["FORCEMERGE"]="FORCEMERGE";ActionType["OPEN"]="OPEN";return ActionType}({});let OperationType=function(OperationType){OperationType["REINDEX"]="REINDEX";OperationType["FORCEMERGE"]="FORCEMERGE";OperationType["OPEN"]="OPEN";OperationType["SHRINK"]="SHRINK";OperationType["CLONE"]="CLONE";OperationType["SPLIT"]="SPLIT";return OperationType}({});const ActionTypeMapTitle={[ActionType.REINDEX]:"reindex",[ActionType.RESIZE]:"shrink, split, clone",[ActionType.FORCEMERGE]:"force merge",[ActionType.OPEN]:"open"};const ActionTypeMapDescription={[ActionType.REINDEX]:"Notify when any reindex operation has failed or completed.",[ActionType.RESIZE]:"Notify when any shrink, split, or clone operation has failed or completed.",[ActionType.FORCEMERGE]:"Notify when any force merge operation has failed or completed.",[ActionType.OPEN]:"Notify when any open operation has failed or completed."};const OperationTypeMapTitle={...ActionTypeMapTitle,[OperationType.SHRINK]:"shrink",[OperationType.SPLIT]:"split",[OperationType.CLONE]:"clone"};const ActionTypeMapName={[ActionType.REINDEX]:"indices:data/write/reindex",[ActionType.RESIZE]:"indices:admin/resize",[ActionType.FORCEMERGE]:"indices:admin/forcemerge",[ActionType.OPEN]:"indices:admin/open"};const getKeyByValue=(obj,value)=>{if(!obj){return undefined}return Object.keys(obj).find(key=>obj[key]===value)};let FieldEnum=function(FieldEnum){FieldEnum["channels"]="channels";FieldEnum["failure"]="failure";FieldEnum["success"]="success";return FieldEnum}({});const FieldMapLabel={[FieldEnum.channels]:"Notification channels"};const LABEL_FOR_CONDITION="Notify when operation";const VALIDATE_ERROR_FOR_CHANNELS="One or more channels is required.";const transformConfigListToPlainList=config=>Object.entries(ActionTypeMapName).map((_ref,index)=>{let[actionType,action_name]=_ref;const findItem=config.find(c=>c.action_name===action_name)||{lron_condition:{failure:false,success:false},action_name:action_name,channels:[]};const{lron_condition:lron_condition,...rest}=findItem;return{...lron_condition,...rest,index:index,title:actionType?ActionTypeMapTitle[actionType]:""}});const transformPlainListToConfigList=config=>Object.entries(ActionTypeMapName).map((_ref2,currentIndex)=>{let[actionType,action_name]=_ref2;const findItem=config.find(c=>c.action_name===action_name)||{failure:false,success:false,action_name:action_name,title:ActionTypeMapTitle[actionType],channels:[],index:currentIndex};const{failure:failure,success:success,index:index,title:title,...rest}=findItem;return{...rest,lron_condition:{failure:failure,success:success}}});const getComputedResultFromPlainList=plainConfigs=>({useDifferentSettings:!Object.values(ActionTypeMapName).every(c=>{const findItem=plainConfigs.find(p=>p.action_name===c)||{};return findItem.success===plainConfigs[0].failure&&findItem.success===plainConfigs[0].success})});const getDiffableMapFromPlainList=plainConfigs=>plainConfigs.reduce((total,current)=>({...total,[current.action_name]:current}),{});const submitNotifications=async props=>Promise.all(transformPlainListToConfigList(props.plainConfigsPayload).map(item=>{const{action_name:action_name}=item;return props.commonService.apiCaller({endpoint:"transport.request",data:{method:"PUT",path:`/_plugins/_im/lron/${encodeURIComponent(`LRON:${action_name}`)}`,body:{lron_config:item}}})})).then(allResults=>({ok:allResults.every(item=>item.ok),body:allResults.filter(item=>item.body).map(item=>item.body),error:allResults.filter(item=>!item.ok).map(item=>item.error).join(", ")}));const getNotifications=async props=>props.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:"/_plugins/_im/lron"}}).then(res=>{var _res$body;if(res.ok){return res}else if(((_res$body=res.body)===null||_res$body===void 0||(_res$body=_res$body.error)===null||_res$body===void 0?void 0:_res$body.type)==="index_not_found_exception"){return{ok:true,response:{lron_configs:[],total_number:0},error:"",body:{}}}else{return res}});let listenCount=0;let promise=undefined;const LISTEN_KEY="GET_CHANNELS_LISTEN";const hooks_getChannels=async props=>{if(promise){return await promise}try{promise=props.services.notificationService.getChannels();const result=await promise;window.dispatchEvent(new CustomEvent(LISTEN_KEY));return result}catch(err){return Promise.reject(err)}};const useChannels=()=>{const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const[channels,setChannels]=Object(external_osdSharedDeps_React_["useState"])([]);const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(true);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const refresh=Object(external_osdSharedDeps_React_["useCallback"])(force=>{setLoading(true);hooks_getChannels({services:services,force:force}).then(res=>{if(destroyRef.current){return}if(res&&res.ok){setChannels(res.response.channel_list)}}).finally(()=>
6{if(destroyRef.current){return}setLoading(false)})},[]);const listenHandler=Object(external_osdSharedDeps_React_["useCallback"])(()=>{refresh()},[refresh]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{refresh();return()=>{destroyRef.current=true}},[]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{window.addEventListener(LISTEN_KEY,listenHandler);listenCount++;return()=>{window.removeEventListener(LISTEN_KEY,listenHandler);listenCount--;if(listenCount===0){promise=undefined}}},[listenHandler]);return{channels:channels,loading:loading,refresh:refresh}};function ToolTipWithoutWarning_defineProperty(e,r,t){return(r=ToolTipWithoutWarning_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ToolTipWithoutWarning_toPropertyKey(t){var i=ToolTipWithoutWarning_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ToolTipWithoutWarning_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ToolTipWithoutWarning_ToolTipWithoutWarning extends external_osdSharedDeps_ElasticEui_["EuiToolTip"]{constructor(){super(...arguments);ToolTipWithoutWarning_defineProperty(this,"newTimeoutId",void 0);ToolTipWithoutWarning_defineProperty(this,"showToolTip",()=>{if(!this.newTimeoutId){this.newTimeoutId=setTimeout(()=>{if(this._isMounted){this.setState({visible:true})}},0)}});ToolTipWithoutWarning_defineProperty(this,"clearAnimationTimeout",()=>{if(this.newTimeoutId){this.newTimeoutId=clearTimeout(this.newTimeoutId)}})}}function EuiToolTipWrapper_extends(){return EuiToolTipWrapper_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},EuiToolTipWrapper_extends.apply(null,arguments)}function EuiToolTipWrapper(Component,options){return Object(external_osdSharedDeps_React_["forwardRef"])((_ref,ref)=>{var _formattedReason,_formattedReason2,_formattedReason3,_formattedReason4;let{disabledReason:disabledReason,children:children,...others}=_ref;const finalOptions={...{disabledKey:"disabled"},...options};let formattedReason;if(typeof disabledReason==="string"){formattedReason=[{visible:true,message:disabledReason}]}else{formattedReason=disabledReason}formattedReason=(_formattedReason=formattedReason)===null||_formattedReason===void 0?void 0:_formattedReason.filter(item=>item.visible&&item.message);const propsDisabled=others[finalOptions.disabledKey];const disabled=propsDisabled===undefined?!!((_formattedReason2=formattedReason)!==null&&_formattedReason2!==void 0&&_formattedReason2.length):propsDisabled;const finalProps={...others,[finalOptions.disabledKey]:disabled};return external_osdSharedDeps_React_default.a.createElement(ToolTipWithoutWarning_ToolTipWithoutWarning,{content:disabled&&(_formattedReason3=formattedReason)!==null&&_formattedReason3!==void 0&&_formattedReason3.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"This field is disabled because:",external_osdSharedDeps_React_default.a.createElement("ol",null,(_formattedReason4=formattedReason)===null||_formattedReason4===void 0?void 0:_formattedReason4.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("li",{style:{display:"flex"},key:item.message},external_osdSharedDeps_React_default.a.createElement("span",{style:{width:"1.5em",textAlign:"right"}},index+1,"."),external_osdSharedDeps_React_default.a.createElement("span",null,item.message))))):undefined,display:"block",position:"right"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(Component,EuiToolTipWrapper_extends({},finalProps,{ref:ref}))))})}function ComboBoxWithoutWarning_defineProperty(e,r,t){return(r=ComboBoxWithoutWarning_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ComboBoxWithoutWarning_toPropertyKey(t){var i=ComboBoxWithoutWarning_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ComboBoxWithoutWarning_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ComboBoxWithoutWarning_ComboBoxWithoutWarning extends external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"]{constructor(props){super(props);ComboBoxWithoutWarning_defineProperty(this,"memoriedCloseList",void 0);this.memoriedCloseList=this.closeList;this.closeList=event=>{if(this._isMounted){this.memoriedCloseList.call(this,event)}}}}function built_in_components_extends(){return built_in_components_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},built_in_components_extends.apply(null,arguments)}let globalId=0;const componentMap={Input:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref,ref)=>{let{onChange:onChange,value:value,removeWhenEmpty:removeWhenEmpty,...others}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],built_in_components_extends({inputRef:ref,value:value||"",onChange:e=>onChange(e.target.value?e.target.value:removeWhenEmpty?undefined:e.target.value)},others))})),Number:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref2,ref)=>{let{onChange:onChange,value:value,removeWhenEmpty:removeWhenEmpty,...others}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],built_in_components_extends({inputRef:ref,onCh
6ange:e=>onChange(e.target.value?e.target.value:removeWhenEmpty?undefined:e.target.value),value:value===undefined?"":value},others))})),Switch:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref3,ref)=>{let{value:value,onChange:onChange,...others}=_ref3;return external_osdSharedDeps_React_default.a.createElement("div",{ref:ref},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],built_in_components_extends({showLabel:false,label:"",checked:value||false,onChange:e=>onChange(e.target.checked)},others)))})),Text:Object(external_osdSharedDeps_React_["forwardRef"])((_ref4,ref)=>{let{value:value}=_ref4;return external_osdSharedDeps_React_default.a.createElement("div",{ref:ref},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{title:value||"-"},value||"-"))}),Select:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref5,ref)=>{let{onChange:onChange,value:value,...others}=_ref5;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],built_in_components_extends({inputRef:ref,onChange:e=>onChange(e.target.value),value:value||""},others))})),CheckBox:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref6,ref)=>{let{onChange:onChange,value:value,...others}=_ref6;const idRef=Object(external_osdSharedDeps_React_["useRef"])(globalId++);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],built_in_components_extends({ref:ref,id:`builtInCheckBoxId-${idRef.current}`,checked:value===undefined?false:value,onChange:e=>onChange(e.target.checked)},others))})),ComboBoxSingle:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref7,ref)=>{let{onChange:onChange,value:value,options:options,...others}=_ref7;return external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,built_in_components_extends({onCreateOption:searchValue=>{const allOptions=options.reduce((total,current)=>{if(current.options){return[...total,...current.options]}else{return[...total,current]}},[]);const findItem=allOptions.find(item=>item.label===searchValue);if(findItem){onChange(searchValue)}}},others,{options:options,singleSelection:{asPlainText:true},ref:ref,onChange:selectedOptions=>{if(selectedOptions&&selectedOptions[0]){onChange(selectedOptions[0].label,selectedOptions[0])}else{onChange(undefined)}},selectedOptions:[value].filter(item=>item!==undefined).map(label=>({label:`${label}`}))}))})),ComboBoxMultiple:EuiToolTipWrapper(Object(external_osdSharedDeps_React_["forwardRef"])((_ref8,ref)=>{let{onChange:onChange,value:value,...others}=_ref8;return external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,built_in_components_extends({onCreateOption:searchValue=>{const allOptions=others.options.reduce((total,current)=>{if(current.options){return[...total,...current.options]}else{return[...total,current]}},[]);const findItem=allOptions.find(item=>item.label===searchValue);if(findItem){onChange([...value||[],searchValue],[...allOptions.filter(item=>value===null||value===void 0?void 0:value.includes(item.label)),{label:searchValue}])}}},others,{ref:ref,onChange:selectedOptions=>{onChange(selectedOptions.map(item=>item.value),selectedOptions)},selectedOptions:(value||[]).map(item=>others.options.find(option=>option.value===item)||{label:item,value:item}).filter(item=>item!==undefined)}))}))};var built_in_components=componentMap;var JSONEditor=__webpack_require__(47);var MonacoJSONEditor=__webpack_require__(61);var JSONDiffEditor=__webpack_require__(168);var SwitchableEditor=__webpack_require__(499);function SwitchableEditor_extends(){return SwitchableEditor_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SwitchableEditor_extends.apply(null,arguments)}const SwitchableEditor_SwitchableEditor=Object(external_osdSharedDeps_React_["forwardRef"])((_ref,ref)=>{let{mode:mode,diagnosticsOptions:diagnosticsOptions,path:path,...others}=_ref;const[checked,setChecked]=Object(external_osdSharedDeps_React_["useState"])(false);const editorRef=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({getValue:()=>{var _editorRef$current;return((_editorRef$current=editorRef.current)===null||_editorRef$current===void 0?void 0:_editorRef$current.getValue())||""},setValue:function(){var _editorRef$current2;
6for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return(_editorRef$current2=editorRef.current)===null||_editorRef$current2===void 0?void 0:_editorRef$current2.setValue(...args)},validate:()=>{var _editorRef$current3;return((_editorRef$current3=editorRef.current)===null||_editorRef$current3===void 0?void 0:_editorRef$current3.validate())||Promise.resolve("Not ready")}}));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,mode==="diff"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSwitch"],{label:"Compare previously saved settings",checked:checked,onChange:async e=>{var _editorRef$current4;const targetChecked=e.target.checked;const validateResult=await((_editorRef$current4=editorRef.current)===null||_editorRef$current4===void 0?void 0:_editorRef$current4.validate());if(!validateResult){setChecked(targetChecked)}}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,checked?diagnosticsOptions?external_osdSharedDeps_React_default.a.createElement(MonacoJSONEditor["a"],SwitchableEditor_extends({path:path},others,{ref:ref})):external_osdSharedDeps_React_default.a.createElement(JSONDiffEditor["a"],SwitchableEditor_extends({},others,{ref:editorRef})):external_osdSharedDeps_React_default.a.createElement(JSONEditor["a"],SwitchableEditor_extends({},others,{ref:editorRef})))});var components_SwitchableEditor_SwitchableEditor=SwitchableEditor_SwitchableEditor;var components_SwitchableEditor=components_SwitchableEditor_SwitchableEditor;var CustomFormRow=__webpack_require__(13);var AdvancedSettings=__webpack_require__(512);function AdvancedSettings_extends(){return AdvancedSettings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},AdvancedSettings_extends.apply(null,arguments)}function AdvancedSettings_AdvancedSettings(props,ref){var _props$accordionProps2;const{value:value,renderProps:renderProps,editorProps:editorProps}=props;const propsRef=Object(external_osdSharedDeps_React_["useRef"])(props);const editorRef=Object(external_osdSharedDeps_React_["useRef"])(null);propsRef.current=props;const onChangeInRenderProps=Object(external_osdSharedDeps_React_["useCallback"])(val=>{var _editorRef$current;let parsedValue=JSON.parse(val);if(editorProps!==null&&editorProps!==void 0&&editorProps.formatValue){parsedValue=editorProps.formatValue(parsedValue)}(_editorRef$current=editorRef.current)===null||_editorRef$current===void 0||_editorRef$current.setValue(JSON.stringify(parsedValue,null,2));propsRef.current.onChange&&propsRef.current.onChange(parsedValue)},[props.onChange]);const accordionId=Object(external_osdSharedDeps_React_["useMemo"])(()=>{var _props$accordionProps;return((_props$accordionProps=props.accordionProps)===null||_props$accordionProps===void 0?void 0:_props$accordionProps.id)||`${Date.now()}-${Math.floor(Math.random()*100)}`},[(_props$accordionProps2=props.accordionProps)===null||_props$accordionProps2===void 0?void 0:_props$accordionProps2.id]);Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({validate:()=>{if(editorRef.current){return editorRef.current.validate()}return Promise.resolve("")},setValue:val=>{var _editorRef$current2;(_editorRef$current2=editorRef.current)===null||_editorRef$current2===void 0||_editorRef$current2.setValue(JSON.stringify(val||{},null,2))}}));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],AdvancedSettings_extends({},props.accordionProps,{className:"accordion-in-advanced-settings",id:accordionId}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],props.rowProps,renderProps?renderProps({value:propsRef.current.value||{},onChange:val=>{var _propsRef$current;if((_propsRef$current=propsRef.current)!==null&&_propsRef$current!==void 0&&_propsRef$current.onChange){var _propsRef$current2;(_propsRef$current2=propsRef.current)===null||_propsRef$current2===void 0||_propsRef$current2.onChange(val)}},ref:editorRef}):external_osdSharedDeps_React_default.a.createElement(components_SwitchableEditor,AdvancedSettings_extends({mode:"json"},editorProps,{ref:editorRef,value:JSON.stringify(value,null,2),onChange:onChangeInRenderProps}))))}var components_AdvancedSettings=Object(external_osdSharedDeps_React_["forwardRef"])(AdvancedSettings_AdvancedSettings);function FormGenerator_extends(){return FormGenerator_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},FormGenerator_extends.apply(null,arguments)}function FormGenerator(props,ref){var _props$advancedSettin;const{fieldProps:fieldProps,formFields:formFields,advancedSettingsProps:advancedSettingsProps}=props;const{blockedNameList:blockedNameList}=advancedSettingsProps||{};const propsRef=Object(external_osdSharedDeps_React_["useRef"])(props);const advancedRef=Object(external_osdSharedDeps_React_["useRef"])(null);propsRef.current=props;const field=useField({...fieldProps,onChange(name,value){propsRef.current.onChange&&propsRef.current.onChange({...field.getValues()},name,value)}});const errorMessage=field.getErrors();Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({...field,validatePromise:async()=>{var _advancedRef$current;const result=await field.validatePromise();if((_advancedRef$current=advancedRef.current)!==null&&_advancedRef$current!==void 0&&_advancedRef$current.validate){try{await advancedRef.current.validate()}catch(e){result.errors=result.errors||{};result.errors._advancedSettings=[e]}}return result}}));Object(external_osdSharedDeps_React_["useEffect"])(()=>
6{if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(field.getValues(),props.value)){if(propsRef.current.resetValuesWhenPropsValueChange){field.resetValues(props.value)}else{field.setValues(props.value)}}},[props.value]);const formattedFormFields=Object(external_osdSharedDeps_React_["useMemo"])(()=>formFields.map(item=>{const{rules:rules}=item.options||{};let arrayedRules;if(rules){arrayedRules=rules}else{arrayedRules=[]}const formattedRules=arrayedRules.map(ruleItem=>{if(ruleItem.validator){return{...ruleItem,validator:(rule,value)=>{var _ruleItem$validator;return(_ruleItem$validator=ruleItem.validator)===null||_ruleItem$validator===void 0?void 0:_ruleItem$validator.apply(field,[rule,value,field.getValues()])}}}return ruleItem});return{...item,options:{...item.options,rules:formattedRules}}}),[formFields,field]);const finalValue=Object(external_osdSharedDeps_React_["useMemo"])(()=>{const value=field.getValues();if(!blockedNameList){return field.getValues()}return Object(external_osdSharedDeps_Lodash_["omit"])(value,blockedNameList)},[field.getValues(),blockedNameList]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],props.formProps,formattedFormFields.map(item=>{const RenderComponent=item.type?built_in_components[item.type]:item.component||(()=>null);return external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],FormGenerator_extends({"data-test-subj":`form-name-${item.name}`,key:transformNameToString(item.name)},item.rowProps,{error:errorMessage[transformNameToString(item.name)],isInvalid:!!errorMessage[transformNameToString(item.name)]}),external_osdSharedDeps_React_default.a.createElement(RenderComponent,field.registerField({...item.options,name:item.name})))}),props.hasAdvancedSettings?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_AdvancedSettings,FormGenerator_extends({},props.advancedSettingsProps,{ref:advancedRef,rowProps:{"data-test-subj":"formNameAdvancedSettings",...(_props$advancedSettin=props.advancedSettingsProps)===null||_props$advancedSettin===void 0?void 0:_props$advancedSettin.rowProps},value:finalValue,onChange:val=>{var _advancedRef$current2;const totalValue=field.getValues();const editorValue=Object(external_osdSharedDeps_Lodash_["omit"])(val||{},blockedNameList||[]);const resetValue={...editorValue,...Object(external_osdSharedDeps_Lodash_["pick"])(totalValue,blockedNameList||[])};field.resetValues(resetValue);(_advancedRef$current2=advancedRef.current)===null||_advancedRef$current2===void 0||_advancedRef$current2.setValue(editorValue);if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(val,finalValue)){field.validatePromise()}propsRef.current.onChange&&propsRef.current.onChange(field.getValues(),undefined,editorValue)}}))):null)}var components_FormGenerator=Object(external_osdSharedDeps_React_["forwardRef"])(FormGenerator);var ChannelSelect=__webpack_require__(525);const ChannelSelect_ChannelSelect=props=>{const{value:value,onChange:onChange}=props;const{channels:channels,loading:loading}=useChannels();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{"data-test-subj":props["data-test-subj"],gutterSize:"s",style:{maxWidth:"unset",minWidth:300}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(built_in_components.ComboBoxMultiple,{className:"channelSelect-combobox",placeholder:"Select channel",isLoading:loading,options:channels.map(channel=>({value:channel.config_id,label:channel.name,className:"valid-option"})),onChange:(val,options)=>{onChange(options.map(item=>({id:item.value||""})))},onCreateOption:undefined,value:loading?[]:value===null||value===void 0?void 0:value.map(item=>item.id)})))};var containers_ChannelSelect_ChannelSelect=ChannelSelect_ChannelSelect;var containers_ChannelSelect=containers_ChannelSelect_ChannelSelect;const GetLronConfig=async props=>props.services.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_plugins/_im/lron/${encodeURIComponent(`LRON:${ActionTypeMapName[props.actionType]}`)}`}});const checkPermissionForSubmitLRONConfig=async props=>{const result=await props.services.commonService.apiCaller({endpoint:"transport.request",data:{method:"PUT",path:`/_plugins/_im/lron/${encodeURIComponent(`LRON:${ActionTypeMapName.REINDEX}`)}?dry_run=true`,body:{lron_config:{lron_condition:{},action_name:ActionTypeMapName[ActionType.REINDEX],channels:[{id:"test"}]}}}});return result===null||result===void 0?void 0:result.ok};const associateWithTask=async props=>{const result=await props.services.commonService.apiCaller({endpoint:"transport.request",data:{method:"PUT",path:`/_plugins/_im/lron/${encodeURIComponent(`LRON:${props.taskId}`)}`,body:{lron_config:{...props.lronConfig,task_id:props.taskId}}}});if(!result.ok){props.coreServices.notifications.toasts.addDanger(result.error)}return result===null||result===void 0?void 0:result.ok};const ifSetDefaultNotification=lronConfig=>{var _lronConfig$lron_cond,_lronConfig$lron_cond2;return!!(lronConfig!==null&&lronConfig!==void 0&&(_lronConfig$lron_cond=lronConfig.lron_condition)!==null&&_lronConfig$lron_cond!==void 0&&_lronConfig$lron_cond.failure||lronConfig!==null&&lronConfig!==void 0&&(_lronConfig$lron_cond2=lronConfig.lron_condition)!==null&&_lronConfig$lron_cond2!==void 0&&_lronConfig$lron_cond2.success)};
6const getPermissionValue=(permissionForViewLRON,permissionForCreateLRON,hasDefaultNotification)=>{const getValue=val=>val?"1":"0";return`${getValue(permissionForViewLRON)}${getValue(permissionForCreateLRON)}${getValue(hasDefaultNotification)}`};function NotificationCallout(props){const{hasDefaultNotification:hasDefaultNotification,operationType:operationType,actionType:actionType,permissionForCreateLRON:permissionForCreateLRON,permissionForViewLRON:permissionForViewLRON}=props;const permissionValue=getPermissionValue(permissionForViewLRON,permissionForCreateLRON,hasDefaultNotification);if(permissionValue==="110"){return null}let title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null);switch(permissionValue){case"000":title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Your administrator may have set default notification settings for ",OperationTypeMapTitle[operationType||actionType]," operations. Contact your administrator to request access.");break;case"010":title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Your administrator may have set default notification settings for ",OperationTypeMapTitle[operationType||actionType]," operations. You can send additional notifications for this operation.");break;case"100":title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Your administrator has not set default notification settings for ",OperationTypeMapTitle[operationType||actionType]," operations.");break;case"101":title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Your administrator has set default notification settings for ",OperationTypeMapTitle[operationType||actionType]," operations. Contact your administrator to request access.");break;case"111":title=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Default notification settings are set for ",OperationTypeMapTitle[operationType||actionType]," operations. Configure default settings at"," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{style:{textDecoration:"underline"},href:`#${constants["D"].NOTIFICATIONS}`,target:"_blank",external:false},"Notifications settings"),".");break}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"primary",iconType:"iInCircle","data-test-subj":"defaultNotificationCallout",title:title}))}function NotificationConfig_extends(){return NotificationConfig_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},NotificationConfig_extends.apply(null,arguments)}const NotificationConfig=(_ref,ref)=>{var _values$lron_conditio,_values$lron_conditio2;let{actionType:actionType,operationType:operationType,withPanel:withPanel,panelProps:panelProps}=_ref;const{channels:channels}=useChannels();const field=useField({onChange(name,value){if((name[1]===FieldEnum.success||name[1]===FieldEnum.failure)&&!value){field.validatePromise()}},values:{customize:false,lron_condition:{success:false,failure:false},channels:[]}});const[LronConfig,setLronConfig]=Object(external_osdSharedDeps_React_["useState"])();const[permissionForCreateLRON,setPermissionForCreateLRON]=Object(external_osdSharedDeps_React_["useState"])(false);const[permissionForViewLRON,setPermissionForViewLRON]=Object(external_osdSharedDeps_React_["useState"])(false);const context=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const stateRef=Object(external_osdSharedDeps_React_["useRef"])({permissionFor
6CreateLRON:permissionForCreateLRON});stateRef.current.permissionForCreateLRON=permissionForCreateLRON;Object(external_osdSharedDeps_React_["useEffect"])(()=>{GetLronConfig({actionType:actionType,services:context}).then(res=>{if(res&&res.ok){var _res$response;setPermissionForViewLRON(true);const lronConfig=(_res$response=res.response)===null||_res$response===void 0||(_res$response=_res$response.lron_configs)===null||_res$response===void 0||(_res$response=_res$response[0])===null||_res$response===void 0?void 0:_res$response.lron_config;setLronConfig(lronConfig);if(!ifSetDefaultNotification(lronConfig)){field.setValue("customize",true)}}else{field.setValue("customize",true)}});checkPermissionForSubmitLRONConfig({services:context}).then(result=>setPermissionForCreateLRON(result))},[]);const selectedChannels=Object(external_osdSharedDeps_React_["useMemo"])(()=>((LronConfig===null||LronConfig===void 0?void 0:LronConfig.channels)||[]).map(item=>channels.find(channel=>channel.config_id===item.id)).filter(item=>item),[LronConfig,channels]);const values=field.getValues();Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({...field,associateWithTask:_ref2=>{let{taskId:taskId}=_ref2;const{customize:customize,...others}=field.getValues();if(!customize||!stateRef.current.permissionForCreateLRON){return Promise.resolve(true)}return associateWithTask({services:context,coreServices:coreServices,taskId:taskId,lronConfig:others})}}));const hasDefaultNotification=ifSetDefaultNotification(LronConfig);if(!hasDefaultNotification&&!permissionForCreateLRON){return null}const content=external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Notifications")),external_osdSharedDeps_React_default.a.createElement(NotificationCallout,{actionType:actionType,operationType:operationType,hasDefaultNotification:hasDefaultNotification,permissionForCreateLRON:permissionForCreateLRON,permissionForViewLRON:permissionForViewLRON}),hasDefaultNotification?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:"Notify when operation"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyle:"inside disc",textIndent:"1.5em"}},LronConfig!==null&&LronConfig!==void 0&&LronConfig.lron_condition.failure?external_osdSharedDeps_React_default.a.createElement("li",null,"Has failed"):null,LronConfig!==null&&LronConfig!==void 0&&LronConfig.lron_condition.success?external_osdSharedDeps_React_default.a.createElement("li",null,"Has completed"):null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:"Channels to notify"},external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},selectedChannels===null||selectedChannels===void 0?void 0:selectedChannels.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{color:"hollow",key:item.name},item.name," (",item.config_type,")"))))))):null,hasDefaultNotification&&permissionForCreateLRON?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,NotificationConfig_extends({},field.registerField({name:"customize"}),{"data-test-subj":"sendAddtionalNotificationsCheckBox",label:"Send additional notifications"}
6))):null,values.customize&&permissionForCreateLRON?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Send additional notifications when operation"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,NotificationConfig_extends({},field.registerField({name:["lron_condition",FieldEnum.failure]}),{"data-test-subj":"notificationCustomConditionHasFailed",label:"Has failed / timed out"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,NotificationConfig_extends({},field.registerField({name:["lron_condition",FieldEnum.success]}),{label:"Has completed"})))),values!==null&&values!==void 0&&(_values$lron_conditio=values.lron_condition)!==null&&_values$lron_conditio!==void 0&&_values$lron_conditio[FieldEnum.failure]||values!==null&&values!==void 0&&(_values$lron_conditio2=values.lron_condition)!==null&&_values$lron_conditio2!==void 0&&_values$lron_conditio2[FieldEnum.success]?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:FieldMapLabel[FieldEnum.channels],isInvalid:!!field.getError(FieldEnum.channels),error:field.getError(FieldEnum.channels)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(containers_ChannelSelect,NotificationConfig_extends({"data-test-subj":"notificationCustomChannelsSelect"},field.registerField({name:"channels",rules:[{validator(rule,value){const values=field.getValues();const item=values.lron_condition;if(values.customize&&(item!==null&&item!==void 0&&item.failure||item!==null&&item!==void 0&&item.success)){if(!value||!value.length){return Promise.reject(VALIDATE_ERROR_FOR_CHANNELS)}}return Promise.resolve("")}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>window.open("/app/notifications-dashboards#/channels"),iconType:"popout",iconSide:"right"},"Manage channels"))))):null):null);return withPanel?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,NotificationConfig_extends({accordion:true,noExtraPadding:true},panelProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),content,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),content)};var NotificationConfig_NotificationConfig=Object(external_osdSharedDeps_React_["forwardRef"])(NotificationConfig);var containers_NotificationConfig=NotificationConfig_NotificationConfig;const UnsavedChangesButtons=_ref=>{let{unsavedCount:unsavedCount,formErrorsCount:formErrorsCount,onClickCancel:onClickCancel,onClickSubmit:onClickSubmit,submitButtonDataTestSubj:submitButtonDataTestSubj}=_ref;const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onClick=async()=>{setLoading(true);try{await onClickSubmit()}catch(e){}finally{if(destroyRef.current){return}setLoading(false)}};const renderCancel=Object(external_osdSharedDeps_React_["useCallback"])(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onCl
6ickCancel,target:"_blank"},"Cancel"),[onClickCancel]);const renderConfirm=Object(external_osdSharedDeps_React_["useCallback"])(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":submitButtonDataTestSubj,onClick:onClick,isLoading:loading,disabled:loading,color:"primary",fill:true},"Save"),[onClick,submitButtonDataTestSubj,loading]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"spaceBetween",style:{padding:"0px 16px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},formErrorsCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"danger",size:"s"},formErrorsCount," form errors")):null,unsavedCount&&!formErrorsCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"warning",size:"s"},unsavedCount," unsaved changes")):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center",justifyContent:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},renderCancel()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},renderConfirm())))};var UnsavedChangesButton=UnsavedChangesButtons;function NotificationModal_extends(){return NotificationModal_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},NotificationModal_extends.apply(null,arguments)}const Notifications=_ref=>{let{onClose:onClose,visible:visible}=_ref;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const[submitClicked,setSubmitClicked]=Object(external_osdSharedDeps_React_["useState"])(false);const[noPermission,setNoPermission]=Object(external_osdSharedDeps_React_["useState"])(false);const[permissionForUpdate,setPermissionForUpdate]=Object(external_osdSharedDeps_React_["useState"])(false);const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");const field=useField({values:{},onBeforeChange(name){const previousValue=field.getValues();if(Array.isArray(name)&&name.length===3&&parseInt(name[1])>0){const[dataSourceStr,index]=name;const newProperty=[dataSourceStr,index,FieldEnum.channels];if((name[2]===FieldEnum.success||name[2]===FieldEnum.failure)&&!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,[dataSourceStr,index,FieldEnum.success])&&!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,[dataSourceStr,index,FieldEnum.failure])&&(!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,newProperty)||!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,newProperty).length)){field.setValue(newProperty,field.getValue([dataSourceStr,`${parseInt(index)-1}`,FieldEnum.channels]))}}},onChange(name,value){if((name[2]===FieldEnum.success||name[2]===FieldEnum.failure)&&!value){field.validatePromise()}}});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onSubmit=async()=>{if(!permissionForUpdate){coreServices.notifications.toasts.addDanger({title:"You do not have permissions to update notification settings",text:"Contact your administrator to request permissions."});return await new Promise(resolve=>setTimeout(()=>resolve(undefined),0))}const{errors:errors,values:notifications}=await field.validatePromise()||{};setSubmitClicked(!!errors);if(errors){return}setIsLoading(true);const result=await submitNotifications({commonService:services.commonService,plainConfigsPayload:(notifications.dataSource||[]).map(item=>{if(!item.success&&!item.failure){return{...item,channels:[]}}return item})});if(result&&result.ok){coreServices.notifications.toasts.addSuccess("Notifications settings for index operations have been successfully updated.");reloadNotifications();onClose()}else{coreServices.notifications.toasts.addDanger(result.error)}if(destroyRef.current){return}setIsLoading(false)};const reloadNotifications=()=>{setIsLoading(true);getNotifications({commonService:services.commonService}).then(res=>{if(res.ok){const plainList=transformConfigListToPlainList(res.response.lron_configs.map(item=>item.lron_config));const values={dataSource:plainList};Object(external_osdSharedDeps_ReactDom_["unstable_batchedUpdates"])(()=>{field.resetValues(values);field.setOriginalValues(JSON.parse(JSON.stringify(values)))})}else{var _res$body;if((res===null||res===void 0||(_res$body=res.body)===null||_res$body===void 0?void 0:_res$body.status)===403){setNoPermission(true);coreServices.notifications.toasts.addDanger({title:"You do not have permissions to view notification settings",text:"Contact your administrator to request permissions."});return}coreServices.notifications.toasts.addDanger(res.error)}}).finally(()=>
6{if(!destroyRef.current){setIsLoading(false)}})};const onCancel=()=>{field.resetValues(field.getOriginalValues());onClose()};Object(external_osdSharedDeps_React_["useEffect"])(()=>{reloadNotifications();checkPermissionForSubmitLRONConfig({services:services}).then(result=>setPermissionForUpdate(result));return()=>{destroyRef.current=true}},[]);const values=field.getValues();const allErrors=Object.entries(field.getErrors());if(!visible){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose,maxWidth:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h2",null,"Notification settings")," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"popout",href:"notifications-dashboards#/channels",target:"_blank",iconSide:"right"},"Manage channels"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,noPermission?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{iconType:"alert",iconColor:"danger",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h2",null,"Error loading Notification settings")," "),body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("p",null,"You do not have permissions to view Notification settings. Contact your administrator to request permissions."))}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,submitClicked&&allErrors.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{iconType:"iInCircle",color:"danger",title:"Address the following error(s) in the form"},external_osdSharedDeps_React_default.a.createElement("ul",null,allErrors.reduce((total,_ref2)=>{let[key,errors]=_ref2;const pattern=/^dataSource\.(\d+)\.(\w+)$/;const matchResult=key.match(pattern);if(matchResult){const index=matchResult[1];const itemField=matchResult[2];const notificationItem=(field.getValues().dataSource||[])[parseInt(index,10)];const errorMessagePrefix=`${notificationItem.title} â ${FieldMapLabel[itemField]}: `;return[...total,...(errors||[]).map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:`${errorMessagePrefix}${item}`,className:"ISM-notifications-first-letter-uppercase"},errorMessagePrefix,item))]}return total},[]))):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),(values.dataSource||[]).map(record=>{const{value:value,onChange:onChange,...others}=field.registerField({name:["dataSource",`${record.index}`,FieldEnum.channels],rules:[{validator(rule,value){var _values$dataSource;const values=field.getValues();const item=(_values$dataSource=values.dataSource)===null||_values$dataSource===void 0?void 0:_values$dataSource[record.index];if(item!==null&&item!==void 0&&item[FieldEnum.failure]||item!==null&&item!==void 0&&item[FieldEnum.success]){if(!value||!value.length){return Promise.reject(VALIDATE_ERROR_FOR_CHANNELS)}}return Promise.resolve("")}}]});return external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement("div",{className:"ISM-notifications-first-letter-uppercase"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h3",null,record.title)," ")),helpText:ActionTypeMapDescription[getKeyByValue(ActionTypeMapTitle,re
6cord.title)],direction:"hoz",key:record.action_name},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:LABEL_FOR_CONDITION},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexStart"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,NotificationModal_extends({},field.registerField({name:["dataSource",`${record.index}`,FieldEnum.failure]}),{"data-test-subj":["dataSource",`${record.index}`,FieldEnum.failure].join("."),label:"Has failed"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,NotificationModal_extends({},field.registerField({name:["dataSource",`${record.index}`,FieldEnum.success]}),{"data-test-subj":["dataSource",`${record.index}`,FieldEnum.success].join("."),label:"Has completed"}))))),field.getValue(["dataSource",`${record.index}`,FieldEnum.failure])||field.getValue(["dataSource",`${record.index}`,FieldEnum.success])?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:FieldMapLabel[FieldEnum.channels],isInvalid:!!field.getError(["dataSource",`${record.index}`,FieldEnum.channels]),error:field.getError(["dataSource",`${record.index}`,FieldEnum.channels]),"data-test-subj":["dataSource",`${record.index}`,FieldEnum.channels].join(".")},external_osdSharedDeps_React_default.a.createElement(containers_ChannelSelect,NotificationModal_extends({},others,{value:value,onChange:onChange})))):null))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(UnsavedChangesButton,{unsavedCount:Object(helpers["a"])(getDiffableMapFromPlainList(values.dataSource||[]),getDiffableMapFromPlainList(field.getOriginalValues().dataSource||[])),formErrorsCount:allErrors.length,onClickSubmit:onSubmit,onClickCancel:onCancel,submitButtonDataTestSubj:"submitNotifcationSettings"})))};var NotificationModal=Notifications;var components_NotificationModal=NotificationModal;function Indices_extends(){return Indices_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Indices_extends.apply(null,arguments)}function Indices_defineProperty(e,r,t){return(r=Indices_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Indices_toPropertyKey(t){var i=Indices_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Indices_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Indices_Indices extends components_MDSEnabledComponent{constructor(props){super(props);Indices_defineProperty(this,"getIndices",async()=>{this.setState({loadingIndices:true});try{const{indexService:indexService,history:history}=this.props;const queryObject=this.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify({...queryObject});history.replace({...this.props.location,search:queryParamsString});const getIndicesResponse=await indexService.getIndices({...queryObject,terms:this.getTermClausesFromState(),indices:this.getFieldClausesFromState("indices"),dataStream
6s:this.getFieldClausesFromState("data_streams")});if(getIndicesResponse.ok){const{indices:indices,totalIndices:totalIndices}=getIndicesResponse.response;const payload={indices:indices,totalIndices:totalIndices,selectedItems:this.state.selectedItems.map(item=>indices.find(remoteItem=>remoteItem.index===item.index)).filter(item=>item)};this.setState(payload)}else{this.context.notifications.toasts.addDanger(getIndicesResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the indices"))}const{showDataStreams:showDataStreams}=this.state;this.setState({loadingIndices:false,isDataStreamColumnVisible:showDataStreams})});Indices_defineProperty(this,"getDataStreams",async()=>{const{indexService:indexService}=this.props;const serverResponse=await indexService.getDataStreams();if(!serverResponse.ok){if(serverResponse.error.startsWith(utils_constants["a"])){this.context.notifications.toasts.addWarning(serverResponse.error)}}return serverResponse.response.dataStreams});Indices_defineProperty(this,"toggleShowDataStreams",()=>{const{showDataStreams:showDataStreams}=this.state;this.setState({showDataStreams:!showDataStreams})});Indices_defineProperty(this,"getFieldClausesFromState",clause=>{const{query:query}=this.state;return external_osdSharedDeps_Lodash_default.a.flatten((query.ast.getFieldClauses(clause)||[]).map(field=>field.value))});Indices_defineProperty(this,"getTermClausesFromState",()=>{const{query:query}=this.state;return(query.ast.getTermClauses()||[]).map(term=>term.value)});Indices_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection})});Indices_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Indices_defineProperty(this,"onSearchChange",_ref2=>{let{query:query,queryText:queryText,error:error}=_ref2;if(error){return}this.setState({from:0,search:queryText,query:query})});Indices_defineProperty(this,"resetFilters",()=>{this.setState({search:utils_constants_DEFAULT_QUERY_PARAMS.search,query:external_osdSharedDeps_ElasticEui_["Query"].parse(utils_constants_DEFAULT_QUERY_PARAMS.search)})});Indices_defineProperty(this,"onCloseNotification",()=>{this.setState({isNotificationModalVisible:false})});Indices_defineProperty(this,"toggleNotificationModal",()=>{this.setState(prevState=>({isNotificationModalVisible:!prevState.isNotificationModalVisible}))});const{from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,showDataStreams:_showDataStreams}=utils_helpers_getURLQueryParams(this.props.location);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={...this.state,totalIndices:0,from:from,size:_size,search:search,query:external_osdSharedDeps_ElasticEui_["Query"].parse(search),sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],indices:[],loadingIndices:true,showDataStreams:_showDataStreams,isDataStreamColumnVisible:_showDataStreams,useUpdatedUX:useUpdatedUX,isNotificationModalVisible:false};this.getIndices=external_osdSharedDeps_Lodash_default.a.debounce(this.getIndices,500,{leading:true})}async componentDidMount(){const breadCrumbs=this.state.useUpdatedUX?[constants["f"].INDICES]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES];this.context.chrome.setBreadcrumbs(breadCrumbs);Object(JobHandler["d"])(JobHandler["a"].REINDEX_COMPLETE,this.getIndices);Object(JobHandler["d"])(JobHandler["a"].SHRINK_COMPLETE,this.getIndices);Object(JobHandler["d"])(JobHandler["a"].SPLIT_COMPLETE,this.getIndices);Object(JobHandler["d"])(JobHandler["a"].OPEN_COMPLETE,this.getIndices);await this.getIndices();if(this.state.useUpdatedUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDICES.text.concat(` (${this.state.totalIndices})`),href:constants["f"].INDICES.href}])}}componentWillUnmount(){Object(JobHandler["c"])(JobHandler["a"].REINDEX_COMPLETE,this.getIndices);Object(JobHandler["c"])(JobHandler["a"].SHRINK_COMPLETE,this.getIndices);Object(JobHandler["c"])(JobHandler["a"].SPLIT_COMPLETE,this.getIndices);Object(JobHandler["c"])(JobHandler["a"].OPEN_COMPLETE,this.getIndices)}async componentDidUpdate(prevProps,prevState){const prevQuery=this.getQueryObjectFromState(prevState);const currQuery=this.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getIndices()}if(this.state.useUpdatedUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].INDICES.text.concat(` (${this.state.totalIndices})`),href:constants["f"].INDICES.href}])}}getQueryObjectFromState(_ref3){let{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStream
6s:showDataStreams,dataSourceId:dataSourceId}=_ref3;const queryObj={from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,showDataStreams:showDataStreams};if(!this.props.multiDataSourceEnabled){return queryObj}return{...queryObj,dataSourceId:dataSourceId}}render(){const{totalIndices:totalIndices,from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,indices:indices,loadingIndices:loadingIndices,showDataStreams:showDataStreams,isDataStreamColumnVisible:isDataStreamColumnVisible}=this.state;const filterIsApplied=!!search;const page=Math.floor(from/size);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalIndices};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const{history:history}=this.props;const onClickCreate=()=>{this.props.history.push(constants["D"].CREATE_INDEX)};return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Notification settings",label:"Notification Settings",fill:false,run:this.toggleNotificationModal,testId:"notificationSettingsButton",controlType:"button"},{id:"Create index",label:"Create Index",fill:true,iconType:"plus",run:onClickCreate,testId:"createIndexButton",controlType:"button",color:"primary"}]}),external_osdSharedDeps_React_default.a.createElement("div",{id:"test",style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(components_IndexControls,{search:search,onSearchChange:this.onSearchChange,onRefresh:this.getIndices,showDataStreams:showDataStreams,getDataStreams:this.getDataStreams,toggleShowDataStreams:this.toggleShowDataStreams,selectedItems:this.state.selectedItems,history:this.props.history}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:indicesColumns(isDataStreamColumnVisible,{history:history}),loading:this.state.loadingIndices,isSelectable:true,itemId:"index",items:indices,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_IndexEmptyPrompt,{filterIsApplied:filterIsApplied,loading:loadingIndices,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting}))),this.state.isNotificationModalVisible&&external_osdSharedDeps_React_default.a.createElement(components_NotificationModal,{onClose:this.onCloseNotification,visible:this.state.isNotificationModalVisible})):external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Refresh",buttonProps:{iconType:"refresh",onClick:this.getIndices}},{children:external_osdSharedDeps_React_default.a.createElement(IndicesActions,Indices_extends({},this.props,{onDelete:this.getIndices,onClose:this.getIndices,onShrink:this.getIndices,selectedItems:this.state.selectedItems,getIndices:this.getIndices})),text:""},{text:"Create Index",buttonProps:{fill:true,onClick:onClickCreate,iconType:"plus"}}]}),bodyStyles:{padding:"initial"},title:"Indexes",itemCount:totalIndices},external_osdSharedDeps_React_default.a.createElement(components_IndexControls,{search:search,onSearchChange:this.onSearchChange,onRefresh:this.getIndices,showDataStreams:showDataStreams,getDataStreams:this.getDataStreams,toggleShowDataStreams:this.toggleShowDataStreams,selectedItems:this.state.selectedItems}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:indicesColumns(isDataStreamColumnVisible,{history:history}),loading:this.state.loadingIndices,isSelectable:true,itemId:"index",items:indices,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_IndexEmptyPrompt,{filterIsApplied:filterIsApplied,loading:loadingIndices,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting}))}}Indices_defineProperty(Indices_Indices,"contextType",core_services["b"]);var containers_Indices_Indices=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Indices_Indices,Indices_extends({},props,dataSourceMenuProps))};var Indices_containers_Indices=containers_Indices_Indices;var pages_Indices=Indices_containers_Indices;const DEFAULT_POLICY=JSON.stringify({policy:{description:"A simple default policy that changes the replica count between hot and cold states.",default_state:"example_hot_state",states:[{name:"example_hot_state",actions:[{replica_count:{number_of_replicas:5}}],transitions:[{state_name:"example_cold_state",conditions:{min_index_age:"30d"}}]},{name:"example_cold_state",actions:[{replica_count:{number_of_replicas:2}}],transitions:[]}],ism_template:{index_patterns:["example-index-*"]}}},null,4);var github=__webpack_require__(42);var mode_json=__webpack_require__(43);var DarkMode=__webpack_require__(46);const DefinePolicy=_ref=>{let{jsonString:jsonString,onChange:onChange,onAutoIndent:onAutoIndent,hasJSONError:hasJSONError}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`Define policy`)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCopy"],{textToCopy:jsonString},copy=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"copyClipboard",onClick:copy}
6,"Copy"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"editorAlignLeft",onClick:onAutoIndent,disabled:hasJSONError},"Auto indent"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,'You can think of policies as state machines. "Actions" are the operations ISM performs when an index is in a certain state. "Transitions" define when to move from one state to another.'," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["j"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(DarkMode["a"],null,isDarkMode=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:isDarkMode?"sense-dark":"github",width:"100%",value:jsonString,onChange:onChange,setOptions:{fontSize:"14px"},"aria-label":"Code Editor"})))};var DefinePolicy_DefinePolicy=DefinePolicy;var components_DefinePolicy=DefinePolicy_DefinePolicy;const ConfigurePolicy=_ref=>{let{isEdit:isEdit,policyId:policyId,policyIdError:policyIdError,onChange:onChange,useNewUx:useNewUx}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`Name policy`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),useNewUx?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"Policies let you automatically perform administrative operations on indices.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Policy ID")),helpText:"Specify a unique ID that is easy to recognize and remember.",isInvalid:!!policyIdError,error:policyIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:!!policyIdError,placeholder:"example_policy",readOnly:isEdit,value:policyId,onChange:onChange})))};var ConfigurePolicy_ConfigurePolicy=ConfigurePolicy;var components_ConfigurePolicy=ConfigurePolicy_ConfigurePolicy;function CreatePolicy_extends(){return CreatePolicy_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreatePolicy_extends.apply(null,arguments)}function CreatePolicy_defineProperty(e,r,t){return(r=CreatePolicy_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreatePolicy_toPropertyKey(t){var i=CreatePolicy_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreatePolicy_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreatePolicy_CreatePolicy extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreatePolicy_defineProperty(this,"_isMount",void 0);CreatePolicy_defineProperty(this,"componentDidMount",async()=>{const breadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES];this.context.chrome.setBreadcrumbs(breadCrumbs);if(this.props.isEdit){const{id:id}=query_string_default.a.parse(this.props.location.search);
6if(typeof id==="string"&&!!id){const editBreadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW,{text:id},constants["f"].EDIT_POLICY]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES,constants["f"].EDIT_POLICY,{text:id}];this.context.chrome.setBreadcrumbs(editBreadCrumbs);await this.getPolicyToEdit(id)}else{this.context.notifications.toasts.addDanger(`Invalid policy id: ${id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}}else{const createBreadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW,constants["f"].CREATE_POLICY_NEW]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES,constants["f"].CREATE_POLICY];this.context.chrome.setBreadcrumbs(createBreadCrumbs);this.setState({jsonString:DEFAULT_POLICY})}});CreatePolicy_defineProperty(this,"getPolicyToEdit",async policyId=>{try{const{policyService:policyService}=this.props;const response=await policyService.getPolicy(policyId);if(response.ok){this.setState({policySeqNo:response.response.seqNo,policyPrimaryTerm:response.response.primaryTerm,policyId:response.response.id,jsonString:JSON.stringify({policy:response.response.policy},null,4)})}else{this.context.notifications.toasts.addDanger(`Could not load the policy: ${response.error}`);this.props.history.push(constants["D"].INDEX_POLICIES)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the policy"));this.props.history.push(constants["D"].INDEX_POLICIES)}});CreatePolicy_defineProperty(this,"onCreate",async(policyId,policy)=>{const{policyService:policyService}=this.props;try{const response=await policyService.putPolicy(policy,policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`Created policy: ${response.response._id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem creating the policy")})}});CreatePolicy_defineProperty(this,"onUpdate",async(policyId,policy)=>{try{const{policyService:policyService}=this.props;const{policyPrimaryTerm:policyPrimaryTerm,policySeqNo:policySeqNo}=this.state;if(policySeqNo==null||policyPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update policy without seqNo and primaryTerm");return}const response=await policyService.putPolicy(policy,policyId,policySeqNo,policyPrimaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Updated policy: ${response.response._id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem updating the policy")})}});CreatePolicy_defineProperty(this,"onCancel",()=>{if(this.props.isEdit)this.props.history.goBack();else this.props.history.push(constants["D"].INDEX_POLICIES)});CreatePolicy_defineProperty(this,"onChange",e=>{const{hasSubmitted:hasSubmitted}=this.state;const policyId=e.target.value;if(hasSubmitted)this.setState({policyId:policyId,policyIdError:policyId?"":"Required"});else this.setState({policyId:policyId})});CreatePolicy_defineProperty(this,"onChangeJSON",value=>{this.setState({jsonString:value})});CreatePolicy_defineProperty(this,"onAutoIndent",()=>{try{const parsedJSON=JSON.parse(this.state.jsonString);this.setState({jsonString:JSON.stringify(parsedJSON,null,4)})}catch(err){}});CreatePolicy_defineProperty(this,"onSubmit",async()=>{const{isEdit:isEdit}=this.props;const{policyId:policyId,jsonString:jsonString}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{if(!policyId){this.setState({policyIdError:"Required"})}else{const policy=JSON.parse(jsonString);if(isEdit)await this.onUpdate(policyId,policy);else await this.onCreate(policyId,policy)}}catch(err){this.context.notifications.toasts.addDanger("Invalid Policy JSON");console.error(err)}if(!this._isMount){return}this.setState({isSubmitting:false})});CreatePolicy_defineProperty(this,"renderEditCallOut",()=>{const{isEdit:isEdit}=this.props;if(!isEdit)return null;const titleSize=this.state.useNewUX?"s":undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Edits to the policy are not automatically applied to indices that are already being managed by this policy.",iconType:"questionInCircle",size:titleSize},external_osdSharedDeps_React_default.a.createElement("p",null,'This ensures that any update to a policy doesn\'t harm indices that are running under an older version of the policy. To carry over your edits to these indices, please use the "Change Policy" under "Managed Indices" to reapply the policy after submitting your edits.'," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["j"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={policySeqNo:null,policyPrimaryTerm:null,policyId:"",policyIdError:"",submitError:"",jsonString:"",isSubmitting:false,hasSubmitted:false,useNewUX:useNewUx};this._isMount=true}componentWillUnmount(){this._isMount=false}componentDidUpdate(prevProps,prevState){if(prevProps.dataSourceId!=this.props.dataSourceId){this.setState({policySeqNo:null,policyPrimaryTerm:null,policyIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false})}}render(){const{isEdit:isEdit}=this.props;const{policyId:policyId,policyIdError:policyIdError,jsonString:jsonString,submitError:submitError,isSubmitting:isSubmitting,useNewUX:useNewUX}=this.state;const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Policies let you automatically perform administrative operations on indices.",links:{label:"Learn more",href:constants["z"],iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];let hasJSONError=false;try{JSON.parse(jsonString)}catch(err){hasJSONError=true}const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"25px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},!useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},external_osdSharedDeps_React_default.a.createElement("h1",null,isEdit?"Edit":"Create"," policy")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData})),this.renderEditCallOut(),external_osdSharedDeps_React_default.a.createElement(components_ConfigurePolicy,{policyId:policyId,policyIdError:policyIdError,isEdit:isEdit,onChange:this.onChange,useNewUx:useNewUX}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_DefinePolicy,{jsonString:jsonString,onChange:this.onChangeJSON,onAutoIndent:this.onAutoIndent,hasJSONError:hasJSONError}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),submitError&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Sorry, there was an error",color:"danger",iconType:"alert"},external_osdSharedDeps_React_default.a.createElement("p",null,submitError)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"createPolicyCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"createPolicyCreateButton"}
6,isEdit?"Update":"Create"))))}}CreatePolicy_defineProperty(CreatePolicy_CreatePolicy,"contextType",core_services["b"]);var containers_CreatePolicy_CreatePolicy=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreatePolicy_CreatePolicy,CreatePolicy_extends({},props,dataSourceMenuProperties))};var containers_CreatePolicy=containers_CreatePolicy_CreatePolicy;var pages_CreatePolicy=containers_CreatePolicy;var VisualCreatePolicy_utils_constants=__webpack_require__(15);var EuiFormCustomLabel=__webpack_require__(24);const PolicyInfo=_ref=>{let{isEdit:isEdit,policyId:policyId,policyIdError:policyIdError,description:description,onChangePolicyId:onChangePolicyId,onChangeDescription:onChangeDescription}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`Policy info`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Policy ID",helpText:"Specify a unique and descriptive ID that is easy to recognize and remember."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!policyIdError,error:policyIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{disabled:isEdit,isInvalid:!!policyIdError,placeholder:"hot_cold_workflow",readOnly:false,value:policyId,onChange:onChangePolicyId,"data-test-subj":"create-policy-policy-id"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Description",helpText:"Describe the policy."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{style:{minHeight:"150px"},compressed:true,value:description,onChange:onChangeDescription,"data-test-subj":"create-policy-description"})))};var PolicyInfo_PolicyInfo=PolicyInfo;var components_PolicyInfo=PolicyInfo_PolicyInfo;const ISMTemplate=_ref=>{let{template:template,onUpdateTemplate:onUpdateTemplate,onRemoveTemplate:onRemoveTemplate,isFirst:isFirst}=_ref;const[isInvalid,setInvalid]=Object(external_osdSharedDeps_React_["useState"])(false);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"l",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:VisualCreatePolicy_utils_constants["r"]}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{isClearable:false,placeholder:"Add index patterns",noSuggestions:true,selectedOptions:template.index_patterns.map(pattern=>({label:pattern})),onChange:selectedOptions=>{onUpdateTemplate({...template,index_patterns:selectedOptions.map(_ref2=>{let{label:label}=_ref2;return label})});setInvalid(false)},onCreateOption:searchValue=>{if(!searchValue.trim()){return false}if(searchValue.includes(" ")){setInvalid(false);return}onUpdateTemplate({...template,index_patterns:[...template.index_patterns,searchValue]})},onSearchChange:searchValue=>{if(!searchValue){setInvalid(false);return}if(searchValue.includes(" ")){setInvalid(true);return}setInvalid(false)},isInvalid:isInvalid,"data-test-subj":"ism-template-index-pattern-input"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{error:null,isInvalid:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:template.priority,onChange:e=>{const priority=e.target.valueAsNumber;onUpdateTemplate({...template,priority:priority})},isInvalid:false,"data-test-subj":"ism-template-priority-input"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{color:"danger",onClick:onRemoveTemplate,"data-test-subj":"ism-template-remove-button"},"Remove")))};var ISMTemplate_ISMTemplate=ISMTemplate;var components_ISMTemplate=ISMTemplate_ISMTemplate;var utils_helpers=__webpack_require__(31);const ISMTemplates=_ref=>{let{policy:policy,onChangePolicy:onChangePolicy}=_ref;const templates=Object(utils_helpers["b"])(policy.ism_template);const addTemplateButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{onChangePolicy({...policy,ism_template:[...templates,{index_patterns:[],priority:1}]})},"data-test-subj":"ism-templates-add-template-button"},"Add template");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"ISM templates"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued"},external_osdSharedDeps_React_default.a.createElement("i",null," â optional")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:350}}
6,"Specify ISM template patterns that match the index to apply the policy."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["j"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"10px 0px 0px 10px"}},!!templates.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"l",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:VisualCreatePolicy_utils_constants["r"]}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h5",null,"Index patterns"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h5",null,"Priority")))),templates.map((template,idx)=>external_osdSharedDeps_React_default.a.createElement(components_ISMTemplate,{key:Object(helpers["e"])(),isFirst:!idx,template:template,onUpdateTemplate:template=>{onChangePolicy({...policy,ism_template:templates.slice(0,idx).concat(template).concat(templates.slice(idx+1))})},onRemoveTemplate:()=>{onChangePolicy({...policy,ism_template:templates.slice(0,idx).concat(templates.slice(idx+1))})}})),!templates.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"No ISM templates")),style:{maxWidth:"37em"},titleSize:"s",body:external_osdSharedDeps_React_default.a.createElement("p",null,"Your policy currently has no ISM templates defined. Add ISM templates to automatically apply the policy to indices created in the future."),actions:addTemplateButton}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),addTemplateButton)))};var ISMTemplates_ISMTemplates=ISMTemplates;var components_ISMTemplates=ISMTemplates_ISMTemplates;const Badge=_ref=>{let{text:text,number:number,color:color="subdued"}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",textAlign:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:color},external_osdSharedDeps_React_default.a.createElement("p",null,text," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiNotificationBadge"],{size:"s",color:color},number))))};var Badge_Badge=Badge;var components_Badge=Badge_Badge;const TransitionContent=_ref=>{let{transition:transition}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dl",null,external_osdSharedDeps_React_default.a.createElement("dt",null,"Destination state"),external_osdSharedDeps_React_default.a.createElement("dd",null,transition.state_name),external_osdSharedDeps_React_default.a.createElement("dt",null,"Transition trigger logic"),external_osdSharedDeps_React_default.a.createElement("dd",null,Object(utils_helpers["d"])(transition))))};var Transition_TransitionContent=TransitionContent;const State=_ref=>{var _state$actions,_state$transitions,_state$actions2,_state$transitions2;let{state:state,isInitialState:isInitialState,idx:idx,onClickEditState:onClickEditState,onClickDeleteState:onClickDeleteState,isReadOnly:isReadOnly=false}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{style:{padding:"15px"},id:state.name,buttonClassName:"state-accordion",buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"center",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("strong",null,state.name))),isInitialState&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{paddingSize:"none"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{padding:"0px 10px"}},"Initial state"))),!!((_state$actions=state.actions)!==null&&_state$actions!==void 0&&_state$actions.length)&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(components_Badge,{text:"Actions",number:state.actions.length})),!!((_state$transitions=state.transitions)!==null&&_state$transitions!==void 0&&_state$transitions.length)&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(components_Badge,{text:"Transitions",number:state.transitions.length}))),extraAction:!isReadOnly&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref2=>{let{onShow:onShow,onClose:onClose}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{position:"top",content:external_osdSharedDeps_React_default.a.createElement("p",null,"Delete state")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:"trash","aria-label":"Delete",color:"danger",onClick:()=>onShow(components_ConfirmationModal,{title:"Delete state",bodyMessage:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("span",null,'Delete "',external_osdSharedDeps_React_default.a.createElement("strong",null,state.name),'" permanently? Deleting the state will result in deleting all transitions.')),actionMessage:"Delete state",actionProps:{color:"danger"},modalProps:{maxWidth:600},onAction:()=>onClickDeleteState(idx),onClose:onClose}),"data-test-subj":"state-delete-button"}))})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{position:"top",content:external_osdSharedDeps_React_default.a.createElement("p",null,"Edit state")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:"pencil","aria-label":"Edit",color:"primary",onClick:()=>onClickEditState(state)})))),paddingSize:"l"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"column",gutterSize:"l"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h5",null,"Actions"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,!((_state$actions2=state.actions)!==null&&_state$actions2!==void 0&&_state$actions2.length)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"No actions. Edit state to add actions."):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{wrap:true},state.actions.map((action,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,key:`${Ob
6ject(helpers["e"])()}-${index}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{paddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},utils_helpers["a"].getUIActionFromData(action).content())))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h5",null,"Transitions"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,!((_state$transitions2=state.transitions)!==null&&_state$transitions2!==void 0&&_state$transitions2.length)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"No transitions. Edit state to add transitions."):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{wrap:true},state.transitions.map((transition,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,key:`${Object(helpers["e"])()}-${index}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{paddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(Transition_TransitionContent,{transition:transition}))))))))};var States_State=State;const States=_ref=>{let{onOpenFlyout:onOpenFlyout,policy:policy,onClickEditState:onClickEditState,onClickDeleteState:onClickDeleteState,onChangeDefaultState:onChangeDefaultState,isReadOnly:isReadOnly=false}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`States (${policy.states.length})`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:350}},'You can think of policies as state machines. "Actions" are the operations ISM performs when an index is in a certain state.',external_osdSharedDeps_React_default.a.createElement("br",null),'"Transitions" define when to move from one state to another.'," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["H"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,!isReadOnly&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{style:{maxWidth:"300px"},isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSelect"],{compressed:true,prepend:"Initial state",options:policy.states.map(state=>({text:state.name,value:state.name})),value:policy.default_state,onChange:onChangeDefaultState})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"none",direction:"column"},policy.states.map((state,idx)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:state.name},external_osdSharedDeps_React_default.a.createElement(States_State,{idx:idx,state:state,isInitialState:state.name===policy.default_state,onClickEditState:onClickEditState,onClickDeleteState:onClickDeleteState,isReadOnly:isReadOnly}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"none"})))),!isReadOnly&&(!!policy.states.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onOpenFlyout,"data-test-subj":"states-add-state-button"},"Add state")):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h3",null,"No states")),titleSize:"s",body:external_osdSharedDeps_React_default.a.createElement("p",null,"Your policy currently has no states defined. Add states to manage your index lifecycle."),actions:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{color:"primary",onClick:onOpenFlyout,"data-test-subj":"states-add-state-button"},"Add state")}))))};var States_States=States;var components_States=States_States;const FlyoutFooter=_ref=>{let{edit:edit,action:action,disabledAction:disabledAction=false,onClickCancel:onClickCancel,onClickAction:onCl
6ickAction,save:save,restore:restore,text:text}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClickCancel,flush:"left","data-test-subj":"flyout-footer-cancel-button"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:disabledAction,onClick:onClickAction,fill:true,"data-test-subj":"flyout-footer-action-button"},text?text:restore?"Restore snapshot":!save?`${edit?"Edit":"Add"} ${action}`:save?"Save":"Create")))};var FlyoutFooter_FlyoutFooter=FlyoutFooter;var components_FlyoutFooter=FlyoutFooter_FlyoutFooter;var external_osdSharedDeps_MomentTimezone_=__webpack_require__(32);var external_osdSharedDeps_MomentTimezone_default=__webpack_require__.n(external_osdSharedDeps_MomentTimezone_);const timezones=external_osdSharedDeps_MomentTimezone_default.a.tz.names().map(tz=>({label:tz,text:tz}));const conditionTypeOptions=[{value:"none",text:"No condition"},{value:"min_index_age",text:"Minimum index age"},{value:"min_doc_count",text:"Minimum doc count"},{value:"min_size",text:"Minimum size"},{value:"min_rollover_age",text:"Minimum rollover age"},{value:"cron",text:"Cron expression"}];const Transition=_ref=>{var _conditions$cron,_conditions$cron2;let{uiTransition:uiTransition,onChangeTransition:onChangeTransition}=_ref;const conditionType=Object.keys(uiTransition.transition.conditions||[]).pop()||"none";const conditions=uiTransition.transition.conditions;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Condition",helpText:"Specify the condition needed to be met to transition to the destination state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{fullWidth:true,id:"condition-type",options:conditionTypeOptions,value:conditionType,style:{textTransform:"capitalize"},onChange:e=>{const selectedConditionType=e.target.value;const transition={...uiTransition.transition};if(selectedConditionType==="none")delete transition.conditions;if(selectedConditionType==="min_index_age")transition.conditions={min_index_age:"30d"};if(selectedConditionType==="min_doc_count")transition.conditions={min_doc_count:1e6};if(selectedConditionType==="min_size")transition.conditions={min_size:"50gb"};if(selectedConditionType==="min_rollover_age")transition.conditions={min_rollover_age:"7d"};if(selectedConditionType==="cron")transition.conditions={cron:{cron:{expression:"* 17 * * SAT",timezone:"America/Los_Angeles"}}};onChangeTransition({...uiTransition,transition:transition})},"data-test-subj":"create-state-action-type"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),conditionType==="min_index_age"&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum index age",helpText:"The minimum age required to transition to the next state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:conditions===null||conditions===void 0?void 0:conditions.min_index_age,onChange:e=>{const minIndexAge=e.target.value;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:{min_index_age:minIndexAge}}})},"data-test-subj":"transition-render-conditions-min-index-age"}))),conditionType==="min_doc_count"&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum doc count",helpText:"The minimum number of documents required to transition to the next state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{fullWidth:true,value:typeof(conditions===null||conditions===void 0?void 0:conditions.min_doc_count)==="undefined"?"":conditions===null||conditions===void 0?void 0:conditions.min_doc_count,onChange:e=>{const minDocCount=e.target.valueAsNumber;const conditions={min_doc_count:minDocCount};if(isNaN(minDocCount))conditions.min_doc_count=undefined;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:conditions}})},"data-test-subj":"transition-render-conditions-min-doc-count"}))),conditionType==="min_size"&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum index size",helpText:"The minimum size of the total primary shard storage required to transition to the next state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:conditions===null||conditions===void 0?void 0:conditions.min_size,onChange:e=>{const minSize=e.target.value;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:{min_size:minSize}}})},"data-test-subj":"transition-render-conditions-min-size"}))),conditionType==="min_rollover_age"&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Minimum rollover age",helpText:"The minimum age after a rollover has occurred that is required to transition to the next state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:conditions===null||conditions===void 0?void 0:conditions.min_rollover_age,onChange:e=>{const minRolloverAge=e.target.value;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:{min_rollover_age:minRolloverAge}}})},"data-test-subj":"transition-render-conditions-min-rollover-age"}))),conditionType==="cron"&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Cron expression",helpText:"The matching cron expression required to transition to the next state.",learnMore:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["M"],target:"_blank",rel:"noopener noreferrer"},"Learn more")}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,value:conditions===null||conditions===void 0||(_conditions$cron=conditions.cron)===null||_conditions$cron===void 0?void 0:_conditions$cron.cron.expression,onChange:e=>{var _uiTransition$transit;const expression=e.target.value;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:{cron:{cron:{expression:expression,timezone:((_uiTransition$transit=uiTransition.transition.conditions)===null||_uiTransition$transit===void 0||(_uiTransition$transit=_uiTransition$transit.cron)===null||_uiTransition$transit===void 0?void 0:_uiTransition$transit.cron.timezone)||""}}}}})},"data-test-subj":"transition-render-conditions-min-size"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Timezone",helpText:"A day starts from 00:00:00 in the specified timezone."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{fullWidth:true,i
6d:"timezone",options:timezones,value:conditions===null||conditions===void 0||(_conditions$cron2=conditions.cron)===null||_conditions$cron2===void 0?void 0:_conditions$cron2.cron.timezone,onChange:e=>{var _uiTransition$transit2;const timezone=e.target.value;onChangeTransition({...uiTransition,transition:{...uiTransition.transition,conditions:{cron:{cron:{expression:((_uiTransition$transit2=uiTransition.transition.conditions)===null||_uiTransition$transit2===void 0||(_uiTransition$transit2=_uiTransition$transit2.cron)===null||_uiTransition$transit2===void 0?void 0:_uiTransition$transit2.cron.expression)||"",timezone:timezone}}}}})}}))))};var Transition_Transition=Transition;var components_Transition=Transition_Transition;function CreateTransition_defineProperty(e,r,t){return(r=CreateTransition_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateTransition_toPropertyKey(t){var i=CreateTransition_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateTransition_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateTransition_CreateTransition extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateTransition_defineProperty(this,"onChange",selectedOptions=>{var _selectedOptions$pop;const destinationState=((_selectedOptions$pop=selectedOptions.pop())===null||_selectedOptions$pop===void 0?void 0:_selectedOptions$pop.label)||"";const{uiTransition:uiTransition}=this.state;if(uiTransition==null)return;const newTransition={...uiTransition.transition,state_name:destinationState};const newUiTransition={...uiTransition,transition:newTransition};this.setState({uiTransition:newUiTransition})});CreateTransition_defineProperty(this,"onCreateOption",searchValue=>{const normalizedSearchValue=searchValue.trim().toLowerCase();if(!normalizedSearchValue){return}const{uiTransition:uiTransition}=this.state;if(uiTransition==null)return;const newTransition={...uiTransition.transition,state_name:normalizedSearchValue};const newUiTransition={...uiTransition,transition:newTransition};this.setState({uiTransition:newUiTransition})});CreateTransition_defineProperty(this,"onChangeTransition",uiTransition=>{this.setState({uiTransition:uiTransition})});CreateTransition_defineProperty(this,"onClickSaveTransition",()=>{const{uiTransition:uiTransition}=this.state;if(!uiTransition)return;this.props.onClickSaveTransition(uiTransition)});let _uiTransition=props.editTransition;if(!_uiTransition){_uiTransition={transition:{state_name:""},id:Object(helpers["e"])()}}this.state={uiTransition:_uiTransition}}render(){const{editTransition:editTransition,onCloseCreateTransition:onCloseCreateTransition,stateOptions:stateOptions}=this.props;const{uiTransition:uiTransition}=this.state;let title="Add transition";if(!!editTransition)title="Edit transition";return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{fontWeight:200}},"Transitions define the conditions that need to be met for a state to change. After all actions in the current state are completed, the policy starts checking the conditions for transitions."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["M"],target:"_blank",rel:"noopener noreferrer"},"Learn more")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Destination state",helpText:"If entering a state that does not exist yet then you must create it before creating the policy."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{fullWidth:true,isClearable:false,placeholder:"Select a single option",singleSelection:{asPlainText:true},options:stateOptions.map(state=>({label:state})),selectedOptions:[{label:(uiTransition===null||uiTransition===void 0?void 0:uiTransition.transition.state_name)||""}],onChange:this.onChange,onCreateOption:this.onCreateOption,customOptionText:"Add {searchValue} state"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),!!uiTransition&&external_osdSharedDeps_React_default.a.createElement(components_Transition,{uiTransition:uiTransition,onChangeTransition:this.onChangeTransition})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{edit:!!editTransition,action:"transition",onClickCancel:onCloseCreateTransition,onClickAction:this.onClickSaveTransition})))}}var containers_CreateTransition=CreateTransition_CreateTransition;const TimeoutRetrySettings_options=[{value:"exponential",text:"Exponential"},{value:"constant",text:"Constant"},{value:"linear",text:"Linear"}];const TimeoutRetrySettings=_ref=>{var _action$action$retry,_action$action$retry2,_action$action$retry3;let{action:action,editAction:editAction,onChangeAction:onChangeAction}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"timeout-retry-settings",buttonContent:"Timeout and retry settings"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"5px 28px"},direction:"column"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement("span",{style:{color:"grey",fontWeight:200,fontSize:"15px"}},"Timeout and retry settings are supported to handle an action failure. You can specify parameters based on your need.")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Timeout",helpText:`The timeout peri
6od for the action. Accepts time units, e.g. "5h" or "1d".`}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:false,fullWidth:true,value:action.action.timeout||"",onChange:e=>{const timeout=e.target.value;onChangeAction(action.clone({...action.action,timeout:timeout}))}}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Retry count",helpText:"The number of times the action should be retried if it fails. Must be greater than 0."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{isInvalid:false,fullWidth:true,min:0,value:typeof((_action$action$retry=action.action.retry)===null||_action$action$retry===void 0?void 0:_action$action$retry.count)==="undefined"?"":action.action.retry.count,onChange:e=>{const count=e.target.valueAsNumber;const retry={...action.action.retry,count:count};if(isNaN(count))delete retry.count;onChangeAction(action.clone({...action.action,retry:retry}))}}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Retry backoff",helpText:"The backoff policy type to use when retrying."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"retry-backoff-type",fullWidth:true,options:TimeoutRetrySettings_options,value:((_action$action$retry2=action.action.retry)===null||_action$action$retry2===void 0?void 0:_action$action$retry2.backoff)||"",onChange:e=>{const backoff=e.target.value;onChangeAction(action.clone({...action.action,retry:{...action.action.retry,backoff:backoff}}))}}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Retry delay",helpText:`The time to wait between retries. Accepts time units, e.g. "2h" or "1d"`}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:false,fullWidth:true,value:((_action$action$retry3=action.action.retry)===null||_action$action$retry3===void 0?void 0:_action$action$retry3.delay)||"",onChange:e=>{const delay=e.target.value;onChangeAction(action.clone({...action.action,retry:{...action.action.retry,delay:delay}}))}})))))))};var TimeoutRetrySettings_TimeoutRetrySettings=TimeoutRetrySettings;var components_TimeoutRetrySettings=TimeoutRetrySettings_TimeoutRetrySettings;function CreateAction_defineProperty(e,r,t){return(r=CreateAction_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateAction_toPropertyKey(t){var i=CreateAction_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateAction_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateAction_CreateAction extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateAction_defineProperty(this,"onChangeSelectedAction",event=>{const selectedAction=event.target.value;const uiAction=utils_helpers["a"].getUIAction(selectedAction);this.setState({action:uiAction})});CreateAction_defineProperty(this,"onChangeAction",action=>{this.setState({action:action})});CreateAction_defineProperty(this,"onClickSaveAction",()=>{const{action:action}=this.state;if(!action)return;this.props.onClickSaveAction(action)});this.state={action:props.editAction}}render(){const{action:action}=this.state;const{editAction:editAction}=this.props;const actionOptions=Object(utils_helpers["c"])(utils_helpers["a"]);let bodyTitle="Add action";if(!!editAction)bodyTitle="Edit action";return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,bodyTitle)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{fontWeight:200}},"Actions are the operations ISM performs when an index is in a certain state."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["a"],target:"_blank",rel:"noopener noreferrer"},"Learn more")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Action type",helpText:"Select the action you want to add to this state."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{fullWidth:true,placeholder:"Select action type",id:"action-type",hasNoInitialSelection:true,options:actionOptions,value:action===null||action===void 0?void 0:action.type,style:{textTransform:"capitalize"},onChange:this.onChangeSelectedAction,"data-test-subj":"create-state-action-type"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),action===null||action===void 0?void 0:action.render(action,this.onChangeAction),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),action&&external_osdSharedDeps_React_default.a.createElement(components_TimeoutRetrySettings,{editAction:!!editAction,action:action,onChangeAction:this.onChangeAction})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{edit:!!editAction,action:"action",disabledAction:!action||!action.isValid(),onClickCancel:this.props.onClickCancelAction,onClickAction:this.onClickSaveAction})))}}var containers_CreateAction=CreateAction_CreateAction;function DraggableItem_extends(){return DraggableItem_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DraggableItem_extends.apply(null,arguments)}const DraggableItem=_ref=>{let{content:content,id:id,idx:idx,isLast:isLast,onClickDelete:onClickDelete,onClickEdit:onClickEdit,draggableType:draggableType}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDraggable"],{style:{padding:`0px 0px ${isLast?"0px":"10px"} 0px`}
6,key:id,index:idx,draggableId:id,customDragHandle:true},provided=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{className:"custom",paddingSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement("div",DraggableItem_extends({},provided.dragHandleProps,{"aria-label":"Drag Handle"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"grab"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,content),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{position:"top",content:external_osdSharedDeps_React_default.a.createElement("p",null,"Delete ",draggableType)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:"trash","aria-label":"Delete",color:"danger",onClick:onClickDelete,"data-test-subj":`draggable-item-delete-button-${id}`}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{position:"top",content:external_osdSharedDeps_React_default.a.createElement("p",null,"Edit ",draggableType)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:"pencil","aria-label":"Edit",color:"primary",onClick:onClickEdit,"data-test-subj":`draggable-item-edit-button-${id}`}))))))};var DraggableItem_DraggableItem=DraggableItem;var components_DraggableItem=DraggableItem_DraggableItem;const Actions_Actions=_ref=>{let{actions:actions,onClickDeleteAction:onClickDeleteAction,onClickEditAction:onClickEditAction,onDragEndActions:onDragEndActions,onClickAddAction:onClickAddAction}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Actions",helpText:"Actions are the operations ISM performs when an index is in a certain state."}),!!actions.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDragDropContext"],{onDragEnd:onDragEndActions},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDroppable"],{droppableId:"STATE_ACTIONS_DROPPABLE_AREA"},actions.map((action,idx)=>external_osdSharedDeps_React_default.a.createElement(components_DraggableItem,{key:action.id,content:action.content(),id:action.id,idx:idx,isLast:actions.length-1===idx,onClickDelete:()=>onClickDeleteAction(idx),onClickEdit:()=>onClickEditAction(action),draggableType:"action"}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),!actions.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",{style:{backgroundColor:"#F5F7FA",padding:"5px"}},external_osdSharedDeps_React_default.a.createElement("span",{style:{color:"grey",fontWeight:200,fontSize:"15px"}},"No actions have been added."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onClickAddAction},"+ Add action"))};var CreateState_Actions=Actions_Actions;const Transitions=_ref=>
6{let{transitions:transitions,onClickDeleteTransition:onClickDeleteTransition,onClickEditTransition:onClickEditTransition,onDragEndTransitions:onDragEndTransitions,onClickAddTransition:onClickAddTransition}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(EuiFormCustomLabel["a"],{title:"Transitions",helpText:"Transitions define the conditions that need to be met for a state to change. After all actions in the current state are completed, the policy starts checking the conditions for transitions."}),!!transitions.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:false,error:null},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDragDropContext"],{onDragEnd:onDragEndTransitions},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDroppable"],{droppableId:"STATE_TRANSITIONS_DROPPABLE_AREA"},transitions.map((transition,idx)=>external_osdSharedDeps_React_default.a.createElement(components_DraggableItem,{key:transition.id,id:transition.id,content:Object(utils_helpers["d"])(transition.transition),idx:idx,isLast:transitions.length-1===idx,onClickDelete:()=>onClickDeleteTransition(idx),onClickEdit:()=>onClickEditTransition(transition),draggableType:"transition"}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),!transitions.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",{style:{backgroundColor:"#F5F7FA",padding:"5px"}},external_osdSharedDeps_React_default.a.createElement("span",{style:{color:"grey",fontWeight:200,fontSize:"15px"}},"No transitions have been added."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onClickAddTransition},"+ Add Transition"))};var CreateState_Transitions=Transitions;function CreateState_defineProperty(e,r,t){return(r=CreateState_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateState_toPropertyKey(t){var i=CreateState_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateState_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateState_CreateState extends external_osdSharedDeps_React_["Component"]{constructor(props){var _props$state,_props$state2,_props$state3;super(props);CreateState_defineProperty(this,"onChangeStateName",event=>{const{state:state,policy:policy}=this.props;const name=event.target.value;const isEditing=!!this.props.state;let nameError="";if(!isEditing||isEditing&&name!==(state===null||state===void 0?void 0:state.name)){if(!!policy.states.find(state=>state.name===name)){nameError="A state with this name already exists."}}this.setState({name:name,nameError:nameError})});CreateState_defineProperty(this,"onDragEndActions",_ref=>{let{source:source,destination:destination}=_ref;if(source&&destination){const items=Object(external_osdSharedDeps_ElasticEui_["euiDragDropReorder"])(this.state.actions,source.index,destination.index);this.setState({actions:items})}});CreateState_defineProperty(this,"onDragEndTransitions",_ref2=>{let{source:source,destination:destination}=_ref2;if(source&&destination){const items=Object(external_osdSharedDeps_ElasticEui_["euiDragDropReorder"])(this.state.transitions,source.index,destination.index);this.setState({transitions:items})}});CreateState_defineProperty(this,"onClickDeleteAction",idx=>{const{actions:actions}=this.state;this.setState({actions:actions.slice(0,idx).concat(actions.slice(idx+1))})});CreateState_defineProperty(this,"onClickEditAction",action=>this.setState({editAction:action}));CreateState_defineProperty(this,"onClickAddAction",()=>this.setState({createAction:true}));CreateState_defineProperty(this,"onClickDeleteTransition",idx=>{const{transitions:transitions}=this.state;this.setState({transitions:transitions.slice(0,idx).concat(transitions.slice(idx+1))})});CreateState_defineProperty(this,"onClickEditTransition",transition=>this.setState({editTransition:transition}));CreateState_defineProperty(this,"onClickAddTransition",()=>{this.setState({createTransition:true})});CreateState_defineProperty(this,"onClickSaveTransition",transition=>{const{editTransition:editTransition,transitions:transitions}=this.state;let newTransitions=[...transitions,transition];if(!!editTransition){const foundTransitionIdx=transitions.findIndex(_ref3=>{let{id:id}=_ref3;return transition.id===id});if(foundTransitionIdx>=0){newTransitions=transitions.slice(0,foundTransitionIdx).concat(transition).c
6oncat(transitions.slice(foundTransitionIdx+1))}}this.setState(state=>({transitions:newTransitions,createTransition:false,editTransition:null}))});CreateState_defineProperty(this,"onClickSaveAction",action=>{const{editAction:editAction,actions:actions}=this.state;if(action!==null&&action!==void 0&&action.action){let newActions=[...actions,action];if(!!editAction){const foundActionIdx=actions.findIndex(_ref4=>{let{id:id}=_ref4;return editAction.id===id});if(foundActionIdx>=0){newActions=actions.slice(0,foundActionIdx).concat(action).concat(actions.slice(foundActionIdx+1))}}this.setState({actions:newActions,editAction:null,createAction:false})}});CreateState_defineProperty(this,"onClickCancelAction",()=>{this.setState({createAction:false,editAction:null})});CreateState_defineProperty(this,"onClickSaveState",()=>{const{order:order,afterBeforeState:afterBeforeState}=this.state;const{onSaveState:onSaveState,policy:policy}=this.props;onSaveState({name:this.state.name,actions:this.state.actions.map(action=>action.toAction()),transitions:this.state.transitions.map(transition=>transition.transition)},policy.states,order,afterBeforeState)});CreateState_defineProperty(this,"renderDefault",()=>{const{policy:policy,state:state}=this.props;const{actions:actions,name:name,nameError:nameError,afterBeforeState:afterBeforeState,order:order,disableOrderSelections:disableOrderSelections}=this.state;const stateOptions=policy.states.map(state=>({value:state.name,text:state.name})).filter(s=>s.value!==(state===null||state===void 0?void 0:state.name));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"State name"),external_osdSharedDeps_React_default.a.createElement("span",null)," "),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,isInvalid:!!nameError,error:nameError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{fullWidth:true,isInvalid:!!nameError,placeholder:"sample_hot_state",readOnly:false,value:name,onChange:this.onChangeStateName,"data-test-subj":"create-state-state-name"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Order"),external_osdSharedDeps_React_default.a.createElement("span",null)," "),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{disabled:disableOrderSelections,options:[{value:"after",text:"Add after"},{value:"before",text:"Add before"}],value:order,onChange:e=>this.setState({order:e.target.value}),"aria-label":"Retry failed policy from"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{disabled:disableOrderSelections,options:stateOptions,value:afterBeforeState,onChange:e=>this.setState({afterBeforeState:e.target.value}),"aria-label":"Retry failed policy from"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],null),external_osdSharedDeps_React_default.a.createElement(CreateState_Actions,{actions:actions,onClickDeleteAction:this.onClickDeleteAction,onClickEditAction:this.onClickEditAction,onDragEndActions:this.onDragEndActions,onClickAddAction:this.onClickAddAction}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],null),external_osdSharedDeps_React_default.a.createElement(CreateState_Transitions,{transitions:this.state.transitions,onDragEndTransitions:this.onDragEndTransitions,onClickDeleteTransition:this.onClickDeleteTransition,onClickEditTransition:this.onClickEditTransition,onClickAddTransition:this.onClickAddTransition}))});CreateState_defineProperty(this,"renderDefaultFooter",()=>{const{onCloseFlyout:onCloseFlyout,state:state}=this.props;const{name:name,nameError:nameError}=this.state;const isEditing=!!state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{iconType:"cross",onClick:onCloseFlyout,flush:"left"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,disabled:!name.trim().length||!!nameError,onClick:this.onClickSaveState},isEditing?"Update state":"Save state")))});const{afterBeforeState:_afterBeforeState,order:_order,disableOrderSelections:_disableOrderSelections}=Object(utils_helpers["e"])(props.state,props.policy.states);this.state={name:((_props$state=props.state)===null||_props$state===void 0?void 0:_props$state.name)||"",nameError:"",createAction:false,editAction:null,createTransition:false,editTransition:null,actions:((_props$state2=props.state)===null||_props$state2===void 0||(_props$state2=_props$state2.actions)===null||_props$state2===void 0?void 0:_props$state2.map(action=>utils_helpers["a"].getUIActionFromData(action)))||[],transitions:((_props$state3=props.state)===null||_props$state3===void 0||(_props$state3=_props$state3.transitions)===null||_props$state3===void 0?void 0:_props$state3.map(transition=>({id:Object(helpers["e"])(),transition:transition})))||[],afterBeforeState:_afterBeforeState,order:_order,disableOrderSelections:_disableOrderSelections}}render(){const{onCloseFlyout:onCloseFlyout,policy:policy,state:state}=this.props;const{name:name,createAction:createAction,editAction:editAction,createTransition:createTransition,editTransition:editTransition,actions:actions}=this.state;const isEditing=!!state;let title=`${isEditing?"Edit":"Create"} state`;if(createTransition||createAction||!!editTransition||!!editAction)title="State";if(name)title+=`: ${name}`;const stateOptions=policy.states.map(s=>s.name);let flyoutContent;if(createAction||!!editAction)flyoutContent=()=>external_osdSharedDeps_React_default.a.createElement(containers_CreateAction,{actions:actions,editAction:editAction,stateName:name,onClickCancelAction:this.onClickCancelAction,onClickSaveAction:this.onClickSaveAction});if(createTransition||editTransition)flyoutContent=()=>external_osdSharedDeps_React_default.a.createElement(containers_CreateTransition,{stateOptions:stateOptions,editTransition:editTransition,onCloseCreateTransition:()=>this.setState({createTransition:false,editTransition:null}),onClickSaveTransition:this.onClickSaveTransition});if(!flyoutContent)flyoutContent=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,this.renderDefault()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,this.renderDefaultFooter()));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPortal"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{hideCloseButton:true,ownFocus:false,onClose:onCloseFlyout,maxWidth:600,size:"m","aria-labelledby":"flyoutTitle"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"},title)))),flyoutContent()))}}var containers_CreateState=CreateState_CreateState;var ChannelNotification=__webpack_require__(86);var LegacyNotification=__webpack_require__(85);function ErrorNotification_defineProperty(e,r,t){return(r=ErrorNotification_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ErrorNotification_toPropertyKey(t){var i=ErrorNotification_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ErrorNotification_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ErrorNotification_ErrorNotification extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);ErrorNotification_defineProperty(this,"componentDidMount",async()=>{await this.getChannels()});ErrorNotification_defineProperty(this,"getChannels",async()=>{this.setState({loadingChannels:true});try{const{notificationService:notificationService}=this.props;const response=await notificationService.getChannels();if(response.ok){this.setState({channels:response.response.channel_list})}else{this.context.notifications.toasts.addDanger(`Could not load notification channels: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the notification channels"))}this.setState({loadingChannels:false})});this.state={channels:[],loadingChannels:true}}render(){var _errorNotification$ch,_errorNotification$me;const{errorNotification:errorNotification,errorNotificationJsonString:errorNotificationJsonString,onChangeChannelId:onChangeChannelId,onChangeMessage:onChangeMessage,onChangeErrorNotificationJsonString:onChangeErrorNotificationJsonString,onSwitchToChannels:onSwitchToChannels}=this.props;const{channels:channels,loadingChannels:loadingChannels}=this.state;const hasDestination=!!(errorNotification!==null&&errorNotification!==void 0&&errorNotification.destination);let content=external_osdSharedDeps_React_default.a.createElement(ChannelNotification["a"],{channelId:(errorNotification===null||errorNotification===void 0||(_errorNotification$ch=errorNotification.channel)===null||_errorNotification$ch===void 0?void 0:_errorNotification$ch.id)||"",channels:channels,loadingChannels:loadingChannels,message:(errorNotification===null||errorNotification===void 0||(_errorNotification$me=errorNotification.message_template)===null||_errorNotification$me===void 0?void 0:_errorNotification$me.source)||"",onChangeChannelId:onChangeChannelId,onChangeMessage:onChangeMessage,getChannels:this.getChannels});if(hasDestination){content=external_osdSharedDeps_React_default.a.createElement(LegacyNotification["a"],{notificationJsonString:errorNotificationJsonString,onChangeNotificationJsonString:onChangeErrorNotificationJsonString,onSwitchToChannels:onSwitchToChannels})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Error notification"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued"}," ",external_osdSharedDeps_React_default.a.createElement("i",null," â optional")," ")))
6),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:350}},"You can set up an error notification for when a policy execution fails."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["k"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,content))}}ErrorNotification_defineProperty(ErrorNotification_ErrorNotification,"contextType",core_services["b"]);var containers_ErrorNotification=ErrorNotification_ErrorNotification;function VisualCreatePolicy_extends(){return VisualCreatePolicy_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},VisualCreatePolicy_extends.apply(null,arguments)}function VisualCreatePolicy_defineProperty(e,r,t){return(r=VisualCreatePolicy_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function VisualCreatePolicy_toPropertyKey(t){var i=VisualCreatePolicy_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function VisualCreatePolicy_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class VisualCreatePolicy_VisualCreatePolicy extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);VisualCreatePolicy_defineProperty(this,"componentDidMount",async()=>{const breadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES];this.context.chrome.setBreadcrumbs(breadCrumbs);if(this.props.isEdit){const{id:id}=query_string_default.a.parse(this.props.location.search);if(typeof id==="string"&&!!id){const editBreadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW,{text:id},constants["f"].EDIT_POLICY]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES,constants["f"].EDIT_POLICY,{text:id}];this.context.chrome.setBreadcrumbs(editBreadCrumbs);await this.getPolicyToEdit(id)}else{this.context.notifications.toasts.addDanger(`Invalid policy id: ${id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}}else{const createBreadCrumbs=this.state.useNewUX?[constants["f"].INDEX_POLICIES_NEW,constants["f"].CREATE_POLICY_NEW]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES,constants["f"].CREATE_POLICY];this.context.chrome.setBreadcrumbs(createBreadCrumbs)}});VisualCreatePolicy_defineProperty(this,"getPolicyToEdit",async policyId=>{try{const{policyService:policyService}=this.props;const response=await policyService.getPolicy(policyId);if(response.ok){var _response$response$po;let errorNotificationJsonString="";if(!!((_response$response$po=response.response.policy.error_notification)!==null&&_response$response$po!==void 0&&_response$response$po.destination)){errorNotificationJsonString=JSON.stringify(response.response.policy.error_notification,null,4)}this.setState({policySeqNo:response.response.seqNo,policyPrimaryTerm:response.response.primaryTerm,policyId:response.response.id,policy:response.response.policy,errorNotificationJsonString:errorNotificationJsonString})}else{this.context.notifications.toasts.addDanger(`Could not load the policy: ${response.error}`);this.props.history.push(constants["D"].INDEX_POLICIES)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the policy"));this.props.history.push(constants["D"].INDEX_POLICIES)}});VisualCreatePolicy_defineProperty(this,"onChangePolicyId",e=>{const policyId=e.target.value;if(this.state.hasSubmitted)this.setState({policyId:policyId,policyIdError:policyId?"":"Required"});else this.setState({policyId:policyId})});VisualCreatePolicy_defineProperty(this,"onChangePolicyDescription",e=>{const description=e.target.value;this.setState(state=>({policy:{...state.policy,description:description}}))});VisualCreatePolicy_defineProperty(this,"onChangePolicy",policy=>{this.setState({policy:policy})});VisualCreatePolicy_defineProperty(this,"onChangeChannelId",e=>{const channelId=e.target.value;this.setState(state=>({policy:{...state.policy,error_notification:{message_template:{source:"",lang:"mustache"},...state.policy.error_notification,channel:{id:channelId}}}}))});VisualCreatePolicy_defineProperty(this,"onChangeMessage",e=>{const source=e.target.value;this.setState(state=>{var _state$policy$error_n;return{policy:{...state.policy,error_notification:{...state.policy.error_notification,message_template:{...(_state$policy$error_n=state.policy.error_notification)===null||_state$policy$error_n===void 0?void 0:_state$policy$error_n.message_template,source:source}}}}})});VisualCreatePolicy_defineProperty(this,"onChangeErrorNotificationJsonString",errorNotificationJsonString=>{this.setState({errorNotificationJsonString:errorNotificationJsonString})});VisualCreatePolicy_defineProperty(this,"onSwitchToChannels",()=>{this.setState(state=>({errorNotificationJsonString:"",policy:{...state.policy,error_notification:null}}))});VisualCreatePolicy_defineProperty(this,"onOpenFlyout",()=>this.setState({showFlyout:true}));VisualCreatePolicy_defineProperty(this,"onCloseFlyout",()=>this.setState({showFlyout:false,editingState:null}));VisualCreatePolicy_defineProperty(this,"onClickEditState",state=>{this.setState({editingState:state});this.onOpenFlyout()});VisualCreatePolicy_defineProperty(this,"onClickDeleteState",idx=>{const{policy:policy}=this.state;let defaultState=policy.default_state;const state=policy.states[idx];const states=policy.states.slice(0,idx).concat(policy.states.slice(idx+1));if(policy.default_state===(state===null||state===void 0?void 0:state.name)){var _states$;defaultState=((_states$=states[0])===null||_states$===void 0?void 0:_states$.name)||""}this.setState(state=>({policy:{...state.policy,states:states,default_state:defaultState}}))});VisualCreatePolicy_defineProperty(this,"onChangeDefaultState",event=>{const state=event.target.value;this.setState({policy:{...this.state.policy,default_state:state}})});VisualCreatePolicy_defineProperty(this,"onCancel",()=>{if(this.props.isEdit)this.props.history.goBack();else this.props.history.push(constants["D"].INDEX_POLICIES)});VisualCreatePolicy_defineProperty(this,"onCreate",async(policyId,policy)=>{const{policyService:policyService}=this.props;try{const response=await policyService.putPolicy({policy:policy},policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`Created policy: ${response.response._id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}else{this.setState({submitError:response.error,isSubmitting:false});this.context.notifications.toasts.addDanger(`Failed to create policy: ${response.error}`)}}catch(err){const errorMessage=Object(helpers["d"])(err,"There was a problem creating the policy");this.context.notifications.toasts.addDanger(errorMessage);this.setState({submitError:errorMessage,isSubmitting:false})}});VisualCreatePolicy_defineProperty(this,"onUpdate",async(policyId,policy)=>{try{const{policyService:policyService}=this.props;const{policyPrimaryTerm:policyPrimaryTerm,policySeqNo:policySeqNo}=this.state;if(policySeqNo==null||policyPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update policy without seqNo and primaryTerm");return}const response=await policyService.putPolicy({policy:policy},policyId,policySeqNo,policyPrimaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Updated policy: ${response.response._id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}else{this.context.notifications.toasts.addDanger(`Failed to update policy: ${response.error}`);this.setState({submitError:response.error,isSubmitting:false})}}catch(err){const errorMessage=Object(helpers["d"])(err,"There was a problem updating the policy");this.context.notifications.toasts.addDanger(errorMessage);this.setState({submitError:errorMessage,isSubmitting:false})}});VisualCreatePolicy_defineProperty(this,"onSubmit",async()=>{const{isEdit:isEdit}=this.props;const{policyId:policyId,policy:policy,errorNotificationJsonString:errorNotificationJsonString}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{if(!policyId.trim()){this.setState({policyIdError:"Required"})}else{const mergedPolicy={...policy};if(!!errorNotificationJsonString){mergedPolicy.error_notification=JSON.parse(errorNotificationJsonString)}if(isEdit)await this.onUpdate(policyId,mergedPolicy);else await this.onCreate(policyId,mergedPolicy)}}catch(err){this.context.notifications.toasts.addDanger("Invalid Policy");console.error(err);this.setState({isSubmitting:false})}});VisualCreatePolicy_defineProperty(this,"onSaveState",(state,states,order,afterBeforeState)=>{const{policy:policy,editingState:editingState}=this.state;const updatedPolicy=Object(utils_helpers["f"])(policy,state,editingState,states,order,afterBeforeState);this.setState({policy:updatedPolicy});this.onCloseFlyout()});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={policyId:"",policy:VisualCreatePolicy_utils_constants["q"],showFlyout:false,editingState:null,policySeqNo:null,policyPrimaryTerm:null,policyIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false,errorNotificationJsonString:"",useNewUX:useNewUx}}render(){const{isEdit:isEdit,notificationService:notificationService}=this.props;const{policyId:policyId,policyIdError:policyIdError,policy:policy,showFlyout:showFlyout,editingState:editingState,errorNotificationJsonString:errorNotificationJsonString,useNewUX:useNewUX}=this.state;const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Policies let you automatically perform administrative operations on indices.",links:{label:"Learn more",href:constants["z"],iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"25px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},!useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},external_osdSharedDeps_React_default.a.createElement("h1",null,isEdit?"Edit":"Create"," policy"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"Policies let you automatically perform administrative operations on indices."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["z"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData})),external_osdSharedDeps_React_default.a.createElement(components_PolicyInfo,{isEdit:isEdit,policyId:policyId,policyIdError:policyIdError,description:policy.description,onChangePolicyId:this.onChangePolicyId,onChangeDescription:this.onChangePolicyDescription}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(containers_ErrorNotification,{key:this.props.dataSourceId,errorNotification:policy.error_notification,errorNotificationJsonString:errorNotificationJsonString,onChangeChannelId:this.onChangeChannelId,onChangeMessage:this.onChangeMessage,onChangeErrorNotificationJsonString:this.onChangeErrorNotificationJsonString,onSwitchToChannels:this.onSwitchToChannels,notificationService:notificationService}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_ISMTemplates,{policy:policy,onChangePolicy:this.onChangePolicy}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_States,{policy:policy,onOpenFlyout:this.onOpenFlyout,onClickEditState:this.onClickEditState,onClickDeleteState:this.onClickDeleteState,onChangeDefaultState:this.onChangeDefaultState}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),showFlyout&&external_osdSharedDeps_React_default.a.createElement(containers_CreateState,{state:editingState,policy:policy,onSaveState:this.onSaveState,onCloseFlyout:this.onCloseFlyout}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit}
6,isEdit?"Update":"Create"))))}}VisualCreatePolicy_defineProperty(VisualCreatePolicy_VisualCreatePolicy,"contextType",core_services["b"]);var containers_VisualCreatePolicy_VisualCreatePolicy=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(VisualCreatePolicy_VisualCreatePolicy,VisualCreatePolicy_extends({},props,dataSourceMenuProperties))};var containers_VisualCreatePolicy=containers_VisualCreatePolicy_VisualCreatePolicy;var pages_VisualCreatePolicy=containers_VisualCreatePolicy;function ChangeManagedIndices_defineProperty(e,r,t){return(r=ChangeManagedIndices_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ChangeManagedIndices_toPropertyKey(t){var i=ChangeManagedIndices_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ChangeManagedIndices_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ChangeManagedIndices_ChangeManagedIndices extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);ChangeManagedIndices_defineProperty(this,"state",{managedIndicesIsLoading:false,managedIndices:[],stateFilterSearchValue:""});ChangeManagedIndices_defineProperty(this,"onManagedIndexSearchChange",async searchValue=>{const{managedIndexService:managedIndexService}=this.props;this.setState({managedIndicesIsLoading:true,managedIndices:[]});try{const queryObject={from:0,size:10,search:searchValue,sortDirection:"desc",sortField:"name",showDataStreams:true};const managedIndicesResponse=await managedIndexService.getManagedIndices(queryObject);if(managedIndicesResponse.ok){const options=searchValue.trim()?[{label:`${searchValue}*`}]:[];const managedIndices=managedIndicesResponse.response.managedIndices.map(managedIndex=>({label:managedIndex.index,value:managedIndex}));this.setState({managedIndices:options.concat(managedIndices)})}else{if(managedIndicesResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("You have not created a managed index yet")}else{this.context.notifications.toasts.addDanger(managedIndicesResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(err.message)}this.setState({managedIndicesIsLoading:false})});ChangeManagedIndices_defineProperty(this,"onStateFilterSearchChange",searchValue=>{this.setState({stateFilterSearchValue:searchValue})})}async componentDidMount(){await this.onManagedIndexSearchChange("")}render(){const{managedIndices:managedIndices,managedIndicesIsLoading:managedIndicesIsLoading,stateFilterSearchValue:stateFilterSearchValue}=this.state;const{selectedManagedIndices:selectedManagedIndices,selectedStateFilters:selectedStateFilters,managedIndicesError:managedIndicesError}=this.props;const uniqueStates=selectedManagedIndices.reduce((accu,selectedManagedIndex)=>{if(!selectedManagedIndex.value)return accu;const policy=selectedManagedIndex.value.policy;if(!policy)return accu;policy.states.forEach(state=>{accu.add(state.name)});return accu},new Set);const options=stateFilterSearchValue.trim()?[{label:`${stateFilterSearchValue}*`}]:[];const stateOptions=options.concat([...uniqueStates].map(stateName=>({label:stateName})));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Choose managed indices")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Managed
6indices")),helpText:"You can use * as wildcards to form index patterns.",isInvalid:!!managedIndicesError,error:managedIndicesError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"",async:true,options:managedIndices,isInvalid:!!managedIndicesError,selectedOptions:selectedManagedIndices,isLoading:managedIndicesIsLoading,onChange:this.props.onChangeManagedIndices,onSearchChange:this.onManagedIndexSearchChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"State filters")),helpText:"Apply new policy only on managed indices in these states."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{isDisabled:!selectedManagedIndices.length,placeholder:"Choose state filters",options:stateOptions,selectedOptions:selectedStateFilters,onChange:this.props.onChangeStateFilters,onSearchChange:this.onStateFilterSearchChange}))))}}ChangeManagedIndices_defineProperty(ChangeManagedIndices_ChangeManagedIndices,"contextType",core_services["b"]);var components_ChangeManagedIndices=ChangeManagedIndices_ChangeManagedIndices;function NewPolicy_defineProperty(e,r,t){return(r=NewPolicy_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function NewPolicy_toPropertyKey(t){var i=NewPolicy_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function NewPolicy_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class NewPolicy_NewPolicy extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);NewPolicy_defineProperty(this,"state",{stateOptions:[],policiesIsLoading:false,policies:[]});NewPolicy_defineProperty(this,"onPolicySearchChange",async searchValue=>{const{indexService:indexService}=this.props;this.setState({policiesIsLoading:true,policies:[]});try{const searchPoliciesResponse=await indexService.searchPolicies(searchValue,true);if(searchPoliciesResponse.ok){const policies=searchPoliciesResponse.response.policies.map(p=>({label:p.id,value:p.policy}));this.setState({policies:policies})}else{if(searchPoliciesResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("You have not created a policy yet")}else{this.context.notifications.toasts.addDanger(searchPoliciesResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem searching policies"))}this.setState({policiesIsLoading:false})})}async componentDidMount(){await this.onPolicySearchChange("")}render(){const{selectedPolicies:selectedPolicies,stateRadioIdSelected:stateRadioIdSelected,stateSelected:stateSelected,selectedPoliciesError:selectedPoliciesError,useUpdatedUX:useUpdatedUX}=this.props;const{policies:policies,policiesIsLoading:policiesIsLoading}=this.state;const hasSelectedPolicy=!!selectedPolicies.length;const stateOptions=external_osdSharedDeps_Lodash_default.a.flatten(selectedPolicies.map(selectedPolicy=>selectedPolicy.value.states.map(state=>({value:state.name,text:state.name}))));const currentRadio={id:ChangePolicy_Radio.Current,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"Keep indices in their current state after the policy takes effect"))};const stateRadio={id:ChangePolicy_Radio.State,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"Switch indices to the following state after the policy takes effect")),disabled:!hasSelectedPolicy||!stateOptions.length};const radioOptions=[currentRadio,stateRadio];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Choose new policy")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"When the new policy will take effect depends on the current state of indices and the states of the new policy."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["j"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"New policy")),isInvalid:!!selectedPoliciesError,error:selectedPoliciesError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"",async:true,options:policies,isInvalid:!!selectedPoliciesError,singleSelection:{asPlainText:true},selectedOptions:selectedPolicies,isLoading:policiesIsLoading,onChange:this.props.onChangePolicy,onSearchChange:this.onPolicySearchChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:radioOptions,idSelected:stateRadioI
6dSelected,onChange:this.props.onChangeStateRadio}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{disabled:stateRadioIdSelected!==ChangePolicy_Radio.State,options:stateOptions,value:stateSelected,onChange:this.props.onStateSelectChange,"aria-label":"Start state for new policy"}))))}}NewPolicy_defineProperty(NewPolicy_NewPolicy,"contextType",core_services["b"]);var components_NewPolicy=NewPolicy_NewPolicy;function ChangePolicy_extends(){return ChangePolicy_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ChangePolicy_extends.apply(null,arguments)}function ChangePolicy_defineProperty(e,r,t){return(r=ChangePolicy_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ChangePolicy_toPropertyKey(t){var i=ChangePolicy_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ChangePolicy_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}let ChangePolicy_Radio=function(Radio){Radio["Current"]="current";Radio["State"]="state";return Radio}({});class ChangePolicy_ChangePolicy extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);ChangePolicy_defineProperty(this,"state",ChangePolicy_ChangePolicy.emptyState);ChangePolicy_defineProperty(this,"onChangeSelectedPolicy",selectedPolicies=>{const selectedPoliciesError=selectedPolicies.length?"":"Required";this.setState({selectedPolicies:selectedPolicies,selectedPoliciesError:selectedPoliciesError,stateSelected:"",stateRadioIdSelected:ChangePolicy_Radio.Current})});ChangePolicy_defineProperty(this,"onChangeManagedIndices",selectedManagedIndices=>{const managedIndicesError=selectedManagedIndices.length?"":"Required";if(!selectedManagedIndices.length){this.onChangeStateFilters([])}this.setState({selectedManagedIndices:selectedManagedIndices,managedIndicesError:managedIndicesError})});ChangePolicy_defineProperty(this,"onChangeStateFilters",selectedStateFilters=>{this.setState({selectedStateFilters:selectedStateFilters})});ChangePolicy_defineProperty(this,"onChangeStateRadio",optionId=>{this.setState({stateRadioIdSelected:optionId})});ChangePolicy_defineProperty(this,"onStateSelectChange",e=>{this.setState({stateSelected:e.target.value})});ChangePolicy_defineProperty(this,"onChangePolicy",async()=>{try{const{managedIndexService:managedIndexService}=this.props;const{selectedPolicies:selectedPolicies,selectedManagedIndices:selectedManagedIndices,selectedStateFilters:selectedStateFilters,stateRadioIdSelected:stateRadioIdSelected,stateSelected:stateSelected}=this.state;if(!selectedManagedIndices.length||!selectedPolicies.length)return;const indices=selectedManagedIndices.map(selectedManagedIndex=>selectedManagedIndex.label);const policyId=selectedPolicies[0].label;const state=stateRadioIdSelected===ChangePolicy_Radio.State?stateSelected:null;const include=selectedStateFilters.map(selectedStateFilter=>({state:selectedStateFilter.label}));const changePolicyResponse=await managedIndexService.changePolicy(indices,policyId,state,include);if(changePolicyResponse.ok){const{updatedIndices:updatedIndices,failedIndices:failedIndices,failures:failures}=changePolicyResponse.response;if(updatedIndices){this.context.notifications.toasts.addSuccess(`Changed policy on ${updatedIndices} indexes`)}if(failures){this.context.notifications.toasts.addDanger(`Failed to change policy on ${failedIndices.map(failedIndex=>`[${failedIndex.indexName}, ${failedIndex.reason}]`).join(", ")}`)}}else{this.context.notifications.toasts.addDanger(changePolicyResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem changing policy"))}});ChangePolicy_defineProperty(this,"onCancel",()=>this.props.history.goBack());ChangePolicy_defineProperty(this,"onSubmit",async()=>{const{selectedPolicies:selectedPolicies,selectedManagedIndices:selectedManagedIndices}=this.state;const managedIndicesError=selectedManagedIndices.length?"":"Required";const selectedPoliciesError=selectedPolicies.length?"":"Required";this.setState({managedIndicesError:managedIndicesError,selectedPoliciesError:selectedPoliciesError,hasSubmitted:true});if(selectedManagedIndices.length&&selectedPolicies.length){await this.onChangePolicy()}})}
6async componentDidMount(){const breadCrumbs=this.props.useUpdatedUX?[constants["f"].MANAGED_INDICES,constants["f"].CHANGE_POLICY]:[constants["f"].INDEX_MANAGEMENT,constants["f"].MANAGED_INDICES,constants["f"].CHANGE_POLICY];this.context.chrome.setBreadcrumbs(breadCrumbs)}componentDidUpdate(prevProps,prevState){if(prevProps.dataSourceId!==this.props.dataSourceId){this.setState({...ChangePolicy_ChangePolicy.emptyState})}}render(){const{indexService:indexService,managedIndexService:managedIndexService,useUpdatedUX:useUpdatedUX}=this.props;const{selectedPolicies:selectedPolicies,selectedManagedIndices:selectedManagedIndices,selectedStateFilters:selectedStateFilters,stateRadioIdSelected:stateRadioIdSelected,stateSelected:stateSelected,managedIndicesError:managedIndicesError,selectedPoliciesError:selectedPoliciesError,hasSubmitted:hasSubmitted}=this.state;const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_ChangeManagedIndices,ChangePolicy_extends({key:`changeManagedIndices-${this.props.dataSourceId}`},this.props,{managedIndexService:managedIndexService,selectedManagedIndices:selectedManagedIndices,selectedStateFilters:selectedStateFilters,onChangeManagedIndices:this.onChangeManagedIndices,onChangeStateFilters:this.onChangeStateFilters,managedIndicesError:hasSubmitted?managedIndicesError:""})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_NewPolicy,ChangePolicy_extends({key:`newPolicy-${this.props.dataSourceId}`},this.props,{indexService:indexService,selectedPolicies:selectedPolicies,stateRadioIdSelected:stateRadioIdSelected,stateSelected:stateSelected,onChangePolicy:this.onChangeSelectedPolicy,onChangeStateRadio:this.onChangeStateRadio,onStateSelectChange:this.onStateSelectChange,selectedPoliciesError:hasSubmitted?selectedPoliciesError:""})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"changePolicyCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,"data-test-subj":"changePolicyChangeButton"},"Change"))));return!useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 25px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Change policy")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common()):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},Common())}}ChangePolicy_defineProperty(ChangePolicy_ChangePolicy,"contextType",core_services["b"]);ChangePolicy_defineProperty(ChangePolicy_ChangePolicy,"emptyState",{selectedPolicies:[],selectedManagedIndices:[],selectedStateFilters:[],stateRadioIdSelected:ChangePolicy_Radio.Current,stateSelected:"",managedIndicesError:"",selectedPoliciesError:"",hasSubmitted:false});var containers_ChangePolicy_ChangePolicy=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(ChangePolicy_ChangePolicy,ChangePolicy_extends({}
6,props,dataSourceMenuProperties,{useUpdatedUX:useUpdatedUX}))};var containers_ChangePolicy=containers_ChangePolicy_ChangePolicy;var pages_ChangePolicy=containers_ChangePolicy;const JSONModal=_ref=>{let{title:title,json:json,onClose:onClose}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"m",paddingSize:"m",inline:false,isCopyable:true},JSON.stringify(json,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose,"data-test-subj":"jsonModalCloseButton"},"Close"))))};var JSONModal_JSONModal=JSONModal;var components_JSONModal=JSONModal_JSONModal;class PolicySettings_PolicySettings extends external_osdSharedDeps_React_["Component"]{render(){const{policyId:policyId,errorNotification:errorNotification,primaryTerm:primaryTerm,lastUpdated:lastUpdated,description:description,sequenceNumber:sequenceNumber}=this.props;const updatedDate=lastUpdated?new Date(lastUpdated).toLocaleString():"-";let errorNotificationValue="-";if(errorNotification){errorNotificationValue=external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>onShow(components_JSONModal,{title:"Error notification",json:errorNotification})},"View code")})}const infoItems=[{term:"Policy name",value:policyId},{term:"Error notification",value:errorNotificationValue},{term:"Primary term",value:primaryTerm},{term:"Last updated",value:updatedDate},{term:"Policy description",value:description||"-"},{term:"Sequence number",value:sequenceNumber}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`Policy settings`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},infoItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}#${item.value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value)))))))}}function DeleteModal_defineProperty(e,r,t){return(r=DeleteModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DeleteModal_toPropertyKey(t){var i=DeleteModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function DeleteModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class DeleteModal_DeleteModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);DeleteModal_defineProperty(this,"state",{confirmDeleteText:""});DeleteModal_defineProperty(this,"onChange",e=>{this.setState({confirmDeleteText:e.target.value})})}render(){const{policyId:policyId,closeDeleteModal:closeDeleteModal,onClickDelete:onClickDelete}=this.props;const{confirmDeleteText:confirmDeleteText}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiConfirmModal"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete policy")),onCancel:closeDeleteModal,onConfirm:onClickDelete,cancelButtonText:"Cancel",confirmButtonText:"Delete policy",buttonColor:"danger",defaultFocusedButton:"confirm",confirmButtonDisabled:confirmDeleteText!="delete"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,'Delete "',external_osdSharedDeps_React_default.a.createElement("strong",null,policyId),'" permanently? Indices will no longer be managed using this policy.'),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:`To confirm deleti
6on, type "delete".`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:confirmDeleteText,placeholder:"delete",onChange:this.onChange,"data-test-subj":"deleteTextField"})))))}}function PolicyDetails_extends(){return PolicyDetails_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},PolicyDetails_extends.apply(null,arguments)}function PolicyDetails_defineProperty(e,r,t){return(r=PolicyDetails_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function PolicyDetails_toPropertyKey(t){var i=PolicyDetails_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function PolicyDetails_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class PolicyDetails_PolicyDetails extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);PolicyDetails_defineProperty(this,"componentDidMount",async()=>{this.state.useNewUX?this.context.chrome.setBreadcrumbs([constants["f"].INDEX_POLICIES_NEW]):this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES]);const{id:id}=query_string_default.a.parse(this.props.location.search);if(typeof id==="string"){this.state.useNewUX?this.context.chrome.setBreadcrumbs([constants["f"].INDEX_POLICIES_NEW,{text:id}]):this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].INDEX_POLICIES,{text:id}]);await this.getPolicy(id)}else{this.context.notifications.toasts.addDanger(`Invalid policy id: ${id}`);this.props.history.push(constants["D"].INDEX_POLICIES)}});PolicyDetails_defineProperty(this,"getPolicy",async policyId=>{try{const{policyService:policyService}=this.props;const response=await policyService.getPolicy(policyId);if(response.ok&&!!response.response.policy){this.setState({policy:response.response,policyId:response.response.id})}else{const errorMessage=response.ok?"Policy was empty":response.error;this.context.notifications.toasts.addDanger(`Could not load the policy: ${errorMessage}`);this.props.history.push(constants["D"].INDEX_POLICIES)}}catch(err){this.context.notifications.toasts.addDanger(`Could not load the policy`);this.props.history.push(constants["D"].INDEX_POLICIES)}});PolicyDetails_defineProperty(this,"onEdit",visual=>{const{policyId:policyId}=this.state;if(policyId)this.props.history.push(`${constants["D"].EDIT_POLICY}?id=${policyId}${visual?"&type=visual":""}`)});PolicyDetails_defineProperty(this,"closeEditModal",()=>{this.setState({isEditModalVisible:false})});PolicyDetails_defineProperty(this,"showEditModal",()=>{this.setState({isEditModalVisible:true})});PolicyDetails_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});PolicyDetails_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});PolicyDetails_defineProperty(this,"showJSONModal",()=>this.setState({isJSONModalOpen:true}));PolicyDetails_defineProperty(this,"closeJSONModal",()=>this.setState({isJSONModalOpen:false}));PolicyDetails_defineProperty(this,"onClickDelete",async()=>{const{policyService:policyService}=this.props;const{policyId:policyId}=this.state;try{const response=await policyService.deletePolicy(policyId);if(response.ok){this.closeDeleteModal();this.context.notifications.toasts.addSuccess(`"Policy ${policyId}" successfully deleted`);this.props.history.push(constants["D"].INDEX_POLICIES)}else{this.context.notifications.toasts.addDanger(`Could not delete the policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the policy"))}});PolicyDetails_defineProperty(this,"onTableChange",_ref=>{let{page:page}=_ref;const{index:pageIndex,size:pageSize}=page;this.setState({pageIndex:pageIndex,pageSize:pageSize})});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={policyId:"",isJSONModalOpen:false,policy:null,isDeleteModalVisible:false,isEditModalVisible:false,pageIndex:0,pageSize:10,showPerPageOptions:true,useNewUX:useNewUx}}componentDidUpdate(prevProps,prevState,snapshot){if(prevProps.dataSourceId!==this.props.dataSourceId){this.setState({policyId:"",policy:null,isJSONModalOpen:false,isDeleteModalVisible:false,pageIndex:0,pageSize:10,showPerPageOptions:true})}}render(){const{policyId:policyId,isJSONModalOpen:isJSONModalOpen,policy:policy,isDeleteModalVisible:isDeleteModalVisible,isEditModalVisible:isEditModalVisible,pageIndex:pageIndex,pageSize:pageSize,showPerPageOptions:showPerPageOptions,useNewUX:useNewUX}=this.state;if(!policy){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"center",alignItems:"center",style:{marginTop:"100px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"xl"}))}const convertedISMTemplates=Object(utils_helpers["b"])(policy.policy.ism_template);const columns=[{field:"index_patterns",name:"Index patterns",truncateText:false},{field:"priority",name:"Priority",truncateText:false}];const pagination={pageIndex:pageIndex,pageSize:pageSize,totalItemCount:convertedISMTemplates.length||0,pageSizeOptions:[10,20,50],hidePerPageOptions:!showPerPageOptions};const editModal=()=>isEditModalVisible&&external_osdSharedDeps_React_default.a.createElement(components_CreatePolicyModal,{isEdit:true,onClose:this.closeEditModal,onClickContinue:this.onEdit});const jsonModal=()=>isJSONModalOpen&&external_osdSharedDeps_React_default.a.createElement(components_JSONModal,{title:"View JSON of "+policyId,json:policy,onClose:this.closeJSONModal});const deleteModal=()=>isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(DeleteModal_DeleteModal,{policyId:policyId,closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{iconType:"trash",testId:"deleteButton",color:"danger",ariaLabel:"delete",run:this.showDeleteModal,controlType:"icon",display:"base"},{id:"Edit",label:"Edit policy",testId:"editButton",run:this.showEditModal,controlType:"button"},{id:"View JSON",label:"View JSON",testId:"viewJSONButton",run:this.showJSONModal,fill:true,controlType:"button"}]}),editModal()):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},external_osdSharedDeps_React_default.a.createElement("h1",null,policyId)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref2=>{let{onShow:onShow}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>onShow(components_CreatePolicyModal,{isEdit:true,onClickContinue:this.onEdit}
6),"data-test-subj":"policy-details-edit-button"},"Edit")})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showDeleteModal,color:"danger","data-test-subj":"deleteButton"},"Delete")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showJSONModal,"data-test-subj":"viewButton"},"View JSON"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(PolicySettings_PolicySettings,{policyId:policyId,errorNotification:policy.policy.error_notification,primaryTerm:policy.primaryTerm,lastUpdated:policy.policy.last_updated_time,description:policy.policy.description,sequenceNumber:policy.seqNo,ismTemplates:policy.policy.ism_template||[]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`ISM Templates (${convertedISMTemplates.length})`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:convertedISMTemplates,columns:columns,pagination:pagination,onChange:this.onTableChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_States,{onOpenFlyout:()=>{},onChangeDefaultState:()=>{},onClickEditState:()=>{},policy:policy.policy,onClickDeleteState:()=>{},isReadOnly:true}),jsonModal(),deleteModal())}}PolicyDetails_defineProperty(PolicyDetails_PolicyDetails,"contextType",core_services["b"]);var containers_PolicyDetails_PolicyDetails=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(PolicyDetails_PolicyDetails,PolicyDetails_extends({},props,dataSourceMenuProperties))};var containers_PolicyDetails=containers_PolicyDetails_PolicyDetails;const RollupEmptyPrompt_TEXT={RESET_FILTERS:"There are no rollup jobs matching your applied filters. Reset your filters to view your rollup jobs.",NO_ROLLUPS:"Rollup jobs help you conserve storage space for historical time series data while preserving the specific information you need.",LOADING:"Loading rollup jobs..."};const RollupEmptyPrompt_getMessagePrompt=_ref=>{let{filterIsApplied:filterIsApplied,loading:loading}=_ref;if(loading)return RollupEmptyPrompt_TEXT.LOADING;if(filterIsApplied)return RollupEmptyPrompt_TEXT.RESET_FILTERS;return RollupEmptyPrompt_TEXT.NO_ROLLUPS};const RollupEmptyPrompt_getActions=_ref2=>{let{filterIsApplied:filterIsApplied,loading:loading,resetFilters:resetFilters}=_ref2;if(loading){return null}if(filterIsApplied){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:resetFilters,"data-test-subj":"rollupEmptyPromptRestFilters"},"Reset Filters")}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{href:`${constants["y"]}#${constants["D"].CREATE_ROLLUP}`,"data-test-subj":"emptyPromptCreateRollupButton",iconType:"plus",fill:true},"Create rollup job")};const RollupEmptyPrompt=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,RollupEmptyPrompt_getMessagePrompt(props))),actions:RollupEmptyPrompt_getActions(props)});var RollupEmptyPrompt_RollupEmptyPrompt=RollupEmptyPrompt;var components_RollupEmptyPrompt=RollupEmptyPrompt_RollupEmptyPrompt;const Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const Rollups_utils_constants_DEFAULT_QUERY_PARAMS={from:0,size:20,search:"",sortField:"_id",sortDirection:constants["I"].DESC};function Rollups_utils_helpers_getURLQueryParams(location){const{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?Rollups_utils_constants_DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?Rollups_utils_constants_DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?Rollups_utils_constants_DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="str
6ing"?Rollups_utils_constants_DEFAULT_QUERY_PARAMS.sortField:sortField,sortDirection:typeof sortDirection!=="string"?Rollups_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection:sortDirection}}const helpers_renderTime=time=>{const momentTime=external_osdSharedDeps_Moment_default()(time).local();if(time&&momentTime.isValid())return momentTime.format("MM/DD/YY h:mm a");return"-"};const renderEnabled=isEnabled=>isEnabled?"Enabled":"Disabled";const renderContinuous=continuous=>continuous?"Yes":"No";function DeleteModal_DeleteModal_defineProperty(e,r,t){return(r=DeleteModal_DeleteModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DeleteModal_DeleteModal_toPropertyKey(t){var i=DeleteModal_DeleteModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function DeleteModal_DeleteModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class DeleteModal_DeleteModal_DeleteModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);DeleteModal_DeleteModal_defineProperty(this,"state",{confirmDeleteText:""});DeleteModal_DeleteModal_defineProperty(this,"onChange",e=>{this.setState({confirmDeleteText:e.target.value})})}render(){const{rollupId:rollupId,closeDeleteModal:closeDeleteModal,onClickDelete:onClickDelete}=this.props;const{confirmDeleteText:confirmDeleteText}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiConfirmModal"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete job(s)")),onCancel:closeDeleteModal,onConfirm:onClickDelete,cancelButtonText:"Cancel",confirmButtonText:"Delete",buttonColor:"danger",defaultFocusedButton:"confirm",confirmButtonDisabled:confirmDeleteText!="delete"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},'By deleting "',external_osdSharedDeps_React_default.a.createElement("strong",null,rollupId),'", all future scheduled rollup execution will be canceled. However, your target index will remain as it is.')),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:"To confirm deletion, enter delete in the text field"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:confirmDeleteText,placeholder:"delete",onChange:this.onChange,"data-test-subj":"deleteTextField"})))))}}var components_DeleteModal=DeleteModal_DeleteModal_DeleteModal;const renderStatus=metadata=>{if(metadata==null||metadata==undefined||metadata.rollup_metadata==null)return external_osdSharedDeps_React_default.a.createElement("dd",null,"-");let icon;let iconColor;let textColor;let text;switch(metadata.rollup_metadata.status){case"failed":icon="alert";iconColor="danger";textColor="danger";text="Failed: "+metadata.rollup_metadata.failure_reason;break;case"finished":icon="check";iconColor="success";textColor="secondary";text="Complete";break;case"init":return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{size:"s",type:"clock",color:"primary"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{color:"#006BB4"}},"Initializing")));case"started":icon="play";iconColor="success";textColor="secondary";text="Started";break;case"stopped":icon="stop";iconColor="subdued";textColor="subdued";text="Stopped";break;default:return external_osdSharedDeps_React_default.a.createElement("dd",null,"-")}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{size:"s",type:icon,color:iconColor})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",color:textColor},text)))};function Rollups_extends(){return Rollups_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Rollups_extends.apply(null,arguments)}function Rollups_defineProperty(e,r,t){return(r=Rollups_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Rollups_toPropertyKey(t){var i=Rollups_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Rollups_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Rollups_Rollups extends components_MDSEnabledComponent{constructor(props){super(props);Rollups_defineProperty(this,"getRollups",async()=>{this.setState({loadingRollups:true});try{const{rollupService:rollupService,history:history}=this.props;const queryObject=Rollups_Rollups.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const rollupJobsResponse=await rollupService.getRollups(queryObject);if(rollupJobsResponse.ok){const{rollups:rollups,totalRollups:totalRollups,metadata:metadata}=rollupJobsResponse.response;this.setState({rollups:rollups,totalRollups:totalRollups,rollupExplain:metadata})}else{this.context.notifications.toasts.addDanger(rollupJobsResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the rollups"))}this.setState({loadingRollups:false})});Rollups_defineProperty(this,"onClickCreate",()=>{this.props.history.push(constants["D"].CREATE_ROLLUP)});Rollups_defineProperty(this,"onClickEdit",()=>{const{selectedItems:[{_id:_id}]}=this.state;if(_id)this.props.history.push(`${constants["D"].EDIT_ROLLUP}?id=${_id}`)});Rollups_defineProperty(this,"onClickDelete",async()=>{const{rollupService:rollupService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const rollupId=item._id;try{const response=await rollupService.deleteRollup(rollupId);if(response.ok){this.closeDeleteModal();this.context.notifications.toasts.addSuccess(`"${rollupId}" successfully deleted!`)}else{this.context.notifications.toasts.addDanger(`Could not delete the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the rollup job"))}}await this.getRollups()});Rollups_defineProperty(this,"onDisable",async()=>{const{rollupService:rollupService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const rollupId=item._id;try{const response=await rollupService.stopRollup(rollupId);if(response.ok){this.context.notifications.toasts.addSuccess(`${rollupId} is disabled`)}else{this.context.notifications.toasts.addDanger(`Could not stop the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not stop the rollup job"))}}await this.getRollups()});Rollups_defineProperty(this,"onEnable",async()=>{const{rollupService:rollupService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const rollupId=item._id;try{const response=await rollupService.startRollup(rollupId);if(response.ok){this.context.notifications.toasts.addSuccess(`${rollupId} is enabled`)}else{this.context.notifications.toasts.addDanger(`Could not start the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not start the rollup job"))}}await this.getRollups()});Rollups_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection})});Rollups_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Rollups_defineProperty(this,"onSearchChange",e=>{this.setState({from:0,search:e.target.value})});Rollups_defineProperty(this,"onPageClick",page=>{const{size:size}=this.state;this.setState({from:page*size})});Rollups_defineProperty(this,"resetFilters",()=>{this.setState({search:utils_constants_DEFAULT_QUERY_PARAMS.search})});Rollups_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})});Rollups_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});Rollups_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});Rollups_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});Rollups_defineProperty(this,"getSelectedRollupIds",()=>this.state.selectedItems.map(item=>item._id).join(", "));const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");const{from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection}=Rollups_utils_helpers_getURLQueryParams(this.props.location);this.state={...this.state,totalRollups:0,from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],rollups:[],loadingRollups:true,isPopoverOpen:false,isDeleteModalVisible:false,rollupExplain:{},useNewUX:useNewUX};this.getRollups=external_osdSharedDeps_Lodash_default.a.debounce(this.getRollups,500,{leading:true})}async updateBreadCrumbs(){if(this.state.useNewUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].ROLLUPS.text.concat(` (${this.state.rollups.length})`),href:constants["f"].ROLLUPS.href}])}}async componentDidMount(){const breadCrumbs=this.state.useNewUX?[constants["f"].ROLLUPS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getRollups();this.updateBreadCrumbs()}async componentDidUpdate(prevProps,prevState){const prevQuery=Rollups_Rollups.getQueryObjectFromState(prevState);const currQuery=Rollups_Rollups.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getRollups()}this.updateBreadCrumbs()}static getQueryObjectFromState(_ref2){let{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref2;return{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){const{totalRollups:totalRollups,from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,selectedItems:selectedItems,rollups:rollups,loadingRollups:loadingRollups,isPopoverOpen:isPopoverOpen,isDeleteModalVisible:isDeleteModalVisible,useNewUX:useNewUX}=this.state;const filterIsApplied=!!search;const page=Math.floor(from/size);const pageCount=Math.ceil(totalRollups/size)||1;const pagination={pageIndex:page,pageSize:size,pageSizeOptions:utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalRollups||0};const sorting={sort:{direction:sortDirection,field:sortField}};const actionButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const selection={onSelectionChange:this.onSelectionChange};const actionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",icon:"empty",disabled:selectedItems.length!=1,"data-test-subj":"editButton",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",icon:"empty",disabled:!selectedItems.length,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"danger"},"Delete"))];const newActionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{disabled:!selectedItems.length,onClick:()=>{this.onEnable()},"data-test-subj":"enableButton"},"Enable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{disabled:!selectedItems.length,onClick:this.onDisable,"data-test-subj":"disableButton"},"Disable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",disabled:selectedItems.length!=1,"data-test-subj":"editButton",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],null,"Delete"))];const rollupsColumns=[{field:"_id",name:"Name",sortable:true,textOnly:true,truncateText:true,render:_id=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.props.history.push(`${constants["D"].ROLLUP_DETAILS}?id=${_id}`),"data-test-subj":`rollupLink_${_id}`},_id)},{field:"rollup.source_index",name:"Source index",sortable:true,textOnly:true,truncateText:true},{field:"rollup.target_index",name:"Target index",sortable:true,textOnly:true,truncateText:true},{field:"rollup.enabled",name:"Job state",sortable:true,textOnly:true,truncateText:true,render:renderEnabled},{field:"rollup.continuous",name:"Continuous",sortable:true,textOnly:true,truncateText:true,render:renderContinuous},{field:"metadata.rollup_metadata.continuous",name:"Next rollup window",
6sortable:false,textOnly:true,render:metadata=>metadata==null?"-":helpers_renderTime(metadata.next_window_start_time)+" - "+helpers_renderTime(metadata.next_window_end_time)},{field:"metadata",name:"Rollup job status",sortable:false,textOnly:true,render:metadata=>renderStatus(metadata)}];const commonTable=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:rollupsColumns,isSelectable:true,itemId:"_id",items:rollups,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_RollupEmptyPrompt,{filterIsApplied:filterIsApplied,loading:loadingRollups,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,tableLayout:"auto"});const commonDeleteModal=()=>isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(components_DeleteModal,{rollupId:this.getSelectedRollupIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const controlControlsData=[{id:"Create rollup job",label:"Create rollup job",iconType:"plus",fill:true,run:this.onClickCreate,testId:"createRollupButton",controlType:"button"}];return useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlControlsData}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,incremental:true,value:search,placeholder:"Search","aria-label":"Search",onChange:this.onSearchChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:this.getRollups,"aria-label":"refresh",size:"s",display:"base","data-test-subj":"refreshButton"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionButton,isOpen:isPopoverOpen,closePopover:this.closePopover,panelPaddingSize:"s",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:newActionItems,size:"s"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),commonTable(),commonDeleteModal())):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 10px"},gutterSize:"s",justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Rollup jobs ("+`${rollups.length}`+")")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getRollups,"data-test-subj":"refreshButton"},"Refresh")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.onDisable,"data-test-subj":"disableButton"},"Disable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:()=>{this.onEnable()},"data-test-subj":"enableButton"},"Enable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionButton,isOpen:isPopoverOpen,closePopover:this.closePopover,panelPaddingSize:"s",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:actionItems,size:"s"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"plus",onClick:this.onClickCreate,fill:true,"data-test-subj":"createRollupButton"},"Create rollup job"))))),external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"initial"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,value:search,placeholder:"Search",onChange:this.onSearchChange}
6))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),commonTable(),commonDeleteModal()))}}Rollups_defineProperty(Rollups_Rollups,"contextType",core_services["b"]);var containers_Rollups_Rollups=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Rollups_Rollups,Rollups_extends({},props,dataSourceMenuProps))};var containers_Rollups=containers_Rollups_Rollups;var pages_Rollups=containers_Rollups;const ConfigureRollup=_ref=>{let{isEdit:isEdit,rollupId:rollupId,rollupIdError:rollupIdError,onChangeName:onChangeName,onChangeDescription:onChangeDescription,description:description}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Job name and description"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Name")),helpText:"Specify a unique, descriptive name.",isInvalid:!!rollupIdError,error:rollupIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:!!rollupIdError,placeholder:"my-rollupjob1",value:rollupId,onChange:onChangeName,disabled:isEdit})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Description"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued"},external_osdSharedDeps_React_default.a.createElement("i",null," â optional")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{compressed:true,value:description,onChange:onChangeDescription,"data-test-subj":"description"})))};var ConfigureRollup_ConfigureRollup=ConfigureRollup;var components_ConfigureRollup=ConfigureRollup_ConfigureRollup;function RollupIndices_defineProperty(e,r,t){return(r=RollupIndices_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RollupIndices_toPropertyKey(t){var i=RollupIndices_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RollupIndices_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ROLLUP_RESULTS_HELP_TEXT_LINK="https://opensearch.org/docs/latest/im-plugin/index-rollups/index/#step-1-set-up-indices";class RollupIndices_RollupIndices extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);RollupIndices_defineProperty(this,"_isMount",void 0);RollupIndices_defineProperty(this,"onIndexSearchChange",async searchValue=>{if(!this._isMount){return}const{indexService:indexService}=this.props;this.setState({isLoading:true,indexOptions:[]});
6try{const dataStreamsAndIndicesNamesResponse=await indexService.getDataStreamsAndIndicesNames(searchValue);if(dataStreamsAndIndicesNamesResponse.ok){const options=searchValue.trim()?[{label:Object(helpers["f"])(searchValue)}]:[];const dataStreams=dataStreamsAndIndicesNamesResponse.response.dataStreams.map(label=>({label:label}));const indices=dataStreamsAndIndicesNamesResponse.response.indices.map(label=>({label:label}));if(this._isMount){this.setState({indexOptions:options.concat(dataStreams,indices),targetIndexOptions:indices})}}else{if(dataStreamsAndIndicesNamesResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("No index available")}else{this.context.notifications.toasts.addDanger(dataStreamsAndIndicesNamesResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(err.message)}if(this._isMount){this.setState({isLoading:false})}});RollupIndices_defineProperty(this,"onCreateOption",(searchValue,flattenedOptions)=>{const{targetIndexOptions:targetIndexOptions}=this.state;const{onChangeTargetIndex:onChangeTargetIndex}=this.props;const normalizedSearchValue=searchValue.trim();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(flattenedOptions.findIndex(option=>option.label.trim()===normalizedSearchValue)===-1){targetIndexOptions.concat(newOption);this.setState({targetIndexOptions:targetIndexOptions})}onChangeTargetIndex([newOption])});this.state={isLoading:true,indexOptions:[],targetIndexOptions:[]};this._isMount=true;this.onIndexSearchChange=external_osdSharedDeps_Lodash_default.a.debounce(this.onIndexSearchChange,500,{leading:true})}async componentDidMount(){await this.onIndexSearchChange("")}componentWillUnmount(){this._isMount=false}render(){const{sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,targetIndex:targetIndex,targetIndexError:targetIndexError,onChangeSourceIndex:onChangeSourceIndex,onChangeTargetIndex:onChangeTargetIndex,hasAggregation:hasAggregation}=this.props;const{isLoading:isLoading,indexOptions:indexOptions,targetIndexOptions:targetIndexOptions}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Indices"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You can't change indices after creating a job. Double-check the source and target index names before proceeding."))),hasAggregation&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement("p",null,"Note: changing source index will erase all existing definitions about aggregations and metrics."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Source index")),error:sourceIndexError,isInvalid:sourceIndexError!="",helpText:"The index pattern on which to performed the rollup job. You can use * as a wildcard."},external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{placeholder:"Select source index",options:indexOptions,selectedOptions:sourceIndex,onChange:onChangeSourceIndex,singleSelection:{asPlainText:true},onSearchChange:this.onIndexSearchChange,isLoading:isLoading,isInvalid:sourceIndexError!="","data-test-subj":"sourceIndexCombobox"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Target index")),error:targetIndexError,isInvalid:targetIndexError!="",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},"The target index stores rollup results. You can select an existing index or type in a
6new index name with embedded variables ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,href:ROLLUP_RESULTS_HELP_TEXT_LINK,target:"_blank",rel:"noopener noreferrer"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{placeholder:"Select or create target index",options:targetIndexOptions,selectedOptions:targetIndex,onChange:onChangeTargetIndex,onCreateOption:this.onCreateOption,singleSelection:{asPlainText:true},onSearchChange:this.onIndexSearchChange,isLoading:isLoading,isInvalid:targetIndexError!="","data-test-subj":"targetIndexCombobox"})))}}RollupIndices_defineProperty(RollupIndices_RollupIndices,"contextType",core_services["b"]);var components_RollupIndices=RollupIndices_RollupIndices;const setOfSteps=step=>[{title:"Set up indices",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)},{title:"Define aggregations and metrics",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<2?"disabled":null},{title:"Specify schedule",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<3?"disabled":null},{title:"Review and create",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<4?"disabled":null}];const CreateRollupSteps=_ref=>{let{step:step}=_ref;return external_osdSharedDeps_React_default.a.createElement("div",{style:{paddingLeft:"10px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSteps"],{steps:setOfSteps(step),headingElement:"h6",titleSize:"xs"}))};var CreateRollupSteps_CreateRollupSteps=CreateRollupSteps;var components_CreateRollupSteps=CreateRollupSteps_CreateRollupSteps;function CreateRollup_extends(){return CreateRollup_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateRollup_extends.apply(null,arguments)}class CreateRollup_CreateRollup extends external_osdSharedDeps_React_["Component"]{render(){if(this.props.currentStep!==1){return null}const getTitle=!this.props.useNewUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Set up indices")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};const padding_style=this.props.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateRollupSteps,{step:1})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,getTitle(),external_osdSharedDeps_React_default.a.createElement(components_ConfigureRollup,CreateRollup_extends({isEdit:false},this.props)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_RollupIndices,CreateRollup_extends({key:this.props.dataSourceId},this.props)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}var containers_CreateRollup=CreateRollup_CreateRollup;const radios=[{id:"fixed",label:"Fixed"},{id:"calendar",label:"Calendar"}];const TimeAggregation_timezones=external_osdSharedDeps_MomentTimezone_default.a.tz.names().map(tz=>({label:tz,text:tz}));class TimeAggregation_TimeAggregation extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{intervalType:intervalType,intervalValue:intervalValue,selectedTimestamp:selectedTimestamp,timestampError:timestampError,t
6imeunit:timeunit,timezone:timezone,onChangeIntervalType:onChangeIntervalType,onChangeIntervalValue:onChangeIntervalValue,onChangeTimestamp:onChangeTimestamp,onChangeTimeunit:onChangeTimeunit,onChangeTimezone:onChangeTimezone,fieldsOption:fieldsOption}=this.props;const dateFields=fieldsOption.filter(item=>item.type=="date");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Time aggregation ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormHelpText"],null,"Your source indices must include a timestamp field. The rollup job creates a date histogram for the field you specify."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Timestamp field")),error:timestampError,isInvalid:!!timestampError},external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{placeholder:"Select timestamp",options:dateFields,selectedOptions:selectedTimestamp,onChange:onChangeTimestamp,singleSelection:{asPlainText:true},isInvalid:!!timestampError})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Interval type"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:radios,idSelected:intervalType,onChange:id=>onChangeIntervalType(id),name:"intervalType"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Interval")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{maxWidth:300},alignItems:"center"},intervalType=="fixed"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:100}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,value:intervalType=="fixed"?intervalValue:1,onChange:onChangeIntervalValue}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectTimeunit",options:intervalType=="fixed"?constants["m"]:constants["h"],value:timeunit,onChange:onChangeTimeunit})))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dd",null,"Every 1")," "))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectTimeunit",options:intervalType=="fixed"?constants["m"]:constants["h"],value:timeunit,onChange:onChangeTimeunit}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Timezone")),helpText:"A day starts from 00:00:00 in the specified timezone."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"timezone",options:TimeAggregation_timezones,value:timezone,onChange:onChangeTimezone})))}}var TimeAggregations=TimeAggregation_TimeAggregation;const EMPTY_ROLLUP=JSON.stringify({rollup:{continuous:false,description:"",dimensions:[{date_histogram:{source_field:"",fixed_interval:"1h",timezone:"UTC"}}],enabled:true,metrics:[],page_size:1e3,roles:[],schedule:{interval:{start_time:234802,period:1,unit:"MINUTES"}},source_index:"",target_index:""}});const DelayTimeunitOptions=[{value:"SECONDS",text:"Second(s)"},{value:"MINUTES",text:"Minute(s)"},{value:"HOURS",text:"Hour(s)"},{value:"DAYS",text:"Day(s)"}];const ScheduleIntervalTimeunitOptions=[{value:"MINUTES",text:"Minute(s)"},{value:"HOURS",text:"Hour(s)"},{value:"DAYS",text:"Day(s)"}];const AddFieldsColumns=[{field:"label",name:"Field name",sortable:true},{field:"type",name:"Field type",sortable:true,render:type=>type==null||type==undefined?"-":type}];const WHERE_BOOLEAN_FILTERS=[{text:"Select value",value:""},{text:"True",value:true},{text:"False",value:false}];const OPERATORS_MAP={IS:"is",IS_NOT:"is_not",IS_NULL:"is_null",IS_NOT_NULL:"is_not_null",IS_GREATER:"is_greater",IS_GREATER_EQUAL:"is_greater_equal",IS_LESS:"is_less",IS_LESS_EQUAL:"is_less_equal",STARTS_WITH:"starts_with",ENDS_WITH:"ends_with",CONTAINS:"contains",NOT_CONTAINS:"does_not_contains",IN_RANGE:"in_range",NOT_IN_RANGE:"not_in_range"};const COMPARISON_OPERATORS=[{text:"is",value:OPERATORS_MAP.IS,dataTypes:["number","text","keyword","boolean"]},{text:"is not",value:OPERATORS_MAP.IS_NOT,dataTypes:["number","text","keyword","boolean"]},{text:"is null",value:OPERATORS_MAP.IS_NULL,dataTypes:["number","text","keyword","boolean"]},{text:"is not null",value:OPERATORS_MAP.IS_NOT_NULL,dataTypes:["number","text","keyword"]},{text:"is greater than",value:OPERATORS_MAP.IS_GREATER,dataTypes:["number"]},{text:"is greater than equal",value:OPERATORS_MAP.IS_GREATER_EQUAL,dataTypes:["number"]},{text:"is less than",value:OPERATORS_MAP.IS_LESS,dataTypes:["number"]},{text:"is less than equal",value:OPERATORS_MAP.IS_LESS_EQUAL,dataTypes:["number"]},{text:"is in range",value:OPERATORS_MAP.IN_RANGE,dataTypes:["number"]},{text:"is not in range",value:OPERATORS_MAP.NOT_IN_RANGE,dataTypes:["number"]},{text:"starts with",value:OPERATORS_MAP.STARTS_WITH,dataTypes:["text","keyword"]},{text:"ends with",value:OPERATORS_MAP.ENDS_WITH,dataTypes:["text","keyword"]},{text:"contains",value:OPERATORS_MAP.CONTAINS,dataTypes:["text","keyword"]},{text:"does not contains",value:OPERATORS_MAP.NOT_CONTAINS,dataTypes:["text"]}];const timeunits={isMilliseconds:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="milliseconds"||stringToCheck.trim().toLowerCase()=="ms"},isSeconds:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="seconds"||stringToCheck.trim().toLowerCase()=="s"},isMinutes:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="minutes"||stringToCheck.trim()=="m"},isHours:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="hours"||stringToCheck.trim().toLowerCase()=="h"},isDays:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="days"||stringToCheck.trim().toLowerCase()=="d"},isWeeks:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="weeks"||stringToCheck.trim().toLowerCase()=="w"},isMonths:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="months"||stringToCheck.trim()=="M"},isQuarters:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="quarters"||stringToCheck.trim().toLowerCase()=="q"},isYears:function(stringToCheck){return stringToCheck.trim().toLowerCase()=="years"||stringToCheck.trim().toLowerCase()=="y"}};const buildIntervalScheduleText=(continuous,interval,intervalTimeUnit)=>{let scheduleText="";
6if(continuous){scheduleText+="Continuous, every "+interval+" "+parseTimeunit(intervalTimeUnit)}else{scheduleText+="Not continuous"}return scheduleText};const buildCronScheduleText=(continuous,cronExpression)=>{let scheduleText="";if(continuous){scheduleText+="Continuous, defined by cron expression: "+cronExpression}else{scheduleText+="Not continuous"}return scheduleText};const parseTimeunit=timeunit=>{if(timeunits.isMilliseconds(timeunit))return"millisecond(s)";else if(timeunits.isSeconds(timeunit))return"second(s)";else if(timeunits.isMinutes(timeunit))return"minute(s)";else if(timeunits.isHours(timeunit))return"hour(s)";else if(timeunits.isDays(timeunit))return"day(s)";else if(timeunits.isWeeks(timeunit))return"week";else if(timeunits.isMonths(timeunit))return"month";else if(timeunits.isQuarters(timeunit))return"quarter";else if(timeunits.isYears(timeunit))return"year";return timeunit};const delayTimeUnitToMS=(delay,timeunit)=>{if(timeunits.isSeconds(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"seconds").asMilliseconds()}else if(timeunits.isMinutes(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"minutes").asMilliseconds()}else if(timeunits.isHours(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"hours").asMilliseconds()}else if(timeunits.isDays(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"days").asMilliseconds()}else{return delay}};const msToDelayTimeUnit=(delay,timeunit)=>{if(timeunits.isSeconds(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"milliseconds").asSeconds()}else if(timeunits.isMinutes(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"milliseconds").asMinutes()}else if(timeunits.isHours(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"milliseconds").asHours()}else if(timeunits.isDays(timeunit)){return external_osdSharedDeps_Moment_default.a.duration(delay,"milliseconds").asDays()}else{return delay}};const isNumericMapping=fieldType=>fieldType=="long"||fieldType=="integer"||fieldType=="short"||fieldType=="byte"||fieldType=="double"||fieldType=="float"||fieldType=="half_float"||fieldType=="scaled_float";const compareFieldItem=(itemA,itemB)=>itemB.label==itemA.label&&itemA.type==itemB.type&&itemA.path==itemB.path;const parseFieldOptions=(prefix,mappings)=>{let fieldsOption=[];for(let field in mappings){if(mappings.hasOwnProperty(field)){if(mappings[field].type!="object"&&mappings[field].type!=null&&mappings[field].type!="nested")fieldsOption.push({label:prefix+field,type:mappings[field].type});if(mappings[field].fields!=null)fieldsOption=fieldsOption.concat(parseFieldOptions(prefix+field+".",mappings[field].fields));if(mappings[field].properties!=null)fieldsOption=fieldsOption.concat(parseFieldOptions(prefix+field+".",mappings[field].properties))}}return fieldsOption};const getOperators=fieldType=>COMPARISON_OPERATORS.reduce((acc,currentOperator)=>currentOperator.dataTypes.includes(fieldType)?[...acc,{text:currentOperator.text,value:currentOperator.value}]:acc,[]);function AdvancedAggregation_defineProperty(e,r,t){return(r=AdvancedAggregation_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function AdvancedAggregation_toPropertyKey(t){var i=AdvancedAggregation_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function AdvancedAggregation_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class AdvancedAggregation_AdvancedAggregation extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);AdvancedAggregation_defineProperty(this,"closeModal",()=>this.setState({isModalVisible:false}));AdvancedAggregation_defineProperty(this,"showModal",()=>this.setState({isModalVisible:true}));AdvancedAggregation_defineProperty(this,"onSelectionChange",selectedFields=>{this.setState({selectedFields:selectedFields})});AdvancedAggregation_defineProperty(this,"deleteField",item=>{const{selectedDimensionField:selectedDimensionField}=this.props;const{selectedFields:selectedFields,allSelectedFields:allSelectedFields}=this.state;selectedDimensionField.splice(selectedDimensionField.indexOf(item),1);selectedFields.splice(selectedFields.indexOf(item.field),1);allSelectedFields.splice(allSelectedFields.indexOf(item.field),1);this.setState({selectedFields:selectedFields,allSelectedFields:allSelectedFields});this.updateSequence(selectedDimensionField)});AdvancedAggregation_defineProperty(this,"onChangeInterval",(e,item)=>{const{selectedDimensionField:selectedDimensionField,onDimensionSelectionChange:onDimensionSelectionChange}=this.props;const index=selectedDimensionField.indexOf(item);const newItem={sequence:item.sequence,field:item.field,aggregationMethod:"histogram",interval:e.target.valueAsNumber};selectedDimensionField[index]=newItem;this.updateSequence(selectedDimensionField);onDimensionSelectionChange(selectedDimensionField)});AdvancedAggregation_defineProperty(this,"onChangeAggregationMethod",(e,item)=>{const{selectedDimensionField:selectedDimensionField,onDimensionSelectionChange:onDimensionSelectionChange}=this.props;const index=selectedDimensionField.indexOf(item);const newItem={sequence:item.sequence,field:item.field,aggregationMethod:e.target.value};if(e.target.value=="histogram"){newItem.interval=5}selectedDimensionField[index]=newItem;this.updateSequence(selectedDimensionField);onDimensionSelectionChange(selectedDimensionField)});AdvancedAggregation_defineProperty(this,"onDimensionTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{selectedDimensionField:selectedDimensionField}=this.props;this.setState({dimensionFrom:page*size,dimensionSize:size,dimensionSortField:sortField,dimensionSortDirection:sortDirection,dimensionsShown:selectedDimensionField.slice(page*size,page*size+size)})});const{selectedDimensionField:_selectedDimensionField,fieldsOption:fieldsOption}=this.props;this.state={isModalVisible:false,allSelectedFields:[],fieldsShown:fieldsOption.slice(0,10),dimensionsShown:_selectedDimensionField.slice(0,10),selectedFields:[],dimensionFrom:0,dimensionSize:10,dimensionSortField:"sequence",dimensionSortDirection:"desc"}}onClickAdd(){const{onDimensionSelectionChange:onDimensionSelectionChange,selectedDimensionField:selectedDimensionField}=this.props;const{selectedFields:selectedFields,allSelectedFields:allSelectedFields,dimensionFrom:dimensionFrom,dimensionSize:dimensionSize}=this.state;let updatedDimensions=Array.from(selectedDimensionField);const toAddFields=Array.from(selectedFields);selectedDimensionField.map(dimension=>{if(allSelectedFields.includes(dimension.field)){const index=toAddFields.indexOf(dimension.field);toAddFields.splice(index,1)}});this.updateSequence(updatedDimensions);let i=updatedDimensions.length+1;const toAdd=toAddFields.map(field=>isNumericMapping(field.type)?{sequence:i++,field:field,aggregationMethod:"histogram",interval:5}:{sequence:i++,field:field,aggregationMethod:"terms"});const result=updatedDimensions.length?updatedDimensions.concat(toAdd):toAdd;onDimensionSelectionChange(result);this.setState({allSelectedFields:allSelectedFields.concat(toAddFields)});this.setState({dimensionsShown:result.slice(dimensionFrom,dimensionFrom+dimensionSize)});this.forceUpdate()}updateSequence(items){if(items.length==0){this.setState({dimensionsShown:[]});return}const{onDimensionSelectionChange:onDimensionSelectionChange}=this.props;const{dimensionSize:dimensionSize,dimensionFrom:dimensionFrom}=this.state;let dimensionNum;for(dimensionNum=0;dimensionNum<items.length;dimensionNum++){items[dimensionNum].sequence=dimensionNum+1}onDimensionSelectionChange(items);this.setState({dimensionsShown:items.slice(dimensionFrom,dimensionFrom+dimensionSize)});this.forceUpdate()}moveUp(item){const{selectedDimensionField:selectedDimensionField}=this.props;const toMoveindex=selectedDimensionField.indexOf(item);if(toMoveindex==0)return;let toSwap=selectedDimensionField[toMoveindex-1];selectedDimensionField[toMoveindex]=toSwap;selectedDimensionField[toMoveindex-1]=item;this.updateSequence(selectedDimensionField)}moveDown(item){const{selectedDimensionField:selectedDimensionField}=this.props;const toMoveindex=selectedDimensionField.indexOf(item);if(toMoveindex==selectedDimensionField.length-1)return;let toSwap=selectedDimensionField[toMoveindex+1];selectedDimensionField[toMoveindex]=toSwap;selectedDimensionField[toMoveindex+1]=item;this.updateSequence(selectedDimensionField)}render(){const{fieldsOption:fieldsOption,selectedDimensionField:selectedDimensionField}=this.props;const{allSelectedFields:allSelectedFields,isModalVisible:isModalVisible,dimensionFrom:dimensionFrom,dimensionSize:dimensionSize,dimensionSortDirection:dimensionSortDirection,dimensionSortField:dimensionSortField,dimensionsShown:dimensionsShown}=this.state;const dimensionPage=Math.floor(dimensionFrom/dimensionSize);const dimensionPagination={pageIndex:dimensionPage,pageSize:dimensionSize,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedDimensionField.length};const dimensionSorting={sort:{direction:dimensionSortDirection,field:dimensionSortField}};const selection={onSelectionChange:this.onSelectionChange,initialSelected:allSelectedFields};const aggregationColumns=[{field:"sequence",name:"Sequence",sortable:true,dataType:"number",align:"left"},{field:"field.label",name:"Field name",align:"left"},{field:"field.type",name:"Field type",align:"left",render:type=>type==null?"-":type},{field:"aggregationMethod",name:"Aggregation method",align:"left",render:(aggregationMethod,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSelect"],{compressed:true,value:aggregationMethod,disabled:!isNumericMapping(item.field.type),options:[{value:"terms",text:"Terms"},{value:"histogram",text:"Histogram"}],onChange:e=>this.onChangeAggregationMethod(e,item),"data-test-subj":`aggregationMethodSelect-${item.field.label}`})))},{field:"interval",name:"Interval",dataType:"number",align:"left",render:(interval,item)=>interval==null?"-":external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,value:interval,onChange:e=>this.onChangeInterval(e,item),"data-test-subj":`interval-${item.field.label}`})))},{field:"sequence",name:"",align:"center",render:(sequence,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},item.sequence!=1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{color:"primary",onClick:()=>this.moveUp(item),"data-test-subj":`moveUp-${item.field.label}`},"Move up")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},item.sequence!=selectedDimensionField.length&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{color:"primary",onClick:()=>this.moveDown(item),"data-test-subj":`moveDown-${item.field.label}`},"Move down")))},{field:"sequence",name:"Actions",align:"center",render:(sequence,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"crossInACircleFilled",onClick:()=>this.deleteField(item),"data-test-subj":`delete-${item.field.label}`})}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",direction:"column"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Additional aggregation",` (${selectedDimensionField.length})`," "))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s",color:"subdued"},external_osdSharedDeps_React_default.a.createElement("h2",null," ",external_osdSharedDeps_React_default.a.createElement("i",null,"â optional")," ")))
6)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormHelpText"],null,"The sequence of fields may influence rollup performance."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,href:"https://opensearch.org/docs/latest/im-plugin/index-rollups/index/",target:"_blank"},"Learn more"))),selectedDimensionField.length!=0&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"The order of fields impacts rollup performance. Aggregating by smaller buckets and then by larger buckets is faster than the opposite. For example, if you are rolling up flight data for five airlines with 100 destinations, aggregating by airline and then by destination is faster than aggregating by destination first."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"column",justifyContent:"spaceBetween",style:{padding:"0px 10px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showModal,"data-test-subj":"addFieldsAggregation"},"Add fields")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null," ")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:dimensionsShown,itemId:"sequence",columns:aggregationColumns,tableLayout:"auto",hasActions:true,onChange:this.onDimensionTableChange,pagination:dimensionPagination,sorting:dimensionSorting,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,"No fields added for aggregations"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"5px 10px"},alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showModal,"data-test-subj":"addFieldsAggregationEmpty"},"Add fields")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}))))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),isModalVisible&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:this.closeModal,style:{padding:"5px 30px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,"Add fields")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],{title:"Add fields"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:AddFieldsColumns,items:fieldsOption,itemId:"label",rowHeader:"fieldName",noItemsMessage:"No fields available",isSelectable:true,selection:selection,tableLayout:"fixed"}
6))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.closeModal,"data-test-subj":"addFieldsAggregationCancel"},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.closeModal();this.onClickAdd()},"data-test-subj":"addFieldsAggregationAdd"},"Add")))))}}var components_AdvancedAggregation=AdvancedAggregation_AdvancedAggregation;function MetricsCalculation_defineProperty(e,r,t){return(r=MetricsCalculation_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function MetricsCalculation_toPropertyKey(t){var i=MetricsCalculation_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function MetricsCalculation_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class MetricsCalculation_MetricsCalculation extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);MetricsCalculation_defineProperty(this,"closeModal",()=>this.setState({isModalVisible:false}));MetricsCalculation_defineProperty(this,"showModal",()=>this.setState({isModalVisible:true}));MetricsCalculation_defineProperty(this,"closeDisable",()=>this.setState({isDisableOpen:false}));MetricsCalculation_defineProperty(this,"showDisable",()=>this.setState({isDisableOpen:true}));MetricsCalculation_defineProperty(this,"closeEnable",()=>this.setState({isEnableOpen:false}));MetricsCalculation_defineProperty(this,"showEnable",()=>this.setState({isEnableOpen:true}));MetricsCalculation_defineProperty(this,"onChangeFieldType",options=>{this.setState({selectedFieldType:options})});MetricsCalculation_defineProperty(this,"onSelectionChange",selectedFields=>{this.setState({selectedFields:selectedFields})});MetricsCalculation_defineProperty(this,"setChecked",(e,method,item)=>{const{selectedMetrics:selectedMetrics,onMetricSelectionChange:onMetricSelectionChange}=this.props;const index=selectedMetrics.indexOf(item);const newItem=item;switch(method){case"all":{if(!item.all){newItem.all=true;newItem.min=true;newItem.max=true;newItem.sum=true;newItem.avg=true;newItem.value_count=true}else{newItem.all=false}break}case"min":{newItem.min=!item.min;break}case"max":{newItem.max=!item.max;break}case"sum":{newItem.sum=!item.sum;break}case"avg":{newItem.avg=!item.avg;break}case"value_count":{newItem.value_count=!item.value_count;break}}selectedMetrics[index]=newItem;onMetricSelectionChange(selectedMetrics)});MetricsCalculation_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{selectedMetrics:selectedMetrics}=this.props;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection,metricsShown:selectedMetrics.slice(page*size,page*size+size)})});const{selectedMetrics:_selectedMetrics}=this.props;this.state={isModalVisible:false,searchText:"",selectedFieldType:[],selectedFields:[],allSelectedFields:[],metricsShown:_selectedMetrics.slice(0,10),from:0,size:10,sortField:"source_field",sortDirection:"desc",isDisableOpen:false,isEnableOpen:false}}onClickAdd(){const{onMetricSelectionChange:onMetricSelectionChange,selectedMetrics:selectedMetrics}=this.props;const{selectedFields:selectedFields,allSelectedFields:allSelectedFields,from:from,size:size}=this.state;let updatedMetrics=Array.from(selectedMetrics);const toAddFields=Array.from(selectedFields);selectedMetrics.map(metric=>{if(allSelectedFields.includes(metric.source_field)){const index=toAddFields.indexOf(metric.source_field);toAddFields.splice(index,1)}});const toAdd=toAddFields.map(field=>({source_field:field,all:false,min:false,max:false,sum:false,avg:false,value_count:false}));const result=updatedMetrics.length?updatedMetrics.concat(toAdd):toAdd;onMetricSelectionChange(result);this.setState({allSelectedFields:allSelectedFields.concat(toAddFields),metricsShown:result.slice(from,from+size)});this.forceUpdate()}deleteField(item){const{selectedMetrics:selectedMetrics,onMetricSelectionChange:onMetricSelectionChange}=this.props;const{selectedFields:selectedFields,allSelectedFields:allSelectedFields,from:from,size:size}=this.state;selectedMetrics.splice(selectedMetrics.indexOf(item),1);selectedFields.splice(selectedFields.indexOf(item.source_field),1);allSelectedFields.splice(allSelectedFields.indexOf(item.source_field),1);onMetricSelectionChange(selectedMetrics);this.setState({selectedFields:selectedFields,allSelectedFields:allSelectedFields,metricsShown:selectedMetrics.slice(from,size)})}onClickDisable(method){const{selectedMetrics:selectedMetrics,onMetricSelectionChange:onMetricSelectionChange}=this.props;selectedMetrics.map(metric=>{metric[method]=false});onMetricSelectionChange(selectedMetrics)}onClickEnable(method){const{selectedMetrics:selectedMetrics,onMetricSelectionChange:onMetricSelectionChange}=this.props;selectedMetrics.map(metric=>{metric[method]=true});onMetricSelectionChange(selectedMetrics)}render(){const{fieldsOption:fieldsOption,selectedMetrics:selectedMetrics,metricError:metricError}=this.props;const{isModalVisible:isModalVisible,selectedFields:selectedFields,isDisableOpen:isDisableOpen,isEnableOpen:isEnableOpen,from:from,size:size,sortDirection:sortDirection,sortField:sortField,metricsShown:metricsShown}=this.state;const page=Math.floor(from/size);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedMetrics.length};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={selectable:field=>isNumericMapping(field.type),onSelectionChange:this.onSelectionChange,initialSelected:selectedFields};const metricsColumns=[{field:"source_field.label",name:"Field Name"},{field:"all",name:"All",align:"center",truncateText:true,render:(all,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,i
6d:`all-${item.source_field.label}`,checked:all,onChange:e=>this.setChecked(e,"all",item),"data-test-subj":`all-${item.source_field.label}`})))},{field:"min",name:"Min",align:"center",render:(min,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,id:`min-${item.source_field.label}`,checked:min,onChange:e=>this.setChecked(e,"min",item),"data-test-subj":`min-${item.source_field.label}`})))},{field:"max",name:"Max",align:"center",render:(max,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,id:`max-${item.source_field.label}`,checked:max,onChange:e=>this.setChecked(e,"max",item),"data-test-subj":`max-${item.source_field.label}`})))},{field:"sum",name:"Sum",align:"center",render:(sum,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,id:`sum-${item.source_field.label}`,checked:sum,onChange:e=>this.setChecked(e,"sum",item),"data-test-subj":`sum-${item.source_field.label}`})))},{field:"avg",name:"Avg",align:"center",render:(avg,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,id:`avg-${item.source_field.label}`,checked:avg,onChange:e=>this.setChecked(e,"avg",item),"data-test-subj":`avg-${item.source_field.label}`})))},{field:"value_count",name:"Value count",align:"center",render:(value_count,item)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{compressed:true,id:`value_count-${item.source_field.label}`,checked:value_count,onChange:e=>this.setChecked(e,"value_count",item),"data-test-subj":`valueCount-${item.source_field.label}`})))},{name:"Actions",actions:[{render:item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"crossInACircleFilled",onClick:()=>this.deleteField(item),"data-test-subj":`delete-${item.source_field.label}`})}]}];const disableActions=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable-min",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeDisable();this.onClickDisable("min")},"data-test-subj":"disable_min"},"Min"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable-max",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeDisable();this.onClickDisable("max")},"data-test-subj":"disable_max"},"Max"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable-sum",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeDisable();this.onClickDisable("sum")},"data-test-subj":"disable_sum"},"Sum"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable-avg",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeDisable();this.onClickDisable("avg")},"data-test-subj":"disable_avg"},"Avg"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable-vc",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeDisable();this.onClickDisable("value_count")},"data-test-subj":"disable_value_count"},"Value count")];const enableActions=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable-min",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeEnable();this.onClickEnable("min")},"data-test-subj":"enable_min"},"Min"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable-max",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeEnable();this.onClickEnable("max")},"data-test-subj":"enable_max"},"Max"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable-sum",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeEnable();this.onClickEnable("sum")},"data-test-subj":"enable_sum"},"Sum"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable-avg",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeEnable();this.onClickEnable("avg")},"data-test-subj":"enable_avg"},"Avg"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable-vc",icon:"empty",disabled:selectedMetrics.length==0,onClick:()=>{this.closeEnable();this.onClickEnable("value_count")},"data-test-subj":"enable_value_count"},"Value count")];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px"},justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Additional metrics",` (${selectedMetrics.length})`," "))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,external_osdSharedDeps_React_default.a.createElement("i",null," â optional ")))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",onClick:this.showDisable,disabled:selectedMetrics.length==0},"Disable all"),isOpen:isDisableOpen,closePopover:this.closeDisable,panelPaddingSize:"none",anchorPosition:"downLeft"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:disableActions}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",onClick:this.showEnable,disabled:selectedMetrics.length==0},"Enable all"),isOpen:isEnableOpen,closePopover:this.closeEnable,panelPaddingSize:"none",anchorPosition:"downLeft"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:enableActions}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showModal,"data-test-subj":"addFieldsMetric"},"Add fields"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0pxpx"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormHelpText"],null,"You can aggregate additional fields from the source index into the target index. Rollup supports the terms aggregation (for all field types) and histogram aggregation (for numeric fields).")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:2})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",{style:{paddingLeft:"10px"}},metricError!=""&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger"},external_osdSharedDeps_React_default.a.createElement("p",null,metricError)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:metricsShown,itemId:"source_field.label",rowHeader:"source_field",columns:metricsColumns,hasActions:true,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,"No fields added for metrics"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showModal,"data-test-subj":"addFieldsMetricEmpty"},"Add fields")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))),tableLayout:"auto",onChange:this.onTableChange,pagination:pagination,sorting:sorting}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),isModalVisible&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:this.closeModal,style:{padding:"5px 30px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,"Add fields")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],{title:"Add fields"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:fieldsOption,itemId:"label",rowHeader:"fieldName",columns:AddFieldsColumns,isSelectable:true,selection:selection,tableLayout:"fixed"}
6))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.closeModal,"data-test-subj":"addFieldsMetricCancel"},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.closeModal();this.onClickAdd()},"data-test-subj":"addFieldsMetricAdd"},"Add"))))))}}var components_MetricsCalculation=MetricsCalculation_MetricsCalculation;function CreateRollupStep2_extends(){return CreateRollupStep2_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateRollupStep2_extends.apply(null,arguments)}function CreateRollupStep2_defineProperty(e,r,t){return(r=CreateRollupStep2_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateRollupStep2_toPropertyKey(t){var i=CreateRollupStep2_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateRollupStep2_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateRollupStep2_CreateRollupStep2 extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateRollupStep2_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS])});CreateRollupStep2_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].ROLLUPS)})}render(){if(this.props.currentStep!==2)return null;const{fields:fields,timestamp:timestamp}=this.props;const getTitle=!this.props.useNewUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Define aggregations and metrics")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};const padding_style=this.props.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateRollupSteps,{step:2})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,getTitle(),external_osdSharedDeps_React_default.a.createElement(TimeAggregations,CreateRollupStep2_extends({},this.props,{selectedTimestamp:timestamp,fieldsOption:fields})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_AdvancedAggregation,CreateRollupStep2_extends({},this.props,{fieldsOption:fields})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_MetricsCalculation,CreateRollupStep2_extends({},this.props,{fieldsOption:fields})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You can't change aggregations or metrics after creating a job. Double-check your choices before proceeding."))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}CreateRollupStep2_defineProperty(CreateRollupStep2_CreateRollupStep2,"contextType",core_services["b"]);var containers_CreateRollupStep2=CreateRollupStep2_CreateRollupStep2;const Schedule_radios=[{id:"no",label:"No"},{id:"yes",label:"Yes"}];const selectInterval=(interval,intervalTimeunit,intervalError,onChangeInterval,onChangeTimeunit)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Rollup interval")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{maxWidth:400}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:200}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{error:intervalError,isInvalid:intervalError
6!=""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:interval,onChange:onChangeInterval,isInvalid:intervalError!=""}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectIntervalTimeunit",options:ScheduleIntervalTimeunitOptions,value:intervalTimeunit,onChange:onChangeTimeunit,isInvalid:interval==undefined||interval<=0})))));const isContinuous=(continuousJob,onChangeContinuousJob)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Continuous"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:Schedule_radios,idSelected:continuousJob,onChange:id=>onChangeContinuousJob(id),name:"continuousJob"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}));const Schedule_timezones=external_osdSharedDeps_MomentTimezone_default.a.tz.names().map(tz=>({label:tz,text:tz}));class Schedule_Schedule extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{isEdit:isEdit,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onCh
6angeCron:onChangeCron,onChangeCronTimezone:onChangeCronTimezone,onChangeDelayTime:onChangeDelayTime,onChangeIntervalTime:onChangeIntervalTime,onChangePage:onChangePage,onChangeContinuousDefinition:onChangeContinuousDefinition,onChangeContinuousJob:onChangeContinuousJob,onChangeDelayTimeunit:onChangeDelayTimeunit,onChangeIntervalTimeunit:onChangeIntervalTimeunit}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Schedule"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),!isEdit&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"jobEnabledByDefault",label:"Enable job by default",checked:jobEnabledByDefault,onCh
6ange:onChangeJobEnabledByDefault,"data-test-subj":"jobEnabledByDefault"}),!isEdit&&isContinuous(continuousJob,onChangeContinuousJob),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Rollup execution frequency"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"continuousDefinition",options:[{value:"fixed",text:"Define by fixed interval"},{value:"cron",text:"Define by cron expression"}],value:continuousDefinition,onChange:onChangeContinuousDefinition})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),continuousDefinition=="fixed"?selectInterval(interval,intervalTimeunit,intervalError,onChangeIntervalTime,onChangeIntervalTimeunit):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Define by cron expression"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{value:cronExpression,onChange:onChangeCron,compressed:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Timezone")),helpText:"A day starts from 00:00:00 in the specified timezone."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"timezone",options:Schedule_timezones,value:cronTimezone,onChange:onChangeCronTimezone}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Page per execution")),helpText:"The number of pages every execution processes. A larger number means faster execution and higher costs on memory."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,placeholder:"1000",value:pageSize,onChange:onChangePage})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Execution delay",external_osdSharedDeps_React_default.a.createElement("i",null," â optional"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{maxWidth:400}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:200}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:delayTime,onChange:onChangeDelayTime}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectTimeunit",options:DelayTimeunitOptions,value:delayTimeunit,onChange:onChangeDelayTimeunit})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormHelpText"],{style:{maxWidth:400}},"The amount of time the job waits for data ingestion to accommodate any necessary processing time."))}}var components_Schedule=Schedule_Schedule;function CreateRollupStep3_extends(){return CreateRollupStep3_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateRollupStep3_extends.apply(null,arguments)}function CreateRollupStep3_defineProperty(e,r,t){return(r=CreateRollupStep3_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateRollupStep3_toPropertyKey(t){var i=CreateRollupStep3_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateRollupStep3_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateRollupStep3_CreateRollupStep3 extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateRollupStep3_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS])});CreateRollupStep3_defineProperty(this,"onCreate",async(rollupId,rollup)=>{const{rollupService:rollupService}=this.props;try{const response=await rollupService.putRollup(rollup,rollupId);if(response.ok){this.context.notifications.toasts.addSuccess(`Created rollup: ${response.response._id}`);this.props.history.push(constants["D"].ROLLUPS)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem creating the rollup")})}});CreateRollupStep3_defineProperty(this,"onUpdate",async(rollupId,rollup)=>{try{const{rollupService:rollupService}=this.props;const{rollupPrimaryTerm:rollupPrimaryTerm,rollupSeqNo:rollupSeqNo}=this.state;if(rollupSeqNo==null||rollupPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update rollup without seqNo and primaryTerm");return}const response=await rollupService.putRollup(rollup,rollupId,rollupSeqNo,rollupPrimaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Updated rollup: ${response.response._id}`);this.props.history.push(constants["D"].ROLLUPS)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem updating the rollup")})}});CreateRollupStep3_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].ROLLUPS)});CreateRollupStep3_defineProperty(this,"onChange",e=>{const{hasSubmitted:hasSubmitted}=this.state;const rollupId=e.target.value;if(hasSubmitted)this.setState({rollupId:rollupId,rollupIdError:rollupId?"":"Required"});else this.setState({rollupId:rollupId})});this.state={rollupSeqNo:null,rollupPrimaryTerm:null,rollupId:"",rollupIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false}}
6render(){if(this.props.currentStep!=3)return null;const{jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onChangeCron:onChangeCron,onChangeDelayTime:onChangeDelayTime,onChangeIntervalTime:onChangeIntervalTime,onChangePage:onChangePage,onChangeContinuousDefinition:onChangeContinuousDefinition,onChangeContinuousJob:onChangeContinuousJob,onChangeDelayTimeunit:onChangeDelayTimeunit,onChangeIntervalTimeunit:onChangeIntervalTimeunit}=this.props;const{rollupId:rollupId,rollupIdError:rollupIdError}=this.state;const getTitle=!this.props.useNewUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Specify schedule")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};const padding_style=this.props.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateRollupSteps,{step:3})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,getTitle(),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_Schedule,CreateRollupStep3_extends({},this.props,{isEdit:false,rollupId:rollupId,rollupIdError:rollupIdError,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onCh
6angeCron:onChangeCron,onChangeDelayTime:onChangeDelayTime,onChangeIntervalTime:onChangeIntervalTime,onChangePage:onChangePage,onChangeContinuousDefinition:onChangeContinuousDefinition,onChangeContinuousJob:onChangeContinuousJob,onChangeDelayTimeunit:onChangeDelayTimeunit,onChangeIntervalTimeunit:onChangeIntervalTimeunit})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}CreateRollupStep3_defineProperty(CreateRollupStep3_CreateRollupStep3,"contextType",core_services["b"]);var containers_CreateRollupStep3=CreateRollupStep3_CreateRollupStep3;const AGGREGATION_AND_METRIC_SETTINGS="Aggregation and metrics settings";const BaseAggregationColumns=[{field:"sequence",name:"Sequence",sortable:true,align:"left",dataType:"number"},{field:"field.label",name:"Field name",align:"left"},{field:"aggregationMethod",name:"Aggregation method",align:"left"},{field:"interval",name:"Interval",dataType:"number",align:"left",render:interval=>{if(interval==null)return"-";else return`${interval}`}}];const BaseMetricsColumns=[{field:"source_field",name:"Field Name"},{field:"min",name:"Min",align:"center",render:min=>min&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"check"})},{field:"max",name:"Max",align:"center",render:max=>max&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"check"})},{field:"sum",name:"Sum",align:"center",render:sum=>sum&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"check"})},{field:"avg",name:"Avg",align:"center",render:avg=>avg&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"check"})},{field:"value_count",name:"Value count",align:"center",render:value_count=>value_count&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"check"})}];function sequenceTableComponents(selectedDimensionField,items,columns,pagination,sorting,onChange){if(selectedDimensionField.length==0){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dd",null,"No fields added for aggregation"))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:items,rowHeader:"sequence",columns:columns,tableLayout:"auto",noItemsMessage:"No fields added for aggregations",pagination:pagination,sorting:sorting,onChange:onChange})))}function additionalMetricsComponent(selectedMetrics){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Additional metrics"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",textAlign:"left",size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,`(${selectedMetrics.length})`))))}function sourceFieldComponents(selectedMetrics,items,columns,pagination,sorting,onChange){if(selectedMetrics.length==0){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dd",null,"No fields added for metrics"))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:items,rowHeader:"source_field",columns:columns,tableLayout:"auto",pagination:pagination,sorting:sorting,onChange:onChange,noItemsMessage:"No fields added for metrics"})))}function HistogramAndMetrics_defineProperty(e,r,t){return(r=HistogramAndMetrics_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function HistogramAndMetrics_toPropertyKey(t){var i=HistogramAndMetrics_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function HistogramAndMetrics_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const _createFlowAggregateColumns=[{field:"field.type",name:"Field type",align:"left",render:type=>type==undefined?"-":type}];const HistogramAndMetrics_aggregationColumns=[...BaseAggregationColumns,..._createFlowAggregateColumns];const HistogramAndMetrics_metricsColumns=BaseMetricsColumns;class HistogramAndMetrics_HistogramAndMetrics extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);HistogramAndMetrics_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{selectedMetrics:selectedMetrics}=this.props;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection,metricsShown:selectedMetrics.slice(page*size,page*size+size)})});HistogramAndMetrics_defineProperty(this,"onDimensionTableChange",_ref2=>{let{page:tablePage,sort:sort}=_ref2;const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{selectedDimensionField:selectedDimensionField}=this.props;this.setState({dimensionFrom:page*size,dimensionSize:size,dimensionSortField:sortField,dimensionSortDirection:sortDirection,dimensionsShown:selectedDimensionField.slice(page*size,page*size+size)})});HistogramAndMetrics_defineProperty(this,"parseMetric",metrics=>{if(metrics.length==0)return[];const result=metrics.map(metric=>({source_field:metric.source_field.label,all:false,min:metric.min,max:metric.max,sum:metric.sum,avg:metric.avg,value_count:metric.value_count}));return result});const{selectedDimensionField:_selectedDimensionField,selectedMetrics:_selectedMetrics}=this.props;this.state={from:0,size:10,sortField:"sequence",sortDirection:"desc",metricsShown:_selectedMetrics.slice(0,10),dimensionsShown:_selectedDimensionField.slice(0,10),dimensionFrom:0,dimensionSize:10,dimensionSortField:"sequence",dimensionSortDirection:"desc"}}parseInterval(intervalType,intervalValue,timeunit){if(intervalType=="calendar")return"1 "+parseTimeunit(timeunit);return intervalValue+" "+parseTimeunit(timeunit)}render(){const{onChangeStep:onChangeStep,intervalType:intervalType,intervalValue:intervalValue,timestamp:timestamp,timezone:timezone,timeunit:timeunit,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics}=this.props;const{from:from,size:size,sortDirection:sortDirection,sortField:sortField,metricsShown:metricsShown,dimensionFrom:dimensionFrom,dimensionSize:dimensionSize,dimensionSortDirection:dimensionSortDirection,dimensionSortField:dimensionSortField,dimensionsShown:dimensionsShown}=this.state;const page=Math.floor(from/size);const dimensionPage=Math.floor(dimensionFrom/dimensionSize);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedMetrics.length};const sorting={sort:{direction:sortDirection,field:sortField}};const dimensionPagination={pageIndex:dimensionPage,pageSize:dimensionSize,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedDimensionField.length};const dimensionSorting={sort:{direction:dimensionSortDirection,field:dimensionSortField}};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,AGGREGATION_AND_METRIC_SETTINGS))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(2)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Time aggregation")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Timestamp field"),external_osdSharedDeps_React_default.a.createElement("dd",null,timestamp.length?timestamp[0].label:""))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Interval"),external_osdSharedDeps_React_default.a.createElement("dd",null,this.parseInterval(intervalType,intervalValue,timeunit)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Timezone"),external_osdSharedDeps_React_default.a.createElement("dd",null,timezone)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Additional aggregations ",`(${selectedDimensionField.length}
6)`)))),sequenceTableComponents(selectedDimensionField,dimensionsShown,HistogramAndMetrics_aggregationColumns,dimensionPagination,dimensionSorting,this.onDimensionTableChange),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),additionalMetricsComponent(selectedMetrics),sourceFieldComponents(selectedMetrics,this.parseMetric(metricsShown),HistogramAndMetrics_metricsColumns,pagination,sorting,this.onTableChange),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}var components_HistogramAndMetrics=HistogramAndMetrics_HistogramAndMetrics;class JobNameAndIndices_JobNameAndIndices extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{rollupId:rollupId,description:description,onChangeStep:onChangeStep,sourceIndex:sourceIndex,targetIndex:targetIndex}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Job name and indexes"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(1)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Name"),external_osdSharedDeps_React_default.a.createElement("dd",null,rollupId))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Source Index"),external_osdSharedDeps_React_default.a.createElement("dd",null,sourceIndex[0].label))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Target index"),external_osdSharedDeps_React_default.a.createElement("dd",null,targetIndex[0].label))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Description"),external_osdSharedDeps_React_default.a.createElement("dd",null,description==""?"-":description)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}var components_JobNameAndIndices=JobNameAndIndices_JobNameAndIndices;class ScheduleRolesAndNotifications_ScheduleRolesAndNotifications extends external_osdSharedDeps_React_["Component"]{render(){const{onChangeStep:onChangeStep,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit}=this.props;let scheduleText=continuousDefinition==="fixed"?buildIntervalScheduleText(continuousJob==="yes",interval,intervalTimeunit):buildCronScheduleText(continuousJob==="yes",cronExpression);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Schedule"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(3)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Enabled by default"),external_osdSharedDeps_React_default.a.createElement("dd",null,jobEnabledByDefault?"Yes":"No"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Schedule"),external_osdSharedDeps_React_default.a.createElement("dd",null,scheduleText))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Pages per execution"),external_osdSharedDeps_React_default.a.createElement("dd",null,pageSize))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Execution delay"),external_osdSharedDeps_React_default.a.createElement("dd",null,isNaN(delayTime)||delayTime==undefined||delayTime==0?"-":delayTime+" "+parseTimeunit(delayTimeunit))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}var components_ScheduleRolesAndNotifications=ScheduleRolesAndNotifications_ScheduleRolesAndNotifications;function CreateRollupStep4_defineProperty(e,r,t){return(r=CreateRollupStep4_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateRollupStep4_toPropertyKey(t){var i=CreateRollupStep4_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateRollupStep4_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
6class CreateRollupStep4_CreateRollupStep4 extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateRollupStep4_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS])});CreateRollupStep4_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].ROLLUPS)})}render(){if(this.props.currentStep!=4)return null;const getTitle=!this.props.useNewUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Review and create")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};const padding_style=this.props.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateRollupSteps,{step:4})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,getTitle(),external_osdSharedDeps_React_default.a.createElement(components_JobNameAndIndices,this.props),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_HistogramAndMetrics,this.props),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_ScheduleRolesAndNotifications,this.props),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You can't change aggregations or metrics after creating a job. Double-check your choices before proceeding."))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}CreateRollupStep4_defineProperty(CreateRollupStep4_CreateRollupStep4,"contextType",core_services["b"]);var containers_CreateRollupStep4=CreateRollupStep4_CreateRollupStep4;function CreateRollupForm_extends(){return CreateRollupForm_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateRollupForm_extends.apply(null,arguments)}function CreateRollupForm_defineProperty(e,r,t){return(r=CreateRollupForm_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateRollupForm_toPropertyKey(t){var i=CreateRollupForm_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateRollupForm_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateRollupForm_CreateRollupForm extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateRollupForm_defineProperty(this,"_isMount",void 0);CreateRollupForm_defineProperty(this,"componentDidMount",async()=>{const breadCrumbs=this.state.useNewUX?[constants["f"].ROLLUPS,constants["f"].CREATE_ROLLUP]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS,constants["f"].CREATE_ROLLUP];this.context.chrome.setBreadcrumbs(breadCrumbs)});CreateRollupForm_defineProperty(this,"getMappings",async srcIndex=>{if(!srcIndex.length)return;try{const{rollupService:rollupService}=this.props;const response=await rollupService.getMappings(srcIndex);if(response.ok){let allMappings=[];const mappings=response.response;for(let index in mappings){allMappings.push(parseFieldOptions("",mappings[index].mappings.properties))}const fields=allMappings.reduce((mappingA,mappingB)=>mappingA.filter(itemA=>mappingB.some(itemB=>compareFieldItem(itemA,itemB))));this.setState({mappings:mappings,fields:fields,allMappings:allMappings})}else{this.context.notifications.toasts.addDanger(`Could not load fields: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load fields"))}});CreateRollupForm_defineProperty(this,"onChangeStep",step=>{if(step>3)return;this.setState({currentStep:step})});CreateRollupForm_defineProperty(this,"onChangeDescription",e=>{const description=e.target.value;let newJSON=this.state.rollupJSON;newJSON.rollup.description=description;
6this.setState({description:description,rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeName",e=>{const rollupId=e.target.value;this.setState({rollupId:rollupId,rollupIdError:rollupId?"":"Name is required"})});CreateRollupForm_defineProperty(this,"onChangeSourceIndex",async options=>{let newJSON=this.state.rollupJSON;let sourceIndex=options.map((function(option){return option.label}));const sourceIndexError=sourceIndex.length?"":"Source index is required";const srcIndexText=sourceIndex.length?sourceIndex[0]:"";newJSON.rollup.source_index=srcIndexText;this.setState({sourceIndex:options,rollupJSON:newJSON,sourceIndexError:sourceIndexError});this.setState({selectedDimensionField:[],selectedMetrics:[]});await this.getMappings(srcIndexText)});CreateRollupForm_defineProperty(this,"onChangeTargetIndex",options=>{let newJSON=this.state.rollupJSON;let targetIndex=options.map((function(option){return option.label}));const targetIndexError=targetIndex.length?"":"Target index is required";newJSON.rollup.target_index=targetIndex[0];this.setState({targetIndex:options,rollupJSON:newJSON,targetIndexError:targetIndexError})});CreateRollupForm_defineProperty(this,"onChangeIntervalType",intervalType=>{this.setState({intervalType:intervalType,timeunit:"h"})});CreateRollupForm_defineProperty(this,"onChangeIntervalValue",e=>{this.setState({intervalValue:e.target.valueAsNumber})});CreateRollupForm_defineProperty(this,"onChangeTimeunit",e=>{this.setState({timeunit:e.target.value})});CreateRollupForm_defineProperty(this,"setDateHistogram",()=>{const{intervalType:intervalType,intervalValue:intervalValue,timeunit:timeunit}=this.state;let newJSON=this.state.rollupJSON;if(intervalType=="calendar"){newJSON.rollup.dimensions[0].date_histogram.calendar_interval=`1${timeunit}`;delete newJSON.rollup.dimensions[0].date_histogram["fixed_interval"]}else{newJSON.rollup.dimensions[0].date_histogram.fixed_interval=`${intervalValue}${timeunit}`;delete newJSON.rollup.dimensions[0].date_histogram["calendar_interval"]}this.setState({rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeTimestamp",selectedOptions=>{let newJSON=this.state.rollupJSON;const timestamp=selectedOptions.map((function(option){return option.label}));const timestampError=timestamp.length?"":"Timestamp is required.";newJSON.rollup.dimensions[0].date_histogram.source_field=timestamp.length?timestamp[0]:"";this.setState({timestamp:selectedOptions,rollupJSON:newJSON,timestampError:timestampError})});CreateRollupForm_defineProperty(this,"onChangeTimezone",e=>{let newJSON=this.state.rollupJSON;newJSON.rollup.dimensions[0].date_histogram.timezone=e.target.value;this.setState({timezone:e.target.value,rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onDimensionSelectionChange",selectedFields=>{this.setState({selectedDimensionField:selectedFields})});CreateRollupForm_defineProperty(this,"onMetricSelectionChange",selectedFields=>{this.setState({selectedMetrics:selectedFields})});CreateRollupForm_defineProperty(this,"onChangeJobEnabledByDefault",()=>{const checked=this.state.jobEnabledByDefault;let newJSON=this.state.rollupJSON;newJSON.rollup.enabled=!checked;this.setState({jobEnabledByDefault:!checked,rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeCron",e=>{this.setState({cronExpression:e.target.value})});CreateRollupForm_defineProperty(this,"onChangeCronTimezone",e=>{this.setState({cronTimezone:e.target.value})});CreateRollupForm_defineProperty(this,"onChangeDelayTime",e=>{this.setState({delayTime:e.target.valueAsNumber})});CreateRollupForm_defineProperty(this,"updateDelay",()=>{const{delayTimeunit:delayTimeunit,delayTime:delayTime}=this.state;let newJSON=this.state.rollupJSON;if(delayTime==undefined)newJSON.rollup.delay=0;else newJSON.rollup.delay=delayTimeUnitToMS(delayTime,delayTimeunit);this.setState({rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeIntervalTime",e=>{this.setState({interval:e.target.valueAsNumber});if(e.target.value==""){const intervalErrorMsg="Interval value is required.";this.setState({submitError:intervalErrorMsg,intervalError:intervalErrorMsg})}else{this.setState({intervalError:""})}});CreateRollupForm_defineProperty(this,"onChangePage",e=>{let newJSON=this.state.rollupJSON;newJSON.rollup.page_size=e.target.valueAsNumber;this.setState({pageSize:e.target.valueAsNumber,rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeContinuousDefinition",e=>{this.setState({continuousDefinition:e.target.value})});CreateRollupForm_defineProperty(this,"updateSchedule",()=>{const{continuousDefinition:continuousDefinition,cronExpression:cronExpression,interval:interval,intervalTimeunit:intervalTimeunit,cronTimezone:cronTimezone}=this.state;let newJSON=this.state.rollupJSON;if(continuousDefinition=="cron"){newJSON.rollup.schedule.cron={expression:`${cronExpression}`,timezone:`${cronTimezone}`};delete newJSON.rollup.schedule["interval"]}else{newJSON.rollup.schedule.interval={start_time:external_osdSharedDeps_Moment_default()().unix(),unit:`${intervalTimeunit}`,period:`${interval}`};delete newJSON.rollup.schedule["cron"]}this.setState({rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeContinuousJob",optionId=>{let newJSON=this.state.rollupJSON;newJSON.rollup.continuous=optionId=="yes";this.setState({continuousJob:optionId,rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onChangeDelayTimeunit",e=>{this.setState({delayTimeunit:e.target.value})});CreateRollupForm_defineProperty(this,"onChangeIntervalTimeunit",e=>{this.setState({intervalTimeunit:e.target.value})});CreateRollupForm_defineProperty(this,"updateDimension",()=>{const{rollupJSON:rollupJSON,selectedDimensionField:selectedDimensionField}=this.state;let newJSON=rollupJSON;newJSON.rollup.dimensions=rollupJSON.rollup.dimensions.splice(0,1);selectedDimensionField.map(dimension=>{if(dimension.aggregationMethod=="terms"){newJSON.rollup.dimensions.push({terms:{source_field:dimension.field.label}})}else{newJSON.rollup.dimensions.push({histogram:{source_field:dimension.field.label,interval:dimension.interval}})}});this.setState({rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"updateMetric",()=>{const{rollupJSON:rollupJSON,selectedMetrics:selectedMetrics}=this.state;let newJSON=rollupJSON;newJSON.rollup.metrics=[];selectedMetrics.map(metric=>{const metrics=[];if(metric.min)metrics.push({min:{}});if(metric.max)metrics.push({max:{}});if(metric.sum)metrics.push({sum:{}});if(metric.avg)metrics.push({avg:{}});if(metric.value_count)metrics.push({value_count:{}});newJSON.rollup.metrics.push({source_field:metric.source_field.label,metrics:metrics})});this.setState({rollupJSON:newJSON})});CreateRollupForm_defineProperty(this,"onSubmit",async()=>{const{rollupId:rollupId,rollupJSON:rollupJSON}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{if(!rollupId){this.setState({rollupIdError:"Required"})}else{this.setDateHistogram();this.updateDimension();this.updateMetric();this.updateSchedule();this.updateDelay();await this.onCreate(rollupId,rollupJSON)}}catch(err){this.context.notifications.toasts.addDanger("Invalid Rollup JSON");console.error(err)}if(this._isMount){this.setState({isSubmitting:false})}});CreateRollupForm_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].ROLLUPS)});CreateRollupForm_defineProperty(this,"onCreate",async(rollupId,rollup)=>{const{rollupService:rollupService}=this.props;try{const response=await rollupService.putRollup(rollup,rollupId);if(response.ok){this.context.notifications.toasts.addSuccess(`Created rollup: ${response.response._id}`);this.props.history.push(constants["D"].ROLLUPS)}else{this.setState({submitError:response.error});this.context.notifications.toasts.addDanger(`Failed to create rollup: ${response.error}`)}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem creating the rollup job")});this.context.notifications.toasts.addDanger(`Failed to create rollup: ${Object(helpers["d"])(err,"There was a problem creating the rollup job")}`)}});const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");this.state={...CreateRollupForm_CreateRollupForm.baseState,useNewUX:useNewUX};this._next=this._next.bind(this);this._prev=this._prev.bind(this);this._isMount=true}componentWillUnmount(){this._isMount=false}componentDidUpdate(prevProps,prevState){if(prevProps.dataSourceId!==this.props.dataSourceId){this.setState({...CreateRollupForm_CreateRollupForm.baseState,rollupId:this.state.rollupId,description:this.state.description})}}_next(){let currentStep=this.state.currentStep;let error=false;const dataSourceReadOnly=this.props.dataSourceReadOnly;const setDataSourceReadOnly=this.props.setDataSourceReadOnly;if(this.props.multiDataSourceEnabled&&!dataSourceReadOnly){setDataSourceReadOnly(true)}if(currentStep==1){const{rollupId:rollupId,sourceIndex:sourceIndex,targetIndex:targetIndex}=this.state;if(!rollupId){this.setState({submitError:"Job name is required.",rollupIdError:"Job name is required."});error=true}if(sourceIndex.length==0){this.setState({submitError:"Source index is required.",sourceIndexError:"Source index is required."});error=true}if(targetIndex.length==0){this.setState({submitError:"Target index is required.",targetIndexError:"Target index is required."});error=true}}else if(currentStep==2){const{timestamp:timestamp,selectedMetrics:selectedMetrics}=this.state;if(timestamp.length==0){this.setState({submitError:"Timestamp is required.",timestampError:"Timestamp is required."});error=true}if(selectedMetrics.length!=0){let invalidMetric=false;selectedMetrics.map(metric=>{if(!(metric.min||metric.max||metric.sum||metric.avg||metric.value_count)){const errorMsg="Must specify at least one metric to aggregate on for: "+metric.source_field.label;this.setState({submitError:errorMsg,metricError:errorMsg});invalidMetric=true;error=true}});if(!invalidMetric)this.setState({metricError:""})}}else if(currentStep==3){const{intervalError:intervalError,continuousDefinition:continuousDefinition}=this.state;
6if(continuousDefinition=="fixed"){if(intervalError!=""){const intervalErrorMsg="Interval value is required.";this.setState({submitError:intervalErrorMsg,intervalError:intervalErrorMsg});error=true}}}if(error)return;currentStep=currentStep>=3?4:currentStep+1;this.setState({submitError:"",currentStep:currentStep})}_prev(){let currentStep=this.state.currentStep;currentStep=currentStep<=1?1:currentStep-1;if(currentStep===1){const dataSourceReadOnly=this.props.dataSourceReadOnly;const setDataSourceReadOnly=this.props.setDataSourceReadOnly;if(this.props.multiDataSourceEnabled&&dataSourceReadOnly){setDataSourceReadOnly(false)}}this.setState({currentStep:currentStep})}render(){const{rollupId:rollupId,rollupIdError:rollupIdError,submitError:submitError,isSubmitting:isSubmitting,hasSubmitted:hasSubmitted,description:description,sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,targetIndex:targetIndex,targetIndexError:targetIndexError,currentStep:currentStep,timestamp:timestamp,timestampError:timestampError,fields:fields,selectedTerms:selectedTerms,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,metricError:metricError,intervalValue:intervalValue,intervalType:intervalType,timezone:timezone,timeunit:timeunit,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,useNewUX:useNewUX}=this.state;return external_osdSharedDeps_React_default.a.createElement("form",{onSubmit:this.onSubmit},external_osdSharedDeps_React_default.a.createElement(containers_CreateRollup,CreateRollupForm_extends({},this.props,{rollupId:rollupId,rollupIdError:rollupIdError,submitError:submitError,isSubmitting:isSubmitting,hasSubmitted:hasSubmitted,description:description,sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,targetIndex:targetIndex,targetIndexError:targetIndexError,onChangeName:this.onChangeName,onChangeDescription:this.onChangeDescription,onChangeSourceIndex:this.onChangeSourceIndex,onChangeTargetIndex:this.onChangeTargetIndex,currentStep:this.state.currentStep,hasAggregation:selectedDimensionField.length!=0||selectedMetrics.length!=0,useNewUX:useNewUX})),external_osdSharedDeps_React_default.a.createElement(containers_CreateRollupStep2,CreateRollupForm_extends({},this.props,{currentStep:this.state.currentStep,fields:fields,selectedTerms:selectedTerms,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,metricError:metricError,intervalType:intervalType,intervalValue:intervalValue,timestamp:timestamp,timestampError:timestampError,timeunit:timeunit,timezone:timezone,onChangeIntervalType:this.onChangeIntervalType,onChangeIntervalValue:this.onChangeIntervalValue,onChangeTimestamp:this.onChangeTimestamp,onChangeTimeunit:this.onChangeTimeunit,onChangeTimezone:this.onChangeTimezone,onDimensionSelectionChange:this.onDimensionSelectionChange,onMetricSelectionChange:this.onMetricSelectionChange,useNewUX:useNewUX})),external_osdSharedDeps_React_default.a.createElement(containers_CreateRollupStep3,CreateRollupForm_extends({},this.props,{currentStep:this.state.currentStep,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,onChangeJobEnabledByDefault:this.onChangeJobEnabledByDefault,onCh
6angeCron:this.onChangeCron,onChangeCronTimezone:this.onChangeCronTimezone,onChangeDelayTime:this.onChangeDelayTime,onChangeIntervalTime:this.onChangeIntervalTime,onChangePage:this.onChangePage,onChangeContinuousDefinition:this.onChangeContinuousDefinition,onChangeContinuousJob:this.onChangeContinuousJob,onChangeDelayTimeunit:this.onChangeDelayTimeunit,onChangeIntervalTimeunit:this.onChangeIntervalTimeunit,useNewUX:useNewUX})),external_osdSharedDeps_React_default.a.createElement(containers_CreateRollupStep4,CreateRollupForm_extends({},this.props,{rollupId:rollupId,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,intervalType:intervalType,intervalValue:intervalValue,timestamp:timestamp,timeunit:timeunit,timezone:timezone,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,currentStep:this.state.currentStep,onChangeStep:this.onChangeStep,submitError:submitError,useNewUX:useNewUX})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",style:useNewUX?undefined:{padding:"5px 50px"},gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"createRollupCancelButton"},"Cancel")),currentStep!=1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this._prev,"data-test-subj":"createRollupPreviousButton"},"Previous")),currentStep==4?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"createRollupSubmitButton"},"Create")):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this._next,"data-test-subj":"createRollupNextButton"},"Next"))))}}CreateRollupForm_defineProperty(CreateRollupForm_CreateRollupForm,"contextType",core_services["b"]);CreateRollupForm_defineProperty(CreateRollupForm_CreateRollupForm,"baseState",{currentStep:1,rollupSeqNo:null,rollupPrimaryTerm:null,rollupId:"",rollupIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false,loadingIndices:true,indices:[],totalIndices:0,mappings:"",allMappings:[],fields:[],selectedFields:[],selectedTerms:[],selectedDimensionField:[],selectedMetrics:[],metricError:"",description:"",sourceIndex:[],sourceIndexError:"",targetIndex:[],targetIndexError:"",timestamp:[],timestampError:"",intervalType:"fixed",intervalValue:1,intervalError:"",timezone:"UTC",timeunit:"h",jobEnabledByDefault:true,continuousJob:"no",continuousDefinition:"fixed",interval:1,intervalTimeunit:"MINUTES",cronExpression:"",cronTimezone:"UTC",pageSize:1e3,delayTime:undefined,delayTimeunit:"MINUTES",rollupJSON:JSON.parse(EMPTY_ROLLUP)});var containers_CreateRollupForm_CreateRollupForm=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreateRollupForm_CreateRollupForm,CreateRollupForm_extends({},props,dataSourceMenuProperties))};var containers_CreateRollupForm=containers_CreateRollupForm_CreateRollupForm;const ConfigureTransform=_ref=>{let{isEdit:isEdit,transformId:transformId,transformIdError:transformIdError,onChangeName:onChangeName,onChangeDescription:onChangeDescription,description:description}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Job name and description")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Name")),helpText:"Specify a unique, descriptive name.",isInvalid:!!transformIdError,error:transformIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:!!transformIdError,placeholder:"my-transformjob1",value:transformId,onChange:onChangeName,disabled:isEdit})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Description"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued"},external_osdSharedDeps_React_default.a.createElement("h3",null,external_osdSharedDeps_React_default.a.createElement("i",null," â optional"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{compressed:true,value:description,onChange:onChangeDescription,"data-test-subj":"description"}))))};
6var ConfigureTransform_ConfigureTransform=ConfigureTransform;var components_ConfigureTransform=ConfigureTransform_ConfigureTransform;function IndexFilterPopover(_ref){let{fields:fields,sourceIndexFilter:sourceIndexFilter,onChangeSourceIndexFilter:onChangeSourceIndexFilter,closePopover:closePopover}=_ref;const[selectedField,setSelectedField]=Object(external_osdSharedDeps_React_["useState"])("");const[selectedOperator,setSelectedOperator]=Object(external_osdSharedDeps_React_["useState"])("");const[selectedValue,setSelectedValue]=Object(external_osdSharedDeps_React_["useState"])("");const[queryDsl,setQueryDsl]=Object(external_osdSharedDeps_React_["useState"])(sourceIndexFilter);const onChangeSelectedField=e=>{setSelectedField(e.target.value)};const onChangeSelectedOperator=e=>{setSelectedOperator(e.target.value)};const onChangeSelectedValue=e=>{setSelectedValue(e.target.value)};function paramsEditor(){return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Field"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectField",options:fields.map(item=>({value:item.label,text:item.label})),value:selectedField,onChange:onChangeSelectedField}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Operator"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectOperator",options:[],value:selectedOperator,onChange:onChangeSelectedOperator})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Value"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectValue",options:[],value:selectedValue,onChange:onChangeSelectedValue}))))}function customEditor(){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Custom query DSL"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{style:{width:.38*window.innerWidth,height:.4*window.innerHeight},value:queryDsl,onChange:string=>setQueryDsl(string),mode:"json"}))}return external_osdSharedDeps_React_default.a.createElement("div",{style:{width:.4*window.innerWidth}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopoverTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"baseline",responsive:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,"Edit data filter"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,customEditor(),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"rowReverse",alignItems:"center",responsive:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{onChangeSourceIndexFilter(queryDsl);closePopover()},"data-test-subj":"saveFilter"},"Save")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{flush:"right",onClick:closePopover,"data-test-subj":"cancelSaveFilter"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null))))}var components_IndexFilterPopover=IndexFilterPopover;function TransformIndices_extends(){return TransformIndices_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TransformIndices_extends.apply(null,arguments)}function TransformIndices_defineProperty(e,r,t){return(r=TransformIndices_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function TransformIndices_toPropertyKey(t){var i=TransformIndices_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function TransformIndices_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class TransformIndices_TransformIndices extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);TransformIndices_defineProperty(this,"_isMount",void 0);TransformIndices_defineProperty(this,"onIndexSearchChange",async searchValue=>{if(!this._isMount){return}const{indexService:indexService}=this.props;this.setState({isLoading:true,indexOptions:[]});
6try{const dataStreamsAndIndicesNamesResponse=await indexService.getDataStreamsAndIndicesNames(searchValue);if(!this._isMount){return}if(dataStreamsAndIndicesNamesResponse.ok){const options=searchValue.trim()?[{label:Object(helpers["f"])(searchValue)}]:[];const dataStreams=dataStreamsAndIndicesNamesResponse.response.dataStreams.map(label=>({label:label}));const indices=dataStreamsAndIndicesNamesResponse.response.indices.map(label=>({label:label}));this.setState({indexOptions:options.concat(dataStreams,indices),targetIndexOptions:indices})}else{if(dataStreamsAndIndicesNamesResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("No index available")}else{this.context.notifications.toasts.addDanger(dataStreamsAndIndicesNamesResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(err.message)}this.setState({isLoading:false})});TransformIndices_defineProperty(this,"onCreateOption",(searchValue,flattenedOptions)=>{const{targetIndexOptions:targetIndexOptions}=this.state;const{onChangeTargetIndex:onChangeTargetIndex}=this.props;const normalizedSearchValue=searchValue.trim();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(flattenedOptions.findIndex(option=>option.label.trim()===normalizedSearchValue)===-1){targetIndexOptions.concat(newOption);this.setState({targetIndexOptions:targetIndexOptions})}onChangeTargetIndex([newOption])});TransformIndices_defineProperty(this,"onButtonClick",()=>{const{isPopoverOpen:isPopoverOpen}=this.state;if(isPopoverOpen){this.setState({isPopoverOpen:false})}else{this.setState({isPopoverOpen:true})}});TransformIndices_defineProperty(this,"closePopover",()=>this.setState({isPopoverOpen:false}));this.state={isLoading:true,indexOptions:[],targetIndexOptions:[],isPopoverOpen:false,selectFieldValue:""};this._isMount=true;this.onIndexSearchChange=external_osdSharedDeps_Lodash_default.a.debounce(this.onIndexSearchChange,500,{leading:true})}async componentDidMount(){await this.onIndexSearchChange("")}componentWillUnmount(){this._isMount=false}render(){const{sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,sourceIndexFilter:sourceIndexFilter,sourceIndexFilterError:sourceIndexFilterError,targetIndex:targetIndex,targetIndexError:targetIndexError,onChangeSourceIndex:onChangeSourceIndex,onChangeSourceIndexFilter:onChangeSourceIndexFilter,onChangeTargetIndex:onChangeTargetIndex,hasAggregation:hasAggregation,beenWarned:beenWarned}=this.props;const{isLoading:isLoading,indexOptions:indexOptions,targetIndexOptions:targetIndexOptions,isPopoverOpen:isPopoverOpen}=this.state;const clearIndexFilter=()=>{onChangeSourceIndexFilter("")};return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Indices")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,hasAggregation&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement("p",null,"Note: changing source index will erase all existing definitions about aggregations and metrics."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Source index")),error:sourceIndexError,isInvalid:sourceIndexError!="",helpText:"The index where this transform job is performed on. Type in * as wildcard for index pattern. Indices cannot be changed once the job is created. Please ensure that you select the right source index."},external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{placeholder:"Select source index",options:indexOptions,selectedOptions:sourceIndex,onChange:onChangeSourceIndex,singleSelection:{asPlainText:true},onSearchChange:this.onIndexSearchChange,isLoading:isLoading,isInvalid:sourceIndexError!="","data-test-subj":"sourceIndexCombobox"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Source index filter"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued"},external_osdSharedDeps_React_default.a.createElement("h3",null,external_osdSharedDeps_React_default.a.createElement("i",null," â optional"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",color:"subdued",style:{width:"400px"}},"You can use the custom DSL to filter a subset of the source index to use in the transform job, which optimizes the job for performance and computing resources. You cannot change these filters once the job is created."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,target:"_blank",href:"https://opensearch.org/docs/opensearch/query-dsl/index/",rel:"noopener noreferrer"}," ","Learn more")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{iconType:"cross",iconSide:"right",onClick:()=>this.onButtonClick(),onClickAriaLabel:"Edit Source Index Filter",iconOnClick:()=>clearIndexFilter(),iconOnClickAriaLabel:"Clear Source Index Filter"},sourceIndexFilter),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{size:"xs",onClick:()=>this.onButtonClick(),"data-test-subj":"addFilter",className:"globalFilterBar__addButton"},"Edit data filter"),isOpen:isPopoverOpen,closePopover:this.closePopover},external_osdSharedDeps_React_default.a.createElement(components_IndexFilterPopover,TransformIndices_extends({},this.props,{closePopover:this.closePopover}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"danger",size:"xs"},sourceIndexFilterError),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Target index")),error:targetIndexError,isInvalid:targetIndexError!="",helpText:"The index stores transform results. You can look up an existing index to reuse or type to create a new index."},external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{placeholder:"Select or create target index",options:targetIndexOptions,selectedOptions:targetIndex,onChange:onChangeTargetIndex,onCreateOption:this.onCreateOption,singleSelection:{asPlainText:true},onSearchChange:this.onIndexSearchChange,isLoading:isLoading,isInvalid:targetIndexError!="","data-test-subj":"targetIndexCombobox"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You can't change indices after creating a job. Double-check the source and target index names before proceeding.")))))}}TransformIndices_defineProperty(TransformIndices_TransformIndices,"contextType",core_services["b"]);var components_TransformIndices=TransformIndices_TransformIndices;
6const CreateTransformSteps_setOfSteps=step=>[{title:"Set up indices",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)},{title:"Define transforms",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<2?"disabled":null},{title:"Specify schedule",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<3?"disabled":null},{title:"Review and create",children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),status:step<4?"disabled":null}];const CreateTransformSteps=_ref=>{let{step:step}=_ref;return external_osdSharedDeps_React_default.a.createElement("div",{style:{paddingLeft:"10px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSteps"],{steps:CreateTransformSteps_setOfSteps(step),headingElement:"h6",titleSize:"xs"}))};var CreateTransformSteps_CreateTransformSteps=CreateTransformSteps;var components_CreateTransformSteps=CreateTransformSteps_CreateTransformSteps;function SetUpIndicesStep_extends(){return SetUpIndicesStep_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SetUpIndicesStep_extends.apply(null,arguments)}class SetUpIndicesStep_SetUpIndicesStep extends external_osdSharedDeps_React_["Component"]{render(){if(this.props.currentStep!==1){return null}const Title=!this.props.useUpdatedUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Set up indices")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};return external_osdSharedDeps_React_default.a.createElement("div",{style:this.props.useUpdatedUX?{padding:"0px"}:{padding:"5px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateTransformSteps,{step:1})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,Title(),external_osdSharedDeps_React_default.a.createElement(components_ConfigureTransform,SetUpIndicesStep_extends({isEdit:false},this.props)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_TransformIndices,SetUpIndicesStep_extends({key:this.props.dataSourceId},this.props)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}var containers_SetUpIndicesStep=SetUpIndicesStep_SetUpIndicesStep;function PreviewEmptyPrompt(_ref){let{isReadOnly:isReadOnly}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,isReadOnly?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h4",null," No preview available "))}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null," No fields selected ")),body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null," ","From the table above, select a field you want to transform by clicking ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"plusInCircleFilled"})," next to the field name."))}))}var components_PreviewEmptyPrompt=PreviewEmptyPrompt;function EditTransformPanel(_ref){let{name:name,aggList:aggList,onEditTransformation:onEditTransformation,closePopover:closePo
6pover}=_ref;const[transformName,setTransformName]=Object(external_osdSharedDeps_React_["useState"])(name);const[transformNameError,setTransformNameError]=Object(external_osdSharedDeps_React_["useState"])("");const validateName=newName=>{const isDuplicate=aggList.some(item=>item.name===newName);if(name!==newName&&isDuplicate)setTransformNameError(`Transformation with name "${newName}" already exists`);else setTransformNameError("")};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Transformation name",isInvalid:transformNameError!=="",error:transformNameError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:transformName,isInvalid:transformNameError!=="",onChange:e=>{validateName(e.target.value);setTransformName(e.target.value)}})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fullWidth:false,onClick:()=>
6closePopover(),style:{minWidth:84}},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,fullWidth:false,disabled:transformNameError!=="",onClick:()=>{if(name!==transformName)onEditTransformation(name,transformName);closePopover()},style:{minWidth:55}},"OK"))))}var Panels_EditTransformPanel=EditTransformPanel;function PreviewOptions(_ref){let{name:name,aggList:aggList,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation}=_ref;const[isPopoverOpen,setIsPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const closePopover=()=>{setIsPopoverOpen(false)};const button=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{color:"primary",iconType:"pencil",onClick:()=>setIsPopoverOpen(!isPopoverOpen)});const panels=[{id:0,title:"",items:[{name:"Edit transformation",panel:1},{name:"Remove transformation",onClick:()=>{onRemoveTransformation(name)}}]},{id:1,title:"Back",content:external_osdSharedDeps_React_default.a.createElement(Panels_EditTransformPanel,{name:name,aggList:aggList,onEditTransformation:onEditTransformation,closePopover:closePopover})}];return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"eui-textTruncate",grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:name},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("b",null,name)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"previewColumnPopover",button:button,isOpen:isPopoverOpen,closePopover:closePopover,panelPaddingSize:"none",anchorPosition:"rightCenter"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,panels:panels})))))}var components_PreviewOptions=PreviewOptions;const Transforms_utils_constants_DEFAULT_QUERY_PARAMS={from:0,size:20,search:"",sortField:"_id",sortDirection:constants["I"].DESC};const EMPTY_TRANSFORM=JSON.stringify({transform:{description:"",groups:[],enabled:true,aggregations:{},data_selection_query:{},roles:[],schedule:{interval:{start_time:234802,period:1,unit:"MINUTES"}},source_index:"",target_index:""}});const constants_ScheduleIntervalTimeunitOptions=[{value:"MINUTES",text:"Minute(s)"},{value:"HOURS",text:"Hour(s)"},{value:"DAYS",text:"Day(s)"}];function Transforms_utils_helpers_getURLQueryParams(location){const{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?Transforms_utils_constants_DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?Transforms_utils_constants_DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?Transforms_utils_constants_DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="string"?Transforms_utils_constants_DEFAULT_QUERY_PARAMS.sortField:sortField,sortDirection:typeof sortDirection!=="string"?Transforms_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection:sortDirection}}const utils_helpers_renderTime=time=>{const momentTime=external_osdSharedDeps_Moment_default()(time).local();if(time&&momentTime.isValid())return momentTime.format("MM/DD/YY h:mmA");return"-"};function PreviewTransform(_ref){let{previewTransform:previewTransform,aggList:aggList,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,isReadOnly:isReadOnly}=_ref;const[previewColumns,setPreviewColumns]=Object(external_osdSharedDeps_React_["useState"])([]);const[visiblePreviewColumns,setVisiblePreviewColumns]=Object(external_osdSharedDeps_React_["useState"])(()=>previewColumns.map(_ref2=>{let{id:id}=_ref2;return id}).slice(0,5));const renderPreviewCellValue=_ref3=>{let{rowIndex:rowIndex,columnId:columnId}=_ref3;if(previewTransform.hasOwnProperty(rowIndex)){if(previewTransform[rowIndex][columnId]){if
6(columnId.includes("date_histogram")){return utils_helpers_renderTime(previewTransform[rowIndex][columnId])}return typeof previewTransform[rowIndex][columnId]!==("string"||false)?JSON.stringify(previewTransform[rowIndex][columnId]):previewTransform[rowIndex][columnId]}}return"-"};const updatePreviewColumns=()=>{if(isReadOnly){if(previewTransform.length){let tempCol=[];for(const[key,value]of Object.entries(previewTransform[0])){tempCol.push({id:key,display:external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:key},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("b",null,key)))),actions:{showHide:false,showMoveLeft:false,showMoveRight:false,showSortAsc:false,showSortDesc:false}})}setPreviewColumns(tempCol);setVisiblePreviewColumns(()=>tempCol.map(_ref4=>{let{id:id}=_ref4;return id}))}}else{if(aggList.length){let tempCol=[];aggList.map(aggItem=>{tempCol.push({id:aggItem.name,display:external_osdSharedDeps_React_default.a.createElement(components_PreviewOptions,{name:aggItem.name,aggList:aggList,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation}),actions:{showHide:false,showMoveLeft:false,showMoveRight:false,showSortAsc:false,showSortDesc:false}})});setPreviewColumns(tempCol);setVisiblePreviewColumns(()=>tempCol.map(_ref5=>{let{id:id}=_ref5;return id}))}}};external_osdSharedDeps_React_default.a.useEffect(()=>{updatePreviewColumns()},[previewTransform,aggList]);return!isReadOnly&&aggList.length||isReadOnly&&previewTransform.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDataGrid"],{style:{overflow:"scroll",width:"100%"},"aria-label":"Preview transforms",columns:previewColumns,columnVisibility:{visibleColumns:visiblePreviewColumns,setVisibleColumns:setVisiblePreviewColumns},rowCount:previewTransform.length,renderCellValue:renderPreviewCellValue,toolbarVisibility:{showColumnSelector:true,showStyleSelector:false,showSortSelector:false,showFullScreenSelector:false},gridStyle:{rowHover:isReadOnly?"none":"highlight"}}):external_osdSharedDeps_React_default.a.createElement(components_PreviewEmptyPrompt,{isReadOnly:isReadOnly})}var components_PreviewTransform=PreviewTransform;var interfaces=__webpack_require__(20);const helpers_parseTimeunit=timeunit=>{if(timeunit=="ms"||timeunit=="Milliseconds")return"millisecond(s)";else if(timeunit=="SECONDS"||timeunit=="s"||timeunit=="Seconds")return"second(s)";else if(timeunit=="MINUTES"||timeunit=="m"||timeunit=="Minutes")return"minute(s)";else if(timeunit=="HOURS"||timeunit=="h"||timeunit=="Hours")return"hour(s)";else if(timeunit=="DAYS"||timeunit=="d"||timeunit=="Days")return"day(s)";else if(timeunit=="w")return"week";else if(timeunit=="M")return"month";else if(timeunit=="q")return"quarter";else if(timeunit=="y")return"year";return timeunit};const helpers_isNumericMapping=fieldType=>fieldType=="long"||fieldType=="integer"||fieldType=="short"||fieldType=="byte"||fieldType=="double"||fieldType=="float"||fieldType=="half_float"||fieldType=="scaled_float";const helpers_compareFieldItem=(itemA,itemB)=>itemB.label==itemA.label&&itemA.type==itemB.type;const helpers_parseFieldOptions=(prefix,mappings)=>{let fieldsOption=[];for(let field in mappings){if(mappings.hasOwnProperty(field)){if(mappings[field].type!="object"&&mappings[field].type!=null&&mappings[field].type!="nested")fieldsOption.push({label:prefix+field,type:mappings[field].type,path:mappings[field].path});if(mappings[field].fields!=null)fieldsOption=fieldsOption.concat(helpers_parseFieldOptions(prefix+field+".",mappings[field].fields));if(mappings[field].properties!=null)fieldsOption=fieldsOption.concat(helpers_parseFieldOptions(prefix+field+".",mappings[field].properties))}}return fieldsOption};const createdTransformToastMessage=transformId=>`Transform job "${transformId}" successfully created.`;const wrapQuotesAroundTransformId=(transformId,stringToSearch)=>{const regex=new RegExp(transformId,"g");const idWrappedWithQuotes=`"${transformId}"`;return stringToSearch.replace(regex,idWrappedWithQuotes)};const isGroupBy=type=>type==interfaces["d"].histogram||type==interfaces["d"].terms||type==interfaces["d"].date_histogram;const getDateHistogramGroupItem=(name,targetFieldName,interval,timeunit,intervalType)=>{const dateHistogramInterval=`${interval}${timeunit}`;if(intervalType===constants["x"].CALENDAR)return{date_histogram:{source_field:name,target_field:targetFieldName,calendar_interval:dateHistogramInterval}};else return{date_histogram:{source_field:name,target_field:targetFieldName,fixed_interval:dateHistogramInterval}}};function HistogramPanel(_ref){let{name:name,handleGroupSelectionChange:handleGroupSelectionChange,closePopover:closePo
6pover}=_ref;const[histogramInterval,setHistogramInterval]=Object(external_osdSharedDeps_React_["useState"])(5);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:109}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Histogram interval"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:histogramInterval,onChange:e=>setHistogramInterval(e.target.valueAsNumber)})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fullWidth:false,onClick:()=>
6closePopover(),style:{minWidth:84}},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,fullWidth:false,onClick:()=>{const targetFieldName=`${name} _${interfaces["c"].histogram}_${histogramInterval}`;handleGroupSelectionChange({histogram:{source_field:name,target_field:targetFieldName,interval:histogramInterval}},interfaces["d"].histogram,targetFieldName)},style:{minWidth:55}},"OK"))))}var Panels_HistogramPanel=HistogramPanel;function PercentilePanel(_ref){let{name:name,aggSelection:aggSelection,handleAggSelectionChange:handleAggSelectionChange,closePopover:closePopover}=_ref;const[percents,setPercents]=Object(external_osdSharedDeps_React_["useState"])([]);const[isInvalid,setInvalid]=Object(external_osdSharedDeps_React_["useState"])(false);const onChangePercents=selectedPercent=>{setPercents(selectedPercent);setInvalid(false)};const isValidPercent=value=>{const numericValue=parseFloat(value);return numericValue>=0&&numericValue<=100};const onCreateOption=searchValue=>{if(!isValidPercent(searchValue)){return false}const newOption={label:searchValue};setPercents([...percents,newOption])};const onSearchChange=searchValue=>{if(!searchValue){setInvalid(false);return}setInvalid(!isValidPercent(searchValue))};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"none"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:230}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,label:"Percents",helpText:"Only numbers between 0-100 allowed.",isInvalid:isInvalid,error:isInvalid?"Invalid input":undefined},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{fullWidth:true,noSuggestions:true,selectedOptions:percents,onChange:onChangePercents,onCreateOption:onCreateOption,isInvalid:isInvalid,onSearchChange:onSearchChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fullWidth:false,onClick:()=>
6closePopover(),style:{minWidth:84}},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,fullWidth:false,onClick:()=>{const aggItem={type:interfaces["d"].percentiles,name:`percentiles_${name}`,item:{percentiles:{field:name,percents:percents.map(value=>parseFloat(value.label))}}};aggSelection[`percentiles_${name}`]={percentiles:{field:name,percents:percents.map(value=>parseFloat(value.label))}};handleAggSelectionChange(aggItem)},style:{minWidth:55}},"OK"))))}var Panels_PercentilePanel=PercentilePanel;function ScriptedMetricsPanel(_ref){let{name:name,aggSelection:aggSelection,handleAggSelectionChange:handleAggSelectionChange,closePopover:closePopover}=_ref;const[script,setScript]=Object(external_osdSharedDeps_React_["useState"])("");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Scripted metrics"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{style:{width:.38*window.innerWidth,height:.4*window.innerHeight},value:script,onChange:value=>setScript(value),mode:"json"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fullWidth:false,onClick:()=>
6closePopover()},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,fullWidth:false,onClick:()=>{const aggItem={type:interfaces["d"].scripted_metric,name:`scripted_metric_${name}`,item:{scripted_metric:JSON.parse(script)}};aggSelection[`scripted_metric_${name}`]={scripted_metric:JSON.parse(script)};handleAggSelectionChange(aggItem)},style:{minWidth:55}},"OK")))))}var Panels_ScriptedMetricsPanel=ScriptedMetricsPanel;function DateHistogramPanel(_ref){let{name:name,handleGroupSelectionChange:handleGroupSelectionChange,closePopover:closePopover,intervalType:intervalType}=_ref;const[dateHistogramInterval,setDateHistogramInterval]=Object(external_osdSharedDeps_React_["useState"])(1);const[dateHistogramTimeunit,setDateHistogramTimeunit]=Object(external_osdSharedDeps_React_["useState"])("m");let timeunitOptions,intervalDefinition;if(intervalType===constants["x"].FIXED){intervalDefinition=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:dateHistogramInterval,onChange:e=>setDateHistogramInterval(e.target.valueAsNumber),"data-test-subj":"dateHistogramValueInput"});timeunitOptions=constants["m"]}else{intervalDefinition=external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m"},"Every 1"));timeunitOptions=constants["h"]}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:100}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Interval"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Timeunit")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:100}},intervalDefinition),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{options:timeunitOptions,value:dateHistogramTimeunit,onChange:e=>setDateHistogramTimeunit(e.target.value),"data-test-subj":"dateHistogramTimeunitSelect"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fullWidth:false,onClick:()=>
6closePopover(),style:{minWidth:84},"data-test-subj":"dateHistogramPanelCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,fullWidth:false,onClick:()=>{const targetFieldName=`${name} _${interfaces["c"].dateHistogram}_${dateHistogramInterval}_${dateHistogramTimeunit}_${intervalType}`;const dateHistogramGroupItem=getDateHistogramGroupItem(name,targetFieldName,dateHistogramInterval,dateHistogramTimeunit,intervalType);handleGroupSelectionChange(dateHistogramGroupItem,interfaces["d"].date_histogram,targetFieldName)},style:{minWidth:55},"data-test-subj":"dateHistogramPanelOKButton"},"OK"))))}var Panels_DateHistogramPanel=DateHistogramPanel;function TransformOptions(_ref){let{name:name,type:type,selectedGroupField:selectedGroupField,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,aggList:aggList,onAggregationSelectionChange:onAggregationSelectionChange}=_ref;const isNumeric=helpers_isNumericMapping(type);const isDate=type=="date";const isText=type=="text";const[isPopoverOpen,setIsPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const[groupSelection]=Object(external_osdSharedDeps_React_["useState"])(selectedGroupField);const[aggSelection]=Object(external_osdSharedDeps_React_["useState"])(selectedAggregations);const closePopover=()=>{setIsPopoverOpen(false)};const handleGroupSelectionChange=(newAggItem,type,name)=>{groupSelection.push(newAggItem);onGroupSelectionChange(groupSelection,{type:type,name:name,item:newAggItem});closePopover()};const handleAggSelectionChange=aggItem=>{onAggregationSelectionChange(aggSelection,aggItem);closePopover()};const numberPanels=[{id:0,title:"Transform options",items:[{name:"Group by histogram",panel:1},{name:"Group by terms",onClick:()=>{const targetField=`${name}_${interfaces["c"].terms}`;handleGroupSelectionChange({terms:{source_field:name,target_field:targetField}},interfaces["d"].terms,targetField)}},{name:"Aggregate by sum",onClick:()=>{const aggItem={type:interfaces["d"].sum,name:`sum_${name}`,item:{sum:{field:name}}};aggSelection[`sum_${name}`]={sum:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by max",onClick:()=>{const aggItem={type:interfaces["d"].max,name:`max_${name}`,item:{max:{field:name}}};aggSelection[`max_${name}`]={max:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by min",onClick:()=>{const aggItem={type:interfaces["d"].min,name:`min_${name}`,item:{min:{field:name}}};aggSelection[`min_${name}`]={min:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by avg",onClick:()=>{const aggItem={type:interfaces["d"].avg,name:`avg_${name}`,item:{avg:{field:name}}};aggSelection[`avg_${name}`]={avg:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by count",onClick:()=>{const aggItem={type:interfaces["d"].value_count,name:`count_${name}`,item:{value_count:{field:name}}};aggSelection[`count_${name}`]={value_count:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by percentile",panel:2},{name:"Aggregate by scripted metrics",panel:3}]},{id:1,title:"Back",content:external_osdSharedDeps_React_default.a.createElement(Panels_HistogramPanel,{name:name,handleGroupSelectionChange:handleGroupSelectionChange,aggList:aggList,closePopover:closePopover})},{id:2,title:"Back",content:external_osdSharedDeps_React_default.a.createElement(Panels_PercentilePanel,{name:name,aggSelection:aggSelection,handleAggSelectionChange:handleAggSelectionChange,closePopover:closePopover})},{id:3,title:"Back",width:.4*window.innerWidth,content:external_osdSharedDeps_React_default.a.createElement(Panels_ScriptedMetricsPanel,{name:name,aggSelection:aggSelection,handleAggSelectionChange:handleAggSelectionChange,closePopover:closePopover})}];const datePanels=[{id:0,title:"Transform options",items:[{name:"Group by date histogram",panel:1},{name:"Group by terms",onClick:()=>{const targetField=`${name}_${interfaces["c"].terms}`;handleGroupSelectionChange({terms:{source_field:name,target_field:targetField}},interfaces["d"].terms,targetField)}},{name:"Aggregate by max",onClick:()=>{const aggItem={type:interfaces["d"].max,name:`max_${name}`,item:{max:{field:name}}};
6aggSelection[`max_${name}`]={max:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by min",onClick:()=>{const aggItem={type:interfaces["d"].min,name:`min_${name}`,item:{min:{field:name}}};aggSelection[`min_${name}`]={min:{field:name}};handleAggSelectionChange(aggItem)}},{name:"Aggregate by count",onClick:()=>{const aggItem={type:interfaces["d"].value_count,name:`count_${name}`,item:{value_count:{field:name}}};aggSelection[`count_${name}`]={value_count:{field:name}};handleAggSelectionChange(aggItem)}}]},{id:1,title:"Back",items:[{name:"Fixed interval",panel:2},{name:"Calendar interval",panel:3}]},{id:2,title:"Back",width:350,content:external_osdSharedDeps_React_default.a.createElement(Panels_DateHistogramPanel,{name:name,handleGroupSelectionChange:handleGroupSelectionChange,aggList:aggList,closePopover:closePopover,intervalType:constants["x"].FIXED})},{id:3,title:"Back",width:350,content:external_osdSharedDeps_React_default.a.createElement(Panels_DateHistogramPanel,{name:name,handleGroupSelectionChange:handleGroupSelectionChange,aggList:aggList,closePopover:closePopover,intervalType:constants["x"].CALENDAR})}];const textPanels=[{id:0,title:"Transform options",items:[{name:"No options available for text fields"}]}];const defaultPanels=[{id:0,title:"Transform options",items:[{name:"Group by terms",onClick:()=>{const targetField=`${name}_${interfaces["c"].terms}`;handleGroupSelectionChange({terms:{source_field:name,target_field:targetField}},interfaces["d"].terms,targetField)}},{name:"Aggregate by count",onClick:()=>{const aggItem={type:interfaces["d"].value_count,name:`count_${name}`,item:{value_count:{field:name}}};aggSelection[`count_${name}`]={value_count:{field:name}};handleAggSelectionChange(aggItem)}}]}];const button=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:"plusInCircleFilled",onClick:()=>setIsPopoverOpen(!isPopoverOpen),"data-test-subj":`${name}OptionsPopover`});return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"eui-textTruncate",grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:name},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("b",null,name)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"contextMenuExample",button:button,isOpen:isPopoverOpen,closePopover:closePopover,panelPaddingSize:"none",anchorPosition:"rightCenter"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{size:"s",initialPanelId:0,panels:isNumeric?numberPanels:isText?textPanels:isDate?datePanels:defaultPanels})))))}var components_TransformOptions=TransformOptions;const constants_EMPTY_TRANSFORM=JSON.stringify({transform:{description:"",enabled:true,page_size:1e3,roles:[],schedule:{interval:{start_time:234802,period:1,unit:"MINUTES"}},source_index:"",target_index:""}});const constants_DelayTimeunitOptions=[{value:"SECONDS",text:"Second(s)"},{value:"MINUTES",text:"Minute(s)"},{value:"HOURS",text:"Hour(s)"},{value:"DAYS",text:"Day(s)"}];const utils_constants_ScheduleIntervalTimeunitOptions=[{value:"Minutes",text:"Minute(s)"},{value:"Hours",text:"Hour(s)"},{value:"Days",text:"Day(s)"}];const constants_AddFieldsColumns=[{field:"label",name:"Field name",sortable:true},{field:"type",name:"Field type",sortable:true,render:type=>type==null||type==undefined?"-":type}];const DefaultSampleDataSize=50;function DefineTransforms(_ref){let{transformService:transformService,notifications:notifications,sourceIndex:sourceIndex,sourceIndexFilter:sourceIndexFilter,fields:fields,selectedGroupField:selectedGroupField,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,aggList:aggList,onAggregationSelectionChange:onAggregationSelectionChange,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,previewTransform:previewTransform,isReadOnly:isReadOnly}=_ref;let columns=[];fields.map(field=>{columns.push({id:field.label,display:isReadOnly?external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:field.label},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("b",null,field.label)))):external_osdSharedDeps_React_default.a.createElement(components_TransformOptions,{name:field.label,type:field.type,selectedGroupField:selectedGroupField,onGroupSelectionChange:onGroupSelectionChange,aggList:aggList,selectedAggregations:selectedAggregations,onAggregationSelectionChange:onAggregationSelectionChange}),schema:field.type,path:field.path,actions:{showHide:false,showMoveLeft:false,showMoveRight:false,showSortAsc:false,showSortDesc:false}})});const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(true);const[pagination,setPagination]=Object(external_osdSharedDeps_React_["useState"])({pageIndex:0,pageSize:10});const[from,setFrom]=Object(external_osdSharedDeps_React_["useState"])(0);const[size,setSize]=Object(external_osdSharedDeps_React_["useState"])(10);const[sortingColumns,setSortingColumns]=Object(external_osdSharedDeps_React_["useState"])([]);const[visibleColumns,setVisibleColumns]=Object(external_osdSharedDeps_React_["useState"])(()=>columns.map(_ref2=>{let{id:id}=_ref2;return id}).slice(0,5));const[data,setData]=Object(external_osdSharedDeps_React_["useState"])([]);const[dataCount,setDataCount]=Object(external_osdSharedDeps_React_["useState"])(0);const fetchData=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{setLoading(true);try{const response=await transformService.searchSampleData(sourceIndex,sourceIndexFilter,{from:0,size:DefaultSampleDataSize});if(response.ok){setData(response.response.data);setDataCount(response.response.total.value)}}catch(err){notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the transforms"))}setLoading(false)},[sourceIndex]);external_osdSharedDeps_React_default.a.useEffect(()=>{fetchData()},[]);const onChangeItemsPerPage=Object(external_osdSharedDeps_React_["useCallback"])(pageSize=>{setPagination(pagination=>({...pagination,pageSize:pageSize,pageIndex:0}));setFrom(0);setSize(pageSize)},[setPagination]);const onChangePage=Object(external_osdSharedDeps_React_["useCallback"])(pageIndex=>{setPagination(pagination=>({...pagination,pageIndex:pageIndex}));setFrom(pageIndex*size)},[setPagination]);const onSort=Object(external_osdSharedDeps_React_["useCallback"])(sortingColumns=>{setSortingColumns(sortingColumns)},[setSortingColumns]);const renderCellValue=_ref3=>{let{rowIndex:rowIndex,columnId:columnId}=_ref3;if(!loading&&data.hasOwnProperty(rowIndex)){let lookupId=columnId;if((columns===null||columns===void 0?void 0:columns.find(column=>column.id==columnId).schema)=="alias"){lookupId=columns===null||columns===void 0?void 0:columns.find(column=>column.id==columnId).path}return getColumnValue(rowIndex,lookupId)}return"-"};const getColumnValue=(rowIndex,columnId)=>{if((columns===null||columns===void 0?void 0:columns.find(column=>column.id==columnId).schema)=="keyword"){const correspondingTextColumnId=columnId.replace(".keyword","");return data[rowIndex]._source[correspondingTextColumnId]?data[rowIndex]._source[correspondingTextColumnId]:"-"}else if((columns===null||columns===void 0?void 0:columns.find(column=>column.id==columnId).schema)=="date"){return data[rowIndex]._source[columnId]?utils_helpers_renderTime(data[rowIndex]._source[columnId]):"-"}else if((columns===null||columns===void 0?void 0:columns.find(column=>column.id==columnId).schema)=="boolean"){return data[rowIndex]._source[columnId]==null?"-":data[rowIndex]._source[columnId]?"true":"false"}const val=data[rowIndex]._source[columnId];return val!==undefined?JSON.stringify(val):"-"};if(isReadOnly)return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Original fields with sample data")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDataGrid"],{style:{overflow:"scroll",width:"100%"},"aria-label":"Define transforms",columns:columns,columnVisibility:{visibleColumns:visibleColumns,setVisibleColumns:setVisibleColumns},rowCount:Math.min(dataCount,DefaultSampleDataSize),renderCellValue:renderCellValue,sorting:{columns:sortingColumns,onSort:onSort},pagination:{...pagination,pageSizeOptions:[5,10,20,50],onChangeItemsPerPage:onChangeItemsPerPage,onChangePage:onChangePage},toolbarVisibility:{showColumnSelector:true,showStyleSelector:false,showSortSelector:false,showFullScreenSelector:false},gridStyle:{rowHover:"none"}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Transformed fields preview based on sample data")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_PreviewTransform,{previewTransform:previewTransform,aggList:aggList,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,isReadOnly:isReadOnly}));return external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{panelStyles:{padding:"16px 16px"},bodyStyles:{padding:"10px"},title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Select fields to transform")),titleSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Original fields with sample data")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,`Viewing sample data from index ${sourceIndex}`)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDataGrid"],{"aria-label":"Define transforms",columns:columns,columnVisibility:{visibleColumns:visibleColumns,setVisibleColumns:setVisibleColumns},rowCount:Math.min(dataCount,DefaultSampleDataSize),renderCellValue:renderCellValue,sorting:{columns:sortingColumns,onSort:onSort},pagination:{...pagination,pageSizeOptions:[5,10,20,50],onChangeItemsPerPage:onChangeItemsPerPage,onChangePage:onChangePage},toolbarVisibility:{showColumnSelector:true,showStyleSelector:false,showSortSelector:false,showFullScreenSelector:false}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Transformed fields preview based on sample data")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"This fields preview displays only the first 10 results of your transform job.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_PreviewTransform,{previewTransform:previewTransform,aggList:aggList,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,isReadOnly:isReadOnly}))}var components_DefineTransforms=DefineTransforms;function DefineTransformsStep_extends(){return DefineTransformsStep_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DefineTransformsStep_extends.apply(null,arguments)}function DefineTransformsStep_defineProperty(e,r,t){return(r=DefineTransformsStep_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DefineTransformsStep_toPropertyKey(t){var i=DefineTransformsStep_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function DefineTransformsStep_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class DefineTransformsStep_DefineTransformsStep extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);DefineTransformsStep_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS])});DefineTransformsStep_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TRANSFORMS)})}render(){const{transformService:transformService,currentStep:currentStep,sourceIndex:sourceIndex,fields:fields,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,onAggregationSelectionChange:onAggregationSelectionChange,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,useUpd
6atedUX:useUpdatedUX}=this.props;if(currentStep!==2)return null;const Title=!useUpdatedUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Define transform")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};return external_osdSharedDeps_React_default.a.createElement("div",{style:this.props.useUpdatedUX?{padding:"0px"}:{padding:"5px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateTransformSteps,{step:2})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{overflow:"auto",flex:1},grow:false},Title(),external_osdSharedDeps_React_default.a.createElement(components_DefineTransforms,DefineTransformsStep_extends({},this.props,{transformService:transformService,notifications:this.context.notifications,sourceIndex:sourceIndex,fields:fields,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,onAggregationSelectionChange:onAggregationSelectionChange,onEditTransformation:onEditTransformation,onRemoveTransformation:onRemoveTransformation,isReadOnly:false})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}DefineTransformsStep_defineProperty(DefineTransformsStep_DefineTransformsStep,"contextType",core_services["b"]);var containers_DefineTransformsStep=DefineTransformsStep_DefineTransformsStep;const ErrorModal=_ref=>{let{metadata:metadata,onClose:onClose}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onCancel:onClose,onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,"Error")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,wrapQuotesAroundTransformId(metadata.transform_metadata.transform_id,metadata.transform_metadata.failure_reason))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onClose,"data-test-subj":"errorModalCloseButton"},"Close"))))};var ErrorModal_ErrorModal=ErrorModal;var components_ErrorModal=ErrorModal_ErrorModal;const metadataHelper_renderStatus=metadata=>{if(metadata==null||metadata.transform_metadata==null)return external_osdSharedDeps_React_default.a.createElement("dd",null,"-");let iconColor;let text;switch(metadata.transform_metadata.status){case"failed":iconColor="danger";text="Error";return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{size:"s",type:"dot",color:iconColor})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>onShow(components_ErrorModal,{metadata:metadata})},text)}))));case"finished":iconColor="success";text="Complete";break;case"init":iconColor="subdued";text="Initializing...";break;case"started":iconColor="success";text="Started";break;case"stopped":iconColor="#DDDDDD";text="Stopped";break;default:return external_osdSharedDeps_React_default.a.createElement("dd",null,"-")}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{size:"s",type:"dot",color:iconColor})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},text)))};const metadataHelper_renderEnabled=isEnabled=>isEnabled?"Enabled":"Disabled";const metadataHelper_selectInterval=(interval,intervalTimeunit,intervalError,onChangeInterval,onChangeTimeunit,useUpdatedUX)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{maxWidth:400}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:200}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Transform execution interval",error:intervalError,isInvalid:intervalError
6!=""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:interval,onChange:onChangeInterval,isInvalid:intervalError!=""}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{hasEmptyLabelSpace:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"selectIntervalTimeunit",options:utils_constants_ScheduleIntervalTimeunitOptions,value:intervalTimeunit,onChange:onChangeTimeunit,isInvalid:interval==undefined||interval<=0})))));const selectCronExpression=(cronExpression,onCronExpressionChange,cronTimeZone,onCronTimeZoneChange)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Define by cron expression"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{value:cronExpression,onChange:onCronExpressionChange,compressed:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Timezone",helpText:"A day starts from 00:00:00 in the specified timezone."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"timezone",options:metadataHelper_timezones,value:cronTimeZone,onChange:onCronTimeZoneChange})));const metadataHelper_timezones=external_osdSharedDeps_MomentTimezone_default.a.tz.names().map(tz=>({label:tz,text:tz}));const Schedule_Schedule_radios=[{id:"no",label:"No"},{id:"yes",label:"Yes"}];const Schedule_isContinuous=(continuousJob,onChangeContinuousJob)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Continuous"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:Schedule_Schedule_radios,idSelected:continuousJob,onChange:id=>onChangeContinuousJob(id),name:"continuousJob"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}));class Schedule_Schedule_Schedule extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{isEdit:isEdit,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,pageSize:pageSize,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onCh
6angeContinuousJob:onChangeContinuousJob,onChangeIntervalTime:onChangeIntervalTime,onChangeIntervalTimeunit:onChangeIntervalTimeunit,onChangePage:onChangePage}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Schedule")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,!isEdit&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"jobEnabledByDefault",label:"Job enabled by default",checked:jobEnabledByDefault,onChange:onChangeJobEnabledByDefault,"data-test-subj":"jobEnabledByDefault"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),!isEdit&&Schedule_isContinuous(continuousJob,onChangeContinuousJob),metadataHelper_selectInterval(interval,intervalTimeunit,intervalError,onChangeIntervalTime,onChangeIntervalTimeunit),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"pagePerExecution",buttonContent:"Advanced"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Pages per execution",helpText:`Determines the number of transformed buckets that are\n computed and indexed at a time. A larger number means\n better throughput for each search request, but costs\n more memory and incurs higher latency. An exception\n occurs when memory limits are exceeded. We recommend\n you to start with the default value, and adjust based\n on your use case and shard size.`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,placeholder:"1000",value:pageSize,onChange:onChangePage})))))}}var CreateTransform_components_Schedule=Schedule_Schedule_Schedule;function SpecifyScheduleStep_extends(){return SpecifyScheduleStep_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SpecifyScheduleStep_extends.apply(null,arguments)}function SpecifyScheduleStep_defineProperty(e,r,t){return(r=SpecifyScheduleStep_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SpecifyScheduleStep_toPropertyKey(t){var i=SpecifyScheduleStep_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SpecifyScheduleStep_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SpecifyScheduleStep_SpecifyScheduleStep extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);SpecifyScheduleStep_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS])});SpecifyScheduleStep_defineProperty(this,"onCreate",async(transformId,transform)=>{const{transformService:transformService}=this.props;try{const response=await transformService.putTransform(transform,transformId);if(response.ok){this.context.notifications.toasts.addSuccess(createdTransformToastMessage(response.response._id));this.props.history.push(constants["D"].TRANSFORMS)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem creating the transform")})}});SpecifyScheduleStep_defineProperty(this,"onUpdate",async(transformId,transform)=>{try{const{transformService:transformService}=this.props;const{transformPrimaryTerm:transformPrimaryTerm,transformSeqNo:transformSeqNo}=this.state;if(transformSeqNo==null||transformPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update transform without seqNo and primaryTerm");return}const response=await transformService.putTransform(transform,transformId,transformSeqNo,transformPrimaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Updated transform: ${response.response._id}`);this.props.history.push(constants["D"].TRANSFORMS)}else{this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem updating the transform")})}});SpecifyScheduleStep_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TRANSFORMS)});SpecifyScheduleStep_defineProperty(this,"onChange",e=>{const{hasSubmitted:hasSubmitted}=this.state;const transformId=e.target.value;if(hasSubmitted)this.setState({transformId:transformId,transformIdError:transformId?"":"Required"});else this.setState({transformId:transformId})});this.state={transformSeqNo:null,transformPrimaryTerm:null,transformId:"",transformIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false}}
6render(){if(this.props.currentStep!=3)return null;const{jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,pageSize:pageSize,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onChangeContinuousJob:onChangeContinuousJob,onChangeIntervalTime:onChangeIntervalTime,onChangePage:onChangePage,onChangeIntervalTimeunit:onChangeIntervalTimeunit,useUpdatedUX:useUpdatedUX}=this.props;const{transformId:transformId,transformIdError:transformIdError}=this.state;const Title=!useUpdatedUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Specify Schedule")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};return external_osdSharedDeps_React_default.a.createElement("div",{style:this.props.useUpdatedUX?{padding:"0px"}:{padding:"5px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateTransformSteps,{step:3})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,Title(),external_osdSharedDeps_React_default.a.createElement(CreateTransform_components_Schedule,SpecifyScheduleStep_extends({},this.props,{isEdit:false,transformId:transformId,transformIdError:transformIdError,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,pageSize:pageSize,onChangeJobEnabledByDefault:onChangeJobEnabledByDefault,onCh
6angeContinuousJob:onChangeContinuousJob,onChangeIntervalTime:onChangeIntervalTime,onChangeIntervalTimeunit:onChangeIntervalTimeunit,onChangePage:onChangePage})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}SpecifyScheduleStep_defineProperty(SpecifyScheduleStep_SpecifyScheduleStep,"contextType",core_services["b"]);var containers_SpecifyScheduleStep=SpecifyScheduleStep_SpecifyScheduleStep;class JobNameAndIndices_JobNameAndIndices_JobNameAndIndices extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{transformId:transformId,description:description,onChangeStep:onChangeStep,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Set up indices"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(1)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Name"),external_osdSharedDeps_React_default.a.createElement("dd",null,transformId))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Source Index"),external_osdSharedDeps_React_default.a.createElement("dd",null,sourceIndex[0].label))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Target index"),external_osdSharedDeps_React_default.a.createElement("dd",null,targetIndex[0].label))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Description"),external_osdSharedDeps_React_default.a.createElement("dd",null,description==""?"-":description))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Source index filter"),external_osdSharedDeps_React_default.a.createElement("dd",null,sourceIndexFilter==""?"-":sourceIndexFilter)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}var CreateTransform_components_JobNameAndIndices=JobNameAndIndices_JobNameAndIndices_JobNameAndIndices;function ReviewDefinition_extends(){return ReviewDefinition_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ReviewDefinition_extends.apply(null,arguments)}class ReviewDefinition_ReviewDefinition extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{transformService:transformService,sourceIndex:sourceIndex,fields:fields,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,onAggregationSelectionChange:onAggregationSelectionChange,onRemoveTransformation:onRemoveTransformation,onChangeStep:onChangeStep,aggList:aggList}=this.props;const aggListItems=()=>aggList.map(item=>parseAggListItem(item));const parseAggListItem=item=>{let title="";let field="";if(item.type==interfaces["d"].histogram||item.type==interfaces["d"].terms||item.type==interfaces["d"].date_histogram){title="Group by "+item.type;field=item.item[item.type].source_field}else if(item.type==interfaces["d"].scripted_metric){title=item.type+"()";field=item.name}else{title=item.type+"()";field=item.item[item.type].field}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,title),external_osdSharedDeps_React_default.a.createElement("dd",null,field)))};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Define transforms"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(2)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},aggListItems()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"",buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Sample source index and transform result"))},external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"10px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_DefineTransforms,ReviewDefinition_extends({},this.props,{transformService:transformService,notifications:this.context.notifications,sourceIndex:sourceIndex,fields:fields,onGroupSelectionChange:onGroupSelectionChange,selectedAggregations:selectedAggregations,onAggregationSelectionChange:onAggregationSelectionChange,onRemoveTransformation:onRemoveTransformation,isReadOnly:true}))))))}}var components_ReviewDefinition=ReviewDefinition_ReviewDefinition;class ReviewSchedule_ReviewSchedule extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,pageSize:pageSize,onChangeStep:onChangeStep}=this.props;const enabled=jobEnabledByDefault?"Yes":"No";const schedule=buildIntervalScheduleText(continuousJob==="yes",interval,intervalTimeunit);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Specify schedule"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"Edit",buttonProps:{onClick:()=>onChangeStep(3)}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Enabled by default"),external_osdSharedDeps_React_default.a.createElement("dd",null,enabled))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Schedule"),external_osdSharedDeps_React_default.a.createElement("dd",null,schedule))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Pages per execution"),external_osdSharedDeps_React_default.a.createElement("dd",null,pageSize))))))}}var components_ReviewSchedule=ReviewSchedule_ReviewSchedule;function ReviewAndCreateStep_extends(){return ReviewAndCreateStep_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ReviewAndCreateStep_extends.apply(null,arguments)}function ReviewAndCreateStep_defineProperty(e,r,t){return(r=ReviewAndCreateStep_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ReviewAndCreateStep_toPropertyKey(t){var i=ReviewAndCreateStep_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ReviewAndCreateStep_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ReviewAndCreateStep_ReviewAndCreateStep extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);ReviewAndCreateStep_defineProperty(this,"componentDidMount",async()=>{this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS])});ReviewAndCreateStep_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TRANSFORMS)})}
6render(){if(this.props.currentStep!=4)return null;const Title=!this.props.useUpdatedUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Review and Create")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};return external_osdSharedDeps_React_default.a.createElement("div",{style:this.props.useUpdatedUX?{padding:"0px"}:{padding:"5px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:300},grow:false},external_osdSharedDeps_React_default.a.createElement(components_CreateTransformSteps,{step:4})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{overflow:"auto",flex:1},grow:false},Title(),external_osdSharedDeps_React_default.a.createElement(CreateTransform_components_JobNameAndIndices,this.props),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_ReviewDefinition,ReviewAndCreateStep_extends({},this.props,{notifications:this.context.notifications,sourceIndex:this.props.sourceIndex[0].label})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_ReviewSchedule,this.props),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You can only change the description and schedule after creating a job. Double-check your choices before proceeding.")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}}ReviewAndCreateStep_defineProperty(ReviewAndCreateStep_ReviewAndCreateStep,"contextType",core_services["b"]);var containers_ReviewAndCreateStep=ReviewAndCreateStep_ReviewAndCreateStep;function CreateTransformForm_extends(){return CreateTransformForm_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateTransformForm_extends.apply(null,arguments)}function CreateTransformForm_defineProperty(e,r,t){return(r=CreateTransformForm_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateTransformForm_toPropertyKey(t){var i=CreateTransformForm_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateTransformForm_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateTransformForm_CreateTransformForm extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateTransformForm_defineProperty(this,"_isMount",void 0);CreateTransformForm_defineProperty(this,"componentDidMount",async()=>{const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");const breadCrumbs=useUpdatedUX?[constants["f"].TRANSFORMS,constants["f"].CREATE_TRANSFORM]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS,constants["f"].CREATE_TRANSFORM];this.context.chrome.setBreadcrumbs(breadCrumbs)});CreateTransformForm_defineProperty(this,"getMappings",async srcIndex=>{if(!srcIndex.length)return;try{const{rollupService:rollupService}=this.props;const response=await rollupService.getMappings(srcIndex);if(response.ok){let allMappings=[];const mappings=response.response;for(let index in mappings){allMappings.push(helpers_parseFieldOptions("",mappings[index].mappings.properties))}const fields=allMappings.reduce((mappingA,mappingB)=>mappingA.filter(itemA=>mappingB.some(itemB=>helpers_compareFieldItem(itemA,itemB))));this.setState({mappings:mappings,fields:fields,allMappings:allMappings})}else{this.context.notifications.toasts.addDanger(`Could not load fields: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load fields"))}});CreateTransformForm_defineProperty(this,"previewTransform",async transform=>{try{const{transformService:transformService}=this.props;const previewResponse=await transformService.previewTransform(transform);if(previewResponse.ok){this.setState({previewTransform:previewResponse.response.documents});return true}else{this.context.notifications.toasts.addDanger(`Could not preview transform: ${previewResponse.error}`);return false}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load preview transform"));return false}});CreateTransformForm_defineProperty(this,"searchData",async()=>{const{transformService:transformService}=this.props;const{sourceIndex:sourceIndex,sourceIndexFilter:sourceIndexFilter}=this.state;this.setState({isLoading:true});try{const response=await transformService.searchSampleData(sourceIndex[0].label,sourceIndexFilter,{from:0,size:DefaultSampleDataSize});if(!response.ok){const errMsg=response.error?response.error:"There was a problem searching data from source index.";this.setState({sourceIndexFilterError:errMsg});this.context.notifications.toasts.addDanger(errMsg)}this.setState({isLoading:false});return response.ok}catch(err){this.setState({sourceIndexFilterError:"There was an error applying data filter, please modify or remove filter."});this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem searching data from source index."));this.setState({isLoading:false});return false}});CreateTransformForm_defineProperty(this,"_next",async()=>{let currentStep=this.state.currentStep;let warned=this.state.beenWarned;let error=false;const dataSourceReadOnly=this.props.dataSourceReadOnly;const setDataSourceReadOnly=this.props.setDataSourceReadOnly;if(this.props.multiDataSourceEnabled&&!dataSourceReadOnly){setDataSourceReadOnly(true)}if(currentStep==1){const{transformId:transformId,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilterError:sourceIndexFilterError}=this.state;if(!transformId){this.setState({submitError:"Job name is required.",transformIdError:"Job name is required."});error=true}else{const response=await this.props.transformService.getTransform(transformId);if(response.ok&&response.response._id==transformId){this.setState({submitError:`There is already a job named "${transformId}". Please provide a different name.`,transformIdError:`There is already a job named "${transformId}". Please provide a different name.`});error=true}}if(sourceIndex.length==0){this.setState({submitError:"Source index is required.",sourceIndexError:"Source index is required."});error=true}if(targetIndex.length==0){this.setState({submitError:"Target index is required.",targetIndexError:"Target index is required."});error=true}
6if(sourceIndexFilterError!==""){this.setState({submitError:"Source index filter is invalid"});error=true}if(!error){const searchDataOk=await this.searchData();error=!searchDataOk}}else if(currentStep==2){}if(error)return;currentStep=currentStep>=3?4:currentStep+1;warned=true;this.setState({submitError:"",currentStep:currentStep,beenWarned:warned})});CreateTransformForm_defineProperty(this,"onChangeStep",step=>{if(step>3)return;this.setState({currentStep:step})});CreateTransformForm_defineProperty(this,"onChangeDescription",e=>{const description=e.target.value;let newJSON=this.state.transformJSON;newJSON.transform.description=description;this.setState({description:description,transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onChangeName",e=>{const transformId=e.target.value;this.setState({transformId:transformId,transformIdError:transformId?"":"Name is required"})});CreateTransformForm_defineProperty(this,"onChangeSourceIndex",async options=>{let newJSON=this.state.transformJSON;let sourceIndex=options.map((function(option){return option.label}));const sourceIndexError=sourceIndex.length?"":"Source index is required";const srcIndexText=sourceIndex.length?sourceIndex[0]:"";newJSON.transform.source_index=srcIndexText;this.setState({sourceIndex:options,transformJSON:newJSON,sourceIndexError:sourceIndexError});this.setState({selectedGroupField:[],selectedAggregations:{},aggList:[]});await this.getMappings(srcIndexText)});CreateTransformForm_defineProperty(this,"onChangeSourceIndexFilter",newFilter=>{let newJSON=this.state.transformJSON;if(newFilter==""){newJSON.transform.hasOwnProperty("data_selection_query")&&delete newJSON.transform.data_selection_query;this.setState({sourceIndexFilterError:""})}else{try{newJSON.transform.data_selection_query=JSON.parse(newFilter);this.setState({sourceIndexFilterError:""})}catch(err){this.setState({sourceIndexFilterError:"Invalid source index filter JSON"})}}this.setState({sourceIndexFilter:newFilter,transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onChangeTargetIndex",options=>{let newJSON=this.state.transformJSON;let targetIndex=options.map((function(option){return option.label}));const targetIndexError=targetIndex.length?"":"Target index is required";newJSON.transform.target_index=targetIndex[0];this.setState({targetIndex:options,transformJSON:newJSON,targetIndexError:targetIndexError})});CreateTransformForm_defineProperty(this,"onGroupSelectionChange",async(selectedGroupField,aggItem)=>{const{aggList:aggList}=this.state;aggList.push(aggItem);this.updateGroup();const previewSuccess=await this.previewTransform(this.state.transformJSON);if(previewSuccess)this.setState({selectedGroupField:selectedGroupField});else await this.onRemoveTransformation(aggItem.name)});CreateTransformForm_defineProperty(this,"onAggregationSelectionChange",async(selectedAggregations,aggItem)=>{const{aggList:aggList}=this.state;aggList.push(aggItem);this.updateAggregation();const previewSuccess=await this.previewTransform(this.state.transformJSON);if(previewSuccess)this.setState({selectedAggregations:selectedAggregations});else await this.onRemoveTransformation(aggItem.name)});CreateTransformForm_defineProperty(this,"onEditTransformation",async(oldName,newName)=>{const{aggList:aggList}=this.state;const toEditIndex=aggList.findIndex(item=>item.name===oldName);let newAggItem=aggList[toEditIndex];const type=aggList[toEditIndex].type;newAggItem.name=newName;if(isGroupBy(type))newAggItem.item[type].target_field=newName;this.setState({aggList:aggList});this.updateGroup();this.updateAggregation();await this.previewTransform(this.state.transformJSON)});CreateTransformForm_defineProperty(this,"onRemoveTransformation",async name=>{const{aggList:aggList}=this.state;const toRemoveIndex=aggList.findIndex(item=>item.name===name);aggList.splice(toRemoveIndex,1);this.setState({aggList:aggList});this.updateGroup();this.updateAggregation();await this.previewTransform(this.state.transformJSON)});CreateTransformForm_defineProperty(this,"onChangeJobEnabledByDefault",()=>{const checked=this.state.jobEnabledByDefault;let newJSON=this.state.transformJSON;newJSON.transform.enabled=!checked;this.setState({jobEnabledByDefault:!checked,transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onChangeContinuousJob",optionId=>{let newJSON=this.state.transformJSON;newJSON.transform.continuous=optionId=="yes";this.setState({continuousJob:optionId,transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onChangeIntervalTime",e=>{this.setState({interval:e.target.valueAsNumber});if(e.target.value==""){const intervalErrorMsg="Interval value is required.";this.setState({submitError:intervalErrorMsg,intervalError:intervalErrorMsg})}else{this.setState({intervalError:""})}});CreateTransformForm_defineProperty(this,"onChangePage",e=>{let newJSON=this.state.transformJSON;newJSON.transform.page_size=e.target.valueAsNumber;this.setState({pageSize:e.target.valueAsNumber,transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"updateSchedule",()=>{const{interval:interval,intervalTimeunit:intervalTimeunit}=this.state;let newJSON=this.state.transformJSON;newJSON.transform.schedule.interval={start_time:external_osdSharedDeps_Moment_default()().unix(),unit:`${intervalTimeunit}`,period:`${interval}`};delete newJSON.transform.schedule["cron"];this.setState({transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onChangeIntervalTimeunit",e=>{this.setState({intervalTimeunit:e.target.value})});CreateTransformForm_defineProperty(this,"updateGroup",()=>{const{transformJSON:transformJSON,aggList:aggList}=this.state;let newJSON=transformJSON;let tempGroupSelect=[];aggList.map(aggItem=>{if(aggItem.type==interfaces["d"].histogram||aggItem.type==interfaces["d"].terms||aggItem.type==interfaces["d"].date_histogram)tempGroupSelect.push(aggItem.item)});if(tempGroupSelect.length)newJSON.transform.groups=tempGroupSelect;this.setState({transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"updateAggregation",()=>{const{transformJSON:transformJSON,aggList:aggList}=this.state;let newJSON=transformJSON;let aggJSON={};aggList.map(aggItem=>{if(aggItem.type!==interfaces["d"].histogram&&aggItem.type!==interfaces["d"].terms&&aggItem.type!==interfaces["d"].date_histogram)aggJSON[aggItem.name]=aggItem.item});newJSON.transform.aggregations=aggJSON;this.setState({transformJSON:newJSON})});CreateTransformForm_defineProperty(this,"onSubmit",async()=>{const{transformId:transformId,transformJSON:transformJSON}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{if(!transformId){this.setState({transformIdError:"Required"})}else{this.updateGroup();this.updateAggregation();this.updateSchedule();await this.onCreate(transformId,transformJSON)}}catch(err){this.context.notifications.toasts.addDanger("Invalid Transform JSON");console.error(err)}if(!this._isMount){return}this.setState({isSubmitting:false})});CreateTransformForm_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TRANSFORMS)});CreateTransformForm_defineProperty(this,"onCreate",async(transformId,transform)=>{const{transformService:transformService}=this.props;try{const response=await transformService.putTransform(transform,transformId);if(response.ok){this.context.notifications.toasts.addSuccess(createdTransformToastMessage(response.response._id));this.props.history.push(constants["D"].TRANSFORMS)}else{this.setState({submitError:response.error});this.context.notifications.toasts.addDanger(`Failed to create transform: ${response.error}`)}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem creating the transform job")});this.context.notifications.toasts.addDanger(`Failed to create transform: ${Object(helpers["d"])(err,"There was a problem creating the transform job")}`)}});this.state=CreateTransformForm_CreateTransformForm.baseState;this._next=this._next.bind(this);this._prev=this._prev.bind(this);this._isMount=true}componentDidUpdate(prevProps,prevState){if(prevProps.dataSourceId!==this.props.dataSourceId){this.setState({...CreateTransformForm_CreateTransformForm.baseState,transformId:this.state.transformId,description:this.state.description})}}componentWillUnmount(){this._isMount=false}_prev(){let currentStep=this.state.currentStep;currentStep=currentStep<=1?1:currentStep-1;if(currentStep==1){const dataSourceReadOnly=this.props.dataSourceReadOnly;const setDataSourceReadOnly=this.props.setDataSourceReadOnly;if(this.props.multiDataSourceEnabled&&dataSourceReadOnly){setDataSourceReadOnly(false)}}this.setState({currentStep:currentStep})}render(){const{transformId:transformId,transformIdError:transformIdError,submitError:submitError,isSubmitting:isSubmitting,hasSubmitted:hasSubmitted,description:description,sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,sourceIndexFilter:sourceIndexFilter,sourceIndexFilterError:sourceIndexFilterError,targetIndex:targetIndex,targetIndexError:targetIndexError,currentStep:currentStep,previewTransform:previewTransform,fields:fields,fieldSelectedOption:fieldSelectedOption,selectedGroupField:selectedGroupField,selectedAggregations:selectedAggregations,aggList:aggList,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,pageSize:pageSize,beenWarned:beenWarned,isLoading:isLoading}=this.state;const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement("div",{style:{width:"100%"}},external_osdSharedDeps_React_default.a.createElement(containers_SetUpIndicesStep,CreateTransformForm_extends({},this.props,{transformId:transformId,transformIdError:transformIdError,submitError:submitError,isSubmitting:isSubmitting,hasSubmitted:hasSubmitted,description:description,sourceIndexFilter:sourceIndexFilter,sourceIndexFilterError:sourceIndexFilterError,sourceIndex:sourceIndex,sourceIndexError:sourceIndexError,targetIndex:targetIndex,targetIndexError:targetIndexError,onChangeName:this.onChangeName,onChangeDescription:this.onChangeDescription,onChangeSourceIndex:this.onChangeSourceIndex,onChangeSourceIndexFilter:this.onChangeSourceIndexFilter,onChangeTargetIndex:this.onChangeTargetIndex,currentStep:this.state.currentStep,hasAggregation:selectedGroupField.length!=0||Object.keys(selectedAggregations).length!=0||aggList.length!=0,fields:fields,fieldSelectedOption:fieldSelectedOption,beenWarned:beenWarned,useUpd
6atedUX:useUpdatedUX})),external_osdSharedDeps_React_default.a.createElement(containers_DefineTransformsStep,CreateTransformForm_extends({},this.props,{currentStep:this.state.currentStep,sourceIndex:sourceIndex[0]?sourceIndex[0].label:"",sourceIndexFilter:sourceIndexFilter,fields:fields,aggList:aggList,selectedGroupField:selectedGroupField,selectedAggregations:selectedAggregations,onGroupSelectionChange:this.onGroupSelectionChange,onAggregationSelectionChange:this.onAggregationSelectionChange,onEditTransformation:this.onEditTransformation,onRemoveTransformation:this.onRemoveTransformation,previewTransform:previewTransform,useUpdatedUX:useUpdatedUX})),external_osdSharedDeps_React_default.a.createElement(containers_SpecifyScheduleStep,CreateTransformForm_extends({},this.props,{currentStep:this.state.currentStep,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,intervalError:intervalError,pageSize:pageSize,onChangeJobEnabledByDefault:this.onChangeJobEnabledByDefault,onCh
6angeContinuousJob:this.onChangeContinuousJob,onChangeIntervalTime:this.onChangeIntervalTime,onChangePage:this.onChangePage,onChangeIntervalTimeunit:this.onChangeIntervalTimeunit,useUpdatedUX:useUpdatedUX})),external_osdSharedDeps_React_default.a.createElement(containers_ReviewAndCreateStep,CreateTransformForm_extends({},this.props,{transformId:transformId,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,fields:fields,selectedGroupField:selectedGroupField,onGroupSelectionChange:this.onGroupSelectionChange,selectedAggregations:selectedAggregations,aggList:aggList,onAggregationSelectionChange:this.onAggregationSelectionChange,onRemoveTransformation:this.onRemoveTransformation,previewTransform:previewTransform,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,interval:interval,intervalTimeunit:intervalTimeunit,pageSize:pageSize,currentStep:this.state.currentStep,onChangeStep:this.onChangeStep,submitError:submitError,useUpdatedUX:useUpdatedUX})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",style:useUpdatedUX?{padding:"0px"}:{padding:"5px 50px"},gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"createTransformCancelButton"},"Cancel")),currentStep!=1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this._prev,"data-test-subj":"createTransformPreviousButton"},"Previous")),currentStep==4?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"createTransformSubmitButton"},"Create")):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this._next,isLoading:isLoading,"data-test-subj":"createTransformNextButton"},"Next"))))}}CreateTransformForm_defineProperty(CreateTransformForm_CreateTransformForm,"contextType",core_services["b"]);CreateTransformForm_defineProperty(CreateTransformForm_CreateTransformForm,"baseState",{currentStep:1,transformSeqNo:null,transformPrimaryTerm:null,transformId:"",transformIdError:"",submitError:"",isSubmitting:false,hasSubmitted:false,loadingIndices:true,indices:[],totalIndices:0,previewTransform:[],mappings:"",allMappings:[],fields:[],fieldSelectedOption:"",selectedFields:[],selectedGroupField:[],selectedAggregations:{},aggList:[],description:"",sourceIndex:[],sourceIndexError:"",sourceIndexFilter:"",sourceIndexFilterError:"",targetIndex:[],targetIndexError:"",intervalError:"",jobEnabledByDefault:true,continuousJob:"no",interval:1,intervalTimeunit:"MINUTES",pageSize:1e3,transformJSON:JSON.parse(constants_EMPTY_TRANSFORM),beenWarned:false,isLoading:false});var containers_CreateTransformForm_CreateTransformForm=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreateTransformForm_CreateTransformForm,CreateTransformForm_extends({},props,dataSourceMenuProperties))};var containers_CreateTransformForm=containers_CreateTransformForm_CreateTransformForm;function EditRollup_defineProperty(e,r,t){return(r=EditRollup_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function EditRollup_toPropertyKey(t){var i=EditRollup_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function EditRollup_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class EditRollup_EditRollup extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);EditRollup_defineProperty(this,"componentDidMount",async()=>{const{id:id}=query_string_default.a.parse(this.props.location.search);const breadCrumbs=this.state.useNewUX?[constants["f"].ROLLUPS,constants["f"].EDIT_ROLLUP]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS,constants["f"].EDIT_ROLLUP,{text:id}];
6if(typeof id==="string"&&!!id){this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getRollupToEdit(id)}else{this.context.notifications.toasts.addDanger(`Invalid rollup id: ${id}`);this.props.history.push(constants["D"].ROLLUPS)}});EditRollup_defineProperty(this,"getRollupToEdit",async rollupId=>{try{const{rollupService:rollupService}=this.props;const response=await rollupService.getRollup(rollupId);if(response.ok){let newJSON=JSON.parse(this.state.rollupJSON);newJSON.rollup=response.response.rollup;this.setState({rollupSeqNo:response.response._seqNo,rollupPrimaryTerm:response.response._primaryTerm,rollupId:response.response._id,description:response.response.rollup.description,jobEnabledByDefault:response.response.rollup.enabled,pageSize:response.response.rollup.page_size,delayTime:!response.response.rollup.delay?"":msToDelayTimeUnit(response.response.rollup.delay,this.state.delayTimeunit),rollupJSON:newJSON});if(response.response.rollup.schedule.cron==undefined){this.setState({interval:response.response.rollup.schedule.interval.period,intervalTimeunit:response.response.rollup.schedule.interval.unit,continuousDefinition:"fixed"})}else{this.setState({cronExpression:response.response.rollup.schedule.cron.expression,continuousDefinition:"cron"})}}else{this.context.notifications.toasts.addDanger(`Could not load the rollup job: ${response.error}`);this.props.history.push(constants["D"].ROLLUPS)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the rollup job"));this.props.history.push(constants["D"].ROLLUPS)}});EditRollup_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].ROLLUPS)});EditRollup_defineProperty(this,"onChangeDescription",e=>{const description=e.target.value;let newJSON=this.state.rollupJSON;newJSON.rollup.description=description;this.setState({description:description,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeName",e=>{const{hasSubmitted:hasSubmitted}=this.state;const rollupId=e.target.value;let newJSON=this.state.rollupJSON;newJSON.rollup.rollupId=rollupId;if(hasSubmitted)this.setState({rollupId:rollupId,rollupIdError:rollupId?"":"Required"});else this.setState({rollupId:rollupId,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeJobEnabledByDefault",()=>{const checked=this.state.jobEnabledByDefault;let newJSON=this.state.rollupJSON;newJSON.rollup.enabled=checked;this.setState({jobEnabledByDefault:!checked,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeCron",e=>{this.setState({cronExpression:e.target.value})});EditRollup_defineProperty(this,"onChangeCronTimezone",e=>{this.setState({cronTimezone:e.target.value})});EditRollup_defineProperty(this,"onChangeDelayTime",e=>{let newJSON=this.state.rollupJSON;newJSON.rollup.delay=e.target.value;this.setState({delayTime:e.target.valueAsNumber,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeIntervalTime",e=>{this.setState({interval:e.target.valueAsNumber});if(e.target.value==""){const intervalErrorMsg="Interval value is required.";this.setState({submitError:intervalErrorMsg,intervalError:intervalErrorMsg})}else{this.setState({intervalError:""})}});EditRollup_defineProperty(this,"onChangePage",e=>{let newJSON=this.state.rollupJSON;newJSON.rollup.page_size=e.target.value;this.setState({pageSize:e.target.valueAsNumber,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeContinuousDefinition",e=>{this.setState({continuousDefinition:e.target.value})});EditRollup_defineProperty(this,"onChangeContinuousJob",optionId=>{let newJSON=this.state.rollupJSON;newJSON.rollup.continuous=optionId=="yes";this.setState({continuousJob:optionId,rollupJSON:newJSON})});EditRollup_defineProperty(this,"onChangeDelayTimeunit",e=>{this.setState({delayTimeunit:e.target.value})});EditRollup_defineProperty(this,"onChangeIntervalTimeunit",e=>{this.setState({intervalTimeunit:e.target.value})});EditRollup_defineProperty(this,"updateDelay",()=>{const{delayTime:delayTime,delayTimeunit:delayTimeunit}=this.state;let newJSON=this.state.rollupJSON;newJSON.rollup.delay=delayTimeUnitToMS(delayTime,delayTimeunit).toString();this.setState({rollupJSON:newJSON})});EditRollup_defineProperty(this,"updateSchedule",()=>{const{continuousDefinition:continuousDefinition,cronExpression:cronExpression,interval:interval,intervalTimeunit:intervalTimeunit,cronTimezone:cronTimezone}=this.state;let newJSON=this.state.rollupJSON;if(continuousDefinition=="cron"){newJSON.rollup.schedule.cron={expression:`${cronExpression}`,timezone:`${cronTimezone}`};delete newJSON.rollup.schedule["interval"]}else{newJSON.rollup.schedule.interval={start_time:external_osdSharedDeps_Moment_default()().unix(),unit:intervalTimeunit,period:interval};delete newJSON.rollup.schedule["cron"]}this.setState({rollupJSON:newJSON})});EditRollup_defineProperty(this,"onSubmit",async()=>{const{rollupId:rollupId,rollupJSON:rollupJSON}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{if(!rollupId){this.setState({rollupIdError:"Required"})}else{this.updateSchedule();this.updateDelay();await this.onUpdate(rollupId,rollupJSON)}}catch(err){this.context.notifications.toasts.addDanger("Invalid Rollup JSON");console.error(err)}this.setState({isSubmitting:false})});EditRollup_defineProperty(this,"onUpdate",async(rollupId,rollup)=>{try{const{rollupService:rollupService}=this.props;const{rollupPrimaryTerm:rollupPrimaryTerm,rollupSeqNo:rollupSeqNo}=this.state;if(rollupSeqNo==null||rollupPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update rollup without seqNo and primaryTerm");return}const response=await rollupService.putRollup(rollup,rollupId,rollupSeqNo,rollupPrimaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Changes to "${response.response._id}" saved!`);this.props.history.push(constants["D"].ROLLUPS)}else{this.context.notifications.toasts.addDanger(response.error);this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,"There was a problem updating the rollup")})}});const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");this.state={rollupId:"",rollupIdError:"",rollupSeqNo:null,rollupPrimaryTerm:null,submitError:"",isSubmitting:false,hasSubmitted:false,description:"",jobEnabledByDefault:false,continuousJob:"no",continuousDefinition:"fixed",interval:2,intervalError:"",intervalTimeunit:"MINUTES",cronExpression:"",cronTimezone:"UTC",pageSize:1e3,delayTime:"",delayTimeunit:"MINUTES",rollupJSON:EMPTY_ROLLUP,useNewUX:useNewUX}}render(){const{rollupId:rollupId,rollupIdError:rollupIdError,isSubmitting:isSubmitting,description:description,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalError:intervalError,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,delayTime:delayTime,delayTimeunit:delayTimeunit,useNewUX:useNewUX}=this.state;const getTitle=!useNewUX?()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Edit rollup job")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):()=>{};const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"25px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},getTitle(),external_osdSharedDeps_React_default.a.createElement(components_ConfigureRollup,{isEdit:true,rollupId:rollupId,rollupIdError:rollupIdError,onChangeDescription:this.onChangeDescription,onChangeName:this.onChangeName,description:description}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_Schedule,{isEdit:true,rollupId:rollupId,rollupIdError:rollupIdError,jobEnabledByDefault:jobEnabledByDefault,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,cronTimezone:cronTimezone,pageSize:pageSize,intervalError:intervalError,delayTime:delayTime,delayTimeunit:delayTimeunit,onChangeJobEnabledByDefault:this.onChangeJobEnabledByDefault,onCh
6angeCron:this.onChangeCron,onChangeCronTimezone:this.onChangeCronTimezone,onChangeDelayTime:this.onChangeDelayTime,onChangeIntervalTime:this.onChangeIntervalTime,onChangePage:this.onChangePage,onChangeContinuousDefinition:this.onChangeContinuousDefinition,onChangeContinuousJob:this.onChangeContinuousJob,onChangeDelayTimeunit:this.onChangeDelayTimeunit,onChangeIntervalTimeunit:this.onChangeIntervalTimeunit}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"editRollupCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"editRollupSaveChangesButton"},"Save changes"))))}}EditRollup_defineProperty(EditRollup_EditRollup,"contextType",core_services["b"]);var containers_EditRollup=function(props){useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(EditRollup_EditRollup,props)};var containers=containers_EditRollup;class GeneralInformation_GeneralInformation extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{rollupId:rollupId,description:description,onEdit:onEdit,sourceIndex:sourceIndex,targetIndex:targetIndex,scheduleText:scheduleText,pageSize:pageSize,lastUpdated:lastUpdated,useNewUX:useNewUX}=this.props;const infoItems=[{term:"Name",value:rollupId},{term:"Source index",value:sourceIndex},{term:"Target index",value:targetIndex},{term:"Schedule",value:scheduleText},{term:"Description",value:description||"-"},{term:"Last updated",value:lastUpdated},{term:"Pages per execution",value:pageSize}];const useActions=useNewUX?[]:[{text:"Edit",buttonProps:{onClick:()=>onEdit()}}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"General information"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:useActions})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},infoItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}#${item.value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}const RollupStatus=_ref=>{let{metadata:metadata}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Rollup status")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Current rollup window"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null||metadata.rollup_metadata.continuous==null?"-":helpers_renderTime(metadata.rollup_metadata.continuous.next_window_start_time)+" - "+helpers_renderTime(metadata.rollup_metadata.continuous.next_window_end_time)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Status"),renderStatus(metadata))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Rollup indexed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null?"-":metadata.rollup_metadata.stats.rollups_indexed))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Indexed time (ms)"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null?"-":metadata.rollup_metadata.stats.index_time_in_millis))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Document processed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null?"-":metadata.rollup_metadata.stats.documents_processed))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Search time (ms)"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null?"-":metadata.rollup_metadata.stats.search_time_in_millis))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Page processed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.rollup_metadata==null?"-":metadata.rollup_metadata.stats.pages_processed)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))};var RollupStatus_RollupStatus=RollupStatus;function AggregationAndMetricsSettings_defineProperty(e,r,t){return(r=AggregationAndMetricsSettings_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function AggregationAndMetricsSettings_toPropertyKey(t){var i=AggregationAndMetricsSettings_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function AggregationAndMetricsSettings_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const AggregationAndMetricsSettings_aggregationColumns=BaseAggregationColumns;const AggregationAndMetricsSettings_metricsColumns=BaseMetricsColumns;class AggregationAndMetricsSettings_AggregationAndMetricsSettings extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);AggregationAndMetricsSettings_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{onChangeMetricsShown:onChangeMetricsShown}=this.props;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection});onChangeMetricsShown(page*size,page*size+size)});AggregationAndMetricsSettings_defineProperty(this,"onDimensionTableChange",_ref2=>{let{page:tablePage,sort:sort}=_ref2;const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;const{onChangeDimensionsShown:onChangeDimensionsShown}=this.props;this.setState({dimensionFrom:page*size,dimensionSize:size,dimensionSortField:sortField,dimensionSortDirection:sortDirection});onChangeDimensionsShown(page*size,size)});this.state={from:0,size:10,sortField:"sequence",sortDirection:"desc",dimensionFrom:0,dimensionSize:10,dimensionSortField:"sequence",dimensionSortDirection:"desc"}}render(){const{timestamp:timestamp,histogramInterval:histogramInterval,timezone:timezone,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,dimensionsShown:dimensionsShown,metricsShown:metricsShown}=this.props;const{from:from,size:size,sortDirection:sortDirection,sortField:sortField,dimensionFrom:dimensionFrom,dimensionSize:dimensionSize,dimensionSortDirection:dimensionSortDirection,dimensionSortField:dimensionSortField}=this.state;const page=Math.floor(from/size);const dimensionPage=Math.floor(dimensionFrom/dimensionSize);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedMetrics.length};const sorting={sort:{direction:sortDirection,field:sortField}};const dimensionPagination={pageIndex:dimensionPage,pageSize:dimensionSize,pageSizeOptions:Rollups_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:selectedDimensionField.length};const dimensionSorting={sort:{direction:dimensionSortDirection,field:dimensionSortField}};const intervalValue=histogramInterval.match(/(\d+)/);const intervalUnit=histogramInterval.match(/[a-zA-Z]+/g);let interval="";if(intervalValue&&intervalUnit){interval=intervalValue[0]+" "+parseTimeunit(intervalUnit[0])}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,AGGREGATION_AND_METRIC_SETTINGS)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Additional metrics")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Timestamp field"),external_osdSharedDeps_React_default.a.createElement("dd",null,timestamp))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Interval"),external_osdSharedDeps_React_default.a.createElement("dd",null,interval))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Timezone"),external_osdSharedDeps_React_default.a.createElement("dd",null,timezone)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Additional aggregations"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",textAlign:"left",size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,`(${selectedDimensionField.length}
6)`)))),sequenceTableComponents(selectedDimensionField,dimensionsShown,AggregationAndMetricsSettings_aggregationColumns,dimensionPagination,dimensionSorting,this.onDimensionTableChange),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),additionalMetricsComponent(selectedMetrics),sourceFieldComponents(selectedMetrics,metricsShown,AggregationAndMetricsSettings_metricsColumns,pagination,sorting,this.onTableChange),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}function RollupDetails_defineProperty(e,r,t){return(r=RollupDetails_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RollupDetails_toPropertyKey(t){var i=RollupDetails_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RollupDetails_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RollupDetails_RollupDetails extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);RollupDetails_defineProperty(this,"componentDidMount",async()=>{let breadCrumbs=this.state.useNewUX?[constants["f"].ROLLUPS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS];this.context.chrome.setBreadcrumbs(breadCrumbs);const{id:id}=query_string_default.a.parse(this.props.location.search);if(typeof id==="string"){let newBreadCrumbs=this.state.useNewUX?[constants["f"].ROLLUPS,{text:id}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ROLLUPS,{text:id}];this.context.chrome.setBreadcrumbs(newBreadCrumbs);await this.getRollup(id);this.forceUpdate()}else{this.context.notifications.toasts.addDanger(`Invalid rollup id: ${id}`);this.props.history.push(constants["D"].ROLLUPS)}});RollupDetails_defineProperty(this,"getRollup",async rollupId=>{try{const{rollupService:rollupService}=this.props;const response=await rollupService.getRollup(rollupId);if(response.ok){const newJSON=response.response;const selectedMetrics=this.parseMetric(response.response.rollup.metrics);const selectedDimensionField=this.parseDimension(response.response.rollup.dimensions);this.setState({rollupId:response.response._id,description:response.response.rollup.description,sourceIndex:response.response.rollup.source_index,targetIndex:response.response.rollup.target_index,delayTime:response.response.rollup.delay,pageSize:response.response.rollup.page_size,rollupJSON:newJSON,lastUpdated:helpers_renderTime(response.response.rollup.last_updated_time),timestamp:response.response.rollup.dimensions[0].date_histogram.source_field,histogramInterval:response.response.rollup.dimensions[0].date_histogram.fixed_interval?response.response.rollup.dimensions[0].date_histogram.fixed_interval:response.response.rollup.dimensions[0].date_histogram.calendar_interval,timezone:response.response.rollup.dimensions[0].date_histogram.timezone,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,metricsShown:selectedMetrics.slice(0,10),dimensionsShown:selectedDimensionField.slice(0,10),enabled:response.response.rollup.enabled});if(response.response.metadata!=null){this.setState({metadata:response.response.metadata[response.response._id]})}if("interval"in response.response.rollup.schedule){this.setState({interval:response.response.rollup.schedule.interval.period,intervalTimeunit:response.response.rollup.schedule.interval.unit})}else{this.setState({cronExpression:response.response.rollup.schedule.cron.expression})}}else{this.context.notifications.toasts.addDanger(`Could not load the rollup job: ${response.error}`);this.props.history.push(constants["D"].ROLLUPS)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the rollup job"));this.props.history.push(constants["D"].ROLLUPS)}});RollupDetails_defineProperty(this,"parseDimension",dimensions=>{const sourceArray=dimensions.slice(1,dimensions.length);if(sourceArray.length==0)return[];const result=sourceArray.map(dimension=>{var _dimension$terms,_dimension$histogram,_dimension$histogram2;return{sequence:dimensions.indexOf(dimension),aggregationMethod:dimension.histogram==null?"terms":"histogram",field:dimension.histogram==null?{label:(_dimension$terms=dimension.terms)===null||_dimension$terms===void 0?void 0:_dimension$terms.source_field}:{label:(_dimension$histogram=dimension.histogram)===null||_dimension$histogram===void 0?void 0:_dimension$histogram.source_field},interval:dimension.histogram==null?null:(_dimension$histogram2=dimension.histogram)===null||_dimension$histogram2===void 0?void 0:_dimension$histogram2.interval}});return result});RollupDetails_defineProperty(this,"parseMetric",metrics=>{if(metrics.length==0)return[];const result=metrics.map(metric=>({source_field:metric.source_field,all:false,min:metric.metrics.filter(item=>item.min!=null).length>0,max:metric.metrics.filter(item=>item.max!=null).length>0,sum:metric.metrics.filter(item=>item.sum!=null).length>0,avg:metric.metrics.filter(item=>item.avg!=null).length>0,value_count:metric.metrics.filter(item=>item.value_count!=null).length>0}));return result});RollupDetails_defineProperty(this,"onDisable",async()=>{const{rollupService:rollupService}=this.props;const{rollupId:rollupId}=this.state;try{const response=await rollupService.stopRollup(rollupId);if(response.ok){this.setState({enabled:false});await this.getRollup(rollupId);this.forceUpdate();this.context.notifications.toasts.addSuccess(`${rollupId} is disabled`)}else{this.context.notifications.toasts.addDanger(`Could not stop the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not stop the rollup job: "+rollupId))}});RollupDetails_defineProperty(this,"onClickRollupStatusChange",async()=>
6{if(this.state.enabled){return this.onDisable()}else{return this.onEnable()}});RollupDetails_defineProperty(this,"onEnable",async()=>{const{rollupService:rollupService}=this.props;const{rollupId:rollupId}=this.state;try{const response=await rollupService.startRollup(rollupId);if(response.ok){this.setState({enabled:true});await this.getRollup(rollupId);this.forceUpdate();this.context.notifications.toasts.addSuccess(`${rollupId} is enabled`)}else{this.context.notifications.toasts.addDanger(`Could not start the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not start the rollup job: "+rollupId))}});RollupDetails_defineProperty(this,"onEdit",()=>{const{rollupId:rollupId}=this.state;if(rollupId)this.props.history.push(`${constants["D"].EDIT_ROLLUP}?id=${rollupId}`)});RollupDetails_defineProperty(this,"showModal",()=>this.setState({isModalOpen:true}));RollupDetails_defineProperty(this,"closeModal",()=>this.setState({isModalOpen:false}));RollupDetails_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});RollupDetails_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});RollupDetails_defineProperty(this,"onClickDelete",async()=>{const{rollupService:rollupService}=this.props;const{rollupId:rollupId}=this.state;try{const response=await rollupService.deleteRollup(rollupId);if(response.ok){this.closeDeleteModal();this.context.notifications.toasts.addSuccess(`"${rollupId}" successfully deleted!`);this.props.history.push(constants["D"].ROLLUPS)}else{this.context.notifications.toasts.addDanger(`Could not delete the rollup job "${rollupId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the rollup job"))}});RollupDetails_defineProperty(this,"onChangeDimensionsShown",(from,size)=>{const{selectedDimensionField:selectedDimensionField}=this.state;this.setState({dimensionsShown:selectedDimensionField.slice(from,from+size)})});RollupDetails_defineProperty(this,"onChangeMetricsShown",(from,size)=>{const{selectedMetrics:selectedMetrics}=this.state;this.setState({metricsShown:selectedMetrics.slice(from,from+size)})});RollupDetails_defineProperty(this,"renderEnabledField",enabled=>{if(enabled){return"Enabled"}return"Disabled"});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={rollupId:"",description:"",sourceIndex:"",targetIndex:"",continuousJob:"no",continuousDefinition:"fixed",interval:2,intervalTimeunit:"MINUTES",cronExpression:"",pageSize:1e3,delayTime:undefined,delayTimeunit:"MINUTES",rollupJSON:"",lastUpdated:"-",metadata:undefined,timestamp:"",histogramInterval:"",timezone:"UTC +0",selectedDimensionField:[],selectedMetrics:[],dimensionsShown:[],metricsShown:[],isModalOpen:false,enabled:false,isDeleteModalVisible:false,useNewUX:useNewUx}}render(){const{rollupId:rollupId,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,continuousJob:continuousJob,continuousDefinition:continuousDefinition,interval:interval,intervalTimeunit:intervalTimeunit,cronExpression:cronExpression,pageSize:pageSize,lastUpdated:lastUpdated,metadata:metadata,timestamp:timestamp,histogramInterval:histogramInterval,timezone:timezone,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,metricsShown:metricsShown,dimensionsShown:dimensionsShown,isModalOpen:isModalOpen,rollupJSON:rollupJSON,enabled:enabled,isDeleteModalVisible:isDeleteModalVisible,useNewUX:useNewUX}=this.state;let scheduleText="";if(rollupJSON.rollup!=null){scheduleText=rollupJSON.rollup.schedule.interval!=null?buildIntervalScheduleText(rollupJSON.rollup.continuous,interval,intervalTimeunit):buildCronScheduleText(rollupJSON.rollup.continuous,rollupJSON.rollup.schedule.cron.expression)}const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls}=Object(Services["c"])();const padding_style=this.state.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};const controlsData=[{iconType:"trash",testId:"deleteButton",color:"danger",ariaLabel:"delete",run:this.showDeleteModal,controlType:"icon",display:"base"},{id:"Edit",label:"Edit",testId:"editButton",run:this.onEdit,controlType:"button"},{id:"viewJson",label:"View JSON",testId:"viewJsonButton",run:this.showModal,controlType:"button",display:"base"},{id:"Status",label:enabled?"Disable":"Enable",testId:"enableButton",run:this.onClickRollupStatusChange,controlType:"button",display:"base",fill:true}];const badgeControlData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:enabled?"success":"danger"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_Lodash_default.a.truncate(this.renderEnabledField(enabled))))}];return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppBadgeControls,controls:badgeControlData})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 10px"},justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h1",null,rollupId)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,enabled?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:"success"},"Enabled on "+lastUpdated):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:"danger"},"Disabled")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!enabled,onClick:this.onDisable,"data-test-subj":"disableButton"},"Disable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:enabled,onClick:this.onEnable,"data-test-subj":"enableButton"},"Enable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showModal},"View JSON")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showDeleteModal,color:"danger","data-test-subj":"deleteButton"}
6,"Delete"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(GeneralInformation_GeneralInformation,{rollupId:rollupId,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,scheduleText:scheduleText,pageSize:pageSize,lastUpdated:lastUpdated,onEdit:this.onEdit,useNewUX:useNewUX}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(RollupStatus_RollupStatus,{metadata:metadata}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(AggregationAndMetricsSettings_AggregationAndMetricsSettings,{timestamp:timestamp,histogramInterval:histogramInterval,timezone:timezone,selectedDimensionField:selectedDimensionField,selectedMetrics:selectedMetrics,metricsShown:metricsShown,dimensionsShown:dimensionsShown,onChangeMetricsShown:this.onChangeMetricsShown,onChangeDimensionsShown:this.onChangeDimensionsShown}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),isModalOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:this.closeModal},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"View JSON of "+rollupId))," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"m",paddingSize:"m",overflowHeight:600,inline:false,isCopyable:true},JSON.stringify(rollupJSON,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.closeModal},"Close")))),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(components_DeleteModal,{rollupId:rollupId,closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete}))}}RollupDetails_defineProperty(RollupDetails_RollupDetails,"contextType",core_services["b"]);var containers_RollupDetails_RollupDetails=function(props){useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(RollupDetails_RollupDetails,props)};var containers_RollupDetails=containers_RollupDetails_RollupDetails;const Configure_ConfigureTransform=_ref=>{let{inEdit:inEdit,transformId:transformId,error:error,onChangeName:onChangeName,onChangeDescription:onChangeDescription,description:description,size:size}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Job name and description")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Name")),helpText:"Specify a unique, descriptive name.",isInvalid:!!error,error:error},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{isInvalid:!!error,placeholder:"transform-id",value:transformId,onChange:onChangeName,disabled:inEdit})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Description"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued"},external_osdSharedDeps_React_default.a.createElement("h3",null,external_osdSharedDeps_React_default.a.createElement("i",null," â optional"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{compressed:true,value:description,onChange:onChangeDescription,"data-test-subj":"description"}))))};
6var Configure=Configure_ConfigureTransform;var Transforms_components_ConfigureTransform=Configure;var external_osdSharedDeps_ElasticEuiLibServices_=__webpack_require__(59);class components_Schedule_Schedule_Schedule extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{enabled:enabled,pageSize:pageSize,onEnabledChange:onEnabledChange,onPageChange:onPageChange,interval:interval,intervalError:intervalError,intervalTimeUnit:intervalTimeUnit,onIntervalChange:onIntervalChange,onIntervalTimeUnitChange:onIntervalTimeUnitChange}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Schedule")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"jobEnabled",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"Job enabled by default")),checked:enabled,onChange:onEnabledChange,"data-test-subj":"jobEnabled"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),metadataHelper_selectInterval(interval,intervalTimeUnit,intervalError,onIntervalChange,onIntervalTimeUnitChange),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:Object(external_osdSharedDeps_ElasticEuiLibServices_["htmlIdGenerator"])()(),buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Advanced"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Pages per execution",helpText:"Determines the number of transformed buckets that are computed and indexed at a time. A larger number means faster execution, but costs more memory. An exception occurs when memory limits are exceeded. We recommend you to start with default value and adjust based on your use case."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,placeholder:"1000",value:pageSize,onChange:onPageChange})))))}}var Transforms_components_Schedule=components_Schedule_Schedule_Schedule;class Indices_Indices_Indices extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Indices")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Source index"),external_osdSharedDeps_React_default.a.createElement("p",null,sourceIndex)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Source index filter"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",theme:"github",width:"400px",height:"100px",value:sourceIndexFilter,readOnly:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Target index"),external_osdSharedDeps_React_default.a.createElement("p",null,targetIndex))))}}var components_Indices=Indices_Indices_Indices;function EditTransform_defineProperty(e,r,t){return(r=EditTransform_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function EditTransform_toPropertyKey(t){var i=EditTransform_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function EditTransform_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class EditTransform_EditTransform extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);EditTransform_defineProperty(this,"componentDidMount",async()=>{const{id:id}=query_string_default.a.parse(this.props.location.search);const breadCrumbs=this.state.useUpdatedUX?[constants["f"].TRANSFORMS,{text:id},constants["f"].EDIT_TRANSFORM]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS,constants["f"].EDIT_TRANSFORM,{text:id}];
6if(typeof id==="string"&&!!id){this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getTransform(id)}else{this.context.notifications.toasts.addDanger(`Invalid transform id: ${id}`);this.props.history.push(constants["D"].TRANSFORMS)}});EditTransform_defineProperty(this,"getTransform",async transformId=>{try{const{transformService:transformService}=this.props;const response=await transformService.getTransform(transformId);if(response.ok){let json=JSON.parse(this.state.transformJSON);json.transform=response.response.transform;this.setState({seqNo:response.response._seqNo,primaryTerm:response.response._primaryTerm,id:response.response._id,description:response.response.transform.description,sourceIndex:response.response.transform.source_index,targetIndex:response.response.transform.target_index,sourceIndexFilter:JSON.stringify(response.response.transform.data_selection_query),enabled:response.response.transform.enabled,pageSize:response.response.transform.page_size,transformJSON:json,interval:response.response.transform.schedule.interval.period,intervalTimeUnit:response.response.transform.schedule.interval.unit})}else{this.context.notifications.toasts.addDanger(`Could not load transform job ${transformId}: ${response.error}`);this.props.history.push(constants["D"].TRANSFORMS)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not load transform job ${transformId}`));this.props.history.push(constants["D"].TRANSFORMS)}});EditTransform_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TRANSFORMS)});EditTransform_defineProperty(this,"onSubmit",async()=>{const{id:id,transformJSON:transformJSON}=this.state;this.setState({submitError:"",isSubmitting:true,hasSubmitted:true});try{this.updateSchedule();await this.update(id,transformJSON)}catch(err){this.context.notifications.toasts.addDanger("Invalid Transform JSON");console.error(err)}});EditTransform_defineProperty(this,"updateSchedule",()=>{const{schedule:schedule,cronExpression:cronExpression,cronTimeZone:cronTimeZone,interval:interval,intervalTimeUnit:intervalTimeUnit}=this.state;let json=this.state.transformJSON;if(schedule=="cron"){json.transform.schedule.cron={expression:`${cronExpression}`,timezone:`${cronTimeZone}`};delete json.transform.schedule["interval"]}else{json.transform.schedule.interval={start_time:external_osdSharedDeps_Moment_default()().unix(),unit:intervalTimeUnit,period:interval};delete json.transform.schedule["cron"]}this.setState({transformJSON:json})});EditTransform_defineProperty(this,"update",async(transformId,transform)=>{try{const{transformService:transformService}=this.props;const{primaryTerm:primaryTerm,seqNo:seqNo}=this.state;if(primaryTerm==null||seqNo==null){this.context.notifications.toasts.addDanger("Could not update transform without seqNo and primaryTerm");return}const response=await transformService.putTransform(transform,transformId,seqNo,primaryTerm);if(response.ok){this.context.notifications.toasts.addSuccess(`Changes to transform saved`);this.props.history.push(constants["D"].TRANSFORMS)}else{this.context.notifications.toasts.addDanger(`Couldn't update transform ${transformId}: ${response.error}`);this.setState({submitError:response.error})}}catch(err){this.setState({submitError:Object(helpers["d"])(err,`Couldn't update transform ${transformId}`)})}});EditTransform_defineProperty(this,"onNameChange",e=>{});EditTransform_defineProperty(this,"onDescriptionChange",e=>{const description=e.target.value;let json=this.state.transformJSON;json.transform.description=description;this.setState({transformJSON:json,description:description})});EditTransform_defineProperty(this,"onEnabledChange",()=>{const enabled=this.state.enabled;let json=this.state.transformJSON;json.transform.enabled=enabled;this.setState({transformJSON:json,enabled:!enabled})});EditTransform_defineProperty(this,"onCronExpressionChange",e=>{this.setState({cronExpression:e.target.value})});EditTransform_defineProperty(this,"onCronTimeZoneChange",e=>{this.setState({cronTimeZone:e.target.value})});EditTransform_defineProperty(this,"onIntervalChange",e=>{this.setState({interval:e.target.valueAsNumber});if(e.target.value==""){const intervalError="Interval value is required.";this.setState({intervalError:intervalError})}else{this.setState({intervalError:""})}});EditTransform_defineProperty(this,"onPageChange",e=>{const pageSize=e.target.valueAsNumber;let json=this.state.transformJSON;json.transform.page_size=pageSize;this.setState({pageSize:pageSize,transformJSON:json})});EditTransform_defineProperty(this,"onScheduleChange",e=>{this.setState({schedule:e.target.value})});EditTransform_defineProperty(this,"onIntervalTimeUnitChange",e=>{this.setState({intervalTimeUnit:e.target.value})});const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={id:"",error:"",seqNo:null,primaryTerm:null,description:"",sourceIndex:"",targetIndex:"",sourceIndexFilter:"",pageSize:1e3,enabled:true,transformJSON:EMPTY_TRANSFORM,isSubmitting:false,interval:2,intervalError:"",intervalTimeUnit:"MINUTES",cronExpression:"",cronTimeZone:"UTC",schedule:"fixed",submitError:"",hasSubmitted:false,useUpdatedUX:useUpdatedUX}}
6render(){const{id:id,error:error,pageSize:pageSize,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,isSubmitting:isSubmitting,enabled:enabled,interval:interval,intervalError:intervalError,intervalTimeUnit:intervalTimeUnit,cronExpression:cronExpression,cronTimeZone:cronTimeZone,schedule:schedule}=this.state;const size=this.state.useUpdatedUX?"s":"m";const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(Transforms_components_ConfigureTransform,{inEdit:true,transformId:id,error:error,onChangeName:this.onNameChange,onChangeDescription:this.onDescriptionChange,description:description,size:size}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_Indices,{sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,size:size}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(Transforms_components_Schedule,{transformId:id,pageSize:pageSize,schedule:schedule,error:error,enabled:enabled,interval:interval,intervalError:intervalError,intervalTimeUnit:intervalTimeUnit,cronExpression:cronExpression,cronTimeZone:cronTimeZone,onEnabledChange:this.onEnabledChange,onCronExpressionChange:this.onCronExpressionChange,onIntervalChange:this.onIntervalChange,onPageChange:this.onPageChange,onScheduleChange:this.onScheduleChange,onCronTimeZoneChange:this.onCronTimeZoneChange,onIntervalTimeUnitChange:this.onIntervalTimeUnitChange,size:size}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"editTransformCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"editTransformSaveButton"},"Save changes"))));return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},Common()):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"25px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Edit transform job")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common())}}EditTransform_defineProperty(EditTransform_EditTransform,"contextType",core_services["b"]);var Transforms_EditTransform=function(props){useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(EditTransform_EditTransform,props)};function components_DeleteModal_DeleteModal_defineProperty(e,r,t){return(r=components_DeleteModal_DeleteModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function components_DeleteModal_DeleteModal_toPropertyKey(t){var i=components_DeleteModal_DeleteModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function components_DeleteModal_DeleteModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class components_DeleteModal_DeleteModal_DeleteModal extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);components_DeleteModal_DeleteModal_defineProperty(this,"state",{confirmDeleteText:""});components_DeleteModal_DeleteModal_defineProperty(this,"onChange",e=>{this.setState({confirmDeleteText:e.target.value})})}render(){const{item:item,closeDeleteModal:closeDeleteModal,onClickDelete:onClickDelete}=this.props;const{confirmDeleteText:confirmDeleteText}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiConfirmModal"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete job(s)")),onCancel:closeDeleteModal,onConfirm:onClickDelete,cancelButtonText:"Cancel",confirmButtonText:"Delete",buttonColor:"danger",defaultFocusedButton:"confirm",confirmButtonDisabled:confirmDeleteText!="delete"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"By deleting ",external_osdSharedDeps_React_default.a.createElement("strong",null,item),", all future scheduled executions will be canceled. However, your target index and data in it will remain intact."))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:"To confirm deleti
6on, enter delete in the text field"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:confirmDeleteText,placeholder:"delete",onChange:this.onChange,"data-test-subj":"deleteTextField"})))))}}var Transforms_components_DeleteModal=components_DeleteModal_DeleteModal_DeleteModal;const TransformEmptyPrompt_TEXT={RESET_FILTERS:"There are no transform jobs matching your applied filters. Reset your filters to view your transform jobs.",NO_TRANSFORMS:"Transform jobs help you create a materialized view on top of existing data.",LOADING:"Loading transform jobs..."};const TransformEmptyPrompt_getMessagePrompt=_ref=>{let{filterIsApplied:filterIsApplied,loading:loading}=_ref;if(loading)return TransformEmptyPrompt_TEXT.LOADING;if(filterIsApplied)return TransformEmptyPrompt_TEXT.RESET_FILTERS;return TransformEmptyPrompt_TEXT.NO_TRANSFORMS};const TransformEmptyPrompt_getActions=_ref2=>{let{filterIsApplied:filterIsApplied,loading:loading,resetFilters:resetFilters,size:size}=_ref2;if(loading){return null}const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");if(filterIsApplied){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:resetFilters,"data-test-subj":"transformEmptyPromptRestFilters"},"Reset Filters")}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{href:`${constants["y"]}#${constants["D"].CREATE_TRANSFORM}`,"data-test-subj":"emptyPromptCreateTransformButton",iconType:"plus",fill:true},"Create transform")};const TransformEmptyPrompt=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,TransformEmptyPrompt_getMessagePrompt(props))),actions:TransformEmptyPrompt_getActions(props)});var TransformEmptyPrompt_TransformEmptyPrompt=TransformEmptyPrompt;var components_TransformEmptyPrompt=TransformEmptyPrompt_TransformEmptyPrompt;function Transforms_extends(){return Transforms_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Transforms_extends.apply(null,arguments)}function Transforms_defineProperty(e,r,t){return(r=Transforms_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Transforms_toPropertyKey(t){var i=Transforms_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Transforms_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Transforms_Transforms extends components_MDSEnabledComponent{constructor(props){super(props);Transforms_defineProperty(this,"getTransforms",async()=>{this.setState({fetchingTransforms:true});try{const{transformService:transformService,history:history}=this.props;const queryObject=Transforms_Transforms.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify(Transforms_Transforms.getQueryObjectFromState(this.state));history.replace({...this.props.location,search:queryParamsString});const response=await transformService.getTransforms(queryObject);if(response.ok){const{transforms:transforms,totalTransforms:totalTransforms,metadata:metadata}=response.response;this.setState({transforms:transforms,totalTransforms:totalTransforms,transformMetadata:metadata})}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was problem loading transforms"))}this.setState({fetchingTransforms:false})});Transforms_defineProperty(this,"getSelectedTransformIds",()=>this.state.selectedItems.map(item=>item._id).join(", "));Transforms_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Transforms_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});Transforms_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});Transforms_defineProperty(this,"onClickCreate",()=>{this.props.history.push(constants["D"].CREATE_TRANSFORM)});Transforms_defineProperty(this,"onClickEdit",()=>{const{selectedItems:[{_id:_id}]}=this.state;if(_id)this.props.history.push(`${constants["D"].EDIT_TRANSFORM}?id=${_id}`)});Transforms_defineProperty(this,"onClickDelete",async()=>{const{transformService:transformService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const transformId=item._id;try{const response=await transformService.deleteTransform(transformId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${transformId}" successfully deleted!`)}else{this.context.notifications.toasts.addDanger(`Could not delete transform job "${transformId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the transform job"))}}this.closeDeleteModal();await this.getTransforms()});Transforms_defineProperty(this,"onPageClick",page=>{this.setState({from:page*this.state.size})});Transforms_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage;const{field:sortField,direction:sortDirection}=sort;this.setState({from:page*size,size:size,sortField:sortField,sortDirection:sortDirection})});Transforms_defineProperty(this,"closePopover",()=>{this.setState({isPopOverOpen:false})});Transforms_defineProperty(this,"resetFilters",()=>{this.setState({search:utils_constants_DEFAULT_QUERY_PARAMS.search})});Transforms_defineProperty(this,"onEnable",async()=>{const{transformService:transformService}=this.props;const{selectedItems:selectedItems}=this.state;for(const item of selectedItems){const transformId=item._id;try{const response=await transformService.startTransform(transformId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${transformId}" is enabled`)}else{this.context.notifications.toasts.addDanger(`Could not start transform job "${transformId}": ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not start transform job ${transformId}`))}}await this.getTransforms()});Transforms_defineProperty(this,"onDisable",async()=>{const{transformService:transformService}=this.props;const{selectedItems:selectedItems}=this.state;for(const item of selectedItems){const transformId=item._id;try{const response=await transformService.stopTransform(transformId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${transformId}" is disabled`)}else{this.context.notifications.toasts.addDanger(`Could not stop transform job "${transformId}": ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not stop transform job "${transformId}"`))}}await this.getTransforms()});Transforms_defineProperty(this,"onSearchChange",e=>{this.setState({from:0,search:e.target.value})});Transforms_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopOverOpen:!this.state.isPopOverOpen})});const{from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection}=Transforms_utils_helpers_getURLQueryParams(this.props.location);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={...this.state,totalTransforms:0,from:from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],transforms:[],fetchingTransforms:true,transformMetadata:{},isPopOverOpen:false,isDeleteModalVisible:false,useUpdatedUX:useUpdatedUX};this.getTransforms=external_osdSharedDeps_Lodash_default.a.debounce(this.getTransforms,500,{leading:true})}async updateBreadCrumbs(){if(this.state.useUpdatedUX){this.context.chrome.setBreadcrumbs([{text:constants["f"].TRANSFORMS.text.concat(` (${this.state.transforms.length})`),href:constants["f"].TRANSFORMS.href}])}}async componentDidMount(){const breadCrumbs=this.state.useUpdatedUX?[constants["f"].TRANSFORMS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getTransforms();this.updateBreadCrumbs()}async componentDidUpdate(prevProps,prevState){const prevQuery=Transforms_Transforms.getQueryObjectFromState(prevState);const currQuery=Transforms_Transforms.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getTransforms()}this.updateBreadCrumbs()}render(){const{totalTransforms:totalTransforms,from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,selectedItems:selectedItems,transforms:transforms,fetchingTransforms:fetchingTransforms,isPopOverOpen:isPopOverOpen,isDeleteModalVisible:isDeleteModalVisible}=this.state;const filterIsApplied=!!search;const pageCount=Math.ceil(totalTransforms/size)||1;const page=Math.floor(from/size);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalTransforms};const columns=[{field:"_id",name:"Name",sortable:true,textOnly:true,truncateText:true,render:_id=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.props.history.push(`${constants["D"].TRANSFORM_DETAILS}?id=${_id}`),"data-test-subj":`transformLink_${_id}`},_id)},{field:"transform.source_index",name:"Source index",sortable:true,textOnly:true,truncateText:true},{field:"transform.target_index",name:"Target index",sortable:true,textOnly:true,truncateText:true},{field:"transform.enabled",name:"Job state",sortable:true,textOnly:true,truncateText:true,render:metadataHelper_renderEnabled},{field:"transform.continuous",name:"Continuous",sortable:true,textOnly:true,truncateText:true,render:renderContinuous},{field:"transform.updated_at",name:"Last updated time",sortable:true,textOnly:true,render:updated_at=>utils_helpers_renderTime(updated_at)},{field:"metadata",name:"Transform job status",sortable:false,textOnly:true,render:metadata=>metadataHelper_renderStatus(metadata)}];const Actionsize=this.state.useUpdatedUX?"s":"m";const actionButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton",size:Actionsize},"Actions");const actionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",disabled:selectedItems.length!=1,"data-test-subj":"editButton",toolTipPosition:"left",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteButton",toolTipPosition:"left",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"danger"},"Delete"))];const selection={onSelectionChange:this.onSelectionChange};const sorting={sort:{direction:sortDirection,field:sortField}};const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Create transform job",label:"Create transform job",fill:true,iconType:"plus",run:this.onClickCreate,testId:"createTransformButton",controlType:"button",color:"primary"}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,value:search,placeholder:"Search",onChange:this.onSearchChange})),pageCount>1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{justifyContent:"center"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPagination"],{pageCount:pageCount,activePage:page,onPageClick:this.onPageClick,"data-test-subj":"indexControlsPagination"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:this.getTransforms,"aria-label":"refresh",size:"s",display:"base","data-test-subj":"refreshButton"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionButton,isOpen:isPopOverOpen,closePopover:this.closePopover,panelPaddingSize:"s",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:actionItems,size:"s"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:columns,isSelectable:true,itemId:"_id",items:transforms,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_TransformEmptyPrompt,{filterIsApplied:filterIsApplied,loading:fetchingTransforms,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,tableLayout:"auto"}),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(Transforms_components_DeleteModal,{item:this.getSelectedTransformIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete})))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{style:{paddingLeft:"0px",paddingRight:"0px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 10px"},justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Transform jobs ("+`${transforms.length}`+")"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getTransforms,"data-test-subj":"refreshButton"},"Refresh")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.onDisable,"data-test-subj":"disableButton"},"Disable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:()=>{this.onEnable()},"data-test-subj":"enableButton"},"Enable")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionButton,isOpen:isPopOverOpen,closePopover:this.closePopover,panelPaddingSize:"s",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:actionItems,size:"s"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onClickCreate,fill:true,"data-test-subj":"createTransformButton",iconType:"plus"},"Create transform job"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"s"}),external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"initial"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,value:search,placeholder:"Search",onChange:this.onSearchChange})),pageCount>1&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{justifyContent:"center"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPagination"],{pageCount:pageCount,activePage:page,onPageClick:this.onPageClick,"data-test-subj":"indexControlsPagination"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:columns,isSelectable:true,itemId:"_id",items:transforms,noItemsMessage:external_osdSharedDeps_React_default.a.createElement(components_TransformEmptyPrompt,{filterIsApplied:filterIsApplied,loading:fetchingTransforms,resetFilters:this.resetFilters}),onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,tableLayout:"auto"}),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(Transforms_components_DeleteModal,{item:this.getSelectedTransformIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete})))}static getQueryObjectFromState(_ref2){let{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref2;return{from:from,size:size,search:search,sortField:sortField,sortDirection:sortDirection,...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}}Transforms_defineProperty(Transforms_Transforms,"contextType",core_services["b"]);var containers_Transforms_Transforms=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Transforms_Transforms,Transforms_extends({},props,dataSourceMenuProps))};function TransformSettings_defineProperty(e,r,t){return(r=TransformSettings_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function TransformSettings_toPropertyKey(t){var i=TransformSettings_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function TransformSettings_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class TransformSettings_TransformSettings extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);TransformSettings_defineProperty(this,"previewTransform",async transform=>{try{const{transformService:transformService}=this.props;const previewResponse=await transformService.previewTransform(transform);if(previewResponse.ok)this.setState({previewTransform:previewResponse.response.documents});else this.context.notifications.toasts.addDanger(`Could not preview transform: ${previewResponse.error}`)}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load preview transform"))}});TransformSettings_defineProperty(this,"componentDidMount",async()=>
6{if(this.props.transformJson.transform){await this.previewTransform({transform:this.props.transformJson.transform})}});TransformSettings_defineProperty(this,"onClick",async()=>{const{previewTransform:previewTransform}=this.state;if(!previewTransform.length)await this.previewTransform({transform:this.props.transformJson.transform})});this.state={previewTransform:[]}}render(){const{groupsShown:groupsShown,aggregationsShown:aggregationsShown}=this.props;const groupItems=()=>groupsShown.map((group,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:index},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Group by ",group.aggregationMethod),external_osdSharedDeps_React_default.a.createElement("dd",null,group.field.label))));const aggItems=()=>Object.keys(aggregationsShown).map((key,index)=>{let aggregationType=Object.keys(aggregationsShown[key])[0];let sourceField="";if(aggregationType!=interfaces["d"].scripted_metric){sourceField=aggregationsShown[key][aggregationType].field}else{sourceField=key}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:index},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,aggregationType,"()"),external_osdSharedDeps_React_default.a.createElement("dd",null,sourceField)))});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Transform Settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},groupItems(),aggItems()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:Object(external_osdSharedDeps_ElasticEuiLibServices_["htmlIdGenerator"])()(),buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h4",null,"Sample source index and transform result")," "),onClick:this.onClick},external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"10px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("h5",null,"Preview result based on sample data")),external_osdSharedDeps_React_default.a.createElement(components_PreviewTransform,{onRemoveTransformation:()=>{},previewTransform:this.state.previewTransform,aggList:[],isReadOnly:true})))))}}class TransformStatus_TransformStatus extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{metadata:metadata}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Transform Status")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Status"),metadataHelper_renderStatus(metadata))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Documents indexed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.transform_metadata==null?"-":metadata.transform_metadata.stats.documents_indexed))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Document processed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.transform_metadata==null?"-":metadata.transform_metadata.stats.documents_processed))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Indexed time (ms)"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.transform_metadata==null?"-":metadata.transform_metadata.stats.index_time_in_millis))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Page processed"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.transform_metadata==null?"-":metadata.transform_metadata.stats.pages_processed))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Search time (ms)"),external_osdSharedDeps_React_default.a.createElement("dd",null,metadata==null||metadata.transform_metadata==null?"-":metadata.transform_metadata.stats.search_time_in_millis)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})))}}var components_TransformStatus=TransformStatus_TransformStatus;class GeneralInformation_GeneralInformation_GeneralInformation extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props)}render(){const{id:id,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,scheduledText:scheduledText,pageSize:pageSize,updatedAt:updatedAt,onEdit:onEdit}=this.props;const enableDate=new Date(updatedAt);const infoItems=[{term:"Name",value:id}
6,{term:"State",value:"Enabled on "+enableDate.toLocaleString()},{term:"Source index",value:sourceIndex},{term:"Schedule",value:scheduledText},{term:"Description",value:description||"-"},{},{term:"Source index filter",value:sourceIndexFilter},{term:"Pages per execution",value:pageSize},{},{},{term:"Target index",value:targetIndex}];const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");const size=useUpdatedUX?"s":undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"General information"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},!useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{size:size,actions:[{text:"Edit",buttonProps:{onClick:()=>onEdit()}}]})):null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},infoItems.map((item,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:index},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))))}}var components_GeneralInformation=GeneralInformation_GeneralInformation_GeneralInformation;function TransformDetails_extends(){return TransformDetails_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TransformDetails_extends.apply(null,arguments)}function TransformDetails_defineProperty(e,r,t){return(r=TransformDetails_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function TransformDetails_toPropertyKey(t){var i=TransformDetails_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function TransformDetails_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class TransformDetails_TransformDetails extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);TransformDetails_defineProperty(this,"componentDidMount",async()=>{const breadCrumbs=this.state.useUpdatedUX?[constants["f"].TRANSFORMS,constants["f"].TRANSFORMS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS];this.context.chrome.setBreadcrumbs(breadCrumbs);const{id:id}=query_string_default.a.parse(this.props.location.search);if(typeof id==="string"){const breadCrumbsUp=this.state.useUpdatedUX?[constants["f"].TRANSFORMS,{text:id}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TRANSFORMS,{text:id}];this.context.chrome.setBreadcrumbs(breadCrumbsUp);await this.getTransform(id);this.forceUpdate()}else{this.context.notifications.toasts.addDanger(`Invalid transform id: ${id}`);this.props.history.push(constants["D"].TRANSFORMS)}});TransformDetails_defineProperty(this,"getTransform",async transformId=>{try{const{transformService:transformService}=this.props;const response=await transformService.getTransform(transformId);if(response.ok){let json=response.response;let aggregations=this.parseAggregations(response.response.transform.aggregations);let groups=this.parseGroups(response.response.transform.groups);this.setState({id:response.response._id,description:response.response.transform.description,enabled:response.response.transform.enabled,enabledAt:response.response.transform.enabled_at,updatedAt:response.response.transform.updated_at,pageSize:response.response.transform.page_size,transformJson:json,sourceIndex:response.response.transform.source_index,targetIndex:response.response.transform.target_index,sourceIndexFilter:JSON.stringify(response.response.transform.data_selection_query),aggregationsShown:aggregations,groupsShown:groups.slice(0,10)});if(response.response.metadata!=null){this.setState({metadata:response.response.metadata[response.response._id]})}if("interval"in response.response.transform.schedule){this.setState({interval:response.response.transform.schedule.interval.period,intervalTimeUnit:response.response.transform.schedule.interval.unit})}else{this.setState({cronExpression:response.response.transform.schedule.cron.expression})}}else{this.context.notifications.toasts.addDanger(`Could not load transform job ${transformId}: ${response.error}`);this.props.history.push(constants["D"].TRANSFORMS)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not load transform job ${transformId}`));this.props.history.push(constants["D"].TRANSFORMS)}});TransformDetails_defineProperty(this,"parseGroups",groups=>{if(groups.length==0)return[];return groups.map(group=>{var _group$date_histogram,_group$date_histogram2,_group$histogram,_group$histogram2,_group$terms;let sequence=groups.indexOf(group);switch(true){case group.date_histogram!=null:return{sequence:sequence,aggregationMethod:"date_histogram",field:{label:(_group$date_histogram=group.date_histogram)===null||_group$date_histogram===void 0?void 0:_group$date_histogram.source_field},interval:(_group$date_histogram2=group.date_histogram)===null||_group$date_histogram2===void 0?void 0:_group$date_histogram2.interval};case group.histogram!=null:return{sequence:sequence,aggregationMethod:"histogram",field:{label:(_group$histogram=group.histogram)===null||_group$histogram===void 0?void 0:_group$histogram.source_field},interval:(_group$histogram2=group.histogram)===null||_group$histogram2===void 0?void 0:_group$histogram2.interval};case group.terms!=null:return{sequence:sequence,aggregationMethod:"terms",field:{label:(_group$terms=group.terms)===null||_group$terms===void 0?void 0:_group$terms.source_field},interval:null}}})});TransformDetails_defineProperty(this,"parseAggregations",aggregations=>{if(aggregations.size==0)return{};return aggregations});TransformDetails_defineProperty(this,"onClickDelete",async()=>{const{id:id}=this.state;const{transformService:transformService}=this.props;try{const response=await transformService.deleteTransform(id);if(response.ok){this.closeDeleteModal();this.context.notifications.toasts.addSuccess(`"${id}" successfully deleted!`);this.props.history.push(constants["D"].TRANSFORMS)}else{this.context.notifications.toasts.addDanger(`Could not delete transform job "${id}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the transform job"))}});TransformDetails_defineProperty(this,"onEdit",()=>{const{id:id}=this.state;this.props.history.push(`${constants["D"].EDIT_TRANSFORM}?id=${id}`)});TransformDetails_defineProperty(this,"onEnable",async()=>{const{id:id}=this.state;const{transformService:transformService}=this.props;try{const response=await transformService.startTransform(id);if(response.ok){this.setState({enabled:true});await this.getTransform(id);this.forceUpdate();this.context.notifications.toasts.addSuccess(`"${id}" is enabled`)}else{this.context.notifications.toasts.addDanger(`Could not enable transform job "${id}": ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not enable transform job "${id}"`))}});TransformDetails_defineProperty(this,"onDisable",async()=>{const{id:id}=this.state;const{transformService:transformService}=this.props;try{const response=await transformService.stopTransform(id);if(response.ok){this.setState({enabled:false});await this.getTransform(id);this.forceUpdate();this.context.notifications.toasts.addSuccess(`"${id}" is disabled`)}else{this.context.notifications.toasts.addDanger(`Could not disable transform job "${id}": ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,`Could not disable transform job "${id}"`))}});TransformDetails_defineProperty(this,"showJsonModal",()=>{this.setState({isModalOpen:true})});TransformDetails_defineProperty(this,"closeModal",()=>{this.setState({isModalOpen:false})});TransformDetails_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalOpen:true})});TransformDetails_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalOpen:false})});TransformDetails_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopOverOpen:!this.state.isPopOverOpen})});TransformDetails_defineProperty(this,"closePopover",()=>{this.setState({isPopOverOpen:false})});const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={id:"",description:"",enabled:false,enabledAt:null,updatedAt:1,pageSize:1e3,transformJson:EMPTY_TRANSFORM,continuousJob:"no",sourceIndex:"",targetIndex:"",sourceIndexFilter:"",aggregationsShown:{},groupsShown:[],metadata:undefined,interval:2,intervalTimeUnit:"",cronExpression:"",isModalOpen:false,isDeleteModalOpen:false,isPopOverOpen:false,useUpdatedUX:useUpdatedUX}}render(){const{id:id,enabled:enabled,enabledAt:enabledAt,updatedAt:updatedAt,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,interval:interval,intervalTimeUnit:intervalTimeUnit,pageSize:pageSize,metadata:metadata,transformJson:transformJson,groupsShown:groupsShown,aggregationsShown:aggregationsShown,isDeleteModalOpen:isDeleteModalOpen,isModalOpen:isModalOpen,isPopOverOpen:isPopOverOpen}=this.state;let scheduleText="";if(transformJson.transform!=null){scheduleText=buildIntervalScheduleText(transformJson.transform.continuous,interval,intervalTimeUnit)}const actionButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:false,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const actionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"enable",icon:"empty",disabled:enabled,"data-test-subj":"enableButton",onClick:()=>{this.closePopover();this.onEnable()}},"Enable job"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"disable",icon:"empty",disabled:!enabled,"data-test-subj":"disableButton",onClick:()=>{this.closePopover();this.onDisable()}},"Disable job"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"view",icon:"empty",disabled:false,"data-test-subj":"viewButton",onClick:()=>{this.closePopover();this.showJsonModal()}},"View JSON"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"delete",icon:"empty",disabled:false,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"danger"},"Delete"))];const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppBadgeControls:setAppBadgeControls,setAppRightControls:setAppRightControls}=Object(Services["c"])();const onClickEnable=()=>{this.closePopover();this.onEnable()};const onClickDisable=()=>{this.closePopover();this.onDisable()};const HeaderRight=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{display:"base",iconType:"trash","aria-label":"Delete",color:"danger",onClick:()=>{this.closePopover();this.showDeleteModal()},size:"s"}))},{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>!this.state.enabled?onClickEnable():onClickDisable()},this.state.enabled?"Disable":"Enable")},{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{this.closePopover();this.showJsonModal()}},"View JSON")},{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,()=>external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{size:"s",actions:[{text:"Edit",buttonProps:{onClick:()=>this.onEdit(),fill:true}}]})))}];const badgeControlData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:this.state.enabled?"success":"danger"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},this.state.enabled?"Enabled":"Disabled"))}];return!this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"5px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 10px"},justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,id))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionButton,isOpen:isPopOverOpen,closePopover:this.closePopover,panelPaddingSize:"none",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:actionItems,size:"s"})))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_GeneralInformation,{id:id,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,scheduledText:scheduleText,pageSize:pageSize,enabledAt:enabledAt,updatedAt:updatedAt,onEdit:this.onEdit}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_TransformStatus,{metadata:metadata}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(TransformSettings_TransformS
6ettings,TransformDetails_extends({},this.props,{transformService:this.props.transformService,transformId:id,sourceIndex:sourceIndex,transformJson:transformJson,groupsShown:groupsShown,aggregationsShown:aggregationsShown})),isModalOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:this.closeModal},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"View JSON of "+id)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"s",paddingSize:"m",overflowHeight:600,inline:false,isCopyable:true},JSON.stringify(transformJson,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.closeModal},"Close")))),isDeleteModalOpen&&external_osdSharedDeps_React_default.a.createElement(Transforms_components_DeleteModal,{item:id,closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete})):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppBadgeControls,controls:badgeControlData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:HeaderRight,setMountPoint:setAppRightControls}),external_osdSharedDeps_React_default.a.createElement(components_GeneralInformation,{id:id,description:description,sourceIndex:sourceIndex,targetIndex:targetIndex,sourceIndexFilter:sourceIndexFilter,scheduledText:scheduleText,pageSize:pageSize,enabledAt:enabledAt,updatedAt:updatedAt,onEdit:this.onEdit}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_TransformStatus,{metadata:metadata}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(TransformSettings_TransformSettings,TransformDetails_extends({},this.props,{transformService:this.props.transformService,transformId:id,sourceIndex:sourceIndex,transformJson:transformJson,groupsShown:groupsShown,aggregationsShown:aggregationsShown})),isModalOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:this.closeModal},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"View JSON of "+id)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"s",paddingSize:"m",overflowHeight:600,inline:false,isCopyable:true},JSON.stringify(transformJson,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.closeModal},"Close")))),isDeleteModalOpen&&external_osdSharedDeps_React_default.a.createElement(Transforms_components_DeleteModal,{item:id,closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete}))}}TransformDetails_defineProperty(TransformDetails_TransformDetails,"contextType",core_services["b"]);var Transforms_TransformDetails=function(props){useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(TransformDetails_TransformDetails,props)};const CustomLabel=_ref=>{let{title:title,isOptional:isOptional=false,helpText:helpText}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,title&&typeof title=="string"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,title))),isOptional?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued"},"x",external_osdSharedDeps_React_default.a.createElement("i",null," â optional"))):null):title,helpText&&typeof helpText==="string"?external_osdSharedDeps_React_default.a.createElement("span",{style:{fontWeight:200,fontSize:"12px"}},helpText):helpText,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))};
6var CustomLabel_CustomLabel=CustomLabel;var components_CustomLabel=CustomLabel_CustomLabel;const getDefaultSMPolicy=()=>({name:"",description:"",enabled:true,creation:{schedule:{cron:{expression:"0 20 * * *",timezone:"UTC"}}},snapshot_config:{repository:""}});const maxAgeUnitOptions=[{value:"d",text:"Days"},{value:"h",text:"Hours"}];const DEFAULT_INDEX_OPTIONS=[{label:"*"}];const ERROR_PROMPT={NAME:"Name must be provided.",REPO:"Repository must be provided.",TIMEZONE:"Time zone must be provided."};const DEFAULT_DATE_FORMAT="yyyy-MM-dd'T'HH:mm:ss";const DEFAULT_DATE_FORMAT_TIMEZONE="UTC";const getIncludeGlobalState=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.include_global_state",false))=="true";const getIgnoreUnavailabel=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.ignore_unavailable",false))=="true";const getAllowPartial=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.partial",false))=="true";const getNotifyCreation=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"notification.conditions.creation",false))=="true";const getNotifyDeletion=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"notification.conditions.deletion",false))=="true";const getNotifyFailure=policy=>String(external_osdSharedDeps_Lodash_default.a.get(policy,"notification.conditions.failure",false))=="true";const showNotification=policy=>{const notifyOnCreation=getNotifyCreation(policy);const notifyOnDeletion=getNotifyDeletion(policy);const notifyOnFailure=getNotifyFailure(policy);let showNotificationChannel=false;if(notifyOnCreation||notifyOnDeletion||notifyOnFailure){showNotificationChannel=true}return showNotificationChannel};const CRON_SCHEDULE_FREQUENCY_TYPE=[{value:"hourly",text:"Hourly"},{value:"daily",text:"Daily"},{value:"weekly",text:"Weekly"},{value:"monthly",text:"Monthly"},{value:"custom",text:"Custom (Cron expression)"}];const TIMEZONES=external_osdSharedDeps_MomentTimezone_default.a.tz.names().map(tz=>({label:tz,text:tz}));const WEEK_DAYS=["MON","TUE","WED","THU","FRI","SAT","SUN"];const DEFAULT_CRON_DAY_OF_WEEK="SUN";const DEFAULT_CRON_DAY_OF_MONTH=1;const DEFAULT_CRON_MINUTE=0;const DEFAULT_CRON_HOUR=20;function parseCronExpression(expression){let minute=DEFAULT_CRON_MINUTE;let hour=DEFAULT_CRON_HOUR;let frequencyType="custom";let dayOfWeek=DEFAULT_CRON_DAY_OF_WEEK;let dayOfMonth=DEFAULT_CRON_DAY_OF_MONTH;if(!expression){return{hour:hour,minute:minute,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}}const expArr=expression.split(" ");if(isNumber(expArr[0])&&isNumber(expArr[1])){minute=parseInt(expArr[0]);hour=parseInt(expArr[1]);if(isNumber(expArr[2])&&expArr[3]=="*"&&expArr[4]=="*"){frequencyType="monthly";dayOfMonth=parseInt(expArr[2])}if(expArr[2]=="*"&&expArr[3]=="*"&&(isNumber(expArr[4])||WEEK_DAYS.includes(expArr[4]))){frequencyType="weekly";if(isNumber(expArr[4])){dayOfWeek=["SUN",...WEEK_DAYS][parseInt(expArr[4])]}else{dayOfWeek=expArr[4]}}if(expArr[2]=="*"&&expArr[3]=="*"&&expArr[4]=="*"){frequencyType="daily"}}if(isNumber(expArr[0])){minute=parseInt(expArr[0]);if(expArr[1]=="*"&&expArr[2]=="*"&&expArr[3]=="*"&&expArr[4]=="*"){frequencyType="hourly"}}return{hour:hour,minute:minute,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}}function buildCronExpression(cronParts,expression){const minute=cronParts.minute;const hour=cronParts.hour;switch(cronParts.frequencyType){case"hourly":{return`${minute} * * * *`}case"daily":{return`${minute} ${hour} * * *`}case"weekly":{return`${minute} ${hour} * * ${cronParts.dayOfWeek}`}case"monthly":{return`${minute} ${hour} ${cronParts.dayOfMonth} * *`}case"custom":{return expression}}throw new Error(`Unknown schedule frequency type ${cronParts.frequencyType}.`)}function humanCronExpression(_ref,expression,timezone){let{hour:hour,minute:minute,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}=_ref;if(frequencyType=="custom"){return expression+` (${timezone})`}let humanCron=`${helper_startTime(hour,minute).format("h:mm a z")} (${timezone})`;if(frequencyType=="monthly"){humanCron=`Day ${dayOfMonth}, `+humanCron}if(frequencyType=="weekly"){humanCron=`${dayOfWeek}, `+humanCron}return humanCron}function isNumber(value){return!isNaN(parseInt(value))}
6function formatNumberToHourMin(timeNumber){return("0"+timeNumber).slice(-2)}function helper_startTime(hourNumber,minuteNumber){const timeMoment=external_osdSharedDeps_MomentTimezone_default()().hours(hourNumber).minutes(minuteNumber);return timeMoment}const REPO_TYPES=[{label:"File system (fs)",value:"fs"}];const REPO_SELECT_OPTIONS=[{text:"Shared file system",value:"fs"},{text:"Custom configuration",value:"custom"}];const FS_ADVANCED_SETTINGS={chunk_size:null,compress:false,max_restore_bytes_per_sec:"40m",max_snapshot_bytes_per_sec:"40m",readonly:false};const CUSTOM_CONFIGURATION={type:"s3",settings:{bucket:"<bucket_name>",base_path:"<bucket_base_path>"}};function CreateRepositoryFlyout_extends(){return CreateRepositoryFlyout_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateRepositoryFlyout_extends.apply(null,arguments)}function CreateRepositoryFlyout_defineProperty(e,r,t){return(r=CreateRepositoryFlyout_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateRepositoryFlyout_toPropertyKey(t){var i=CreateRepositoryFlyout_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateRepositoryFlyout_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateRepositoryFlyout_CreateRepositoryFlyout extends components_MDSEnabledComponent{constructor(props){super(props);CreateRepositoryFlyout_defineProperty(this,"getRepo",async repoName=>{const{service:service}=this.props;try{const response=await service.getRepository(repoName);if(response.ok){const repoName=Object.keys(response.response)[0];const repoBody=response.response[repoName];const type=repoBody.type;const settings=repoBody.settings;const location=settings.location;delete settings.location;const settingsJsonString=JSON.stringify(settings);this.setState({repoName:repoName,location:location})}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the editing repository."))}});CreateRepositoryFlyout_defineProperty(this,"onClickAction",()=>{const{createRepo:createRepo}=this.props;const{repoName:repoName,selectedRepoTypeOption:selectedRepoTypeOption,location:location,fsSettingsJsonString:fsSettingsJsonString,customSettingsJsonString:customSettingsJsonString}=this.state;if(!repoName.trim()){this.setState({repoNameError:"Required."});return}if(!location.trim()){this.setState({location:"Required."});return}if(selectedRepoTypeOption=="fs"){let settings;try{settings=JSON.parse(fsSettingsJsonString);settings.location=location}catch(err){this.context.notifications.toasts.addDanger("Invalid Policy JSON")}createRepo(repoName,selectedRepoTypeOption,settings)}else if(selectedRepoTypeOption=="custom"){let repoType;let settings;try{const parsed=JSON.parse(customSettingsJsonString);repoType=parsed.type;settings=parsed.settings;createRepo(repoName,repoType,settings)}catch(err){this.context.notifications.toasts.addDanger("Invalid Policy JSON")}}});this.state={...this.state,repoName:"",location:"",selectedRepoTypeOption:REPO_SELECT_OPTIONS[0].value,fsSettingsJsonString:JSON.stringify(FS_ADVANCED_SETTINGS,null,4),customSettingsJsonString:JSON.stringify(CUSTOM_CONFIGURATION,null,4),repoNameError:"",repoTypeError:"",locationError:""}}async componentDidMount(){const{editRepo:editRepo}=this.props;if(!!editRepo){await this.getRepo(editRepo)}}async componentDidUpdate(prevProps,prevState){if(prevState.dataSourceId!=this.state.dataSourceId){const{editRepo:editRepo}=this.props;this.setState({repoName:"",location:"",selectedRepoTypeOption:REPO_SELECT_OPTIONS[0].value,fsSettingsJsonString:JSON.stringify(FS_ADVANCED_SETTINGS,null,4),customSettingsJsonString:JSON.stringify(CUSTOM_CONFIGURATION,null,4),repoNameError:"",repoTypeError:"",locationError:""});if(!!editRepo){await this.getRepo(editRepo)}}}render(){const{editRepo:editRepo,onCloseFlyout:onCloseFlyout}=this.props;const{repoName:repoName,location:location,selectedRepoTypeOption:selectedRepoTypeOption,fsSettingsJsonString:fsSett
6ingsJsonString,customSettingsJsonString:customSettingsJsonString,repoNameError:repoNameError,repoTypeError:repoTypeError,locationError:locationError}=this.state;const customConfigHelpText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Define a repository by custom type and settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["E"],target:"_blank",rel:"noopener noreferrer"},"View sample configurations")));let configuration;if(selectedRepoTypeOption=="fs"){configuration=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Location"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!locationError,error:locationError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{disabled:!!editRepo,placeholder:"e.g., /mnt/snapshots",value:location,onChange:e=>this.setState({location:e.target.value})})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"repo_advanced_settings",buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Advanced settings"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Define additional settings for this repository."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["l"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",width:"90%",height:"250px",value:fsSettingsJsonString,onChange:str=>{this.setState({fsSettingsJsonString:str})},setOptions:{fontSize:"14px"}})))}if(selectedRepoTypeOption=="custom"){configuration=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Install and configure custom repository types"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"To use a custom repository, such as Amazon S3, Azure Blob Storage or similar, install and configure the respective repository plugin on OpenSearch and then define the repository configuration below."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["B"],target:"_blank",rel:"noopener noreferrer"},"Learn more")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Custom configuration",helpText:customConfigHelpText}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeEditor"],{mode:"json",width:"90%",height:"250px",value:customSettingsJsonString,onChange:str=>{this.setState({customSettingsJsonString:str})},setOptions:{fontSize:"14px"}}))}const repoTypeHelpText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Select a supported repository type. For additional types, install the latest repository plugins and choose Custom configuration."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["B"],target:"_blank",rel:"noopener noreferrer"},"Learn more")));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{ownFocus:false,onClose:onCloseFlyout,maxWidth:600,size:"m",hideCloseButton:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"},!!editRepo?"Edit":"Create"," repository")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Repository name"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!repoNameError,error:repoNameError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{disabled:!!editRepo,value:repoName,"data-test-subj":"repoNameInput",onChange:e=>this.setState({repoName:e.target.value})})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Repository type",helpText:repoTypeHelpText}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!repoTypeError,error:repoTypeError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{options:REPO_SELECT_OPTIONS,value:selectedRepoTypeOption,onChange:e=>this.setState({selectedRepoTypeOption:e.target.value})})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),configuration,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{save:!!editRepo,edit:!!editRepo,action:"",onClickAction:this.onClickAction,onClickCancel:onCloseFlyout})))}}CreateRepositoryFlyout_defineProperty(CreateRepositoryFlyout_CreateRepositoryFlyout,"contextType",core_services["b"]);var components_CreateRepositoryFlyout_CreateRepositoryFlyout=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(CreateRepositoryFlyout_CreateRepositoryFlyout,CreateRepositoryFlyout_extends({},props,dataSourceMenuProps))};const SnapshotIndicesRepoInput=_ref=>{let{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,onIndicesSelectionChange:onIndicesSelectionChange,getIndexOptions:getIndexOptions,onCreateOption:onCreateOption,repoOptions:repoOptions,selectedRepoValue:selectedRepoValue,onRepoSelectionChange:onRepoSelectionChange,showFlyout:showFlyout,openFlyout:openFlyout,closeFlyout:closeFlyout,createRepo:createRepo,snapshotManagementService:snapshotManagementService,repoError:repoError}=_ref;let createRepoFlyout;if(snapshotManagementService!=null&&createRepo!=null&&closeFlyout!=null){createRepoFlyout=external_osdSharedDeps_React_default.a.createElement(components_CreateRepositoryFlyout_CreateRepositoryFlyout,{service:snapshotManagementService,editRepo:null,createRepo:createRepo,onCloseFlyout:closeFlyout})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Select or input source indexes or index patterns"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"Select or input indexes or index patterns",options:indexOptions,selectedOptions:selectedIndexOptions,onChange:onIndicesSelectionChange,onSearchChange:getIndexOptions,onCreateOption:onCreateOption,isClearable:true,"data-test-subj":"indicesComboBoxInput"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:"400px"}},external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Select a repository for snapshots"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!repoError,error:repoError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{placeholder:"Select a repository",disabled:repoOptions.length===0,options:repoOptions,value:selectedRepoValue,onChange:onRepoSelectionChange}
6))),showFlyout!=null&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:openFlyout,iconType:"plus"},"Create repository"))),showFlyout&&createRepoFlyout)};var SnapshotIndicesRepoInput_SnapshotIndicesRepoInput=SnapshotIndicesRepoInput;var components_SnapshotIndicesRepoInput=SnapshotIndicesRepoInput_SnapshotIndicesRepoInput;const CronSchedule=_ref=>{let{frequencyType:frequencyType,onChangeFrequencyType:onChangeFrequencyType,cronExpression:cronExpression,onCronExpressionChange:onCronExpressionChange,showTimezone:showTimezone,timezone:timezone,onChangeTimezone:onChangeTimezone,timezoneError:timezoneError,frequencyTitle:frequencyTitle="Schedule frequency"}=_ref;const{minute:initMin,hour:initHour,dayOfWeek:initWeek,dayOfMonth:initMonth}=parseCronExpression(cronExpression);const[minute,setMinute]=Object(external_osdSharedDeps_React_["useState"])(initMin);const[hour,setHour]=Object(external_osdSharedDeps_React_["useState"])(initHour);const[dayOfWeek,setWeek]=Object(external_osdSharedDeps_React_["useState"])(initWeek);const[dayOfMonth,setMonth]=Object(external_osdSharedDeps_React_["useState"])(initMonth);if(initHour!==hour){setHour(initHour)}if(initMin!==minute){setMinute(initMin)}if(initWeek!==dayOfWeek){setWeek(initWeek)}if(initMonth!==dayOfMonth){setMonth(initMonth)}Object(external_osdSharedDeps_React_["useEffect"])(()=>{changeCron()},[minute,hour,dayOfWeek,dayOfMonth]);const changeCron=input=>{let cronParts={hour:hour,minute:minute,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType};cronParts={...cronParts,...input};const expression=buildCronExpression(cronParts,cronExpression);onCronExpressionChange(expression)};function onDayOfWeekChange(dayOfWeek){setWeek(dayOfWeek);changeCron({dayOfWeek:dayOfWeek})}function onDayOfMonthChange(dayOfMonth){setMonth(dayOfMonth);changeCron({dayOfMonth:dayOfMonth})}function onStartTimeChange(date){const minute=date.minute();const hour=date.hour();setMinute(minute);setHour(hour);changeCron({minute:minute,hour:hour})}function onTypeChange(e){const frequencyType=e.target.value;onChangeFrequencyType(e);if(frequencyType==="hourly")setMinute(0);changeCron({frequencyType:frequencyType})}const dayOfWeekCheckbox=(day,checkedDay)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:day,grow:false,style:{marginRight:"0px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckbox"],{id:day,label:day,checked:checkedDay===day,onChange:e=>onDayOfWeekChange(day),compressed:true}));let startTimeContent;startTimeContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDatePicker"],{compressed:true,showTimeSelect:true,showTimeSelectOnly:true,selected:helper_startTime(hour,minute),onChange:onStartTimeChange,dateFormat:"HH:mm",timeFormat:"HH:mm"});if(frequencyType==="hourly"){startTimeContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"Starts at the beginning of the hour.")}let additionalContent;if(frequencyType==="weekly"){additionalContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,WEEK_DAYS.map(d=>dayOfWeekCheckbox(d,initWeek)))}if(frequencyType==="monthly"){additionalContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"On the"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"m"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{options:[{value:"day",text:"Day"}],defaultValue:"Day"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:dayOfMonth,onChange:e=>{onDayOfMonthChange(parseInt(e.target.value))},min:1,max:31}))))}const cronExpressionHelpText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200,fontSize:"12px"}},"Use Cron expression to define complex schedule."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["g"],target:"_blank",rel:"noopener noreferrer"},"Learn more")));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:frequencyTitle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"creationCronScheduleType",options:CRON_SCHEDULE_FREQUENCY_TYPE,value:frequencyType,onCh
6ange:onTypeChange}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexStart",alignItems:"flexStart"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:400}},frequencyType==="custom"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Cron expression"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:cronExpressionHelpText},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:cronExpression,onChange:e=>{onCronExpressionChange(e.target.value)}}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Start time"}),startTimeContent,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),additionalContent)),showTimezone?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:250}},external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Time zone"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!timezoneError,error:timezoneError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{placeholder:"Select a time zone",singleSelection:{asPlainText:true},options:TIMEZONES,renderOption:_ref2=>{let{label:tz}=_ref2;return`${tz} (${external_osdSharedDeps_MomentTimezone_default.a.tz(tz).format("Z")})`},selectedOptions:[{label:timezone!==null&&timezone!==void 0?timezone:""}],onChange:options=>{if(onChangeTimezone){var _$first$label,_$first;onChangeTimezone((_$first$label=(_$first=external_osdSharedDeps_Lodash_default.a.first(options))===null||_$first===void 0?void 0:_$first.label)!==null&&_$first$label!==void 0?_$first$label:"")}}}))):null))};var CronSchedule_CronSchedule=CronSchedule;var components_CronSchedule=CronSchedule_CronSchedule;function truncateLongText(text){let truncateLen=arguments.length>1&&arguments[1]!==undefined?arguments[1]:20;if(text.length>truncateLen){return text.slice(0,truncateLen)+"..."}return text}function truncateSpan(value){let length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:20;const truncated=external_osdSharedDeps_Lodash_default.a.truncate(value,{length:length});return external_osdSharedDeps_React_default.a.createElement("span",{title:value},truncated)}function snapshotStatusRender(value){const capital=external_osdSharedDeps_Lodash_default.a.capitalize(value);let color="success";if(capital=="In_progress")color="primary";if(capital=="Failed")color="warning";if(capital=="Partial")color="danger";return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color},capital)}const getToasts=(id,message,snapshotId,onClick)=>{const toasts=[{id:"success_restore_toast",title:`Restore from snapshot "${snapshotId}" is in progress.`,iconType:"check",color:"success",text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xl"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",style:{paddingRight:"1rem"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onClick},"View restore activities")))},{id:"error_restore_toast",title:`Failed to restore snapshot "${snapshotId}"`,color:"danger",text:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},message),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xl"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",style:{paddingRight:"1rem"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onCl
6ick,color:"danger"},"View full error")))}];if(id==="success_restore_toast"){return[toasts[0]]}return[toasts[1]]};const CheckBoxLabel=_ref=>{let{title:title,helpText:helpText}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},title),helpText?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{fontWeight:"200"}},helpText):null)};const checkBadJSON=testString=>{try{JSON.parse(testString);return false}catch(err){return true}};const checkNoSelectedIndices=(indices,restoreSpecific)=>{let notSelected=false;if(restoreSpecific&&indices.length===0){notSelected=true}return notSelected};const checkBadRegex=regex=>{try{new RegExp(regex);return false}catch(err){return true}};const checkBadReplacement=regexString=>{const isNotValid=regexString.indexOf("$")>=0;if(isNotValid)return false;return true};const checkCustomIgnoreConflict=(customIndexSettings,ignoreIndexSettings)=>{if(customIndexSettings&&customIndexSettings.length>0){const customSettingsBad=checkBadJSON(customIndexSettings);if(customSettingsBad){return false}const customSettings=JSON.parse(customIndexSettings);for(let setting in customSettings){if(ignoreIndexSettings&&ignoreIndexSettings.indexOf(setting)>=0){return true}}}return false};const lableTitle=titleText=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,titleText))));const SnapshotAdvancedSettings=_ref=>{let{includeGlobalState:includeGlobalState,onIncludeGlobalStateToggle:onIncludeGlobalStateToggle,ignoreUnavailable:ignoreUnavailable,onIgnoreUnavailableToggle:onIgnoreUnavailableToggle,partial:partial,onPartialToggle:onPartialToggle,width:width}=_ref;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"include_global_state",label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Include cluster state in snapshots"}),checked:includeGlobalState,onChange:onIncludeGlobalStateToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"ignore_unavailable",label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Ignore unavailable indices",helpText:"Instead of failing snapshot, ignore any indexes that are unavailable or do not exist."}),checked:ignoreUnavailable,onChange:onIgnoreUnavailableToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"partial",label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Allow partial snapshots",helpText:"Allow partial snapshots if one or more shards failed to store."}),checked:partial,onChange:onPartialToggle}))};var SnapshotAdvancedSettings_SnapshotAdvancedSettings=SnapshotAdvancedSettings;var components_SnapshotAdvancedSettings=SnapshotAdvancedSettings_SnapshotAdvancedSettings;const Notification=_ref=>{let{channelId:channelId,channels:channels,loadingChannels:loadingChannels,onChangeChannelId:onChangeChannelId,getChannels:getChannels}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Select notification channels"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",style:{maxWidth:600}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{id:"channel-id",placeholder:"Select channel ID",hasNoInitialSelection:true,isLoading:loadingChannels,options:channels.map(channel=>({value:channel.config_id,text:channel.name})),value:channelId,onChange:onChangeChannelId,"data-test-subj":"create-policy-notification-channel-id"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:getChannels,disabled:loadingChannels,className:"refresh-button","data-test-subj":"channel-notification-refresh"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"popout",href:"notifications-dashboards#/channels",target:"_blank",iconSide:"right"},"Manage channels"))))};var Notification_Notification=Notification;var components_Notification=Notification_Notification;function CreateSnapshotPolicy_extends(){return CreateSnapshotPolicy_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateSnapshotPolicy_extends.apply(null,arguments)}function CreateSnapshotPolicy_defineProperty(e,r,t){return(r=CreateSnapshotPolicy_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateSnapshotPolicy_toPropertyKey(t){var i=CreateSnapshotPolicy_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateSnapshotPolicy_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateSnapshotPolicy_CreateSnapshotPolicy extends components_MDSEnabledComponent{constructor(props){super(props);CreateSnapshotPolicy_defineProperty(this,"getPolicy",async policyId=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.getPolicy(policyId);
6if(response.ok){var _policy$deletion;const policy=response.response.policy;const indices=external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.indices","");const selectedIndexOptions=indices.split(",").filter(index=>!!index).map(label=>({label:label}));const selectedRepoValue=external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.repository","");const{frequencyType:creationScheduleFrequencyType}=parseCronExpression(external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.expression"));const{frequencyType:deletionScheduleFrequencyType}=parseCronExpression(external_osdSharedDeps_Lodash_default.a.get(policy,"deletion.schedule.cron.expression"));let deleteConditionEnabled=false;let deletionScheduleEnabled=false;if(!!external_osdSharedDeps_Lodash_default.a.get(policy,"deletion")){deleteConditionEnabled=true;const creationScheduleExpression=external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.expression");const deletionScheduleExpression=external_osdSharedDeps_Lodash_default.a.get(policy,"deletion.schedule.cron.expression");if(creationScheduleExpression!==deletionScheduleExpression)deletionScheduleEnabled=true}const maxAge=(_policy$deletion=policy.deletion)===null||_policy$deletion===void 0||(_policy$deletion=_policy$deletion.condition)===null||_policy$deletion===void 0?void 0:_policy$deletion.max_age;let maxAgeNum=1;let maxAgeUnit="d";if(maxAge){maxAgeNum=parseInt(maxAge.substring(0,maxAge.length-1));maxAgeUnit=maxAge[maxAge.length-1]}this.setState({policy:policy,policyId:response.response.id,policySeqNo:response.response.seqNo,policyPrimaryTerm:response.response.primaryTerm,selectedIndexOptions:selectedIndexOptions,selectedRepoValue:selectedRepoValue,creationScheduleFrequencyType:creationScheduleFrequencyType,deletionScheduleFrequencyType:deletionScheduleFrequencyType,deleteConditionEnabled:deleteConditionEnabled,deletionScheduleEnabled:deletionScheduleEnabled,maxAgeNum:maxAgeNum,maxAgeUnit:maxAgeUnit})}else{const errorMessage=response.ok?"Policy was empty":response.error;this.context.notifications.toasts.addDanger(`Could not load the policy: ${errorMessage}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}}catch(err){this.context.notifications.toasts.addDanger(`Could not load the policy`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}});CreateSnapshotPolicy_defineProperty(this,"getIndexOptions",async searchValue=>{const{indexService:indexService}=this.props;this.setState({indexOptions:DEFAULT_INDEX_OPTIONS});try{const optionsResponse=await indexService.getDataStreamsAndIndicesNames(searchValue);if(optionsResponse.ok){const options=searchValue.trim()?[{label:Object(helpers["f"])(searchValue)},{label:searchValue}]:[];const indices=optionsResponse.response.indices.map(label=>({label:label}));this.setState({indexOptions:[...this.state.indexOptions,...options.concat(indices)]})}else{if(optionsResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("No index available")}else{this.context.notifications.toasts.addDanger(optionsResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem fetching index options."))}});CreateSnapshotPolicy_defineProperty(this,"getRepos",async()=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.catRepositories();if(response.ok){if(!this.props.isEdit){const selectedRepoValue=response.response.length>0?response.response[0].id:"";this.setState({repositories:response.response,selectedRepoValue:selectedRepoValue,policy:this.setPolicyHelper("snapshot_config.repository",selectedRepoValue)})}else{this.setState({repositories:response.response})}}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshots."))}});CreateSnapshotPolicy_defineProperty(this,"createRepo",async(repoName,type,settings)=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const createRepoBody={type:type,settings:settings};const response=await snapshotManagementService.createRepository(repoName,createRepoBody);if(response.ok){this.setState({showCreateRepoFlyout:false});this.context.notifications.toasts.addSuccess(`Created repository ${repoName}.`);await this.getRepos()}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem creating the repository."))}});CreateSnapshotPolicy_defineProperty(this,"createPolicy",async(policyId,policy)=>{const{snapshotManagementService:snapshotManagementService}=this.props;try{const response=await snapshotManagementService.createPolicy(policyId,policy);this.setState({isSubmitting:false});if(response.ok){this.context.notifications.toasts.addSuccess(`Created policy: ${response.response.policy.name}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}else{this.context.notifications.toasts.addDanger(`Failed to create snapshot policy: ${response.error}`)}}catch(err){this.setState({isSubmitting:false});this.context.notifications.toasts.addDanger(`Failed to create snapshot policy: ${Object(helpers["d"])(err,"There was a problem creating the snapshot policy.")}`)}});CreateSnapshotPolicy_defineProperty(this,"updatePolicy",async(policyId,policy)=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const{policyPrimaryTerm:policyPrimaryTerm,policySeqNo:policySeqNo}=this.state;if(policySeqNo==null||policyPrimaryTerm==null){this.context.notifications.toasts.addDanger("Could not update policy without seqNo and primaryTerm");return}const response=await snapshotManagementService.updatePolicy(policyId,policy,policySeqNo,policyPrimaryTerm);this.setState({isSubmitting:false});if(response.ok){this.context.notifications.toasts.addSuccess(`Updated policy: ${response.response.policy.name}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}else{this.context.notifications.toasts.addDanger(`Failed to update policy: ${response.error}`)}}catch(err){this.setState({isSubmitting:false});this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem updating the policy"))}});CreateSnapshotPolicy_defineProperty(this,"onClickCancel",()=>{this.props.history.push(constants["D"].SNAPSHOT_POLICIES)});CreateSnapshotPolicy_defineProperty(this,"onClickSubmit",async()=>{this.setState({isSubmitting:true});const{isEdit:isEdit}=this.props;const{policyId:policyId,policy:policy}=this.state;try{if(!policyId.trim()){this.setState({policyIdError:ERROR_PROMPT.NAME})}else if(!external_osdSharedDeps_Lodash_default.a.get(policy,"snapshot_config.repository")){this.setState({repoError:ERROR_PROMPT.REPO})}else if(!external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.timezone")){this.setState({timezoneError:ERROR_PROMPT.TIMEZONE})}else{const policyFromState=this.buildPolicyFromState(policy);if(isEdit)await this.updatePolicy(policyId,policyFromState);else await this.createPolicy(policyId,policyFromState)}this.setState({isSubmitting:false})}catch(err){this.context.notifications.toasts.addDanger("Invalid Policy");console.error(err);this.setState({isSubmitting:false})}});CreateSnapshotPolicy_defineProperty(this,"buildPolicyFromState",policy=>{const{deletionScheduleEnabled:deletionScheduleEnabled,maxAgeNum:maxAgeNum,maxAgeUnit:maxAgeUnit,deleteConditionEnabled:deleteConditionEnabled}=this.state;if(deleteConditionEnabled){external_osdSharedDeps_Lodash_default.a.set(policy,"deletion.condition.max_age",maxAgeNum+maxAgeUnit)}else{delete policy.deletion}if(deletionScheduleEnabled){external_osdSharedDeps_Lodash_default.a.set(policy,"deletion.schedule.cron.timezone",external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.timezone"))}
6else{var _policy$deletion2;(_policy$deletion2=policy.deletion)===null||_policy$deletion2===void 0||delete _policy$deletion2.schedule}if(!showNotification(policy)){delete policy.notification}return policy});CreateSnapshotPolicy_defineProperty(this,"onIndicesSelectionChange",selectedOptions=>{const selectedIndexOptions=selectedOptions.map(o=>o.label);this.setState({policy:this.setPolicyHelper("snapshot_config.indices",selectedIndexOptions.toString()),selectedIndexOptions:selectedOptions})});CreateSnapshotPolicy_defineProperty(this,"onRepoSelectionChange",e=>{const selectedRepo=e.target.value;let repoError="";if(!selectedRepo){repoError=ERROR_PROMPT.REPO}this.setState({policy:this.setPolicyHelper("snapshot_config.repository",selectedRepo),selectedRepoValue:selectedRepo,repoError:repoError})});CreateSnapshotPolicy_defineProperty(this,"onCreateOption",(searchValue,options)=>{const normalizedSearchValue=searchValue.trim().toLowerCase();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(options.findIndex(option=>option.label.trim().toLowerCase()===normalizedSearchValue)===-1){this.setState({indexOptions:[...this.state.indexOptions,newOption]})}const selectedIndexOptions=[...this.state.selectedIndexOptions,newOption];this.setState({selectedIndexOptions:selectedIndexOptions,policy:this.setPolicyHelper("snapshot_config.indices",selectedIndexOptions.map(option=>option.label).join(", "))})});CreateSnapshotPolicy_defineProperty(this,"getChannels",async()=>{this.setState({loadingChannels:true});try{const{notificationService:notificationService}=this.props;const response=await notificationService.getChannels();if(response.ok){this.setState({channels:response.response.channel_list})}else{this.context.notifications.toasts.addDanger(`Could not load notification channels: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the notification channels"))}this.setState({loadingChannels:false})});CreateSnapshotPolicy_defineProperty(this,"onChangeChannelId",e=>{const channelId=e.target.value;this.setState({policy:this.setPolicyHelper("notification.channel.id",channelId)})});CreateSnapshotPolicy_defineProperty(this,"onChangeMaxCount",e=>{const maxCount=isNaN(parseInt(e.target.value))?undefined:parseInt(e.target.value);this.setState({policy:this.setPolicyHelper("deletion.condition.max_count",maxCount)})});CreateSnapshotPolicy_defineProperty(this,"onChangeMinCount",e=>{const minCount=isNaN(parseInt(e.target.value))?undefined:parseInt(e.target.value);let isMinCountValid="";if(!minCount||minCount<1){isMinCountValid="Min count should be bigger than 0."}this.setState({policy:this.setPolicyHelper("deletion.condition.min_count",minCount),minCountError:isMinCountValid})});CreateSnapshotPolicy_defineProperty(this,"onChangePolicyName",e=>{this.setState({policyId:e.target.value})});CreateSnapshotPolicy_defineProperty(this,"onChangeDescription",e=>{this.setState({policy:this.setPolicyHelper("description",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeCreationExpression",e=>{this.setState({policy:this.setPolicyHelper("creation.schedule.cron.expression",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeDeletionExpression",e=>{this.setState({policy:this.setPolicyHelper("deletion.schedule.cron.expression",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeCreationTimezone",e=>{this.setState({policy:this.setPolicyHelper("creation.schedule.cron.timezone",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeDeletionTimezone",e=>{this.setState({policy:this.setPolicyHelper("deletion.schedule.cron.timezone",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeIndices",e=>{this.setState({policy:this.setPolicyHelper("snapshot_config.indices",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onChangeRepository",e=>{this.setState({policy:this.setPolicyHelper("snapshot_config.repository",e.target.value)})});CreateSnapshotPolicy_defineProperty(this,"onIncludeGlobalStateToggle",e=>{this.setState({policy:this.setPolicyHelper("snapshot_config.include_global_state",e.target.checked)})});CreateSnapshotPolicy_defineProperty(this,"onIgnoreUnavailableToggle",e=>{this.setState({policy:this.setPolicyHelper("snapshot_config.ignore_unavailable",e.target.checked)})});CreateSnapshotPolicy_defineProperty(this,"onPartialToggle",e=>{this.setState({policy:this.setPolicyHelper("snapshot_config.partial",e.target.checked)})});CreateSnapshotPolicy_defineProperty(this,"setPolicyHelper",(path,newValue)=>external_osdSharedDeps_Lodash_default.a.set(this.state.policy,path,newValue));const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={...this.state,policy:getDefaultSMPolicy(),policyId:"",policySeqNo:undefined,policyPrimaryTerm:undefined,isSubmitting:false,channels:[],loadingChannels:false,indexOptions:DEFAULT_INDEX_OPTIONS,selectedIndexOptions:[],repositories:[],selectedRepoValue:"",maxAgeNum:1,maxAgeUnit:"d",creationScheduleFrequencyType:"daily",deletionScheduleFrequencyType:"daily",deleteConditionEnabled:false,deletionScheduleEnabled:false,advancedSettingsOpen:false,showCreateRepoFlyout:false,policyIdError:"",repoError:"",minCountError:"",timezoneError:"",useNewUX:useNewUx}}async componentDidMount(){if(this.props.isEdit){const{id:id}=query_string_default.a.parse(this.props.location.search);
6if(typeof id==="string"&&!!id){const breadCrumbs=this.state.useNewUX?[constants["f"].SNAPSHOT_POLICIES,{text:id}]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOT_POLICIES,constants["f"].EDIT_SNAPSHOT_POLICY,{text:id}];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getPolicy(id)}else{this.context.notifications.toasts.addDanger(`Invalid policy id: ${id}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}}else{const breadCrumbs=this.state.useNewUX?[constants["f"].SNAPSHOT_POLICIES,constants["f"].CREATE_SNAPSHOT_POLICY]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOT_POLICIES,constants["f"].CREATE_SNAPSHOT_POLICY];this.context.chrome.setBreadcrumbs(breadCrumbs)}this.updateOptions()}async updateOptions(){await this.getIndexOptions("");await this.getRepos();await this.getChannels()}static getQueryObjectFromState(_ref){let{dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref;return{...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}resetState(){this.setState({policy:getDefaultSMPolicy(),policyId:"",policySeqNo:undefined,policyPrimaryTerm:undefined,isSubmitting:false,channels:[],loadingChannels:false,indexOptions:DEFAULT_INDEX_OPTIONS,selectedIndexOptions:[],repositories:[],selectedRepoValue:"",maxAgeNum:1,maxAgeUnit:"d",creationScheduleFrequencyType:"daily",deletionScheduleFrequencyType:"daily",deleteConditionEnabled:false,deletionScheduleEnabled:false,advancedSettingsOpen:false,showCreateRepoFlyout:false,policyIdError:"",repoError:"",minCountError:"",timezoneError:""})}async componentDidUpdate(prevProps,prevState){const prevQuery=CreateSnapshotPolicy_CreateSnapshotPolicy.getQueryObjectFromState(prevState);const currQuery=CreateSnapshotPolicy_CreateSnapshotPolicy.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){this.resetState();this.updateOptions()}}render(){var _$get;const{isEdit:isEdit}=this.props;const{policy:policy,policyId:policyId,isSubmitting:isSubmitting,channels:channels,loadingChannels:loadingChannels,indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,repositories:repositories,selectedRepoValue:selectedRepoValue,maxAgeNum:maxAgeNum,maxAgeUnit:maxAgeUnit,creationScheduleFrequencyType:creationScheduleFrequencyType,deletionScheduleFrequencyType:deletionScheduleFrequencyType,deleteConditionEnabled:deleteConditionEnabled,deletionScheduleEnabled:deletionScheduleEnabled,advancedSettingsOpen:advancedSettingsOpen,showCreateRepoFlyout:showCreateRepoFlyout,policyIdError:policyIdError,repoError:repoError,minCountError:minCountError,timezoneError:timezoneError}=this.state;const repoOptions=repositories.map(r=>({value:r.id,text:r.id}));const rententionEnableRadios=[{id:"retention_disabled",label:"Retain all snapshots"},{id:"retention_enabled",label:"Specify retention conditions"}];const subTitleText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Snapshot policies allow you to define an automated snapshot schedule and retention period."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["G"],target:"_blank",rel:"noopener noreferrer"},"Learn more")));const showNotificationChannel=showNotification(policy);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Snapshot policies allow you to define an automated snapshot schedule and retention period.",links:{label:"Learn more",href:constants["G"],iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const padding_style=this.state.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},this.state.useNewUX?external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,isEdit?"Edit":"Create"," policy")),subTitleText,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Policy settings"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Policy name"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!policyIdError,error:policyIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{placeholder:"e.g. daily-snapshot",value:policyId,onChange:this.onChangePolicyName,disabled:isEdit})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Description",isOptional:true}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextArea"],{compressed:true,value:external_osdSharedDeps_Lodash_default.a.get(policy,"description",""),onChange:this.onChangeDescription,placeholder:"Snapshot management daily policy.","data-test-subj":"description"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Source and destination"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotIndicesRepoInput,{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,onIndicesSelectionChange:this.onIndicesSelectionChange,getIndexOptions:this.getIndexOptions,onCreateOption:this.onCreateOption,repoOptions:repoOptions,selectedRepoValue:selectedRepoValue,onRepoSelectionChange:this.onRepoSelectionChange,showFlyout:showCreateRepoFlyout,openFlyout:()=>{this.setState({showCreateRepoFlyout:true})},closeFlyout:()=>{this.setState({showCreateRepoFlyout:false})},createRepo:this.createRepo,snapshotManagementService:this.props.snapshotManagementService,repoError:repoError})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Snapshot schedule"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(components_CronSchedule,{frequencyTitle:"Snapshot frequency",frequencyType:creationScheduleFrequencyType,onCh
6angeFrequencyType:e=>{const frequencyType=e.target.value;let maxAgeUnitToChange=maxAgeUnit;if(frequencyType=="hourly"&&!deleteConditionEnabled){maxAgeUnitToChange="h"}this.setState({creationScheduleFrequencyType:e.target.value,maxAgeUnit:maxAgeUnitToChange})},showTimezone:true,timezone:external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.timezone"),onChangeTimezone:timezone=>{this.setState({policy:this.setPolicyHelper("creation.schedule.cron.timezone",timezone)})},timezoneError:timezoneError,cronExpression:external_osdSharedDeps_Lodash_default.a.get(policy,"creation.schedule.cron.expression",""),onCronExpressionChange:expression=>{this.setState({policy:this.setPolicyHelper("creation.schedule.cron.expression",expression)})}})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Retention period"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:rententionEnableRadios,idSelected:deleteConditionEnabled?"retention_enabled":"retention_disabled",onChange:id=>{this.setState({deleteConditionEnabled:id==="retention_enabled"})}}),deleteConditionEnabled?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Maximum age of snapshots retained"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{value:maxAgeNum,min:1,onChange:e=>{this.setState({maxAgeNum:parseInt(e.target.value)})}})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:100}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedSelect"],{options:maxAgeUnitOptions,value:maxAgeUnit,onChange:e=>{this.setState({maxAgeUnit:e.target.value})}}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"additional_delete_conditions",buttonContent:"Additional settings"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"Number of snapshots retained"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexStart"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Minimum"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!minCountError,error:minCountError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,value:(_$get=external_osdSharedDeps_Lodash_default.a.get(policy,"deletion.condition.min_count"))!==null&&_$get!==void 0?_$get:"1",onChange:this.onChangeMinCount}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Maximum",isOptional:true}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{min:1,value:external_osdSharedDeps_Lodash_default.a.get(policy,"deletion.condition.max_count",""),onChange:this.onChangeMaxCount})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"Deletion frequency"),external_osdSharedDeps_React_default.a.createElement("span",{style:{color:"grey",fontWeight:200,fontSize:"12px"}},"Configure when to check retention conditions and delete snapshots."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"delete_schedule_checkbox",label:"Same as snapshot frequency",checked:!deletionScheduleEnabled,onChange:e=>{this.setState({deletionScheduleEnabled:!deletionScheduleEnabled})}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}
6),deletionScheduleEnabled?external_osdSharedDeps_React_default.a.createElement(components_CronSchedule,{frequencyTitle:"Deletion frequency",frequencyType:deletionScheduleFrequencyType,onChangeFrequencyType:e=>{this.setState({deletionScheduleFrequencyType:e.target.value})},timezone:undefined,cronExpression:external_osdSharedDeps_Lodash_default.a.get(policy,"deletion.schedule.cron.expression",""),onCronExpressionChange:expression=>{this.setState({policy:this.setPolicyHelper("deletion.schedule.cron.expression",expression)})}}):null)):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Notifications"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Notify on snapshot activities")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"notification-creation",label:"When a snapshot has been created.",checked:getNotifyCreation(policy),onChange:e=>{this.setState({policy:this.setPolicyHelper("notification.conditions.creation",e.target.checked)})}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"notification-deletion",label:"When a snapshots has been deleted.",checked:getNotifyDeletion(policy),onChange:e=>{this.setState({policy:this.setPolicyHelper("notification.conditions.deletion",e.target.checked)})}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"notification-failure",label:"When a snapshot has failed.",checked:getNotifyFailure(policy),onChange:e=>{this.setState({policy:this.setPolicyHelper("notification.conditions.failure",e.target.checked)})}}),showNotificationChannel?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_Notification,{channelId:external_osdSharedDeps_Lodash_default.a.get(policy,"notification.channel.id")||"",channels:channels,loadingChannels:loadingChannels,onChangeChannelId:this.onChangeChannelId,getChannels:this.getChannels})):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexStart",alignItems:"center",gutterSize:"none"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:advancedSettingsOpen?"arrowDown":"arrowRight",color:"text",onClick:()=>{this.setState({advancedSettingsOpen:!this.state.advancedSettingsOpen})},"aria-label":"drop down icon"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings ",external_osdSharedDeps_React_default.a.createElement("i",null,"â optional"))))),advancedSettingsOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotAdvancedSettings,{includeGlobalState:getIncludeGlobalState(policy),onIncludeGlobalStateToggle:this.onIncludeGlobalStateToggle,ignoreUnavailable:getIgnoreUnavailabel(policy),onIgnoreUnavailableToggle:this.onIgnoreUnavailableToggle,partial:getAllowPartial(policy),onPartialToggle:this.onPartialToggle,width:"200%"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onClickCancel},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onClickSubmit,isLoading:isSubmitting}
6,isEdit?"Update":"Create"))))}}CreateSnapshotPolicy_defineProperty(CreateSnapshotPolicy_CreateSnapshotPolicy,"contextType",core_services["b"]);var containers_CreateSnapshotPolicy_CreateSnapshotPolicy=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreateSnapshotPolicy_CreateSnapshotPolicy,CreateSnapshotPolicy_extends({},props,dataSourceMenuProps))};var containers_CreateSnapshotPolicy=containers_CreateSnapshotPolicy_CreateSnapshotPolicy;var pages_CreateSnapshotPolicy=containers_CreateSnapshotPolicy;var components_CreateRepositoryFlyout=components_CreateRepositoryFlyout_CreateRepositoryFlyout;function Repositories_components_DeleteModal_DeleteModal_defineProperty(e,r,t){return(r=Repositories_components_DeleteModal_DeleteModal_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Repositories_components_DeleteModal_DeleteModal_toPropertyKey(t){var i=Repositories_components_DeleteModal_DeleteModal_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Repositories_components_DeleteModal_DeleteModal_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Repositories_components_DeleteModal_DeleteModal_DeleteModal extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);Repositories_components_DeleteModal_DeleteModal_defineProperty(this,"onChange",e=>{this.setState({confirmDeleteText:e.target.value})});let confirmDeleteText="delete";if(props.confirmation)confirmDeleteText="";this.state={confirmDeleteText:confirmDeleteText}}render(){const{type:type,ids:ids,closeDeleteModal:closeDeleteModal,onClickDelete:onClickDelete,addtionalWarning:addtionalWarning,confirmation:confirmation}=this.props;const{confirmDeleteText:confirmDeleteText}=this.state;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiConfirmModal"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete ",type)),onCancel:closeDeleteModal,onConfirm:()=>{onClickDelete();closeDeleteModal()},cancelButtonText:"Cancel",confirmButtonText:`Delete ${type}`,buttonColor:"danger",defaultFocusedButton:"confirm",confirmButtonDisabled:confirmDeleteText!="delete"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiForm"],null,external_osdSharedDeps_React_default.a.createElement("p",null,'Delete "',external_osdSharedDeps_React_default.a.createElement("strong",null,ids),'" permanently? ',addtionalWarning),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),!!confirmation&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{helpText:`To confirm deletion, type "delete".`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:confirmDeleteText,placeholder:"delete",onChange:this.onChange,"data-test-subj":"deleteTextField"})))))}}var Repositories_components_DeleteModal=Repositories_components_DeleteModal_DeleteModal_DeleteModal;function Repositories_extends(){return Repositories_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Repositories_extends.apply(null,arguments)}function Repositories_defineProperty(e,r,t){return(r=Repositories_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Repositories_toPropertyKey(t){var i=Repositories_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Repositories_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Repositories_Repositories extends components_MDSEnabledComponent{constructor(props){super(props);Repositories_defineProperty(this,"columns",void 0);Repositories_defineProperty(this,"getRepos",async()=>{this.setState({loading:true});try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.catRepositories();if(response.ok){this.setState({loading:false});this.setState({repositories:response.response})}else{this.setState({loading:false});this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.setState({loading:false});this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the repositories."))}});Repositories_defineProperty(this,"createRepo",async(repoName,repoType,settings)=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const createRepoBody={type:repoType,settings:settings};const response=await snapshotManagementService.createRepository(repoName,createRepoBody);if(response.ok){this.setState({showFlyout:false});let toastMsgPre="Created";if(!!this.state.editRepo){toastMsgPre="Edited"}this.context.notifications.toasts.addSuccess(`${toastMsgPre} repository ${repoName}.`);await this.getRepos()}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem creating the repository."))}});Repositories_defineProperty(this,"deleteRepo",async repoName=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.deleteRepository(repoName);if(response.ok){this.context.notifications.toasts.addSuccess(`Deleted repository ${repoName}.`)}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem deleting the repository."))}});Repositories_defineProperty(this,"onClickDelete",async()=>{const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const repoName=item.id;await this.deleteRepo(repoName)}await this.getRepos()});Repositories_defineProperty(this,"onClickCreate",()=>{this.setState({showFlyout:true,editRepo:null})});Repositories_defineProperty(this,"onClickEdit",()=>{const{selectedItems:[{id:id}]}=this.state;this.setState({showFlyout:true,editRepo:id})});Repositories_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});Repositories_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});Repositories_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});Repositories_defineProperty(this,"getSelectedIds",()=>this.state.selectedItems.map(item=>item.id).join(", "));Repositories_defineProperty(this,"getSelectedSnapshotCounts",()=>this.state.selectedItems.map(item=>item.snapshotCount).join(", "));const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");this.state={...this.state,repositories:[],loading:false,selectedItems:[],showFlyout:false,isPopoverOpen:false,editRepo:null,isDeleteModalVisible:false,useNewUX:useNewUX};this.columns=[{field:"id",name:"Repository name",sortable:true,dataType:"string",width:"15%",align:"left",render:(value,item)=>truncateSpan(value,30)},{field:"type",name:"Type",sortable:true,dataType:"string",width:"10%"},{field:"snapshotCount",name:"Snapshot count",sortable:true,width:"80%"}]}async componentDidMount(){const breadCrumbs=this.state.useNewUX?[constants["f"].SNAPSHOT_REPOSITORIES]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].REPOSITORIES];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getRepos()}async componentDidUpdate(prevProps,prevState){const prevQuery=Repositories_Repositories.getQueryObjectFromState(prevState);const currQuery=Repositories_Repositories.getQueryObjectFromState(this.state);if(!_.isEqual(prevQuery,currQuery)){await this.getRepos()}}static getQueryObjectFromState(_ref){let{dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref;return{...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){const{repositories:repositories,loading:loading,selectedItems:selectedItems,showFlyout:showFlyout,isPopoverOpen:isPopoverOpen,editRepo:editRepo,isDeleteModalVisible:isDeleteModalVisible,useNewUX:useNewUX}=this.state;const popoverActionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",disabled:selectedItems.length!=1,"data-test-subj":"editButton",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"danger"},"Delete"))];const popoverButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})},"data-test-subj":"actionButton"},"Actions");const actions=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getRepos,"data-test-subj":"refreshButton"},"Refresh"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.showDeleteModal,"data-test-subj":"deleteButton",color:"danger"},"Delete"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onClickCreate,fill:true,iconType:"plus"},"Create repository")];const renderToolsRight=()=>[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:this.getRepos,"data-test-subj":"refreshButton","aria-label":"refresh",size:"s",display:"base"})))];const renderToolsLeft=()=>[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"trash",iconSide:"left",iconSize:"s",disabled:!selectedItems.length,onClick:this.showDeleteModal,"data-test-subj":"deleteButton","aria-label":"delete",color:"danger",minWidth:75},"Delete")];const search={toolsRight:useNewUX?renderToolsRight():undefined,toolsLeft:useNewUX?renderToolsLeft():undefined,box:{placeholder:"Search repository",compressed:true,increamental:true},compressed:true,filters:[{type:"field_value_selection",field:"type",name:"Type",options:repositories.map(repo=>({value:repo.type})),multiSelect:"or"}]};const subTitleText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Repositories are remote storage locations used to store snapshots."));
6let additionalWarning=`You have ${this.getSelectedSnapshotCounts()} snapshots`;if(selectedItems.length>1){additionalWarning+=" in these repositories respectively."}else{additionalWarning+=" in the repository."}const descriptionData=[{description:"Repositories are remote storage locations used to store snapshots."}];const controlControlsData=[{id:"Create repository",label:"Create repository",iconType:"plus",fill:true,run:this.onClickCreate,testId:"createRepo",controlType:"button"}];const repositoriesTable=()=>!useNewUX?external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:useTitle,actions:useActions,subTitleText:useSubTitleText},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:repositories,itemId:"id",columns:this.columns,pagination:true,isSelectable:true,selection:{onSelectionChange:selectedItems=>this.setState({selectedItems:selectedItems})},search:search,loading:loading})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:repositories,itemId:"id",columns:this.columns,pagination:true,isSelectable:true,selection:{onSelectionChange:selectedItems=>this.setState({selectedItems:selectedItems})},search:search,loading:loading}));const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const useTitle=useNewUX?undefined:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Repositories"));const useActions=useNewUX?undefined:actions;const useSubTitleText=useNewUX?undefined:subTitleText;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlControlsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData})):null,repositoriesTable(),showFlyout&&external_osdSharedDeps_React_default.a.createElement(components_CreateRepositoryFlyout,{service:this.props.snapshotManagementService,editRepo:editRepo,createRepo:this.createRepo,onCloseFlyout:()=>{this.setState({showFlyout:false})}}),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(Repositories_components_DeleteModal,{type:"repository",ids:this.getSelectedIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete,confirmation:true,addtionalWarning:additionalWarning}))}}Repositories_defineProperty(Repositories_Repositories,"contextType",core_services["b"]);var containers_Repositories_Repositories=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(Repositories_Repositories,Repositories_extends({},props,dataSourceMenuProps))};var containers_Repositories=containers_Repositories_Repositories;var pages_Repositories=containers_Repositories;const SnapshotPolicies_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const SnapshotPolicies_constants_DEFAULT_QUERY_PARAMS={from:0,size:20,sortOrder:constants["I"].DESC,search:""};const PROMPT_TEXT={NO_POLICIES:"There are no existing policies.",LOADING:"Loading policies..."};function getSMPoliciesQueryParamsFromURL(location){const{from:from,size:size,sortField:sortField,sortOrder:sortOrder,search:search}=query_string_default.a.parse(location.search);return{from:isNaN(parseInt(from,10))?SnapshotPolicies_constants_DEFAULT_QUERY_PARAMS.from:parseInt(from,10),size:isNaN(parseInt(size,10))?SnapshotPolicies_constants_DEFAULT_QUERY_PARAMS.size:parseInt(size,10),search:typeof search!=="string"?SnapshotPolicies_constants_DEFAULT_QUERY_PARAMS.search:search,sortField:typeof sortField!=="str
6ing"?"name":sortField,sortOrder:typeof sortOrder!=="string"?SnapshotPolicies_constants_DEFAULT_QUERY_PARAMS.sortOrder:sortOrder}}const helpers_getMessagePrompt=loading=>{if(loading)return PROMPT_TEXT.LOADING;return PROMPT_TEXT.NO_POLICIES};const renderTimestampMillis=time=>{if(time==null)return"-";const momentTime=external_osdSharedDeps_Moment_default()(time).local();if(time&&momentTime.isValid())return momentTime.format("MM/DD/YY h:mm a");return"-"};const renderTimestampSecond=time=>{const momentTime=external_osdSharedDeps_Moment_default.a.unix(time).local();if(time&&momentTime.isValid())return momentTime.format("MM/DD/YY h:mm a");return"-"};var PolicyDetails_components_DeleteModal=DeleteModal_DeleteModal;function SnapshotPolicies_extends(){return SnapshotPolicies_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SnapshotPolicies_extends.apply(null,arguments)}function SnapshotPolicies_defineProperty(e,r,t){return(r=SnapshotPolicies_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SnapshotPolicies_toPropertyKey(t){var i=SnapshotPolicies_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SnapshotPolicies_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SnapshotPolicies_SnapshotPolicies extends components_MDSEnabledComponent{constructor(props){super(props);SnapshotPolicies_defineProperty(this,"columns",void 0);SnapshotPolicies_defineProperty(this,"getPolicies",async()=>{this.setState({loadingPolicies:true});try{const{snapshotManagementService:snapshotManagementService,history:history}=this.props;const queryParamsObject=SnapshotPolicies_SnapshotPolicies.getQueryObjectFromState(this.state);const queryParamsString=query_string_default.a.stringify(queryParamsObject);history.replace({...this.props.location,search:queryParamsString});const response=await snapshotManagementService.getPolicies({...queryParamsObject});if(response.ok){const{policies:policies,totalPolicies:totalPolicies}=response.response;this.setState({policies:policies.map(p=>p.policy),totalPolicies:totalPolicies})}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshot policies."))}this.setState({loadingPolicies:false})});SnapshotPolicies_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});SnapshotPolicies_defineProperty(this,"onTableChange",criteria=>{const{from:prevFrom,size:prevSize,sortField:sortField,sortOrder:sortOrder}=this.state;const{page:{index:index,size:size}={},sort:{field:field,direction:direction}={}}=criteria;const from=index!==undefined?size?index*size:prevFrom:prevFrom;this.setState({from:from,size:size!==null&&size!==void 0?size:prevSize,sortField:field!==null&&field!==void 0?field:sortField,sortOrder:direction!==null&&direction!==void 0?direction:sortOrder})});SnapshotPolicies_defineProperty(this,"onClickCreate",()=>{this.props.history.push(constants["D"].CREATE_SNAPSHOT_POLICY)});SnapshotPolicies_defineProperty(this,"onSearchChange",_ref=>{let{query:query,queryText:queryText,error:error}=_ref;if(error){return}this.setState({from:0,queryString:queryText,query:query})});SnapshotPolicies_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});SnapshotPolicies_defineProperty(this,"onClickEdit",()=>{const{selectedItems:[{name:name}]}=this.state;if(name)this.props.history.push(`${constants["D"].EDIT_SNAPSHOT_POLICY}?id=${name}`)});SnapshotPolicies_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});SnapshotPolicies_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});SnapshotPolicies_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})});SnapshotPolicies_defineProperty(this,"onClickDelete",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const policyId=item.name;try{const response=await snapshotManagementService.deletePolicy(policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${policyId}" successfully deleted!`)}else{this.context.notifications.toasts.addDanger(`Could not delete policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the policy"))}}this.closeDeleteModal();await this.getPolicies()});SnapshotPolicies_defineProperty(this,"onClickStart",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const policyId=item.name;try{const response=await snapshotManagementService.startPolicy(policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${policyId}" successfully started!`)}else{this.context.notifications.toasts.addDanger(`Could not start policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not start the policy"))}}external_osdSharedDeps_Lodash_default.a.delay(this.getPolicies,1e3)});SnapshotPolicies_defineProperty(this,"onClickStop",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){const policyId=item.name;try{const response=await snapshotManagementService.stopPolicy(policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${policyId}" successfully stopped!`)}else{this.context.notifications.toasts.addDanger(`Could not stop policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not stop the policy"))}}external_osdSharedDeps_Lodash_default.a.delay(this.getPolicies,1e3)});SnapshotPolicies_defineProperty(this,"getSelectedPolicyIds",()=>this.state.selectedItems.map(item=>item.name).join(", "));const{from:_from,size:_size,sortField:_sortField,sortOrder:_sortOrder}=getSMPoliciesQueryParamsFromURL(this.props.location);const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={...this.state,policies:[],totalPolicies:0,loadingPolicies:false,query:null,queryString:"",from:_from,size:_size,sortField:_sortField,sortOrder:_sortOrder,selectedItems:[],showFlyout:false,policyClicked:null,isPopoverOpen:false,isDeleteModalVisible:false,useNewUx:useNewUx};this.columns=[{field:"name",name:"Policy name",sortable:true,dataType:"string",render:(name,item)=>
6{const showSymbol=external_osdSharedDeps_Lodash_default.a.truncate(name,{length:60});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.props.history.push(`${constants["D"].SNAPSHOT_POLICY_DETAILS}?id=${name}`)},external_osdSharedDeps_React_default.a.createElement("span",{title:name},showSymbol))}},{field:"enabled",name:"Status",sortable:true,dataType:"boolean",width:"100px",render:(name,item)=>{if(item.enabled){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:"success"},"Enabled")}else{return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:"danger"},"Disabled")}}},{field:"snapshot_config.indices",name:"Indices",sortable:false,dataType:"string",render:(value,item)=>truncateSpan(value,60)},{field:"creation.schedule.cron.expression",name:"Snapshot schedule",sortable:false,dataType:"string",width:"180px",render:(name,item)=>{const expression=name;const timezone=item.creation.schedule.cron.timezone;return`${humanCronExpression(parseCronExpression(expression),expression,timezone)}`}},{field:"last_updated_time",name:"Time last updated",sortable:true,dataType:"date",width:"150px",render:renderTimestampMillis},{field:"description",name:"Description",sortable:false,dataType:"string",width:"150px",render:(value,item)=>truncateSpan(value)}]}async componentDidMount(){const breadCrumbs=this.state.useNewUx?[constants["f"].SNAPSHOT_POLICIES]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOT_POLICIES];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getPolicies()}async componentDidUpdate(prevProps,prevState){const prevQuery=SnapshotPolicies_SnapshotPolicies.getQueryObjectFromState(prevState);const currQuery=SnapshotPolicies_SnapshotPolicies.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getPolicies()}}static getQueryObjectFromState(_ref2){let{from:from,size:size,sortField:sortField,sortOrder:sortOrder,queryString:queryString,multiDataSourceEnabled:multiDataSourceEnabled,dataSourceId:dataSourceId}=_ref2;return{from:from,size:size,sortField:sortField,sortOrder:sortOrder,queryString:queryString,...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){const{policies:policies,totalPolicies:totalPolicies,loadingPolicies:loadingPolicies,from:from,size:size,sortField:sortField,sortOrder:sortOrder,selectedItems:selectedItems,isPopoverOpen:isPopoverOpen,isDeleteModalVisible:isDeleteModalVisible}=this.state;const page=Math.floor(from/size);const pagination={pageIndex:page,pageSize:size,pageSizeOptions:SnapshotPolicies_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:totalPolicies};const sorting={sort:{direction:sortOrder,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const popoverActionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",disabled:selectedItems.length!=1,"data-test-subj":"editButton",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],null,"Delete"))];const popoverActionItemsNew=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{disabled:!selectedItems.length,onClick:()=>{this.closePopover();this.onClickStart()}},"Enable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{disabled:!selectedItems.length,onClick:()=>{this.closePopover();this.onClickStop()}},"Disable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Edit",disabled:selectedItems.length!=1,"data-test-subj":"editButton",onClick:()=>{this.closePopover();this.onClickEdit()}},"Edit"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteButton",onClick:()=>{this.closePopover();this.showDeleteModal()}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],null,"Delete"))];const actionsButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const actions=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getPolicies,"data-test-subj":"refreshButton"},"Refresh"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.onClickStop},"Disable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.onClickStart},"Enable"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionsButton,isOpen:isPopoverOpen,closePopover:this.closePopover,panelPaddingSize:"s",anchorPosition:"downLeft","data-test-subj":"actionPopover"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:popoverActionItems,size:"s"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onClickCreate,fill:true,iconType:"plus"},"Create policy")];const subTitleText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Define an automated snapshot schedule and retention period with a snapshot policy."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["G"],target:"_blank",rel:"noopener noreferrer"},"Learn more")));const promptMessage=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{style:{maxWidth:"45em"},body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,helpers_getMessagePrompt(loadingPolicies))),actions:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onClickCreate,fill:true,iconType:"plus"},"Create policy")});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Define an automated snapshot schedule and retention period with a snapshot policy.",links:{label:"Learn more",href:constants["G"],iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const controlControlsData=[{id:"Create policy",label:"Create policy",iconType:"plus",fill:true,run:this.onClickCreate,testId:"createButton",controlType:"button"}];const CommonTable=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:policies,itemId:"name",columns:this.columns,pagination:pagination,sorting:sorting,isSelectable:true,selection:selection,onChange:this.onTableChange,noItemsMessage:promptMessage});const CommonModal=()=>isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(PolicyDetails_components_DeleteModal,{policyId:this.getSelectedPolicyIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete});return!this.state.useNewUx?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Snapshot policies")),actions:actions,subTitleText:subTitleText},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{placeholder:"Search snapshot policies",incremental:false,fullWidth:true,onChange:this.onSearchChange}),CommonTable()),CommonModal()):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlControlsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{autoFocus:true,placeholder:"Search snapshot policies",incremental:false,onChange:this.onSearchChange,"aria-label":"Search snapshot policies",fullWidth:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:this.getPolicies,"aria-label":"refresh",size:"s",display:"base"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionsButton,isOpen:isPopoverOpen,closePopover:this.closePopover,anchorPosition:"downRight",panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{items:popoverActionItemsNew,size:"s"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),CommonTable()),CommonModal())}}SnapshotPolicies_defineProperty(SnapshotPolicies_SnapshotPolicies,"contextType",core_services["b"]);var containers_SnapshotPolicies_SnapshotPolicies=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(Snapsh
6otPolicies_SnapshotPolicies,SnapshotPolicies_extends({},props,dataSourceMenuProps))};var containers_SnapshotPolicies=containers_SnapshotPolicies_SnapshotPolicies;var pages_SnapshotPolicies=containers_SnapshotPolicies;const InfoModal_InfoModal_InfoModal=_ref=>{let{info:info,onClose:onClose}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose,maxWidth:1e3},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",fontSize:"m"},JSON.stringify(info,null,4))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onClose,"data-test-subj":"infoModalCloseButton"},"Close"))))};var components_InfoModal_InfoModal=InfoModal_InfoModal_InfoModal;var SnapshotPolicyDetails_components_InfoModal=components_InfoModal_InfoModal;function SnapshotPolicyDetails_extends(){return SnapshotPolicyDetails_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SnapshotPolicyDetails_extends.apply(null,arguments)}function SnapshotPolicyDetails_defineProperty(e,r,t){return(r=SnapshotPolicyDetails_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SnapshotPolicyDetails_toPropertyKey(t){var i=SnapshotPolicyDetails_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SnapshotPolicyDetails_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SnapshotPolicyDetails_SnapshotPolicyDetails extends components_MDSEnabledComponent{constructor(props){super(props);SnapshotPolicyDetails_defineProperty(this,"columns",void 0);SnapshotPolicyDetails_defineProperty(this,"getPolicy",async policyId=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.getPolicy(policyId);if(response.ok&&!response.response){let errorMessage="policy doesn't exist";this.context.notifications.toasts.addDanger(`Could not load the policy: ${errorMessage}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES);return}if(response.ok&&!!response.response.policy){this.setState({policy:response.response.policy,policyId:response.response.id,metadata:response.response.metadata})}else{let errorMessage=response.ok?"Policy was empty":response.error;this.context.notifications.toasts.addDanger(`Could not load the policy: ${errorMessage}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}}catch(err){this.context.notifications.toasts.addDanger(`Could not load the policy`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}});SnapshotPolicyDetails_defineProperty(this,"getChannel",async channelId=>{try{const{notificationService:notificationService}=this.props;const response=await notificationService.getChannel(channelId);if(response.ok){const configList=response.response.config_list;let channel=null;if(configList.length==1)channel=configList[0];this.setState({channel:channel})}else{this.context.notifications.toasts.addDanger(`Could not load notification channel: ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not load the notification channel"))}});SnapshotPolicyDetails_defineProperty(this,"onClickStop",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const policyId=this.state.policyId;try{const response=await snapshotManagementService.stopPolicy(policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${policyId}" successfully stopped!`)}else{this.context.notifications.toasts.addDanger(`Could not stop policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not stop the policy"))}this.componentDidMount()});SnapshotPolicyDetails_defineProperty(this,"onClickStart",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const policyId=this.state.policyId;try{const response=await snapshotManagementService.startPolicy(policyId);if(response.ok){this.context.notifications.toasts.addSuccess(`"${policyId}" successfully started!`)}else{this.context.notifications.toasts.addDanger(`Could not start policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not start the policy"))}this.componentDidMount()});
6SnapshotPolicyDetails_defineProperty(this,"onClickPolicyStatusChange",async()=>{var _this$state$policy;return(_this$state$policy=this.state.policy)!==null&&_this$state$policy!==void 0&&_this$state$policy.enabled?this.onClickStop():this.onClickStart()});SnapshotPolicyDetails_defineProperty(this,"onEdit",()=>{const{policyId:policyId}=this.state;if(policyId){this.props.history.push(`${constants["D"].EDIT_SNAPSHOT_POLICY}?id=${policyId}`)}});SnapshotPolicyDetails_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});SnapshotPolicyDetails_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});SnapshotPolicyDetails_defineProperty(this,"onClickDelete",async()=>{const{snapshotManagementService:snapshotManagementService}=this.props;const{policyId:policyId}=this.state;try{const response=await snapshotManagementService.deletePolicy(policyId);if(response.ok){this.closeDeleteModal();this.context.notifications.toasts.addSuccess(`"Policy ${policyId}" successfully deleted`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}else{this.context.notifications.toasts.addDanger(`Could not delete the policy "${policyId}" : ${response.error}`)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"Could not delete the policy"))}});SnapshotPolicyDetails_defineProperty(this,"renderEnabledField",enabled=>{if(enabled){return"Enabled"}return"Disabled"});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");this.state={...this.state,policyId:"",policy:null,metadata:null,isDeleteModalVisible:false,channel:null,useNewUX:useNewUx};this.columns=[{field:"activityType",name:"Activity type",dataType:"string"},{field:"status",name:"Status",dataType:"string"},{field:"start_time",name:"Time started",sortable:true,dataType:"date",render:renderTimestampMillis},{field:"end_time",name:"Time completed",sortable:true,dataType:"date",render:renderTimestampMillis},{field:"info",name:"Info",dataType:"auto",render:info=>{const message=external_osdSharedDeps_Lodash_default.a.get(info,"message",null);const cause=external_osdSharedDeps_Lodash_default.a.get(info,"cause",null);let showSymbol="-";if(!!message)showSymbol="message";if(!!cause)showSymbol="cause";return external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>onShow(SnapshotPolicyDetails_components_InfoModal,{info:info})},showSymbol)})}}]}async componentDidMount(){let breadCrumbs=this.state.useNewUX?[constants["f"].SNAPSHOT_POLICIES]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOT_POLICIES];this.context.chrome.setBreadcrumbs(breadCrumbs);const{id:id}=query_string_default.a.parse(this.props.location.search);if(typeof id==="string"){const breadCrumbs=this.state.useNewUX?[constants["f"].SNAPSHOT_POLICIES,{text:id}]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOT_POLICIES,{text:id}];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.getPolicy(id);const channelId=external_osdSharedDeps_Lodash_default.a.get(this.state.policy,"notification.channel.id");if(channelId){this.getChannel(channelId)}}else{this.context.notifications.toasts.addDanger(`Invalid policy id: ${id}`);this.props.history.push(constants["D"].SNAPSHOT_POLICIES)}}render(){var _metadata$creation,_metadata$creation2,_metadata$deletion2;const{policyId:policyId,policy:policy,metadata:metadata,isDeleteModalVisible:isDeleteModalVisible,channel:channel}=this.state;if(!policy){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"center",alignItems:"center",style:{marginTop:"100px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"xl"}))}const policySettingItems=[{term:"Policy name",value:truncateSpan(policyId,30)},{term:"Status",value:this.renderEnabledField(policy.enabled)},{term:"Last updated time",value:policy.last_updated_time},{term:"Indices",value:policy.snapshot_config.indices},{term:"Repository",value:policy.snapshot_config.repository},{term:"Description",value:truncateSpan(policy.description,30)}];const advancedSettingItems=[{term:"Include cluster state",value:`${getIncludeGlobalState(policy)}`},{term:"Ignore unavailable indices",value:`${getIgnoreUnavailabel(policy)}`},{term:"Allow partial snapshots",value:`${getAllowPartial(policy)}`}];const createCronExpression=policy.creation.schedule.cron.expression;const{minute:minute,hour:hour,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}=parseCronExpression(createCronExpression);const humanCron=humanCronExpression({minute:minute,hour:hour,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}
6,createCronExpression,policy.creation.schedule.cron.timezone);const snapshotScheduleItems=[{term:"Frequency",value:external_osdSharedDeps_Lodash_default.a.capitalize(frequencyType)},{term:"Cron schedule",value:humanCron},{term:"Next snapshot time",value:renderTimestampMillis(metadata===null||metadata===void 0||(_metadata$creation=metadata.creation)===null||_metadata$creation===void 0?void 0:_metadata$creation.trigger.time)}];let retentionItems=[{term:"Retention period",value:"Keep all snapshots"}];let deletionScheduleItems;if(policy.deletion!=null){var _policy$deletion$cond,_policy$deletion,_ref2,_policy$deletion2,_ref3,_policy$deletion3,_policy$deletion4;retentionItems=[{term:"Maximum age of snapshots",value:(_policy$deletion$cond=(_policy$deletion=policy.deletion)===null||_policy$deletion===void 0||(_policy$deletion=_policy$deletion.condition)===null||_policy$deletion===void 0?void 0:_policy$deletion.max_age)!==null&&_policy$deletion$cond!==void 0?_policy$deletion$cond:"-"},{term:"Minimum of snapshots retained",value:(_ref2=`${(_policy$deletion2=policy.deletion)===null||_policy$deletion2===void 0||(_policy$deletion2=_policy$deletion2.condition)===null||_policy$deletion2===void 0?void 0:_policy$deletion2.min_count}`)!==null&&_ref2!==void 0?_ref2:"-"},{term:"Maximum of snapshots retained",value:(_ref3=`${(_policy$deletion3=policy.deletion)===null||_policy$deletion3===void 0||(_policy$deletion3=_policy$deletion3.condition)===null||_policy$deletion3===void 0?void 0:_policy$deletion3.max_count}`)!==null&&_ref3!==void 0?_ref3:"-"}];const deleteCronExpression=(_policy$deletion4=policy.deletion)===null||_policy$deletion4===void 0||(_policy$deletion4=_policy$deletion4.schedule)===null||_policy$deletion4===void 0?void 0:_policy$deletion4.cron.expression;if(deleteCronExpression!=null){var _policy$deletion$sche,_policy$deletion$sche2,_metadata$deletion;const{minute:minute,hour:hour,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType}=parseCronExpression(deleteCronExpression);const humanCron=humanCronExpression({minute:minute,hour:hour,dayOfWeek:dayOfWeek,dayOfMonth:dayOfMonth,frequencyType:frequencyType},deleteCronExpression,(_policy$deletion$sche=(_policy$deletion$sche2=policy.deletion.schedule)===null||_policy$deletion$sche2===void 0?void 0:_policy$deletion$sche2.cron.timezone)!==null&&_policy$deletion$sche!==void 0?_policy$deletion$sche:"-");deletionScheduleItems=[{term:"Frequency",value:external_osdSharedDeps_Lodash_default.a.capitalize(frequencyType)},{term:"Cron schedule",value:humanCron},{term:"Next retention time",value:renderTimestampMillis(metadata===null||metadata===void 0||(_metadata$deletion=metadata.deletion)===null||_metadata$deletion===void 0?void 0:_metadata$deletion.trigger.time)}]}}const notiConditions=external_osdSharedDeps_Lodash_default.a.get(policy,"notification.conditions");let notiActivities="None";if(notiConditions){notiActivities=Object.keys(notiConditions).filter(key=>notiConditions[key]).join(", ")}let channelDetail=external_osdSharedDeps_React_default.a.createElement("p",null,"None");if(!!(channel!==null&&channel!==void 0&&channel.config.name)){channelDetail=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`notifications-dashboards#/channel-details/${channel.config_id}`,target:"_blank"},channel===null||channel===void 0?void 0:channel.config.name," (",channel===null||channel===void 0?void 0:channel.config.config_type,")")}const notificationItems=[{term:"Notify on snapshot activities",value:notiActivities},{term:"Channel",value:channelDetail}];let creationLatestActivity={activityType:"Creation"};creationLatestActivity={...creationLatestActivity,...metadata===null||metadata===void 0||(_metadata$creation2=metadata.creation)===null||_metadata$creation2===void 0?void 0:_metadata$creation2.latest_execution};let latestActivities=[creationLatestActivity];if((metadata===null||metadata===void 0||(_metadata$deletion2=metadata.deletion)===null||_metadata$deletion2===void 0?void 0:_metadata$deletion2.latest_execution)!=null){var _metadata$deleti
6on3;let deletionLatestActivity={activityType:"Deletion"};deletionLatestActivity={...deletionLatestActivity,...metadata===null||metadata===void 0||(_metadata$deletion3=metadata.deletion)===null||_metadata$deletion3===void 0?void 0:_metadata$deletion3.latest_execution};latestActivities=[...latestActivities,deletionLatestActivity]}const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls}=Object(Services["c"])();const badgeControlData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:policy.enabled?"success":"danger"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_Lodash_default.a.truncate(this.renderEnabledField(policy.enabled))))}];const padding_style=this.state.useNewUX?{padding:"0px 0px"}:{padding:"5px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},this.state.useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{iconType:"trash",testId:"deleteButton",color:"danger",ariaLabel:"delete",run:this.showDeleteModal,controlType:"icon",display:"base"},{id:"Status",label:policy.enabled?"Disable":"Enable",testId:"editButton",run:this.onClickPolicyStatusChange,controlType:"button"},{id:"Edit",label:"Edit policy",testId:"editButton",run:this.onEdit,fill:true,controlType:"button"}]}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppBadgeControls,controls:badgeControlData})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 10px"},justifyContent:"spaceBetween",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,external_osdSharedDeps_Lodash_default.a.truncate(policyId)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.onEdit},"Edit")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:this.showDeleteModal,color:"danger","data-test-subj":"deleteButton"},"Delete"))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Policy settings"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},policySettingItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"advanced_settings_items",buttonContent:"Advanced settings"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},advancedSettingItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Snapshot schedule"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},snapshotScheduleItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value)))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Snapshot retention period"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},retentionItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),deleti
6onScheduleItems!=undefined&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:3},deletionScheduleItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value)))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Notifications"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:2},notificationItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value)))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Last creation/deletion"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:()=>this.getPolicy(policyId),"data-test-subj":"refreshButton"},"Refresh"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{items:latestActivities,itemId:"name",columns:this.columns})),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(PolicyDetails_components_DeleteModal,{policyId:policyId,closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete}))}}SnapshotPolicyDetails_defineProperty(SnapshotPolicyDetails_SnapshotPolicyDetails,"contextType",core_services["b"]);var containers_SnapshotPolicyDetails_SnapshotPolicyDetails=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(Snapsh
6otPolicyDetails_SnapshotPolicyDetails,SnapshotPolicyDetails_extends({},props,dataSourceMenuProps))};var containers_SnapshotPolicyDetails=containers_SnapshotPolicyDetails_SnapshotPolicyDetails;var pages_SnapshotPolicyDetails=containers_SnapshotPolicyDetails;function SnapshotFlyout_extends(){return SnapshotFlyout_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SnapshotFlyout_extends.apply(null,arguments)}function SnapshotFlyout_defineProperty(e,r,t){return(r=SnapshotFlyout_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SnapshotFlyout_toPropertyKey(t){var i=SnapshotFlyout_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SnapshotFlyout_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SnapshotFlyout_SnapshotFlyout extends components_MDSEnabledComponent{constructor(props){super(props);SnapshotFlyout_defineProperty(this,"getSnapshot",async(snapshotId,repository)=>{const{snapshotManagementService:snapshotManagementService}=this.props;try{const response=await snapshotManagementService.getSnapshot(snapshotId,repository);if(response.ok){this.setState({snapshot:response.response})}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshot."))}});this.state={...this.state,snapshot:null}}async componentDidMount(){const{snapshotId:snapshotId,repository:repository}=this.props;
6await this.getSnapshot(snapshotId,repository)}async componentDidUpdate(prevProps,prevState){if(prevState.dataSourceId!=this.state.dataSourceId){const{snapshotId:snapshotId,repository:repository}=this.props;await this.getSnapshot(snapshotId,repository)}}render(){var _snapshot$metadata2;const{onCloseFlyout:onCloseFlyout,repository:repository}=this.props;const{snapshot:snapshot}=this.state;const items1=[{term:"Snapshot name",value:snapshot===null||snapshot===void 0?void 0:snapshot.snapshot},{term:"Status",value:snapshot===null||snapshot===void 0?void 0:snapshot.state}];const items2=[{term:"Start time",value:snapshot===null||snapshot===void 0?void 0:snapshot.start_time},{term:"End time",value:snapshot===null||snapshot===void 0?void 0:snapshot.end_time},{term:"Repository",value:repository},{term:"Policy",value:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>{var _snapshot$metadata;return this.props.history.push(`${constants["D"].SNAPSHOT_POLICY_DETAILS}?id=${snapshot===null||snapshot===void 0||(_snapshot$metadata=snapshot.metadata)===null||_snapshot$metadata===void 0?void 0:_snapshot$metadata.sm_policy}`)}},snapshot===null||snapshot===void 0||(_snapshot$metadata2=snapshot.metadata)===null||_snapshot$metadata2===void 0?void 0:_snapshot$metadata2.sm_policy)}];let error;if((snapshot===null||snapshot===void 0?void 0:snapshot.failures)!=null){error=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Error details"),external_osdSharedDeps_React_default.a.createElement("dd",null,external_osdSharedDeps_React_default.a.createElement(Modal["b"],null,_ref=>{let{onShow:onShow}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>onShow(SnapshotPolicyDetails_components_InfoModal,{info:snapshot.failures})},"failures")})))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{ownFocus:false,onClose:onCloseFlyout,maxWidth:600,size:"m",hideCloseButton:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"},snapshot===null||snapshot===void 0?void 0:snapshot.snapshot)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:2},items1.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}#${item.value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),error,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:2},items2.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.term}#${item.value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.term),external_osdSharedDeps_React_default.a.createElement("dd",null,item.value))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,"Indices"),external_osdSharedDeps_React_default.a.createElement("dd",null,snapshot===null||snapshot===void 0?void 0:snapshot.indices.join(", ")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onCloseFlyout},"Close")))}}SnapshotFlyout_defineProperty(SnapshotFlyout_SnapshotFlyout,"contextType",core_services["b"]);var components_SnapshotFlyout_SnapshotFlyout=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Snapsh
6otFlyout_SnapshotFlyout,SnapshotFlyout_extends({},props,dataSourceMenuProps))};const getEmptySnapshot=()=>({indices:"",ignore_unavailable:false,include_global_state:false,partial:false});function CreateSnapshotFlyout_extends(){return CreateSnapshotFlyout_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateSnapshotFlyout_extends.apply(null,arguments)}function CreateSnapshotFlyout_defineProperty(e,r,t){return(r=CreateSnapshotFlyout_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateSnapshotFlyout_toPropertyKey(t){var i=CreateSnapshotFlyout_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateSnapshotFlyout_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateSnapshotFlyout_CreateSnapshotFlyout extends components_MDSEnabledComponent{constructor(props){super(props);CreateSnapshotFlyout_defineProperty(this,"onClickAction",()=>{const{createSnapshot:createSnapshot}=this.props;const{snapshotId:snapshotId,selectedRepoValue:selectedRepoValue,snapshot:snapshot}=this.state;let repoError="";if(!snapshotId.trim()){this.setState({snapshotIdError:"Required"});return}if(!selectedRepoValue){repoError=ERROR_PROMPT.REPO;this.setState({repoError:repoError});return}createSnapshot(snapshotId,selectedRepoValue,snapshot)});CreateSnapshotFlyout_defineProperty(this,"onIndicesSelectionChange",selectedOptions=>{const selectedIndexOptions=selectedOptions.map(o=>o.label);let newJSON=this.state.snapshot;newJSON.indices=selectedIndexOptions.toString();this.setState({snapshot:newJSON,selectedIndexOptions:selectedOptions})});CreateSnapshotFlyout_defineProperty(this,"getIndexOptions",async searchValue=>{const{indexService:indexService}=this.props;this.setState({indexOptions:[]});try{const optionsResponse=await indexService.getDataStreamsAndIndicesNames(searchValue);if(optionsResponse.ok){const options=searchValue.trim()?[{label:Object(helpers["f"])(searchValue)},{label:searchValue}]:[];const indices=optionsResponse.response.indices.map(label=>({label:label}));this.setState({indexOptions:options.concat(indices)})}else{if(optionsResponse.error.startsWith("[index_not_found_exception]")){this.context.notifications.toasts.addDanger("No index available")}else{this.context.notifications.toasts.addDanger(optionsResponse.error)}}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem fetching index options."))}});CreateSnapshotFlyout_defineProperty(this,"onCreateOption",(searchValue,options)=>{const normalizedSearchValue=searchValue.trim().toLowerCase();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(options.findIndex(option=>option.label.trim().toLowerCase()===normalizedSearchValue)===-1){this.setState({indexOptions:[...this.state.indexOptions,newOption]})}const selectedIndexOptions=[...this.state.selectedIndexOptions,newOption];this.setState({selectedIndexOptions:selectedIndexOptions})});CreateSnapshotFlyout_defineProperty(this,"getRepos",async()=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.catRepositories();if(response.ok){const selectedRepoValue=response.response.length>0?response.response[0].id:"";this.setState({repositories:response.response,selectedRepoValue:selectedRepoValue})}else{this.context.notifications.toasts.addDanger(response.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshots."))}});CreateSnapshotFlyout_defineProperty(this,"onRepoSelectionChange",e=>{const selectedRepo=e.target.value;let repoError="";if(!selectedRepo){repoError=ERROR_PROMPT.REPO}this.setState({selectedRepoValue:selectedRepo,repoError:repoError})});CreateSnapshotFlyout_defineProperty(this,"onIncludeGlobalStateToggle",e=>{this.setState({snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,"include_global_state",e.target.checked)})});CreateSnapshotFlyout_defineProperty(this,"onIgnoreUnavailableToggle",e=>{this.setState({snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,"ignore_unavailable",e.target.checked)})});CreateSnapshotFlyout_defineProperty(this,"onPartialToggle",e=>{const{checked:checked}=e.target;let newJSON=this.state.snapshot;newJSON.partial=checked;this.setState({snapshot:newJSON})});this.state={...this.state,indexOptions:[],selectedIndexOptions:[],repositories:[],selectedRepoValue:"",snapshot:getEmptySnapshot(),snapshotId:"",repoError:"",snapshotIdError:""}}async componentDidMount(){await this.getIndexOptions("");await this.getRepos()}async componentDidUpdate(prevProps,prevState){if(prevState.dataSourceId!=this.state.dataSourceId){this.setState({indexOptions:[],selectedIndexOptions:[],repositories:[],selectedRepoValue:"",snapshot:getEmptySnapshot(),snapshotId:"",repoError:"",snapshotIdError:""});await this.getIndexOptions("");await this.getRepos()}}render(){const{onCloseFlyout:onCloseFlyout}=this.props;const{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,repositories:repositories,selectedRepoValue:selectedRepoValue,snapshot:snapsh
6ot,snapshotId:snapshotId,repoError:repoError,snapshotIdError:snapshotIdError}=this.state;const repoOptions=repositories.map(r=>({value:r.id,text:r.id}));const invalidChar=["\\","/","*","?",'"',"<",">","|"," ",","," ","#"];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{ownFocus:false,onClose:onCloseFlyout,maxWidth:600,size:"m",hideCloseButton:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"}," Create snapshot")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Snapshot name"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:!!snapshotIdError,error:snapshotIdError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:snapshotId,onChange:e=>{this.setState({snapshotId:e.target.value})},"data-test-subj":"snapshotNameInput",placeholder:"Enter snapshot name"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormHelpText"],null," ","A valid snapshot name must not start with _ and must be lowercase. It must not contain any of the following characters:"," ",invalidChar.map(char=>`[${char}]`).join(" ")," "),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotIndicesRepoInput,{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,onIndicesSelectionChange:this.onIndicesSelectionChange,getIndexOptions:this.getIndexOptions,onCreateOption:this.onCreateOption,repoOptions:repoOptions,selectedRepoValue:selectedRepoValue,onRepoSelectionChange:this.onRepoSelectionChange,repoError:repoError}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"advanced_settings_accordian",buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Advanced options"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotAdvancedSettings,{includeGlobalState:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,"include_global_state",false))=="true",onIncludeGlobalStateToggle:this.onIncludeGlobalStateToggle,ignoreUnavailable:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,"ignore_unavailable",false))=="true",onIgnoreUnavailableToggle:this.onIgnoreUnavailableToggle,partial:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,"partial",false))=="true",onPartialToggle:this.onPartialToggle,width:"200%"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{edit:false,action:"",onClickAction:this.onClickAction,onClickCancel:onCloseFlyout})))}}CreateSnapshotFlyout_defineProperty(CreateSnapshotFlyout_CreateSnapshotFlyout,"contextType",core_services["b"]);var components_CreateSnapshotFlyout_CreateSnapshotFlyout=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(CreateSnapshotFlyout_CreateSnapshotFlyout,CreateSnapshotFlyout_extends({},props,dataSourceMenuProps))};var components_CreateSnapshotFlyout=components_CreateSnapshotFlyout_CreateSnapshotFlyout;let RESTORE_OPTIONS=function(RESTORE_OPTIONS){RESTORE_OPTIONS["restore_specific_indices"]="restore_specific_indices";RESTORE_OPTIONS["restore_all_indices"]="restore_all_indices";RESTORE_OPTIONS["do_not_rename"]="do_not_rename";RESTORE_OPTIONS["add_prefix"]="add_prefix";RESTORE_OPTIONS["rename_indices"]="rename_indices";RESTORE_OPTIONS["restore_aliases"]="restore_aliases";RESTORE_OPTIONS["include_global_state"]="include_global_state";RESTORE_OPTIONS["ignore_unavailable"]="ignore_unavailable";RESTORE_OPTIONS["partial"]="partial";RESTORE_OPTIONS["customize_index_settings"]="customize_index_settings";RESTORE_OPTIONS["ignore_index_settings"]="ignore_index_settings";return RESTORE_OPTIONS}({});const ERROR_TOAST_TITLE="One or more fields have an error. Please check and try again.";const BAD_RENAME_PATTERN_TEXT="Please enter a valid Rename pattern.";const BAD_RENAME_REPLACEMENT_TEXT="Please enter a valid Rename replacement.";const PATTERN_HELP_TEXT=`Define the format of renamed indices. Use $0 to include the \n\n entire matching index name, $1 to include the content of the first\n\n capture group, etc.`;const RENAME_HELP_TEXT=`Define the format of renamed indices. Use $0 to include the\n\n entire matching index name, $1 to include the content of the first\n\n capture group, etc.`;const IndexSettingsInput=_ref=>{let{getIndexSettings:getIndexSettings,ignore:ignore,showError:showError,inputError:inputError}=_ref;const[indexSettings,setIndexSettings]=Object(external_osdSharedDeps_React_["useState"])("");const onSettingsChange=e=>{setIndexSettings(e.target.value);getIndexSettings(e.target.value,ignore)};const title=ignore?"Specify index settings to ignore":"Specify custom index settings";const helperText=ignore?"Specify a comma-delimited list of settings to exclude from a snapshot.":"Specify a comma-delimited list of settings to override in all restored indices.";const placeholderText=ignore?`Example: \nindex.refresh_interval,\nindex.max_script_fields `:`Example: \n {\n"index.number_of_replicas": 0,\n"index.auto_expand_replicas": true\n}`;const indexSettingsLabel=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement("h4",null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{padding:"0px 0px 5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},`${helperText} `,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank",external:true,rel:"noopener noreferrer"},"Learn more"))));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{isInvalid:showError,error:inputError,label:indexSettingsLabel,id:ignore?"ignore_index_settings":"customize_index_settings"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedTextArea"],{value:indexSettings,onChange:onSettingsChange,placeholder:placeholderText,isInvalid:showError})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}))};var IndexSettingsInput_IndexSettingsInput=IndexSettingsInput;var components_IndexSettingsInput=IndexSettingsInput_IndexSettingsInput;const SnapshotRestoreAdvancedOptions=_ref=>{let{getIndexSettings:getIndexSettings,restoreAliases:restoreAliases,onRestoreAliasesToggle:onRestoreAliasesToggle,ignoreUnavailable:ignoreUnavailable,onIgnoreUnavailableToggle:onIgnoreUnavailableToggle,restoreClusterState:restoreClusterState,onRestoreClusterStateToggle:onRestoreClusterStateToggle,customizeIndexSettings:customizeIndexSettings,onCustomizeIndexSettingsToggle:onCustomizeIndexSettingsToggle,ignoreIndexSettings:ignoreIndexSettings,onIgnoreIndexSettingsToggle:onIgnoreIndexSettingsToggle,width:width,badJSONInput:badJSONInput,badIgnoreInput:badIgnoreInput}=_ref;const{restore_aliases:restore_aliases,include_global_state:include_global_state,ignore_unavailable:ignore_unavailable,customize_index_settings:customize_index_settings,ignore_index_settings:ignore_index_settings}=RESTORE_OPTIONS;const JSONerror="Please enter valid JSON between curly brackets.";const ignoreListError="Please enter a comma separated list of valid settings to ignore.";return external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"10px 10px",width:width}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:restore_aliases,label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Restore al
6iases",helpText:"Restore index aliases alongside their associated indices."}),checked:restoreAliases,onChange:onRestoreAliasesToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:include_global_state,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"Restore cluster state from snapshots"),checked:restoreClusterState,onChange:onRestoreClusterStateToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:ignore_unavailable,label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Ignore unavailable indices",helpText:"Instead of failing restore operation, ignore any
6indices that are unavailable or do not exist."}),checked:ignoreUnavailable,onChange:onIgnoreUnavailableToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h5",null,"Custom index settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"By default, index settings are restored from indices in snapshots. You can choose to",external_osdSharedDeps_React_default.a.createElement("br",null),"customize index settings on restore.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:customize_index_settings,label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Customize index settings",helpText:"Overrides index settings on all restored indices."}),checked:customizeIndexSettings,onChange:onCustomizeIndexSettingsToggle}),customizeIndexSettings&&external_osdSharedDeps_React_default.a.createElement(components_IndexSettingsInput,{getIndexSettings:getIndexSettings,ignore:false,showError:badJSONInput,inputError:JSONerror}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:ignore_index_settings,label:external_osdSharedDeps_React_default.a.createElement(CheckBoxLabel,{title:"Ignore index settings",helpText:"Exclude index settings that you don't want to restore from a snapshot."}),checked:ignoreIndexSettings,onChange:onIgnoreIndexSettingsToggle}),ignoreIndexSettings&&external_osdSharedDeps_React_default.a.createElement(components_IndexSettingsInput,{getIndexSettings:getIndexSettings,ignore:true,showError:badIgnoreInput,inputError:ignoreListError}))};var SnapshotRestoreAdvancedOptions_SnapshotRestoreAdvancedOptions=SnapshotRestoreAdvancedOptions;var components_SnapshotRestoreAdvancedOptions=SnapshotRestoreAdvancedOptions_SnapshotRestoreAdvancedOptions;const SnapshotRestoreOption=_ref=>{let{restoreAllIndices:restoreAllIndices,onRestoreAllIndicesToggle:onRestoreAllIndicesToggle,restoreSpecificIndices:restoreSpecificIndices,onRestoreSpecificIndicesToggle:onRestoreSpecificIndicesToggle,width:width}=_ref;const{restore_all_indices:restore_all_indices,restore_specific_indices:restore_specific_indices}=RESTORE_OPTIONS;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Specify restore option"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:restore_all_indices,name:"restore_option",label:"Restore all indices in snapshot",checked:restoreAllIndices,onChange:onRestoreAllIndicesToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:restore_specific_indices,name:"restore_option",label:"Restore specific indices",checked:restoreSpecificIndices,onChange:onRestoreSpecificIndicesToggle}))};var SnapshotRestoreOption_SnapshotRestoreOption=SnapshotRestoreOption;var components_SnapshotRestoreOption=SnapshotRestoreOption_SnapshotRestoreOption;const SnapshotRenameOptions=_ref=>{let{doNotRename:doNotRename,onDoNotRenameToggle:onDoNotRenameToggle,addPrefix:addPrefix,onAddPrefixToggle:onAddPrefixToggle,renameIndices:renameIndices,onRenameIndicesToggle:onRenameIndicesToggle,width:width}=_ref;const{do_not_rename:do_not_rename,add_prefix:add_prefix,rename_indices:rename_indices}=RESTORE_OPTIONS;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Rename restored indices"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:do_not_rename,name:"rename_option",label:"Do not rename",checked:doNotRename,onChange:onDoNotRenameToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:add_prefix,name:"rename_option",label:"Add prefix to restored index names",checked:addPrefix,onChange:onAddPrefixToggle}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:rename_indices,name:"rename_option",label:"Rename using regular expression (Advanced)",checked:renameIndices,onChange:onRenameIndicesToggle}))};var SnapshotRenameOptions_SnapshotRenameOptions=SnapshotRenameOptions;var components_SnapshotRenameOptions=SnapshotRenameOptions_SnapshotRenameOptions;const AddPrefixesInput=_ref=>{let{getPrefix:getPrefix}=_ref;const[prefix,setPrefix]=Object(external_osdSharedDeps_React_["useState"])("restored_");const onPrefixChange=e=>{setPrefix(e.target.value);getPrefix(e.target.value)};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Specify prefix for restored index names",helpText:"A prefix will be added to any restored index names."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:prefix,onChange:onPrefixChange,"data-test-subj":"prefixInput"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}))};var AddPrefixInput=AddPrefixesInput;var components_AddPrefixInput=AddPrefixInput;const RenameInput=_ref=>{let{getRenamePattern:getRenamePattern,getRenameReplacement:getRenameReplacement,showPatternError:showPatternError,showRenameError:showRenameError}=_ref;const[renamePattern,setRenamePattern]=Object(external_osdSharedDeps_React_["useState"])("(.+)");const[renameReplacement,setRenameReplacement]=Object(external_osdSharedDeps_React_["useState"])("restored_$1");const onPatternChange=e=>{setRenamePattern(e.target.value);getRenamePattern(e.target.value)};const onReplacementChange=e=>{setRenameReplacement(e.target.value);getRenameReplacement(e.target.value)};const patternLabel=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Rename Pattern")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{padding:"0px 0px 5px 0px",fontWeight:"200"}},`${PATTERN_HELP_TEXT}} `,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["C"],target:"_blank",rel:"noopener noreferrer",external:true},"Learn more")));const renameLabel=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Rename Replacement")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",style:{padding:"0px 0px 5px 0px",fontWeight:"200"}},`${RENAME_HELP_TEXT} `,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["C"],target:"_blank",rel:"noopener noreferrer",external:true},"Learn more")));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{error:BAD_RENAME_PATTERN_TEXT,isInvalid:showPatternError,label:patternLabel,id:"rename_pattern"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:renamePattern,onChange:onPatternChange,isInvalid:showPatternError,"data-test-subj":"renamePatternInput"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{error:BAD_RENAME_REPLACEMENT_TEXT,isInvalid:showRenameError,label:renameLabel,id:"rename_replacement"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{value:renameReplacement,onChange:onReplacementChange,isInvalid:showRenameError,"data-test-subj":"renameReplacementInput"})))};var RenameInput_RenameInput=RenameInput;var components_RenameInput=RenameInput_RenameInput;
6const SnapshotIndicesInput=_ref=>{let{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,onIndicesSelectionChange:onIndicesSelectionChange,getIndexOptions:getIndexOptions,onCreateOption:onCreateOption,showError:showError}=_ref;const selectionError="You must select at least one index to restore.";return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{label:"Select indices or input index patterns you want to restore",error:selectionError,isInvalid:showError},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{isInvalid:showError,placeholder:"Select indices or input index patterns.",options:indexOptions,selectedOptions:selectedIndexOptions,onChange:onIndicesSelectionChange,onSearchChange:getIndexOptions,onCreateOption:onCreateOption,isClearable:true})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}))};
6var SnapshotIndicesInput_SnapshotIndicesInput=SnapshotIndicesInput;var components_SnapshotIndicesInput=SnapshotIndicesInput_SnapshotIndicesInput;const IndexList=_ref=>{let{indices:indices,snapshot:snapshot,onClick:onClick,title:title,columns:columns}=_ref;indices=indices.filter(index=>index.index.substring(0,7)!==".kibana");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{onClick:onClick,size:"xl",color:"primary",type:"arrowLeft",style:{cursor:"pointer",padding:"0 0 5px 0"}})," ",title," ",snapshot," (",indices.length,")"))),external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"1rem 1.5rem"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{tableCaption:"Indices",items:indices,columns:columns,tableLayout:"fixed",pagination:true,sorting:true})))};var IndexList_IndexList=IndexList;var components_IndexList=IndexList_IndexList;function RestoreSnapshotFlyout_extends(){return RestoreSnapshotFlyout_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},RestoreSnapshotFlyout_extends.apply(null,arguments)}function RestoreSnapshotFlyout_defineProperty(e,r,t){return(r=RestoreSnapshotFlyout_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RestoreSnapshotFlyout_toPropertyKey(t){var i=RestoreSnapshotFlyout_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function RestoreSnapshotFlyout_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class RestoreSnapshotFlyout_RestoreSnapshotFlyout extends components_MDSEnabledComponent{constructor(props){super(props);RestoreSnapshotFlyout_defineProperty(this,"onClickAction",()=>{var _options$index_settin,_options$ignore_index;const{restoreSnapshot:restoreSnapshot,snapshotId:snapshotId,repository:repository,onCloseFlyout:onCloseFlyout,getRestoreTime:getRestoreTime}=this.props;const{customIndexSettings:customIndexSettings,ignoreIndexSettings:ignoreIndexSettings,restoreSpecific:restoreSpecific,selectedIndexOptions:selectedIndexOptions,indexOptions:indexOptions,renameIndices:renameIndices,prefix:prefix,snapshot:snapshot,renamePattern:renamePattern,renameReplacement:renameReplacement}=this.state;const{add_prefix:add_prefix}=RESTORE_OPTIONS;const selectedIndices=selectedIndexOptions.map(option=>option.label).join(",");const allIndices=indexOptions.map(option=>option.label).join(",");const pattern=renameIndices===add_prefix?"(.+)":renamePattern;const options={indices:restoreSpecific?selectedIndices:allIndices,index_settings:customIndexSettings,ignore_index_settings:ignoreIndexSettings,ignore_unavailable:(snapshot===null||snapshot===void 0?void 0:snapshot.ignore_unavailable)||false,include_global_state:snapshot===null||snapshot===void 0?void 0:snapshot.include_global_state,rename_pattern:pattern,rename_replacement:renameIndices===add_prefix?`${prefix}$1`:renameReplacement,include_aliases:(snapshot===null||snapshot===void 0?void 0:snapshot.restore_aliases)!==undefined?snapshot.restore_aliases:true,partial:(snapshot===null||snapshot===void 0?void 0:snapshot.partial)||false};let repoError="";if(((_options$index_settin=options.index_settings)===null||_options$index_settin===void 0?void 0:_options$index_settin.length)==0){delete options.index_settings}if(((_options$ignore_index=options.ignore_index_settings)===null||_options$ignore_index===void 0?void 0:_options$ignore_index.length)==0){delete options.ignore_index_settings}const badJSON=options.index_settings?checkBadJSON(options.index_settings):false;const badPattern=checkBadRegex(options.rename_pattern);const badRename=checkBadReplacement(options.rename_replacement);const badIgnore=options.ignore_index_settings?checkCustomIgnoreConflict(customIndexSettings,ignoreIndexSettings):false;const noIndicesSelected=checkNoSelectedIndices(options.indices,restoreSpecific);
6if(!badIgnore&&(badPattern||badRename||noIndicesSelected||badJSON)){this.context.notifications.toasts.addDanger(null,{title:ERROR_TOAST_TITLE})}if(badIgnore){this.context.notifications.toasts.addDanger(null,{title:"Cannot apply and ignore the same index settings",text:"One or more index settings was declared in both Custom index settings and Ignore index settings. Remove the index setting from either fields."})}this.setState({badPattern:badPattern,badRename:badRename,badIgnore:badIgnore,noIndicesSelected:noIndicesSelected,badJSON:badJSON});if(badPattern||badRename||badIgnore||noIndicesSelected||badJSON){return}if(!options.ignore_index_settings){delete options.ignore_index_settings}if(!snapshotId.trim()){this.setState({snapshotIdError:"Required."});return}if(!repository){repoError=ERROR_PROMPT.REPO;this.setState({repoError:repoError});return}if(options.index_settings){options.index_settings=JSON.parse(options.index_settings)}getRestoreTime(Date.now());restoreSnapshot(snapshotId,repository,options);onCloseFlyout()});RestoreSnapshotFlyout_defineProperty(this,"onClickIndices",async()=>{this.setState({listIndices:true})});RestoreSnapshotFlyout_defineProperty(this,"onBackArrowClick",()=>{this.setState({listIndices:false})});RestoreSnapshotFlyout_defineProperty(this,"onIndicesSelectionChange",selectedOptions=>{const selectedIndexOptions=selectedOptions.map(o=>o.label);let newJSON=this.state.snapshot;newJSON.indices=[...selectedIndexOptions];this.setState({snapshot:newJSON,selectedIndexOptions:selectedOptions})});RestoreSnapshotFlyout_defineProperty(this,"getSnapshot",async(snapshotId,repository)=>{const{snapshotManagementService:snapshotManagementService}=this.props;try{const response=await snapshotManagementService.getSnapshot(snapshotId,repository);if(response.ok){const newOptions=response.response.indices.map(index=>({label:index}));this.setState({snapshot:response.response,indexOptions:[...newOptions]})}else{const message=JSON.parse(response.error).error.root_cause[0].reason;const trimmedMessage=message.slice(message.indexOf("]")+1,message.indexOf(".")+1);this.context.notifications.toasts.addError(response.error,{title:`There was a problem getting the snapshot`,toastMessage:`${trimmedMessage} Open browser console & click below for details.`})}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshot."))}});RestoreSnapshotFlyout_defineProperty(this,"getIndexOptions",()=>{const{snapshotId:snapshotId,repository:repository}=this.props;this.getSnapshot(snapshotId,repository)});RestoreSnapshotFlyout_defineProperty(this,"getIndexSettings",(indexSettings,ignore)=>{!ignore&&this.setState({customIndexSettings:indexSettings});ignore&&this.setState({ignoreIndexSettings:indexSettings})});RestoreSnapshotFlyout_defineProperty(this,"onCreateOption",(searchValue,options)=>{const normalizedSearchValue=searchValue.trim().toLowerCase();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(options.findIndex(option=>option.label.trim().toLowerCase()===normalizedSearchValue)===-1){this.setState({indexOptions:[...this.state.indexOptions,newOption]})}const selectedIndexOptions=[...this.state.selectedIndexOptions,newOption];this.setState({selectedIndexOptions:selectedIndexOptions})});RestoreSnapshotFlyout_defineProperty(this,"getPrefix",prefix=>{this.setState({prefix:prefix})});RestoreSnapshotFlyout_defineProperty(this,"getRenamePattern",renamePattern=>{this.setState({renamePattern:renamePattern})});RestoreSnapshotFlyout_defineProperty(this,"getRenameReplacement",renameReplacement=>{this.setState({renameReplacement:renameReplacement})});RestoreSnapshotFlyout_defineProperty(this,"onToggle",e=>{const{restore_specific_indices:restore_specific_indices,restore_all_indices:restore_all_indices,customize_index_settings:customize_index_settings,ignore_index_settings:ignore_index_settings,restore_aliases:restore_aliases}=RESTORE_OPTIONS;if(e.target.id===restore_specific_indices){this.setState({restoreSpecific:true,snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,e.target.id,e.target.checked)});return}if(e.target.id===restore_aliases){this.setState({snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,e.target.id,e.target.checked)});return}if(e.target.id===restore_all_indices){this.setState({restoreSpecific:false,noIndicesSelected:false,snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,e.target.id,e.target.checked)});return}if(e.target.id===customize_index_settings){if(!e.target.checked){this.setState({customIndexSettings:"",badJSON:false})}}if(e.target.id===ignore_index_settings){if(!e.target.checked){this.setState({ignoreIndexSettings:"",badIgnore:false})}}if(e.target.name==="rename_option"){let renamePattern=this.state.renamePattern;let renameReplacement=this.state.renameReplacement;if(e.target.id!=="rename_indices"){renamePattern="(.+)";renameReplacement="restored_$1"}this.setState({renameIndices:e.target.id,renamePattern:renamePattern,badPattern:false,renameReplacement:renameReplacement,badRename:false,snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,e.target.id,e.target.checked)});return}this.setState({snapshot:external_osdSharedDeps_Lodash_default.a.set(this.state.snapshot,e.target.id,e.target.checked)})});this.state={...this.state,indexOptions:[],selectedIndexOptions:[],renameIndices:"add_prefix",prefix:"restored_",renamePattern:"(.+)",renameReplacement:"restored_$1",listIndices:false,customIndexSettings:"",ignoreIndexSettings:"",indicesList:[],repositories:[],selectedRepoValue:"",snapshot:null,restoreSpecific:false,partial:false,badPattern:false,badRename:false,badJSON:false,badIgnore:false,noIndicesSelected:false,repoError:"",snapshotIdError:""}}async componentDidMount(){await this.getIndexOptions()}async componentDidUpdate(prevProps,prevState){if(prevState.dataSourceId!=this.state.dataSourceId){await this.getIndexOptions()}}render(){const{onCloseFlyout:onCloseFlyout,snapshotId:snapshotId}=this.props;const{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,selectedRepoValue:selectedRepoValue,restoreSpecific:restoreSpecific,snapshot:snapsh
6ot,renameIndices:renameIndices,listIndices:listIndices,badPattern:badPattern,badRename:badRename,badJSON:badJSON,badIgnore:badIgnore,noIndicesSelected:noIndicesSelected}=this.state;const{do_not_rename:do_not_rename,add_prefix:add_prefix,rename_indices:rename_indices,restore_aliases:restore_aliases,include_global_state:include_global_state,ignore_unavailable:ignore_unavailable,partial:partial,customize_index_settings:customize_index_settings,ignore_index_settings:ignore_index_settings}=RESTORE_OPTIONS;const status=snapshot?(snapshot===null||snapshot===void 0?void 0:snapshot.state[0])+(snapshot===null||snapshot===void 0?void 0:snapshot.state.slice(1).toLowerCase()):undefined;const restoreDisabled=(snapshot===null||snapshot===void 0?void 0:snapshot.failed_shards)&&!(snapshot!==null&&snapshot!==void 0&&snapshot.partial);const snapshotIndices=snapshot===null||snapshot===void 0?void 0:snapshot.indices.map(index=>({index:index}));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{ownFocus:false,maxWidth:600,onClose:onCloseFlyout,size:"m",hideCloseButton:true},listIndices?external_osdSharedDeps_React_default.a.createElement(components_IndexList,{indices:snapshotIndices,snapshot:snapshotId,columns:constants["N"],onClick:this.onBackArrowClick,title:"Indices in snapshot"}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"},"Restore snapshot")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexStart"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Snapshot name"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,snapshot===null||snapshot===void 0?void 0:snapshot.snapshot))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Status"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{textSize:"m",color:`${status===null||status===void 0?void 0:status.toLowerCase()}`,title:`${status} indicator icon`}," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null," ",status)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(components_CustomLabel,{title:"Indices"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement("a",{onClick:this.onClickIndices},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null," ",snapshot===null||snapshot===void 0?void 0:snapshot.indices.length))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xxl"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotRestoreOption,{restoreAllIndices:!restoreSpecific,onRestoreAllIndicesToggle:this.onToggle,restoreSpecificIndices:restoreSpecific,onRestoreSpecificIndicesToggle:this.onToggle,width:"200%"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),restoreSpecific&&external_osdSharedDeps_React_default.a.createElement(components_SnapshotIndicesInput,{indexOptions:indexOptions,selectedIndexOptions:selectedIndexOptions,onIndicesSelectionChange:this.onIndicesSelectionChange,getIndexOptions:this.getIndexOptions,onCreateOption:this.onCreateOption,selectedRepoValue:selectedRepoValue,showError:noIndicesSelected,isClearable:true}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotRenameOptions,{doNotRename:renameIndices===do_not_rename,onDoNotRenameToggle:this.onToggle,addPrefix:renameIndices===add_prefix,onAddPrefixToggle:this.onToggle,renameIndices:renameIndices===rename_indices,onRenameIndicesToggle:this.onToggle,width:"200%"}),renameIndices===add_prefix&&external_osdSharedDeps_React_default.a.createElement(components_AddPrefixInput,{getPrefix:this.getPrefix}),renameIndices===rename_indices&&external_osdSharedDeps_React_default.a.createElement(components_RenameInput,{getRenamePattern:this.getRenamePattern,getRenameReplacement:this.getRenameReplacement,showPatternError:badPattern,showRenameError:badRename}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xxl"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiAccordion"],{id:"advanced_restore_options",buttonContent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Advanced options"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_SnapshotRestoreAdvancedOptions,{getIndexSettings:this.getIndexSettings,restoreAliases:String(external_osdSharedDeps_Lodash_default.a.get(snapsh
6ot,restore_aliases,false))=="true",onRestoreAliasesToggle:this.onToggle,restoreClusterState:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,include_global_state,false))=="true",onRestoreClusterStateToggle:this.onToggle,ignoreUnavailable:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,ignore_unavailable,false))=="true",onIgnoreUnavailableToggle:this.onToggle,customizeIndexSettings:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,customize_index_settings,false))=="true",onCustomizeIndexSettingsToggle:this.onToggle,ignoreIndexSettings:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,ignore_index_settings,false))=="true",onIgnoreIndexSettingsToggle:this.onToggle,width:"200%",badJSONInput:badJSON,badIgnoreInput:badIgnore})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"l"}),(snapshot===null||snapshot===void 0?void 0:snapshot.failed_shards)&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Restoring a partial snapshot",color:"warning"},external_osdSharedDeps_React_default.a.createElement("p",null,"You are about to restore a partial snapshot. One or more shards may be missing in this",external_osdSharedDeps_React_default.a.createElement("br",null),"snapshot. Do you want to continue?"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:partial,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},"Allow restore partial snapshots"),checked:String(external_osdSharedDeps_Lodash_default.a.get(snapshot,partial,false))=="true",onChange:this.onToggle}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{edit:true,restore:true,action:"",onClickAction:this.onClickAction,onClickCancel:onCloseFlyout,disabledAction:!!restoreDisabled}))))}}RestoreSnapshotFlyout_defineProperty(RestoreSnapshotFlyout_RestoreSnapshotFlyout,"contextType",core_services["b"]);var components_RestoreSnapshotFlyout_RestoreSnapshotFlyout=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(RestoreSnapshotFlyout_RestoreSnapshotFlyout,RestoreSnapshotFlyout_extends({},props,dataSourceMenuProps))};var components_RestoreSnapshotFlyout=components_RestoreSnapshotFlyout_RestoreSnapshotFlyout;const intervalIds=[];const RestoreActivitiesPanel=_ref=>{let{onOpenError:onOpenError,sendError:sendError,sendToasts:sendToasts,snapshotManagementService:snapshotManagementService,snapshotId:snapshotId,restoreStartRef:restoreStartRef,indicesToRestore:indicesToRestore,useNewUX:useNewUX}=_ref;const context=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[startTime,setStartTime]=Object(external_osdSharedDeps_React_["useState"])("");const[stopTime,setStopTime]=Object(external_osdSharedDeps_React_["useState"])("");const[stage,setStage]=Object(external_osdSharedDeps_React_["useState"])("");const[indices,setIndices]=Object(external_osdSharedDeps_React_["useState"])([]);const[flyout,setFlyout]=Object(external_osdSharedDeps_React_["useState"])(false);const[statusOk,setStatusOk]=Object(external_osdSharedDeps_React_["useState"])(true);const restoreCount=indicesToRestore.length;Object(external_osdSharedDeps_React_["useEffect"])(()=>{const breadCrumbs=useNewUX?[constants["f"].INDEX_SNAPSHOT_RESTORE]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOTS,constants["f"].SNAPSHOT_RESTORE];context===null||context===void 0||context.chrome.setBreadcrumbs(breadCrumbs);if(statusOk&&stage!=="Completed (100%)"){intervalIds.push(setInterval(()=>{getRestoreStatus()},2e3));return()=>{intervalIds.forEach(id=>{clearInterval(id)})}}},[stage]);const getRestoreStatus=async()=>{const percent=stage.slice(stage.indexOf("("));const failedStage=`Failed ${percent}`;if(!restoreStartRef){return}try{const res=await snapshotManagementService.getIndexRecovery();if(res.ok){const response=res.response;setRestoreStatus(response)}else{const toasts=getToasts("error_restore_toast","",snapshotId,onOpenError);res.error=res.error.concat(`, please check your connection`);setStage(failedStage);sendError(res);sendToasts(toasts);intervalIds.forEach(id=>{clearInterval(id)});return}}catch(err){const toasts=getToasts("error_restore_toast","",snapshotId,onOpenError);setStage(failedStage);setStatusOk(false);sendError(err);sendToasts(toasts)}};const onIndexesClick=async e=>{e.preventDefault();await getRestoreStatus();setFlyout(true)};const onCloseFlyout=()=>
6{setFlyout(false)};const setRestoreStatus=response=>{let minStartTime=0;let maxStopTime=0;let stageIndex=6;let doneCount=0;const indexes=[];const stages=["START","INIT","INDEX","VERIFY_INDEX","TRANSLOG","FINALIZE","DONE"];const modifiedStages={START:"Starting",INIT:"Initializing",INDEX:"Copying",VERIFY_INDEX:"Verifying",TRANSLOG:"Replaying translog",FINALIZE:"Cleaning up",DONE:"Completed"};const lastStage=stages.length-1;for(let item in response){const responseItem=item;if(item.indexOf("kibana")<0&&response[responseItem].shards&&response[responseItem].shards[0].start_time_in_millis>=restoreStartRef){const info=response[responseItem].shards[0];const stage=stages.indexOf(info.stage);const time={start_time:info.start_time_in_millis,stop_time:info.stop_time_in_millis?info.stop_time_in_millis:Date.now()};doneCount=stage===lastStage?doneCount+1:doneCount;stageIndex=stage<stageIndex?stage:stageIndex;maxStopTime=maxStopTime&&maxStopTime>time.stop_time?maxStopTime:time.stop_time;const indexStatus=modifiedStages[info.stage];if(info.source.index&&info.source.snapshot===snapshotId){minStartTime=minStartTime&&minStartTime<time.start_time?minStartTime:time.start_time;indexes.push({index:info.source.index,restore_status:indexStatus})}}}const updatedIndices=[...indexes];const indicesStarted=indexes.map(index=>index.index);for(let index of indicesToRestore){if(indicesStarted.indexOf(index)<0){updatedIndices.push({index:index,restore_status:"Pending"})}}const sortedUpdatedIndices=updatedIndices.sort((a,b)=>a.index-b.index);const percent=Math.floor(doneCount/restoreCount*100);setIndices(sortedUpdatedIndices);setStopTime(new Date(maxStopTime).toLocaleString().replace(","," "));setStartTime(new Date(minStartTime).toLocaleString().replace(","," "));if(stages[stageIndex]){stageIndex=stageIndex===lastStage&&doneCount<restoreCount?2:stageIndex;setStage(`${modifiedStages[stages[stageIndex]]} (${percent}%)`)}};const actions=Object(external_osdSharedDeps_React_["useMemo"])(()=>[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:getRestoreStatus,"data-test-subj":"refreshStatusButton",isDisabled:restoreStartRef?false:true},"Refresh")],[]);const renderToolsRight=()=>[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:getRestoreStatus,"aria-label":"refresh",size:"s",display:"base"})))];const currentStage=stage.slice(0,stage.indexOf(" "));const color=currentStage==="Completed"?"success":currentStage==="Failed"?"failure":"warning";const indexText=`${restoreCount===1?"1 Index":`${restoreCount} Indices`}`;const restoreStatus=[{start_time:startTime,stop_time:stopTime,snapshot:snapshotId,status:stage,indexes:indexText}];const columns=[{field:"start_time",name:"Start time"},{field:"stop_time",name:"Completion time"},{field:"snapshot",name:"Snapshot name"},{field:"status",name:"Status",render:text=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color},text)},{field:"indexes",name:"Indices being restored",render:text=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:onIndexesClick},text)}];const search={toolsRight:renderToolsRight(),box:{placeholder:"Search",incremental:true,compressed:true},compressed:true};const restoreActivityTable=()=>!useNewUX?external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:title,actions:useActions},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:snapshotId&&restoreCount?restoreStatus:[],columns:columns,pagination:false,message:message,search:useSearch})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,title))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,useActions)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:snapshotId&&restoreCount?restoreStatus:[],columns:columns,pagination:false,message:message,search:useSearch}));const oldMessage=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement("p",null,"There are no restore activities."),titleSize:"s"});const newMessage=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("h1",null,"There are no restore activities")," ",external_osdSharedDeps_React_default.a.createElement("p",null,"When a restore activity is in progress it will appear here.")),titleSize:"s"});
6const message=useNewUX?newMessage:oldMessage;const title=useNewUX?undefined:"Restore activities in progress";const useActions=useNewUX?undefined:actions;const useSearch=useNewUX?search:undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,flyout&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{ownFocus:false,maxWidth:600,onClose:onCloseFlyout,size:"m",hideCloseButton:true},external_osdSharedDeps_React_default.a.createElement(components_IndexList,{indices:indices,snapshot:snapshotId,onClick:onCloseFlyout,title:"Indices being restored",columns:constants["O"]})),restoreActivityTable())};var components_RestoreActivitiesPanel=RestoreActivitiesPanel;const ErrorModal_ErrorModal_ErrorModal=_ref=>{var _error$reason;let{onClick:onClick,error:error,snapshotId:snapshotId}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClick},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],{color:"danger",style:{flexDirection:"column",alignItems:"flex-start"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement("h1",null,`Failed to restore snapshot ${snapshotId}`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m",color:"danger"},(_error$reason=error.reason)!==null&&_error$reason!==void 0?_error$reason:error,".")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:onClick,fill:true},"Close"))))};var components_ErrorModal_ErrorModal=ErrorModal_ErrorModal_ErrorModal;function Snapshots_extends(){return Snapshots_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Snapshots_extends.apply(null,arguments)}function Snapshots_defineProperty(e,r,t){return(r=Snapshots_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Snapshots_toPropertyKey(t){var i=Snapshots_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Snapshots_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Snapshots_Snapshots extends components_MDSEnabledComponent{constructor(props){var _this;super(props);_this=this;Snapshots_defineProperty(this,"columns",void 0);Snapshots_defineProperty(this,"tabsRef",void 0);Snapshots_defineProperty(this,"getSnapshots",async()=>{this.setState({loadingSnapshots:true,message:"Loading snapshots..."});try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.getAllSnapshotsWithPolicy();if(response.ok){const{snapshots:snapshots}=response.response;const existingPolicyNames=[...new Set(snapshots.filter(snapshot=>!!snapshot.policy).map(snapshot=>snapshot.policy))];this.setState({snapshots:snapshots,existingPolicyNames:existingPolicyNames})}else{const message=JSON.parse(response.error).error.root_cause[0].reason;const trimmedMessage=message.slice(message.indexOf("]")+1,message.indexOf(".")+1);this.context.notifications.toasts.addError(response.error,{title:`There was a problem getting the snapshots.`,toastMessage:`${trimmedMessage} Open browser console & click below for details.`})}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem loading the snapshots."))}finally{this.setState({loadingSnapshots:false,message:null})}});Snapshots_defineProperty(this,"onSelectionChange",selectedItems=>{if(this.state.showRestoreFlyout)return;this.setState({selectedItems:selectedItems})});Snapshots_defineProperty(this,"onCloseFlyout",()=>{this.setState({showFlyout:false})});Snapshots_defineProperty(this,"onClickDelete",async()=>{const{selectedItems:selectedItems}=this.state;for(let item of selectedItems){await this.deleteSnapshot(item.id,item.repository)}
6await this.getSnapshots()});Snapshots_defineProperty(this,"deleteSnapshot",async(snapshotId,repository)=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.deleteSnapshot(snapshotId,repository);if(response.ok){this.context.notifications.toasts.addSuccess(`Deleted snapshot ${snapshotId} from repository ${repository}.`)}else{const message=JSON.parse(response.error).error.root_cause[0].reason;const trimmedMessage=message.slice(message.indexOf("]")+1,message.indexOf(".")+1);this.context.notifications.toasts.addError(response.error,{title:`There was a problem deleting the snapshot.`,toastMessage:`${trimmedMessage} Open browser console & click below for details.`})}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem deleting the snapshot."))}});Snapshots_defineProperty(this,"onClickCreate",()=>{this.setState({showCreateFlyout:true})});Snapshots_defineProperty(this,"onCloseCreateFlyout",()=>{this.setState({showCreateFlyout:false})});Snapshots_defineProperty(this,"createSnapshot",async(snapshotId,repository,snapshot)=>{try{const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.createSnapshot(snapshotId,repository,snapshot);if(response.ok){this.setState({showCreateFlyout:false});this.context.notifications.toasts.addSuccess(`Created snapshot ${snapshotId} in repository ${repository}.`);
6await this.getSnapshots()}else{const message=response.error;this.context.notifications.toasts.addError(response.error,{title:`There was a problem creating the snapshot.`,toastMessage:`${message} Open browser console & click below for details.`})}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem creating the snapshot."))}});Snapshots_defineProperty(this,"restoreSnapshot",async(snapshotId,repository,options)=>{try{await this.setState({toasts:[],indicesToRestore:options.indices});const{snapshotManagementService:snapshotManagementService}=this.props;const response=await snapshotManagementService.restoreSnapshot(snapshotId,repository,options);if(response.ok){this.onRestore(true,response)}else{this.onRestore(false,response)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem restoring the snapshot."))}});Snapshots_defineProperty(this,"onRestore",(function(success){let response=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const{selectedItems:selectedItems}=_this.state;let errorMessage;if(!success){let optionalMessage="";const errorString=response.error||JSON.stringify(response);if(errorString.indexOf("open index with same name")>=0){optionalMessage="You have an index with the same name. Try a different prefix."}errorMessage=`${optionalMessage} ${errorString}`}const toasts=success?getToasts("success_restore_toast",undefined,selectedItems[0].id,_this.onClickTab):getToasts("error_restore_toast",errorMessage,selectedItems[0].id,_this.onOpenError);_this.setState({toasts:toasts,error:response.error})}));Snapshots_defineProperty(this,"onOpenError",()=>{this.setState({viewError:true})});Snapshots_defineProperty(this,"collectError",error=>{this.setState(error)});Snapshots_defineProperty(this,"collectToast",toasts=>{this.setState({toasts:toasts})});Snapshots_defineProperty(this,"onCloseModal",()=>{this.setState({viewError:false,error:{}})});Snapshots_defineProperty(this,"getRestoreTime",time=>{this.setState({restoreStart:time})});Snapshots_defineProperty(this,"onClickRestore",async()=>{const{selectedItems:selectedItems}=this.state;const snapshot=selectedItems[0];const errorMessage=`${snapshot.id} is not available for restore`;const failedText="This shapshot is incomplete. Pick another snapshot to restore.";const inProgressText="This snapshot is still being created. Try again once the snapshot has been completed.";if(snapshot.status==="FAILED"||snapshot.status==="IN_PROGRESS"){const errorText=snapshot.status==="IN_PROGRESS"?inProgressText:failedText;this.context.notifications.toasts.addDanger(null,{title:errorMessage,text:errorText});return}this.setState({showRestoreFlyout:true})});Snapshots_defineProperty(this,"onToastEnd",()=>{this.setState({toasts:[]})});Snapshots_defineProperty(this,"onCloseRestoreFlyout",()=>{this.setState({showRestoreFlyout:false})});Snapshots_defineProperty(this,"onClickTab",e=>{e.stopPropagation();const{selectedItems:selectedItems}=this.state;const target=e.currentTarget;const titleName=this.state.useNewUX?"Index snapshots":"Snapshots";const snapshotPanel=target.textContent===titleName?true:false;const prev=target.previousElementSibling;const next=target.nextElementSibling;if(snapshotPanel){const breadCrumbs=this.state.useNewUX?[constants["f"].INDEX_SNAPSHOTS]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOTS];this.context.chrome.setBreadcrumbs(breadCrumbs)}if(target.textContent!=="View restore activities"){target.ariaSelected="true";target.classList.add("euiTab-isSelected");if(prev){prev.classList.remove("euiTab-isSelected");prev.ariaSelected="false"}if(next){next.classList.remove("euiTab-isSelected");next.ariaSelected="false"}}else{var _this$tabsRef$current,_this$tabsRef$current2;const firstTab=(_this$tabsRef$current=this.tabsRef.current)===null||_this$tabsRef$current===void 0?void 0:_this$tabsRef$current.firstChild;const secondTab=(_this$tabsRef$current2=this.tabsRef.current)===null||_this$tabsRef$current2===void 0?void 0:_this$tabsRef$current2.lastChild;firstTab.ariaSelected="false";firstTab.classList.remove("euiTab-isSelected");secondTab.ariaSelected="true";secondTab.classList.add("euiTab-isSelected")}
6let newState={snapshotPanel:snapshotPanel,selectedItems:selectedItems};if(snapshotPanel)newState.selectedItems=[];this.setState(newState)});Snapshots_defineProperty(this,"onActionButtonClick",()=>{this.setState({isPopoverOpen:!this.state.isPopoverOpen})});Snapshots_defineProperty(this,"closePopover",()=>{this.setState({isPopoverOpen:false})});Snapshots_defineProperty(this,"showDeleteModal",()=>{this.setState({isDeleteModalVisible:true})});Snapshots_defineProperty(this,"closeDeleteModal",()=>{this.setState({isDeleteModalVisible:false})});Snapshots_defineProperty(this,"getSelectedIds",()=>this.state.selectedItems.map(item=>item.id).join(", "));const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");this.state={...this.state,snapshots:[],existingPolicyNames:[],loadingSnapshots:false,snapshotPanel:true,restoreStart:0,indicesToRestore:"",toasts:[],error:{},viewError:false,selectedItems:[],showFlyout:false,flyoutSnapshotId:"",flyoutSnapshotRepo:"",showCreateFlyout:false,showRestoreFlyout:false,message:null,isDeleteModalVisible:false,isPopoverOpen:false,useNewUX:useNewUX};this.columns=[{field:"id",name:"Name",sortable:true,dataType:"string",width:"25%",render:(name,item)=>{const truncated=external_osdSharedDeps_Lodash_default.a.truncate(name,{length:80});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.setState({showFlyout:true,flyoutSnapshotId:name,flyoutSnapshotRepo:item.repository})},external_osdSharedDeps_React_default.a.createElement("span",{title:name},truncated))}},{field:"status",name:"Snapshot status",sortable:true,dataType:"string",render:value=>snapshotStatusRender(value.replace("_"," "))},{field:"policy",name:"Policy",sortable:false,dataType:"string",render:(name,item)=>{const truncated=external_osdSharedDeps_Lodash_default.a.truncate(name,{length:20});if(!!item.policy){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{onClick:()=>this.props.history.push(`${constants["D"].SNAPSHOT_POLICY_DETAILS}?id=${name}`)},truncated)}return"-"}},{field:"repository",name:"Repository",sortable:false,dataType:"string",render:(value,item)=>truncateSpan(value)},{field:"end_epoch",name:"Time last updated",sortable:true,dataType:"date",render:renderTimestampMillis}];this.tabsRef=external_osdSharedDeps_React_default.a.createRef();this.getSnapshots=external_osdSharedDeps_Lodash_default.a.debounce(this.getSnapshots,500,{leading:true})}async componentDidMount(){const breadCrumbs=this.state.useNewUX?[constants["f"].INDEX_SNAPSHOTS]:[constants["f"].SNAPSHOT_MANAGEMENT,constants["f"].SNAPSHOTS];this.context.chrome.setBreadcrumbs(breadCrumbs);
6await this.getSnapshots()}async componentDidUpdate(prevProps,prevState){const prevQuery=Snapshots_Snapshots.getQueryObjectFromState(prevState);const currQuery=Snapshots_Snapshots.getQueryObjectFromState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getSnapshots()}}static getQueryObjectFromState(_ref){let{dataSourceId:dataSourceId,multiDataSourceEnabled:multiDataSourceEnabled}=_ref;return{...multiDataSourceEnabled?{dataSourceId:dataSourceId}:{}}}render(){var _selectedItems$;const{snapshots:snapshots,existingPolicyNames:existingPolicyNames,selectedItems:selectedItems,loadingSnapshots:loadingSnapshots,snapshotPanel:snapshotPanel,toasts:toasts,viewError:viewError,error:error,restoreStart:restoreStart,indicesToRestore:indicesToRestore,showFlyout:showFlyout,flyoutSnapshotId:flyoutSnapshotId,flyoutSnapshotRepo:flyoutSnapshotRepo,showCreateFlyout:showCreateFlyout,showRestoreFlyout:showRestoreFlyout,isDeleteModalVisible:isDeleteModalVisible,isPopoverOpen:isPopoverOpen,useNewUX:useNewUX}=this.state;const{snapshotManagementService:snapshotManagementService}=this.props;const repos=[...new Set(snapshots.map(snapshot=>snapshot.repository))];const status=[...new Set(snapshots.map(snapshot=>snapshot.status))];const popoverActionItems=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{key:"Delete",disabled:!selectedItems.length,onClick:()=>{this.closePopover();this.showDeleteModal()},"data-test-subj":"deleteButton"},"Delete"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuItem"],{disabled:selectedItems.length!==1,onClick:()=>{this.closePopover();this.onClickRestore()},"data-test-subj":"restoreButton"},"Restore")];const renderToolsRight=()=>[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Refresh"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"refresh",onClick:this.getSnapshots,"aria-label":"refresh",size:"s",display:"base"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{id:"action",button:actionsButton,isOpen:isPopoverOpen,closePopover:this.closePopover,anchorPosition:"downRight",panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenuPanel"],{size:"s",items:popoverActionItems}))];const actionsButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right",disabled:!selectedItems.length,onClick:this.onActionButtonClick,"data-test-subj":"actionButton"},"Actions");const search={toolsRight:useNewUX?renderToolsRight():undefined,box:{placeholder:"Search snapshot",incremental:true,compressed:true},compressed:true,filters:[{type:"field_value_selection",field:"repository",name:"Repository",options:repos.map(repo=>({value:repo})),multiSelect:"or"},{type:"field_value_selection",field:"status",name:"Status",options:status.map(s=>({value:s})),multiSelect:"or"},{type:"field_value_selection",field:"policy",name:"Policy",options:existingPolicyNames.map(p=>({value:p})),multiSelect:"or"}]};const actions=[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"refresh",onClick:this.getSnapshots,"data-test-subj":"refreshButton"},"Refresh"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!selectedItems.length,onClick:this.showDeleteModal,"data-test-subj":"deleteButton",color:"danger"},"Delete"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:selectedItems.length!==1,onClick:this.onClickRestore,color:"primary","data-test-subj":"restoreButton"},"Restore"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"plus",onClick:this.onClickCreate,fill:true,"data-test-subj":"takeSnapshotButton"},"Take snapshot")];const subTitleText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s",style:{padding:"5px 0px"}},external_osdSharedDeps_React_default.a.createElement("p",{style:{fontWeight:200}},"Snapshots of indices are taken automatically from snapshot policies, ",external_osdSharedDeps_React_default.a.createElement("br",null),"or you can initiate manual snapshots to save to a repository.",external_osdSharedDeps_React_default.a.createElement("br",null),"You can restore indices by selecting a snapshot."));const controlControlsData=[{id:"Take snapshot",label:"Take snapshot",fill:true,iconType:"plus",run:this.onClickCreate,testId:"takeSnapshot",controlType:"button"}];const descriptionData=[{description:"Index snapshots are taken automatically from snapshot policies, or you can initiate manual snapshots to save to a repository. You can restore indices by selecting a snapshot."}];const snapshotTable=()=>!useNewUX?external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:showTitle,actions:useActions,subTitleText:useSubTitle},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:snapshots,itemId:item=>`${item.repository}:${item.id}`,columns:this.columns,pagination:true,sorting:{sort:{field:"end_epoch",direction:"desc"}},isSelectable:true,selection:{onSelectionChange:this.onSelectionChange},search:search,loading:loadingSnapshots})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{items:snapshots,itemId:item=>`${item.repository}:${item.id}`,columns:this.columns,pagination:true,sorting:{sort:{field:"end_epoch",direction:"desc"}},isSelectable:true,selection:{onSelectionChange:this.onSelectionChange},search:search,loading:loadingSnapshots}));const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const showTitle=useNewUX?undefined:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Snapshots"));const SnapshotTabName=useNewUX?"Index snapshots":"Snapshots";const useActions=useNewUX?undefined:actions;const useSubTitle=useNewUX?undefined:subTitleText;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlControlsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData})):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTabs"],{size:"s",ref:this.tabsRef},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTab"],{isSelected:true,onClick:this.onClickTab},SnapshotTabName),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTab"],{onClick:this.onClickTab},"Restore activities in progress"))),snapshotPanel||external_osdSharedDeps_React_default.a.createElement(components_RestoreActivitiesPanel,{snapshotManagementService:snapshotManagementService,onOpenError:this.onOpenError,sendError:this.collectError,sendToasts:this.collectToast,snapshotId:((_selectedItems$=selectedItems[0])===null||_selectedItems$===void 0?void 0:_selectedItems$.id)||"",restoreStartRef:restoreStart||0,indicesToRestore:indicesToRestore.split(","),useNewUX:useNewUX}),snapshotPanel&&snapshotTable(),showFlyout&&external_osdSharedDeps_React_default.a.createElement(components_SnapshotFlyout_SnapshotFlyout,{snapshotId:flyoutSnapshotId,repository:flyoutSnapshotRepo,snapshotManagementService:this.props.snapshotManagementService,onCloseFlyout:this.onCloseFlyout,history:this.props.history}),showCreateFlyout&&external_osdSharedDeps_React_default.a.createElement(components_CreateSnapshotFlyout,{snapshotManagementService:this.props.snapshotManagementService,indexService:this.props.indexService,onCloseFlyout:this.onCloseCreateFlyout,createSnapshot:this.createSnapshot}),showRestoreFlyout&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],{onClick:this.onCloseRestoreFlyout,headerZindexLocation:"below"},external_osdSharedDeps_React_default.a.createElement(components_RestoreSnapshotFlyout,{snapshotManagementService:this.props.snapshotManagementService,indexService:this.props.indexService,onCloseFlyout:this.onCloseRestoreFlyout,getRestoreTime:this.getRestoreTime,restoreSnapshot:this.restoreSnapshot,snapshotId:selectedItems[0].id,repository:selectedItems[0].repository})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiGlobalToastList"],{toasts:toasts,dismissToast:this.onToastEnd,toastLifeTimeMs:6e3}),viewError&&external_osdSharedDeps_React_default.a.createElement(components_ErrorModal_ErrorModal,{onClick:this.onCloseModal,onClose:this.onCloseModal,snapshotId:selectedItems[0].id,error:error}),isDeleteModalVisible&&external_osdSharedDeps_React_default.a.createElement(Repositories_components_DeleteModal_DeleteModal_DeleteModal,{type:"snapshot",ids:this.getSelectedIds(),closeDeleteModal:this.closeDeleteModal,onClickDelete:this.onClickDelete}))}}Snapshots_defineProperty(Snapshots_Snapshots,"contextType",core_services["b"]);var containers_Snapshots_Snapshots=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(Snapsh
6ots_Snapshots,Snapshots_extends({},props,dataSourceMenuProps))};var containers_Snapshots=containers_Snapshots_Snapshots;var pages_Snapshots=containers_Snapshots;var diff=__webpack_require__(65);var node_modules_flat=__webpack_require__(33);var flat_default=__webpack_require__.n(node_modules_flat);var classnames=__webpack_require__(30);var classnames_default=__webpack_require__.n(classnames);function BottomBar(props){const bottomBarRef=Object(external_osdSharedDeps_React_["useRef"])(null);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);Object(external_osdSharedDeps_React_["useEffect"])(()=>{const bodyDom=document.querySelector("#opensearch-dashboards-body");let originalBodyPaddingBottom="";if(bodyDom){originalBodyPaddingBottom=bodyDom.style.paddingBottom;bodyDom.style.paddingBottom="64px"}return()=>{destroyRef.current=true;if(bodyDom){bodyDom.style.paddingBottom=originalBodyPaddingBottom}}},[]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBottomBar"],{ref:bottomBarRef,position:"sticky"},props.children)}var components_BottomBar=BottomBar;var UnsavedChangesBottomBar=__webpack_require__(538);function UnsavedChangesBottomBar_extends(){return UnsavedChangesBottomBar_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},UnsavedChangesBottomBar_extends.apply(null,arguments)}function UnsavedChangesBottomBar_UnsavedChangesBottomBar(props){const{unsavedCount:unsavedCount,onClickCancel:onClickCancel,onClickSubmit:onClickSubmit,submitButtonDataTestSubj:submitButtonDataTestSubj,formErrorsCount:formErrorsCount}=props;const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onClick=async()=>{setLoading(true);try{await onClickSubmit()}catch(e){}finally{if(destroyRef.current){return}setLoading(false)}};Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>{destroyRef.current=true},[]);const renderCancel=Object(external_osdSharedDeps_React_["useCallback"])(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],UnsavedChangesBottomBar_extends({onClick:onClickCancel,color:"ghost",iconType:"cross",children:"Cancel"},props.cancelButtonprops))),[onClickCancel]);const renderConfirm=Object(external_osdSharedDeps_React_["useCallback"])(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButton"],UnsavedChangesBottomBar_extends({"data-test-subj":submitButtonDataTestSubj,onClick:onClick,isLoading:loading,disabled:loading,iconType:"check",color:"primary",fill:true,size:"s",children:"Save"},props.confirmButtonProps))),[onClick,submitButtonDataTestSubj,loading]);const renderUnsavedText=Object(external_osdSharedDeps_React_["useCallback"])(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,formErrorsCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement("div",{className:classnames_default()({"ISM-unsaved-changes-blocks":true,danger:true})}),formErrorsCount," form errors."):null,unsavedCount&&!formErrorsCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement("div",{className:classnames_default()({"ISM-unsaved-changes-blocks":true,warning:true})}),unsavedCount," unsaved changes."):null),[unsavedCount,formErrorsCount]);const renderProps=props.renderProps||(()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,renderUnsavedText(),renderCancel(),renderConfirm()));const bottomBar=external_osdSharedDeps_React_default.a.createElement(components_BottomBar,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s",justifyContent:"spaceBetween"},renderProps({renderCancel:renderCancel,renderConfirm:renderConfirm,renderUnsavedText:renderUnsavedText,loading:loading}
6)));return Object(external_osdSharedDeps_ReactDom_["createPortal"])(bottomBar,document.getElementById("app-wrapper"))}var components_UnsavedChangesBottomBar=UnsavedChangesBottomBar_UnsavedChangesBottomBar;function RemoteSelect_extends(){return RemoteSelect_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},RemoteSelect_extends.apply(null,arguments)}const RemoteSelect=Object(external_osdSharedDeps_React_["forwardRef"])((props,ref)=>{const{value:value=[],onChange:onChange,refreshOptions:refreshOptionsFromProps,onOptionsChange:onOptionsChange,...others}=props;const[allOptions,setAllOptions]=Object(external_osdSharedDeps_React_["useState"])([]);const[isLoading,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const refreshOptionsWithoutDebounce=Object(external_osdSharedDeps_React_["useCallback"])(params=>{if(destroyRef.current){return}setIsLoading(true);refreshOptionsFromProps(params).then(res=>{if(destroyRef.current){return}if(res!==null&&res!==void 0&&res.ok&&res.response){setAllOptions(res.response)}else{setAllOptions([])}}).finally(()=>{if(destroyRef.current){return}setIsLoading(false)})},[refreshOptionsFromProps,setAllOptions,setIsLoading]);const refreshOptions=Object(external_osdSharedDeps_React_["useCallback"])(Object(external_osdSharedDeps_Lodash_["debounce"])(refreshOptionsWithoutDebounce,500),[refreshOptionsWithoutDebounce]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{refreshOptionsWithoutDebounce({searchValue:""});return()=>{destroyRef.current=true}},[]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{onOptionsChange&&onOptionsChange(allOptions)},[allOptions]);const onCreateOption=function(searchValue){let flattenedOptions=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];const normalizedSearchValue=searchValue.trim().toLowerCase();if(!normalizedSearchValue){return}const newOption={label:searchValue};if(flattenedOptions.findIndex(option=>option.label.trim().toLowerCase()===normalizedSearchValue)===-1){setAllOptions([...allOptions,newOption]);onChange&&onChange([...value,newOption.label])}};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],RemoteSelect_extends({onCreateOption:onCreateOption},others,{inputRef:ref,selectedOptions:value===null||value===void 0?void 0:value.map(item=>({label:item})),onChange:value=>{onChange&&onChange(value.map(item=>item.label))},options:allOptions,isLoading:isLoading,onSearchChange:searchValue=>{setIsLoading(true);refreshOptions({searchValue:searchValue})}}))});RemoteSelect.displayName="RemoteSelect";var components_RemoteSelect=RemoteSelect;function AliasSelect_extends(){return AliasSelect_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},AliasSelect_extends.apply(null,arguments)}const AliasSelect=Object(external_osdSharedDeps_React_["forwardRef"])((props,ref)=>{const{value:value,onChange:onChange,refreshOptions:refreshOptionsFromProps,onOptionsChange:onOptionsChange}=props;const optionsRef=Object(external_osdSharedDeps_React_["useRef"])([]);const refreshOptions=_ref=>{let{searchValue:searchValue}=_ref;return refreshOptionsFromProps(searchValue||"").then(res=>{if(res!==null&&res!==void 0&&res.ok){return{...res,response:[...new Set(res.response.filter(item=>item.alias&&!filterByMinimatch(item.alias,utils_constants_0["c"])).map(item=>item.alias))].map(alias=>{const findItem=res.response.find(item=>item.alias===alias);return{label:findItem.alias}})}}else{return res}})};return external_osdSharedDeps_React_default.a.createElement(components_RemoteSelect,AliasSelect_extends({},props,{onOptionsChange:options=>{optionsRef.current=options;onOptionsChange===null||onOptionsChange===void 0||onOptionsChange(options)},placeholder:"Select aliases or specify new aliases.",customOptionText:"Add {searchValue} as a new alias.",refreshOptions:refreshOptions,value:Object.keys(value||{}),onChange:val=>{onChange&&onChange(val.map(label=>optionsRef.current.find(item=>item.label===label)||{label:label}).reduce((total,_ref2)=>{let{label:label,...others}=_ref2;return{...total,[label]:others||{}}},{}))}}))});AliasSelect.displayName="AliasSelect";var components_AliasSelect=AliasSelect;function MappingLabel_extends(){return MappingLabel_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},MappingLabel_extends.apply(null,arguments)}const FormRow=props=>{const{shouldShowLabel:shouldShowLabel,label:label,...others}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormRow"],MappingLabel_extends({},others,{label:shouldShowLabel?label:undefined}))};const MappingLabel=Object(external_osdSharedDeps_React_["forwardRef"])((props,forwardedRef)=>{var _findItem$options2;const{onFieldNameCheck:onFieldNameCheck,onAddSubField:onAddSubField,onAddSubObject:onAddSubObject,onDeleteField:onDeleteField,id:id,readonly:readonly,shouldShowLabel:shouldShowLabel}=props;const propsRef=Object(external_osdSharedDeps_React_["useRef"])(props);propsRef.current=props;const onFieldChange=Object(external_osdSharedDeps_React_["useCallback"])((k,v)=>{let newValue={...propsRef.current.value};Object(external_osdSharedDeps_Lodash_["set"])(newValue,k,v);if(k==="type"){var _findItem$options;newValue=Object(external_osdSharedDeps_Lodash_["pick"])(newValue,["fieldName","type"]);const findItem=constants["p"].find(item=>item.label===v);const initValues=((findItem===null||findItem===void 0||(_findItem$options=findItem.options)===null||_findItem$options===void 0?void 0:_findItem$options.fields)||[]).reduce((total,current)=>
6{if(current&¤t.initValue!==undefined){return{...total,[transformNameToString(current.name)]:current.initValue}}return total},{});newValue={...newValue,...initValues};field.setValues(newValue)}return propsRef.current.onChange(newValue,k,v)},[propsRef.current.value,propsRef.current.onChange]);const field=useField({values:{...propsRef.current.value,type:propsRef.current.value.type||"object"},onChange:onFieldChange,unmountComponent:true});Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(propsRef.current.value,field.getValues())){field.resetValues(propsRef.current.value)}},[propsRef.current.value]);const value=field.getValues();const type=value.type;Object(external_osdSharedDeps_React_["useImperativeHandle"])(forwardedRef,()=>({validate:async()=>{const{errors:errors}=await field.validatePromise();if(errors){return"Validate Error"}else{return""}}}));const findItem=constants["p"].find(item=>item.label===type);const moreFields=(findItem===null||findItem===void 0||(_findItem$options2=findItem.options)===null||_findItem$options2===void 0?void 0:_findItem$options2.fields)||[];if(readonly){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("li",{className:"ism-index-mappings-field-line"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"dot",size:"s"}),external_osdSharedDeps_React_default.a.createElement("span",{"data-test-subj":`${id}-field-name`,title:field.getValue("fieldName")},field.getValue("fieldName")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{color:"hollow",title:type,"data-test-subj":`${id}-field-type`},type),moreFields.map(extraField=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{key:transformNameToString(extraField.name),color:"hollow",title:field.getValue(extraField.name)},extraField.label,": ",field.getValue(extraField.name)))))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{onClick:e=>e.stopPropagation()},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:300}},external_osdSharedDeps_React_default.a.createElement(FormRow,{shouldShowLabel:shouldShowLabel,isInvalid:!!field.getError("fieldName"),error:field.getError("fieldName"),label:"Field name",display:"rowCompressed"},external_osdSharedDeps_React_default.a.createElement(built_in_components.Input,MappingLabel_extends({},field.registerField({name:"fieldName",rules:[{required:true,message:"Field name is required, please input"},{validator:(rule,value)=>{const checkResult=onFieldNameCheck(value);if(checkResult){return Promise.reject(checkResult)}return Promise.resolve("")}}]}),{compressed:true,"data-test-subj":`${id}-field-name`})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{width:100}},external_osdSharedDeps_React_default.a.createElement(FormRow,{shouldShowLabel:shouldShowLabel,label:"Field type",display:"rowCompressed"},external_osdSharedDeps_React_default.a.createElement(built_in_components.Select,MappingLabel_extends({compressed:true},field.registerField({name:"type"}),{"data-test-subj":`${id}-field-type`,options:(()=>{const allOptions=constants["p"].map(item=>({text:item.label,value:item.label}));const typeValue=field.getValue("type");if(!allOptions.find(item=>item.value===typeValue)){allOptions.push({text:typeValue,value:typeValue})}return allOptions})()})))),moreFields.map(item=>{const{label:label,type:type,...others}=item;const RenderComponent=built_in_components[type];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,key:transformNameToString(others.name),style:{width:100}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFormRow"],{label:label,display:"rowCompressed",isInvalid:!!field.getError(others.name),error:field.getError(others.name)},external_osdSharedDeps_React_default.a.createElement(RenderComponent,MappingLabel_extends({},field.registerField(others),{compressed:true}))))}),readonly?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(FormRow,{shouldShowLabel:shouldShowLabel,label:"Actions",display:"rowCompressed"},external_osdSharedDeps_React_default.a.createElement("div",{style:{display:"flex",height:32,alignItems:"center"},onClick:e=>{e.stopPropagation()}},constants["q"].includes(type)?external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{triggerType:"hover",panelPaddingSize:"none",button:external_osdSharedDeps_React_default.a.createElement("span",{className:"euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--medium","data-test-subj":`${id}-add-sub-field`,"aria-label":"Delete current field",onClick:onAddSubField},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"plusInCircleFilled"}))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,panels:[{id:0,title:"",items:[{name:"Add nested field",onClick:onAddSubField},{name:"Add nested object",onClick:onAddSubObject}]}]})):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Delete current field"},external_osdSharedDeps_React_default.a.createElement("span",{className:"euiButtonIcon euiButtonIcon--danger euiButtonIcon--empty euiButtonIcon--medium","data-test-subj":`${id}-delete-field`,"aria-label":"Delete current field",onClick:onDeleteField},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"trash"})))))))});var MappingLabel_MappingLabel=MappingLabel;var components_MappingLabel=MappingLabel_MappingLabel;var ajv=__webpack_require__(169);var ajv_default=__webpack_require__.n(ajv);const schemaId="ISMIndexMappingProperties";
6const typeSchema={description:"type for this field",enum:constants["p"].map(item=>item.label)};const propertiesSchema={description:"properties for this field",$ref:schemaId};const noAdditionalJSONSchema={title:"Index mapping properties",description:"Index mapping properties validation",type:"object",$id:schemaId,patternProperties:{".*":{type:"object",properties:{type:typeSchema},required:["type"],allOf:[...constants["p"].map(item=>{var _item$options;const payload={if:{properties:{type:{const:item.label}}},then:{properties:{type:typeSchema,...(_item$options=item.options)===null||_item$options===void 0||(_item$options=_item$options.fields)===null||_item$options===void 0?void 0:_item$options.reduce((total,current)=>({...total,[current.name]:{description:current.label,type:current.validateType}}),{})},additionalProperties:false}};if(item.hasChildren){payload.then.properties.properties=propertiesSchema}return payload})]}}};const IndexMappingsJSONEditorSchema={title:"Index mapping properties",description:"Index mapping properties validation",type:"object",$id:schemaId,patternProperties:{".*":{type:"object",required:["type"],properties:{type:typeSchema},allOf:[...constants["p"].map(item=>{var _item$options2,_item$options3;const payload={if:{properties:{type:{const:item.label}},required:["type"]},then:{properties:{type:typeSchema,...(_item$options2=item.options)===null||_item$options2===void 0||(_item$options2=_item$options2.fields)===null||_item$options2===void 0?void 0:_item$options2.reduce((total,current)=>({...total,[current.name]:{description:current.label,type:current.validateType}}),{})},required:["type",...((_item$options3=item.options)===null||_item$options3===void 0||(_item$options3=_item$options3.fields)===null||_item$options3===void 0?void 0:_item$options3.map(item=>item.name))||[]],additionalProperties:false,errorMessage:"Property is not supported in the visual editor."}};if(item.hasChildren){payload.then.required.push("properties");payload.then.properties.properties=propertiesSchema}return payload})]}}};const transformObjectToArray=obj=>Object.entries(obj).map(_ref=>{let[fieldName,fieldSettings]=_ref;const{properties:properties,type:type,...others}=fieldSettings;const payload={...others,type:type||"object",fieldName:fieldName};if(properties){payload.properties=transformObjectToArray(properties)}return payload});const transformArrayToObject=array=>array.reduce((total,current)=>{const{fieldName:fieldName,properties:properties,type:type,...others}=current;const payload={...others,type:type||"object"};if(properties){payload.properties=transformArrayToObject(properties)}return{...total,[current.fieldName]:payload}},{});const transformArrayToDiffableObject=array=>array.reduce((total,current,index)=>{const{properties:properties,...others}=current;const payload={...others};if(properties){payload.properties=transformArrayToObject(properties)}return{...total,[index]:payload}},{});const countNodesInTree=array=>array.reduce((total,current)=>{total=total+1;const{properties:properties}=current;if(properties){total=total+countNodesInTree(properties)}return total},0);const ajvInstance=new ajv_default.a;const noAdditionalPropertiesValidator=ajvInstance.compile(noAdditionalJSONSchema);let EDITOR_MODE=function(EDITOR_MODE){EDITOR_MODE["JSON"]="JSON";EDITOR_MODE["VISUAL"]="VISUAL";return EDITOR_MODE}({});var IndexMapping=__webpack_require__(584);const IndexMapping_IndexMapping=(_ref,ref)=>{let{value:propsValue,onChange:propsOnChange,isEdit:isEdit,oldValue:oldValue,readonly:readonly,docVersion:docVersion}=_ref;const value=(propsValue===null||propsValue===void 0?void 0:propsValue.properties)||[];const onChange=val=>{propsOnChange({...propsValue,properties:val})};const allFieldsRef=Object(external_osdSharedDeps_React_["useRef"])({});const JSONEditorRef=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({validate:async()=>{var _JSONEditorRef$curren;const values=await Promise.all(Object.values(allFieldsRef.current).map(item=>item.validate()));const JSONEditorValidateResult=await((_JSONEditorRef$curren=JSONEditorRef.current)===null||_JSONEditorRef$curren===void 0?void 0:_JSONEditorRef$curren.validate());return values.some(item=>item)||JSONEditorValidateResult?"with error":""},getJSONEditorValue:()=>{var _JSONEditorRef$curren2;return((_JSONEditorRef$curren2=JSONEditorRef.current)===null||_JSONEditorRef$curren2===void 0?void 0:_JSONEditorRef$curren2.getValue())||""}}));const[editorMode,setEditorMode]=Object(external_osdSharedDeps_React_["useState"])(EDITOR_MODE.VISUAL);const addField=Object(external_osdSharedDeps_React_["useCallback"])((pos,fieldSettings)=>{const newValue=[...value||[]];const nowProperties=(pos?Object(external_osdSharedDeps_Lodash_["get"])(newValue,pos):newValue)||[];
6nowProperties.push({fieldName:(fieldSettings===null||fieldSettings===void 0?void 0:fieldSettings.fieldName)||"",type:"text",...fieldSettings});if(pos){Object(external_osdSharedDeps_Lodash_["set"])(newValue,pos,nowProperties)}onChange(newValue)},[onChange,value]);const deleteField=Object(external_osdSharedDeps_React_["useCallback"])(pos=>{const newValue=[...value||[]];const splittedArray=pos.split(".");const index=splittedArray[splittedArray.length-1];const prefix=splittedArray.slice(0,-1);const prefixPos=prefix.join(".");const nowProperties=(prefixPos?Object(external_osdSharedDeps_Lodash_["get"])(newValue,prefixPos):newValue)||[];nowProperties.splice(index,1);if(prefixPos){Object(external_osdSharedDeps_Lodash_["set"])(newValue,prefixPos,nowProperties)}onChange(newValue)},[onChange,value]);const transformValueToTreeItems=function(formValue){let pos=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";let isFirstEditableField=false;return(formValue||[]).map((item,index)=>{const{fieldName:fieldName,...fieldSettings}=item;const id=[pos,index].filter(item=>item!=="").join(".properties.");const readonlyFlag=readonly||isEdit&&!!Object(external_osdSharedDeps_Lodash_["get"])(oldValue===null||oldValue===void 0?void 0:oldValue.properties,id);let shouldShowLabel=false;if(!readonlyFlag&&!isFirstEditableField){isFirstEditableField=true;shouldShowLabel=true}const payload={label:external_osdSharedDeps_React_default.a.createElement(components_MappingLabel,{shouldShowLabel:shouldShowLabel,ref:ref=>{if(ref){allFieldsRef.current[id]=ref}else{delete allFieldsRef.current[id]}},readonly:readonlyFlag,value:item,id:`mapping-visual-editor-${id}`,onFieldNameCheck:fieldName=>{const hasDuplicateName=(formValue||[]).filter((sibItem,sibIndex)=>sibIndex<index).some(sibItem=>sibItem.fieldName===fieldName);if(hasDuplicateName){return`Duplicate field name [${fieldName}], please change your field name`}return""},onChange:(val,key,v)=>{const newValue=[...value||[]];Object(external_osdSharedDeps_Lodash_["set"])(newValue,id,val);onChange(newValue)},onDeleteField:()=>{deleteField(id)},onAddSubField:()=>{addField(`${id}.properties`)},onAddSubObject:()=>{addField(`${id}.properties`,{type:"object"})}}),id:`mapping-visual-editor-${id}`,icon:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"arrowRight",style:{visibility:"hidden"}}),iconWhenExpanded:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"arrowDown",style:{visibility:"hidden"}})};if(fieldSettings.properties){payload.icon=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"arrowRight"}),payload.iconWhenExpanded=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"arrowDown"}),payload.children=transformValueToTreeItems(fieldSettings.properties,id)}return payload})};const transformedTreeItems=Object(external_osdSharedDeps_React_["useMemo"])(()=>transformValueToTreeItems(value),[value]);const newValue=Object(external_osdSharedDeps_React_["useMemo"])(()=>{const oldValueKeys=((oldValue===null||oldValue===void 0?void 0:oldValue.properties)||[]).map(item=>item.fieldName);return(value===null||value===void 0?void 0:value.filter((item,index)=>index>=oldValueKeys.length))||[]},[oldValue===null||oldValue===void 0?void 0:oldValue.properties,value]);const renderKey=Object(external_osdSharedDeps_React_["useMemo"])(()=>countNodesInTree(value||[]),[value]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonGroup"],{type:"single",idSelected:editorMode,onChange:id=>setEditorMode(id),legend:"Editor Type",buttonSize:"s",options:[{label:readonly?"Tree view":"Visual Editor",id:EDITOR_MODE.VISUAL,"data-test-subj":"editorTypeVisualEditor"},{label:readonly?"JSON":"JSON Editor",id:EDITOR_MODE.JSON,"data-test-subj":"editorTypeJsonEditor"}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),editorMode===EDITOR_MODE.VISUAL?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,noAdditionalPropertiesValidator(transformArrayToObject(newValue))?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",title:"You have advanced configurations not supported by the visual editor",size:"s"},"To view or modify all of your configurations, switch to the JSON editor."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),transformedTreeItems.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTreeView"],{key:renderKey,expandByDefault:!readonly,className:"index-mapping-tree","aria-labelledby":"label",items:transformValueToTreeItems(value)}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You have no field mappings.")),readonly?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{style:{marginRight:8},"data-test-subj":"createIndexAddFieldButton",onClick:()=>addField("")},"Add new field"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"createIndexAddObjectFieldButton",onClick:()=>addField("",{type:"object"})},"Add new object"))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,isEdit&&!readonly&&!Object(external_osdSharedDeps_Lodash_["isEmpty"])(oldValue)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButton"],{size:"s","data-test-subj":"previousMappingsJsonButton",onClick:()=>{Modal["a"].show({style:{width:"70vw"},title:"Previous mappings",content:external_osdSharedDeps_React_default.a.createElement(MonacoJSONEditor["a"],{readOnly:true,value:JSON.stringify({...oldValue,properties:transformArrayToObject((oldValue===null||oldValue===void 0?void 0:oldValue.properties)||[])},null,2)}),"data-test-subj":"previousMappingsJsonModal",onOk:()=>{}})}},"See previous mappings"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,readonly?external_osdSharedDeps_React_default.a.createElement(MonacoJSONEditor["a"],{ref:JSONEditorRef,value:JSON.stringify({...propsValue,properties:transformArrayToObject(value||[])},null,2),disabled:readonly,readOnly:readonly,width:"100%"}):external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{"data-test-subj":"mappingsJsonEditorFormRow",label:"Specify index mapping",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Specify mapping in JSON format."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,target:"_blank",href:`https://opensearch.org/docs/${docVersion}/opensearch/mappings/#mapping-example-usage`},"View mapping example.")),fullWidth:true},external_osdSharedDeps_React_default.a.createElement(MonacoJSONEditor["a"],{value:JSON.stringify({...propsValue,properties:transformArrayToObject(newValue||[])},null,2),onChange:val=>{const result=JSON.parse(val);propsOnChange({...result,properties:[...(oldValue===null||oldValue===void 0?void 0:oldValue.properties)||[],...transformObjectToArray((result===null||result===void 0?void 0:result.properties)||{})]})},path:`index-mappings-${Date.now()}.json`,diagnosticsOptions:{validate:true,schemas:[{fileMatch:["index-mappings-*.json"],schema:{title:"Index mappings",description:"Index mappings",type:"object",properties:{properties:{$ref:schemaId}}},uri:"ISMIndexMappings"},{schema:IndexMappingsJSONEditorSchema,uri:schemaId}]},width:"100%",ref:JSONEditorRef}))))};var components_IndexMapping_IndexMapping=Object(external_osdSharedDeps_React_["forwardRef"])(IndexMapping_IndexMapping);var components_IndexMapping=components_IndexMapping_IndexMapping;
6const TOAST_MOUNT_ID="EUI_SIMPLE_TOAST_MOUNT_ID";let addToastHandler;let removeAllToastsHandler;let Toast_id=0;const SimpleToast=()=>{const[toasts,setToasts]=Object(external_osdSharedDeps_React_["useState"])([]);addToastHandler=toast=>{setToasts(toasts.concat(toast))};const removeToast=removedToast=>{setToasts(toasts.filter(toast=>toast.id!==removedToast.id))};removeAllToastsHandler=()=>{setToasts([])};Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>{removeAllToastsHandler()},[]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiGlobalToastList"],{toasts:toasts,dismissToast:removeToast,toastLifeTimeMs:6e3})};const SimpleEuiToast={show:props=>{let dom;if(!document.getElementById(TOAST_MOUNT_ID)){dom=document.createElement("div");dom.id=TOAST_MOUNT_ID;dom.setAttribute("data-role","SimpleEuiToast");document.body.appendChild(dom);Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(SimpleToast,props),dom)}else{dom=document.getElementById(TOAST_MOUNT_ID)}addToastHandler({...props,"data-test-subj":`toast_${props.title}`,id:`toast_${Toast_id++}`})},addSuccess:message=>SimpleEuiToast.show({title:message,color:"success"}),addDanger:message=>SimpleEuiToast.show({title:message,color:"danger"})};const WrappedAliasSelect=EuiToolTipWrapper(components_AliasSelect,{disabledKey:"isDisabled"});const formatMappings=mappings=>({...mappings,properties:transformArrayToObject((mappings===null||mappings===void 0?void 0:mappings.properties)||[])});const defaultIndexSettings={index:"",settings:{"index.number_of_shards":1,"index.number_of_replicas":1,"index.refresh_interval":"1s"},mappings:{}};const TemplateInfoCallout=props=>props.visible?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"The index name matches one or more index templates"},"Index alias, settings, and mappings are automatically inherited from matching index templates."):null;const IndexDetail_IndexDetail=(_ref,ref)=>{let{value:value,onChange:onChange,isEdit:isEdit,readonly:readonly,oldValue:oldValue,refreshOptions:refreshOptions,mode:mode,onSimulateIndexTemplate:onSimulateIndexTemplate,sourceIndices:sourceIndices=[],onGetIndexDetail:onGetIndexDetail,onSubmit:onSubmit,refreshIndex:refreshIndex,docVersion:docVersion,withoutPanel:withoutPanel}=_ref;const valueRef=Object(external_osdSharedDeps_React_["useRef"])(value);valueRef.current=value;const hasEdit=Object(external_osdSharedDeps_React_["useRef"])(false);const onValueChange=Object(external_osdSharedDeps_React_["useCallback"])((name,val)=>{let finalValue=valueRef.current||{};Object(external_osdSharedDeps_Lodash_["set"])(finalValue,name,val);onChange({...finalValue});if(name!=="index"){hasEdit.current=true}},[onChange,value]);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const[templateSimulateLoading,setTemplateSimulateLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const[isMatchingTemplate,setIsMatchingTemplate]=Object(external_osdSharedDeps_React_["useState"])(false);const finalValue=value||{};const aliasesRef=Object(external_osdSharedDeps_React_["useRef"])(null);const settingsRef=Object(external_osdSharedDeps_React_["useRef"])(null);const mappingsRef=Object(external_osdSharedDeps_React_["useRef"])(null);const onIndexInputBlur=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{await new Promise(resolve=>setTimeout(resolve,200));if(destroyRef.current){return}if(finalValue.index&&onSimulateIndexTemplate){setTemplateSimulateLoading(true);const result=await onSimulateIndexTemplate(finalValue.index);if(destroyRef.current){return}setTemplateSimulateLoading(false);if(result&&result.ok){let onChangePromise;if(hasEdit.current){onChangePromise=new Promise(resolve=>{Modal["a"].show({title:"Merge your changes with templates?",content:"The index name matches one or more index templates. Index aliases, settings, and mappings are inherited from matching templates. Do you want to merge your changes with templates?",locale:{confirm:"Merge with templates",cancel:"Overwrite by templates"},footer:["cancel","confirm"],type:"confirm","data-test-subj":"simulate-confirm",onCancel:()=>resolve(result.response),onOk:()=>{var _finalValue$mappings;const formatValue={index:"",...finalValue,mappings:{properties:transformArrayToObject(((_finalValue$mappings=finalValue.mappings)===null||_finalValue$mappings===void 0?void 0:_finalValue$mappings.properties)||[])}};const mergedValue={index:finalValue.index||""};Object(external_osdSharedDeps_Lodash_["merge"])(mergedValue,result.response,formatValue);resolve(mergedValue)}})})}else{onChangePromise=Promise.resolve(result.response)}onChangePromise.then(data=>{var _data$mappings;onChange({...data,mappings:{properties:transformObjectToArray((data===null||data===void 0||(_data$mappings=data.mappings)===null||_data$mappings===void 0?void 0:_data$mappings.properties)||{})}});hasEdit.current=false;setIsMatchingTemplate(true)})}else{setIsMatchingTemplate(false)}}},[finalValue.index,onSimulateIndexTemplate]);const onImportSettings=async _ref2=>{let{index:index}=_ref2;if(onGetIndexDetail){var _indexDetail$mappings;
6const indexDetail=await new Promise(resolve=>{if(hasEdit.current){Modal["a"].show({type:"confirm",title:"Confirm",content:"We find that you made some changes to this draft, what action do you want to make?",locale:{confirm:"Overwrite",cancel:"do not import"},onOk:async()=>onGetIndexDetail(index).then(resolve)})}else{onGetIndexDetail(index).then(resolve)}});onChange({...Object(external_osdSharedDeps_Lodash_["omit"])(indexDetail,["aliases","data_stream"]),mappings:{...indexDetail===null||indexDetail===void 0?void 0:indexDetail.mappings,properties:transformObjectToArray((indexDetail===null||indexDetail===void 0||(_indexDetail$mappings=indexDetail.mappings)===null||_indexDetail$mappings===void 0?void 0:_indexDetail$mappings.properties)||{})},settings:Object(external_osdSharedDeps_Lodash_["pick"])((indexDetail===null||indexDetail===void 0?void 0:indexDetail.settings)||{},constants["o"])});SimpleEuiToast.addSuccess(`Settings and mappings of [${index}] have been import successfully`);hasEdit.current=false}};Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({validate:async()=>{var _aliasesRef$current,_mappingsRef$current,_settingsRef$current;const result=await Promise.all([(_aliasesRef$current=aliasesRef.current)===null||_aliasesRef$current===void 0?void 0:_aliasesRef$current.validatePromise().then(result=>result.errors),(_mappingsRef$current=mappingsRef.current)===null||_mappingsRef$current===void 0?void 0:_mappingsRef$current.validate(),(_settingsRef$current=settingsRef.current)===null||_settingsRef$current===void 0?void 0:_settingsRef$current.validatePromise().then(result=>result.errors)]);return result.every(item=>!item)},hasUnsavedChanges:mode=>Object(helpers["a"])(oldValue===null||oldValue===void 0?void 0:oldValue[mode],finalValue[mode]),getMappingsJSONEditorValue:()=>{var _mappingsRef$current2;return((_mappingsRef$current2=mappingsRef.current)===null||_mappingsRef$current2===void 0?void 0:_mappingsRef$current2.getJSONEditorValue())||""},simulateFromTemplate:onIndexInputBlur,importSettings:onImportSettings}));const formFields=Object(external_osdSharedDeps_React_["useMemo"])(()=>[{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of primary shards")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",null,"Specify the number of primary shards for the index. Default is 1. "),external_osdSharedDeps_React_default.a.createElement("div",null,"The number of primary shards cannot be changed after the index is created.")),direction:isEdit?"hoz":"ver"},name:"index.number_of_shards",type:readonly||isEdit&&!constants["n"].includes("index.number_of_shards")?"Text":"Number",options:{rules:[{min:1,message:"Number of primary shards cannot be smaller than 1."},{validator(rule,value,values){if(Number(value)!==parseInt(value)){return Promise.reject("Number of primary shards must be an integer.")}return Promise.resolve()}}],props:{placeholder:"Specify primary shard count.",removeWhenEmpty:true}}},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of replicas")),helpText:constants["A"],direction:isEdit?"hoz":"ver"},name:"index.number_of_replicas",type:readonly||isEdit&&!constants["n"].includes("index.number_of_replicas")?"Text":"Number",options:{rules:[{min:0,message:"Number of replicas cannot be smaller than 0."},{validator(rule,value,values){if(Number(value)!==parseInt(value)){return Promise.reject("Number of replicas must be an integer.")}return Promise.resolve()}}],props:{placeholder:"Specify number of replicas.",removeWhenEmpty:true}}},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Refresh interval")),helpText:"Specify how often the index should refresh, which publishes the most recent changes and make them available for search. Default is 1 second.",direction:isEdit?"hoz":"ver"},name:"index.refresh_interval",type:readonly?"Text":"Input",options:{props:{placeholder:"Can be set to -1 to disable refreshing.",removeWhenEmpty:true}}}],[isEdit,finalValue.index,templateSimulateLoading]);Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>
6{destroyRef.current=true},[]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,isEdit&&!readonly&&filterByMinimatch(value===null||value===void 0?void 0:value.index,utils_constants_0["d"])?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},"This index may contain critical system data. Changing system indexes may break OpenSearch."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,isEdit&&mode&&mode!==constants["w"].alias?null:(()=>{const content=external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{ref:aliasesRef,formFields:[{name:"index",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index name")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,constants["r"]),position:"bottom",style:isEdit?{display:"none"}:{}},type:readonly||isEdit?"Text":"Input",options:{props:{placeholder:"Specify a name for the new index.",onBlur:onIndexInputBlur,isLoading:templateSimulateLoading},rules:[{pattern:constants["s"],message:"Invalid index name."}]}},{name:"templateMessage",rowProps:{fullWidth:true},component:()=>external_osdSharedDeps_React_default.a.createElement(TemplateInfoCallout,{visible:!isEdit&&isMatchingTemplate})},{name:"aliases",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias ",external_osdSharedDeps_React_default.a.createElement(CustomFormRow["a"],null))),helpText:"Allow this index to be referenced by existing aliases or specify a new alias.",direction:isEdit?"hoz":"ver"},options:{props:{refreshOptions:refreshOptions},rules:[...constants["d"]]},component:WrappedAliasSelect}],value:{index:finalValue.index,aliases:finalValue.aliases},onChange:(totalValue,name,val)=>{onValueChange(name,val)}});if(mode&&mode===constants["w"].alias){return content}const title="Define index";if(withoutPanel){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("span",null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),content,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),content),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))})(),sourceIndices.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{"data-test-subj":"moreAction",panelPaddingSize:"none",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right","data-test-subj":"importSettingMappingBtn"},"Import settings and mappings")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,key:sourceIndices.join(","),size:"s",panels:[{id:0,width:400,items:sourceIndices.map(sourceIndex=>({name:sourceIndex,"data-test-subj":`import-settings-${sourceIndex}`,onClick:()=>onImportSettings({index:sourceIndex})}))}]})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,isEdit&&mode&&mode!==constants["w"].settings?null:(()=>{const content=external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{ref:settingsRef,value:{...finalValue.settings},onChange:(totalValue,name,val)=>{if(name){onValueChange(["settings",name],val)}else{onValueChange("settings",val)}},formFields:formFields,hasAdvancedSettings:true,resetValuesWhenPropsValueChange:true,advancedSettingsProps:{editorProps:{mode:isEdit&&!readonly?"diff":"json",disabled:readonly,original:JSON.stringify(getOrderedJson((oldValue===null||oldValue===void 0?void 0:oldValue.settings)||{}),null,2),width:"100%",formatValue:flat_default.a},accordionProps:{initialIsOpen:false,id:"accordionForCreateIndexSettings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h3",null,"Advanced settings")},rowProps:{label:"Specify advanced index settings",fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify a comma-delimited list of settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,href:constants["v"],target:"_blank"},"View index settings.")),external_osdSharedDeps_React_default.a.createElement("p",null,"All the settings will be handled in flat structure."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`https://opensearch.org/docs/${docVersion}/api-reference/index-apis/get-index/#url-parameters`,external:true,target:"_blank"},"Learn more"),"."))}}});if(mode&&mode===constants["w"].settings){return content}const title="Index settings";if(withoutPanel){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),content,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),content),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))})(),isEdit&&mode&&mode!==constants["w"].mappings?null:(()=>{const content=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true},external_osdSharedDeps_React_default.a.createElement(components_IndexMapping,{isEdit:isEdit,value:finalValue===null||finalValue===void 0?void 0:finalValue.mappings,oldValue:oldValue===null||oldValue===void 0?void 0:oldValue.mappings,onChange:val=>onValueChange("mappings",val),ref:mappingsRef,readonly:readonly,docVersion:docVersion}));if(mode&&mode===constants["w"].mappings){return content}if(withoutPanel){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("div",null,"Index mapping")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),content,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null))}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index mapping",external_osdSharedDeps_React_default.a.createElement(CustomFormRow["a"],null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",null,"Define how documents and their fields are stored and indexed."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:`https://opensearch.org/docs/${docVersion}/opensearch/mappings/`},"Learn more")),external_osdSharedDeps_React_default.a.createElement("div",null,"Mappings and field types cannot be changed after the index is created."))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),content)})(),templateSimulateLoading?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiOverlayMask"],{headerZindexLocation:"below"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"l"}),"We are simulating your template with existing templates, please wait for a second."):null,isEdit&&mode===constants["w"].settings&&Object(helpers["a"])(oldValue===null||oldValue===void 0?void 0:oldValue.settings,finalValue.settings)?external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{submitButtonDataTestSubj:"createIndexCreateButton",unsavedCount:Object(helpers["a"])(oldValue===null||oldValue===void 0?void 0:oldValue.settings,finalValue.settings),onClickCancel:async()=>{onValueChange("settings",JSON.parse(JSON.stringify((oldValue===null||oldValue===void 0?void 0:oldValue.settings)||{})))},onClickSubmit:async()=>{const result=await(onSubmit===null||onSubmit===void 0?void 0:onSubmit())||{ok:false};if(result.ok){refreshIndex===null||refreshIndex===void 0||refreshIndex()}}}):null,isEdit&&mode===constants["w"].mappings&&Object(helpers["a"])(formatMappings(oldValue===null||oldValue===void 0?void 0:oldValue.mappings),formatMappings(finalValue.mappings))?external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{submitButtonDataTestSubj:"createIndexCreateButton",unsavedCount:Object(helpers["a"])(formatMappings(oldValue===null||oldValue===void 0?void 0:oldValue.mappings),formatMappings(finalValue.mappings)),onClickCancel:async()=>{onValueChange("mappings",JSON.parse(JSON.stringify((oldValue===null||oldValue===void 0?void 0:oldValue.mappings)||{})))},onClickSubmit:async()=>{const result=await(onSubmit===null||onSubmit===void 0?void 0:onSubmit())||{ok:false};if(result.ok){refreshIndex===null||refreshIndex===void 0||refreshIndex()}}}):null,isEdit&&mode===constants["w"].alias&&Object(helpers["a"])(oldValue===null||oldValue===void 0?void 0:oldValue.aliases,finalValue.aliases)?external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{submitButtonDataTestSubj:"createIndexCreateButton",unsavedCount:Object(helpers["a"])(oldValue===null||oldValue===void 0?void 0:oldValue.aliases,finalValue.aliases),onClickCancel:async()=>{onValueChange("aliases",JSON.parse(JSON.stringify((oldValue===null||oldValue===void 0?void 0:oldValue.aliases)||{})))},onClickSubmit:async()=>{const result=await(onSubmit===null||onSubmit===void 0?void 0:onSubmit())||{ok:false};if(result.ok){refreshIndex===null||refreshIndex===void 0||refreshIndex()}}}):null)};
6var components_IndexDetail_IndexDetail=Object(external_osdSharedDeps_React_["forwardRef"])(IndexDetail_IndexDetail);var components_IndexDetail=components_IndexDetail_IndexDetail;function IndexForm_extends(){return IndexForm_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexForm_extends.apply(null,arguments)}function IndexForm_defineProperty(e,r,t){return(r=IndexForm_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IndexForm_toPropertyKey(t){var i=IndexForm_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function IndexForm_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const getAliasActionsByDiffArray=(oldAliases,newAliases,callback)=>{const diffedAliasArrayes=Object(diff["diffArrays"])(oldAliases,newAliases);return diffedAliasArrayes.reduce((total,current)=>{if(current.added){return[...total,...current.value.map(item=>({add:callback(item)}))]}else if(current.removed){return[...total,...current.value.map(item=>({remove:callback(item)}))]}return total},[])};const findLineNumber=(regexp,str)=>{const propertyExecResult=regexp.exec(str);if(propertyExecResult&&propertyExecResult.indices&&propertyExecResult.indices[1]){const[startPosition]=propertyExecResult.indices[1];const cutString=str.substring(0,startPosition);return cutString.split("\n").length}return 0};class IndexForm_IndexForm extends external_osdSharedDeps_React_["Component"]{static transformIndexDetailToLocal(payload){const newPayload={...payload};Object(external_osdSharedDeps_Lodash_["set"])(newPayload,"mappings.properties",transformObjectToArray(Object(external_osdSharedDeps_Lodash_["get"])(newPayload,"mappings.properties",{})));return newPayload}static transformIndexDetailToRemote(payload){const newPayload={...payload};Object(external_osdSharedDeps_Lodash_["set"])(newPayload,"mappings.properties",transformArrayToObject(Object(external_osdSharedDeps_Lodash_["get"])(newPayload,"mappings.properties",[])));return newPayload}constructor(props){super(props);IndexForm_defineProperty(this,"indexDetailRef",null);IndexForm_defineProperty(this,"hasUnsavedChanges",mode=>{var _this$indexDetailRef;return(_this$indexDetailRef=this.indexDetailRef)===null||_this$indexDetailRef===void 0?void 0:_this$indexDetailRef.hasUnsavedChanges(mode)});IndexForm_defineProperty(this,"getValue",()=>IndexForm_IndexForm.transformIndexDetailToRemote(JSON.parse(JSON.stringify(this.state.indexDetail))));IndexForm_defineProperty(this,"getIndexDetail",async indexName=>{const response=await this.commonService.apiCaller({endpoint:"indices.get",data:{index:indexName,flat_settings:true}});if(response.ok){return response.response[indexName]}this.context.notifications.toasts.addDanger(response.error);return Promise.reject()});IndexForm_defineProperty(this,"refreshIndex",async()=>{this.setState({loading:true});try{const indexDetail=await this.getIndexDetail(this.index);const payload=IndexForm_IndexForm.transformIndexDetailToLocal({...indexDetail,index:this.index});this.setState({indexDetail:payload,oldIndexDetail:JSON.parse(JSON.stringify(payload))})}catch(e){}finally{this.setState({loading:false})}});IndexForm_defineProperty(this,"onCancel",()=>{this.props.onCancel&&this.props.onCancel()});IndexForm_defineProperty(this,"onDetailChange",value=>{this.setState({indexDetail:{...this.state.indexDetail,...value}})});IndexForm_defineProperty(this,"updateAlias",async()=>{const{indexDetail:indexDetail,oldIndexDetail:oldIndexDetail}=this.state;const{index:index}=indexDetail;const aliasActions=getAliasActionsByDiffArray(Object.keys((oldIndexDetail===null||oldIndexDetail===void 0?void 0:oldIndexDetail.aliases)||{}),Object.keys(indexDetail.aliases||{}),alias=>({index:index,alias:alias}));if(aliasActions.length){return await this.commonService.apiCaller({endpoint:"indices.updateAliases",method:"PUT",data:{body:{actions:aliasActions}}})}return Promise.resolve({ok:true,response:{}})});IndexForm_defineProperty(this,"updateSettings",async()=>{const{indexDetail:indexDetail,oldIndexDetail:oldIndexDetail}=this.state;const{index:index}=indexDetail;
6const newSettings=(indexDetail===null||indexDetail===void 0?void 0:indexDetail.settings)||{};const oldSettings=(oldIndexDetail===null||oldIndexDetail===void 0?void 0:oldIndexDetail.settings)||{};const differences=Object(external_osdSharedDeps_Lodash_["differenceWith"])(Object.entries(newSettings),Object.entries(oldSettings),external_osdSharedDeps_Lodash_["isEqual"]);if(!differences.length){return{ok:true,response:{}}}const finalSettings=differences.reduce((total,current)=>{if(newSettings[current[0]]!==undefined){return{...total,[current[0]]:newSettings[current[0]]}}return total},{});return await this.commonService.apiCaller({endpoint:"indices.putSettings",method:"PUT",data:{index:index,flat_settings:true,body:finalSettings}})});IndexForm_defineProperty(this,"updateMappings",async()=>{var _indexDetail$mappings,_oldIndexDetail$mappi;const{indexDetail:indexDetail,oldIndexDetail:oldIndexDetail}=this.state;const{index:index}=indexDetail;const newMappingProperties=(indexDetail===null||indexDetail===void 0||(_indexDetail$mappings=indexDetail.mappings)===null||_indexDetail$mappings===void 0?void 0:_indexDetail$mappings.properties)||[];const diffedMappingArrayes=Object(diff["diffArrays"])(((oldIndexDetail===null||oldIndexDetail===void 0||(_oldIndexDetail$mappi=oldIndexDetail.mappings)===null||_oldIndexDetail$mappi===void 0?void 0:_oldIndexDetail$mappi.properties)||[]).map(item=>item.fieldName),newMappingProperties.map(item=>item.fieldName));const newValue=newMappingProperties.filter((item,index)=>{var _oldIndexDetail$mappi2;return index>=((oldIndexDetail===null||oldIndexDetail===void 0||(_oldIndexDetail$mappi2=oldIndexDetail.mappings)===null||_oldIndexDetail$mappi2===void 0?void 0:_oldIndexDetail$mappi2.properties)||[]).length});const newMappingFields=diffedMappingArrayes.filter(item=>item.added).reduce((total,current)=>[...total,...current.value],[]).map(current=>newValue.find(item=>item.fieldName===current)).filter(item=>item);const newMappingSettings=transformArrayToObject(newMappingFields);if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(indexDetail.mappings,oldIndexDetail===null||oldIndexDetail===void 0?void 0:oldIndexDetail.mappings)){return await this.commonService.apiCaller({endpoint:"indices.putMapping",method:"PUT",data:{index:index,body:{...indexDetail.mappings,properties:newMappingSettings}}})}return Promise.resolve({ok:true,response:{}})});
6IndexForm_defineProperty(this,"chainPromise",async promises=>{const newPromises=[...promises];while(newPromises.length){const result=await newPromises.shift();if(!(result!==null&&result!==void 0&&result.ok)){return result}}return{ok:true,response:{}}});IndexForm_defineProperty(this,"onSubmit",async()=>{var _this$indexDetailRef2;const mode=this.mode;const{indexDetail:indexDetail}=this.state;const{index:index,mappings:mappings,...others}=indexDetail;if(!await((_this$indexDetailRef2=this.indexDetailRef)===null||_this$indexDetailRef2===void 0?void 0:_this$indexDetailRef2.validate())){return{ok:false}}this.setState({isSubmitting:true});let result;if(this.isEdit){let chainedPromises=[];if(!mode){chainedPromises.push(...[this.updateMappings(),this.updateAlias(),this.updateSettings()])}else{switch(mode){case constants["w"].alias:chainedPromises.push(this.updateAlias());break;case constants["w"].settings:chainedPromises.push(this.updateSettings());break;case constants["w"].mappings:chainedPromises.push(this.updateMappings());break}}result=await this.chainPromise(chainedPromises)}else{result=await this.commonService.apiCaller({endpoint:"indices.create",method:"PUT",data:{index:index,body:{...others,mappings:{...mappings,properties:transformArrayToObject((mappings===null||mappings===void 0?void 0:mappings.properties)||[])}}}})}this.setState({isSubmitting:false});if(result&&result.ok){this.context.notifications.toasts.addSuccess(`${indexDetail.index} has been successfully ${this.isEdit?"updated":"created"}.`);this.props.onSubmitSuccess&&this.props.onSubmitSuccess(indexDetail.index)}else{var _this$indexDetailRef3;const mapperParseExceptionReg=/\[mapper_parsing_exception\] unknown parameter \[([^\]]+)\] on mapper \[([^\]]+)\] of type \[([^\]]+)\]/;const mapperTypeParseExceptionReg=/\[mapper_parsing_exception\] No handler for type \[([^\]]+)\] declared on field \[([^\]]+)\]/;const execResult=mapperParseExceptionReg.exec(result.error);const typeParseExceptionResult=mapperTypeParseExceptionReg.exec(result.error);let finalMessage=result.error;const mappingsEditorValue=((_this$indexDetailRef3=this.indexDetailRef)===null||_this$indexDetailRef3===void 0?void 0:_this$indexDetailRef3.getMappingsJSONEditorValue())||"";if(execResult){const jsonRegExp=new RegExp(`"${execResult[2]}":\\s*\\{[\\S\\s]*("${execResult[1]}"\\s*:)[\\S\\s]*\\}`,"d");if(findLineNumber(jsonRegExp,mappingsEditorValue)){finalMessage=`There is a problem with the index mapping syntax. Unknown parameter "${execResult[1]}" on line ${findLineNumber(jsonRegExp,mappingsEditorValue)}.`}}if(typeParseExceptionResult){const jsonRegExp=new RegExp(`"${typeParseExceptionResult[2]}":\\s*\\{[\\S\\s]*("type":\\s*"${typeParseExceptionResult[1]}"\\s*)[\\S\\s]*\\}`,"d");if(findLineNumber(jsonRegExp,mappingsEditorValue)){finalMessage=`There is a problem with the index mapping syntax. Unsupported type "${typeParseExceptionResult[1]}" on line ${findLineNumber(jsonRegExp,mappingsEditorValue)}.`}}this.context.notifications.toasts.addDanger(finalMessage)}return result});IndexForm_defineProperty(this,"onSimulateIndexTemplate",indexName=>this.commonService.apiCaller({endpoint:"transport.request",data:{path:`/_index_template/_simulate_index/${indexName}`,method:"POST"}}).then(res=>{if(res.ok&&res.response&&res.response.template){var _res$response$templat;return{...res,response:{...res.response.template,settings:flat_default()(((_res$response$templat=res.response.template)===null||_res$response$templat===void 0?void 0:_res$response$templat.settings)||{},{safe:true})}}}return{ok:false,error:""}}));const isEdit=this.isEdit;this.state={isSubmitting:false,indexDetail:Object(external_osdSharedDeps_Lodash_["merge"])({},defaultIndexSettings,IndexForm_IndexForm.transformIndexDetailToLocal(props.value)),oldIndexDetail:undefined,loading:isEdit}}componentDidMount(){const isEdit=this.isEdit;if(isEdit){this.refreshIndex()}}componentDidUpdate(prevProps,prevState){if(prevProps.dataSourceId!=this.props.dataSourceId){this.setState({isSubmitting:false,indexDetail:Object(external_osdSharedDeps_Lodash_["merge"])({},defaultIndexSettings,IndexForm_IndexForm.transformIndexDetailToLocal(this.props.value)),oldIndexDetail:undefined})}}get commonService(){return this.props.services.commonService}get index(){return this.props.index}get isEdit(){return this.index!==undefined}get mode(){return this.props.mode}render(){const isEdit=this.isEdit;const{hideButtons:hideButtons,readonly:readonly,useUpdatedUX:useUpdatedUX}=this.props;const{indexDetail:indexDetail,isSubmitting:isSubmitting,oldIndexDetail:oldIndexDetail,loading:loading}=this.state;if(loading){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"l"})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_IndexDetail,{key:this.props.dataSourceId,readonly:readonly,mode:this.mode,ref:ref=>this.indexDetailRef=ref,isEdit:this.isEdit,value:indexDetail,oldValue:oldIndexDetail,onChange:this.onDetailChange,onSimulateIndexTemplate:this.onSimulateIndexTemplate,sourceIndices:this.props.sourceIndices,onGetIndexDetail:this.getIndexDetail,refreshOptions:aliasName=>this.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${aliasName||""}*`,s:"alias:desc"}}),onSubmit:this.onSubmit,refreshIndex:this.refreshIndex,docVersion:this.context.docLinks.DOC_LINK_VERSION}),hideButtons?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"createIndexCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:isSubmitting,"data-test-subj":"createIndexCreateButton"}
6,isEdit?"Update":"Create")))))}}IndexForm_defineProperty(IndexForm_IndexForm,"contextType",core_services["b"]);var containers_IndexForm=Object(external_osdSharedDeps_React_["forwardRef"])((function IndexFormWrapper(props,ref){const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);return external_osdSharedDeps_React_default.a.createElement(IndexForm_IndexForm,IndexForm_extends({},props,{ref:ref,services:services}))}));function CreateIndex_extends(){return CreateIndex_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateIndex_extends.apply(null,arguments)}function CreateIndex_defineProperty(e,r,t){return(r=CreateIndex_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateIndex_toPropertyKey(t){var i=CreateIndex_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateIndex_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateIndex_CreateIndex extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);CreateIndex_defineProperty(this,"componentDidMount",async()=>{const isEdit=this.isEdit;const breadCrumbs=this.props.useUpdatedUX?[constants["f"].INDICES,isEdit?constants["f"].EDIT_INDEX:constants["f"].CREATE_INDEX]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,isEdit?constants["f"].EDIT_INDEX:constants["f"].CREATE_INDEX];this.context.chrome.setBreadcrumbs(breadCrumbs)});CreateIndex_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].INDICES)})}get index(){return this.props.match.params.index}get isEdit(){return this.props.match.params.index!==undefined}render(){const isEdit=this.isEdit;return this.props.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,{index:this.index,mode:this.props.match.params.mode,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].INDICES),dataSourceId:this.props.dataSourceId,useUpdatedUX:this.props.useUpdatedUX})):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,isEdit?"Edit":"Create"," index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,{index:this.index,mode:this.props.match.params.mode,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].INDICES),dataSourceId:this.props.dataSourceId,useUpdatedUX:this.props.useUpdatedUX}))}}CreateIndex_defineProperty(CreateIndex_CreateIndex,"contextType",core_services["b"]);var containers_CreateIndex_CreateIndex=function(props){const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(CreateIndex_CreateIndex,CreateIndex_extends({}
6,props,dataSourceMenuProperties,{useUpdatedUX:useUpdatedUX}))};var containers_CreateIndex=containers_CreateIndex_CreateIndex;var pages_CreateIndex=containers_CreateIndex;const ReindexAdvancedOptions=props=>{let pipelinesInit=[];const[pipelines,SetPipelines]=Object(external_osdSharedDeps_React_["useState"])(pipelinesInit);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const{slices:slices,sliceErr:sliceErr,onSlicesChange:onSlicesChange,selectedPipelines:selectedPipelines,onSelectedPipelinesChange:onSelectedPipelinesChange,getAllPipelines:getAllPipelines,ignoreConflicts:ignoreConflicts,onIgnoreConflictsChange:onIgnoreConflictsChange,reindexUniqueDocuments:reindexUniqueDocuments,onReindexUniqueDocumentsChange:onReindexUniqueDocumentsChange}=props;const sliceEnabled=slices!==undefined;const sliceOption=slices==="auto"?"auto":"manual";const showSliceInput=sliceEnabled&&sliceOption==="manual";Object(external_osdSharedDeps_React_["useEffect"])(()=>{getAllPipelines().then(pipelines=>{SetPipelines(pipelines)}).catch(err=>{coreServices.notifications.toasts.addDanger(`fetch pipelines error ${err}`)})},[coreServices,getAllPipelines]);return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Reindex only unique documents")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"You can choose to copy only the documents that do not exist in the destination index. By default, OpenSearch will copy all documents from the source index."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:coreServices.docLinks.links.opensearch.reindexData.unique,target:"_blank"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"uniqueCheckbox",label:"Reindex only unique documents",checked:reindexUniqueDocuments,onChange:onReindexUniqueDocumentsChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Version conflicts")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Instead of failing the reindexing operation, ignore any version conflicts during reindexing."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:coreServices.docLinks.links.opensearch.reindexData.unique,target:"_blank"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"ConflictsOptionCheckbox",label:"Ignore conflicts during reindexing",checked:ignoreConflicts,onChange:onIgnoreConflictsChange})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Slice reindexing operation")),helpText:"Divide this reindexing operation into smaller subtasks to run in parallel."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedCheckbox"],{id:"sliceEnabledCheckBox","data-test-subj":"sliceEnabled",label:"Slice this reindexing operation",checked:sliceEnabled,onChange:e=>{onSlicesChange(e.target.checked?"auto":undefined)}}),sliceEnabled?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:[{id:"auto",label:"Automatic"},{id:"manual",label:"Manually slice into subtasks"}],idSelected:sliceOption,onChange:id=>{onSlicesChange(id==="auto"?"auto":"")},name:"sliceOption","data-test-subj":"sliceOption"})):null)),showSliceInput?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{isInvalid:!!sliceErr,error:sliceErr,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of subtasks")),helpText:"Specify the number of subtasks to divide this operation into."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldNumber"],{"data-test-subj":"slice
6s",value:slices,placeholder:"Specify a number",type:"number",min:2,onChange:e=>onSlicesChange(e.target.value)}))):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Transform with ingest pipeline ",external_osdSharedDeps_React_default.a.createElement(CustomFormRow["a"],null)))),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Select an ingest pipeline to transform documents before writing data to the destination."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:coreServices.docLinks.links.opensearch.reindexData.transform,target:"_blank"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{"aria-label":"Ingest Pipeline",placeholder:"Select an ingest pipeline","data-test-subj":"pipelineCombobox",singleSelection:{asPlainText:true},options:pipelines,selectedOptions:selectedPipelines,onChange:onSelectedPipelinesChange})))};var ReindexAdvancedOptions_ReindexAdvancedOptions=ReindexAdvancedOptions;var components_ReindexAdvancedOptions=ReindexAdvancedOptions_ReindexAdvancedOptions;const DATA_STREAM_REGEX=/^.ds-(.*)-\d{6}$/;const DEFAULT_SLICE="1";const constants_DEFAULT_QUERY=JSON.stringify({query:{match_all:{}}},null,2);const constants_REINDEX_ERROR_PROMPT={DEST_REQUIRED:"Destination is required.",SOURCE_REQUIRED:"Source is required.",HEALTH_RED:"health status is red.",SLICES_FORMAT_ERROR:"Must be an integer greater than or equal to 2."};const parseIndexNames=indices=>{let indexArray=[];indices&&indices.split(",").forEach(index=>{if(DATA_STREAM_REGEX.test(index)){let match=index.match(DATA_STREAM_REGEX);indexArray.push(match?match[1]:index)}else{indexArray.push(index)}});return indexArray};const checkDuplicate=(sources,destination)=>{let expandedSource=[],expandedDestination=[];sources.forEach(item=>{var _item$value,_item$value2;expandedSource.push(item.label);((_item$value=item.value)===null||_item$value===void 0?void 0:_item$value.isAlias)&&item.value.indices&&expandedSource.push(...item.value.indices);((_item$value2=item.value)===null||_item$value2===void 0?void 0:_item$value2.isDataStream)&&item.value.indices&&expandedSource.push(...item.value.indices)});destination.forEach(item=>{var _item$value3,_item$value4;expandedDestination.push(item.label);((_item$value3=item.value)===null||_item$value3===void 0?void 0:_item$value3.isAlias)&&item.value.writingIndex&&expandedDestination.push(item.value.writingIndex);((_item$value4=item.value)===null||_item$value4===void 0?void 0:_item$value4.isDataStream)&&item.value.writingIndex&&expandedDestination.push(item.value.writingIndex)});const duplicate=external_osdSharedDeps_Lodash_default.a.intersection(expandedSource,expandedDestination);if(duplicate.length>0){return`Index [${duplicate.join(",")}] both exists in source and destination`}return null};const filterOverlaps=(list,excludeList)=>{if(excludeList){list.map(it=>{var _it$options;it.options=(_it$options=it.options)===null||_it$options===void 0?void 0:_it$options.filter(item=>!checkDuplicate(excludeList,[item]))})}return list};function IndexSelect(props){const[indexOptions,setIndexOptions]=Object(external_osdSharedDeps_React_["useState"])([]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const searchIndex=searchValue=>{props.getIndexOptions(searchValue?searchValue:"",props.excludeDataStreamIndex).then(options=>{props.excludeSystemIndex&&filterSystemIndices(options);setIndexOptions(filterOverlaps(options,props.excludeList))}).catch(err=>{coreServices.notifications.toasts.addDanger(`fetch indices error ${err}`)})};Object(external_osdSharedDeps_React_["useEffect"])(()=>{searchIndex()},[props.getIndexOptions,props.excludeList,props.excludeDataStreamIndex,props.excludeSystemIndex]);const onSearchChange=searchValue=>{searchIndex(searchValue)};const filterSystemIndices=list=>{list.map(it=>{var _it$options,_it$options2;it.options=(_it$options=it.options)===null||_it$options===void 0?void 0:_it$options.filter(item=>!filterByMinimatch(item.label,utils_constants_0["c"]));it.options=(_it$options2=it.options)===null||_it$options2===void 0?void 0:_it$options2.filter(item=>!filterByMinimatch(item.label,utils_constants_0["d"]))})};return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{"data-test-subj":props["data-test-subj"],placeholder:props.placeholder,options:indexOptions,async:true,selectedOptions:props.selectedOption,onChange:props.onSelectedOptions,onSearchChange:onSearchChange,isClearable:true,singleSelection:props.singleSelect?{asPlainText:true}:false}))}var components_IndexSelect=IndexSelect;function CreateIndexFlyout_extends(){return CreateIndexFlyout_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateIndexFlyout_extends.apply(null,arguments)}function CreateIndexFlyout_defineProperty(e,r,t){return(r=CreateIndexFlyout_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateIndexFlyout_toPropertyKey(t){var i=CreateIndexFlyout_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateIndexFlyout_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateIndexFlyout_CreateIndexFlyout extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);CreateIndexFlyout_defineProperty(this,"createIndexRef",null)}render(){const{onCloseFlyout:onCloseFlyout}=this.props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{onClose:()=>{},hideCloseButton:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",{id:"flyoutTitle"}," Create Index "))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,CreateIndexFlyout_extends({ref:ref=>this.createIndexRef=ref,hideButtons:true},this.props))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutFooter"],null,external_osdSharedDeps_React_default.a.createElement(components_FlyoutFooter,{action:"",text:"Create",edit:false,onClickCancel:onCloseFlyout,onClickAction:()=>{var _this$createIndexRef;return(_this$createIndexRef=this.createIndexRef)===null||_this$createIndexRef===void 0?void 0:_this$createIndexRef.onSubmit()}})))}}CreateIndexFlyout_defineProperty(CreateIndexFlyout_CreateIndexFlyout,"contextType",core_services["b"]);var components_CreateIndexFlyout=CreateIndexFlyout_CreateIndexFlyout;function Reindex_extends(){return Reindex_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Reindex_extends.apply(null,arguments)}function Reindex_defineProperty(e,r,t){return(r=Reindex_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Reindex_toPropertyKey(t){var i=Reindex_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Reindex_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class Reindex_Reindex extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);Reindex_defineProperty(this,"notificationRef",null);Reindex_defineProperty(this,"getIndexOptions",async(searchValue,excludeDataStreamIndex)=>{const{indexService:indexService}=this.props;let options=[];try{let actualSearchValue=parseIndexNames(searchValue);const[indexResponse,dataStreamResponse,aliasResponse]=await Promise.all([indexService.getIndices({from:0,size:50,search:actualSearchValue.join(","),indices:[actualSearchValue.join(",")],sortDirection:"desc",sortField:"index",showDataStream
6s:!excludeDataStreamIndex}),indexService.getDataStreams({search:searchValue.trim()}),indexService.getAliases({search:searchValue.trim()})]);if(indexResponse.ok){const indices=indexResponse.response.indices.map(index=>({label:index.index,value:{isIndex:true,status:index.status,health:index.health}}));options.push({label:"indices",options:indices})}else{this.context.notifications.toasts.addDanger(indexResponse.error)}if(dataStreamResponse&&dataStreamResponse.ok){const dataStreams=dataStreamResponse.response.dataStreams.map(ds=>({label:ds.name,health:ds.status.toLowerCase(),value:{isDataStream:true,indices:ds.indices.map(item=>item.index_name),writingIndex:ds.indices.map(item=>item.index_name).sort().reverse()[0]}}));options.push({label:"dataStreams",options:dataStreams})}if(aliasResponse&&aliasResponse.ok){const aliases=external_osdSharedDeps_Lodash_default.a.uniq(aliasResponse.response.aliases.map(alias=>alias.alias)).map(name=>{const indexBelongsToAlias=aliasResponse.response.aliases.filter(alias=>alias.alias===name).map(alias=>alias.index);let writingIndex=aliasResponse.response.aliases.filter(alias=>alias.alias===name&&alias.is_write_index==="true").map(alias=>alias.index);if(writingIndex.length===0&&indexBelongsToAlias.length===1){writingIndex=indexBelongsToAlias}return{label:name,value:{isAlias:true,indices:indexBelongsToAlias,writingIndex:writingIndex[0]}}});options.push({label:"aliases",options:aliases})}else{this.context.notifications.toasts.addDanger(aliasResponse.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem fetching index options."))}return options});Reindex_defineProperty(this,"getAllPipelines",async()=>{const{commonService:commonService}=this.props;let pipelines=[];const pipelineRes=await commonService.apiCaller({endpoint:"ingest.getPipeline"});if(pipelineRes&&pipelineRes.ok){pipelines=external_osdSharedDeps_Lodash_default.a.keys(pipelineRes.response).map(pipeline=>({label:pipeline}))}else{if(pipelineRes.error.indexOf("Not Found")===-1){throw new Error((pipelineRes===null||pipelineRes===void 0?void 0:pipelineRes.error)||"")}}return pipelines});Reindex_defineProperty(this,"onClickAction",async()=>{const{sourceQuery:sourceQuery,destination:destination,slices:slices,selectedPipelines:selectedPipelines,ignoreConflicts:ignoreConflicts,sources:sources,subset:subset,reindexUniqueDocuments:reindexUniqueDocuments,advancedSettingsOpen:advancedSettingsOpen}=this.state;if(!await this.validateSource(sources)||!this.validateDestination(destination)||!this.validateSlices(slices)){return}if(subset&&!await this.validateQueryDSL(sources,sourceQuery)){return}if(advancedSettingsOpen){var _this$notificationRef;const result=await((_this$notificationRef=this.notificationRef)===null||_this$notificationRef===void 0?void 0:_this$notificationRef.validatePromise());if(result!==null&&result!==void 0&&result.errors){return}}const[isDestAsDataStream]=destination.map(dest=>{var _dest$value;return(_dest$value=dest.value)===null||_dest$value===void 0?void 0:_dest$value.isDataStream});try{this.setState({executing:true});let reindexReq={waitForCompletion:false,slices:slices===undefined?DEFAULT_SLICE:slices,body:{conflicts:ignoreConflicts?"proceed":"abort",source:{index:sources.map(item=>item.label).join(",")},dest:{index:destination.map(item=>item.label)[0],op_type:isDestAsDataStream||reindexUniqueDocuments?"create":"index"}}};if(subset){Object.assign(reindexReq.body.source,JSON.parse(sourceQuery))}if(selectedPipelines&&selectedPipelines.length>0){reindexReq.body.dest.pipeline=selectedPipelines[0].label}const result=await this.onReindexConfirm(reindexReq);const destinationItem=destination[0];if(result.ok){var _result$response2,_result$response3,_destinationItem$valu,_destinationItem$valu2,_destinationItem$valu3;if(advancedSettingsOpen){var _this$notificationRef2,_result$response;(_this$notificationRef2=this.notificationRef)===null||_this$notificationRef2===void 0||_this$notificationRef2.associateWithTask({taskId:((_result$response=result.response)===null||_result$response===void 0?void 0:_result$response.taskId)||""})}const clusterInfo=await Object(helpers["c"])({commonService:this.props.commonService});await JobSchedulerContext["a"].addJob({type:JobScheduler["b"].REINDEX,extras:{clusterInfo:clusterInfo,toastId:(_result$response2=result.response)===null||_result$response2===void 0?void 0:_result$response2.toastId,sourceIndex:reindexReq.body.source.index,destIndex:reindexReq.body.dest.index,taskId:(_result$response3=result.response)===null||_result$response3===void 0?void 0:_result$response3.taskId,destType:(_destinationItem$valu=destinationItem.value)!==null&&_destinationItem$valu!==void 0&&_destinationItem$valu.isIndex?"index":"other",writingIndex:(_destinationItem$valu2=destinationItem.value)!==null&&_destinationItem$valu2!==void 0&&_destinationItem$valu2.isIndex?destinationItem.label:(_destinationItem$valu3=destinationItem.value)===null||_destinationItem$valu3===void 0?void 0:_destinationItem$valu3.writingIndex},interval:3e4})}this.setState({executing:false});this.onCancel()}catch(error){this.context.notifications.toasts.addDanger(`Reindex operation error happened ${error}`);this.setState({executing:false})}});Reindex_defineProperty(this,"onReindexConfirm",async reindexRequest=>{const res=await this.props.commonService.apiCaller({endpoint:"transport.request",method:utils_constants_0["b"].POST,data:{path:`_reindex?
6slices=${reindexRequest.slices}&wait_for_completion=${reindexRequest.waitForCompletion}`,method:utils_constants_0["b"].POST,body:reindexRequest.body}});let response={ok:res.ok};if(res&&res.ok){const toast=`Successfully started reindexing ${reindexRequest.body.source.index}. The reindexed index will be named ${reindexRequest.body.dest.index}.`;const toastInstance=this.context.notifications.toasts.addSuccess(toast,{toastLifeTimeMs:1e3*60*60*24*5});response.response={toastId:toastInstance.id,taskId:res.response.task}}else{this.context.notifications.toasts.addDanger(`Reindex operation error ${res===null||res===void 0?void 0:res.error}`)}return response});Reindex_defineProperty(this,"getAllSelectedIndices",()=>{const{sources:sources}=this.state;let result=[];sources.forEach(item=>{var _item$value,_item$value2,_item$value3;((_item$value=item.value)===null||_item$value===void 0?void 0:_item$value.isIndex)&&result.push(item.label);((_item$value2=item.value)===null||_item$value2===void 0?void 0:_item$value2.isAlias)&&item.value.indices&&result.push(...item.value.indices);((_item$value3=item.value)===null||_item$value3===void 0?void 0:_item$value3.isDataStream)&&item.value.writingIndex&&result.push(item.value.writingIndex)});return result});Reindex_defineProperty(this,"validateDestination",selectedOptions=>{var _dest$value2,_dest$value3,_dest$value4;const{sources:sources}=this.state;if(!selectedOptions||selectedOptions.length!=1){this.setState({destError:constants_REINDEX_ERROR_PROMPT.DEST_REQUIRED});return false}const[dest]=selectedOptions;if(((_dest$value2=dest.value)===null||_dest$value2===void 0?void 0:_dest$value2.health)==="red"){this.setState({destError:`Index [${dest.label}] ${constants_REINDEX_ERROR_PROMPT.HEALTH_RED}`});return false}if(((_dest$value3=dest.value)===null||_dest$value3===void 0?void 0:_dest$value3.status)==="close"){this.setState({destError:`Index [${dest.label}] status is closed.`});return false}if((_dest$value4=dest.value)!==null&&_dest$value4!==void 0&&_dest$value4.isAlias){var _dest$value5;if(!((_dest$value5=dest.value)!==null&&_dest$value5!==void 0&&_dest$value5.writingIndex)){this.setState({destError:`Alias [${dest.label}] don't have writing index behind it.`});return false}}const error=checkDuplicate(sources,selectedOptions);if(error){this.setState({destError:error});return false}return true});Reindex_defineProperty(this,"validateSource",async sourceIndices=>{if(sourceIndices.length==0){this.setState({sourceErr:[constants_REINDEX_ERROR_PROMPT.SOURCE_REQUIRED]});return false}let errors=[];for(const source of sourceIndices){var _source$value;if(((_source$value=source.value)===null||_source$value===void 0?void 0:_source$value.health)==="red"){errors.push(`Index [${source.label}] ${constants_REINDEX_ERROR_PROMPT.HEALTH_RED}`)}}const{commonService:commonService}=this.props;sourceIndices.filter(item=>{var _item$value4;return((_item$value4=item.value)===null||_item$value4===void 0?void 0:_item$value4.status)==="close"}).forEach(item=>{errors.push(`Index [${item.label}] status is closed.`)});const res=await commonService.apiCaller({endpoint:"indices.getFieldMapping",data:{fields:"_source",index:sourceIndices.filter(item=>{var _item$value5;return((_item$value5=item.value)===null||_item$value5===void 0?void 0:_item$value5.status)!=="close"}).map(item=>item.label).join(",")}});if(res&&res.ok){for(const index of sourceIndices){const sourceEnabled=external_osdSharedDeps_Lodash_default.a.get(res.response,[index.label,"mappings","_source","mapping","_source","enabled"]);if(sourceEnabled===false){errors.push(`Index [${index.label}] _sources is not enabled`)}}}else{this.context.notifications.toasts.addDanger((res===null||res===void 0?void 0:res.error)||"can't validate whether _source is enabled for source")}const error=checkDuplicate(sourceIndices,this.state.destination);error&&this.setState({destError:error});this.setState({sourceErr:errors});return errors.length===0});Reindex_defineProperty(this,"validateSlices",slices=>
6{if(slices===undefined||slices==="auto")return true;const sliceRegex=/^[2-9][0-9]*$/;if(!sliceRegex.test(slices)){this.setState({sliceError:constants_REINDEX_ERROR_PROMPT.SLICES_FORMAT_ERROR});return false}return true});Reindex_defineProperty(this,"validateQueryDSL",async(sourceIndices,queryString)=>{if(!queryString)return true;const{commonService:commonService}=this.props;const validateRes=await commonService.apiCaller({endpoint:"indices.validateQuery",data:{index:sourceIndices.map(item=>item.label).join(","),body:{...JSON.parse(queryString)}}});if(validateRes&&validateRes.ok){const valid=validateRes.response.valid;if(!valid){this.setState({sourceQueryErr:"Invalid query expression"});return false}}return true});Reindex_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].INDICES)});Reindex_defineProperty(this,"onCreateIndexSuccess",indexName=>{const option=[{label:indexName,value:{isIndex:true}}];this.setState({destination:option,showCreateIndexFlyout:false,destError:null})});Reindex_defineProperty(this,"onSourceSelection",async selectedOptions=>{this.setState({sources:selectedOptions,sourceErr:[]});await this.validateSource(selectedOptions)});Reindex_defineProperty(this,"onDestinationSelection",selectedOptions=>{this.setState({destination:selectedOptions,destError:null});this.validateDestination(selectedOptions)});Reindex_defineProperty(this,"onSourceQueryChange",async value=>{this.setState({sourceQuery:value,sourceQueryErr:undefined});await this.validateQueryDSL(this.state.sources,value)});Reindex_defineProperty(this,"onSliceChange",val=>{this.setState({slices:val,sliceError:undefined});this.validateSlices(val)});Reindex_defineProperty(this,"onPipelineChange",selectedOptions=>{this.setState({selectedPipelines:selectedOptions})});Reindex_defineProperty(this,"onIgnoreConflictsChange",e=>{this.setState({ignoreConflicts:e.target.checked})});Reindex_defineProperty(this,"onReindexUniqueDocuments",e=>{this.setState({reindexUniqueDocuments:e.target.checked})});Reindex_defineProperty(this,"onSubsetChange",event=>{this.setState({subset:event.target.checked})});this.state={sources:[],indexOptions:[],destination:[],sourceQuery:constants_DEFAULT_QUERY,pipelines:[],advancedSettingsOpen:false,ignoreConflicts:false,sourceErr:[],destError:null,subset:false,executing:false,showCreateIndexFlyout:false,reindexUniqueDocuments:false}}async componentDidMount(){const breadCrumbs=this.props.useUpdatedUX?[constants["f"].INDICES,{...constants["f"].REINDEX,href:`#${this.props.location.pathname}${this.props.location.search}`}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,{...constants["f"].REINDEX,href:`#${this.props.location.pathname}${this.props.location.search}`}];this.context.chrome.setBreadcrumbs(breadCrumbs);const{source:source}=query_string_default.a.parse(this.props.location.search);if(typeof source==="string"){const allOptions=await this.getIndexOptions(source);const arr=source.split(",");if(allOptions&&allOptions.length>0&&allOptions[0].options){const selectedSource=allOptions[0].options.filter(item=>arr.indexOf(item.label)!==-1);await this.onSourceSelection(selectedSource)}}}render(){const{sources:sources,destination:destination,sourceQuery:sourceQuery,destError:destError,slices:slices,sourceErr:sourceErr,advancedSettingsOpen:advancedSettingsOpen,showCreateIndexFlyout:showCreateIndexFlyout}=this.state;const{ignoreConflicts:ignoreConflicts,reindexUniqueDocuments:reindexUniqueDocuments,subset:subset,executing:executing,sourceQueryErr:sourceQueryErr}=this.state;const advanceTitle=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"none",justifyContent:"flexStart",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:advancedSettingsOpen?"arrowDown":"arrowRight",color:"text","data-test-subj":"advanceOptionToggle",onClick:()=>{this.setState({advancedSettingsOpen:!this.state.advancedSettingsOpen})},"aria-label":"drop down icon"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings"))));const subTitleText=external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:"",helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Use reindex to make extensive changes to your index. Reindex will copy data of the source index into another index."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:this.context.docLinks.links.opensearch.reindexData.base,target:"_blank",rel:"noopener noreferrer"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null));const descriptionData=[{description:"Shrink an existing index into a new index with fewer primary shards.",links:{label:"Learn more",href:this.context.docLinks.links.opensearch.reindexData.base,iconType:"popout",iconSide:"right",controlType:"link"}}];const allSelectedIndices=this.getAllSelectedIndices();const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure source index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Specify source indexes or data streams")),isInvalid:sourceErr.length>0,error:sourceErr,fullWidth:true,helpText:"Specify one or more indexes or data streams you want to reindex from."},external_osdSharedDeps_React_default.a.createElement(components_IndexSelect,{"data-test-subj":"sourceSelector",placeholder:"Select indexes or data streams",getIndexOptions:this.getIndexOptions,onSelectedOptions:this.onSourceSelection,singleSelect:false,selectedOption:sources,excludeList:destination})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:[{id:"all",label:"Reindex all documents"},{id:"subset",label:"Reindex a subset of documents (Advanced)"}],idSelected:subset?"subset":"all",onChange:id=>{this.setState({subset:id==="subset"})},name:"subsetOption","data-test-subj":"subsetOption",legend:{children:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Specify a reindex option"))}})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),subset?external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:"Query expression",isInvalid:!!sourceQueryErr,error:sourceQueryErr,labelAppend:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:this.context.docLinks.links.opensearch.queryDSL.base,target:"_blank",rel:"noopener noreferrer"},"Learn more about query DSL"))},external_osdSharedDeps_React_default.a.createElement(JSONEditor["a"],{mode:"json",width:"100%",value:sourceQuery,onChange:this.onSourceQueryChange,"aria-label":"Query DSL Editor",height:"200px","data-test-subj":"queryJsonEditor"})):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure destination index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{maxWidth:"400px"}},external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Specify a destination index or data stream")),isInvalid:!!destError,error:destError},external_osdSharedDeps_React_default.a.createElement(components_IndexSelect,{"data-test-subj":"destinationSelector",placeholder:"Select an index or data stream",getIndexOptions:this.getIndexOptions,onSelectedOptions:this.onDestinationSelection,singleSelect:true,selectedOption:destination,excludeDataStreamIndex:true,excludeList:sources,excludeSystemIndex:true}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"createIndexButton",onClick:()=>this.setState({showCreateIndexFlyout:true})},"Create index")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,advanceTitle,advancedSettingsOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_ReindexAdvancedOptions,{slices:slices,onSlicesChange:this.onSliceChange,sliceErr:this.state.sliceError,getAllPipelines:this.getAllPipelines,selectedPipelines:this.state.selectedPipelines,onSelectedPipelinesChange:this.onPipelineChange,ignoreConflicts:ignoreConflicts,onIgnoreConflictsChange:this.onIgnoreConflictsChange,reindexUniqueDocuments:reindexUniqueDocuments,onReindexUniqueDocumentsChange:this.onReindexUniqueDocuments}),external_osdSharedDeps_React_default.a.createElement(containers_NotificationConfig,{ref:ref=>this.notificationRef=ref,actionType:ActionType.REINDEX}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,"data-test-subj":"reindexCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onClickAction,isLoading:executing,"data-test-subj":"reindexConfirmButton"},"Reindex"))),showCreateIndexFlyout?external_osdSharedDeps_React_default.a.createElement(components_CreateIndexFlyout,{onSubmitSuccess:this.onCreateIndexSuccess,sourceIndices:allSelectedIndices,onCloseFlyout:()=>this.setState({showCreateIndexFlyout:false})}):null);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();
6return this.props.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:descriptionData,setMountPoint:setAppDescriptionControls}),Common()):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Reindex")),subTitleText,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common())}}Reindex_defineProperty(Reindex_Reindex,"contextType",core_services["b"]);var container_Reindex_Reindex=function(props){useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(Reindex_Reindex,Reindex_extends({},props,{useUpdatedUX:useUpdatedUX}))};var container_Reindex=container_Reindex_Reindex;const Aliases_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const Aliases_utils_constants_DEFAULT_QUERY_PARAMS={from:"0",size:"20",search:"",sortField:"alias",sortDirection:constants["I"].DESC,status:"",dataSourceId:""};function DeleteAliasModal(props){const[value,setValue]=Object(external_osdSharedDeps_React_["useState"])("");const{onClose:onClose,visible:visible,selectedItems:selectedItems,onDelete:onDelete}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible){setValue("")}},[visible]);const onConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{if(services){const result=await services.commonService.apiCaller({endpoint:"indices.deleteAlias",data:{index:selectedItems.reduce((total,current)=>[...total,...current.indexArray||[]],[]),name:selectedItems.map(item=>item.alias)}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`Delete [${selectedItems.map(item=>item.alias).join(", ")}] successfully`);onDelete()}else{coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}}},[selectedItems,services,coreServices,onDelete]);if(!visible){return null}const hasSystemIndex=props.selectedItems.some(index=>filterByMinimatch(index.alias,utils_constants_0["c"]));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete aliases")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,hasSystemIndex?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",size:"s"},"These aliases may contain critical system data. Deleting system aliases may break OpenSearch."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"The following alias will be permanently deleted. This action cannot be undone.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item.alias}
6,item.alias)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s"},"To confirm your action, type ",external_osdSharedDeps_React_default.a.createElement("b",{style:{color:"#000"}},"delete"),"."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{"data-test-subj":"deleteInput",placeholder:"delete",fullWidth:true,value:value,onChange:e=>setValue(e.target.value)}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"deleteConfirmButton",onClick:onConfirm,fill:true,color:"danger",disabled:value!=="delete"},"Delete")))}var containers_DeleteAliasModal=DeleteAliasModal;function AliasesActions(props){const{selectedItems:selectedItems,onDelete:onDelete,onUpdateAlias:onUpdateAlias,history:history}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[clearCacheModalVisible,setClearCacheModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[flushAliasModalVisible,setFlushAliasModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[refreshModalVisible,setRefreshModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};const onClearCacheModalClose=()=>{setClearCacheModalVisible(false)};const onFlushAliasModalClose=()=>{setFlushAliasModalVisible(false)};const onRefreshModalClose=()=>{setRefreshModalVisible(false)};const renderKey=Object(external_osdSharedDeps_React_["useMemo"])(()=>Date.now(),[selectedItems]);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");const size=useUpdatedUX?"s":undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{"data-test-subj":"moreAction",panelPaddingSize:"s",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right"},"Actions")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,key:renderKey,size:"s",panels:[{id:0,items:[{name:"Edit",disabled:selectedItems.length!==1,"data-test-subj":"editAction",onClick:onUpdateAlias},{isSeparator:true},{name:"Force merge","data-test-subj":"ForceMergeAction",onClick:()=>{props.history.push(`${constants["D"].FORCE_MERGE}/${selectedItems.map(item=>item.alias).join(",")}`)}},{name:"Roll over",disabled:selectedItems.length>1,"data-test-subj":"rolloverAction",onClick:()=>history.push(selectedItems.length?`${constants["D"].ROLLOVER}/${selectedItems[0].alias}`:constants["D"].ROLLOVER)},{isSeparator:true},{name:"Clear cache",disabled:selectedItems.length<1,"data-test-subj":"ClearCacheAction",onClick:()=>setClearCacheModalVisible(true)},{name:"Flush",disabled:!selectedItems.length,"data-test-subj":"Flush Action",onClick:()=>setFlushAliasModalVisible(true)},{name:"Refresh",disabled:!selectedItems.length,"data-test-subj":"refreshAction",onClick:()=>setRefreshModalVisible(true)},{isSeparator:true},{name:"Delete",disabled:!selectedItems.length,"data-test-subj":"deleteAction",onClick:()=>setDeleteIndexModalVisible(true)}]}]})),external_osdSharedDeps_React_default.a.createElement(containers_DeleteAliasModal,{selectedItems:selectedItems,visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}}),external_osdSharedDeps_React_default.a.createElement(containers_ClearCacheModal,{selectedItems:selectedItems,visible:clearCacheModalVisible,onClose:onClearCacheModalClose,type:constants["u"].ALIAS}),external_osdSharedDeps_React_default.a.createElement(containers_FlushIndexModal,{selectedItems:selectedItems,visible:flushAliasModalVisible,onClose:onFlushAliasModalClose,flushTarget:constants["u"].ALIAS}),external_osdSharedDeps_React_default.a.createElement(RefreshActionModal,{selectedItems:selectedItems,visible:refreshModalVisible,onClose:onRefreshModalClose,type:constants["u"].ALIAS}))}function FilterGroup_extends(){return FilterGroup_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},FilterGroup_extends.apply(null,arguments)}function FilterGroup(_ref){let{options:options,value:value,filterButtonProps:filterButtonProps,onChange:onChange,useNewUX:useNewUX}=_ref;const[isPopoverOpen,setIsPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const onButtonClick=()=>{setIsPopoverOpen(!isPopoverOpen)};const closePopover=()=>{setIsPopoverOpen(false)};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFilterGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallFilterButton"],FilterGroup_extends({iconType:"arrowDown",onClick:onButtonClick,isSelected:isPopoverOpen,numFilters:options===null||options===void 0?void 0:options.length,hasActiveFilters:!!(value!==null&&value!==void 0&&value.length),numActiveFilters:value===null||value===void 0?void 0:value.length}
6,filterButtonProps)),isOpen:isPopoverOpen,closePopover:closePopover,panelPaddingSize:"none"},external_osdSharedDeps_React_default.a.createElement("div",{className:"ouiFilterSelect__items"},options.map((item,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFilterSelectItem"],{checked:value!==null&&value!==void 0&&value.includes(item.label)?"on":"off",key:item.label,"data-test-subj":`FilterGroupSelectItem-${item.label}`,onClick:()=>{const findIndex=(value||[]).findIndex(valueItem=>valueItem===item.label);const finalValue=value||[];if(findIndex>-1){finalValue.splice(findIndex,1)}else{finalValue.push(item.label)}onChange===null||onChange===void 0||onChange([...finalValue])}},item.label)))))}function SearchControls(props){const[state,setState]=Object(external_osdSharedDeps_React_["useState"])(props.value);const onChange=(field,value)=>{const payload={...state,[field]:value};setState(payload);props.onSearchChange(payload)};Object(external_osdSharedDeps_React_["useEffect"])(()=>{setState(props.value)},[props.value]);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,placeholder:"Search",value:state.search,onChange:e=>onChange("search",e.target.value)})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{flexBasis:"100px"},grow:false},external_osdSharedDeps_React_default.a.createElement(FilterGroup,{filterButtonProps:{children:"Status"},onChange:val=>onChange("status",(val||[]).map(item=>item).join(",")),value:state.status?state.status.split(",").map(label=>label):[],options:constants["e"],useNewUX:useUpdatedUX})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(AliasesActions,{onUpdateAlias:props.onUpdateAlias,selectedItems:props.value.selectedItems,onDelete:props.onDelete,history:props.history}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"},alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,placeholder:"Search...",value:state.search,onChange:e=>onChange("search",e.target.value)})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedComboBox"],{style:{width:300},placeholder:"Status",options:constants["e"],selectedOptions:state.status?state.status.split(",").map(label=>({label:label})):[],onChange:val=>onChange("status",(val||[]).map(item=>item.label).join(","))})))}
6var Aliases_components_IndexControls=SearchControls;function CreateAlias_IndexSelect(_ref){let{value:value,onChange:onChange}=_ref;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);return external_osdSharedDeps_React_default.a.createElement(components_RemoteSelect,{placeholder:"Select indexes",onSearchChange:undefined,value:value,onChange:onChange,customOptionText:"Add {searchValue} as index pattern",refreshOptions:async _ref2=>{let{searchValue:searchValue}=_ref2;const payload={format:"json"};if(searchValue){payload.index=`${searchValue}*`}const[aliasResult,dataStreamList]=await Promise.all([services.commonService.apiCaller({endpoint:"cat.indices",data:payload}).then(res=>{if(res.ok){return{...res,response:res.response.map(item=>({label:item.index})).filter(item=>!filterByMinimatch(item.label,utils_constants_0["d"]))}}else{return res}}),services.commonService.apiCaller({endpoint:"transport.request",data:{path:"/_data_stream",method:"GET"}}).then(res=>{if(res.ok){var _res$response$data_st;return((_res$response$data_st=res.response.data_streams)===null||_res$response$data_st===void 0?void 0:_res$response$data_st.reduce((total,current)=>[...total,current.name,...current.indices.map(item=>item.index_name)],[]))||[]}return[]})]);if(aliasResult.ok){return{...aliasResult,response:aliasResult.response.filter(item=>!dataStreamList.includes(item.label))}}return aliasResult}})}function CreateAlias(props){var _props$alias;const formGenerateRef=Object(external_osdSharedDeps_React_["useRef"])(null);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const isEdit=!!props.alias;Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(props.visible){var _formGenerateRef$curr;(_formGenerateRef$curr=formGenerateRef.current)===null||_formGenerateRef$curr===void 0||_formGenerateRef$curr.setValues(props.alias)}},[props.visible]);if(!props.visible){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:props.onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,isEdit?"Update":"Create"," alias")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,isEdit&&filterByMinimatch(((_props$alias=props.alias)===null||_props$alias===void 0?void 0:_props$alias.alias)||"",utils_constants_0["c"])?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",size:"s"},"This alias may contain critical system data. Changing system aliases may break OpenSearch."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{ref:formGenerateRef,value:{...props.alias},formFields:[{name:"alias",type:"Input",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Alias name")),position:"bottom",helpText:constants["r"]},options:{props:{placeholder:"Specify alias name",disabled:isEdit},rules:[{pattern:constants["s"],message:"Invalid alias name."}]}},{name:"indexArray",component:CreateAlias_IndexSelect,rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Indexes or index patterns")),helpText:"Specify one or more indexes or index patterns to be part of the alias."},options:{props:{placeholder:"Select indexes or input index patterns."},rules:[{validator:(rule,value)=>{if(!value||!value.length){return Promise.reject("At least one index should be selected.")}return Promise.resolve()}}]}}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"cancelCreateAliasButton",style:{marginRight:20},onClick:props.onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,color:"primary","data-test-subj":"createAliasButton",onClick:async()=>{var _formGenerateRef$curr2,_result;const{errors:errors,values:values}=await((_formGenerateRef$curr2=formGenerateRef.current)===null||_formGenerateRef$curr2===void 0?void 0:_formGenerateRef$curr2.validatePromise())||{};if(errors){return}let result;if(isEdit){var _props$alias2;const actions=getAliasActionsByDiffArray(((_props$alias2=props.alias)===null||_props$alias2===void 0?void 0:_props$alias2.indexArray)||[],values.indexArray||[],index=>({alias:values.alias,index:index}));if(actions.length===0){result={ok:true}}else{result=await(services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"indices.updateAliases",data:{body:{actions:actions}}}))}}else{result=await(services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"indices.putAlias",data:{index:values.indexArray,name:values.alias}}))}if((_result=result)!==null&&_result!==void 0&&_result.ok){coreServices===null||coreServices===void 0||coreServices.notifications.toasts.addSuccess(`${values.alias} has been successfully ${isEdit?"updated":"created"}`);props.onSuccess()}else{var _result2;coreServices===null||coreServices===void 0||coreServices.notifications.toasts.addDanger(((_result2=result)===null||_result2===void 0?void 0:_result2.error)||"")}}},isEdit?"Save changes":"Create alias"))))}function Aliases_extends(){return Aliases_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Aliases_extends.apply(null,arguments)}function Aliases_defineProperty(e,r,t){return(r=Aliases_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Aliases_toPropertyKey(t){var i=Aliases_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Aliases_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function IndexNameDisplay(props){const[hide,setHide]=Object(external_osdSharedDeps_React_["useState"])(true);const[tableParams,setTableParams]=Object(external_osdSharedDeps_React_["useState"])({});const{index:index,size:size}=tableParams.page||{index:0,size:10};return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement("span",null,props.indices.slice(0,3).join(", ")),props.indices.length<=3?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{style:{marginLeft:8},"data-test-subj":`${props.indices.length-3} more`,onClick:()=>setHide(!hide)},props.indices.length-3," more"),hide?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{onClose:()=>setHide(!hide)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{title:`Indices in ${props.alias} (${props.indices.length})`},"Indices in ",props.alias," (",props.indices.length,")"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{"data-test-subj":"indices-table",columns:[{name:"Index",field:"index"}],items:props.indices.slice(index*size,(index+1)*size).map(index=>({index:index})),onChange:setTableParams,pagination:{pageIndex:index,pageSize:size,totalItemCount:props.indices.length}}))))}const defaultFilter={search:Aliases_utils_constants_DEFAULT_QUERY_PARAMS.search,status:Aliases_utils_constants_DEFAULT_QUERY_PARAMS.status};class Aliases_Aliases extends components_MDSEnabledComponent{constructor(props){super(props);Aliases_defineProperty(this,"getQueryState",state=>Object.keys(Aliases_utils_constants_DEFAULT_QUERY_PARAMS).reduce((total,key)=>({...total,[key]:state[key]}),{}));Aliases_defineProperty(this,"groupResponse",array=>{const groupedMap={};array.forEach((item,index)=>{groupedMap[item.alias]=groupedMap[item.alias]||{...item,order:index,indexArray:[]};groupedMap[item.alias].indexArray.push(item.index);if(item.is_write_index==="true"){groupedMap[item.alias].writeIndex=item.index}else if(!groupedMap[item.alias].writeIndex){groupedMap[item.alias].writeIndex=""}});const result=Object.values(groupedMap).map(item=>{if(item.indexArray.length===1){return{...item,writeIndex:item.indexArray[0]}}return item});result.sort((a,b)=>a.order-b.order);return result});Aliases_defineProperty(this,"getAliases",async()=>{this.setState({loading:true});const{from:from,size:size,status:status}=this.state;const fromNumber=Number(from);const sizeNumber=Number(size);const{history:history,commonService:commonService}=this.props;const queryObject=this.getQueryState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const payload={format:"json",name:`*${queryObject.search}*`,s:`${queryObject.sortField}:${queryObject.sortDirection}`,expand_wildcards:status};if(!status){delete payload.expand_wildcards}const getAliasesResponse=await commonService.apiCaller({endpoint:"cat.aliases",data:payload});if(getAliasesResponse.ok){const responseGroupByAliasName=this.groupResponse(getAliasesResponse.response);const totalAliases=responseGroupByAliasName.length;const payload={aliases:responseGroupByAliasName.slice(fromNumber*sizeNumber,(fromNumber+1)*sizeNumber),totalAliases:totalAliases,selectedItems:this.state.selectedItems.map(item=>responseGroupByAliasName.find(remoteItem=>remoteItem.alias===item.alias)).filter(item=>item)};this.setState(payload)}else{this.context.notifications.toasts.addDanger(getAliasesResponse.error)}this.setState({loading:false})});Aliases_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage||{};const{field:sortField,direction:sortDirection}=sort||{};this.setState({from:""+page,size:""+size,sortField:sortField||Aliases_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:sortDirection},()=>this.getAliases())});Aliases_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Aliases_defineProperty(this,"onSearchChange",params=>{this.setState({from:"0",...params},()=>this.getAliases())});const{from:_from=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.from,size:_size=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.size,search:search=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.search,sortField:_sortField=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:_sortDirection=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection,status:_status=Aliases_utils_constants_DEFAULT_QUERY_PARAMS.status}=query_string_default.a.parse(props.history.location.search);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={...defaultFilter,...this.state,totalAliases:0,from:_from,size:_size,status:_status,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],aliases:[],loading:false,aliasCreateFlyoutVisible:false,aliasEditFlyoutVisible:false,editingItem:null,useUpdatedUX:useUpdatedUX};this.getAliases=external_osdSharedDeps_Lodash_default.a.debounce(this.getAliases,500,{leading:true})}componentDidMount(){const breadCrumbs=this.state.useUpdatedUX?[constants["f"].NEW_ALIASES]:[constants["f"].INDEX_MANAGEMENT,constants["f"].ALIASES];this.context.chrome.setBreadcrumbs(breadCrumbs);this.getAliases()}async componentDidUpdate(prevProps,prevState){const prevQuery=this.getQueryState(prevState);const currQuery=this.getQueryState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getAliases()}}render(){const{totalAliases:totalAliases,from:from,size:size,sortField:sortField,sortDirection:sortDirection,aliases:aliases}=this.state;const pagination={pageIndex:Number(from),pageSize:Number(size),pageSizeOptions:Aliases_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:Number(totalAliases)};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const description=[{description:"An alias is a virtual index name that can point to one or more indexes. If your data is spread across multiple indexes, you can create and query an alias instead of keeping track of which indexes to query.",links:{label:"Learn more",href:this.context.docLinks.links.opensearch.indexAlias.base,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const commonRender=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{"data-test-subj":"aliases-table",loading:this.state.loading,columns:[{field:"alias",name:"Alias name",sortable:true,render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{"data-test-subj":`aliasDetail-${value}`,onClick:()=>this.setState({editingItem:record,aliasEditFlyoutVisible:true})},value)},{field:"writeIndex",name:"Write index",render:value=>{if(value){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].INDEX_DETAIL}/${value}`},value)}return"-"}},{field:"indexArray",name:"Index name",render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(IndexNameDisplay,{indices:value,alias:record.alias})}],isSelectable:true,itemId:"alias",items:aliases,onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,noItemsMessage:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search,status:this.state.status},defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You have no aliases.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,iconType:"plus",onClick:()=>{this.setState({aliasCreateFlyoutVisible:true})}},"Create alias")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"There are no aliases matching your applied filters. Reset your filters to view your aliases.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.setState(defaultFilter,()=>{this.getAliases()})}},"Reset filters")]})}),external_osdSharedDeps_React_default.a.createElement(CreateAlias,{visible:this.state.aliasCreateFlyoutVisible,onSuccess:()=>{this.getAliases();this.setState({aliasCreateFlyoutVisible:false})},onClose:()=>this.setState({aliasCreateFlyoutVisible:false})}),external_osdSharedDeps_React_default.a.createElement(CreateAlias,{visible:this.state.aliasEditFlyoutVisible,onSuccess:()=>{this.getAliases();this.setState({editingItem:null,aliasEditFlyoutVisible:false})},onClose:()=>this.setState({editingItem:null,aliasEditFlyoutVisible:false}),alias:this.state.editingItem||this.state.selectedItems[0]}));return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{c
6ontrols:description,setMountPoint:setAppDescriptionControls}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Create alias",label:"Create Alias",fill:true,iconType:"plus",run:()=>{this.setState({aliasCreateFlyoutVisible:true})},testId:"createAliasButton",controlType:"button",color:"primary"}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(Aliases_components_IndexControls,{value:{search:this.state.search,status:this.state.status,selectedItems:this.state.selectedItems},onUpdateAlias:()=>{this.setState({aliasEditFlyoutVisible:true})},onSearchChange:this.onSearchChange,onDelete:this.getAliases,history:this.props.history}),commonRender())):external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"",children:external_osdSharedDeps_React_default.a.createElement(AliasesActions,{onUpdateAlias:()=>{this.setState({aliasEditFlyoutVisible:true})},selectedItems:this.state.selectedItems,onDelete:this.getAliases,history:this.props.history})},{text:"Create alias",buttonProps:{fill:true,iconType:"plus",onClick:()=>{this.setState({aliasCreateFlyoutVisible:true})}}}]}),bodyStyles:{padding:"initial"},title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Aliases")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",{style:{width:"50%"}},"An alias is a virtual index name that can point to one or more indexes. If your data is spread across multiple indexes, you can create and query an alias instead of keeping track of which indexes to query."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:this.context.docLinks.links.opensearch.indexAlias.base},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)))},external_osdSharedDeps_React_default.a.createElement(Aliases_components_IndexControls,{value:{search:this.state.search,status:this.state.status,selectedItems:this.state.selectedItems},onUpdateAlias:()=>{this.setState({aliasEditFlyoutVisible:true})},onSearchChange:this.onSearchChange,onDelete:this.getAliases,history:this.props.history}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),commonRender())}}Aliases_defineProperty(Aliases_Aliases,"contextType",core_services["b"]);function AliasContainer(props){const context=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Aliases_Aliases,Aliases_extends({},props,{commonService:context===null||context===void 0?void 0:context.commonService},dataSourceMenuProps))}var containers_Aliases=AliasContainer;var pages_Aliases=containers_Aliases;const Templates_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const Templates_utils_constants_DEFAULT_QUERY_PARAMS={from:"0",size:"20",search:"",sortField:"name",sortDirection:constants["I"].DESC,dataSourceId:""};function DeleteTemplateModal(props){const[value,setValue]=Object(external_osdSharedDeps_React_["useState"])("");const{onClose:onClose,visible:visible,selectedItems:selectedItems,onConfirm:onConfirm}=props;Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible){setValue("")}},[visible]);if(!visible){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,props.title)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,props.tips)),external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("li",{key:item},item)))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"To confirm your action, type ",external_osdSharedDeps_React_default.a.createElement("b",{style:{color:"#000"}},"delete"),".")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldText"],{"data-test-subj":"deleteInput",placeholder:"delete",fullWidth:true,value:value,onChange:e=>setValue(e.target.value)}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{"data-test-subj":"deletaCancelButton",onClick:onClose},"Cancel"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"deleteConfirmButton",onClick:onConfirm,fill:true,color:"danger",disabled:value!=="delete"},"Delete")))}var public_components_DeleteModal=DeleteTemplateModal;function DeleteTemplateModal_DeleteTemplateModal(props){const{onClose:onClose,visible:visible,selectedItems:selectedItems,onDelete:onDelete}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const onConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>
6{if(services){const result=await services.commonService.apiCaller({endpoint:"transport.request",data:{path:`/_index_template/${selectedItems.join(",")}`,method:"DELETE"}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`Delete [${selectedItems.join(",")}] successfully`);onDelete()}else{coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}}},[selectedItems,services,coreServices,onDelete]);return external_osdSharedDeps_React_default.a.createElement(public_components_DeleteModal,{title:"Delete Templates",tips:"The following template will be permanently deleted. This action cannot be undone.",onConfirm:onConfirm,onClose:onClose,visible:visible,selectedItems:selectedItems})}var DeleteTemplatesModal=DeleteTemplateModal_DeleteTemplateModal;function TemplatesActions(props){const{selectedItems:selectedItems,onDelete:onDelete}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};const renderKey=Object(external_osdSharedDeps_React_["useMemo"])(()=>Date.now(),[selectedItems]);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");const size=useUpdatedUX?"s":undefined;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{"data-test-subj":"moreAction",panelPaddingSize:"s",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right"},"Actions")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{initialPanelId:0,key:renderKey,size:"s",panels:[{id:0,items:[{name:"Edit",disabled:selectedItems.length!==1,"data-test-subj":"editAction",onClick:()=>props.history.push(`${constants["D"].CREATE_TEMPLATE}/${selectedItems[0].name}`)},{name:"Delete",disabled:selectedItems.length!==1,"data-test-subj":"deleteAction",onClick:()=>setDeleteIndexModalVisible(true)}]}]})),external_osdSharedDeps_React_default.a.createElement(DeleteTemplatesModal,{selectedItems:selectedItems.map(item=>item.name),visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}}))}
6function IndexControls_SearchControls(props){const[state,setState]=Object(external_osdSharedDeps_React_["useState"])(props.value);const onChange=(field,value)=>{const payload={...state,[field]:value};setState(payload);props.onSearchChange(payload)};Object(external_osdSharedDeps_React_["useEffect"])(()=>{setState(props.value)},[props.value]);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,placeholder:"Search",value:state.search,onChange:e=>onChange("search",e.target.value)})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(TemplatesActions,{selectedItems:props.selectedItems,onDelete:props.getTemplates,history:props.history}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{padding:"0px 5px"},alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,placeholder:"Search...",value:state.search,onChange:e=>onChange("search",e.target.value)})))}var Templates_components_IndexControls=IndexControls_SearchControl
6s;function TemplateType(props){var _value$timestamp_fiel;const{value:value,onChange:onChange}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:constants["L"].INDEX_TEMPLATE,onChange:e=>e.target.checked&&onChange(undefined),label:constants["L"].INDEX_TEMPLATE,checked:value===undefined}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadio"],{id:constants["L"].DATA_STREAM,onChange:e=>e.target.checked&&onChange({timestamp_field:{name:"@timestamp"}}),label:constants["L"].DATA_STREAM,checked:value!==undefined}),value!==undefined?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Time field"))},external_osdSharedDeps_React_default.a.createElement(built_in_components.Input,{value:value===null||value===void 0||(_value$timestamp_fiel=value.timestamp_field)===null||_value$timestamp_fiel===void 0?void 0:_value$timestamp_fiel.name,onChange:val=>{if(!val){onChange({})}else{onChange({timestamp_field:{name:val}})}}}))):null)}const TemplateConvert=props=>props.value===undefined?constants["L"].INDEX_TEMPLATE:constants["L"].DATA_STREAM;var components_TemplateType=TemplateType;const getAllUsedComponents=async _ref=>{let{commonService:commonService}=_ref;const allTemplatesResponse=await commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:"/_index_template/*"}});if(allTemplatesResponse&&allTemplatesResponse.ok){return allTemplatesResponse.response.index_templates||[]}return[]};const getTemplate=async props=>{const response=await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_index_template/${props.templateName}?flat_settings=true`}});let error="";if(response.ok){var _response$response;const findItem=(_response$response=response.response)===null||_response$response===void 0||(_response$response=_response$response.index_templates)===null||_response$response===void 0?void 0:_response$response.find(item=>item.name===props.templateName);if(findItem){const templateDetail=findItem.index_template;return JSON.parse(JSON.stringify(templateDetail))}error=`The template [${props.templateName}] does not exist.`}else{error=response.error||""}props.coreService.notifications.toasts.addDanger(error);throw new Error(error)};const getComponentMapTemplate=async _ref=>{let{commonService:commonService}=_ref;const allIndicesTemplates=await getAllUsedComponents({commonService:commonService});const componentMapTemplate={};
6allIndicesTemplates.forEach(item=>{var _item$index_template$;(_item$index_template$=item.index_template.composed_of)===null||_item$index_template$===void 0||_item$index_template$.forEach(composedItem=>{componentMapTemplate[composedItem]=componentMapTemplate[composedItem]||[];componentMapTemplate[composedItem].push(item.name)})});return componentMapTemplate};const cache={usedRequest:undefined};let listenerNumber=0;const CACHE_REFRESH_EVENT="CACHE_REFRESH_EVENT";const getComponentMapTemplateWithCache=props=>{if(props.force||!cache.usedRequest){cache.usedRequest=getComponentMapTemplate({commonService:props.commonService})}return cache.usedRequest};const submitTemplateChange=async props=>{const{templateName:templateName,commonService:commonService,coreService:coreService,transformTemplate:transformTemplate=(templateItem=>templateItem)}=props;const currentTemplate=await getTemplate({templateName:templateName,commonService:commonService,coreService:coreService});const updateResult=await commonService.apiCaller({endpoint:"transport.request",data:{method:"POST",path:`/_index_template/${templateName}`,body:transformTemplate(currentTemplate)}});return updateResult};const useComponentMapTemplate=()=>{const[componentMapTemplate,setComponentMapTemplate]=Object(external_osdSharedDeps_React_["useState"])({});const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const reload=Object(external_osdSharedDeps_React_["useCallback"])(force=>{setLoading(true);getComponentMapTemplateWithCache({force:force,commonService:services.commonService}).then(res=>{if(force){window.dispatchEvent(new CustomEvent(CACHE_REFRESH_EVENT))}if(destroyRef.current){return}setComponentMapTemplate(res);setLoading(false)})},[]);const eventHandler=Object(external_osdSharedDeps_React_["useCallback"])(()=>{reload()},[reload]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{reload();window.addEventListener(CACHE_REFRESH_EVENT,eventHandler);listenerNumber++;return()=>{window.removeEventListener(CACHE_REFRESH_EVENT,eventHandler);listenerNumber--;if(listenerNumber===0){cache.usedRequest=undefined}}},[eventHandler]);Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>{destroyRef.current=true},[]);return{reload:reload,loading:loading,componentMapTemplate:componentMapTemplate}};function AssociatedComponentsModal(props){var _template$templateDet;const{onUnlink:onUnlink,renderProps:renderProps,template:template}=props;const[visible,setVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,renderProps({setVisible:setVisible}),visible?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{onClose:()=>setVisible(false)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Associated component templates"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{pagination:true,items:(((_template$templateDet=template.templateDetail)===null||_template$templateDet===void 0?void 0:_template$templateDet.composed_of)||[]).map(item=>({name:item})),columns:[{name:"Component template",field:"name",sortable:true,render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:false,target:"_blank",href:`#${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/${value}`},value)},{name:"Actions",field:"actions",align:"right",render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Unlink"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":`Unlink ${record.name}?`,iconType:"unlink",onClick:()=>{Modal["a"].show({type:"confirm",title:`Unlink from ${template.name}?`,content:external_osdSharedDeps_React_default.a.createElement("p",{style:{lineHeight:1.5}},"The component ",record.name," will be removed from the template ",template.name,". This will affect any new indexes created with this template."),footer:["cancel","confirm"],locale:{confirm:"Unlink"},confirmButtonProps:{color:"danger"},async onOk(){var _currentTemplate$comp;const currentTemplate=await getTemplate({templateName:template.name,commonService:services.commonService,coreService:coreServices});const updateResult=await services.commonService.apiCaller({endpoint:"transport.request",data:{method:"POST",path:`/_index_template/${template.name}`,body:{...currentTemplate,composed_of:(currentTemplate===null||currentTemplate===void 0||(_currentTemplate$comp=currentTemplate.composed_of)===null||_currentTemplate$comp===void 0?void 0:_currentTemplate$comp.filter(item=>item!==record.name))||[]}}});if(updateResult.ok){onUnlink===null||onUnlink===void 0||onUnlink(record.name);coreServices.notifications.toasts.addSuccess(`${record.name} has been successfully unlinked from ${template.name}.`)}else{coreServices.notifications.toasts.addDanger(updateResult.error);return Promise.reject(updateResult.error)}}})}}))}]}))):null)}var containers_AssociatedComponentsModal=AssociatedComponentsModal;function DeleteTemplate(props){const{selectedItems:selectedItems,onDelete:onDelete}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Delete template"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":"Delete template",color:"danger",iconType:"trash",onClick:()=>setDeleteIndexModalVisible(true),className:"icon-hover-danger"})),external_osdSharedDeps_React_default.a.createElement(DeleteTemplatesMo
6dal,{selectedItems:selectedItems.map(item=>item.name),visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}}))}function IndexPatternDisplay(props){const[hide,setHide]=Object(external_osdSharedDeps_React_["useState"])(true);const[tableParams,setTableParams]=Object(external_osdSharedDeps_React_["useState"])({});const{index:index,size:size}=tableParams.page||{index:0,size:10};return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement("span",null,props.indexPatterns.slice(0,3).join(", ")),props.indexPatterns.length<=3?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{style:{marginLeft:8},"data-test-subj":`${props.indexPatterns.length-3} more`,onClick:()=>setHide(!hide)},props.indexPatterns.length-3," more"),hide?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{onClose:()=>setHide(!hide)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],{hasBorder:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"m"},external_osdSharedDeps_React_default.a.createElement("h2",{title:`Index patterns in ${props.templateName} (${props.indexPatterns.length})`},"Index patterns in in ",props.templateName," (",props.indexPatterns.length,")"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{"data-test-subj":"indexPatternsTable",columns:[{name:"Index pattern",field:"pattern"}],items:props.indexPatterns.slice(index*size,(index+1)*size).map(pattern=>({pattern:pattern})),onChange:setTableParams,pagination:{pageIndex:index,pageSize:size,totalItemCount:props.indexPatterns.length}}))))}function Templates_extends(){return Templates_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Templates_extends.apply(null,arguments)}function Templates_defineProperty(e,r,t){return(r=Templates_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Templates_toPropertyKey(t){var i=Templates_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Templates_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const Templates_defaultFilter={search:Templates_utils_constants_DEFAULT_QUERY_PARAMS.search};class Templates_Templates extends components_MDSEnabledComponent{constructor(props){super(props);Templates_defineProperty(this,"getQueryState",state=>Object.keys(Templates_utils_constants_DEFAULT_QUERY_PARAMS).reduce((total,key)=>({...total,[key]:state[key]}),{}));Templates_defineProperty(this,"getTemplates",async()=>{this.setState({loading:true});const{from:from,size:size}=this.state;const fromNumber=Number(from);const sizeNumber=Number(size);const{history:history,commonService:commonService}=this.props;const queryObject=this.getQueryState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const payload={format:"json",name:`*${queryObject.search}*`,s:`${queryObject.sortField}:${queryObject.sortDirection}`};let allTemplatesDetail=[];const allTemplatesResponse=await commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:"/_index_template/*"}});if(!allTemplatesResponse.ok){allTemplatesDetail=[]}else{var _allTemplatesResponse;allTemplatesDetail=((_allTemplatesResponse=allTemplatesResponse.response.index_templates)===null||_allTemplatesResponse===void 0?void 0:_allTemplatesResponse.map(item=>({...item.index_template,name:item.name})))||[]}const getTemplatesResponse=await commonService.apiCaller({endpoint:"cat.templates",data:payload});if(getTemplatesResponse.ok){const response=getTemplatesResponse.response.filter(item=>item.composed_of).map(item=>({...item,templateDetail:allTemplatesDetail.find(detailItem=>detailItem.name===item.name)}));const totalTemplates=response.length;const payload={templates:response.slice(fromNumber*sizeNumber,(fromNumber+1)*sizeNumber),totalTemplates:totalTemplates,selectedItems:this.state.selectedItems.map(item=>response.find(remoteItem=>remoteItem.name===item.name)).filter(item=>item)};this.setState(payload)}else{this.context.notifications.toasts.addDanger(getTemplatesResponse.error)}this.setState({loading:false})});Templates_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;
6const{index:page,size:size}=tablePage||{};const{field:sortField,direction:sortDirection}=sort||{};this.setState({from:""+page,size:""+size,sortField:sortField||Templates_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:sortDirection},()=>this.getTemplates())});Templates_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});Templates_defineProperty(this,"onSearchChange",params=>{this.setState({from:"0",...params},()=>this.getTemplates())});const{from:_from=Templates_utils_constants_DEFAULT_QUERY_PARAMS.from,size:_size=Templates_utils_constants_DEFAULT_QUERY_PARAMS.size,search:search=Templates_utils_constants_DEFAULT_QUERY_PARAMS.search,sortField:_sortField=Templates_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:_sortDirection=Templates_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection}=query_string_default.a.parse(props.history.location.search);const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");this.state={...Templates_defaultFilter,...this.state,totalTemplates:0,from:_from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],templates:[],loading:false,useUpdatedUX:useUpdatedUX};this.getTemplates=Object(external_osdSharedDeps_Lodash_["debounce"])(this.getTemplates,500,{leading:true})}async componentDidUpdate(prevProps,prevState){const prevQuery=this.getQueryState(prevState);const currQuery=this.getQueryState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getTemplates()}}componentDidMount(){const breadCrumbs=this.state.useUpdatedUX?[constants["f"].NEW_TEMPLATES]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TEMPLATES];this.context.chrome.setBreadcrumbs(breadCrumbs);this.getTemplates()}render(){const{totalTemplates:totalTemplates,from:from,size:size,sortField:sortField,sortDirection:sortDirection,templates:templates}=this.state;const pagination={pageIndex:Number(from),pageSize:Number(size),pageSizeOptions:Templates_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:Number(totalTemplates)};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const commonTable=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{className:"ISM-templates-table","data-test-subj":"templatesTable",loading:this.state.loading,columns:[{field:"name",name:"Template name",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_TEMPLATE}/${value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],null,value))},{field:"templateType",name:"Template type",render:(value,record)=>{var _record$templateDetai;return TemplateConvert({value:(_record$templateDetai=record.templateDetail)===null||_record$templateDetai===void 0?void 0:_record$templateDetai.data_stream})}},{field:"index_patterns",name:"Index patterns",sortable:true,render:(value,record)=>{var _record$templateDetai2;return external_osdSharedDeps_React_default.a.createElement(IndexPatternDisplay,{indexPatterns:((_record$templateDetai2=record.templateDetail)===null||_record$templateDetai2===void 0?void 0:_record$templateDetai2.index_patterns)||[],templateName:record.name})}},{field:"order",name:"Priority",sortable:true,align:"right"},{field:"composed_of",name:"Associated component templates",align:"right",render:(value,record)=>{var _record$templateDetai3;return((_record$templateDetai3=record.templateDetail)===null||_record$templateDetai3===void 0||(_record$templateDetai3=_record$templateDetai3.composed_of)===null||_record$templateDetai3===void 0?void 0:_record$templateDetai3.length)||0}},{field:"actions",name:"Actions",align:"right",actions:[{render:record=>external_osdSharedDeps_React_default.a.createElement(containers_AssociatedComponentsModal,{template:record,onUnlink:()=>this.getTemplates(),renderProps:_ref2=>{let{setVisible:setVisible}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"View associated index templates"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":"View associated index templates",iconType:"kqlSelector",onClick:()=>setVisible(true),className:"icon-hover-info"}))}})},{render:record=>external_osdSharedDeps_React_default.a.createElement(DeleteTemplate,{selectedItems:[record],onDelete:this.getTemplates})}]}],isSelectable:true,itemId:"name",items:templates,onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,noItemsMessage:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search},Templates_defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You have no templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_TEMPLATE)},iconType:"plus"},"Create template")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"There are no templates matching your applied filters. Reset your filters to view your templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.setState(Templates_defaultFilter,()=>{this.getTemplates()})}},"Reset filters")]})});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const description=[{description:"Index templates let you initialize new indexes or data streams with predefined mappings and settings.",links:{label:"Learn more",href:this.context.docLinks.links.opensearch.indexTemplates.base,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const onClickCreate=()=>{this.props.history.push(constants["D"].CREATE_TEMPLATE)};return this.state.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{c
6ontrols:description,setMountPoint:setAppDescriptionControls}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Create Index Template",label:"Create Index Template",fill:true,iconType:"plus",run:onClickCreate,testId:"createTemplateButton",controlType:"button",color:"primary"}]}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(Templates_components_IndexControls,{value:{search:this.state.search},onSearchChange:this.onSearchChange,selectedItems:this.state.selectedItems,getTemplates:this.getTemplates,history:this.props.history}),commonTable())):external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"",children:external_osdSharedDeps_React_default.a.createElement(TemplatesActions,{selectedItems:this.state.selectedItems,onDelete:this.getTemplates,history:this.props.history})},{text:"Create template",buttonProps:{fill:true,onClick:onClickCreate,iconType:"plus"}}]}),bodyStyles:{padding:"initial"},title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],null,external_osdSharedDeps_React_default.a.createElement("span",null,"Templates")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Index templates let you initialize new indexes or data streams with predefined mappings and settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:this.context.docLinks.links.opensearch.indexTemplates.base},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)))},external_osdSharedDeps_React_default.a.createElement(Templates_components_IndexControls,{value:{search:this.state.search},onSearchChange:this.onSearchChange,selectedItems:this.state.selectedItems,getTemplates:this.getTemplates,history:this.props.history}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),commonTable())}}Templates_defineProperty(Templates_Templates,"contextType",core_services["b"]);function TemplatesContainer(props){const context=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Templates_Templates,Templates_extends({},props,{commonService:context===null||context===void 0?void 0:context.commonService},dataSourceMenuProps))}var containers_Templates=TemplatesContainer;var pages_Templates=containers_Templates;function containers_IndexForm_extends(){return containers_IndexForm_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},containers_IndexForm_extends.apply(null,arguments)}function containers_IndexForm_defineProperty(e,r,t){return(r=containers_IndexForm_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function containers_IndexForm_toPropertyKey(t){var i=containers_IndexForm_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function containers_IndexForm_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const IndexForm_getAliasActionsByDiffArray=(oldAliases,newAliases,callback)=>{const diffedAliasArrayes=Object(diff["diffArrays"])(oldAliases,newAliases);return diffedAliasArrayes.reduce((total,current)=>{if(current.added){return[...total,...current.value.map(item=>({add:callback(item)}))]}else if(current.removed){return[...total,...current.value.map(item=>({remove:callback(item)}))]}return total},[])};class containers_IndexForm_IndexForm extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);containers_IndexForm_defineProperty(this,"indexDetailRef",null);containers_IndexForm_defineProperty(this,"hasUnsavedChanges",mode=>{var _this$indexDetailRef;return(_this$indexDetailRef=this.indexDetailRef)===null||_this$indexDetailRef===void 0?void 0:_this$indexDetailRef.hasUnsavedChanges(mode)});containers_IndexForm_defineProperty(this,"getValue",()=>containers_IndexForm_IndexForm.transformIndexDetailToRemote(JSON.parse(JSON.stringify(this.props.value))));containers_IndexForm_defineProperty(this,"simulateFromTemplate",()=>{var _this$indexDetailRef2;return(_this$indexDetailRef2=this.indexDetailRef)===null||_this$indexDetailRef2===void 0?void 0:_this$indexDetailRef2.simulateFromTemplate()});containers_IndexForm_defineProperty(this,"importSettings",args=>{var _this$indexDetailRef3;return(_this$indexDetailRef3=this.indexDetailRef)===null||_this$indexDetailRef3===void 0?void 0:_this$indexDetailRef3.importSettings(args)});containers_IndexForm_defineProperty(this,"getIndexDetail",async indexName=>{const response=await this.commonService.apiCaller({endpoint:"indices.get",data:{index:indexName,flat_settings:true}});if(response.ok){return response.response[indexName]}this.context.notifications.toasts.addDanger(response.error);return Promise.reject()});containers_IndexForm_defineProperty(this,"onSimulateIndexTemplate",indexName=>this.commonService.apiCaller({endpoint:"transport.request",data:{path:`/_index_template/_simulate_index/${indexName}`,method:"POST"}}).then(res=>{if(res.ok&&res.response&&res.response.template){var _res$response$templat;return{...res,response:{...res.response.template,settings:flat_default()(((_res$response$templat=res.response.template)===null||_res$response$templat===void 0?void 0:_res$response$templat.settings)||{},{safe:true})}}}return{ok:false,error:""}}))}static transformIndexDetailToLocal(payload){const newPayload=JSON.parse(JSON.stringify({...payload}));if(newPayload.mappings&&newPayload.mappings.properties){Object(external_osdSharedDeps_Lodash_["set"])(newPayload,"mappings.properties",transformObjectToArray(Object(external_osdSharedDeps_Lodash_["get"])(newPayload,"mappings.properties",{}
6)))}return newPayload}static transformIndexDetailToRemote(payload){const newPayload=JSON.parse(JSON.stringify({...payload}));if(newPayload.mappings&&newPayload.mappings.properties){Object(external_osdSharedDeps_Lodash_["set"])(newPayload,"mappings.properties",transformArrayToObject(Object(external_osdSharedDeps_Lodash_["get"])(newPayload,"mappings.properties",[])))}return newPayload}static transformIndexDetailToDiffableJSON(payload){const newPayload=JSON.parse(JSON.stringify({...payload}));if(newPayload.mappings&&newPayload.mappings.properties){Object(external_osdSharedDeps_Lodash_["set"])(newPayload,"mappings.properties",this.transformIndexDetailToDiffableJSON(Object(external_osdSharedDeps_Lodash_["get"])(newPayload,"mappings.properties",[])))}return newPayload}async validate(){var _this$indexDetailRef4;const result=await((_this$indexDetailRef4=this.indexDetailRef)===null||_this$indexDetailRef4===void 0?void 0:_this$indexDetailRef4.validate());if(result){return""}else{return"So fields error."}}get commonService(){return this.props.services.commonService}render(){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_IndexDetail,containers_IndexForm_extends({ref:ref=>this.indexDetailRef=ref,onSimulateIndexTemplate:this.onSimulateIndexTemplate,onGetIndexDetail:this.getIndexDetail,refreshOptions:aliasName=>this.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${aliasName||""}*`,s:"alias:desc"}}),docVersion:this.context.docLinks.DOC_LINK_VERSION},this.props)))}}containers_IndexForm_defineProperty(containers_IndexForm_IndexForm,"contextType",core_services["b"]);var public_containers_IndexForm=Object(external_osdSharedDeps_React_["forwardRef"])((function IndexFormWrapper(props,ref){const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);return external_osdSharedDeps_React_default.a.createElement(containers_IndexForm_IndexForm,containers_IndexForm_extends({},props,{ref:ref,services:services}))}));let FLOW_ENUM=function(FLOW_ENUM){FLOW_ENUM["SIMPLE"]="simple";FLOW_ENUM["COMPONENTS"]="components";return FLOW_ENUM}({});const getCommonFormRowProps=(name,field)=>({isInvalid:!!field.getError(name),error:field.getError(name),"data-test-subj":`form-row-${transformNameToString(name)}`});const formatTemplate=item=>{if(!item){return{}}return{...item,template:containers_IndexForm_IndexForm.transformIndexDetailToDiffableJSON(item.template)}};const formatRemoteTemplateToEditTemplate=props=>{var _templateDetail$compo,_templateDetail$_meta,_templateDetail$_meta2,_templateDetail$templ;const templateDetail=props.templateDetail;const payload={...templateDetail,priority:templateDetail.priority+"",template:containers_IndexForm_IndexForm.transformIndexDetailToLocal(templateDetail.template),_meta:{...templateDetail._meta,flow:(_templateDetail$compo=templateDetail.composed_of)!==null&&_templateDetail$compo!==void 0&&_templateDetail$compo.length?FLOW_ENUM.COMPONENTS:(_templateDetail$_meta=templateDetail._meta)!==null&&_templateDetail$_meta!==void 0&&_templateDetail$_meta.flow?(_templateDetail$_meta2=templateDetail._meta)===null||_templateDetail$_meta2===void 0?void 0:_templateDetail$_meta2.flow:FLOW_ENUM.SIMPLE}};if((_templateDetail$templ=templateDetail.template)!==null&&_templateDetail$templ!==void 0&&_templateDetail$templ.settings){Object(external_osdSharedDeps_Lodash_["set"])(payload,"template.settings",Object(node_modules_flat["flatten"])(Object(external_osdSharedDeps_Lodash_["get"])(payload,"template.settings")||{},{safe:true}))}return JSON.parse(JSON.stringify(payload))};const formatTemplateToSubmitPayload=value=>{const{name:name,_meta:_meta,...others}=value;
6const bodyPayload={...others,composed_of:(_meta===null||_meta===void 0?void 0:_meta.flow)===FLOW_ENUM.COMPONENTS?others.composed_of||[]:[],_meta:_meta,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote(others.template)};return bodyPayload};const submitTemplate=async props=>{const{name:name}=props.value;return await props.commonService.apiCaller({endpoint:"transport.request",data:{method:props.isEdit?"POST":"PUT",path:`/_index_template/${name}`,body:formatTemplateToSubmitPayload(props.value)}})};const hooks_getTemplate=async props=>{const response=await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_index_template/${props.templateName}?flat_settings=true`}});let error="";if(response.ok){var _response$response;const findItem=(_response$response=response.response)===null||_response$response===void 0||(_response$response=_response$response.index_templates)===null||_response$response===void 0?void 0:_response$response.find(item=>item.name===props.templateName);if(findItem){const templateDetail=findItem.index_template;templateDetail.name=props.templateName;return formatRemoteTemplateToEditTemplate({templateDetail:templateDetail})}error=`The template [${props.templateName}] does not exist.`}else{error=response.error||""}props.coreService.notifications.toasts.addDanger(error);throw new Error(error)};const simulateTemplate=props=>{const{name:name,index_patterns:index_patterns,priority:priority}=props.template;const payload=formatTemplateToSubmitPayload({...props.template,index_patterns:[`a_pattern_that_will_never_be_matched_for_simulate_template_${Date.now()}`],priority:500});const{template:template,...others}=payload;return props.commonService.apiCaller({endpoint:"transport.request",data:{method:"POST",path:`/_index_template/_simulate`,body:payload}}).then(result=>{if(result.ok){return{...result,response:formatRemoteTemplateToEditTemplate({templateDetail:{...others,index_patterns:index_patterns,priority:priority,name:name,template:result.response.template}})}}else{return result}})};function DefineTemplate_extends(){return DefineTemplate_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DefineTemplate_extends.apply(null,arguments)}function DefineTemplate(props){const{readonly:readonly,field:field,isEdit:isEdit}=props;const values=field.getValues();const Component=isEdit?built_in_components.Text:built_in_components.Input;const matchSystemIndex=filterByMinimatch(".kibana",values.index_patterns||[]);const registeredFlowField=field.registerField({name:["_meta","flow"]});return readonly?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Template settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),isEdit?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_extends({},getCommonFormRowProps("name",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Template name")),direction:"ver",helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Template name cannot be changed after the template is created.")}),external_osdSharedDeps_React_default.a.createElement(Component,field.registerField({name:"name",rules:[{pattern:constants["K"],message:"Invalid template name."}]}))),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{helpText:external_osdSharedDeps_React_default.a.createElement("div",null,constants["J"])},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_extends({direction:isEdit?"hoz":"ver"},getCommonFormRowProps("data_stream",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Template type"))}),external_osdSharedDeps_React_default.a.createElement(components_TemplateType,field.registerField({name:"data_stream"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_extends({},getCommonFormRowProps("index_patterns",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index patterns")),direction:isEdit?"hoz":"ver",helpText:"Specify the index patterns or wildcards. Add a comma to separate each value. Settings in this template will be applied to indexes with names matching index patterns or wildcards."}),external_osdSharedDeps_React_default.a.createElement(components_RemoteSelect,DefineTemplate_extends({},field.registerField({name:"index_patterns",rules:[{validator(rule,value){if(!value||!value.length){return Promise.reject("Index patterns must be defined")}return Promise.resolve("")}}]}),{delimiter:",",noSuggestions:true,async:false,refreshOptions:()=>Promise.resolve({ok:true,response:[]}),placeholder:"Select index patterns or input wildcards"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),matchSystemIndex?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",title:"Index patterns may contain system indexes"},"This template may apply to new system indexes and may affect your ability to access OpenSearch. We recommend narrowing your index patterns.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_extends({direction:isEdit?"hoz":"ver"},getCommonFormRowProps("priority",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Priority")),helpText:"Specify the priority of this template. If the index name matches more than one template, the template with the highest priority will be applied to the index."}),external_osdSharedDeps_React_default.a.createElement(built_in_components.Number,field.registerField({name:"priority",rules:[{min:0,message:"Priority cannot be smaller than 0."},{validator(rule,value){if(Number(value)!==parseInt(value)){return Promise.reject("Priority must be an integer.")}return Promise.resolve("")}}]}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_extends({},getCommonFormRowProps(["_meta","flow"],field),{fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Choose a method to define your templates"))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{width:350},grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckableCard"],{className:"eui-fullHeight",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",{className:"euiCheckableCard__label",style:{paddingRight:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Simple template"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",className:"euiCheckableCard__children"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"subdued"},"Define an index template with index aliases, settings, and mappings."))),id:"checkboxForIndexTemplateFlowSimple",onChange:()=>{registeredFlowField.onChange(FLOW_ENUM.SIMPLE)},checked:registeredFlowField.value===FLOW_ENUM.SIMPLE})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{width:350},grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCheckableCard"],{className:"eui-fullHeight",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",{className:"euiCheckableCard__label",style:{paddingRight:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Component template"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",className:"euiCheckableCard__children"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"subdued"},"Define an index template by associating component templates containing index configurations."))),id:"checkboxForIndexTemplateFlowComponents",onChange:()=>registeredFlowField.onChange(FLOW_ENUM.COMPONENTS),checked:registeredFlowField.value===FLOW_ENUM.COMPONENTS})))))}function DescriptionListHoz_extends(){return DescriptionListHoz_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DescriptionListHoz_extends.apply(null,arguments)}const DisplayItem=props=>{const{listItem:listItem,...others}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDescriptionList"],DescriptionListHoz_extends({compressed:true,listItems:[{...listItem,description:listItem.description===undefined||listItem.description===null?"-":listItem.description}]},others))};function DescriptionListHoz(props){const{listItems:listItems,columns:columns=4,...others}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:columns},listItems===null||listItems===void 0?void 0:listItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:item.title},external_osdSharedDeps_React_default.a.createElement(DisplayItem,DescriptionListHoz_extends({listItem:item},others)))))}var components_DescriptionListHoz=DescriptionListHoz;function OverviewTemplate(props){var _values$index_pattern;const{field:field,withoutPanel:withoutPanel,columns:columns}=props;const values=field.getValues();const content=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_DescriptionListHoz,{compressed:true,columns:columns,listItems:[{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Template type")),description:TemplateConvert({value:values.data_stream})},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Index patterns")),description:(_values$index_pattern=values.index_patterns)===null||_values$index_pattern===void 0?void 0:_values$index_pattern.join(", ")},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Priority")),description:values.priority},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Associated component templates")),description:(values.composed_of||[]).length?(values.composed_of||[]).map(item=>external_osdSharedDeps_React_default.a.createElement("div",{key:item},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:false,target:"_blank",href:`#${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/${item}`},item))):"-"}]}));return withoutPanel?content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Overview")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),content)}var components_DefineTemplate=DefineTemplate;function IndexSettings_extends(){return IndexSettings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexSettings_extends.apply(null,arguments)}function IndexSettings(props){var _values$template,_values$template2,_values$template3;const{readonly:readonly,field:field,columns:columns,isEdit:isEdit}=props;const values=field.getValues();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),readonly?external_osdSharedDeps_React_default.a.createElement(components_DescriptionListHoz,{compressed:true,columns:columns,listItems:[{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of primary shards")),description:((_values$template=values.template)===null||_values$template===void 0||(_values$template=_values$template.settings)===null||_values$template===void 0?void 0:_values$template["index.number_of_shards"])||"-"},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of replicas")),description:((_values$template2=values.template)===null||_values$template2===void 0||(_values$template2=_values$template2.settings)===null||_values$template2===void 0?void 0:_values$template2["index.number_of_replicas"])||"-"},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Refresh interval")),description:((_values$
6template3=values.template)===null||_values$template3===void 0||(_values$template3=_values$template3.settings)===null||_values$template3===void 0?void 0:_values$template3["index.refresh_interval"])||"-"}]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_extends({direction:isEdit?"hoz":"ver",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of primary shards")),helpText:"Specify the number of primary shards in the index. Default is 1."},getCommonFormRowProps(["template","settings","index.number_of_shards"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Number,IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.number_of_shards"],rules:[{min:1,message:"Number of shards cannot be smaller than 1."},{validator(rule,value){if(!value){return Promise.resolve("")}if(Number(value)!==parseInt(value)){return Promise.reject("Number of primary shards must be an integer.")}return Promise.resolve("")}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_extends({fullWidth:true,direction:isEdit?"hoz":"ver",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of replicas")),helpText:"Specify the number of replicas each primary shard should have. Default is 1."},getCommonFormRowProps(["template","settings","index.number_of_replicas"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Number,IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.number_of_replicas"],rules:[{min:0,message:"Number of replicas cannot be smaller than 0."},{validator(rule,value){if(!value){return Promise.resolve("")}if(Number(value)!==parseInt(value)){return Promise.reject("Number of replicas must be an integer")}return Promise.resolve("")}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_extends({direction:isEdit?"hoz":"ver",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Refresh interval")),helpText:"Specify how often the index should refresh, which publishes its most recent changes and makes them available for search. Default is 1s."},getCommonFormRowProps(["template","settings","index.refresh_interval"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Input,IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.refresh_interval"]}))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_AdvancedSettings,{value:field.getValues().template.settings||{},onChange:totalValue=>{field.setValue(["template","settings"],totalValue);field.validatePromise()},accordionProps:{initialIsOpen:false,id:"accordionForCreateIndexTemplateSettings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h4",null,"Advanced settings")},editorProps:{disabled:readonly,width:"100%",formatValue:flat_default.a},rowProps:{fullWidth:true,label:"Specify advanced index settings",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify a comma-delimited list of settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank",external:true},"View index settings")),external_osdSharedDeps_React_default.a.createElement("p",null,"All the settings will be handled in flat structure."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:"https://opensearch.org/docs/latest/api-reference/index-apis/get-index/#url-parameters",external:true,target:"_blank"},"Learn more")))}}))}var components_IndexSettings=IndexSettings;function IndexAlias_extends(){return IndexAlias_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexAlias_extends.apply(null,arguments)}function IndexAlias(props){var _values$template;const{readonly:readonly,field:field,isEdit:isEdit}=props;const values=field.getValues();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias")),fullWidth:true,helpText:"Allow the new indexes to be referenced by existing al
6iases or specify a new alias."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),readonly?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_DescriptionListHoz,{compressed:true,listItems:[{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Alias names")),description:Object.keys((values===null||values===void 0||(_values$template=values.template)===null||_values$template===void 0?void 0:_values$template.aliases)||{}).join(",")||"-"}]})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexAlias_extends({fullWidth:true,direction:isEdit?"hoz":"ver"},getCommonFormRowProps(["template","aliases"],field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Index alias")),helpText:"Select existing aliases or specify a new alias."}),external_osdSharedDeps_React_default.a.createElement(components_AliasSelect,IndexAlias_extends({},field.registerField({name:["template","aliases"],rules:[...constants["d"]]}),{refreshOptions:aliasName=>services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${aliasName||""}*`,s:"alias:desc"}})})))))}var containers_IndexAlias=IndexAlias;function TemplateMappings_extends(){return TemplateMappings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TemplateMappings_extends.apply(null,arguments)}function TemplateMappings(props){const{readonly:readonly,field:field,isEdit:isEdit}=props;const mappingsRef=Object(external_osdSharedDeps_React_["useRef"])(null);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index mapping")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Define how documents and their fields are stored and indexed."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:`https://opensearch.org/docs/${coreServices.docLinks.DOC_LINK_VERSION}/opensearch/mappings/`},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true},external_osdSharedDeps_React_default.a.createElement(components_IndexMapping,TemplateMappings_extends({},field.registerField({name:["template","mappings"],rules:[{validator(){var _validate;return(_validate=mappingsRef.current.validate())===null||_validate===void 0?void 0:_validate.then(result=>{if(result){return Promise.reject(result)}return Promise.resolve("")})}}]}),{readonly:readonly,isEdit:isEdit,ref:mappingsRef,oldMappingsEditable:true,docVersion:coreServices.docLinks.DOC_LINK_VERSION}))))}var containers_TemplateMappings=TemplateMappings;const ComponentTemplateBadge=_ref=>{let{template:template}=_ref;return external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:2}},[constants["w"].alias,constants["w"].settings,constants["w"].mappings].filter(item=>template[item]).map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{style:{textTransform:"capitalize"},key:item,color:"hollow"},item)))};
6var ComponentTemplateBadge_ComponentTemplateBadge=ComponentTemplateBadge;var components_ComponentTemplateBadge=ComponentTemplateBadge_ComponentTemplateBadge;const hooks_getCommonFormRowProps=(name,field)=>({isInvalid:!!field.getError(name),error:field.getError(name),"data-test-subj":`form-row-${transformNameToString(name)}`});const hooks_formatTemplate=item=>{if(!item){return{}}const{name:name,includes:includes,...others}=item;return{...others,template:containers_IndexForm_IndexForm.transformIndexDetailToDiffableJSON(others.template)}};const filterTemplateByIncludes=value=>{const{includes:includes,template:template,...others}=value;const payload={...others,template:{}};const templatePayload={};if(includes!==null&&includes!==void 0&&includes.aliases){templatePayload.aliases=template.aliases}if(includes!==null&&includes!==void 0&&includes.mappings){templatePayload.mappings=template.mappings}if(includes!==null&&includes!==void 0&&includes.settings){templatePayload.settings=template.settings}payload.template=templatePayload;return payload};const hooks_formatRemoteTemplateToEditTemplate=props=>{var _templateDetail$templ,_templateDetail$templ2,_templateDetail$templ3,_templateDetail$templ4;const templateDetail=props.templateDetail;const payload=JSON.parse(JSON.stringify({...templateDetail,name:props.templateName,template:containers_IndexForm_IndexForm.transformIndexDetailToLocal(templateDetail.template)}));if((_templateDetail$templ=templateDetail.template)!==null&&_templateDetail$templ!==void 0&&_templateDetail$templ.settings){Object(external_osdSharedDeps_Lodash_["set"])(payload,"template.settings",Object(node_modules_flat["flatten"])(Object(external_osdSharedDeps_Lodash_["get"])(payload,"template.settings")||{},{safe:true}))}const includes={[constants["w"].alias]:!!((_templateDetail$templ2=templateDetail.template)!==null&&_templateDetail$templ2!==void 0&&_templateDetail$templ2[constants["w"].alias]),[constants["w"].settings]:!!((_templateDetail$templ3=templateDetail.template)!==null&&_templateDetail$templ3!==void 0&&_templateDetail$templ3[constants["w"].settings]),[constants["w"].mappings]:!!((_templateDetail$templ4=templateDetail.template)!==null&&_templateDetail$templ4!==void 0&&_templateDetail$templ4[constants["w"].mappings])};return JSON.parse(JSON.stringify({...payload,includes:includes}))};const hooks_submitTemplate=async props=>{const{name:name,template:template,...others}=props.value;return await props.commonService.apiCaller({endpoint:"transport.request",data:{method:props.isEdit?"POST":"PUT",path:`/_component_template/${name}`,body:{...others,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote(template)}}})};const CreateComposableTemplate_hooks_getTemplate=async props=>{const response=await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_component_template/${props.templateName}?flat_settings=true`}});let error="";if(response.ok){var _response$response;const findItem=(_response$response=response.response)===null||_response$response===void 0||(_response$response=_response$response.component_templates)===null||_response$response===void 0?void 0:_response$response.find(item=>item.name===props.templateName);if(findItem){const templateDetail=findItem.component_template;return hooks_formatRemoteTemplateToEditTemplate({templateDetail:templateDetail,templateName:props.templateName})}error=`The template [${props.templateName}] does not exist.`}else{error=response.error||""}throw new Error(error)};function DefineTemplate_DefineTemplate_extends(){return DefineTemplate_DefineTemplate_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DefineTemplate_DefineTemplate_extends.apply(null,arguments)}function debouncePromise(func,wait){let timestamp;return function(){for(var _len=arguments.length,rest=new Array(_len),_key=0;_key<_len;_key++){rest[_key]=arguments[_key]}return new Promise((resolve,reject)=>{timestamp=Date.now();const funcTimestamp=timestamp;setTimeout(()=>{if(funcTimestamp===timestamp){func.apply(null,rest).then(resolve,reject)}},wait)})}}function DefineTemplate_DefineTemplate(props){const{field:field,isEdit:isEdit,noPanel:noPanel}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const Component=isEdit?built_in_components.Text:built_in_components.Input;const validateRemoteComponentName=Object(external_osdSharedDeps_React_["useCallback"])(debouncePromise(async(rule,value)=>{if(!value||isEdit){return Promise.resolve("")}try{const templateResult=await CreateComposableTemplate_hooks_getTemplate({commonService:services.commonService,templateName:value});if(templateResult){return Promise.reject(`The component template ${value} already exists, please change the name.`)}}catch(e){return Promise.resolve("")}return Promise.resolve("")},500),[]);const content=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,isEdit?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_DefineTemplate_extends({},hooks_getCommonFormRowProps("name",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Name")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Name cannot be changed after the component template is created.")}),external_osdSharedDeps_React_default.a.createElement(Component,field.registerField({name:"name",rules:[{pattern:constants["K"],message:"Invalid template name."},{validator:validateRemoteComponentName}]}))),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{helpText:external_osdSharedDeps_React_default.a.createElement("div",null,constants["J"])},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineTemplate_DefineTemplate_extends({},hooks_getCommonFormRowProps(["_meta","description"],field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Description - ",external_osdSharedDeps_React_default.a.createElement("i",null,"optional"))),helpText:"Describe the purpose or contents to help you identify this component.",direction:isEdit?"hoz":"ver"}),external_osdSharedDeps_React_default.a.createElement(built_in_components.Input,field.registerField({name:["_meta","description"]}))));if(noPanel){return content}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,`Define component template`))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),content)}var containers_DefineTemplate=DefineTemplate_DefineTemplate;function IndexSettings_IndexSettings_extends(){return IndexSettings_IndexSettings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexSettings_IndexSettings_extends.apply(null,arguments)}const WrappedNumber=_ref=>{let{onChange:onChange,...others}=_ref;return external_osdSharedDeps_React_default.a.createElement(built_in_components.Number,IndexSettings_IndexSettings_extends({},others,{onChange:val=>
6{if(val===""){onChange(undefined);return}onChange(val)}}))};function IndexSettings_IndexSettings(props){var _values$includes;const{field:field,isEdit:isEdit,noPanel:noPanel}=props;const values=field.getValues();return external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{color:noPanel?"ghost":undefined,title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index settings")),noExtraPadding:true,actions:external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(built_in_components.Switch,IndexSettings_IndexSettings_extends({},field.registerField({name:["includes",constants["w"].settings]}),{label:"Use configuration",showLabel:true}))),titleSize:"s"},(_values$includes=values.includes)!==null&&_values$includes!==void 0&&_values$includes[constants["w"].settings]?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_IndexSettings_extends({fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of primary shards")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Specify the number of primary shards in the index. Default is 1."),direction:isEdit?"hoz":"ver"},hooks_getCommonFormRowProps(["template","settings","index.number_of_shards"],field)),external_osdSharedDeps_React_default.a.createElement(WrappedNumber,IndexSettings_IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.number_of_shards"],rules:[{min:1,message:"Number of shards cannot be smaller than 1."},{validator(rule,value){if(!value){return Promise.resolve("")}if(Number(value)!==parseInt(value)){return Promise.reject("Number of primary shards must be an integer.")}return Promise.resolve("")}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_IndexSettings_extends({fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of replicas")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Specify the number of replicas each primary shard should have. Default is 1."),direction:isEdit?"hoz":"ver"},hooks_getCommonFormRowProps(["template","settings","index.number_of_replicas"],field)),external_osdSharedDeps_React_default.a.createElement(WrappedNumber,IndexSettings_IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.number_of_replicas"],rules:[{min:0,message:"Number of replicas cannot be smaller than 0."},{validator(rule,value){if(!value){return Promise.resolve("")}if(Number(value)!==parseInt(value)){return Promise.reject("Number of replicas must be an integer")}return Promise.resolve("")}}]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexSettings_IndexSettings_extends({label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Refresh interval")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Specify how often the index should refresh, which publishes its most recent changes and makes them available for search. Default is 1s."),direction:isEdit?"hoz":"ver"},hooks_getCommonFormRowProps(["template","settings","index.refresh_interval"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Input,IndexSettings_IndexSettings_extends({removeWhenEmpty:true},field.registerField({name:["template","settings","index.refresh_interval"]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_AdvancedSettings,{value:field.getValues().template.settings||{},onChange:totalValue=>{field.setValue(["template","settings"],totalValue);field.validatePromise()},accordionProps:{initialIsOpen:false,id:"accordionForCreateComposableTemplateSettings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h4",null,"Advanced settings")},editorProps:{width:"100%",formatValue:flat_default.a},rowProps:{fullWidth:true,label:"Specify advanced index settings",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify a comma-delimited list of settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank",external:true},"View index settings")),external_osdSharedDeps_React_default.a.createElement("p",null,"All the settings will be handled in flat structure."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:"https://opensearch.org/docs/latest/api-reference/index-apis/get-index/#url-parameters",external:true,target:"_blank"},"Learn more")))}}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null)}var CreateComposableTemplate_components_IndexSettings=IndexSettings_IndexSettings;function IndexAlias_IndexAlias_extends(){return IndexAlias_IndexAlias_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexAlias_IndexAlias_extends.apply(null,arguments)}function IndexAlias_IndexAlias(props){var _values$includes;const{field:field,isEdit:isEdit,noPanel:noPanel}=props;const values=field.getValues();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);return external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{color:noPanel?"ghost":undefined,noExtraPadding:true,title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index alias")),helpText:"Allow the new indexes to be referenced by existing al
6iases or specify a new alias."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),actions:external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(built_in_components.Switch,IndexAlias_IndexAlias_extends({},field.registerField({name:["includes",constants["w"].alias]}),{label:"Use configuration",showLabel:true}))),titleSize:"s"},(_values$includes=values.includes)!==null&&_values$includes!==void 0&&_values$includes[constants["w"].alias]?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],IndexAlias_IndexAlias_extends({fullWidth:true},hooks_getCommonFormRowProps(["template","aliases"],field),{direction:isEdit?"hoz":"ver",label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Select existing aliases or specify a new alias.")}),external_osdSharedDeps_React_default.a.createElement(components_AliasSelect,IndexAlias_IndexAlias_extends({},field.registerField({name:["template","aliases"],rules:[...constants["d"]]}),{refreshOptions:aliasName=>services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${aliasName||""}*`,s:"alias:desc"}})}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"})):null)}var CreateComposableTemplate_containers_IndexAlias=IndexAlias_IndexAlias;function TemplateMappings_TemplateMappings_extends(){return TemplateMappings_TemplateMappings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TemplateMappings_TemplateMappings_extends.apply(null,arguments)}function TemplateMappings_TemplateMappings(props){var _values$includes;const{field:field,noPanel:noPanel}=props;const values=field.getValues();const mappingsRef=Object(external_osdSharedDeps_React_["useRef"])(null);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);return external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{noExtraPadding:true,color:noPanel?"ghost":undefined,title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index mapping")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Define how documents and their fields are stored and indexed."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:`https://opensearch.org/docs/${coreServices.docLinks.DOC_LINK_VERSION}/opensearch/mappings/`},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),actions:external_osdSharedDeps_React_default.a.createElement(built_in_components.Switch,TemplateMappings_TemplateMappings_extends({},field.registerField({name:["includes",constants["w"].mappings]}),{label:"Use configuration",showLabel:true})),titleSize:"s"},(_values$includes=values.includes)!==null&&_values$includes!==void 0&&_values$includes[constants["w"].mappings]?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true},external_osdSharedDeps_React_default.a.createElement(components_IndexMapping,TemplateMappings_TemplateMappings_extends({},field.registerField({name:["template","mappings"],rules:[{validator(){var _validate;if(!mappingsRef.current){return Promise.resolve("")}return(_validate=mappingsRef.current.validate())===null||_validate===void 0?void 0:_validate.then(result=>{if(result){return Promise.reject(result)}return Promise.resolve("")})}}]}),{isEdit:true,ref:mappingsRef,oldMappingsEditable:true,docVersion:coreServices.docLinks.DOC_LINK_VERSION}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null)}var CreateComposableTemplate_containers_TemplateMappings=TemplateMappings_TemplateMappings;
6function DeleteComposableTemplatesModal_DeleteTemplateModal(props){var _componentMapTemplate,_componentMapTemplate2;const{onClose:onClose,visible:visible,selectedItems:selectedItems,onDelete:onDelete}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const{componentMapTemplate:componentMapTemplate,loading:loading}=useComponentMapTemplate();const[checked,setChecked]=Object(external_osdSharedDeps_React_["useState"])(false);const linkedIndexItemCount=((_componentMapTemplate=componentMapTemplate[selectedItems[0]])===null||_componentMapTemplate===void 0?void 0:_componentMapTemplate.length)||0;const onConfirm=async()=>{if(services){let result={ok:true,response:{}};if(linkedIndexItemCount){result=await Promise.all(componentMapTemplate[selectedItems[0]].map(item=>submitTemplateChange({coreService:coreServices,commonService:services.commonService,templateName:item,transformTemplate(currentTemplate){var _currentTemplate$comp;return{...currentTemplate,composed_of:((_currentTemplate$comp=currentTemplate.composed_of)===null||_currentTemplate$comp===void 0?void 0:_currentTemplate$comp.filter(item=>item!==selectedItems[0]))||[]}}}))).then(result=>({response:{},ok:result.every(item=>item.ok),error:result.filter(item=>!item.ok).map(item=>item.error).join(", ")}))}if(result.ok){result=await services.commonService.apiCaller({endpoint:"transport.request",data:{path:`/_component_template/${selectedItems.join(",")}`,method:"DELETE"}})}if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`Delete [${selectedItems.join(", ")}] successfully`);onDelete()}else{var _result;coreServices.notifications.toasts.addDanger(((_result=result)===null||_result===void 0?void 0:_result.error)||"")}}};Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(visible){setChecked(false)}},[visible]);if(!visible){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],{onClose:onClose},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Delete ",selectedItems[0])))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,loading?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"xl"}):external_osdSharedDeps_React_default.a.createElement("div",{style:{lineHeight:1.5}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,!linkedIndexItemCount?"The following component template will be permanently deleted. This action cannot be undone.":`The component template ${selectedItems.join(", ")} will be permanently deleted. The component template will be unlinked from ${linkedIndexItemCount} index templates:`)),!linkedIndexItemCount?external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},selectedItems.map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:item},item))):null,linkedIndexItemCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,(_componentMapTemplate2=componentMapTemplate[selectedItems[0]])===null||_componentMapTemplate2===void 0?void 0:_componentMapTemplate2.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("span",{key:item},index>0&&", ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{target:"_blank",to:`${constants["D"].CREATE_TEMPLATE}/${item}`},item))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,{"data-test-subj":"UnlinkConfirmCheckBox",label:`Unlink index templates and delete ${selectedItems.join(", ")}`,value:checked,onChange:checked=>setChecked(checked)})):null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{disabled:loading,isLoading:loading,"data-test-subj":"deletaCancelButton",onClick:onClose},"Cancel"),!linkedIndexItemCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:loading,isLoading:loading,"data-test-subj":"deleteConfirmButton",onClick:onConfirm,fill:true,color:"danger"},"Delete"):null,linkedIndexItemCount?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"deleteConfirmUnlinkButton",onClick:onConfirm,disabled:!checked||loading,isLoading:loading,fill:true,color:"danger"},"Apply changes"):null))}
6var DeleteComposableTemplatesModal=DeleteComposableTemplatesModal_DeleteTemplateModal;function AssociatedTemplatesModal(props){const{onUnlink:onUnlink,renderProps:renderProps,componentTemplate:componentTemplate}=props;const[visible,setVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const{loading:loading,componentMapTemplate:componentMapTemplate,reload:reload}=useComponentMapTemplate();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,renderProps({setVisible:setVisible}),visible?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],{onClose:()=>setVisible(false)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],null,external_osdSharedDeps_React_default.a.createElement("h2",null,"Associated index templates"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyoutBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiInMemoryTable"],{loading:loading,items:(componentMapTemplate[componentTemplate]||[]).map(item=>({name:item})),columns:[{name:"Templates",field:"name",sortable:true,render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:false,target:"_blank",href:`#${constants["D"].CREATE_TEMPLATE}/${value}`},value)},{name:"Actions",field:"actions",align:"right",render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Unlink"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":`Unlink from ${record.name}?`,iconType:"unlink",onClick:()=>{Modal["a"].show({type:"confirm",title:`Unlink from ${record.name}?`,content:external_osdSharedDeps_React_default.a.createElement("p",{style:{lineHeight:1.5}},"The component ",componentTemplate," will be removed from the template ",record.name,". This will affect any new indexes created with the template."),footer:["cancel","confirm"],locale:{confirm:"Unlink"},confirmButtonProps:{color:"danger"},CancelButtonComponent:external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],async onOk(){const updateResult=await submitTemplateChange({templateName:record.name,commonService:services.commonService,coreService:coreServices,transformTemplate(currentTemplate){var _currentTemplate$comp;return{...currentTemplate,composed_of:((_currentTemplate$comp=currentTemplate.composed_of)===null||_currentTemplate$comp===void 0?void 0:_currentTemplate$comp.filter(item=>item!==componentTemplate))||[]}}});if(updateResult.ok){onUnlink===null||onUnlink===void 0||onUnlink(record.name);reload(true);coreServices.notifications.toasts.addSuccess(`${componentTemplate} has been successfully unlinked from ${record.name}.`)}else{coreServices.notifications.toasts.addDanger(updateResult.error);return Promise.reject(updateResult.error)}}})}}))}],pagination:true}))):null)}var containers_AssociatedTemplatesModal=AssociatedTemplatesModal;function ComposableTemplatesDeleteAction(props){const{selectedItems:selectedItems,onDelete:onDelete}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const renderDeleteButton=renderProps=>{const triggerDelete=()=>{setDeleteIndexModalVisible(true)};if(props.renderDeleteButton){return props.renderDeleteButton({...renderProps,triggerDelete:triggerDelete})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{"data-test-subj":"deleteAction",color:"danger",disabled:renderProps.selectedItems.length!==1,onClick:triggerDelete},"Delete")};const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(containers_AssociatedTemplatesMo
6dal,{componentTemplate:selectedItems[0],renderProps:_ref=>{let{setVisible:setVisible}=_ref;return renderDeleteButton({selectedItems:selectedItems,setVisible:setVisible})}}),external_osdSharedDeps_React_default.a.createElement(DeleteComposableTemplatesModal,{selectedItems:selectedItems,visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}}))}function ComposableTemplatesAction(props){return external_osdSharedDeps_React_default.a.createElement(ComposableTemplatesDeleteAction,props)}function TemplateDetail_extends(){return TemplateDetail_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TemplateDetail_extends.apply(null,arguments)}const TemplateDetail=(props,ref)=>{const{templateName:templateName,onCancel:onCancel,onSubmitSuccess:onSubmitSuccess,hideTitle:hideTitle,hideButton:hideButton,noPanel:noPanel,useNewUX:useNewUX}=props;const isEdit=!!templateName;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[isSubmitting,setIsSubmitting]=Object(external_osdSharedDeps_React_["useState"])(false);const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const oldValue=Object(external_osdSharedDeps_React_["useRef"])(undefined);const field=useField({values:{template:{}}});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onSubmit=async()=>{const{errors:errors,values:templateDetail}=await field.validatePromise()||{};if(errors){return}const payload=filterTemplateByIncludes(templateDetail);setIsSubmitting(true);const result=await hooks_submitTemplate({value:payload,commonService:services.commonService,isEdit:isEdit});if(destroyRef.current){return result}setIsSubmitting(false);if(result.ok){return result}else{var _result$body;return{...result,error:(result===null||result===void 0||(_result$body=result.body)===null||_result$body===void 0||(_result$body=_result$body.error)===null||_result$body===void 0||(_result$body=_result$body.caused_by)===null||_result$body===void 0?void 0:_result$body.reason)||result.error}}};const onClickSubmit=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{const result=await onSubmit();if(result){if(result.ok){coreServices.notifications.toasts.addSuccess(`${values.name} has been successfully created.`);onSubmitSuccess&&onSubmitSuccess(values.name)}else{coreServices.notifications.toasts.addDanger(result.error)}}},[onSubmit]);Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>({submit:onClickSubmit}));const refreshTemplate=()=>{CreateComposableTemplate_hooks_getTemplate({templateName:templateName||"",commonService:services.commonService}).then(template=>{oldValue.current=JSON.parse(JSON.stringify(template));field.resetValues(template)}).catch(error=>{coreServices.notifications.toasts.addDanger(error.message);props.history.replace(constants["D"].COMPOSABLE_TEMPLATES)})};Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(isEdit){refreshTemplate()}return()=>{destroyRef.current=true}},[]);const values=field.getValues();const subCompontentProps={...props,isEdit:isEdit,field:field,noPanel:noPanel,useNewUx:useNewUX};const diffedNumber=isEdit?Object(helpers["a"])(hooks_formatTemplate(filterTemplateByIncludes({name:values.name,template:{},...oldValue.current})),hooks_formatTemplate(filterTemplateByIncludes(values))):0;const onClickViewJson=()=>{const showValue=JSON.parse(JSON.stringify({...values,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote(values.template)}));const{includes:includes,...others}=showValue;Modal["a"].show({locale:{ok:"Close"},style:{width:800},"data-test-subj":"templateJSONDetailModal",title:values.name,content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",isCopyable:true},JSON.stringify(others,null,2))})};const onDelete=()=>{props.history.replace(constants["D"].COMPOSABLE_TEMPLATES)};const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};const onDeleteIndexModalOpen=()=>{setDeleteIndexModalVisible(true)};const deleteModal=()=>deleteIndexModalVisible&&external_osdSharedDeps_React_default.a.createElement(DeleteComposableTemplatesMo
6dal,{selectedItems:[templateName||""],visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Component templates are reusable building blocks for composing index or data stream templates. You can define component templates with common index configurations and associate them to an index template.",links:{label:"Learn more",href:coreServices.docLinks.links.opensearch.indexTemplates.composable,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement("div",null,hideTitle?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},isEdit?external_osdSharedDeps_React_default.a.createElement("h1",{title:templateName},templateName):external_osdSharedDeps_React_default.a.createElement("h1",null,"Create component template"))),isEdit?null:useNewUX?external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}):external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:"",helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Component templates are reusable building blocks for composing index or data stream templates. You can define component templates with common index configurations and associate them to an index template."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,target:"_blank",href:coreServices.docLinks.links.opensearch.indexTemplates.composable},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{iconType:"trash",testId:"deleteButton",color:"danger",ariaLabel:"delete",run:onDeleteIndexModalOpen,controlType:"icon",display:"base"},{id:"View JSON",label:"View JSON",testId:"viewJSONButton",run:onClickViewJson,fill:false,controlType:"button"}]}),deleteModal()):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{style:{marginRight:20},onClick:onClickViewJson},"View JSON"),external_osdSharedDeps_React_default.a.createElement(ComposableTemplatesAction,{selectedItems:[templateName||""],history:props.history,onDelete:onDelete}))):null),useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(containers_DefineTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CreateComposableTemplate_containers_IndexAlias,TemplateDetail_extends({key:props.dataSourceId},subCompontentProps)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CreateComposableTemplate_components_IndexSettings,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CreateComposableTemplate_containers_TemplateMappings,subCompontentProps),isEdit||hideButton?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onCancel,"data-test-subj":"CreateComposableTemplateCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onCl
6ickSubmit,isLoading:isSubmitting,"data-test-subj":"CreateComposableTemplateCreateButton"},"Create component template"))))),diffedNumber?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{submitButtonDataTestSubj:"updateTemplateButton",unsavedCount:diffedNumber,onClickCancel:async()=>{var _oldValue$current;field.resetValues(hooks_formatRemoteTemplateToEditTemplate({templateDetail:{...oldValue.current,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote((_oldValue$current=oldValue.current)===null||_oldValue$current===void 0?void 0:_oldValue$current.template)},templateName:values.name}))},onClickSubmit:async()=>{const result=await onSubmit();if(result){if(result.ok){coreServices.notifications.toasts.addSuccess(`${values.name} has been successfully updated.`);refreshTemplate()}else{coreServices.notifications.toasts.addDanger(result.error)}}}})):null)};var TemplateDetail_TemplateDetail=Object(external_osdSharedDeps_React_["forwardRef"])(TemplateDetail);var containers_TemplateDetail=TemplateDetail_TemplateDetail;function ComposableTemplate_extends(){return ComposableTemplate_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ComposableTemplate_extends.apply(null,arguments)}function ComposableTemplate(props){const{field:field,readonly:readonly,history:history}=props;const[dialogVisible,setDialogVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[selectedTypes,setSelectedTypes]=Object(external_osdSharedDeps_React_["useState"])([]);const[selectedComposableTemplates,setSelectedComposableTemplates]=Object(external_osdSharedDeps_React_["useState"])([]);const[allComposableTemplates,setAllComposableTemplates]=Object(external_osdSharedDeps_React_["useState"])([]);const[createComponentVisible,setCreateComponentVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const values=field.getValues();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const componentCreateRef=Object(external_osdSharedDeps_React_["useRef"])(null);const reloadAllComposableTemplates=()=>services.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_component_template/*`},hideLog:true}).then(res=>{if(res&&res.ok){setAllComposableTemplates(res.response.component_templates||[])}});Object(external_osdSharedDeps_React_["useEffect"])(()=>{reloadAllComposableTemplates()},[]);const finalOptions=Object(external_osdSharedDeps_React_["useMemo"])(()=>allComposableTemplates.filter(item=>{if(!selectedTypes.length){return true}return selectedTypes.every(type=>!!item.component_template.template[type])}),[selectedTypes,allComposableTemplates]);if(readonly){return null}return external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("div",null,"Component template")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Define an index template by combining component templates containing index configurations. Associate existing component templates or create one. You can arrange the priority of the component templates by dragging them. The component template placed on bottom has the highest priority."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:coreServices.docLinks.links.opensearch.indexTemplates.composable},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),titleSize:"s"},values.composed_of&&values.composed_of.length&&allComposableTemplates.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDragDropContext"],{onDragEnd:_ref=>{let{source:source,destination:destination}=_ref;if(source&&destination){const items=Object(external_osdSharedDeps_ElasticEui_["euiDragDropReorder"])(values.composed_of||[],source.index,destination.index);field.setValue("composed_of",items)}}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDroppable"],{droppableId:"composableTemplatesDropArea",spacing:"none"},values.composed_of.map((item,index)=>{const findItem=allComposableTemplates.find(template=>template.name===item);if(!findItem){return external_osdSharedDeps_React_default.a.createElement("div",{key:item})}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{key:item,alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDraggable"],{isDragDisabled:readonly,index:index,customDragHandle:true,draggableId:item,key:item,style:{paddingLeft:0,paddingRight:0},spacing:"m"},provided=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{paddingSize:"m"},external_osdSharedDeps_React_default.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},external_osdSharedDeps_React_default.a.createElement("div",{style:{display:"flex",alignItems:"center"}},external_osdSharedDeps_React_default.a.createElement("div",ComposableTemplate_extends({},provided.dragHandleProps,{"aria-label":"Drag Handle"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"grab"})),external_osdSharedDeps_React_default.a.createElement("span",{style:{marginLeft:12}},findItem.name),external_osdSharedDeps_React_default.a.createElement("div",{style:{marginLeft:12}},external_osdSharedDeps_React_default.a.createElement(components_ComponentTemplateBadge,{template:findItem.component_template.template}
6))),external_osdSharedDeps_React_default.a.createElement("div",null,readonly?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{onClick:()=>{const newValue=[...values.composed_of||[]];newValue.splice(index,1);field.setValue("composed_of",newValue)},iconType:"trash",color:"danger","aria-label":"delete"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{onClick:()=>window.open(`#${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/${item}`),style:{marginLeft:12},iconType:"inspect",color:"primary","aria-label":"see detail"})))))))}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,"No component templates associated"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),readonly?null:external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>setDialogVisible(true)},"Associate component templates"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{style:{marginLeft:20},onClick:()=>setCreateComponentVisible(true)},"Create component template")),external_osdSharedDeps_React_default.a.createElement(Modal["a"].SimpleModal,{type:"confirm",visible:dialogVisible,locale:{confirm:`Associate (${selectedComposableTemplates.length})`},footer:["cancel","confirm"],style:{width:860},title:"Associate component templates",onOk:()=>{field.setValue("composed_of",[...field.getValue("composed_of")||[],...selectedComposableTemplates]);setSelectedComposableTemplates([])},onClose:()=>setDialogVisible(false),content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSelectable"],{searchable:true,options:finalOptions.map(item=>({value:item,label:item.name,checked:[...values.composed_of||[],...selectedComposableTemplates].includes(item.name)?"on":undefined,disabled:(values.composed_of||[]).includes(item.name)})),onChange:val=>{setSelectedComposableTemplates(val.filter(item=>item.checked==="on"&&!item.disabled).map(item=>item.label))},searchProps:{placeholder:"Search"},listProps:{rowHeight:40,bordered:true},renderOption:(option,searchValue)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHighlight"],{search:searchValue},option.label)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement(components_ComponentTemplateBadge,{template:option.value.component_template.template}))),height:480},(list,search)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,search),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{flexBasis:"100px"},grow:false},external_osdSharedDeps_React_default.a.createElement(FilterGroup,{filterButtonProps:{children:"Types"},onChange:val=>setSelectedTypes(val||[]),value:selectedTypes,options:[{label:constants["w"].alias},{label:constants["w"].mappings},{label:constants["w"].settings}]}))),list))}),createComponentVisible?external_osdSharedDeps_React_default.a.createElement(Modal["a"].SimpleModal,{maxWidth:false,style:{width:"70vw"},type:"confirm",title:"Create component template",visible:createComponentVisible,onCancel:()=>setCreateComponentVisible(false),locale:{confirm:"Create"},footer:["cancel","confirm"],onOk:()=>{var _componentCreateRef$c;(_componentCreateRef$c=componentCreateRef.current)===null||_componentCreateRef$c===void 0||_componentCreateRef$c.submit();return Promise.reject("no error")},onClose:()=>setCreateComponentVisible(false),content:external_osdSharedDeps_React_default.a.createElement(containers_TemplateDetail,{hideTitle:true,hideButton:true,noPanel:true,onSubmitSuccess:name=>{reloadAllComposableTemplates();field.setValue("composed_of",[...field.getValue("composed_of")||[],name]);setCreateComponentVisible(false)},ref:componentCreateRef,history:history})}):null)}var containers_ComposableTemplate=ComposableTemplate;const PreviewTemplate_TemplateDetail=(props,ref)=>{const{value:value,history:history}=props;const field=useField({values:JSON.parse(JSON.stringify(value)),onChange(name,value){if(name==="data_stream"&&value===undefined){field.deleteValue(name)}}});const subCompontentProps={...props,field:field,isEdit:false,readonly:true,history:history,withoutPanel:true,columns:3};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Template settings")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(OverviewTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_ComposableTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_IndexAlias,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_IndexSettings,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_TemplateMappings,subCompontentProps))};var PreviewTemplate=Object(external_osdSharedDeps_React_["forwardRef"])(PreviewTemplate_TemplateDetail);var containers_PreviewTemplate=PreviewTemplate;let TABS_ENUM=function(TABS_ENUM){TABS_ENUM["SUMMARY"]="summary";TABS_ENUM["CONFIG"]="CONFIG";return TABS_ENUM}({});const constant_tabs=[{id:TABS_ENUM.SUMMARY,name:"Summary"},{id:TABS_ENUM.CONFIG,name:"Configuration"}];function TemplateDetail_TemplateDetail_extends(){return TemplateDetail_TemplateDetail_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},TemplateDetail_TemplateDetail_extends.apply(null,arguments)}const TemplateDetail_TemplateDetail_TemplateDetail=(props,ref)=>{var _values$_meta,_values$_meta2,_values$_meta3,_values$_meta4;const{templateName:templateName,onCancel:onCancel,onSubmitSuccess:onSubmitSuccess,history:history,useUpdatedUX:useUpdatedUX}=props;const isEdit=!!templateName;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[selectedTabId,setSelectedTabId]=Object(external_osdSharedDeps_React_["useState"])(TABS_ENUM.SUMMARY);const[visible,setVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[previewFlyoutVisible,setPreviewFlyoutVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[isSubmitting,setIsSubmitting]=Object(external_osdSharedDeps_React_["useState"])(false);const oldValue=Object(external_osdSharedDeps_React_["useRef"])(undefined);const searchObject=query_string_default.a.parseUrl(props.location.search);if(searchObject.query.values){try{searchObject.query.values=JSON.parse(searchObject.query.values||"")}catch(e){}}const defaultValues=Object(external_osdSharedDeps_Lodash_["merge"])({},{priority:0,template:{},_meta:{flow:FLOW_ENUM.SIMPLE}},searchObject.query.values);const field=useField({values:defaultValues,onChange(name,value){if(name==="data_stream"&&value===undefined){field.deleteValue(name)}}});const simulateField=useField({values:{priority:0,template:{},_meta:{flow:FLOW_ENUM.SIMPLE}}});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onSubmit=async()=>{const{errors:errors,values:templateDetail}=await field.validatePromise()||{};if(errors){return}setIsSubmitting(true);const result=await submitTemplate({value:templateDetail,commonService:services.commonService,isEdit:isEdit});if(destroyRef.current){return}setIsSubmitting(false);
6if(result.ok){return result}else{var _result$body;return{...result,error:(result===null||result===void 0||(_result$body=result.body)===null||_result$body===void 0||(_result$body=_result$body.error)===null||_result$body===void 0||(_result$body=_result$body.caused_by)===null||_result$body===void 0?void 0:_result$body.reason)||result.error}}};Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>field);const refreshTemplate=()=>{hooks_getTemplate({templateName:templateName||"",coreService:coreServices,commonService:services.commonService}).then(template=>{oldValue.current=JSON.parse(JSON.stringify(template));field.resetValues(template);simulateTemplate({commonService:services.commonService,template:field.getValues()}).then(simulateResult=>{if(simulateResult.ok){simulateField.resetValues(simulateResult.response)}else{coreServices.notifications.toasts.addDanger(simulateResult.error)}})}).catch(()=>{props.history.replace(constants["D"].TEMPLATES)})};Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(isEdit){refreshTemplate()}return()=>{destroyRef.current=true}},[]);const values=field.getValues();const subCompontentProps={...props,isEdit:isEdit,field:field,readonly:selectedTabId===TABS_ENUM.SUMMARY&&isEdit};const PreviewTemplateButton=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:async()=>{const result=await simulateTemplate({template:field.getValues(),commonService:services.commonService});if(result.ok){simulateField.resetValues(result.response);setPreviewFlyoutVisible(true)}else{coreServices.notifications.toasts.addDanger(result.error)}},"data-test-subj":"CreateIndexTemplatePreviewButton",color:"ghost"},"Preview template"));const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls,setAppRightControls:setAppRightControls}=Object(Services["c"])();const descriptionData=[{description:"Define an automated snapshot schedule and retention period with a snapshot policy.",links:{label:"Learn more",href:coreServices.docLinks.links.opensearch.indexTemplates.base,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const HeaderRight=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{display:"base",iconType:"trash","aria-label":"Delete",color:"danger",onClick:()=>setVisible(true),size:"s"}),external_osdSharedDeps_React_default.a.createElement(DeleteTemplatesModal,{visible:visible,selectedItems:[templateName],onClose:()=>{setVisible(false)},onDelete:()=>{setVisible(false);history.replace(constants["D"].TEMPLATES)}}))},{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{const showValue={...values,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote(values.template)};Modal["a"].show({locale:{ok:"Close"},style:{width:800},"data-test-subj":"templateJSONDetailModal",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,values.name)),content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",isCopyable:true,fontSize:"s"},JSON.stringify(showValue,null,2))})}},"View JSON")}];const Title=()=>!useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},isEdit?external_osdSharedDeps_React_default.a.createElement("h1",{title:values.name},templateName):external_osdSharedDeps_React_default.a.createElement("h1",null,isEdit?"Edit":"Create"," template")),isEdit?null:external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:"",helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Index templates let you initialize new indexes with predefined mappings and settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,target:"_blank",href:coreServices.docLinks.links.opensearch.indexTemplates.base},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{style:{marginRight:20},onClick:()=>{const showValue={...values,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote(values.template)};Modal["a"].show({locale:{ok:"Close"},style:{width:800},"data-test-subj":"templateJSONDetailModal",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,values.name)),content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"json",isCopyable:true},JSON.stringify(showValue,null,2))})}},"View JSON"),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{color:"danger",onClick:()=>setVisible(true)},"Delete"),external_osdSharedDeps_React_default.a.createElement(DeleteTemplatesMo
6dal,{visible:visible,selectedItems:[templateName],onClose:()=>{setVisible(false)},onDelete:()=>{setVisible(false);history.replace(constants["D"].TEMPLATES)}}))):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,isEdit?external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:HeaderRight,setMountPoint:setAppRightControls}):external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:descriptionData,setMountPoint:setAppDescriptionControls}));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,Title(),isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(OverviewTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTabs"],{size:"s"},constant_tabs.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTab"],{onClick:()=>{setSelectedTabId(item.id)},isSelected:selectedTabId===item.id,key:item.id,"data-test-subj":`TemplateDetailTab-${item.id}`},item.name))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})):null,subCompontentProps.readonly?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_DefineTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),((_values$_meta=values._meta)===null||_values$_meta===void 0?void 0:_values$_meta.flow)===FLOW_ENUM.COMPONENTS&&!subCompontentProps.readonly?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(containers_ComposableTemplate,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:isEdit&&selectedTabId===TABS_ENUM.SUMMARY?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Preview template")):((_values$_meta2=values._meta)===null||_values$_meta2===void 0?void 0:_values$_meta2.flow)===FLOW_ENUM.COMPONENTS?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Override template definition")):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Template definition")),subTitleText:(!isEdit||selectedTabId!==TABS_ENUM.SUMMARY)&&((_values$_meta3=values._meta)===null||_values$_meta3===void 0?void 0:_values$_meta3.flow)===FLOW_ENUM.COMPONENTS?"Provide additional configurations such as index aliases, settings, and mappings. Configurations defined in this section will take precedent if they overlap with the associated component templates.":undefined,accordion:(!isEdit||selectedTabId!==TABS_ENUM.SUMMARY)&&((_values$_meta4=values._meta)===null||_values$_meta4===void 0?void 0:_values$_meta4.flow)===FLOW_ENUM.COMPONENTS,noExtraPadding:true,titleSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(containers_IndexAlias,TemplateDetail_TemplateDetail_extends({key:props.dataSourceId},subCompontentProps,{field:subCompontentProps.readonly?simulateField:field})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_IndexSettings,TemplateDetail_TemplateDetail_extends({},subCompontentProps,{field:subCompontentProps.readonly?simulateField:field})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_TemplateMappings,TemplateDetail_TemplateDetail_extends({},subCompontentProps,{field:subCompontentProps.readonly?simulateField:field})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),previewFlyoutVisible&&simulateField.getValues()?external_osdSharedDeps_React_default.a.createElement(Modal["a"].SimpleModal,{style:{width:800},locale:{ok:"Close"},maxWidth:false,onClose:()=>setPreviewFlyoutVisible(false),title:"Preview template",content:external_osdSharedDeps_React_default.a.createElement(containers_PreviewTemplate,{value:simulateField.getValues(),history:props.history})}):null,isEdit?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_BottomBar,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{onClick:onCancel,color:"ghost",iconType:"cross",size:"s","data-test-subj":"CreateIndexTemplateCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(PreviewTemplateButton,null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:async()=>{const result=await onSubmit();if(result){if(result.ok){coreServices.notifications.toasts.addSuccess(`${values.name} has been successfully created.`);onSubmitSuccess&&onSubmitSuccess(values.name)}else{coreServices.notifications.toasts.addDanger(result.error)}}},isLoading:isSubmitting,"data-test-subj":"CreateIndexTemplateCreateButton"},"Create template"))))),isEdit&&selectedTabId===TABS_ENUM.CONFIG&&Object(helpers["a"])(formatTemplate(oldValue.current),formatTemplate(values))?external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{submitButtonDataTestSubj:"updateTemplateButton",cancelButtonprops:{"data-test-subj":"CancelUpdateTemplateButton"},unsavedCount:Object(helpers["a"])(formatTemplate(oldValue.current),formatTemplate(values)),onClickCancel:async()=>{var _oldValue$current;field.resetValues(formatRemoteTemplateToEditTemplate({templateDetail:{...oldValue.current,template:containers_IndexForm_IndexForm.transformIndexDetailToRemote((_oldValue$current=oldValue.current)===null||_oldValue$current===void 0?void 0:_oldValue$current.template)}}))},onClickSubmit:async()=>{const result=await onSubmit();if(result){if(result.ok){coreServices.notifications.toasts.addSuccess(`${values.name} has been successfully updated.`);refreshTemplate()}else{coreServices.notifications.toasts.addDanger(result.error)}}},renderProps:_ref=>{let{renderCancel:renderCancel,renderConfirm:renderConfirm,renderUnsavedText:renderUnsavedText}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,renderUnsavedText(),renderCancel(),external_osdSharedDeps_React_default.a.createElement(PreviewTemplateButton,null),renderConfirm())}}):null)};var containers_TemplateDetail_TemplateDetail=Object(external_osdSharedDeps_React_["forwardRef"])(TemplateDetail_TemplateDetail_TemplateDetail);var CreateIndexTemplate_containers_TemplateDetail=containers_TemplateDetail_TemplateDetail;function CreateIndexTemplate_extends(){return CreateIndexTemplate_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateIndexTemplate_extends.apply(null,arguments)}function CreateIndexTemplate_defineProperty(e,r,t){return(r=CreateIndexTemplate_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateIndexTemplate_toPropertyKey(t){var i=CreateIndexTemplate_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateIndexTemplate_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateIndexTemplate_CreateIndexTemplate extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);CreateIndexTemplate_defineProperty(this,"componentDidMount",async()=>{this.setBreadCrumb()});CreateIndexTemplate_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].TEMPLATES)})}get template(){return this.props.match.params.template}get readonly(){return this.props.match.params.mode==="readonly"}setBreadCrumb(){const readonly=this.readonly;let lastBread;if(readonly&&this.template){lastBread={text:this.template,href:`#${this.props.location.pathname}`}}else if(this.template){lastBread={text:this.template,href:`#${this.props.location.pathname}`}}else{lastBread=constants["f"].CREATE_TEMPLATE}
6const breadCrumbs=this.props.useUpdatedUX?[constants["f"].NEW_TEMPLATES,lastBread]:[constants["f"].INDEX_MANAGEMENT,constants["f"].TEMPLATES,lastBread];this.context.chrome.setBreadcrumbs(breadCrumbs)}componentDidUpdate(prevProps){if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(prevProps,this.props)){this.setBreadCrumb()}}render(){return!this.props.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 50px"}},external_osdSharedDeps_React_default.a.createElement(CreateIndexTemplate_containers_TemplateDetail,{history:this.props.history,location:this.props.location,templateName:this.template,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].TEMPLATES),dataSourceId:this.props.dataSourceId,useUpdatedUX:this.props.useUpdatedUX})):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},external_osdSharedDeps_React_default.a.createElement(CreateIndexTemplate_containers_TemplateDetail,{history:this.props.history,location:this.props.location,templateName:this.template,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].TEMPLATES),dataSourceId:this.props.dataSourceId,useUpdatedUX:this.props.useUpdatedUX}))}}CreateIndexTemplate_defineProperty(CreateIndexTemplate_CreateIndexTemplate,"contextType",core_services["b"]);var containers_CreateIndexTemplate_CreateIndexTemplate=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(CreateIndexTemplate_CreateIndexTemplate,CreateIndexTemplate_extends({},props,dataSourceMenuProps,{useUpdatedUX:useUpdatedUX}))};var containers_CreateIndexTemplate=containers_CreateIndexTemplate_CreateIndexTemplate;var pages_CreateIndexTemplate=containers_CreateIndexTemplate;function containers_IndexDetail_IndexDetail(props){const[loading,setLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const[items,setItems]=Object(external_osdSharedDeps_React_["useState"])([]);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{(async()=>{setLoading(true);const result=await(services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"cat.indices",data:{index:props.indices,format:"json"}}));let finalResponse=[];if(result!==null&&result!==void 0&&result.ok){finalResponse=result.response}else{coreServices===null||coreServices===void 0||coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}setItems(finalResponse);props.onGetIndicesDetail&&props.onGetIndicesDetail(finalResponse);setLoading(false)})()},[props.indices.join(","),setLoading,setItems,coreServices]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Source index details")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),items&&items.length?external_osdSharedDeps_React_default.a.createElement(components_DescriptionListHoz,{compressed:true,listItems:[{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Index name")),description:items[0].index},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Primary shards")),description:items[0].pri},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Replica shards")),description:items[0].rep},{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h4",null,"Total index size")),description:items[0]["store.size"]}]}):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),loading?null:props.children)}
6function SplitIndexForm_defineProperty(e,r,t){return(r=SplitIndexForm_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SplitIndexForm_toPropertyKey(t){var i=SplitIndexForm_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SplitIndexForm_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const SplitIndexForm_WrappedAliasSelect=EuiToolTipWrapper(components_AliasSelect,{disabledKey:"isDisabled"});class SplitIndexForm_SplitIndexForm extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);SplitIndexForm_defineProperty(this,"state",{settings:{},sourceIndexSettings:{}});SplitIndexForm_defineProperty(this,"formRef",null);SplitIndexForm_defineProperty(this,"notificationRef",null);SplitIndexForm_defineProperty(this,"onSubmit",async()=>{var _this$formRef,_this$notificationRef;const validateResult=await((_this$formRef=this.formRef)===null||_this$formRef===void 0?void 0:_this$formRef.validatePromise());const notificationResult=await((_this$notificationRef=this.notificationRef)===null||_this$notificationRef===void 0?void 0:_this$notificationRef.validatePromise());const{targetIndex:targetIndex,...others}=this.state.settings;const{errors:errors}=validateResult||{};if(errors){return}if(notificationResult!==null&¬ificationResult!==void 0&¬ificationResult.errors){return}try{const result=await this.props.onSplitIndex(targetIndex,others);if(result&&result.ok){var _this$notificationRef2;(_this$notificationRef2=this.notificationRef)===null||_this$notificationRef2===void 0||_this$notificationRef2.associateWithTask({taskId:result.response.task})}this.props.onCancel()}catch(err){}})}render(){const{sourceIndex:sourceIndex,sourceShards:sourceShards,reasons:reasons,getAlias:getAlias}=this.props;const blockNameList=["targetIndex"];let shardMessage="The number must be 2x times of the primary shard count of the source index.";if(sourceShards==="1"){shardMessage="The number must be an integer greater than 1 but fewer or equal to 1024."}const formFields=[{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Target Index Name")),helpText:constants["r"],position:"bottom"},name:"targetIndex",type:"Input",options:{rules:[{trigger:"onBlur",validator:(rule,value)=>{if(!value||value===""){return Promise.reject("Target index name is required")}else if(!constants["s"].test(value)){return Promise.reject(`Target index name ${value} is invalid`)}return Promise.resolve()}}],props:{"data-test-subj":"targetIndexNameInput",placeholder:"Specify a name for the new split index"}}},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of primary shards")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify the number of primary shards for the new split index."),external_osdSharedDeps_React_default.a.createElement("p",null,shardMessage))},name:"index.number_of_shards",type:"ComboBoxSingle",options:{rules:[{trigger:"onBlur",validator:(rule,value)=>{if(!value||value===""){return Promise.reject("Number of shards is required")}else if(!this.props.shardsSelectOptions.find(item=>""+item.label===""+value)){return Promise.reject(`Number of shards ${value} is invalid`)}return Promise.resolve()}}],props:{"data-test-subj":"numberOfShardsInput",options:this.props.shardsSelectOptions,placeholder:"Specify primary shard count",onCreateOption:undefined}}},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of replicas")),helpText:constants["A"]},name:"index.number_of_replicas",type:"Number",options:{props:{"data-test-subj":"numberOfReplicasInput",placeholder:"Specify number of replica",min:0}}},{name:"aliases",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias ",external_osdSharedDeps_React_default.a.createElement(CustomFormRow["a"],null))),helpText:"Allow this index to be referenced by existing al
6iases or specify a new alias."},options:{props:{refreshOptions:getAlias},rules:constants["d"]},component:SplitIndexForm_WrappedAliasSelect}];const readyForSplit=reasons.length===0;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(containers_IndexDetail_IndexDetail,{indices:[sourceIndex]},external_osdSharedDeps_React_default.a.createElement("ul",null,reasons.map((reason,reasonIndex)=>external_osdSharedDeps_React_default.a.createElement("li",{key:reasonIndex},reason)))),readyForSplit&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure target index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{value:{"index.number_of_replicas":"1",...this.state.settings},onChange:totalValue=>this.setState({settings:totalValue}),formFields:formFields,ref:ref=>this.formRef=ref,hasAdvancedSettings:true,advancedSettingsProps:{accordionProps:{initialIsOpen:false,id:"accordionForCreateIndexSettings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h4",null,"Advanced settings")},blockedNameList:blockNameList,rowProps:{label:"Specify advanced index settings",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Specify a comma-delimited list of settings. ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank"},"View index settings"))}}}))),external_osdSharedDeps_React_default.a.createElement(containers_NotificationConfig,{withPanel:true,panelProps:{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings")),titleSize:"s"},ref:ref=>this.notificationRef=ref,actionType:ActionType.RESIZE,operationType:OperationType.SHRINK}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.props.onCancel,"data-test-subj":"splitCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:this.onSubmit,isLoading:this.props.loading,disabled:this.props.loading,"data-test-subj":"splitButton",isDisabled:!readyForSplit},"Split"))))}}var components_SplitIndexForm=SplitIndexForm_SplitIndexForm;function SplitIndex_extends(){return SplitIndex_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SplitIndex_extends.apply(null,arguments)}function SplitIndex_defineProperty(e,r,t){return(r=SplitIndex_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function SplitIndex_toPropertyKey(t){var i=SplitIndex_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function SplitIndex_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class SplitIndex_SplitIndex extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);SplitIndex_defineProperty(this,"state",{reasons:[],shardsSelectOptions:[],sourceIndex:{},splitIndexFlyoutVisible:false,loading:false});SplitIndex_defineProperty(this,"openCompleteHandler",()=>{this.setState({loading:false});this.isSourceIndexReady()});SplitIndex_defineProperty(this,"isSourceIndexReady",async()=>{const source=query_string_default.a.parse(this.props.location.search);let sourceIndex;try{sourceIndex=await getSingleIndice({indexName:source.source,commonService:this.props.commonService,coreServices:this.props.coreService})}catch(err){this.onCancel();return}this.setState({sourceIndex:sourceIndex});let sourceIndexSettings;try{sourceIndexSettings=await helpers_getIndexSettings({indexName:sourceIndex.index,flat:true,commonService:this.props.commonService,coreServices:this.props.coreService})}catch(err){this.onCancel();return}const reasons=[];const sourceSettings=Object(external_osdSharedDeps_Lodash_["get"])(sourceIndexSettings,[sourceIndex.index,"settings"]);const blocksWriteValue=Object(external_osdSharedDeps_Lodash_["get"])(sourceSettings,["index.blocks.write"]);if(sourceIndex.health==="red"){reasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger",iconType:"alert",title:"The source index must not have a Red health status."}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceIndex.status==="close"){reasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger",iconType:"alert",title:"The source index must be open."},external_osdSharedDeps_React_default.a.createElement("p",null,"You must first open the index before splitting it. Depending on the size of the source index, this may take additional time to complete. The index will be in the Red state while the index is opening."),external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,isLoading:this.state.loading,isDisabled:this.state.loading,onClick:()=>{this.setState({loading:true});openIndices({commonService:this.props.commonService,indices:[source.source],coreServices:this.props.coreService,jobConfig:{firstRunTimeout:5e3}})},"data-test-subj":"open-index-button"},"Open index"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceSettings&&blocksWriteValue!=="true"&&blocksWriteValue!==true){const flat=true;const blocksWriteSetting={"index.blocks.write":"true"};reasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger",iconType:"alert",title:"The source index must block write operations before splitting."},external_osdSharedDeps_React_default.a.createElement("p",null,"In order to split an existing index, you must first set the index to block write operations."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:async()=>{try{await helpers_setIndexSettings({indexName:sourceIndex.index,flat:flat,settings:blocksWriteSetting,commonService:this.props.commonService,coreServices:this.props.coreService});await this.isSourceIndexReady()}catch(err){}},"data-test-subj":"set-indexsetting-button"},"Block write operations")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}this.setState({reasons:reasons})});SplitIndex_defineProperty(this,"calculateShardsOption",()=>{const{sourceIndex:sourceIndex}=this.state;const sourceShards=Number(sourceIndex.pri);const shardsSelectOptions=getSplitShardOptions(sourceShards);this.setState({shardsSelectOptions:shardsSelectOptions})});SplitIndex_defineProperty(this,"onSplitIndex",async(targetIndex,settingsPayload)=>{const{sourceIndex:sourceIndex}=this.state;return await splitIndex({sourceIndex:sourceIndex.index,targetIndex:targetIndex,settingsPayload:settingsPayload,commonService:this.props.commonService,coreServices:this.props.coreService})});SplitIndex_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].INDICES)})}
6async componentDidMount(){const breadCrumbs=this.props.useUpdatedUX?[constants["f"].INDICES,{...constants["f"].SPLIT_INDEX,href:`#${constants["D"].SPLIT_INDEX}${this.props.location.search}`}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,{...constants["f"].SPLIT_INDEX,href:`#${constants["D"].SPLIT_INDEX}${this.props.location.search}`}];this.context.chrome.setBreadcrumbs(breadCrumbs);await this.isSourceIndexReady();this.calculateShardsOption();this.setState({splitIndexFlyoutVisible:true});Object(JobHandler["d"])(JobHandler["a"].OPEN_COMPLETE,this.openCompleteHandler)}componentWillUnmount(){Object(JobHandler["c"])(JobHandler["a"].OPEN_COMPLETE,this.openCompleteHandler)}render(){const{sourceIndex:sourceIndex,splitIndexFlyoutVisible:splitIndexFlyoutVisible,reasons:reasons,shardsSelectOptions:shardsSelectOptions}=this.state;const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Split an existing read-only index into a new index with more primary shards.",links:{label:"Learn more",href:"https://opensearch.org/docs/latest/api-reference/index-apis/split/",iconType:"popout",iconSide:"right",controlType:"link"}}];const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,splitIndexFlyoutVisible&&external_osdSharedDeps_React_default.a.createElement(components_SplitIndexForm,{sourceIndex:sourceIndex.index,onSplitIndex:this.onSplitIndex,shardsSelectOptions:shardsSelectOptions,reasons:reasons,onCancel:this.onCancel,sourceShards:sourceIndex.pri,loading:this.state.loading,getAlias:aliasName=>helpers_getAlias({aliasName:aliasName,commonService:this.props.commonService})}));return this.props.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:descriptionData,setMountPoint:setAppDescriptionControls}),Common()):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Split index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Split an existing read-only index into a new index with more primary shards. ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:"https://opensearch.org/docs/latest/api-reference/index-apis/split/",target:"_blank",rel:"noopener noreferrer"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common())}}SplitIndex_defineProperty(SplitIndex_SplitIndex,"contextType",core_services["b"]);function SplitIndexWrapper(props){const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreService=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(SplitIndex_SplitIndex,SplitIndex_extends({},props,{commonService:services.commonService,coreService:coreService,useUpdatedUX:useUpdatedUX}))}var container_SplitIndex=SplitIndexWrapper;var pages_SplitIndex=container_SplitIndex;const OVERVIEW_DISPLAY_INFO=[{label:"Index name",value:"index"},{label:"Health",value:_ref=>{let{detail:detail}=_ref;const health=detail.health;const color=health?HEALTH_TO_COLOR[health]:"subdued";const text=health||detail.status;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text)}},{label:"Status",value:_ref2=>{let{detail:detail}=_ref2;return external_osdSharedDeps_React_default.a.createElement("span",{className:"camel-first-letter"},detail.status)}},{label:"Creation date",value:_ref3=>{var _detail$settings,_detail$settings2;let{detail:detail}=_ref3;return external_osdSharedDeps_React_default.a.createElement("span",null,(_detail$settings=detail.settings)!==null&&_detail$settings!==void 0&&(_detail$settings=_detail$settings.index)!==null&&_detail$settings!==void 0&&_detail$settings.creation_date?new Date(parseInt((_detail$settings2=detail.settings)===null||_detail$settings2===void 0||(_detail$settings2=_detail$settings2.index)===null||_detail$settings2===void 0?void 0:_detail$settings2.creation_date)).toLocaleStr
6ing():"-")}},{label:"Total size",value:_ref4=>{let{detail:detail}=_ref4;return external_osdSharedDeps_React_default.a.createElement("span",null,detail["store.size"])}},{label:"Size of primaries",value:_ref5=>{let{detail:detail}=_ref5;return external_osdSharedDeps_React_default.a.createElement("span",null,detail["pri.store.size"])}},{label:"Total documents",value:_ref6=>{let{detail:detail}=_ref6;return external_osdSharedDeps_React_default.a.createElement("span",null,detail["docs.count"])}},{label:"Deleted documents",value:_ref7=>{let{detail:detail}=_ref7;return external_osdSharedDeps_React_default.a.createElement("span",null,detail["docs.deleted"])}},{label:"Primaries",value:"pri"},{label:"Replicas",value:"rep"},{label:"Index blocks",value:_ref8=>{var _detail$settings3;let{detail:detail}=_ref8;const blocks=Object.entries(((_detail$settings3=detail.settings)===null||_detail$settings3===void 0||(_detail$settings3=_detail$settings3.index)===null||_detail$settings3===void 0?void 0:_detail$settings3.blocks)||{}).filter(_ref9=>{let[key,value]=_ref9;return value==="true"});if(!blocks.length){return external_osdSharedDeps_React_default.a.createElement("span",null,"-")}return external_osdSharedDeps_React_default.a.createElement("ul",{style:{listStyleType:"disc",listStylePosition:"inside"}},blocks.map(_ref10=>{let[key,value]=_ref10;return external_osdSharedDeps_React_default.a.createElement("li",{key:key},key)}))}},{label:"Managed by policy",value:_ref11=>{let{detail:detail}=_ref11;return external_osdSharedDeps_React_default.a.createElement("span",null,detail.managedPolicy?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].POLICY_DETAILS}?id=${detail.managedPolicy}`},detail.managedPolicy):"-")}}];function IndexDetail_extends(){return IndexDetail_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},IndexDetail_extends.apply(null,arguments)}function IndexDetail_IndexDetail_IndexDetail(props){const{index:index}=props.match.params;const[record,setRecord]=Object(external_osdSharedDeps_React_["useState"])(undefined);const[detail,setDetail]=Object(external_osdSharedDeps_React_["useState"])({});const ref=Object(external_osdSharedDeps_React_["useRef"])(null);const coreService=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const finalDetail=Object(external_osdSharedDeps_React_["useMemo"])(()=>{if(!detail||!record){return undefined}return{...record,...detail}},[record,detail]);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);useUpdateUrlWithDataSourceProperties();const fetchIndicesDetail=()=>services.commonService.apiCaller({endpoint:"indices.get",data:{index:index}}).then(res=>{if(!res.ok){return res}return{...res,response:res.response[index]}}).then(res=>{if(res&&res.ok){setDetail(res.response)}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(res.error||"");props.history.replace(constants["D"].INDICES)}return res});const fetchCatIndexDetail=async params=>{const result=await services.indexService.getIndices({terms:index,from:0,size:10,search:index,sortField:"index",sortDirection:"desc",expandWildcards:"all",...params});if(result.ok){const findItem=result.response.indices.find(item=>item.index===index);if(findItem){setRecord(findItem)}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(`[index_not_found_exception] no such index [${index}]`);props.history.replace(constants["D"].INDICES)}}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(result.error||"");props.history.replace(constants["D"].INDICES)}};const refreshDetails=async()=>{const result=await fetchIndicesDetail();if(result.ok){const{data_stream:data_stream}=result.response;const payload={showDataStreams:data_stream?"true":"false",exactSearch:index};if(data_stream){payload.search=`data_streams: (${result.response.data_stream})`;
6payload.dataStreams=data_stream}fetchCatIndexDetail(payload)}};const indexFormCommonProps={index:index,onSubmitSuccess:()=>{refreshDetails()}};const indexFormReadonlyCommonProps={...indexFormCommonProps,hideButtons:true,ref:ref};const tabs=Object(external_osdSharedDeps_React_["useMemo"])(()=>[{id:"indexDetailModalSettings",name:"Settings",mode:constants["w"].settings,content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,IndexDetail_extends({},indexFormReadonlyCommonProps,{key:constants["w"].settings,mode:constants["w"].settings}))))},{id:"indexDetailModalMappings",name:"Mappings",mode:constants["w"].mappings,content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index mappings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",null,"Define how documents and their fields are stored and indexed."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:`https://opensearch.org/docs/${coreService===null||coreService===void 0?void 0:coreService.docLinks.DOC_LINK_VERSION}/opensearch/mappings/`},"Learn more")),external_osdSharedDeps_React_default.a.createElement("div",null,"Mappings and field types cannot be changed once they have been added."))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,IndexDetail_extends({},indexFormReadonlyCommonProps,{key:constants["w"].mappings,mode:constants["w"].mappings}))))},{id:`indexDetailModalAlias`,name:"Alias",mode:constants["w"].alias,content:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Index alias")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(containers_IndexForm,IndexDetail_extends({},indexFormReadonlyCommonProps,{key:constants["w"].alias,mode:constants["w"].alias}))))}],[]);const[selectedTab,setSelectedTab]=Object(external_osdSharedDeps_React_["useState"])(tabs[0]);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls}=Object(Services["c"])();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");Object(external_osdSharedDeps_React_["useEffect"])(()=>{refreshDetails();const breadCrumbs=useUpdatedUX?[constants["f"].INDICES,{text:index,href:`#${props.location.pathname}`}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,{text:index,href:`#${props.location.pathname}`}];coreService===null||coreService===void 0||coreService.chrome.setBreadcrumbs(breadCrumbs)},[]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{Object(JobHandler["d"])(JobHandler["a"].OPEN_COMPLETE,refreshDetails);return()=>{Object(JobHandler["c"])(JobHandler["a"].OPEN_COMPLETE,refreshDetails)}},[refreshDetails]);if(!record||!detail||!finalDetail){return null}const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Overview")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDescriptionList"],{compressed:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement("div",null,OVERVIEW_DISPLAY_INFO.map(item=>{let valueContent=null;if(typeof item.value==="string"){valueContent=external_osdSharedDeps_React_default.a.createElement("span",null,Object(external_osdSharedDeps_Lodash_["get"])(finalDetail,item.value))}else{const ValueComponent=item.value;valueContent=external_osdSharedDeps_React_default.a.createElement(ValueComponent,{detail:finalDetail})}return external_osdSharedDeps_React_default.a.createElement("div",{style:{display:"inline-block",width:"33%",verticalAlign:"top",marginBottom:"20px"},key:item.label,"data-test-subj":`indexDetailOverviewItem-${item.label}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDescriptionListTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h4",null,item.label)," ")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiDescriptionListDescription"],{style:{wordBreak:item.label==="Index name"?"break-word":undefined}},valueContent))})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTabbedContent"],{size:"s",selectedTab:selectedTab,onTabClick:tab=>{var _ref$current,_ref$current$hasUnsav;if((_ref$current=ref.current)!==null&&_ref$current!==void 0&&(_ref$current$hasUnsav=_ref$current.hasUnsavedChanges)!==null&&_ref$current$hasUnsav!==void 0&&_ref$current$hasUnsav.call(_ref$current,selectedTab.mode)){Modal["a"].show({title:"You have unsaved changes.",content:"Are you sure you want to leave this tab?",type:"confirm",locale:{confirm:"Stay",cancel:"Leave without changes"},onCancel:()=>{setSelectedTab(tab)},footer:["cancel","confirm"]})}else{setSelectedTab(tab)}},tabs:tabs}));return useUpdatedUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{renderComponent:external_osdSharedDeps_React_default.a.createElement(IndicesActions,{selectedItems:[record],history:props.history,onDelete:()=>props.history.replace(constants["D"].INDICES),onClose:refreshDetails,onShrink:()=>props.history.replace(constants["D"].INDICES),getIndices:async()=>{}})}]}),Common()):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,index)),external_osdSharedDeps_React_default.a.createElement(IndicesActions,{selectedItems:[record],history:props.history,onDelete:()=>props.history.replace(constants["D"].INDICES),onClose:refreshDetails,onShrink:()=>props.history.replace(constants["D"].INDICES),getIndices:async()=>{}})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common())}
6var containers_IndexDetail=IndexDetail_IndexDetail_IndexDetail;var pages_IndexDetail=containers_IndexDetail;const DEFAULT_INDEX_SETTINGS={"index.number_of_shards":1,"index.number_of_replicas":1};const INDEX_BLOCKS_WRITE_SETTING="index.blocks.write";const INDEX_BLOCKS_READONLY_SETTING="index.blocks.read_only";const INDEX_ROUTING_ALLOCATION_SETTING="index.routing.allocation.require";function ShrinkIndex_extends(){return ShrinkIndex_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ShrinkIndex_extends.apply(null,arguments)}function ShrinkIndex_defineProperty(e,r,t){return(r=ShrinkIndex_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ShrinkIndex_toPropertyKey(t){var i=ShrinkIndex_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ShrinkIndex_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ShrinkIndex_WrappedAliasSelect=EuiToolTipWrapper(components_AliasSelect,{disabledKey:"isDisabled"});class ShrinkIndex_ShrinkIndex extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);ShrinkIndex_defineProperty(this,"destroyed",false);ShrinkIndex_defineProperty(this,"openCompleteHandler",()=>{this.setState({loading:false});this.getIndex(this.state.sourceIndex.index)});ShrinkIndex_defineProperty(this,"getIndex",async indexName=>{try{const{commonService:commonService}=this.props;const result=await commonService.apiCaller({endpoint:"cat.indices",data:{index:[indexName],format:"json"}});if(result.ok&&result.response.length>0){this.setState({sourceIndex:result.response[0]});await this.isSourceIndexReady()}else{const errorMessage=result.ok?`Index ${indexName} does not exist`:result.error;this.context.notifications.toasts.addDanger(`Could not shrink index: ${errorMessage}`);this.props.history.push(constants["D"].INDICES)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem getting index."));this.props.history.push(constants["D"].INDICES)}});ShrinkIndex_defineProperty(this,"formRef",null);ShrinkIndex_defineProperty(this,"notificationRef",null);ShrinkIndex_defineProperty(this,"onClickAction",async()=>{var _this$formRef,_this$notificationRef;const{sourceIndex:sourceIndex}=this.state;const{targetIndex:targetIndex,...others}=this.state.requestPayload;const result=await((_this$formRef=this.formRef)===null||_this$formRef===void 0?void 0:_this$formRef.validatePromise());if(result!==null&&result!==void 0&&result.errors){return}const notificationsResult=await((_this$notificationRef=this.notificationRef)===null||_this$notificationRef===void 0?void 0:_this$notificationRef.validatePromise());if(notificationsResult!==null&¬ificationsResult!==void 0&¬ificationsResult.errors){return}this.shrinkIndex(sourceIndex.index,targetIndex,others)});ShrinkIndex_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].INDICES)});ShrinkIndex_defineProperty(this,"shrinkIndex",async(sourceIndexName,targetIndexName,requestPayload)=>{this.setState({loading:true});try{const{commonService:commonService}=this.props;const{aliases:aliases,...settings}=requestPayload;const result=await commonService.apiCaller({endpoint:"transport.request",data:{path:`/${sourceIndexName}/_shrink/${targetIndexName}?wait_for_completion=false`,method:"PUT",body:{settings:settings,aliases:aliases}}});if(result&&result.ok){var _this$notificationRef2,_result$response,_result$response2;await((_this$notificationRef2=this.notificationRef)===null||_this$notificationRef2===void 0?void 0:_this$notificationRef2.associateWithTask({taskId:(_result$response=result.response)===null||_result$response===void 0?void 0:_result$response.task}));const toastInstance=this.context.notifications.toasts.addSuccess(`Successfully started shrinking ${sourceIndexName}. The shrunken index will be named ${targetIndexName}.`,{toastLifeTimeMs:1e3*60*60*24*5});this.onCancel();const clusterInfo=await Object(helpers["c"])({commonService:commonService});JobSchedulerContext["a"].addJob({interval:3e4,extras:{clusterInfo:clusterInfo,toastId:toastInstance.id,sourceIndex:sourceIndexName,destIndex:targetIndexName,taskId:(_result$response2=result.response)===null||_result$response2===void 0?void 0:_result$response2.task},type:JobScheduler["b"].SHRINK})}else{this.context.notifications.toasts.addDanger(result.error)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem shrinking index."))}if(this.destroyed){return}this.setState({loading:false})});ShrinkIndex_defineProperty(this,"getIndexSettings",async(indexName,flat)=>{try{const{commonService:commonService}=this.props;const result=await commonService.apiCaller({endpoint:"indices.getSettings",data:{index:indexName,flat_settings:flat}});if(result&&result.ok){return result.response}else{const errorMessage=`There was a problem getting index setting for ${indexName}, please check with Admin.`;this.context.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem getting index settings."))}});ShrinkIndex_defineProperty(this,"setIndexSettings",async(indexName,settings)=>{try{const{commonService:commonService}=this.props;const result=await commonService.apiCaller({endpoint:"indices.putSettings",method:"PUT",data:{index:indexName,body:{settings:{...settings}}}});if(result&&result.ok){this.context.notifications.toasts.addSuccess(`${indexName} has been set to block write operations.`)}else{const errorMessage=`There was a problem updating index setting for ${indexName}, please check with Admin`;this.context.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||errorMessage)}}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem updating index settings."))}});ShrinkIndex_defineProperty(this,"getAlias",async aliasName=>{try{const{commonService:commonService}=this.props;return await commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`${aliasName||""}*`,s:"alias:desc"}})}catch(err){this.context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem getting aliases."))}});ShrinkIndex_defineProperty(this,"openIndex",async index=>{this.setState({loading:true});openIndices({indices:[index],commonService:this.props.commonService,coreServices:this.context,jobConfig:{firstRunTimeout:5e3}})});ShrinkIndex_defineProperty(this,"isSourceIndexReady",async()=>{const{sourceIndex:sourceIndex}=this.state;const indexSettings=await this.getIndexSettings(sourceIndex.index,true);if(!!indexSettings){this.setState({sourceIndexSettings:indexSettings})}});ShrinkIndex_defineProperty(this,"onUpdateIndexSettings",async(indexName,settings)=>{await this.setIndexSettings(indexName,settings);const indexSettings=await this.getIndexSettings(indexName,true);if(!!indexSettings){this.setState({sourceIndexSettings:indexSettings})}});ShrinkIndex_defineProperty(this,"onOpenIndex",async()=>{const{sourceIndex:sourceIndex}=this.state;await this.openIndex(sourceIndex.index)});this.state={sourceIndex:{},requestPayload:DEFAULT_INDEX_SETTINGS,sourceIndexSettings:{},loading:false}}
6async componentDidMount(){const breadCrumbs=this.props.useUpdatedUX?[constants["f"].INDICES,{...constants["f"].SHRINK_INDEX,href:`#${this.props.location.pathname}${this.props.location.search}`}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,{...constants["f"].SHRINK_INDEX,href:`#${this.props.location.pathname}${this.props.location.search}`}];this.context.chrome.setBreadcrumbs(breadCrumbs);const{source:source}=query_string_default.a.parse(this.props.location.search);if(typeof source==="string"&&!!source){await this.getIndex(source)}else{const errorMessage=!source?"Index is empty.":`Cound not find the index: ${source}.`;this.context.notifications.toasts.addDanger(errorMessage);this.props.history.push(constants["D"].INDICES)}Object(JobHandler["d"])(JobHandler["a"].OPEN_COMPLETE,this.openCompleteHandler)}componentWillUnmount(){Object(JobHandler["c"])(JobHandler["a"].OPEN_COMPLETE,this.openCompleteHandler);this.destroyed=true}render(){const{sourceIndex:sourceIndex}=this.state;if(!sourceIndex.index){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"center",alignItems:"center",style:{marginTop:"100px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"xl"}))}const{requestPayload:requestPayload,sourceIndexSettings:sourceIndexSettings}=this.state;const sourceIndexNotReadyToShrinkReasons=[];let disableShrinkButton=false;const blockNameList=["targetIndex"];if(sourceIndex.health==="red"){disableShrinkButton=true;sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"The source index must be in green health status.",color:"danger",iconType:"alert"},external_osdSharedDeps_React_default.a.createElement("p",null,"The index is in red health status and may be running operations in the background. We recommend to wait until the index becomes green to continue shrinking.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceIndex.pri==="1"){disableShrinkButton=true;sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Cannot shrink source index with only one primary shard.",color:"danger",iconType:"alert"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceIndexNotReadyToShrinkReasons.length==0){const indexWriteBlock=Object(external_osdSharedDeps_Lodash_["get"])(sourceIndexSettings,[sourceIndex.index,"settings",INDEX_BLOCKS_WRITE_SETTING]);if(indexWriteBlock!=="true"&&indexWriteBlock!==true){disableShrinkButton=true;sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"The source index must block write operations before shrinking.",color:"danger",iconType:"alert"},external_osdSharedDeps_React_default.a.createElement("p",null,"In order to shrink an existing index, you must first set the index to block write operations."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{const indexWriteBlockSettings={"index.blocks.write":true};this.onUpdateIndexSettings(sourceIndex.index,indexWriteBlockSettings)},fill:true,"data-test-subj":"onSetIndexWriteBlockButton"},"Block write operations")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceIndex.status==="close"){disableShrinkButton=true;sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"The source index must be open.",color:"danger",iconType:"alert"},external_osdSharedDeps_React_default.a.createElement("p",null,"You must first open the index before shrinking it. Depending on the size of the source index, this may take additional time to complete. The index will be in red health status while the index is opening."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{this.onOpenIndex()},isLoading:this.state.loading,isDisabled:this.state.loading,fill:true,"data-test-subj":"onOpenIndexButton"},"Open index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}if(sourceIndexNotReadyToShrinkReasons.length===0){if(sourceIndex.health==="yellow"){sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"We recommend shrinking index with a green health status.",color:"warning",iconType:"help"},external_osdSharedDeps_React_default.a.createElement("p",null,"The source index is in yellow health status. To prevent issues with initializing the new shrunken index, we recommend shrinking an index with a green health status.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}const indexReadOnlyBlock=Object(external_osdSharedDeps_Lodash_["get"])(sourceIndexSettings,[sourceIndex.index,"settings",INDEX_BLOCKS_READONLY_SETTING]);if(indexReadOnlyBlock==="true"||indexReadOnlyBlock===true){sourceIndexNotReadyToShrinkReasons.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"Index setting [index.blocks.read_only] is [true].",color:"warning",iconType:"help"},external_osdSharedDeps_React_default.a.createElement("p",null,"Index setting [index.blocks.read_only] of the source index is [true], it will be copied to the new shrunken index and then cause the new shrunken index's shards to be unassigned, you can set the setting to [null] or [false] in the advanced settings bellow.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)))}}}const numberOfShardsSelectOptions=[];const sourceIndexSharsNum=Number(sourceIndex.pri);for(let i=1;i<=sourceIndexSharsNum;i++){if(sourceIndexSharsNum%i===0){numberOfShardsSelectOptions.push({value:i.toString(),text:i})}}const formFields=[{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Target index name")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,constants["r"]),position:"bottom"},name:"targetIndex",type:"Input",options:{rules:[{validator:(_,value)=>{if(!value||!value.toString().trim()){return Promise.reject("Target index name required.")}return Promise.resolve()}},{pattern:/^[^A-Z-_"*+/\\|?#<>][^A-Z"*+/\\|?#<>]*$/,message:"Invalid target index name."}],props:{"data-test-subj":"targetIndexNameInput",placeholder:"Specify a name for the new shrunken index."}}},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of primary shards")),helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify the number of shards for the new shrunken index."),external_osdSharedDeps_React_default.a.createElement("p",null,"The number must be a factor of the primary shard count of the source index."))},name:"index.number_of_shards",type:"Select",options:{rules:[{validator:(_,value)=>{if(!value||!value.toString().trim()||Number(value)<=0||Number(sourceIndex.pri)%value!=0){return Promise.reject("The number of primary shards in the new shrunken index "+" must be a positive factor of the number of primary shards in the source index.")}return Promise.resolve()}}],props:{"data-test-subj":"numberOfShardsInput",options:numberOfShardsSelectOptions,placeholder:"Select primary shard count"}}
6},{rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Number of replicas")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,constants["A"])},name:"index.number_of_replicas",type:"Number",options:{rules:[{validator:(_,value)=>{if(!value||!value.toString().trim()||Number(value)<0){return Promise.reject("Number of replicas must be greater than or equal to 0.")}return Promise.resolve()}}],props:{"data-test-subj":"numberOfReplicasInput",min:0}}},{name:"aliases",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias ",external_osdSharedDeps_React_default.a.createElement(CustomFormRow["a"],null))),helpText:"Allow this index to be referenced by existing aliases or specify a new alias."},options:{props:{"data-test-subj":"aliasesInput",refreshOptions:this.getAlias},rules:[...constants["d"]]},component:ShrinkIndex_WrappedAliasSelect}];const indices=sourceIndex.index?[sourceIndex.index]:[];const indexDetailChildren=external_osdSharedDeps_React_default.a.createElement("ul",{key:"reasons"},sourceIndexNotReadyToShrinkReasons.map((reason,index)=>external_osdSharedDeps_React_default.a.createElement("li",{key:index},reason)));const configurationChildren=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure target index")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{ref:ref=>this.formRef=ref,value:requestPayload,onChange:value=>{if(!!value){this.setState({requestPayload:value})}},formFields:formFields,hasAdvancedSettings:true,advancedSettingsProps:{accordionProps:{initialIsOpen:false,id:"accordion_for_create_index_settings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings")},blockedNameList:blockNameList,rowProps:{label:"Specify advanced index settings",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Specify a comma-delimited list of settings. ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank"},"View index settings."))}}})));const subTitleText=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Shrink an existing index into a new index with fewer primary shards. ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["F"],target:"_blank",rel:"noopener noreferrer"},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null));const descriptionData=[{description:"Shrink an existing index into a new index with fewer primary shards.",links:{label:"Learn more",href:constants["F"],iconType:"popout",iconSide:"right",controlType:"link"}}];const Common=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(containers_IndexDetail_IndexDetail,{indices:indices,children:indexDetailChildren}),!!disableShrinkButton?null:configurationChildren,external_osdSharedDeps_React_default.a.createElement(containers_NotificationConfig,{withPanel:true,panelProps:{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings")),titleSize:"s"},ref:ref=>this.notificationRef=ref,actionType:ActionType.RESIZE,operationType:OperationType.SHRINK}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onCancel,flush:"left","data-test-subj":"shrinkIndexCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{isLoading:this.state.loading,isDisabled:this.state.loading,onClick:this.onClickAction,fill:true,"data-test-subj":"shrinkIndexConfirmButton",disabled:disableShrinkButton},"Shrink"))));const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();
6return this.props.useUpdatedUX?external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 0px"}},external_osdSharedDeps_React_default.a.createElement(HeaderControl,{controls:descriptionData,setMountPoint:setAppDescriptionControls}),Common()):external_osdSharedDeps_React_default.a.createElement("div",{style:{padding:"0px 50px"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Shrink index")),subTitleText,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),Common())}}ShrinkIndex_defineProperty(ShrinkIndex_ShrinkIndex,"contextType",core_services["b"]);var container_ShrinkIndex_ShrinkIndex=function(props){useUpdateUrlWithDataSourceProperties();const uiSettings=Object(Services["e"])();const useUpdatedUX=uiSettings.get("home:useNewHomePage");return external_osdSharedDeps_React_default.a.createElement(ShrinkIndex_ShrinkIndex,ShrinkIndex_extends({},props,{useUpdatedUX:useUpdatedUX}))};var container_ShrinkIndex=container_ShrinkIndex_ShrinkIndex;const Rollover_hooks_getCommonFormRowProps=(name,field)=>({isInvalid:!!field.getError(name),error:field.getError(name),"data-test-subj":`form-row-${transformNameToString(name)}`});const hooks_onSubmit=async props=>{var _sourceRef$current,_indexFormRef$current3;const{sourceRef:sourceRef,sourceType:sourceType,writingIndex:writingIndex,indexFormRef:indexFormRef,tempValue:tempValue,services:services}=props;const formGeneratersRes=await Promise.all([(_sourceRef$current=sourceRef.current)===null||_sourceRef$current===void 0?void 0:_sourceRef$current.validatePromise(),sourceType==="alias"&&!writingIndex.match(/^.*-\d+$/)?new Promise(async resolve=>{var _indexFormRef$current;const result=await((_indexFormRef$current=indexFormRef.current)===null||_indexFormRef$current===void 0?void 0:_indexFormRef$current.validate());if(result){resolve({errors:{targetIndex:[result]},values:{}})}else{var _indexFormRef$current2;resolve({errors:null,values:{targetIndex:((_indexFormRef$current2=indexFormRef.current)===null||_indexFormRef$current2===void 0?void 0:_indexFormRef$current2.getValue())||{}}})}}):Promise.resolve({errors:null,values:{targetIndex:((_indexFormRef$current3=indexFormRef.current)===null||_indexFormRef$current3===void 0?void 0:_indexFormRef$current3.getValue())||{}}})]);const hasError=formGeneratersRes.some(item=>item===null||item===void 0?void 0:item.errors);if(hasError){return{ok:false,error:"Some fields does not pass validation, please check fields with red underline."}}const finalValues=Object(external_osdSharedDeps_Lodash_["merge"])({},tempValue);formGeneratersRes.forEach(item=>Object(external_osdSharedDeps_Lodash_["merge"])(finalValues,item===null||item===void 0?void 0:item.values));const payload={alias:finalValues.source||"",body:{}};if(sourceType==="alias"&&!Object(external_osdSharedDeps_Lodash_["isEmpty"])(finalValues.targetIndex||{})){const{index:index,...others}=finalValues.targetIndex||{};if(index){payload.newIndex=index}payload.body=others}const result=await services.commonService.apiCaller({endpoint:"indices.rollover",data:payload});return result};const submitWriteIndex=async props=>{var _sourceRef$current2;const{services:services,writeIndexValue:writeIndexValue,sourceRef:sourceRef}=props;return await services.commonService.apiCaller({endpoint:"indices.updateAliases",data:{body:{actions:[{add:{index:writeIndexValue,alias:(_sourceRef$current2=sourceRef.current)===null||_sourceRef$current2===void 0?void 0:_sourceRef$current2.getValue("source"),is_write_index:true}}]}}})};const getOptions=async props=>{const{services:services}=props;return Promise.all([services.commonService.apiCaller({endpoint:"cat.aliases",data:{format:"json"}}),services.indexService.getDataStreams({})]).then(_ref=>{let[aliases,dataStreams]=_ref;if(aliases.ok&&dataStreams.ok){var _dataStreams$response;const allAlias=[];aliases.response.forEach(item=>{let findIndex;if(allAlias.find(alias=>alias.label===item.alias)){findIndex=allAlias.findIndex(alias=>alias.label===item.alias)}else{findIndex=allAlias.length;allAlias.push({label:item.alias,aliases:[]})}allAlias[findIndex].aliases.push(item)});
6return{ok:true,response:{alias:allAlias,dataStreams:((_dataStreams$response=dataStreams.response)===null||_dataStreams$response===void 0?void 0:_dataStreams$response.dataStreams.map(item=>({label:item.name})))||[]}}}return{ok:false,error:aliases.error||dataStreams.error}})};const getRolloveredIndex=async props=>{const{alias:alias,services:services}=props;const result=await services.commonService.apiCaller({endpoint:"indices.rollover",data:{alias:alias,dry_run:true},hideLog:true});if(result.ok){return{ok:true,response:result.response.new_index}}else if(result&&result.body&&result.body.error&&result.body.error.index){return{ok:true,response:result.body.error.index}}return{ok:false,error:result.error}};const getIndexDetail=async _ref2=>{let{services:services,indexName:indexName,newIndexName:newIndexName}=_ref2;const response=await services.commonService.apiCaller({endpoint:"indices.get",data:{index:indexName,flat_settings:true}});if(response.ok){return{...response.response[indexName],index:newIndexName}}throw new Error(response.error)};function Rollover_extends(){return Rollover_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Rollover_extends.apply(null,arguments)}function Rollover(props){var _sourceRef$current2;const[options,setOptions]=Object(external_osdSharedDeps_React_["useState"])({alias:[],dataStreams:[]});const coreService=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const sourceRef=Object(external_osdSharedDeps_React_["useRef"])(null);const indexFormRef=Object(external_osdSharedDeps_React_["useRef"])(null);const[tempValue,setValue]=Object(external_osdSharedDeps_React_["useState"])({source:props.match.params.source});const[loading,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");const[useNewUX,setUseNewUX]=Object(external_osdSharedDeps_React_["useState"])(useNewUx);const[writeIndexValue,setWriteIndexValue]=Object(external_osdSharedDeps_React_["useState"])("");const field=useField({values:{targetIndex:{settings:{"index.number_of_shards":1,"index.number_of_replicas":1,"index.refresh_interval":"1s"}}}});useUpdateUrlWithDataSourceProperties();const onChange=val=>{const finalResult=Object(external_osdSharedDeps_Lodash_["merge"])({},tempValue,val);setValue(finalResult)};const refreshOptions=async()=>{const result=await getOptions({services:services});if(result.ok){setOptions(result.response||{alias:[],dataStreams:[]})}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(result.error||"")}};Object(external_osdSharedDeps_React_["useEffect"])(()=>{let breadCrumbs=useNewUX?[constants["f"].INDICES,{...constants["f"].ROLLOVER,href:`#${props.location.pathname}`}]:[constants["f"].INDEX_MANAGEMENT,{...constants["f"].ROLLOVER,href:`#${props.location.pathname}`}];coreService===null||coreService===void 0||coreService.chrome.setBreadcrumbs(breadCrumbs);refreshOptions()},[]);const sourceOptions=Object(external_osdSharedDeps_React_["useMemo"])(()=>[{label:"aliases",options:options.alias},{label:"data streams",options:options.dataStreams}],[options]);const initialValue=Object(external_osdSharedDeps_React_["useMemo"])(()=>({source:props.match.params.source}),[props.match.params.source]);const sourceType=Object(external_osdSharedDeps_React_["useMemo"])(()=>{var _sourceRef$current;const sourceValue=(_sourceRef$current=sourceRef.current)===null||_sourceRef$current===void 0?void 0:_sourceRef$current.getValue("source");if(options.alias.find(item=>item.label===sourceValue)){return"alias"}if(options.dataStreams.find(item=>item.label===sourceValue)){return"dataStreams"}return},[(_sourceRef$current2=sourceRef.current)===null||_sourceRef$current2===void 0?void 0:_sourceRef$current2.getValue("source")]);const writingIndex=(()=>{const findItem=options.alias.find(item=>{var _sourceRef$current3;return item.label===((_sourceRef$current3=sourceRef.current)===null||_sourceRef$current3===void 0?void 0:_sourceRef$current3.getValue("source"))});let writeIndex="";if(findItem){if(findItem.aliases.length>1){if(findItem.aliases.some(item=>item.is_write_index==="true")){const indexItem=findItem.aliases.find(item=>item.is_write_index==="true");writeIndex=(indexItem===null||indexItem===void 0?void 0:indexItem.index)||""}}
6else{writeIndex=findItem.aliases[0].index}}return writeIndex})();Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(writingIndex&&tempValue.source){var _indexFormRef$current;getRolloveredIndex({alias:tempValue.source,services:services}).then(result=>{if(result&&result.ok){field.setValue(["targetIndex","index"],result.response)}else{field.setValue(["targetIndex","index"],"")}});(_indexFormRef$current=indexFormRef.current)===null||_indexFormRef$current===void 0||_indexFormRef$current.simulateFromTemplate()}},[writingIndex]);const reasons=Object(external_osdSharedDeps_React_["useMemo"])(()=>{let result=[];if(sourceType==="alias"){const findItem=options.alias.find(item=>{var _sourceRef$current4;return item.label===((_sourceRef$current4=sourceRef.current)===null||_sourceRef$current4===void 0?void 0:_sourceRef$current4.getValue("source"))});if(!writingIndex){var _findItem$aliases;result.push(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexEnd"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},"Select a write index from this alias before performing rollover.",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:"Select an index from this alias"},external_osdSharedDeps_React_default.a.createElement(built_in_components.ComboBoxSingle,{placeholder:"Select an index",value:writeIndexValue?writeIndexValue:undefined,onChange:val=>setWriteIndexValue(val),options:findItem===null||findItem===void 0||(_findItem$aliases=findItem.aliases)===null||_findItem$aliases===void 0?void 0:_findItem$aliases.map(item=>({label:item.index}))}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:!writeIndexValue,fill:true,color:"primary",onClick:async()=>{const result=await submitWriteIndex({services:services,writeIndexValue:writeIndexValue,sourceRef:sourceRef});if(result.ok){coreService===null||coreService===void 0||coreService.notifications.toasts.addSuccess(`Set ${writeIndexValue} as write index successfully.`);refreshOptions()}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(result.error)}}},"Assign as write index")))))}}return result},[sourceType,options,writeIndexValue]);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"0px 50px"};const descriptionData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued"},"Rollover creates a new writing index for a data stream or index alias.")}];return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},useNewUX&&external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}),!useNewUX&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Roll over")),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{helpText:"Rollover creates a new writing index for a data stream or index alias.",style:{marginBottom:20}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure source"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),sourceType==="alias"&&filterByMinimatch(tempValue.source||"",utils_constants_0["c"])?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning"},"This alias may contain critical system data. Rollovering system al
6iases may break OpenSearch."),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement(components_FormGenerator,{value:initialValue,onChange:onChange,formFields:[{name:"source",rowProps:{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Select an alias or data stream")),helpText:"Select an alias or data stream to roll over."},options:{rules:[{required:true,message:"One alias or data stream should be specified."}],props:{options:sourceOptions,placeholder:"Select a alias or data stream."}},type:"ComboBoxSingle"}],ref:sourceRef}),reasons.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"danger",title:"This alias does not contain a write index."},reasons.map((item,index)=>external_osdSharedDeps_React_default.a.createElement("div",{key:index},item)))):null,(()=>{if(sourceType==="alias"&&writingIndex){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Assigned write index"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("span",null,writingIndex))))}return null})()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),sourceType==="alias"&&writingIndex?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure new rollover index"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>{var _indexFormRef$current2;(_indexFormRef$current2=indexFormRef.current)===null||_indexFormRef$current2===void 0||_indexFormRef$current2.importSettings({index:writingIndex})}},"Import from old write index"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(public_containers_IndexForm,Rollover_extends({},field.registerField({name:"targetIndex"}),{onGetIndexDetail:async indexName=>{try{var _indexFormRef$current3;return await getIndexDetail({services:services,indexName:indexName,newIndexName:((_indexFormRef$current3=indexFormRef.current)===null||_indexFormRef$current3===void 0||(_indexFormRef$current3=_indexFormRef$current3.getValue())===null||_indexFormRef$current3===void 0?void 0:_indexFormRef$current3.index)||""})}catch(e){coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(e);throw e}},ref:indexFormRef,withoutPanel:true}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:()=>
6{if(sourceType==="alias"){props.history.push(constants["D"].ALIASES)}else{props.history.push(constants["D"].DATA_STREAMS)}},"data-test-subj":"rolloverCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{disabled:loading||sourceType==="alias"&&!writingIndex,fill:true,onClick:async()=>{setIsLoading(true);const result=await hooks_onSubmit({services:services,sourceRef:sourceRef,sourceType:sourceType,writingIndex:writingIndex,indexFormRef:indexFormRef,tempValue:tempValue});setIsLoading(false);if(result.ok){var _result$response,_result$response2;coreService===null||coreService===void 0||coreService.notifications.toasts.addSuccess({title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("div",null,tempValue.source," has been successfully rolled over."),(_result$response=result.response)!==null&&_result$response!==void 0&&_result$response.new_index?external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].INDEX_DETAIL}/${result.response.new_index}`},(_result$response2=result.response)===null||_result$response2===void 0?void 0:_result$response2.new_index)," is now the latest write index."):null)});props.history.replace(sourceType==="alias"?constants["D"].ALIASES:constants["D"].DATA_STREAMS)}else{coreService===null||coreService===void 0||coreService.notifications.toasts.addDanger(result.error)}},isLoading:loading,"data-test-subj":"rolloverSubmitButton"},"Roll over"))))}var containers_Rollover=Rollover;var pages_Rollover=containers_Rollover;const DataStreams_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const DataStreams_utils_constants_DEFAULT_QUERY_PARAMS={from:"0",size:"20",search:"",sortField:"name",sortDirection:constants["I"].DESC,dataSourceId:""};const constants_HEALTH_TO_COLOR={green:"success",yellow:"warning",red:"danger"};
6function IndexControls_IndexControls_SearchControls(props){const[state,setState]=Object(external_osdSharedDeps_React_["useState"])(props.value);const onChange=(field,value)=>{const payload={...state,[field]:value};setState(payload);props.onSearchChange(payload)};Object(external_osdSharedDeps_React_["useEffect"])(()=>{setState(props.value)},[props.value]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{fullWidth:true,placeholder:"Search...",value:state.search,onChange:e=>onChange("search",e.target.value)})))}var DataStreams_components_IndexControls=IndexControls_IndexControls_SearchControls;function DeleteDataStreamsModal_DeleteTemplateModal(props){const{onClose:onClose,visible:visible,selectedItems:selectedItems,onDelete:onDelete}=props;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const onConfirm=Object(external_osdSharedDeps_React_["useCallback"])(async()=>{if(services){const result=await services.commonService.apiCaller({endpoint:"transport.request",data:{path:`/_data_stream/${selectedItems.join(",")}`,method:"DELETE"}});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`Delete [${selectedItems.join(",")}] successfully`);onDelete()}else{coreServices.notifications.toasts.addDanger((result===null||result===void 0?void 0:result.error)||"")}}},[selectedItems,services,coreServices,onDelete]);return external_osdSharedDeps_React_default.a.createElement(public_components_DeleteModal,{title:"Delete data streams",tips:"The following data streams will be permanently deleted. The backing indexes belonging to the data streams will also be deleted.",onConfirm:onConfirm,onClose:onClose,visible:visible,selectedItems:selectedItems})}var DeleteDataStreamsModal=DeleteDataStreamsModal_DeleteTemplateModal;function DataStreamsActions(props){const{selectedItems:selectedItems,onDelete:onDelete,history:history}=props;const[deleteIndexModalVisible,setDeleteIndexModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[clearCacheModalVisible,setClearCacheModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[flushDataStreamModalVisible,setFlushDataStreamModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const[refreshModalVisible,setRefreshModalVisible]=Object(external_osdSharedDeps_React_["useState"])(false);const onDeleteIndexModalClose=()=>{setDeleteIndexModalVisible(false)};const onClearCacheModalClose=()=>{setClearCacheModalVisible(false)};const onFlushDataStreamModalClose=()=>{setFlushDataStreamModalVisible(false)};const onRefreshModalClose=()=>{setRefreshModalVisible(false)};const renderKey=Object(external_osdSharedDeps_React_["useMemo"])(()=>Date.now(),[selectedItems]);const selectedItemsInString=selectedItems.map(item=>item.name);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(components_SimplePopover,{"data-test-subj":"moreAction",panelPaddingSize:"s",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"arrowDown",iconSide:"right"},"Actions")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContextMenu"],{size:"s",initialPanelId:0,key:renderKey,panels:[{id:0,items:[{name:"Force merge","data-test-subj":"ForceMergeAction",onClick:()=>{props.history.push(`${constants["D"].FORCE_MERGE}/${selectedItemsInString.join(",")}`)}},{name:"Roll over",disabled:selectedItems.length>1,"data-test-subj":"rolloverAction",onClick:()=>history.push(`${constants["D"].ROLLOVER}/${selectedItemsInString.join(",")}`)},{isSeparator:true},{name:"Clear cache",disabled:selectedItems.length<1,"data-test-subj":"ClearCacheAction",onClick:()=>setClearCacheModalVisible(true)},{name:"Flush",disabled:!selectedItems.length,"data-test-subj":"Flush Action",onClick:()=>setFlushDataStreamModalVisible(true)},{name:"Refresh",disabled:!selectedItems.length,"data-test-subj":"refreshAction",onClick:()=>setRefreshModalVisible(true)},{isSeparator:true},{name:"Delete",disabled:selectedItems.length<1,"data-test-subj":"deleteAction",onClick:()=>setDeleteIndexModalVisible(true)}]}]})),external_osdSharedDeps_React_default.a.createElement(DeleteDataStream
6sModal,{selectedItems:selectedItemsInString,visible:deleteIndexModalVisible,onClose:onDeleteIndexModalClose,onDelete:()=>{onDeleteIndexModalClose();onDelete()}}),external_osdSharedDeps_React_default.a.createElement(containers_ClearCacheModal,{selectedItems:selectedItems,visible:clearCacheModalVisible,onClose:onClearCacheModalClose,type:constants["u"].DATA_STREAM}),external_osdSharedDeps_React_default.a.createElement(containers_FlushIndexModal,{selectedItems:selectedItems,visible:flushDataStreamModalVisible,onClose:onFlushDataStreamModalClose,flushTarget:constants["u"].DATA_STREAM}),external_osdSharedDeps_React_default.a.createElement(RefreshActionModal,{selectedItems:selectedItems,visible:refreshModalVisible,onClose:onRefreshModalClose,type:constants["u"].DATA_STREAM}))}function DataStreams_extends(){return DataStreams_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DataStreams_extends.apply(null,arguments)}function DataStreams_defineProperty(e,r,t){return(r=DataStreams_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DataStreams_toPropertyKey(t){var i=DataStreams_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function DataStreams_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const DataStreams_defaultFilter={search:DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.search};const healthExplanation={green:"All shards are assigned.",yellow:"All primary shards are assigned, but one or more replica shards are unassigned.",red:"One or more primary shards are unassigned, so some data is unavailable."};class DataStreams_DataStreams extends components_MDSEnabledComponent{constructor(props){super(props);DataStreams_defineProperty(this,"getQueryState",state=>Object.keys(DataStreams_utils_constants_DEFAULT_QUERY_PARAMS).reduce((total,key)=>({...total,[key]:state[key]}),{}));DataStreams_defineProperty(this,"getDataStreams",async()=>{this.setState({loading:true});const{from:from,size:size,sortDirection:sortDirection,sortField:sortField}=this.state;const fromNumber=Number(from);const sizeNumber=Number(size);const{history:history,commonService:commonService}=this.props;const queryObject=this.getQueryState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});let allDataStreams=[];let error="";let totalDataStreams=0;let dataStreams=[];const[allDataStreamsResponse,dataStreamDetailInfoResponse]=await Promise.all([commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`_data_stream/*${queryObject.search}*`}}),await commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`_data_stream/*${queryObject.search}*/_stats?human=true`}})]);if(allDataStreamsResponse.ok&&dataStreamDetailInfoResponse.ok){var _allDataStreamsRespon;allDataStreams=(((_allDataStreamsRespon=allDataStreamsResponse.response)===null||_allDataStreamsRespon===void 0?void 0:_allDataStreamsRespon.data_streams)||[]).map(item=>{var _dataStreamDetailInfo;const findItem=(((_dataStreamDetailInfo=dataStreamDetailInfoResponse.response)===null||_dataStreamDetailInfo===void 0?void 0:_dataStreamDetailInfo.data_streams)||[]).find(statsItem=>statsItem.data_stream===item.name);if(!findItem){return undefined}return{...findItem,...item}}).filter(item=>item);totalDataStreams=allDataStreams.length;allDataStreams.sort((a,b)=>{if(sortDirection==="asc"){if(a[sortField]<b[sortField]){return-1}return 1}else{if(a[sortField]>b[sortField]){return-1}return 1}});dataStreams=allDataStreams.slice(fromNumber*sizeNumber,(fromNumber+1)*sizeNumber)}else{error=allDataStreamsResponse.error||dataStreamDetailInfoResponse.error||""}
6if(!error){const payload={dataStreams:dataStreams,totalDataStreams:totalDataStreams,selectedItems:this.state.selectedItems.map(item=>allDataStreams.find(remoteItem=>remoteItem.name===item.name)).filter(item=>item)};this.setState(payload)}else{this.context.notifications.toasts.addDanger(error)}this.setState({loading:false})});DataStreams_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;const{index:page,size:size}=tablePage||{};const{field:sortField,direction:sortDirection}=sort||{};this.setState({from:""+page,size:""+size,sortField:sortField||DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:sortDirection},()=>this.getDataStreams())});DataStreams_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});DataStreams_defineProperty(this,"onSearchChange",params=>{this.setState({from:"0",...params},()=>this.getDataStreams())});DataStreams_defineProperty(this,"onClickDataStreamCreate",()=>{this.props.history.push(constants["D"].CREATE_DATA_STREAM)});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");const{from:_from=DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.from,size:_size=DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.size,search:search=DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.search,sortField:_sortField=DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:_sortDirection=DataStreams_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection}=query_string_default.a.parse(props.history.location.search);this.state={...DataStreams_defaultFilter,...this.state,totalDataStreams:0,from:_from,size:_size,search:search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],dataStreams:[],loading:false,useNewUX:useNewUx};this.getDataStreams=Object(external_osdSharedDeps_Lodash_["debounce"])(this.getDataStreams,500,{leading:true})}async componentDidUpdate(prevProps,prevState){const prevQuery=this.getQueryState(prevState);const currQuery=this.getQueryState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getDataStreams()}}componentDidMount(){let breadCrumbs=this.state.useNewUX?[constants["f"].DATA_STREAMS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].DATA_STREAMS];this.context.chrome.setBreadcrumbs(breadCrumbs);this.getDataStreams()}render(){const{totalDataStreams:totalDataStreams,from:from,size:size,sortField:sortField,sortDirection:sortDirection,dataStreams:dataStreams,useNewUX:useNewUX}=this.state;const pagination={pageIndex:Number(from),pageSize:Number(size),pageSizeOptions:DataStreams_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:Number(totalDataStreams)};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const constrolsData=[{id:"Create data stream",iconType:"plus",label:"Create data stream",testId:"createDataStreamButton",run:this.onClickDataStreamCreate,fill:true,controlType:"button"}];const description=[{description:"Data streams simplify the management of time-series data. Data streams are composed of multiple backing indexes. Search requests are routed to all backing indexes, while indexing requests are routed to the latest write index.",links:{label:"Learn more",href:this.context.docLinks.links.opensearch.dataStreams,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];return useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:constrolsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:description}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:true},external_osdSharedDeps_React_default.a.createElement(DataStream
6s_components_IndexControls,{value:{search:this.state.search},onSearchChange:this.onSearchChange,useNewUX:useNewUX})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(DataStreamsActions,{selectedItems:this.state.selectedItems,onDelete:this.getDataStreams,history:this.props.history,useNewUX:useNewUX}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{"data-test-subj":"dataStreamsTable",loading:this.state.loading,columns:[{field:"name",name:"Data stream name",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_DATA_STREAM}/${value}/readonly`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],null,value))},{field:"status",name:"Status",sortable:true,render:(health,item)=>{const healthLowerCase=health===null||health===void 0?void 0:health.toLowerCase();const color=health?constants_HEALTH_TO_COLOR[healthLowerCase]:"subdued";const text=(health||item.status||"").toLowerCase();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:healthExplanation[healthLowerCase]||""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text))}},{field:"template",name:"Template",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_TEMPLATE}/${value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],null,value))},{field:"backing_indices",name:"Backing indexes count",sortable:true,align:"right"},{field:"store_size_bytes",name:"Total size",sortable:true,align:"right",render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,record.store_size||"")}],isSelectable:true,itemId:"name",items:dataStreams,onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,noItemsMessage:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search},DataStreams_defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You have no data streams.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_DATA_STREAM)},iconType:"plus"},"Create data stream")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"There are no data streams matching your applied filters. Reset your filters to view your data streams.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.setState(DataStreams_defaultFilter,()=>{this.getDataStreams()})},iconType:"plus"},"Reset filters")]})}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:[{text:"",children:external_osdSharedDeps_React_default.a.createElement(DataStreamsActions,{selectedItems:this.state.selectedItems,onDelete:this.getDataStream
6s,history:this.props.history})},{text:"Create data stream",buttonProps:{iconType:"plus",fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_DATA_STREAM)}}}]}),bodyStyles:{padding:"initial"},title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,external_osdSharedDeps_React_default.a.createElement("span",null,"Data streams")))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Data streams simplify the management of time-series data. Data streams are composed of multiple backing indexes. Search requests are routed to all backing indexes, while indexing requests are routed to the latest write index."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:this.context.docLinks.links.opensearch.dataStreams},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)))},external_osdSharedDeps_React_default.a.createElement(DataStreams_components_IndexControls,{value:{search:this.state.search},onSearchChange:this.onSearchChange}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{"data-test-subj":"dataStreamsTable",loading:this.state.loading,columns:[{field:"name",name:"Data stream name",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_DATA_STREAM}/${value}/readonly`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],null,value))},{field:"status",name:"Status",sortable:true,render:(health,item)=>{const healthLowerCase=health===null||health===void 0?void 0:health.toLowerCase();const color=health?constants_HEALTH_TO_COLOR[healthLowerCase]:"subdued";const text=(health||item.status||"").toLowerCase();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:healthExplanation[healthLowerCase]||""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text))}},{field:"template",name:"Template",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_TEMPLATE}/${value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],null,value))},{field:"backing_indices",name:"Backing indexes count",sortable:true,align:"right"},{field:"store_size_bytes",name:"Total size",sortable:true,align:"right",render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,record.store_size||"")}],isSelectable:true,itemId:"name",items:dataStreams,onChange:this.onTableChange,pagination:pagination,selection:selection,sorting:sorting,noItemsMessage:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search},DataStreams_defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"You have no data streams.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_DATA_STREAM)},iconType:"plus"},"Create data stream")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"There are no data streams matching your applied filters. Reset your filters to view your data streams.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>
6{this.setState(DataStreams_defaultFilter,()=>{this.getDataStreams()})},iconType:"plus"},"Reset filters")]})})))}}DataStreams_defineProperty(DataStreams_DataStreams,"contextType",core_services["b"]);function DataStreamsContainer(props){const context=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const dataSourceMenuProperties=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(DataStreams_DataStreams,DataStreams_extends({},props,{commonService:context===null||context===void 0?void 0:context.commonService},dataSourceMenuProperties))}var containers_DataStreams=DataStreamsContainer;var pages_DataStreams=containers_DataStreams;const createDataStream=async props=>await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"PUT",path:`_data_stream/${props.value}`}});const getDataStream=async props=>{const response=await props.commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`_data_stream/${props.dataStream}`}});let error="";if(response.ok){var _response$response;const findItem=(_response$response=response.response)===null||_response$response===void 0||(_response$response=_response$response.data_streams)===null||_response$response===void 0?void 0:_response$response.find(item=>item.name===props.dataStream);if(findItem){const dataStreamDetail=findItem;return JSON.parse(JSON.stringify(dataStreamDetail))}error=`The data stream ${props.dataStream} does not exist.`}else{error=response.error||""}props.coreService.notifications.toasts.addDanger(error);throw new Error(error)};const getAllDataStreamTemplate=props=>props.commonService.apiCaller({data:{method:"GET",path:"/_index_template/*"},endpoint:"transport.request"}).then(result=>{if(result&&result.ok){return(result.response.index_templates||[]).filter(item=>item.index_template.data_stream)}return[]});const CreateDataStream_hooks_getCommonFormRowProps=(name,field)=>({isInvalid:!!field.getError(name),error:field.getError(name),"data-test-subj":`form-row-${transformNameToString(name)}`});const setMatchedTemplate=_ref=>{var _matchedTemplate$inde;let{matchedTemplate:matchedTemplate,field:field}=_ref;const payload={matchedTemplate:matchedTemplate.name,template:JSON.parse(JSON.stringify({...matchedTemplate.index_template.template,settings:(_matchedTemplate$inde=matchedTemplate.index_template)!==null&&_matchedTemplate$inde!==void 0&&(_matchedTemplate$inde=_matchedTemplate$inde.template)!==null&&_matchedTemplate$inde!==void 0&&_matchedTemplate$inde.settings?Object(node_modules_flat["flatten"])(matchedTemplate.index_template.template.settings):{}}))};Object(external_osdSharedDeps_Lodash_["set"])(payload,"template.mappings.properties",transformObjectToArray(Object(external_osdSharedDeps_Lodash_["get"])(payload,"template.mappings.properties",{})));field.setValues(payload)};const getStringBeforeStar=string=>string.replace(/^([^*]*).*$/,"$1");const findPatternMatchesString=(value,template)=>{const{index_patterns:index_patterns}=template.index_template;const findMatchesPattern=index_patterns.find(item=>filterByMinimatch(value,[item]));const findWordLikePattern=index_patterns.find(item=>item.match(new RegExp(value,"i")));const findStringPattern=index_patterns.find(item=>item===value);return{findMatchesPattern:findMatchesPattern,findWordLikePattern:findWordLikePattern,findStringPattern:findStringPattern}};function DefineDataStream_extends(){return DefineDataStream_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DefineDataStream_extends.apply(null,arguments)}function DefineDataStream(props){var _values$timestamp_fie,_comboBoxRef$current;const{field:field,isEdit:isEdit,allDataStreamTemplates:allDataStreamTemplates}=props;const comboBoxRef=Object(external_osdSharedDeps_React_["useRef"])(null);const values=field.getValues();const searchValue=values.name||"";const Component=isEdit?built_in_components.Text:built_in_components.ComboBoxSingle;const allDataStreamOrderedByPriority=Object(external_osdSharedDeps_React_["useMemo"])(()=>{const newDataStream=[...allDataStreamTemplates];
6newDataStream.sort((a,b)=>a.index_template.priority>b.index_template.priority?-1:1);return newDataStream},[allDataStreamTemplates]);const matchedList=allDataStreamTemplates.filter(item=>{if(!searchValue){return true}else if(item.index_template.index_patterns.some(item=>item.match(new RegExp(searchValue,"i")))){return true}return filterByMinimatch(searchValue||"",item.index_template.index_patterns)});matchedList.sort((a,b)=>a.index_template.priority>b.index_template.priority?-1:1);const suggestionRegister=field.registerField({name:"name",rules:[{pattern:constants["s"],message:"Invalid data stream name."},{validator:(rule,value)=>new Promise((resolve,reject)=>{setTimeout(()=>{if(field.getValue("matchedTemplate")){resolve("")}else{reject(`No matching index template found for data stream [${value||""}]`)}},0)})}],props:{}});const onBlurCallback=()=>{const nameValue=field.getValue("name")||"";const findMatchedTemplate=allDataStreamOrderedByPriority.find(item=>{const{findMatchesPattern:findMatchesPattern,findStringPattern:findStringPattern}=findPatternMatchesString(nameValue,item);return findMatchesPattern||findStringPattern});suggestionRegister.onChange(nameValue);if(findMatchedTemplate){setMatchedTemplate({matchedTemplate:findMatchedTemplate,field:field})}else{field.setValues({matchedTemplate:"",template:{}})}};const listItems=[{title:"Name",description:values.name},{title:"Status",description:(health=>{const healthLowerCase=health===null||health===void 0?void 0:health.toLowerCase();const color=health?constants_HEALTH_TO_COLOR[healthLowerCase]:"subdued";const text=(health||"").toLowerCase();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:healthExplanation[healthLowerCase]||""},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text))})(values.status)},{title:"Template name",description:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].CREATE_TEMPLATE}/${values.template}`},values.template)},{title:"Backing indexes",description:(values.indices||[]).length},{title:"Timefield",description:((_values$timestamp_fie=values.timestamp_field)===null||_values$timestamp_fie===void 0?void 0:_values$timestamp_fie.name)||""}];const createTitle=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Define data stream"));return isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Data stream details"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},listItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.title}#${item.description}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.title),external_osdSharedDeps_React_default.a.createElement("dd",null,item.description))))))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Define data stream"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],DefineDataStream_extends({},CreateDataStream_hooks_getCommonFormRowProps("name",field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Data stream name")),fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Enter a data stream name. It must match an index pattern from a data stream template."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].TEMPLATES}`,external:true,target:"_blank"},"Manage templates."))}),external_osdSharedDeps_React_default.a.createElement(Component,DefineDataStream_extends({placeholder:"Enter data stream name",options:matchedList.map(item=>({label:item.name,value:item})),renderOption:option=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{style:{overflowX:"auto"},justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},option.value.index_template.index_patterns.join(",")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{color:"hollow"},option.label))),async:true},suggestionRegister,{value:(_comboBoxRef$current=comboBoxRef.current)!==null&&_comboBoxRef$current!==void 0&&_comboBoxRef$current.state.hasFocus?undefined:suggestionRegister.value,ref:comboBoxRef,onCreateOption:()=>{},customOptionText:searchValue?`{searchValue} does not match index patterns from any templates. Enter another name or create a data stream template.`:`There are no data stream templates. Please create a data stream template.`,onSearchChange:dataStreamName=>{if(!dataStreamName){return}field.setValue("name",dataStreamName)},onFocus:()=>{var _comboBoxRef$current2;(_comboBoxRef$current2=comboBoxRef.current)===null||_comboBoxRef$current2===void 0||_comboBoxRef$current2.setState({searchValue:field.getValue("name")||""})},onBlur:()=>{var _comboBoxRef$current3;onBlurCallback();(_comboBoxRef$current3=comboBoxRef.current)===null||_comboBoxRef$current3===void 0||_comboBoxRef$current3.setState({searchValue:""})},onChange:(value,selectedOption)=>
6{if(!value){field.resetValues({name:""})}else{const findItem=selectedOption.value;const{findMatchesPattern:findMatchesPattern,findWordLikePattern:findWordLikePattern}=findPatternMatchesString(searchValue,findItem);let finalSearchValue=searchValue;if(findMatchesPattern){}else if(findWordLikePattern){const finalReplaceValue=getStringBeforeStar(findWordLikePattern);finalSearchValue=finalReplaceValue;field.setValue("name",finalReplaceValue)}setTimeout(()=>{var _comboBoxRef$current4;(_comboBoxRef$current4=comboBoxRef.current)===null||_comboBoxRef$current4===void 0||_comboBoxRef$current4.setState({searchValue:finalSearchValue,hasFocus:true,isListOpen:true},()=>{onBlurCallback()})},100)}}}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Matching template"))},values.matchedTemplate?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].CREATE_TEMPLATE}/${values.matchedTemplate}`},values.matchedTemplate)):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,"No index template matched")))))}var containers_DefineDataStream=DefineDataStream;function components_IndexSettings_IndexSettings_extends(){return components_IndexSettings_IndexSettings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},components_IndexSettings_IndexSettings_extends.apply(null,arguments)}function IndexSettings_IndexSettings_IndexSettings(props){var _values$template,_values$template2,_values$template3;const{readonly:readonly,field:field}=props;const values=field.getValues();const listItems=[{title:"Number of primary shards",description:((_values$template=values.template)===null||_values$template===void 0||(_values$template=_values$template.settings)===null||_values$template===void 0?void 0:_values$template["index.number_of_shards"])||"-"},{title:"Number of replicas",description:((_values$template2=values.template)===null||_values$template2===void 0||(_values$template2=_values$template2.settings)===null||_values$template2===void 0?void 0:_values$template2["index.number_of_replicas"])||"-"},{title:"Refresh interval",description:((_values$template3=values.template)===null||_values$template3===void 0||(_values$template3=_values$template3.settings)===null||_values$template3===void 0?void 0:_values$template3["index.refresh_interval"])||"-"}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index settings")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),readonly?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},listItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.title}#${item.description}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.title),external_osdSharedDeps_React_default.a.createElement("dd",null,item.description))))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],components_IndexSettings_IndexSettings_extends({fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of primary shards")),helpText:"Specify the number of primary shards in the index. Default is 1."},CreateDataStream_hooks_getCommonFormRowProps(["template","settings","index.number_of_shards"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Text,field.registerField({name:["template","settings","index.number_of_shards"]}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],components_IndexSettings_IndexSettings_extends({fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h4",null,"Number of replicas")),helpText:"Specify the number of replicas each primary shard should have. Default is 1."},CreateDataStream_hooks_getCommonFormRowProps(["template","settings","index.number_of_replicas"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Text,field.registerField({name:["template","settings","index.number_of_replicas"]}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],components_IndexSettings_IndexSettings_extends({label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h4",null,"Refresh interval")),helpText:"Specify how often the index should refresh, which publishes its most recent changes and makes them available for search. Default is 1s."},CreateDataStream_hooks_getCommonFormRowProps(["template","settings","index.refresh_interval"],field)),external_osdSharedDeps_React_default.a.createElement(built_in_components.Text,field.registerField({name:["template","settings","index.refresh_interval"]})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(components_AdvancedSettings,{value:field.getValues().template.settings||{},onChange:totalValue=>{field.setValue(["template","settings"],totalValue);field.validatePromise()},accordionProps:{initialIsOpen:false,id:"accordionForCreateDataStreamSettings",buttonContent:external_osdSharedDeps_React_default.a.createElement("h4",null,"Advanced settings")},editorProps:{disabled:true,width:"100%",formatValue:flat_default.a},rowProps:{fullWidth:true,label:"Specify advanced index settings",helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",null,"Specify a comma-delimited list of settings."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:constants["v"],target:"_blank",external:true},"View index settings")),external_osdSharedDeps_React_default.a.createElement("p",null,"All the settings will be handled in flat structure."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:"https://opensearch.org/docs/latest/api-reference/index-apis/get-index/#url-parameters",external:true,target:"_blank"},"Learn more")))}}))}var CreateDataStream_components_IndexSettings=IndexSettings_IndexSettings_IndexSettings;function containers_IndexAlias_IndexAlias_extends(){return containers_IndexAlias_IndexAlias_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},containers_IndexAlias_IndexAlias_extends.apply(null,arguments)}function IndexAlias_IndexAlias_IndexAlias(props){var _values$template;const{isEdit:isEdit,field:field}=props;const values=field.getValues();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const listItems=[{title:"Alias names",description:Object.keys((values===null||values===void 0||(_values$template=values.template)===null||_values$template===void 0?void 0:_values$template.aliases)||{}).join(",")||"-"}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias")),helpText:"Allow the new indexes to be referenced by existing al
6iases or specify a new alias."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),!isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{columns:4},listItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:`${item.title}#${item.description}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("dt",null,item.title),external_osdSharedDeps_React_default.a.createElement("dd",null,item.description)))))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],containers_IndexAlias_IndexAlias_extends({fullWidth:true},CreateDataStream_hooks_getCommonFormRowProps(["template","aliases"],field),{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"}," ",external_osdSharedDeps_React_default.a.createElement("h3",null,"Index alias")," "),helpText:"Select existing aliases or specify a new alias."}),external_osdSharedDeps_React_default.a.createElement(components_AliasSelect,containers_IndexAlias_IndexAlias_extends({isDisabled:true},field.registerField({name:["template","aliases"]}),{refreshOptions:aliasName=>services===null||services===void 0?void 0:services.commonService.apiCaller({endpoint:"cat.aliases",method:"GET",data:{format:"json",name:`*${aliasName||""}*`,s:"alias:desc"}})})))))}var CreateDataStream_containers_IndexAlias=IndexAlias_IndexAlias_IndexAlias;function containers_TemplateMappings_TemplateMappings_extends(){return containers_TemplateMappings_TemplateMappings_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},containers_TemplateMappings_TemplateMappings_extends.apply(null,arguments)}function TemplateMappings_TemplateMappings_TemplateMappings(props){const{field:field,isEdit:isEdit}=props;const mappingsRef=Object(external_osdSharedDeps_React_["useRef"])(null);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index mapping")),helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Define how documents and their fields are stored and indexed."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:`https://opensearch.org/docs/${coreServices.docLinks.DOC_LINK_VERSION}/opensearch/mappings/`},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true},external_osdSharedDeps_React_default.a.createElement(components_IndexMapping,containers_TemplateMappings_TemplateMappings_extends({},field.registerField({name:["template","mappings"]}),{readonly:true,isEdit:isEdit,ref:mappingsRef,docVersion:coreServices.docLinks.DOC_LINK_VERSION}))))}var CreateDataStream_containers_TemplateMappings=TemplateMappings_TemplateMappings_TemplateMappings;const BackingIndices_renderNumber=value=>value||"-";const BackingIndices_HEALTH_TO_COLOR={green:"success",yellow:"warning",red:"danger"};function BackingIndices(props){var _ref,_values$indices;const{field:field}=props;const values=field.getValues();const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);
6const[indexes,setIndexes]=Object(external_osdSharedDeps_React_["useState"])([]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{if(values.name){services.indexService.getIndices({from:0,size:999,search:values.name,terms:values.name,sortField:"index",sortDirection:"desc",showDataStreams:true}).then(result=>{if(result&&result.ok){setIndexes(result.response.indices.filter(item=>item.data_stream===values.name))}})}},[values.name]);const writingIndex=(_ref=(values.indices||[])[(((_values$indices=values.indices)===null||_values$indices===void 0?void 0:_values$indices.length)||0)-1])===null||_ref===void 0?void 0:_ref.index_name;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Backing indexes"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_React_default.a.createElement("p",null,"A data stream is composed of backing indexes. Search requests are routed to all backing indexes, while indexing requests are routed to the write backing index.")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{pagination:undefined,items:indexes,columns:[{field:"index",name:"Index",sortable:true,truncateText:false,textOnly:true,width:"250px",render:index=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{href:`#${constants["D"].INDEX_DETAIL}/${index}`},index)},{field:"health",name:"Health",sortable:true,truncateText:true,textOnly:true,render:(health,item)=>{const color=health?BackingIndices_HEALTH_TO_COLOR[health]:"subdued";const text=health||item.status;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHealth"],{color:color,className:"indices-health"},text)}},{field:"managed",name:"Managed by policy",sortable:true,truncateText:true,textOnly:true,render:BackingIndices_renderNumber},{field:"status",name:"Status",sortable:true,truncateText:true,textOnly:true,render:(status,item)=>external_osdSharedDeps_React_default.a.createElement("span",{className:"camel-first-letter"},item.extraStatus||status)},{field:"rep",name:"Writing index",textOnly:true,render:(value,record)=>record.index===writingIndex?"Yes":"No"},{field:"store.size",name:"Total size",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:BackingIndices_renderNumber},{field:"pri.store.size",name:"Size of primaries",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:BackingIndices_renderNumber},{field:"docs.count",name:"Total documents",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:count=>external_osdSharedDeps_React_default.a.createElement("span",{title:count},count||"-")},{field:"docs.deleted",name:"Deleted documents",sortable:true,truncateText:true,textOnly:true,dataType:"number",render:deleted=>external_osdSharedDeps_React_default.a.createElement("span",{title:deleted},deleted||"-")},{field:"pri",name:"Primaries",sortable:true,truncateText:true,textOnly:true,dataType:"number"},{field:"rep",name:"Replicas",sortable:true,truncateText:true,textOnly:true,dataType:"number"}]}))}var containers_BackingIndices=BackingIndices;function DataStreamDetail_extends(){return DataStreamDetail_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},DataStreamDetail_extends.apply(null,arguments)}const DataStreamDetail=(props,ref)=>{const{dataStream:dataStream,onCancel:onCancel,onSubmitSuccess:onSubmitSuccess}=props;const isEdit=!!dataStream;const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[templates,setTemplates]=Object(external_osdSharedDeps_React_["useState"])([]);const[isLoading,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const field=useField({values:{}});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onSubmit=async()=>{const{errors:errors,values:dataStream}=await field.validatePromise()||{};if(errors){return}setIsLoading(true);const result=await createDataStream({value:dataStream.name||"",commonService:services.commonService,isEdit:isEdit});if(result&&result.ok){coreServices.notifications.toasts.addSuccess(`${dataStream.name} has been successfully ${isEdit?"updated":"created"}.`);onSubmitSuccess&&onSubmitSuccess(dataStream.name||"")}else{coreServices.notifications.toasts.addDanger(result.error)}if(destroyRef.current){return}setIsLoading(false)};Object(external_osdSharedDeps_React_["useImperativeHandle"])(ref,()=>field);Object(external_osdSharedDeps_React_["useEffect"])(()=>
6{if(isEdit){getDataStream({dataStream:dataStream,coreService:coreServices,commonService:services.commonService}).then(dataStreamDetail=>{field.resetValues(dataStreamDetail)}).catch(()=>{props.history.replace(constants["D"].DATA_STREAMS)})}else{setIsLoading(true);getAllDataStreamTemplate({commonService:services.commonService}).then(result=>setTemplates(result)).finally(()=>{setIsLoading(false)})}return()=>{destroyRef.current=true}},[]);const values=field.getValues();const subCompontentProps={...props,isEdit:isEdit,field:field};const description=[{description:"A data stream is composed of multiple backing indexes. Search requests are routed to all the backing indexes, while indexing requests are routed to the latest write index.",links:{label:"Learn more",href:coreServices.docLinks.links.opensearch.dataStreams,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];const controlsData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(DataStreamsActions,{selectedItems:values?[values]:[],history:props.history,onDelete:()=>props.history.replace(constants["D"].DATA_STREAMS),useNewUX:props.useNewUX})},{id:"viewJson",label:"View JSON",testId:"dataStreamJSONDetailModal",run:()=>{Modal["a"].show({"data-test-subj":"dataStreamJSONDetailModal",title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,values.name)),content:external_osdSharedDeps_React_default.a.createElement(JSONEditor["a"],{value:JSON.stringify(values,null,2),disabled:true})})},controlType:"button",display:"base",fill:true}];const callOut=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:external_osdSharedDeps_React_default.a.createElement("span",null,"No data stream templates created. To create a data stream, you must first define its mappings and settings by creating a data stream template."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{style:{textDecoration:"underline"},onClick:()=>props.history.push(`${constants["D"].CREATE_TEMPLATE}?values=${JSON.stringify({data_stream:{}})}`),color:"warning"},"Create template")),iconType:"alert",size:"s",color:"warning"});const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls,setAppBottomControls:setAppBottomControls}=Object(Services["c"])();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,!isEdit&&props.useNewUX&&external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:description}),isEdit&&props.useNewUX&&external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlsData}),!props.useNewUX&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},isEdit?external_osdSharedDeps_React_default.a.createElement("h1",{title:values.name},values.name):external_osdSharedDeps_React_default.a.createElement("h1",null,"Create data stream"))),isEdit?null:external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,label:"",helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"A data stream is composed of multiple backing indexes. Search requests are routed to all the backing indexes, while indexing requests are routed to the latest write index."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",external:true,href:coreServices.docLinks.links.opensearch.dataStream
6s},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexDirection:"row"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{style:{marginRight:20},onClick:()=>{Modal["a"].show({"data-test-subj":"dataStreamJSONDetailModal",title:values.name,content:external_osdSharedDeps_React_default.a.createElement(JSONEditor["a"],{value:JSON.stringify(values,null,2),disabled:true})})}},"View JSON"),external_osdSharedDeps_React_default.a.createElement(DataStreamsActions,{selectedItems:values?[values]:[],history:props.history,onDelete:()=>props.history.replace(constants["D"].DATA_STREAMS)})):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),!isLoading&&!templates.length&&!isEdit?!props.useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:"No data stream templates created",color:"warning"},"To create a data stream, you must first define its mappings and settings by creating a data stream template.",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>props.history.push(`${constants["D"].CREATE_TEMPLATE}?values=${JSON.stringify({data_stream:{}})}`)},"Create template"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)):external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppBottomControls,controls:[{renderComponent:callOut}]}):null,external_osdSharedDeps_React_default.a.createElement(containers_DefineDataStream,DataStreamDetail_extends({},subCompontentProps,{allDataStreamTemplates:templates})),values.matchedTemplate?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Inherited settings from template"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(CreateDataStream_containers_IndexAlias,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CreateDataStream_components_IndexSettings,subCompontentProps),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CreateDataStream_containers_TemplateMappings,subCompontentProps)))):null,isEdit?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(containers_BackingIndices,subCompontentProps)):null,isEdit?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onCancel,"data-test-subj":"CreateDataStreamCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onSubmit,isLoading:isLoading,"data-test-subj":"CreateDataStreamCreateButton"},isEdit?"Save changes":"Create data stream")))))};var DataStreamDetail_DataStreamDetail=Object(external_osdSharedDeps_React_["forwardRef"])(DataStreamDetail);var containers_DataStreamDetail=DataStreamDetail_DataStreamDetail;function CreateDataStream_extends(){return CreateDataStream_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateDataStream_extends.apply(null,arguments)}function CreateDataStream_defineProperty(e,r,t){return(r=CreateDataStream_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateDataStream_toPropertyKey(t){var i=CreateDataStream_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateDataStream_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateDataStream_CreateDataStream extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);CreateDataStream_defineProperty(this,"componentDidMount",async()=>{this.setBreadCrumb(this.state.useNewUX)});CreateDataStream_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].DATA_STREAMS)});const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");this.state={useNewUX:useNewUX}}get dataStream(){return this.props.match.params.dataStream}setBreadCrumb(useNewUX){const isEdit=this.dataStream;let lastBread;if(isEdit){lastBread={text:this.dataStream||"",href:`#${this.props.location.pathname}`}}else{lastBread=constants["f"].CREATE_DATA_STREAM}let breadCrumbs=useNewUX?[constants["f"].DATA_STREAMS,lastBread]:[constants["f"].INDEX_MANAGEMENT,constants["f"].DATA_STREAMS,lastBread];this.context.chrome.setBreadcrumbs(breadCrumbs)}componentDidUpdate(prevProps){if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(prevProps,this.props)){this.setBreadCrumb(this.state.useNewUX)}}render(){const padding_style=this.state.useNewUX?{padding:"0px 0px"}:{padding:"0px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},external_osdSharedDeps_React_default.a.createElement(containers_DataStreamDetail,{history:this.props.history,dataStream:this.dataStream,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].DATA_STREAMS),key:this.props.dataSourceId,useNewUX:this.state.useNewUX}
6))}}CreateDataStream_defineProperty(CreateDataStream_CreateDataStream,"contextType",core_services["b"]);var containers_CreateDataStream_CreateDataStream=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreateDataStream_CreateDataStream,CreateDataStream_extends({},props,dataSourceMenuProps))};var containers_CreateDataStream=containers_CreateDataStream_CreateDataStream;var pages_CreateDataStream=containers_CreateDataStream;function SwitchNumber_extends(){return SwitchNumber_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},SwitchNumber_extends.apply(null,arguments)}function SwitchNumber(props){const[id,setId]=Object(external_osdSharedDeps_React_["useState"])(props.value&&props.value>0?"1":"0");return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedRadioGroup"],{options:[{id:"0",label:"Automatic"},{id:"1",label:"Manually set number of segments"}],idSelected:id,onChange:id=>{setId(id);if(id==="0"){props.onChange(undefined)}else{props.onChange(1)}}}),id==="1"?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:"Number of segments",helpText:"Specify the number of segments to merge to. To fully merge indexes, set the number of segments to 1."},external_osdSharedDeps_React_default.a.createElement(built_in_components.Number,SwitchNumber_extends({},props,{placeholder:"Specify a number"})))):null)}function ForceMergeAdvancedOptions_extends(){return ForceMergeAdvancedOptions_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ForceMergeAdvancedOptions_extends.apply(null,arguments)}const ForceMergeAdvancedOptions=props=>{const{field:field}=props;return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{isInvalid:!!field.getError("max_num_segments"),error:field.getError("max_num_segments"),label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Index segments")),helpText:"Define how many segments to merge to."},external_osdSharedDeps_React_default.a.createElement(SwitchNumber,field.registerField({name:"max_num_segments",rules:[{validator(rule,value){const formatValue=new Number(value);if(Number.isNaN(formatValue.valueOf())){return Promise.resolve("")}else if(formatValue.valueOf()%1!==0||formatValue.valueOf()<1){return Promise.reject("Must be an integer great than or equal to 1.")}return Promise.resolve("")}}]}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Flush indexes")),helpText:"Opensearch will perform a flush on the indexes after the force merge."},external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,ForceMergeAdvancedOptions_extends({},field.registerField({name:"flush"}),{label:"Flush indexes"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Remove deleted documents")),fullWidth:true,helpText:"Expunge all segments containing more than 10% of deleted documents. The percentage is configurable in the index.merge.policy.expunge_deletes_allowed setting."},external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,ForceMergeAdvancedOptions_extends({},field.registerField({name:"only_expunge_deletes"}),{label:"Completely remove deleted documents"}))))};var ForceMergeAdvancedOptions_ForceMergeAdvancedOptions=ForceMergeAdvancedOptions;var components_ForceMergeAdvancedOptions=ForceMergeAdvancedOptions_ForceMergeAdvancedOptions;function IndexSelect_IndexSelect(props){var _props$value;const[indexOptions,setIndexOptions]=Object(external_osdSharedDeps_React_["useState"])([]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const searchIndex=searchValue=>{props.getIndexOptions(searchValue?searchValue:"").then(options=>{props.excludeSystemIndex&&filterSystemIndices(options);if(!destroyRef.current){setIndexOptions(options)}}).catch(err=>{coreServices.notifications.toasts.addDanger(`fetch indices error ${err}`)})};Object(external_osdSharedDeps_React_["useEffect"])(()=>{searchIndex()},[props.getIndexOptions,props.excludeSystemIndex]);Object(external_osdSharedDeps_React_["useEffect"])(()=>()=>
6{destroyRef.current=true},[]);const onSearchChangeRef=Object(external_osdSharedDeps_React_["useRef"])(Object(external_osdSharedDeps_Lodash_["debounce"])(searchValue=>{searchIndex(searchValue)},200,{leading:true}));const filterSystemIndices=list=>{list.map(it=>{var _it$options,_it$options2;it.options=(_it$options=it.options)===null||_it$options===void 0?void 0:_it$options.filter(item=>!filterByMinimatch(item.label,utils_constants_0["c"]));it.options=(_it$options2=it.options)===null||_it$options2===void 0?void 0:_it$options2.filter(item=>!filterByMinimatch(item.label,utils_constants_0["d"]))})};const flattenedOptions=Object(external_osdSharedDeps_React_["useMemo"])(()=>indexOptions.reduce((total,current)=>[...total,...current.options||[]],[]),[indexOptions]);const finalSelectedOptions=((_props$value=props.value)===null||_props$value===void 0?void 0:_props$value.map(item=>flattenedOptions.find(option=>option.label===item)).filter(item=>item))||[];return external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(ComboBoxWithoutWarning_ComboBoxWithoutWarning,{"data-test-subj":props["data-test-subj"],placeholder:props.placeholder,options:indexOptions,async:true,selectedOptions:finalSelectedOptions,onChange:selectedOptions=>props.onChange(selectedOptions.map(item=>item.label)),onSearchChange:onSearchChangeRef.current,isClearable:true,singleSelection:props.singleSelect?{asPlainText:true}:false}))}var ForceMerge_components_IndexSelect=IndexSelect_IndexSelect;const constants_DATA_STREAM_REGEX=/^.ds-(.*)-\d{6}$/;const constants_DEFAULT_SLICE="1";const utils_constants_DEFAULT_QUERY=JSON.stringify({query:{match_all:{}}},null,2);const utils_constants_REINDEX_ERROR_PROMPT={DEST_REQUIRED:"Destination is required.",SOURCE_REQUIRED:"Source is required.",HEALTH_RED:"health status is red.",SLICES_FORMAT_ERROR:"Must be an integer greater than or equal to 2."};const helper_parseIndexNames=indices=>{let indexArray=[];indices&&indices.split(",").forEach(index=>{if(constants_DATA_STREAM_REGEX.test(index)){let match=index.match(constants_DATA_STREAM_REGEX);indexArray.push(match?match[1]:index)}else{indexArray.push(index)}});return indexArray};const helper_getIndexOptions=async props=>{const{services:services,searchValue:searchValue,context:context}=props;let options=[];try{let actualSearchValue=helper_parseIndexNames(searchValue);const[indexResponse,dataStreamResponse,aliasResponse]=await Promise.all([services.indexService.getIndices({from:0,size:50,search:actualSearchValue.join(","),indices:[actualSearchValue.join(",")],sortDirection:"desc",sortField:"index",showDataStreams:true}),services.indexService.getDataStreams({search:searchValue.trim()}),services.indexService.getAliases({search:searchValue.trim()})]);if(indexResponse.ok){const indices=indexResponse.response.indices.map(index=>({label:index.index,value:{isIndex:true,status:index.status,health:index.health}}));options.push({label:"indices",options:indices})}else{context.notifications.toasts.addDanger(indexResponse.error)}if(dataStreamResponse&&dataStreamResponse.ok){const dataStreams=dataStreamResponse.response.dataStreams.map(ds=>({label:ds.name,health:ds.status.toLowerCase(),value:{isDataStream:true,indices:ds.indices.map(item=>item.index_name),writingIndex:ds.indices.map(item=>item.index_name).sort().reverse()[0]}}));options.push({label:"dataStreams",options:dataStreams})}if(aliasResponse&&aliasResponse.ok){const aliases=external_osdSharedDeps_Lodash_default.a.uniq(aliasResponse.response.aliases.map(alias=>alias.alias)).map(name=>{const indexBelongsToAlias=aliasResponse.response.aliases.filter(alias=>alias.alias===name).map(alias=>alias.index);let writingIndex=aliasResponse.response.aliases.filter(alias=>alias.alias===name&&alias.is_write_index==="true").map(alias=>alias.index);if(writingIndex.length===0&&indexBelongsToAlias.length===1){writingIndex=indexBelongsToAlias}return{label:name,value:{isAlias:true,indices:indexBelongsToAlias,writingIndex:writingIndex[0]}}});options.push({label:"aliases",options:aliases})}else{context.notifications.toasts.addDanger(aliasResponse.error)}}catch(err){context.notifications.toasts.addDanger(Object(helpers["d"])(err,"There was a problem fetching index options."))}return options};const checkNotReadOnlyIndexes=async props=>
6{const{services:services,indexes:indexes}=props;const result=await services.commonService.apiCaller({endpoint:"indices.getSettings",data:{flat_settings:true,index:indexes}});if(result.ok){const valueArray=Object.entries((result===null||result===void 0?void 0:result.response)||{});if(valueArray.length){return valueArray.filter(_ref=>{let[indexName,indexDetail]=_ref;let included=indexes.includes(indexName);if(!included){return false}return["index.blocks.read_only","index.blocks.read_only_allow_delete","index.blocks.write"].every(blockName=>{var _indexDetail$settings;return(indexDetail===null||indexDetail===void 0||(_indexDetail$settings=indexDetail.settings)===null||_indexDetail$settings===void 0?void 0:_indexDetail$settings[blockName])!=="true"})})}}return[]};function ForceMerge_extends(){return ForceMerge_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ForceMerge_extends.apply(null,arguments)}function ForceMergeWrapper(props){const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const context=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[advancedSettingsOpen,setAdvancedSettingsOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const[executing,setExecuting]=Object(external_osdSharedDeps_React_["useState"])(false);const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");const[useNewUX,setUseNewUX]=Object(external_osdSharedDeps_React_["useState"])(useNewUx);const[notReadOnlyIndexes,setNotReadOnlyIndexes]=Object(external_osdSharedDeps_React_["useState"])([]);const{indexes:indexes=""}=props.match.params;const destroyedRef=Object(external_osdSharedDeps_React_["useRef"])(false);const notificationRef=Object(external_osdSharedDeps_React_["useRef"])(null);const field=useField({values:{flush:true,indexes:indexes?indexes.split(","):[]}});const getIndexOptionsCachedRef=Object(external_osdSharedDeps_React_["useRef"])(searchValue=>helper_getIndexOptions({services:services,searchValue:searchValue,context:context}));useUpdateUrlWithDataSourceProperties();const onCancel=()=>{props.history.push(constants["D"].INDICES)};const onClickAction=async()=>{const{errors:errors,values:values}=await field.validatePromise();if(advancedSettingsOpen){var _notificationRef$curr;const notificationResult=await((_notificationRef$curr=notificationRef.current)===null||_notificationRef$curr===void 0?void 0:_notificationRef$curr.validatePromise());if(notificationResult!==null&¬ificationResult!==void 0&¬ificationResult.errors){return}}if(errors){const errorsKey=Object.keys(errors);if(errorsKey.includes("max_num_segments")){setAdvancedSettingsOpen(true)}return}setExecuting(true);const{indexes:indexes,...others}=values;const result=await services.commonService.apiCaller({endpoint:"transport.request",data:{path:`/${indexes.join(",")}/_forcemerge?wait_for_completion=false`,method:"POST",body:others}});if(result&&result.ok){var _result$response2;const toast=`Successfully started force merging ${indexes.join(", ")}.`;const toastInstance=context.notifications.toasts.addSuccess(toast,{toastLifeTimeMs:1e3*60*60*24*5});if(advancedSettingsOpen){var _notificationRef$curr2,_result$response;(_notificationRef$curr2=notificationRef.current)===null||_notificationRef$curr2===void 0||_notificationRef$curr2.associateWithTask({taskId:(_result$response=result.response)===null||_result$response===void 0?void 0:_result$response.task})}const clusterInfo=await Object(helpers["c"])({commonService:services.commonService});await JobSchedulerContext["a"].addJob({type:JobScheduler["b"].FORCE_MERGE,extras:{clusterInfo:clusterInfo,toastId:toastInstance.id,sourceIndex:indexes,taskId:(_result$response2=result.response)===null||_result$response2===void 0?void 0:_result$response2.task},interval:3e4});props.history.push(constants["D"].INDICES)}else{context.notifications.toasts.addDanger(result.error)}if(destroyedRef.current){return}setExecuting(false)};const advanceTitle=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"none",justifyContent:"flexStart",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{iconType:advancedSettingsOpen?"arrowDown":"arrowRight",color:"text","data-test-subj":"advanceOptionToggle",onClick:()=>{setAdvancedSettingsOpen(!advancedSettingsOpen)},"aria-label":"drop down icon"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Advanced settings"))));Object(external_osdSharedDeps_React_["useEffect"])(()=>{let breadCrumbs=useNewUX?[constants["f"].INDICES,{...constants["f"].FORCE_MERGE,href:`#${props.location.pathname}`}]:[constants["f"].INDEX_MANAGEMENT,constants["f"].INDICES,{...constants["f"].FORCE_MERGE,href:`#${props.location.pathname}`}];context.chrome.setBreadcrumbs(breadCrumbs);return()=>
6{destroyedRef.current=true}},[]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{checkNotReadOnlyIndexes({services:services,indexes:field.getValue("indexes")}).then(result=>{setNotReadOnlyIndexes(result)})},[field.getValue("indexes")]);const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{renderComponent:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued"},"Manually merge shards of indexes or backing indexes of data streams. You can also use force merge to clear up deleted documents within indexes.")}];const padding_style=useNewUX?{padding:"0px 0px"}:{padding:"0px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:padding_style},useNewUX&&external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}),!useNewUX&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Force merge")),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,helpText:"Manually merge shards of indexes or backing indexes of data streams. You can also use force merge to clear up deleted documents within indexes."},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"xs",alignItems:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Configure source index"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,"Select source indexes or data streams")),isInvalid:!!field.getError("indexes"),error:field.getError("indexes"),fullWidth:true,helpText:"Select one or more indexes or data streams you want to force merge."},external_osdSharedDeps_React_default.a.createElement(ForceMerge_components_IndexSelect,ForceMerge_extends({"data-test-subj":"sourceSelector",placeholder:"Select indexes or data streams",getIndexOptions:getIndexOptionsCachedRef.current},field.registerField({name:"indexes",rules:[{validator(rule,value){if(!value||!value.length){return Promise.reject("Index or data stream is required.")}else{return Promise.resolve("")}}}]}),{singleSelect:false}))),notReadOnlyIndexes.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{color:"warning",title:"We recommend force merge with read-only indexes"},notReadOnlyIndexes.map(item=>item[0]).join(", ")," is not a read-only index. We recommend only performing force merge with read-only indexes to pervent large segments being produced.")):null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{title:advanceTitle,noExtraPadding:true,titleSize:"s"},advancedSettingsOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(components_ForceMergeAdvancedOptions,{field:field}),external_osdSharedDeps_React_default.a.createElement(containers_NotificationConfig,{ref:notificationRef,actionType:ActionType.FORCEMERGE}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"flexEnd",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:onCancel,"data-test-subj":"reindexCancelButton"},"Cancel")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:onCl
6ickAction,isLoading:executing,"data-test-subj":"forceMergeConfirmButton"},"Force merge"))))}var ForceMerge=ForceMergeWrapper;var pages_ForceMerge=ForceMerge;var containers_Notifications=__webpack_require__(597);function Notifications_extends(){return Notifications_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Notifications_extends.apply(null,arguments)}const Notifications_Notifications=props=>{const services=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const coreServices=Object(external_osdSharedDeps_React_["useContext"])(core_services["b"]);const[,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const[submitClicked,setSubmitClicked]=Object(external_osdSharedDeps_React_["useState"])(false);const[noPermission,setNoPermission]=Object(external_osdSharedDeps_React_["useState"])(false);const[permissionForUpdate,setPermissionForUpdate]=Object(external_osdSharedDeps_React_["useState"])(false);const uiSettings=Object(Services["e"])();const useNewUX=uiSettings.get("home:useNewHomePage");const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const field=useField({values:{},onBeforeChange(name){const previousValue=field.getValues();if(Array.isArray(name)&&name.length===3&&parseInt(name[1])>0){const[dataSourceStr,index]=name;const newProperty=[dataSourceStr,index,FieldEnum.channels];if((name[2]===FieldEnum.success||name[2]===FieldEnum.failure)&&!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,[dataSourceStr,index,FieldEnum.success])&&!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,[dataSourceStr,index,FieldEnum.failure])&&(!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,newProperty)||!Object(external_osdSharedDeps_Lodash_["get"])(previousValue,newProperty).length)){field.setValue(newProperty,field.getValue([dataSourceStr,`${parseInt(index)-1}`,FieldEnum.channels]))}}},onChange(name,value){if((name[2]===FieldEnum.success||name[2]===FieldEnum.failure)&&!value){field.validatePromise()}}});const destroyRef=Object(external_osdSharedDeps_React_["useRef"])(false);const onSubmit=async()=>{if(!permissionForUpdate){coreServices.notifications.toasts.addDanger({title:"You do not have permissions to update notification settings",text:"Contact your administrator to request permissions."});return await new Promise(resolve=>setTimeout(()=>resolve(undefined),0))}const{errors:errors,values:notifications}=await field.validatePromise()||{};setSubmitClicked(!!errors);if(errors){return}setIsLoading(true);const result=await submitNotifications({commonService:services.commonService,plainConfigsPayload:(notifications.dataSource||[]).map(item=>{if(!item.success&&!item.failure){return{...item,channels:[]}}return item})});if(result&&result.ok){coreServices.notifications.toasts.addSuccess("Notifications settings for index operations have been successfully updated.");reloadNotifications()}else{coreServices.notifications.toasts.addDanger(result.error)}if(destroyRef.current){return}setIsLoading(false)};const reloadNotifications=()=>{setIsLoading(true);getNotifications({commonService:services.commonService}).then(res=>{if(res.ok){const plainList=transformConfigListToPlainList(res.response.lron_configs.map(item=>item.lron_config));const values={dataSource:plainList};Object(external_osdSharedDeps_ReactDom_["unstable_batchedUpdates"])(()=>{field.resetValues(values);field.setOriginalValues(JSON.parse(JSON.stringify(values)))})}else{var _res$body;if((res===null||res===void 0||(_res$body=res.body)===null||_res$body===void 0?void 0:_res$body.status)===403){setNoPermission(true);coreServices.notifications.toasts.addDanger({title:"You do not have permissions to view notification settings",text:"Contact your administrator to request permissions."});return}coreServices.notifications.toasts.addDanger(res.error)}}).finally(()=>{if(!destroyRef.current){setIsLoading(false)}})};const onCancel=()=>{field.resetValues(field.getOriginalValues())};Object(external_osdSharedDeps_React_["useEffect"])(()=>{const breadCrumbs=useNewUX?[constants["f"].INDEX_NOTIFICATION_SETTINGS]:[constants["f"].INDEX_MANAGEMENT,constants["f"].NOTIFICATION_SETTINGS];coreServices.chrome.setBreadcrumbs(breadCrumbs);reloadNotifications();checkPermissionForSubmitLRONConfig({services:services}).then(result=>setPermissionForUpdate(result));return()=>
6{destroyRef.current=true}},[]);const values=field.getValues();const allErrors=Object.entries(field.getErrors());const descriptionData=[{description:"Configure the default notification settings on index operation statuses, such as failed or completed. You can configure additional notification settings while performing an index operation."}];const controlsData=[{id:"Manage channels",label:"Manage channels",href:"notifications-dashboards#/channels",target:"_blank",controlType:"button",display:"base",iconType:"popout",iconSide:"right",fill:true}];return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useNewUX&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:controlsData}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData})),!useNewUX&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h1",null,"Notification settings")),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,"Configure the default notification settings on index operation statuses, such as failed or completed. You can configure additional notification settings while performing an index operation.")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{iconType:"popout",href:"notifications-dashboards#/channels",target:"_blank",iconSide:"right"},"Manage channels"))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null)),noPermission?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{iconType:"alert",iconColor:"danger",title:external_osdSharedDeps_React_default.a.createElement("h2",null,"Error loading Notification settings"),body:external_osdSharedDeps_React_default.a.createElement("p",null,"You do not have permissions to view Notification settings. Contact your administrator to request permissions.")})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,"Defaults for index operations")),submitClicked&&allErrors.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{iconType:"iInCircle",color:"danger",title:"Address the following error(s) in the form"},external_osdSharedDeps_React_default.a.createElement("ul",null,allErrors.reduce((total,_ref)=>{let[key,errors]=_ref;const pattern=/^dataSource\.(\d+)\.(\w+)$/;const matchResult=key.match(pattern);if(matchResult){const index=matchResult[1];const itemField=matchResult[2];const notificationItem=(field.getValues().dataSource||[])[parseInt(index,10)];const errorMessagePrefix=`${notificationItem.title} â ${FieldMapLabel[itemField]}: `;return[...total,...(errors||[]).map(item=>external_osdSharedDeps_React_default.a.createElement("li",{key:`${errorMessagePrefix}${item}`,className:"ISM-notifications-first-letter-uppercase"},errorMessagePrefix,item))]}return total},[]))):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),(values.dataSource||[]).map(record=>{const{value:value,onChange:onChange,...others}=field.registerField({name:["dataSource",`${record.index}`,FieldEnum.channels],rules:[{validator(rule,value){var _values$dataSource;const values=field.getValues();const item=(_values$dataSource=values.dataSource)===null||_values$dataSource===void 0?void 0:_values$dataSource[re
6cord.index];if(item!==null&&item!==void 0&&item[FieldEnum.failure]||item!==null&&item!==void 0&&item[FieldEnum.success]){if(!value||!value.length){return Promise.reject(VALIDATE_ERROR_FOR_CHANNELS)}}return Promise.resolve("")}}]});return external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",{className:"ISM-notifications-first-letter-uppercase"},record.title)),helpText:ActionTypeMapDescription[getKeyByValue(ActionTypeMapTitle,record.title)],direction:"hoz",key:record.action_name},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:LABEL_FOR_CONDITION},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"flexStart"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,Notifications_extends({},field.registerField({name:["dataSource",`${record.index}`,FieldEnum.failure]}),{"data-test-subj":["dataSource",`${record.index}`,FieldEnum.failure].join("."),label:"Has failed"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(built_in_components.CheckBox,Notifications_extends({},field.registerField({name:["dataSource",`${record.index}`,FieldEnum.success]}),{"data-test-subj":["dataSource",`${record.index}`,FieldEnum.success].join("."),label:"Has completed"}))))),field.getValue(["dataSource",`${record.index}`,FieldEnum.failure])||field.getValue(["dataSource",`${record.index}`,FieldEnum.success])?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(CustomFormRow["b"],{label:FieldMapLabel[FieldEnum.channels],isInvalid:!!field.getError(["dataSource",`${record.index}`,FieldEnum.channels]),error:field.getError(["dataSource",`${record.index}`,FieldEnum.channels]),"data-test-subj":["dataSource",`${record.index}`,FieldEnum.channels].join(".")},external_osdSharedDeps_React_default.a.createElement(containers_ChannelSelect,Notifications_extends({},others,{value:value,onChange:onChange})))):null))})),Object(helpers["a"])(getDiffableMapFromPlainList(values.dataSource||[]),getDiffableMapFromPlainList(field.getOriginalValues().dataSource||[]))?external_osdSharedDeps_React_default.a.createElement(components_UnsavedChangesBottomBar,{unsavedCount:Object(helpers["a"])(getDiffableMapFromPlainList(values.dataSource||[]),getDiffableMapFromPlainList(field.getOriginalValues().dataSource||[])),formErrorsCount:allErrors.length,onClickSubmit:onSubmit,onClickCancel:onCancel,submitButtonDataTestSubj:"submitNotifcationSettings"}):null)};var containers_Notifications_Notifications=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);return external_osdSharedDeps_React_default.a.createElement(Notifications_Notifications,Notifications_extends({},props,{key:dataSourceMenuProps.dataSourceId}))};var Notifications_containers_Notifications=containers_Notifications_Notifications;var pages_Notifications=Notifications_containers_Notifications;const ComposableTemplates_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS=[5,10,20,50];const ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS={from:"0",size:"20",search:"",sortField:"name",sortDirection:constants["I"].DESC,dataSourceId:""};
6function components_IndexControls_IndexControls_SearchControls(props){const[state,setState]=Object(external_osdSharedDeps_React_["useState"])(props.value);const onChange=(field,value)=>{const payload={...state,[field]:value};setState(payload);props.onSearchChange(payload)};Object(external_osdSharedDeps_React_["useEffect"])(()=>{setState(props.value)},[props.value]);const paddingStyle=props.useNewUx?{padding:"0px 0px"}:{padding:"0px 5px"};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",alignItems:"center",style:paddingStyle},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFieldSearch"],{autoFocus:true,fullWidth:true,placeholder:"Search...",value:state.search,onChange:e=>onChange("search",e.target.value)})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:{flexBasis:"100px"},grow:false},external_osdSharedDeps_React_default.a.createElement(FilterGroup,{filterButtonProps:{children:"Types"},onChange:val=>onChange("selectedTypes",val||[]),value:state.selectedTypes,options:[{label:constants["w"].alias},{label:constants["w"].mappings},{label:constants["w"].settings}]})))}var ComposableTemplates_components_IndexControls=components_IndexControls_IndexControls_SearchControl
6s;var containers_ComposableTemplates=__webpack_require__(610);function ComposableTemplates_extends(){return ComposableTemplates_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ComposableTemplates_extends.apply(null,arguments)}function ComposableTemplates_defineProperty(e,r,t){return(r=ComposableTemplates_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ComposableTemplates_toPropertyKey(t){var i=ComposableTemplates_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ComposableTemplates_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ComposableTemplates_defaultFilter={search:ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.search};class ComposableTemplates_ComposableTemplates extends components_MDSEnabledComponent{constructor(props){super(props);ComposableTemplates_defineProperty(this,"getComposableTemplates",void 0);ComposableTemplates_defineProperty(this,"getQueryState",state=>Object.keys(ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS).reduce((total,key)=>({...total,[key]:state[key]}),{}));ComposableTemplates_defineProperty(this,"getComposableTemplatesOriginal",async()=>{this.setState({loading:true});const{search:search}=this.state;const{history:history,commonService:commonService}=this.props;const queryObject=this.getQueryState(this.state);const queryParamsString=query_string_default.a.stringify(queryObject);history.replace({...this.props.location,search:queryParamsString});const allComposableTemplatesResponse=await commonService.apiCaller({endpoint:"transport.request",data:{method:"GET",path:`/_component_template/*${search}*`},hideLog:true});let listResponse=[];if(!allComposableTemplatesResponse.ok){listResponse=[];if(allComposableTemplatesResponse.error!=="Not Found"){this.context.notifications.toasts.addDanger(allComposableTemplatesResponse.error)}}else{listResponse=allComposableTemplatesResponse.response.component_templates||[]}const payload={composableTemplates:listResponse,totalComposableTemplates:listResponse.length,selectedItems:this.state.selectedItems.map(item=>listResponse.find(remoteItem=>remoteItem.name===item.name)).filter(item=>item)};this.setState({...payload,loading:false})});ComposableTemplates_defineProperty(this,"onTableChange",_ref=>{let{page:tablePage,sort:sort}=_ref;const{index:page,size:size}=tablePage||{};const{field:sortField,direction:sortDirection}=sort||{};this.setState({from:""+page,size:""+size,sortField:sortField||ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:sortDirection},()=>this.getComposableTemplates())});ComposableTemplates_defineProperty(this,"onSelectionChange",selectedItems=>{this.setState({selectedItems:selectedItems})});ComposableTemplates_defineProperty(this,"onSearchChange",params=>{this.setState({from:"0",...params},()=>this.getComposableTemplates())});ComposableTemplates_defineProperty(this,"onClickCreate",()=>{this.props.history.push(constants["D"].CREATE_COMPOSABLE_TEMPLATE)});ComposableTemplates_defineProperty(this,"getFinalItems",allTemplates=>{const{from:from,size:size,sortDirection:sortDirection,sortField:sortField,selectedTypes:selectedTypes}=this.state;const fromNumber=Number(from);const sizeNumber=Number(size);const componentMapTemplate=this.props.componentMapTemplate;let listResponse=(allTemplates||[]).map(item=>({...item,usedBy:componentMapTemplate[item.name]||[],associatedCount:(componentMapTemplate[item.name]||[]).length}));listResponse=listResponse.sort((a,b)=>{if(sortDirection==="asc"){if(Object(external_osdSharedDeps_Lodash_["get"])(a,sortField,0)<Object(external_osdSharedDeps_Lodash_["get"])(b,sortField,0)){return-1}return 1}else{if(Object(external_osdSharedDeps_Lodash_["get"])(a,sortField,0)>Object(external_osdSharedDeps_Lodash_["get"])(b,sortField,0)){return-1}return 1}});listResponse=listResponse.filter(item=>{if(!selectedTypes.length){return true}return selectedTypes.every(type=>!!item.component_template.template[type])});return listResponse.slice(fromNumber*sizeNumber,(fromNumber+1)*sizeNumber)});const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");const{from:_from=ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.from,size:_size=ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.size,search:_search=ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.search,sortField:_sortField=ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.sortField,sortDirection:_sortDirection=ComposableTemplates_utils_constants_DEFAULT_QUERY_PARAMS.sortDirection}=query_string_default.a.parse(props.history.location.search);this.state={...ComposableTemplates_defaultFilter,...this.state,totalComposableTemplates:0,from:_from,size:_size,search:_search,sortField:_sortField,sortDirection:_sortDirection,selectedItems:[],composableTemplates:[],loading:false,selectedTypes:[],useNewUX:useNewUx};this.getComposableTemplates=Object(external_osdSharedDeps_Lodash_["debounce"])(this.getComposableTemplatesOriginal,500,{leading:true})}async componentDidUpdate(prevProps,prevState){const prevQuery=this.getQueryState(prevState);const currQuery=this.getQueryState(this.state);if(!external_osdSharedDeps_Lodash_default.a.isEqual(prevQuery,currQuery)){await this.getComposableTemplates()}}componentDidMount(){this.state.useNewUX?this.context.chrome.setBreadcrumbs([constants["f"].COMPOSABLE_TEMPLATES]):this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].TE
6MPLATES]);this.getComposableTemplates()}render(){const{totalComposableTemplates:totalComposableTemplates,from:from,size:size,sortField:sortField,sortDirection:sortDirection,composableTemplates:composableTemplates,loading:loading,useNewUX:useNewUX}=this.state;const pagination={pageIndex:Number(from),pageSize:Number(size),pageSizeOptions:ComposableTemplates_utils_constants_DEFAULT_PAGE_SIZE_OPTIONS,totalItemCount:Number(totalComposableTemplates)};const sorting={sort:{direction:sortDirection,field:sortField}};const selection={onSelectionChange:this.onSelectionChange};const contentPanelActions=[{text:"",children:external_osdSharedDeps_React_default.a.createElement(ComposableTemplatesAction,{selectedItems:this.state.selectedItems.map(item=>item.name),onDelete:this.getComposableTemplates})},{text:"Create component template",buttonProps:{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_COMPOSABLE_TEMPLATE)}}}];const contentPanelTitle=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],null,external_osdSharedDeps_React_default.a.createElement("span",null,"Component templates")),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCompressedFormRow"],{fullWidth:true,helpText:external_osdSharedDeps_React_default.a.createElement("div",null,"Component templates are reusable building blocks for composing index or data stream templates. You can define component templates with common index configurations and associate them to an index template."," ",external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{external:true,target:"_blank",href:this.context.docLinks.links.opensearch.indexTemplates.composable},"Learn more"))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null)));const tableColums=[{field:"name",name:"Name",sortable:true,render:value=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Link"],{to:`${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/${value}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{"data-test-subj":`templateDetail-${value}`},value))},{field:"templateTypes",name:"Type",truncateText:true,textOnly:false,render:(value,record)=>external_osdSharedDeps_React_default.a.createElement(components_ComponentTemplateBadge,{template:record.component_template.template})},{field:"component_template._meta.description",name:"Description",sortable:true,render:(value,record)=>{var _record$component_tem;return((_record$component_tem=record.component_template._meta)===null||_record$component_tem===void 0?void 0:_record$component_tem.description)||"-"}},{field:"associatedCount",name:"Associated index templates",sortable:true,align:"right"},{field:"actions",name:"Actions",align:"right",actions:[{render:record=>external_osdSharedDeps_React_default.a.createElement(containers_AssociatedTemplatesModal,{componentTemplate:record.name,onUnlink:()=>this.getComposableTemplates(),renderProps:_ref2=>{let{setVisible:setVisible}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"View associated index templates"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":"View associated index templates",iconType:"kqlSelector","data-test-subj":`ViewAssociatedIndexTemplates-${record.name}`,onClick:()=>setVisible(true),className:"icon-hover-info"}))}})},{render:record=>external_osdSharedDeps_React_default.a.createElement(ComposableTemplatesDeleteAction,{selectedItems:[record.name],onDelete:()=>{this.getComposableTemplates()},renderDeleteButton:_ref3=>{let{triggerDelete:triggerDelete}=_ref3;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:"Delete component template"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonIcon"],{"aria-label":"Delete component template",color:"danger",iconType:"trash",onClick:triggerDelete,className:"icon-hover-danger","data-test-subj":`DeleteComponentTemplate-${record.name}`}))}})}]}];const{HeaderControl:HeaderControl}=Object(Services["d"])();const{setAppRightControls:setAppRightControls,setAppDescriptionControls:setAppDescriptionControls}=Object(Services["c"])();const descriptionData=[{description:"Component templates are reusable building blocks for c
6omposing index or data stream templates. You can define component templates with common index configurations and associate them to an index template.",links:{label:"Learn more",href:this.context.docLinks.links.opensearch.indexTemplates.composable,iconType:"popout",iconSide:"right",controlType:"link",target:"_blank",flush:"both"}}];return useNewUX?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppRightControls,controls:[{id:"Create component template",label:"Create component template",iconType:"plus",fill:true,testId:"createButton",controlType:"button",run:this.onClickCreate}]}),external_osdSharedDeps_React_default.a.createElement(HeaderControl,{setMountPoint:setAppDescriptionControls,controls:descriptionData}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],null,external_osdSharedDeps_React_default.a.createElement(ComposableTemplates_components_IndexControls,{value:{search:this.state.search,selectedTypes:this.state.selectedTypes},onSearchChange:this.onSearchChange,useNewUx:useNewUX}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{className:"ISM-component-templates-table","data-test-subj":"templatesTable",loading:this.state.loading||this.props.loading,columns:tableColums,isSelectable:!useNewUX,itemId:"name",items:this.getFinalItems(composableTemplates),onChange:this.onTableChange,pagination:pagination,selection:useNewUX?undefined:selection,sorting:sorting,noItemsMessage:loading?undefined:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search},ComposableTemplates_defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",null,"You have no templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_COMPOSABLE_TEMPLATE)},"data-test-subj":"CreateComponentTemplateWhenNoTemplateFound",iconType:"plus"},"Create component template")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",null,"There are no templates matching your applied filters. Reset your filters to view your templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.setState(ComposableTemplates_defaultFilter,()=>{this.getComposableTemplates()})}},"Reset filters")]})}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanel,{actions:external_osdSharedDeps_React_default.a.createElement(ContentPanel_ContentPanelActions,{actions:contentPanelActions}
6),bodyStyles:useNewUX?{}:{padding:"initial"},title:contentPanelTitle},external_osdSharedDeps_React_default.a.createElement(ComposableTemplates_components_IndexControls,{value:{search:this.state.search,selectedTypes:this.state.selectedTypes},onSearchChange:this.onSearchChange,useNewUx:useNewUX}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{className:"ISM-component-templates-table","data-test-subj":"templatesTable",loading:this.state.loading||this.props.loading,columns:tableColums,isSelectable:!useNewUX,itemId:"name",items:this.getFinalItems(composableTemplates),onChange:this.onTableChange,pagination:pagination,selection:useNewUX?undefined:selection,sorting:sorting,noItemsMessage:loading?undefined:Object(external_osdSharedDeps_Lodash_["isEqual"])({search:this.state.search},ComposableTemplates_defaultFilter)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",null,"You have no templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.props.history.push(constants["D"].CREATE_COMPOSABLE_TEMPLATE)},"data-test-subj":"CreateComponentTemplateWhenNoTemplateFound"},"Create component template")]}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,external_osdSharedDeps_React_default.a.createElement("p",null,"There are no templates matching your applied filters. Reset your filters to view your templates.")),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{fill:true,onClick:()=>{this.setState(ComposableTemplates_defaultFilter,()=>{this.getComposableTemplates()})}},"Reset filters")]})})))}}ComposableTemplates_defineProperty(ComposableTemplates_ComposableTemplates,"contextType",core_services["b"]);function ComposableTemplatesContainer(props){const context=Object(external_osdSharedDeps_React_["useContext"])(public_services["h"]);const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);const{componentMapTemplate:componentMapTemplate,loading:loading}=useComponentMapTemplate();return external_osdSharedDeps_React_default.a.createElement(ComposableTemplates_ComposableTemplates,ComposableTemplates_extends({},props,{loading:loading,componentMapTemplate:componentMapTemplate,commonService:context===null||context===void 0?void 0:context.commonService},dataSourceMenuProps))}var ComposableTemplates_containers_ComposableTemplates=ComposableTemplatesContainer;var pages_ComposableTemplates=ComposableTemplates_containers_ComposableTemplates;function CreateComposableTemplate_extends(){return CreateComposableTemplate_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},CreateComposableTemplate_extends.apply(null,arguments)}function CreateComposableTemplate_defineProperty(e,r,t){return(r=CreateComposableTemplate_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function CreateComposableTemplate_toPropertyKey(t){var i=CreateComposableTemplate_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function CreateComposableTemplate_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class CreateComposableTemplate_CreateComposableTemplate extends external_osdSharedDeps_React_["Component"]{constructor(){super(...arguments);CreateComposableTemplate_defineProperty(this,"componentDidMount",async()=>{this.setBreadCrumb()});CreateComposableTemplate_defineProperty(this,"onCancel",()=>{this.props.history.push(constants["D"].COMPOSABLE_TEMPLATES)})}get template(){return this.props.match.params.template}get readonly(){return this.props.match.params.mode==="readonly"}get useNewUX(){const uiSettings=Object(Services["e"])();const useNewUx=uiSettings.get("home:useNewHomePage");return useNewUx}setBreadCrumb(){const isEdit=this.template;const readonly=this.readonly;const useNewUx=this.useNewUX;let lastBread;if(readonly&&this.template){lastBread={text:this.template,href:`#${this.props.location.pathname}`}}else if(isEdit){lastBread={text:this.template,href:`#${this.props.location.pathname}`}}else{lastBread=constants["f"].CREATE_COMPOSABLE_TEMPLATE}useNewUx?this.context.chrome.setBreadcrumbs([constants["f"].COMPOSABLE_TEMPLATES,lastBread]):this.context.chrome.setBreadcrumbs([constants["f"].INDEX_MANAGEMENT,constants["f"].COMPOSABLE_TEMPLATES,lastBread])}componentDidUpdate(prevProps){if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(prevProps,this.props)){this.setBreadCrumb()}}render(){const useNewUx=this.useNewUX;const paddingStyle=useNewUx?{padding:"0px 0px"}:{padding:"0px 50px"};return external_osdSharedDeps_React_default.a.createElement("div",{style:paddingStyle},external_osdSharedDeps_React_default.a.createElement(containers_TemplateDetail,{history:this.props.history,readonly:this.readonly,templateName:this.template,onCancel:this.onCancel,onSubmitSuccess:()=>this.props.history.push(constants["D"].COMPOSABLE_TEMPLATES),dataSourceId:this.props.dataSourceId,useNewUX:useNewUx}))}}CreateComposableTemplate_defineProperty(CreateComposableTemplate_CreateComposableTemplate,"contextType",core_services["b"]);var containers_CreateComposableTemplate_CreateComposableTemplate=function(props){const dataSourceMenuProps=Object(external_osdSharedDeps_React_["useContext"])(DataSourceMenuContext);useUpdateUrlWithDataSourceProperties();return external_osdSharedDeps_React_default.a.createElement(CreateComposableTemplate_CreateComposableTemplate,CreateComposableTemplate_extends({},props,dataSourceMenuProps))};var containers_CreateComposableTemplate=containers_CreateComposableTemplate_CreateComposableTemplate;var pages_CreateComposableTemplate=containers_CreateComposableTemplate;var opensearch_dashboards=__webpack_require__(130);var external_osdSharedDeps_Rxjs_=__webpack_require__(10);var external_osdSharedDeps_OsdI18n_=__webpack_require__(5);function Main_extends(){return Main_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Main_extends.apply(null,arguments)}function Main_defineProperty(e,r,t){return(r=Main_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Main_toPropertyKey(t){var i=Main_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function Main_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Navigation=function(Navigation){Navigation["IndexManagement"]="Index Management";Navigation["IndexPolicies"]="State management policies";Navigation["ManagedIndices"]="Policy managed indexes";Navigation["Indices"]="Indexes";Navigation["Rollups"]="Rollup jobs";Navigation["Transforms"]="Transform jobs";Navigation["SnapshotManagement"]="Snapshot Management";Navigation["Snapshots"]="Snapshots";Navigation["SnapshotPolicies"]="Snapshot policies";Navigation["Repositories"]="Repositories";Navigation["Aliases"]="Aliases";Navigation["Templates"]="Templates";
6Navigation["DataStreams"]="Data streams";Navigation["CreateDataStream"]="Create data stream";Navigation["Notifications"]="Notification settings";Navigation["ComposableTemplates"]="Component templates";return Navigation}(Navigation||{});var Pathname=function(Pathname){Pathname["IndexPolicies"]="/index-policies";Pathname["ManagedIndices"]="/managed-indices";Pathname["Indices"]="/indices";Pathname["Rollups"]="/rollups";Pathname["Transforms"]="/transforms";Pathname["Snapshots"]="/snapshots";Pathname["SnapshotPolicies"]="/snapshot-policies";Pathname["Repositories"]="/repositories";return Pathname}(Pathname||{});const HIDDEN_NAV_ROUTES=[constants["D"].CREATE_ROLLUP,constants["D"].EDIT_ROLLUP,constants["D"].ROLLUP_DETAILS,constants["D"].CREATE_TRANSFORM,constants["D"].EDIT_TRANSFORM,constants["D"].TRANSFORM_DETAILS,constants["D"].CREATE_POLICY,constants["D"].EDIT_POLICY,constants["D"].POLICY_DETAILS,constants["D"].CHANGE_POLICY,constants["D"].SNAPSHOT_POLICY_DETAILS,constants["D"].CREATE_SNAPSHOT_POLICY,constants["D"].EDIT_SNAPSHOT_POLICY,constants["D"].REINDEX,constants["D"].CREATE_INDEX,constants["D"].CREATE_TEMPLATE,constants["D"].SPLIT_INDEX,constants["D"].SHRINK_INDEX,constants["D"].FORCE_MERGE,constants["D"].CREATE_DATA_STREAM];const HIDDEN_NAV_STARTS_WITH_ROUTE=[constants["D"].CREATE_TEMPLATE,constants["D"].INDEX_DETAIL,constants["D"].ROLLOVER,constants["D"].CREATE_DATA_STREAM,constants["D"].FORCE_MERGE,constants["D"].CREATE_COMPOSABLE_TEMPLATE];const dataSourceEnabledPaths=[constants["D"].CREATE_DATA_STREAM,constants["D"].CREATE_TEMPLATE,constants["D"].CREATE_COMPOSABLE_TEMPLATE,constants["D"].FORCE_MERGE,constants["D"].SPLIT_INDEX,constants["D"].ROLLOVER,constants["D"].INDEX_DETAIL,constants["D"].INDEX_POLICIES,constants["D"].MANAGED_INDICES,constants["D"].CREATE_POLICY,constants["D"].EDIT_POLICY,constants["D"].CHANGE_POLICY,constants["D"].POLICY_DETAILS,constants["D"].INDICES,constants["D"].CREATE_INDEX,constants["D"].ALIASES,constants["D"].DATA_STREAMS,constants["D"].TEMPLATES,constants["D"].CREATE_DATA_STREAM,constants["D"].CREATE_TEMPLATE,constants["D"].COMPOSABLE_TEMPLATES,constants["D"].CREATE_COMPOSABLE_TEMPLATE,constants["D"].REINDEX,constants["D"].ROLLUPS,constants["D"].CREATE_ROLLUP,constants["D"].EDIT_ROLLUP,constants["D"].ROLLUP_DETAILS,constants["D"].TRANSFORMS,constants["D"].CREATE_TRANSFORM,constants["D"].EDIT_TRANSFORM,constants["D"].TRANSFORM_DETAILS,constants["D"].SNAPSHOT_POLICIES,constants["D"].SNAPSHOT_POLICY_DETAILS,constants["D"].CREATE_SNAPSHOT_POLICY,constants["D"].EDIT_SNAPSHOT_POLICY,constants["D"].SNAPSHOTS,constants["D"].CREATE_SNAPSHOT,constants["D"].EDIT_SNAPSHOT,constants["D"].REPOSITORIES,constants["D"].CREATE_REPOSITORY,constants["D"].EDIT_REPOSITORY,constants["D"].NOTIFICATIONS,constants["D"].SHRINK_INDEX];const LocalCluster={label:external_osdSharedDeps_OsdI18n_["i18n"].translate("dataSource.localCluster",{defaultMessage:"Local cluster"}),id:"Local"};const dataSourceObservable=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](LocalCluster);class Main_Main extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);Main_defineProperty(this,"setDataSourceReadOnly",readonly=>{this.setState({dataSourceReadOnly:readonly})});Main_defineProperty(this,"onSelectedDataSources",dataSources=>{if(dataSources.length==0){return}const{id:id="",label:label=""}=dataSources[0]||{};if(this.state.dataSourceId!==id||this.state.dataSourceLabel!==label){this.setState({dataSourceId:id,dataSourceLabel:label});dataSourceObservable.next({id:id,label:label})}if(this.state.dataSourceLoading){this.setState({dataSourceLoading:false})}});Main_defineProperty(this,"dataSourceFilterFn",dataSource=>{var _dataSource$attribute,_dataSource$attribute2;const engineVersion=(dataSource===null||dataSource===void 0||(_dataSource$attribute=dataSource.attributes)===null||_dataSource$attribute===void 0?void 0:_dataSource$attribute.dataSourceVersion)||"";const availablePlugins=(dataSource===null||dataSource===void 0||(_dataSource$attribute2=dataSource.attributes)===null||_dataSource$attribute2===void 0?void 0:_dataSource$attribute2.installedPlugins)||[];
6return semver_default.a.satisfies(engineVersion,opensearch_dashboards["b"])&&opensearch_dashboards["a"].every(plugin=>availablePlugins.includes(plugin))});let dataSourceId="";let dataSourceLabel="";if(props.multiDataSourceEnabled){const{dataSourceId:parsedDataSourceId,dataSourceLabel:parsedDataSourceLabel}=query_string_default.a.parse(this.props.location.search);dataSourceId=parsedDataSourceId;dataSourceLabel=parsedDataSourceLabel||"";if(dataSourceId){dataSourceObservable.next({id:dataSourceId,label:dataSourceLabel})}}this.state={dataSourceId:dataSourceId,dataSourceLabel:dataSourceLabel,dataSourceReadOnly:false,dataSourceLoading:dataSourceId===undefined||dataSourceId==="Local"?props.multiDataSourceEnabled:false}}isDataSourceEnabledForPath(path){return dataSourceEnabledPaths.some(dataSourceEnabledPath=>path.startsWith(dataSourceEnabledPath))}getServices(http){const{location:{pathname:pathname}}=this.props;const indexService=new public_services["b"](http);const managedIndexService=new public_services["c"](http);const policyService=new public_services["e"](http);const rollupService=new public_services["f"](http);const transformService=new public_services["j"](http);const notificationService=new public_services["d"](http);const snapshotManagementService=new public_services["i"](http);const commonService=new public_services["a"](http);const services={indexService:indexService,managedIndexService:managedIndexService,policyService:policyService,rollupService:rollupService,transformService:transformService,notificationService:notificationService,snapshotManagementService:snapshotManagementService,commonService:commonService};if(this.props.multiDataSourceEnabled&&this.isDataSourceEnabledForPath(pathname)){services.indexService=new public_services["b"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.commonService=new public_services["a"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.managedIndexService=new public_services["c"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.policyService=new public_services["e"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.notificationService=new public_services["d"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.rollupService=new public_services["f"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.transformService=new public_services["j"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled);services.snapshotManagementService=new public_services["i"](http,this.state.dataSourceId,this.props.multiDataSourceEnabled)}return services}render(){var _this$props$dataSourc,_this$props$dataSourc2;const{location:{pathname:pathname}}=this.props;const sideNav=[{name:Navigation.IndexManagement,id:0,href:`#${Pathname.IndexPolicies}`,items:[{name:Navigation.IndexPolicies,id:1,href:`#${Pathname.IndexPolicies}`,isSelected:pathname===Pathname.IndexPolicies},{name:Navigation.ManagedIndices,id:2,href:`#${Pathname.ManagedIndices}`,isSelected:pathname===Pathname.ManagedIndices},{name:Navigation.Indices,id:3,href:`#${Pathname.Indices}`,isSelected:[Pathname.Indices,constants["D"].CREATE_INDEX].includes(pathname)},{name:Navigation.DataStreams,id:8,href:`#${constants["D"].DATA_STREAMS}`,isSelected:constants["D"].DATA_STREAMS===pathname},{name:Navigation.Templates,id:7,href:`#${constants["D"].TEMPLATES}`,isSelected:constants["D"].TEMPLATES===pathname,items:[{name:Navigation.ComposableTemplates,id:9,href:`#${constants["D"].COMPOSABLE_TEMPLATES}`,isSelected:constants["D"].COMPOSABLE_TEMPLATES===pathname}]},{name:Navigation.Aliases,id:6,href:`#${constants["D"].ALIASES}`,isSelected:constants["D"].ALIASES===pathname},{name:Navigation.Rollups,id:4,href:`#${Pathname.Rollups}`,isSelected:pathname===Pathname.Rollups},{name:Navigation.Transforms,id:5,href:`#${Pathname.Transforms}`,isSelected:pathname===Pathname.Transforms},{name:Navigation.Notifications,id:10,href:`#${constants["D"].NOTIFICATIONS}`,isSelected:pathname===constants["D"].NOTIFICATIONS}]},{name:Navigation.SnapshotManagement,id:1,href:`#${Pathname.SnapshotPolicies}`,items:[{name:Navigation.SnapshotPolicies,id:1,href:`#${Pathname.SnapshotPolicies}`,isSelected:pathname===Pathname.SnapshotPolicies},{name:Navigation.Snapshots,id:2,href:`#${Pathname.Snapshots}`,isSelected:pathname===Pathname.Snapshots},{name:Navigation.Repositories,id:3,href:`#${Pathname.Repositories}`,isSelected:pathname===Pathname.Repositories}]}];const{landingPage:landingPage}=this.props;const uiSettings=Object(Services["e"])();const showActionsInHeader=uiSettings.get("home:useNewHomePage");const ROUTE_STYLE=showActionsInHeader?{padding:"0px 0px"}:{padding:"25px 25px"};const DataSourceMenu=(_this$props$dataSourc=this.props.dataSourceManagement)===null||_this$props$dataSourc===void 0||(_this$props$dataSourc=_this$props$dataSourc.ui)===null||_this$props$dataSourc===void 0?void 0:_this$props$dataSourc.getDataSourceMenu();const DataSourceViewer=(_this$props$dataSourc2=this.props.dataSourceManagement)===null||_this$props$dataSourc2===void 0||(_this$props$dataSourc2=_this$props$dataSourc2.ui)===null||_this$props$dataSourc2===void 0?void 0:_this$props$dataSourc2.getDataSourceMenu();const activeOption=this.state.dataSourceLoading?undefined:[{label:this.state.dataSourceLabel,id:this.state.dataSourceId}];return external_osdSharedDeps_React_default.a.createElement(core_services["a"],null,core=>core&&external_osdSharedDeps_React_default.a.createElement(public_services["h"].Provider,{value:this.getServices(core.http)},external_osdSharedDeps_React_default.a.createElement(public_services["g"],null,services=>services&&external_osdSharedDeps_React_default.a.createElement(Modal["c"],null,external_osdSharedDeps_React_default.a.createElement(DataSourceMenuContext.Provider,{value:{dataSourceId:this.state.dataSourceId,multiDataSourceEnabled:this.props.multiDataSourceEnabled}},this.props.multiDataSourceEnabled&&DataSourceMenu&&DataSourceViewer&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Switch"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:[constants["D"].CREATE_ROLLUP,constants["D"].CREATE_TRANSFORM],render:()=>this.state.dataSourceReadOnly?external_osdSharedDeps_React_default.a.createElement(DataSourceViewer,{setMenuMountPoint:this.props.setActionMenu,componentType:"DataSourceView",componentConfig:{activeOption:activeOption,fullWidth:false,dataSourceFilter:this.dataSourceFilterFn}}):external_osdSharedDeps_React_default.a.createElement(DataSourceMenu,{setMenuMountPoint:this.props.setActionMenu,componentType:"DataSourceSelectable",componentConfig:{savedObjects:core===null||core===void 0?void 0:core.savedObjects.client,notifications:core===null||core===void 0?void 0:core.notifications,fullWidth:false,activeOption:activeOption,onSelectedDataSources:this.onSelectedDataSources,dataSourceFilter:this.dataSourceFilterFn}})}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:[`${constants["D"].CREATE_DATA_STREAM}/:dataStream`,`${constants["D"].CREATE_TEMPLATE}/:template`,`${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/:composableTemplate`,constants["D"].FORCE_MERGE,constants["D"].SPLIT_INDEX,constants["D"].ROLLOVER,constants["D"].INDEX_DETAIL,constants["D"].EDIT_POLICY,constants["D"].POLICY_DETAILS,constants["D"].REINDEX,constants["D"].EDIT_ROLLUP,constants["D"].ROLLUP_DETAILS,constants["D"].TRANSFORM_DETAILS,constants["D"].EDIT_TRANSFORM,constants["D"].EDIT_SNAPSHOT_POLICY,constants["D"].SNAPSHOT_POLICY_DETAILS
6],render:()=>external_osdSharedDeps_React_default.a.createElement(DataSourceViewer,{setMenuMountPoint:this.props.setActionMenu,componentType:"DataSourceView",componentConfig:{activeOption:activeOption,fullWidth:false,dataSourceFilter:this.dataSourceFilterFn}})}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:[constants["D"].INDICES,constants["D"].CREATE_INDEX,constants["D"].ALIASES,constants["D"].DATA_STREAMS,constants["D"].TEMPLATES,constants["D"].CREATE_DATA_STREAM,constants["D"].CREATE_TEMPLATE,constants["D"].COMPOSABLE_TEMPLATES,constants["D"].CREATE_COMPOSABLE_TEMPLATE,constants["D"].MANAGED_INDICES,constants["D"].INDEX_POLICIES,constants["D"].CREATE_POLICY,constants["D"].CHANGE_POLICY,constants["D"].ROLLUPS,constants["D"].TRANSFORMS,constants["D"].SNAPSHOT_POLICIES,constants["D"].SNAPSHOT_POLICY_DETAILS,constants["D"].CREATE_SNAPSHOT_POLICY,constants["D"].EDIT_SNAPSHOT_POLICY,constants["D"].SNAPSHOTS,constants["D"].CREATE_SNAPSHOT,constants["D"].EDIT_SNAPSHOT,constants["D"].REPOSITORIES,constants["D"].CREATE_REPOSITORY,constants["D"].EDIT_REPOSITORY,constants["D"].NOTIFICATIONS,constants["D"].SHRINK_INDEX],render:()=>external_osdSharedDeps_React_default.a.createElement(DataSourceMenu,{setMenuMountPoint:this.props.setActionMenu,componentType:"DataSourceSelectable",componentConfig:{savedObjects:core===null||core===void 0?void 0:core.savedObjects.client,notifications:core===null||core===void 0?void 0:core.notifications,fullWidth:false,activeOption:activeOption,onSelectedDataSources:this.onSelectedDataSources,dataSourceFilter:this.dataSourceFilterFn}})}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Redirect"],{from:"/",to:landingPage})),!this.state.dataSourceLoading&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(Modal["d"],{services:services}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{restrictWidth:"100%"},!core.chrome.navGroup.getNavGroupEnabled()&&!HIDDEN_NAV_ROUTES.includes(pathname)&&!HIDDEN_NAV_STARTS_WITH_ROUTE.some(item=>pathname.startsWith(item))?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageSideBar"],{style:{minWidth:200}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSideNav"],{style:{width:200},items:sideNav})):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Switch"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].SNAPSHOTS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Snapshots,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService,indexService:services.indexService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].REPOSITORIES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Repositories,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].SNAPSHOT_POLICIES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_SnapshotPolicies,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].SNAPSHOT_POLICY_DETAILS,render:props=>external_osdSharedDeps_React_default.a.createElement(pages_SnapshotPolicyDetails,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService,notificationService:services.notificationService}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_SNAPSHOT_POLICY,render:props=>external_osdSharedDeps_React_default.a.createElement(pages_CreateSnapshotPolicy,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService,notificationService:services.notificationService,indexService:services.indexService,isEdit:false}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].EDIT_SNAPSHOT_POLICY,render:props=>external_osdSharedDeps_React_default.a.createElement(pages_CreateSnapshotPolicy,Main_extends({},props,{snapshotManagementService:services.snapshotManagementService,notificationService:services.notificationService,indexService:services.indexService,isEdit:true}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CHANGE_POLICY,render:props=>external_osdSharedDeps_React_default.a.createElement(pages_ChangePolicy,Main_extends({},props,{managedIndexService:services.managedIndexService,indexService:services.indexService}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_POLICY,render:props=>query_string_default.a.parse(this.props.location.search).type=="visual"?external_osdSharedDeps_React_default.a.createElement(pages_VisualCreatePolicy,Main_extends({},props,{isEdit:false,policyService:services.policyService,notificationService:services.notificationService})):external_osdSharedDeps_React_default.a.createElement(pages_CreatePolicy,Main_extends({},props,{isEdit:false,policyService:services.policyService}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].EDIT_POLICY,render:props=>query_string_default.a.parse(this.props.location.search).type=="visual"?external_osdSharedDeps_React_default.a.createElement(pages_VisualCreatePolicy,Main_extends({},props,{isEdit:true,policyService:services.policyService,notificationService:services.notificationService})):external_osdSharedDeps_React_default.a.createElement(pages_CreatePolicy,Main_extends({},props,{isEdit:true,policyService:services.policyService}))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].INDEX_POLICIES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Policies,Main_extends({},props,{policyService:services.policyService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].POLICY_DETAILS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers_PolicyDetails,Main_extends({},props,{policyService:services.policyService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].MANAGED_INDICES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_ManagedIndices,Main_extends({},props,{managedIndexService:services.managedIndexService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].INDICES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Indices,Main_extends({},props,{indexService:services.indexService,commonService:services.commonService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].ROLLUPS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Rollups,Main_extends({},props,{rollupService:services.rollupService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_ROLLUP,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers_CreateRollupForm,Main_extends({},props,{rollupService:services.rollupService,indexService:services.indexService,dataSourceReadOnly:this.state.dataSourceReadOnly,setDataSourceReadOnly:this.setDataSourceReadOnly})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].EDIT_ROLLUP,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers,Main_extends({},props,{rollupService:services.rollupService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].ROLLUP_DETAILS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers_RollupDetails,Main_extends({},props,{rollupService:services.rollupService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].TRANSFORMS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers_Transforms_Transforms,Main_extends({},props,{transformService:services.transformService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_TRANSFORM,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(containers_CreateTransformForm,Main_extends({},props,{rollupService:services.rollupService,transformService:services.transformService,indexService:services.indexService,dataSourceReadOnly:this.state.dataSourceReadOnly,setDataSourceReadOnly:this.setDataSourceReadOnly})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].EDIT_TRANSFORM,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(Transforms_EditTransform,Main_extends({},props,{transformService:services.transformService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].TRANSFORM_DETAILS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(Transforms_TransformDetails,Main_extends({},props,{transformService:services.transformService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_INDEX}/:index/:mode`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndex,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_INDEX}/:index`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndex,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_INDEX,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndex,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].REINDEX,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(container_Reindex,Main_extends({},props,{commonService:services.commonService,indexService:services.indexService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].SPLIT_INDEX,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_SplitIndex,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].ALIASES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Aliases,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].TEMPLATES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Templates,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].COMPOSABLE_TEMPLATES,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_ComposableTemplates,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/:template/:mode`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateComposableTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_COMPOSABLE_TEMPLATE}/:template`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateComposableTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_COMPOSABLE_TEMPLATE,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateComposableTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_TEMPLATE}/:template/:mode`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndexTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_TEMPLATE}/:template`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndexTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_TEMPLATE,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateIndexTemplate,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].INDEX_DETAIL}/:index`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_
vendor: 16,617 bytes, line 6
6default.a.createElement(pages_IndexDetail,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].SHRINK_INDEX,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(container_ShrinkIndex,Main_extends({},props,{commonService:services.commonService})))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].ROLLOVER}/:source`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Rollover,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].ROLLOVER,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Rollover,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].DATA_STREAMS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_DataStreams,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].CREATE_DATA_STREAM}/:dataStream`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateDataStream,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].CREATE_DATA_STREAM,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_CreateDataStream,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:`${constants["D"].FORCE_MERGE}/:indexes`,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_ForceMerge,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].FORCE_MERGE,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_ForceMerge,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:constants["D"].NOTIFICATIONS,render:props=>external_osdSharedDeps_React_default.a.createElement("div",{style:ROUTE_STYLE},external_osdSharedDeps_React_default.a.createElement(pages_Notifications,props))}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Redirect"],{from:"/",to:landingPage}))))))))))}}},function(module,exports,__webpack_require__){(function(process){var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function getOwnPropertyDescriptors(obj){var keys=Object.keys(obj);var descriptors={};for(var i=0;i<keys.length;i++){descriptors[keys[i]]=Object.getOwnPropertyDescriptor(obj,keys[i])}return descriptors};var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,(function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}));for(var x=args[i];i<len;x=args[++i]){if(isNull(x)||!isObject(x)){str+=" "+x}else{str+=" "+inspect(x)}}return str};exports.deprecate=function(fn,msg){if(typeof process!=="undefined"&&process.noDeprecation===true){return fn}if(typeof process==="undefined"){return function(){return exports.deprecate(fn,msg).apply(this,arguments)}}var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation){throw new Error(msg)}else if(process.traceDeprecation){console.trace(msg)}else{console.error(msg)}warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}).NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set]){if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else{debugs[set]=function(){}}}return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"�["+inspect.colors[style][0]+"m"+str+"�["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach((function(val,idx){hash[val]=true}));return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map((function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}))}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i){if(hasOwnProperty(value,String(i))){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true))}else{output.push("")}}keys.forEach((function(key){if(!key.match(/^\d+$/)){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))}}));return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get){if(desc.set){str=ctx.stylize("[Getter/Setter]","special")}else{str=ctx.stylize("[Getter]","special")}}else{if(desc.set){str=ctx.stylize("[Setter]","special")}}if(!hasOwnProperty(visibleKeys,key)){name="["+key+"]"}if(!str){if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes)){str=formatValue(ctx,desc.value,null)}else{str=formatValue(ctx,desc.value,recurseTimes-1)}if(str.indexOf("\n")>-1){if(array){str=str.split("\n").map((function(line){return" "+line})).join("\n").substr(2)}else{str="\n"+str.split("\n").map((function(line){return" "+line})).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce((function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=__webpack_require__(369);function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=__webpack_require__(370);exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var kCustomPromisifiedSymbol=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;exports.promisify=function promisify(original){if(typeof original!=="function")throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&original[kCustomPromisifiedSymbol]){var fn=original[kCustomPromisifiedSymbol];if(typeof fn!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:false,writable:false,configurable:true});return fn}function fn(){var promiseResolve,promiseReject;var promise=new Promise((function(resolve,reject){promiseResolve=resolve;promiseReject=reject}));var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i])}args.push((function(err,value){if(err){promiseReject(err)}else{promiseResolve(value)}}));try{original.apply(this,args)}catch(err){promiseReject(err)}return promise}Object.setPrototypeOf(fn,Object.getPrototypeOf(original));if(kCustomPromisifiedSymbol)Object.defineProperty(fn,kCustomPromisifiedSymbol,{value:fn,enumerable:false,writable:false,configurable:true});return Object.defineProperties(fn,getOwnPropertyDescriptors(original))};exports.promisify.custom=kCustomPromisifiedSymbol;function callbackifyOnRejected(reason,cb){if(!reason){var newReason=new Error("Promise was rejected with a falsy value");newReason.reason=reason;reason=newReason}return cb(reason)}function callbackify(original){if(typeof original!=="function"){throw new TypeError('The "original" argument must be of type Function')}function callbackified(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i])}var maybeCb=args.pop();if(typeof maybeCb!=="function"){throw new TypeError("The last argument must be of type Function")}var self=this;var cb=function(){return maybeCb.apply(self,arguments)};original.apply(this,args).then((function(ret){process.nextTick(cb,null,ret)}),(function(rej){process.nextTick(callbackifyOnRejected,rej,cb)}))}Object.setPrototypeOf(callbackified,Object.getPrototypeOf(original));Object.defineProperties(callbackified,getOwnPropertyDescriptors(original));return callbackified}exports.callbackify=callbackify}).call(this,__webpack_require__(54))},function(module,exports,__webpack_require__){(function(global,factory){true?factory(exports):undefined})(this,(function(exports2){"use strict";const Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;const ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u
60EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;const ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
6D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;const unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue};const isSpaceSeparator=c=>
6typeof c==="string"&&unicode.Space_Separator.test(c);const isIdStartChar=c=>typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="$"||c==="_"||unicode.ID_Start.test(c));const isIdContinueChar=c=>typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c>="0"&&c<="9"||c==="$"||c==="_"||c==="â"||c==="â"||unicode.ID_Continue.test(c));const isDigit=c=>typeof c==="string"&&/[0-9]/.test(c);const isInteger=s=>typeof s==="string"&&!/[^0-9]/.test(s);const isHex=s=>typeof s==="string"&&/0x[0-9a-f]+$/i.test(s);const isHexDigit=c=>typeof c==="string"&&/[0-9a-f]/i.test(c);function parse(text,reviver,options){let source=String(text);let parseState="start";let stack=[];let pos=0;let line=1;let column=0;let token;let key;let root;let lexState;let buffer;let doubleQuote;let sign;let c;const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case"Â ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":read();return;case"/":read();lexState="comment";return;case void 0:read();return newToken("eof")}if(isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment(){switch(c){case"*":read();lexState="multiLineComment";return;case"/":read();lexState="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(c){case"*":read();lexState="multiLineCommentAsterisk";return;case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":read();return;case"/":read();lexState="default";return;case void 0:throw invalidChar(read())}read();lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":read();lexState="default";return;case void 0:read();return newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":read();literal("ull");return newToken("null",null);case"t":read();literal("rue");return newToken("boolean",true);case"f":read();literal("alse");return newToken("boolean",false);case"-":case"+":if(read()==="-"){sign=-1}lexState="sign";return;case".":buffer=read();lexState="decimalPointLeading";return;case"0":buffer=read();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read();lexState="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",Infinity);case"N":read();literal("aN");return newToken("numeric",NaN);case'"':case"'":doubleQuote=read()==='"';buffer="";lexState="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(c!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!isIdStartChar(u)){throw invalidIdentifier()}break}buffer+=u;lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"â":case"â":buffer+=read();return;case"\\":read();lexState="identifierNameEscape";return}if(isIdContinueChar(c)){buffer+=read();return}return newToken("identifier",buffer)},identifierNameEscape(){if(c!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":case"â":case"â":break;default:if(!isIdContinueChar(u)){throw invalidIdentifier()}break}buffer+=u;lexState="identifierName"},sign(){switch(c){case".":buffer=read();lexState="decimalPointLeading";return;case"0":buffer=read();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read();lexState="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",sign*Infinity);case"N":read();literal("aN");return newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":buffer+=read();lexState="decimalPoint";return;case"e":case"E":buffer+=read();lexState="decimalExponent";return;case"x":case"X":buffer+=read();lexState="hexadecimal";return;case"n":lexState="bigInt";return}return newToken("numeric",sign*0)},decimalInteger(){switch(c){case".":buffer+=read();lexState="decimalPoint";return;case"e":case"E":buffer+=read();lexState="decimalExponent";return;case"n":lexState="bigInt";return}if(isDigit(c)){buffer+=read();return}return newNumericToken(sign,buffer)},decimalPointLeading(){if(isDigit(c)){buffer+=read();lexState="decimalFraction";return}
6throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":buffer+=read();lexState="decimalExponent";return}if(isDigit(c)){buffer+=read();lexState="decimalFraction";return}return newNumericToken(sign,buffer)},decimalFraction(){switch(c){case"e":case"E":buffer+=read();lexState="decimalExponent";return}if(isDigit(c)){buffer+=read();return}return newNumericToken(sign,buffer)},decimalExponent(){switch(c){case"+":case"-":buffer+=read();lexState="decimalExponentSign";return}if(isDigit(c)){buffer+=read();lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(isDigit(c)){buffer+=read();lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(isDigit(c)){buffer+=read();return}return newNumericToken(sign,buffer)},bigInt(){if((buffer==null?void 0:buffer.length)&&(isInteger(buffer)||isHex(buffer))){read();return newToken("bigint",BigInt(sign)*BigInt(buffer))}throw invalidChar(read())},hexadecimal(){if(isHexDigit(c)){buffer+=read();lexState="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(isHexDigit(c)){buffer+=read();return}if(c==="n"){lexState="bigInt";return}return newNumericToken(sign,buffer)},string(){switch(c){case"\\":read();buffer+=escape();return;case'"':if(doubleQuote){read();return newToken("string",buffer)}buffer+=read();return;case"'":if(!doubleQuote){read();return newToken("string",buffer)}buffer+=read();return;case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read());case void 0:return newToken("eof")}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":buffer=read();lexState="identifierName";return;case"\\":read();lexState="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":doubleQuote=read()==='"';lexState="string";return}if(isIdStartChar(c)){buffer+=read();lexState="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(c===":"){return newToken("punctuator",read())}throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(c==="]"){return newToken("punctuator",read())}lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};const parseStates={start(){if(token.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(token.type){case"identifier":case"string":key=token.value;parseState="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(token.type==="eof"){throw invalidEOF()}parseState="beforePropertyValue"},beforePropertyValue(){if(token.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(token.type==="eof"){throw invalidEOF()}if(token.type==="punctuator"&&token.value==="]"){pop();return}push()},afterPropertyValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforeArrayValue";return;case"]":pop()}},end(){}};do{token=lex();parseStates[parseState]()}while(token.type!=="eof");if(typeof reviver==="function"){return internalize({"":root},"",reviver)}return root;function internalize(holder,name,reviver2){const value=holder[name];if(value!=null&&typeof value==="object"){if(Array.isArray(value)){for(let i=0;i<value.length;i++){const key2=String(i);const replacement=internalize(value,key2,reviver2);Object.defineProperty(value,key2,{value:replacement,writable:true,enumerable:true,configurable:true})}}else{for(const key2 in value){const replacement=internalize(value,key2,reviver2);if(replacement===void 0){delete value[key2]}else{Object.defineProperty(value,key2,{value:replacement,writable:true,enumerable:true,configurable:true})}}}}return reviver2.call(holder,name,value)}function lex(){lexState="default";buffer="";doubleQuote=false;sign=1;for(;;){c=peek();const token2=lexStates[lexState]();if(token2){return token2}}}
6function peek(){if(source[pos]){return String.fromCodePoint(source.codePointAt(pos))}}function read(){const c2=peek();if(c2==="\n"){line++;column=0}else if(c2){column+=c2.length}else{column++}if(c2){pos+=c2.length}return c2}function newToken(type,value){return{type:type,value:value,line:line,column:column}}function newNumericToken(sign2,buffer2){const num=sign2*Number(buffer2);if(options==null?void 0:options.withLongNumerals){if(num>Number.MAX_SAFE_INTEGER||num<Number.MIN_SAFE_INTEGER){try{return newToken("bigint",BigInt(sign2)*BigInt(buffer2))}catch(ex){console.warn(ex)}}}return newToken("numeric",num)}function literal(s){for(const c2 of s){const p=peek();if(p!==c2){throw invalidChar(read())}read()}}function escape(){const c2=peek();switch(c2){case"b":read();return"\b";case"f":read();return"\f";case"n":read();return"\n";case"r":read();return"\r";case"t":read();return"\t";case"v":read();return"\v";case"0":read();if(isDigit(peek())){throw invalidChar(read())}return"\0";case"x":read();return hexEscape();case"u":read();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read();return"";case"\r":read();if(peek()==="\n"){read()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case void 0:throw invalidChar(read())}return read()}function hexEscape(){let buffer2="";let c2=peek();if(!isHexDigit(c2)){throw invalidChar(read())}buffer2+=read();c2=peek();if(!isHexDigit(c2)){throw invalidChar(read())}buffer2+=read();return String.fromCodePoint(parseInt(buffer2,16))}function unicodeEscape(){let buffer2="";let count=4;while(count-- >0){const c2=peek();if(!isHexDigit(c2)){throw invalidChar(read())}buffer2+=read()}return String.fromCodePoint(parseInt(buffer2,16))}function push(){let value;switch(token.type){case"punctuator":switch(token.value){case"{":value={};break;case"[":value=[];break}break;case"null":case"boolean":case"numeric":case"string":case"bigint":value=token.value;break}if(root===void 0){root=value}else{const parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value)}else{Object.defineProperty(parent,key,{value:value,writable:true,enumerable:true,configurable:true})}}if(value!==null&&typeof value==="object"){stack.push(value);if(Array.isArray(value)){parseState="beforeArrayValue"}else{parseState="beforePropertyName"}}else{const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}}function pop(){stack.pop();const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}
6function invalidChar(c2){if(c2===void 0){return syntaxError(`JSON11: invalid end of input at ${line}:${column}`)}return syntaxError(`JSON11: invalid character '${formatChar(c2)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON11: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){column-=5;return syntaxError(`JSON11: invalid identifier character at ${line}:${column}`)}function separatorChar(c2){console.warn(`JSON11: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(c2){const replacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(replacements[c2]){return replacements[c2]}if(c2<" "){const hexString=c2.charCodeAt(0).toString(16);return"\\x"+("00"+hexString).substring(hexString.length)}return c2}function syntaxError(message){const err=new SyntaxError(message);Object.defineProperty(err,"lineNumber",{value:line,writable:true,enumerable:true,configurable:true});Object.defineProperty(err,"columnNumber",{value:column,writable:true,enumerable:true,configurable:true});return err}}function stringify(value,replacerOrAllowListOrOptions,space,options){var _a,_b,_c,_d,_e;const stack=[];let indent="";let propertyList;let replacer;let gap="";let quote;let withBigInt;let withLegacyEscapes;let nameSerializer=serializeKey;let trailingComma="";const quoteWeights={"'":.1,'"':.2};if(replacerOrAllowListOrOptions!=null&&typeof replacerOrAllowListOrOptions==="object"&&!Array.isArray(replacerOrAllowListOrOptions)){gap=getGap(replacerOrAllowListOrOptions.space);if(replacerOrAllowListOrOptions.trailingComma){trailingComma=","}quote=(_b=(_a=replacerOrAllowListOrOptions.quote)==null?void 0:_a.trim)==null?void 0:_b.call(_a);if(replacerOrAllowListOrOptions.quoteNames===true){nameSerializer=quoteString}if(typeof replacerOrAllowListOrOptions.replacer==="function"){replacer=replacerOrAllowListOrOptions.replacer}withBigInt=replacerOrAllowListOrOptions.withBigInt;withLegacyEscapes=replacerOrAllowListOrOptions.withLegacyEscapes===true}else{if(typeof replacerOrAllowListOrOptions==="function"){replacer=replacerOrAllowListOrOptions}else if(Array.isArray(replacerOrAllowListOrOptions)){propertyList=[];const propertySet=new Set;for(const v of replacerOrAllowListOrOptions){const key=(_c=v==null?void 0:v.toString)==null?void 0:_c.call(v);if(key!==void 0)propertySet.add(key)}propertyList=[...propertySet]}gap=getGap(space);quote=(_e=(_d=options==null?void 0:options.quote)==null?void 0:_d.trim)==null?void 0:_e.call(_d);if((options==null?void 0:options.quoteNames)===true){nameSerializer=quoteString}withBigInt=options==null?void 0:options.withBigInt;withLegacyEscapes=(options==null?void 0:options.withLegacyEscapes)===true;if(options==null?void 0:options.trailingComma){trailingComma=","}}const quoteReplacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":withLegacyEscapes?"\\v":"\\u000b","\0":withLegacyEscapes?"\\0":"\\u0000","\u2028":"\\u2028","\u2029":"\\u2029"};const quoteReplacementForNulFollowedByDigit=withLegacyEscapes?"\\x00":"\\u0000";return serializeProperty("",{"":value});function getGap(space2){if(typeof space2==="number"||space2 instanceof Number){const num=Number(space2);if(isFinite(num)&&num>0){return" ".repeat(Math.min(10,Math.floor(num)))}}else if(typeof space2==="string"||space2 instanceof String){return space2.substring(0,10)}return""}function serializeProperty(key,holder){let value2=holder[key];if(value2!=null){if(typeof value2.toJSON11==="function"){value2=value2.toJSON11(key)}else if(typeof value2.toJSON5==="function"){value2=value2.toJSON5(key)}else if(typeof value2.toJSON==="function"){value2=value2.toJSON(key)}}if(replacer){value2=replacer.call(holder,key,value2)}if(value2 instanceof Number){value2=Number(value2)}else if(value2 instanceof String){value2=String(value2)}else if(value2 instanceof Boolean){value2=value2.valueOf()}switch(value2){case null:return"null";case true:return"true";case false:return"false"}if(typeof value2==="string"){return quoteString(value2)}if(typeof value2==="number"){return String(value2)}if(typeof value2==="bigint"){return value2.toString()+(withBigInt===false?"":"n")}if(typeof value2==="object"){return Array.isArray(value2)?serializeArray(value2):serializeObject(value2)}return void 0}function quoteString(value2){let product="";for(let i=0;i<value2.length;i++){const c=value2[i];switch(c){case"'":case'"':quoteWeights[c]++;product+=c;continue;case"\0":if(isDigit(value2[i+1])){product+=quoteReplacementForNulFollowedByDigit;continue}}if(quoteReplacements[c]){product+=quoteReplacements[c];continue}if(c<" "){let hexString=c.charCodeAt(0).toString(16);product+=withLegacyEscapes?"\\x"+("00"+hexString).substring(hexString.length):"\\u"+hexString.padStart(4,"0");continue}product+=c}const quoteChar=quote||Object.keys(quoteWeights).reduce((a,b)=>quoteWeights[a]<quoteWeights[b]?a:b);product=product.replace(new RegExp(quoteChar,"g"),quoteReplacements[quoteChar]);return quoteChar+product+quoteChar}function serializeObject(value2){if(stack.includes(value2)){throw TypeError("Converting circular structure to JSON11")}stack.push(value2);let stepback=indent;indent=indent+gap;let keys=propertyList||Object.keys(value2);let partial=[];for(const key of keys){const propertyString=serializeProperty(key,value2);
6if(propertyString!==void 0){let member=nameSerializer(key)+":";if(gap!==""){member+=" "}member+=propertyString;partial.push(member)}}let final;if(partial.length===0){final="{}"}else{let properties;if(gap===""){properties=partial.join(",");final="{"+properties+"}"}else{properties=partial.join(",\n"+indent);final="{\n"+indent+properties+trailingComma+"\n"+stepback+"}"}}stack.pop();indent=stepback;return final}function serializeKey(key){if(key.length===0){return quoteString(key)}const firstChar=String.fromCodePoint(key.codePointAt(0));if(!isIdStartChar(firstChar)){return quoteString(key)}for(let i=firstChar.length;i<key.length;i++){if(!isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))){return quoteString(key)}}return key}function serializeArray(value2){if(stack.includes(value2)){throw TypeError("Converting circular structure to JSON11")}stack.push(value2);let stepback=indent;indent=indent+gap;let partial=[];for(let i=0;i<value2.length;i++){const propertyString=serializeProperty(String(i),value2);partial.push(propertyString!==void 0?propertyString:"null")}let final;if(partial.length===0){final="[]"}else{if(gap===""){let properties=partial.join(",");final="["+properties+"]"}else{let properties=partial.join(",\n"+indent);final="[\n"+indent+properties+trailingComma+"\n"+stepback+"]"}}stack.pop();indent=stepback;return final}}exports2.parse=parse;exports2.stringify=stringify;Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})}))},function(module,exports,__webpack_require__){(function(root,factory){if(true){module.exports=factory()}else{}})(typeof self!=="undefined"?self:this,(function(){var rison={};rison.uri_ok={"~":true,"!":true,"*":true,"(":true,")":true,"-":true,_:true,".":true,",":true,":":true,"@":true,$:true,"'":true,"/":true};(function(){var l=[];for(var hi=0;hi<16;hi++){for(var lo=0;lo<16;lo++){if(hi+lo===0)continue;var c=String.fromCharCode(hi*16+lo);if(!/\w|[-_./~]/.test(c))l.push("\\u00"+hi.toString(16)+lo.toString(16))}}rison.not_idchar=l.join("")})();rison.not_idchar=" '!:(),*@$";rison.not_idstart="-0123456789";(function(){var idrx="[^"+rison.not_idstart+rison.not_idchar+"][^"+rison.not_idchar+"]*";rison.id_ok=new RegExp("^"+idrx+"$");rison.next_id=new RegExp(idrx,"g")})();rison.quote=function(x){if(/^[-A-Za-z0-9~!*()_.',:@$/]*$/.test(x))return x;return encodeURIComponent(x).replace(/%2C/g,",").replace(/%3A/g,":").replace(/%40/g,"@").replace(/%24/g,"$").replace(/%2F/g,"/").replace(/%20/g,"+")};(function(){var sq={"'":true,"!":true},enc=function(v){if(v&&typeof v.toJSON==="function")v=v.toJSON();var fn=s[typeof v];if(fn)return fn(v)},s={bigint:x=>x.toString(),array:function(x){var a=["!("],b,i,l=x.length,v;for(i=0;i<l;i+=1){v=enc(x[i]);if(typeof v=="string"){if(b){a[a.length]=","}a[a.length]=v;b=true}}a[a.length]=")";return a.join("")},boolean:function(x){if(x)return"!t";return"!f"},null:function(){return"!n"},number:function(x){if(!isFinite(x))return"!n";return String(x).replace(/\+/,"")},object:function(x){if(x){if(x instanceof Array){return s.array(x)}if(typeof x.__prototype__==="object"&&typeof x.__prototype__.encode_rison!=="undefined")return x.encode_rison();var a=["("],b,i,v,ki,ks=[];for(i in x)ks[ks.length]=i;ks.sort();for(ki=0;ki<ks.length;ki++){i=ks[ki];v=enc(x[i]);if(typeof v=="string"){if(b){a[a.length]=","}a.push(s.string(i),":",v);b=true}}a[a.length]=")";return a.join("")}return"!n"},string:function(x){if(x==="")return"''";if(rison.id_ok.test(x))return x;x=x.replace(/(['!])/g,(function(a,b){if(sq[b])return"!"+b;return b}));return"'"+x+"'"},undefined:function(){return}};rison.encode=function(v){return enc(v)};rison.encode_object=function(v){if(typeof v!="object"||v===null||v instanceof Array)throw new Error("rison.encode_object expects an object argument");var r=s[typeof v](v);return r.substring(1,r.length-1)};rison.encode_array=function(v){if(!(v instanceof Array))throw new Error("rison.encode_array expects an array argument");var r=s[typeof v](v);return r.substring(2,r.length-1)};rison.encode_uri=function(v){return rison.quote(s[typeof v](v))}})();rison.decode=function(r){var errcb=function(e){throw Error("rison decoder error: "+e)};if(typeof r!=="string")return errcb("decode input must be a string");var p=new rison.parser(errcb);return p.parse(r)};rison.decode_object=function(r){return rison.decode("("+r+")")};rison.decode_array=function(r){return rison.decode("!("+r+")")};rison.parser=function(errcb){this.errorHandler=errcb};rison.parser.WHITESPACE="";rison.parser.prototype.setOptions=function(options){if(options["errorHandler"])this.errorHandler=options.errorHandler};rison.parser.prototype.parse=function(str){this.string=str;this.index=0;this.message=null;var value=this.readValue();if(!this.message&&this.next())value=this.error("unable to parse string as rison: '"+rison.encode(str)+"'");if(this.message&&this.errorHandler)this.errorHandler(this.message,this.index);return value};rison.parser.prototype.error=function(message){if(typeof console!=="undefined")console.log("rison parser error: ",message);this.message=message;return undefined};rison.parser.prototype.readValue=function(){var c=this.next();var fn=c&&this.table[c];if(fn)return fn.apply(this);var s=this.string;var i=this.index-1;rison.next_id.lastIndex=i;var m=rison.next_id.exec(s);if(m.length>0){var id=m[0];this.index=i+id.length;return id}if(c)return this.error("invalid character: '"+c+"'");return this.error("empty expression")};rison.parser.parse_array=function(parser){var ar=[];var c;while((c=parser.next())!==")"){if(!c)return parser.error("unmatched '!('");if(ar.length){if(c!==",")parser.error("missing ','")}else if(c===","){return parser.error("extra ','")}else--parser.index;var n=parser.readValue();if(typeof n=="undefined")return undefined;ar.push(n)}return ar};rison.parser.bangs={bigint:x=>x.toString(),t:true,f:false,n:null,"(":rison.parser.parse_array};rison.parser.prototype.table={"!":function(){var s=this.string;var c=s.charAt(this.index++);if(!c)return this.error('"!" at end of input');var x=rison.parser.bangs[c];if(typeof x=="function"){return x.call(null,this)}else if(typeof x=="undefined"){return this.error('unknown literal: "!'+c+'"')}return x},"(":function(){var o={};var c;var count=0;while((c=this.next())!==")"){if(count){if(c!==",")this.error("missing ','")}else if(c===","){return this.error("extra ','")}else--this.index;var k=this.readValue();if(typeof k==="undefined")return undefined;if(this.next()!==":")return this.error("missing ':'");var v=this.readValue();if(typeof v==="undefined")return undefined;o[k]=v;count++}return o},"'":function(){var s=this.string;var i=this.index;var start=i;var segments=[];var c;while((c=s.charAt(i++))!=="'"){if(!c)return this.error('unmatched "\'"');if(c==="!"){if(start<i-1)segments.push(s.slice(start,i-1));c=s.charAt(i++);if("!'".indexOf(c)>=0){segments.push(c)}else{return this.error('invalid string escape: "!'+c+'"')}start=i}}if(start<i-1)segments.push(s.slice(start,i-1));this.index=i;return segments.length===1?segments[0]:segments.join("")},"-":function(){var s=this.string;var i=this.index;var start=i-1;var state="int";var permittedSigns="-";var transitions={bigint:x=>x.toString(),"int+.":"frac","int+e":"exp","frac+e":"exp"};do{var c=s.charAt(i++);if(!c)break;if("0"<=c&&c<="9")continue;if(permittedSigns.indexOf(c)>=0){permittedSigns="";continue}
6state=transitions[state+"+"+c.toLowerCase()];if(state==="exp")permittedSigns="-"}while(state);this.index=--i;s=s.slice(start,i);if(s==="-")return this.error("invalid number");return isFinite(s)&&(s>Number.MAX_SAFE_INTEGER||s<Number.MIN_SAFE_INTEGER)?BigInt(s):Number(s)}};(function(table){for(var i=0;i<=9;i++)table[String(i)]=table["-"]})(rison.parser.prototype.table);rison.parser.prototype.next=function(){var c;var s=this.string;var i=this.index;do{if(i===s.length)return undefined;c=s.charAt(i++)}while(rison.parser.WHITESPACE.indexOf(c)>=0);this.index=i;return c};return rison}))},function(module){module.exports=JSON.parse('{"name":"opensearch-dashboards","description":"OpenSearch Dashboards is a browser based analytics and search dashboard for OpenSearch. OpenSearch Dashboards is a snap to setup and start using. OpenSearch Dashboards strives to be easy to get started with, while also being flexible and powerful, just like OpenSearch.","keywords":["opensearch-dashboards","opensearch","logstash","analytics","visualizations","dashboards","dashboarding"],"private":true,"version":"2.19.6","branch":"2.x","types":"./opensearch_dashboards.d.ts","tsdocMetadata":"./build/tsdoc-metadata.json","build":{"number":8467,"sha":"6cb7fec4e154faa0a4a3fee4b33dfef91b9870d9"},"homepage":"https://opensearch.org","bugs":{"url":"http://github.com/opensearch-project/OpenSearch-Dashboards/issues"},"packageManager":"[email protected]","opensearchDashboards":{"clean":{"extraPatterns":["build","data/optimize","built_assets",".eslintcache",".node_binaries","src/plugins/*/target"]}},"author":"opensearch-project","scripts":{"preinstall":"scripts/use_node ./preinstall_check","postinstall":"scripts/use_node scripts/postinstall","osd":"scripts/use_node scripts/osd","opensearch":"scripts/use_node scripts/opensearch","test":"grunt test","test:bwc":"./scripts/bwctest_osd.sh","test:jest":"scripts/use_node scripts/jest","test:jest:coverage":"scripts/use_node scripts/jest --coverage","test:jest:ci":"scripts/use_node scripts/jest --ci --colors --runInBand","test:jest:ci:coverage":"scripts/use_node scripts/jest --ci --colors --runInBand --coverage","test:jest_integration":"scripts/use_node scripts/jest_integration","test:jest_integration:ci":"scripts/use_node scripts/jest_integration --ci --colors","test:mocha":"scripts/use_node scripts/mocha","test:mocha:coverage":"yarn nyc --reporter=text-summary --reporter=lcov --report-dir=./target/opensearch-dashboards-coverage/mocha scripts/use_node scripts/mocha","test:ftr":"scripts/use_node scripts/functional_tests","test:ftr:server":"scripts/use_node scripts/functional_tests_server","test:ftr:runner":"scripts/use_node scripts/functional_test_runner","checkLicenses":"scripts/use_node scripts/check_licenses --dev","notice:validate":"scripts/use_node scripts/notice --validate","notice:generate":"scripts/use_node scripts/notice","build-platform":"scripts/use_node scripts/build","build":"scripts/use_node scripts/build --all-platforms","start":"scripts/use_node scripts/opensearch_dashboards --dev","start:docker":"scripts/use_node scripts/opensearch_dashboards --dev --opensearch.hosts=$OPENSEARCH_HOSTS --opensearch.ignoreVersionMismatch=true --server.host=$SERVER_HOST","start:security":"scripts/use_node scripts/opensearch_dashboards --dev --security","start:enhancements":"scripts/use_node scripts/opensearch_dashboards --dev --uiSettings.overrides[\'query:enhancements:enabled\']=true --uiSettings.overrides[\'home:useNewHomePage\']=true","debug":"scripts/use_node --nolazy --inspect scripts/opensearch_dashboards --dev","debug-break":"scripts/use_node --nolazy --inspect-brk scripts/opensearch_dashboards --dev","lint":"yarn run lint:es && yarn run lint:style","lint:es":"scripts/use_node scripts/eslint","lint:style":"scripts/use_node scripts/stylelint","i18n:check":"scripts/use_node scripts/i18n_check --ignore-missing --ignore-unused","i18n:extract":"scripts/use_node scripts/i18n_extract.js","i18n:integrate":"scripts/use_node scripts/i18n_integrate.js --ignore-missing --ignore-unused --update","makelogs":"scripts/use_node scripts/makelogs","uiFramework:compileCss":"cd packages/osd-ui-framework && yarn compileCss","osd:watch":"scripts/use_node scripts/opensearch_dashboards --dev --logging.json=false","build:types":"scripts/use_node scripts/remove.js ./target/types && tsc --p tsconfig.types.json","docs:acceptApiChanges":"scripts/use_node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept","docs:generateDevDocs":"scripts/use_node scripts/generate_docs_sidebar.js","osd:bootstrap":"scripts/use_node scripts/build_ts_refs && scripts/use_node scripts/register_git_hook","spec_to_console":"scripts/use_node scripts/spec_to_console","pkg-version":"scripts/use_node -e \\"console.log(require(\'./package.json\').version)\\"","release_note:generate":"scripts/use_node scripts/generate_release_note","cypress:run-without-security":"env TZ=America/Los_Angeles NO_COLOR=1 cypress run --env SECURITY_ENABLED=false","cypress:run-with-security":"env TZ=America/Los_Angeles NO_COLOR=1 cypress run --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500","osd:ciGroup10":"BASE_PATH=\'cypress/integration/core_opensearch_dashboards/opensearch_dashboards/apps/query_enhancements\' && echo \\"$BASE_PATH/saved_search.spec.js,$BASE_PATH/queries.spec.js,$BASE_PATH/a_check.spec.js,$BASE_PATH/dataset_selector.spec.js,$BASE_PATH/s3_dataset.spec.js,$BASE_PATH/simple_dataset_selector.spec.js\\"","osd:ciGroup11":"echo \\"cypress/integration/dashboard_sanity_test.spec.ts\\"","osd:ciGroup12":"BASE_PATH=\'cypress/integration/core_opensearch_dashboards/opensearch_dashboards/apps/query_enhancements\' && echo \\"$BASE_PATH/time_range_selection.spec.js,$BASE_PATH/saved_queries.spec.js,$BASE_PATH/language_specific_display.spec.js,$BASE_PATH/field_display_filtering.spec.js\\"","generate:opensearchsqlantlr":"./node_modules/antlr4ng-cli/index.js -Dlanguage=TypeScript -o ./src/plugins/data/public/antlr/opensearch_sql/.generated -visitor -no-listener -Xexact-output-dir ./src/plugins/data/public/antlr/opensearch_sql/grammar/OpenSearchSQLLexer.g4 ./src/plugins/data/public/antlr/opensearch_sql/grammar/OpenSearchSQLParser.g4","generate:opensearchpplantlr":"./node_modules/antlr4ng-cli/index.js -Dlanguage=TypeScript -o ./src/plugins/data/public/antlr/opensearch_ppl/.generated -visitor -no-listener -Xexact-output-dir ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLLexer.g4 ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4"},"repository":{"type":"git","url":"https://github.com/opensearch-project/opensearch-dashboards.git"},"resolutions":{"**/@babel/traverse":"^7.25.0","**/@babel/helpers":"^7.27.0","**/@babel/runtime":"^7.27.0","**/@babel/runtime-corejs3":"^7.27.0","**/@types/node":"~18.7.0","**/ansi-regex":"^5.0.1","**/async":"^3.2.3","**/cpy/globby":"^10.0.1","**/d3-color":"^3.1.0","**/flat":"^5.0.2","**/elasticsearch/agentkeepalive":"^4.5.0","**/elliptic":"^6.6.1","**/eslint/cross-spawn":"^7.0.5","**/es5-ext":"^0.10.63","**/fetch-mock/path-to-regexp":"^3.3.0","**/follow-redirects":"^1.15.4","**/glob-parent":"^6.0.0","**/hoist-non-react-statics":"^3.3.2","**/jest-config":"npm:@amoo-miki/[email protected]","**/jest-jasmine2":"npm:@amoo-miki/[email protected]","**/joi/hoek":"npm:@amoo-miki/[email protected]","**/json-schema":"^0.4.0","**/kind-of":">=6.0.3","**/load-bmfont/phin":"^3.7.1","**/loader-utils":"^2.0.4","**/node-jose":"^2.2.0","**/nth-check":"^2.0.1","**/prismjs":"^1.30.0","**/qs":"^6.14.1","**/semver":"^7.5.3","**/set-value":"^4.1.0","**/body-parser":"^2.2.1","**/topo/hoek":"npm:@amoo-miki/[email protected]","**/trim":"^0.0.3","**/typescript":"4.0.2","**/unset-value":"^2.0.1","**/url":"^0.11.4","**/watchpack-chokidar2/chokidar":"^3.5.3","**/eslint-plugin-mocha-next/mocha":"npm:mocha@^10.1.0","**/xml2js":"^0.5.0","**/yaml":"^2.2.2","**/js-yaml":"^4.1.1","**/tar":"^7.5.16","**/cipher-base":"^1.0.6","**/pbkdf2":"^3.1.3","**/sha.js":"^2.4.12","**/eslint/file-entry-cache":"^6.0.1","**/@hapi/content":"^6.0.2","**/@microsoft/tsdoc-config/ajv":"^6.14.0","**/grunt/minimatch":"^3.1.5","**/lodash-es":"^4.18.0","**/lodash":"^4.18.0","**/axios":"^1.15.0","**/serialize-javascript":"^7.0.5"},"workspaces":{"packages":["packages/*","examples/*","test/plugin_functional/plugins/*","test/interpreter_functional/plugins/*"],"nohoist":["**/@types/*","**/@types/*/**","**/grunt-*","**/grunt-*/**","@elastic/eui/rehype-react","@elastic/eui/remark-rehype","@elastic/eui/remark-rehype/**"]},"dependencies":{"@aws-crypto/client-node":"^3.1.1","@elastic/datemath":"5.0.3","@elastic/eui":"npm:@opensearch-project/[email protected]","@elastic/good":"^9.0.1-kibana3","@elastic/numeral":"npm:@amoo-miki/[email protected]","@elastic/request-crypto":"2.0.0","@elastic/safer-lodash-set":"0.0.0","@hapi/accept":"^5.0.2","@hapi/boom":"^9.1.4","@hapi/cookie":"^11.0.2","@hapi/good-squeeze":"^6.0.0","@hapi/h2o2":"^9.1.0","@hapi/hapi":"^20.2.1","@hapi/hoek":"^9.2.1","@hapi/inert":"^6.0.4","@hapi/podium":"^4.1.3","@hapi/vision":"^6.1.0","@hapi/wreck":"^17.1.0","@opensearch-dashboards-test/opensearch-dashboards-test-library":"https://github.com/opensearch-project/opensearch-dashboards-test-library/archive/refs/tags/1.
60.6.tar.gz","@opensearch-project/opensearch":"^1.1.0","@opensearch-project/opensearch-next":"npm:@opensearch-project/opensearch@^2.13.0","@opensearch/datemath":"5.0.3","@osd/ace":"1.0.0","@osd/analytics":"1.0.0","@osd/apm-config-loader":"1.0.0","@osd/config":"1.0.0","@osd/config-schema":"1.0.0","@osd/cross-platform":"1.0.0","@osd/i18n":"1.0.0","@osd/interpreter":"1.0.0","@osd/logging":"1.0.0","@osd/monaco":"1.0.0","@osd/std":"1.0.0","@osd/ui-framework":"1.0.0","@osd/ui-shared-deps":"1.0.0","@reduxjs/toolkit":"^1.6.1","@types/yauzl":"^2.9.1","JSONStream":"1.3.5","abortcontroller-polyfill":"^1.4.0","ajv":"^8.20.0","antlr4-c3":"^3.4.1","antlr4ng":"^3.0.4","bluebird":"3.5.5","chalk":"^4.1.0","chokidar":"^3.4.2","color":"1.0.3","commander":"^3.0.2","core-js":"^3.6.5","deep-freeze-strict":"^1.1.1","del":"^6.1.1","dns-sync":"npm:@amoo-miki/dns-sync@^0.2.1","dompurify":"^3.4.11","elastic-apm-node":"^3.43.0","elasticsearch":"^16.7.0","execa":"^4.0.2","expiry-js":"0.1.7","fast-deep-equal":"^3.1.1","font-awesome":"4.7.0","getos":"^3.2.1","glob":"^7.1.7","glob-all":"^3.2.1","globby":"^11.1.0","handlebars":"^4.7.9","hjson":"3.2.1","http-aws-es":"npm:@zhongnansu/[email protected]","http-proxy-agent":"^2.1.0","https-proxy-agent":"^5.0.0","inline-style":"^2.0.0","ip-cidr":"^2.1.0","joi":"^14.3.1","js-yaml":"^4.1.1","json-stable-stringify":"^1.0.1","json-stringify-safe":"5.0.1","lodash":"^4.18.0","lru-cache":"^4.1.5","lucene":"^2.1.1","mathjs":"^11.8.2","minimatch":"^9.0.9","moment":"^2.24.0","moment-timezone":"^0.5.27","mustache":"^2.3.2","node-fetch":"^2.6.7","node-forge":"^1.4.0","p-map":"^4.0.0","pegjs":"0.10.0","proxy-from-env":"1.0.0","query-string":"^6.13.2","react":"^16.14.0","react-dom":"^16.12.0","react-input-range":"^1.3.0","react-router":"^5.2.1","react-use":"^13.27.0","redux-thunk":"^2.3.0","regenerator-runtime":"^0.13.3","require-in-the-middle":"^5.0.2","rison-node":"1.0.2","rxjs":"^6.5.5","semver":"^7.5.3","set-value":"^4.1.0","source-map-support":"^0.5.19","symbol-observable":"^1.2.0","tar":"^7.5.16","tinygradient":"^1.1.5","tinymath":"1.2.1","tslib":"^2.0.0","type-detect":"^4.0.8","uuid":"3.3.2","whatwg-fetch":"^3.0.0","yauzl":"^2.10.0","@modelcontextprotocol/sdk":"^1.25.2"},"devDependencies":{"@babel/core":"^7.22.9","@babel/parser":"^7.22.9","@babel/plugin-transform-class-static-block":"^7.24.7","@babel/register":"^7.22.9","@babel/types":"^7.22.9","@cypress/webpack-preprocessor":"^5.17.1","@elastic/apm-rum":"^5.6.1","@elastic/charts":"31.1.0","@elastic/ems-client":"7.10.0","@elastic/eslint-config-kibana":"0.15.0","@elastic/eslint-plugin-eui":"0.0.2","@elastic/filesaver":"1.1.2","@elastic/makelogs":"^6.1.0","@faker-js/faker":"^7.6.0","@microsoft/api-documenter":"^7.13.78","@microsoft/api-extractor":"^7.19.3","@osd/babel-preset":"1.0.0","@osd/dev-utils":"1.0.0","@osd/eslint-import-resolver-opensearch-dashboards":"2.0.0","@osd/eslint-plugin-eslint":"1.0.0","@osd/expect":"1.0.0","@osd/opensearch":"1.0.0","@osd/opensearch-archiver":"1.0.0","@osd/optimizer":"1.0.0","@osd/plugin-generator":"1.0.0","@osd/pm":"1.0.0","@osd/stylelint-config":"1.0.0","@osd/stylelint-plugin-stylelint":"1.0.0","@osd/telemetry-tools":"1.0.0","@osd/test":"1.0.0","@osd/test-subj-selector":"0.2.1","@osd/utility-types":"1.0.0","@percy/cli":"^1.0.0","@percy/sdk-utils":"^1.0.0","@testing-library/dom":"^8.11.3","@testing-library/jest-dom":"^5.16.2","@testing-library/react":"^12.1.2","@testing-library/react-hooks":"^7.0.2","@types/archiver":"^5.3.1","@types/babel__core":"^7.1.17","@types/bluebird":"^3.1.1","@types/chance":"^1.0.0","@types/cheerio":"^0.22.31","@types/color":"^3.0.0","@types/d3":"^3.5.43","@types/dedent":"^0.7.0","@types/deep-freeze-strict":"^1.1.0","@types/delete-empty":"^2.0.0","@types/dompurify":"^3.2.0","@types/elasticsearch":"^5.0.33","@types/enzyme":"^3.10.7","@types/eslint":"^6.1.3","@types/fetch-mock":"^7.3.1","@types/flot":"^0.0.31","@types/getopts":"^2.0.1","@types/getos":"^3.0.0","@types/glob":"^7.1.3","@types/hapi__cookie":"^10.1.4","@types/hapi__h2o2":"^8.3.3","@types/hapi__hapi":"^20.0.10","@types/hapi__inert":"^5.2.3","@types/has-ansi":"^3.0.0","@types/history":"^4.7.3","@types/hjson":"^2.4.2","@types/http-aws-es":"6.0.2","@types/jest":"^27.4.0","@types/joi":"^13.4.2","@types/jquery":"^3.3.31","@types/js-yaml":"^4.0.5","@types/json-stable-stringify":"^1.0.32","@types/json5":"^0.0.30","@types/license-checker":"15.0.0","@types/listr":"^0.14.0","@types/lodash":"^4.14.170","@types/lru-cache":"^5.1.0","@types/lucene":"^2.1.7","@types/markdown-it":"^14.1.2","@types/mocha-next":"npm:@types/mocha@^10.0.1","@types/mock-fs":"^4.10.0","@types/moment-timezone":"^0.5.12","@types/mustache":"^0.8.31","@types/node":"~18.7.0","@types/node
6-forge":"^1.3.14","@types/normalize-path":"^3.0.0","@types/pegjs":"^0.10.1","@types/pngjs":"^3.4.0","@types/prop-types":"^15.7.3","@types/reach__router":"^1.2.6","@types/react":"^16.14.23","@types/react-dom":"^16.9.8","@types/react-grid-layout":"^0.16.7","@types/react-redux":"^7.1.9","@types/react-resize-detector":"^4.0.1","@types/react-router":"^5.1.17","@types/react-router-dom":"^5.3.2","@types/react-virtualized":"^9.18.7","@types/recompose":"^0.30.6","@types/redux-mock-store":"^1.0.6","@types/selenium-webdriver":"^4.0.9","@types/semver":"^7.5.0","@types/sinon":"^7.0.13","@types/strip-ansi":"^5.2.1","@types/styled-components":"^5.1.19","@types/supertest":"^2.0.12","@types/supertest-as-promised":"^2.0.38","@types/tapable":"^1.0.6","@types/testing-library__jest-dom":"^5.14.2","@types/tough-cookie":"^4.0.1","@types/type-detect":"^4.0.1","@types/uuid":"^3.4.4","@types/vinyl":"^2.0.4","@types/vinyl-fs":"^2.4.11","@types/webpack":"^4.41.31","@types/webpack-env":"^1.16.3","@types/zen-observable":"^0.8.0","@typescript-eslint/eslint-plugin":"^3.10.0","@typescript-eslint/parser":"^3.10.0","antlr4ng-cli":"^2.0.0","archiver":"^5.3.0","axe-core":"^4.0.2","babel-eslint":"^10.0.3","babel-jest":"^27.5.1","brace":"0.11.1","chai":"3.5.0","chance":"1.0.18","cheerio":"1.0.0-rc.1","chromedriver":"^107.0.3","classnames":"2.3.1","compare-versions":"3.5.1","cypress":"12.17.4","d3":"3.5.17","d3-cloud":"1.2.5","dedent":"^0.7.0","delete-empty":"^2.0.0","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.5","enzyme-to-json":"^3.5.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-ban":"^1.4.0","eslint-plugin-cypress":"^2.8.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-mocha-next":"npm:eslint-plugin-mocha@^10.1.0","eslint-plugin-no-unsanitized":"^3.0.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react":"^7.20.3","eslint-plugin-react-hooks":"^4.0.4","eslint-plugin-react-perf":"^3.2.3","exit-hook":"^2.2.0","fetch-mock":"^7.3.9","fp-ts":"^2.3.1","geckodriver":"^4.5.1","getopts":"^2.2.5","grunt":"^1.5.2","grunt-available-tasks":"^0.6.3","grunt-cli":"^1.4.3","grunt-peg":"^2.0.1","grunt-run":"^0.8.1","gulp-babel":"^8.0.0","gulp-sourcemaps":"2.6.5","has-ansi":"^3.0.0","history":"^4.9.0","immer":"^9.0.6","intl-messageformat-parser":"^1.4.0","jest":"^27.5.1","jest-canvas-mock":"^2.5.1","jest-raw-loader":"^1.0.1","jimp":"^1.6.1","jquery":"^3.5.0","json-stringify-pretty-compact":"1.2.0","json5":"^2.2.3","leaflet":"1.5.1","leaflet-draw":"0.4.14","leaflet-responsive-popup":"0.6.4","leaflet-vega":"^0.9.0","leaflet.heat":"0.2.0","less":"^4.1.3","license-checker":"^16.0.0","listr":"^0.14.1","load-grunt-config":"^4.0.1","load-json-file":"^6.2.0","luxon":"^3.2.1","markdown-it":"^14.1.1","mocha-next":"npm:mocha@^10.1.0","mock-fs":"^4.12.0","monaco-editor":"~0.17.0","ms-chromium-edge-driver":"^0.4.3","murmurhash3js":"3.0.1","mutation-observer":"^1.0.3","nock":"12.0.3","node-stream-zip":"^1.15.0","normalize-path":"^3.0.0","nyc":"^15.1.0","pixelmatch":"^5.1.0","pngjs":"^3.4.0","postcss":"^8.4.5","prettier":"^2.1.1","prop-types":"^15.7.2","react":"^16.14.0","react-grid-layout":"^0.16.2","react-markdown":"^4.3.1","react-monaco-editor":"~0.27.0","react-redux":"^7.2.0","react-resize-detector":"^4.2.0","react-router-dom":"^5.3.0","react-sizeme":"^2.3.6","react-test-renderer":"^16.12.0","reactcss":"1.2.3","redux":"^4.0.5","redux-mock-store":"^1.5.4","regenerate":"^1.4.0","reselect":"^4.0.0","resize-observer-polyfill":"^1.5.1","rimraf":"^5.0.10","selenium-webdriver":"^4.0.0-alpha.7","simple-git":"^3.36.0","sinon":"^7.4.2","strip-ansi":"^
66.0.0","stylelint":"^14.5.2","stylelint-config-standard-scss":"^3.0.0","supertest":"^6.3.3","supertest-as-promised":"^4.0.2","tape":"^5.0.1","topojson-client":"3.0.0","tough-cookie":"^4.1.3","tree-kill":"^1.2.2","typescript":"4.0.2","vega":"^6.2.0","vega-interpreter":"^1.2.1","vega-lite":"^6.4.2","vega-schema-url-parser":"^2.1.0","vega-tooltip":"^0.30.0","vinyl-fs":"^3.0.3","xml2js":"^0.5.0","xmlbuilder":"13.0.2","zlib":"^1.0.5"},"engines":{"node":">=14.20.1 <19","yarn":"^1.22.10"}}')},function(module){module.exports=JSON.parse('{"b":">=2.0.0","a":["opensearch-index-management"]}')},function(module,exports,__webpack_require__){"use strict";var $TypeError=__webpack_require__(49);var inspect=__webpack_require__(191);var getSideChannelList=__webpack_require__(193);var getSideChannelMap=__webpack_require__(132);var getSideChannelWeakMap=__webpack_require__(217);var makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;module.exports=function getSideChannel(){var $channelData;var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError("Side channel does not contain "+inspect(key))}},delete:function(key){return!!$channelData&&$channelData["delete"](key)},get:function(key){return $channelData&&$channelData.get(key)},has:function(key){return!!$channelData&&$channelData.has(key)},set:function(key,value){if(!$channelData){$channelData=makeChannel()}$channelData.set(key,value)}};return channel}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(196);var callBound=__webpack_require__(134);var inspect=__webpack_require__(215);var $TypeError=__webpack_require__(49);var $Map=GetIntrinsic("%Map%",true);var $mapGet=callBound("Map.prototype.get",true);var $mapSet=callBound("Map.prototype.set",true);var $mapHas=callBound("Map.prototype.has",true);var $mapDelete=callBound("Map.prototype.delete",true);var $mapSize=callBound("Map.prototype.size",true);module.exports=!!$Map&&function getSideChannelMap(){var $m;var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError("Side channel does not contain "+inspect(key))}},delete:function(key){if($m){var result=$mapDelete($m,key);if($mapSize($m)===0){$m=void undefined}return result}return false},get:function(key){if($m){return $mapGet($m,key)}},has:function(key){if($m){return $mapHas($m,key)}return false},set:function(key,value){if(!$m){$m=new $Map}$mapSet($m,key,value)}};return channel}},function(module,exports,__webpack_require__){"use strict";var bind=__webpack_require__(50);var $TypeError=__webpack_require__(49);var $call=__webpack_require__(62);var $actualApply=__webpack_require__(204);module.exports=function callBindBasic(args){if(args.length<1||typeof args[0]!=="function"){throw new $TypeError("a function is required")}return $actualApply(bind,$call,args)}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(209);var callBindBasic=__webpack_require__(133);var $indexOf=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);if(typeof intrinsic==="function"&&$indexOf(name,".prototype.")>-1){return callBindBasic([intrinsic])}return intrinsic}},function(module,exports,__webpack_require__){"use strict";var formats=__webpack_require__(102);var getSideChannel=__webpack_require__(131);var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var overflowChannel=getSideChannel();var markOverflow=function markOverflow(obj,maxIndex){overflowChannel.set(obj,maxIndex);return obj};var isOverflow=function isOverflow(obj){return overflowChannel.has(obj)};var getMaxIndex=function getMaxIndex(obj){return overflowChannel.get(obj)};var setMaxIndex=function setMaxIndex(obj,maxIndex){overflowChannel.set(obj,maxIndex)};var hexTable=function(){var array=[];for(var i=0;i<256;++i){array[array.length]="%"+((i<16?"0":"")+i.toString(16)).toUpperCase()}return array}();var compactQueue=function compactQueue(queue){while(queue.length>1){var item=queue.pop();var obj=item.obj[item.prop];if(isArray(obj)){var compacted=[];for(var j=0;j<obj.length;++j){if(typeof obj[j]!=="undefined"){compacted[compacted.length]=obj[j]}}item.obj[item.prop]=compacted}}};var arrayToObject=function arrayToObject(source,options){var obj=options&&options.plainObjects?{__proto__:null}:{};for(var i=0;i<source.length;++i){if(typeof source[i]!=="undefined"){obj[i]=source[i]}}return obj};var merge=function merge(target,source,options){if(!source){return target}if(typeof source!=="object"&&typeof source!=="function"){if(isArray(target)){var nextIndex=target.length;if(options&&typeof options.arrayLimit==="number"&&nextIndex>options.arrayLimit){return markOverflow(arrayToObject(target.concat(source),options),nextIndex)}target[nextIndex]=source}else if(target&&typeof target==="object"){if(isOverflow(target)){var newIndex=getMaxIndex(target)+1;target[newIndex]=source;setMaxIndex(target,newIndex)}else if(options&&options.strictMerge){return[target,source]}else if(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source)){target[source]=true}}else{return[target,source]}return target}if(!target||typeof target!=="object"){if(isOverflow(source)){var sourceKeys=Object.keys(source);var result=options&&options.plainObjects?{__proto__:null,0:target}:{0:target};for(var m=0;m<sourceKeys.length;
6m++){var oldKey=parseInt(sourceKeys[m],10);result[oldKey+1]=source[sourceKeys[m]]}return markOverflow(result,getMaxIndex(source)+1)}var combined=[target].concat(source);if(options&&typeof options.arrayLimit==="number"&&combined.length>options.arrayLimit){return markOverflow(arrayToObject(combined,options),combined.length-1)}return combined}var mergeTarget=target;if(isArray(target)&&!isArray(source)){mergeTarget=arrayToObject(target,options)}if(isArray(target)&&isArray(source)){source.forEach((function(item,i){if(has.call(target,i)){var targetItem=target[i];if(targetItem&&typeof targetItem==="object"&&item&&typeof item==="object"){target[i]=merge(targetItem,item,options)}else{target[target.length]=item}}else{target[i]=item}}));return target}return Object.keys(source).reduce((function(acc,key){var value=source[key];if(has.call(acc,key)){acc[key]=merge(acc[key],value,options)}else{acc[key]=value}if(isOverflow(source)&&!isOverflow(acc)){markOverflow(acc,getMaxIndex(source))}if(isOverflow(acc)){var keyNum=parseInt(key,10);if(String(keyNum)===key&&keyNum>=0&&keyNum>getMaxIndex(acc)){setMaxIndex(acc,keyNum)}}return acc}),mergeTarget)};var assign=function assignSingleSource(target,source){return Object.keys(source).reduce((function(acc,key){acc[key]=source[key];return acc}),target)};var decode=function(str,defaultDecoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if(charset==="iso-8859-1"){return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape)}try{return decodeURIComponent(strWithoutPlus)}catch(e){return strWithoutPlus}};var limit=1024;var encode=function encode(str,defaultEncoder,charset,kind,format){if(str.length===0){return str}var string=str;if(typeof str==="symbol"){string=Symbol.prototype.toString.call(str)}else if(typeof str!=="string"){string=String(str)}if(charset==="iso-8859-1"){return escape(string).replace(/%u[0-9a-f]{4}/gi,(function($0){return"%26%23"+parseInt($0.slice(2),16)+"%3B"}))}var out="";for(var j=0;j<string.length;j+=limit){var segment=string.length>=limit?string.slice(j,j+limit):string;var arr=[];for(var i=0;i<segment.length;++i){var c=segment.charCodeAt(i);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||format===formats.RFC1738&&(c===40||c===41)){arr[arr.length]=segment.charAt(i);continue}if(c<128){arr[arr.length]=hexTable[c];continue}if(c<2048){arr[arr.length]=hexTable[192|c>>6]+hexTable[128|c&63];continue}if(c<55296||c>=57344){arr[arr.length]=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|c&63];continue}i+=1;c=65536+((c&1023)<<10|segment.charCodeAt(i)&1023);arr[arr.length]=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|c&63]}out+=arr.join("")}return out};var compact=function compact(value){var queue=[{obj:{o:value},prop:"o"}];var refs=[];for(var i=0;i<queue.length;++i){var item=queue[i];var obj=item.obj[item.prop];var keys=Object.keys(obj);for(var j=0;j<keys.length;++j){var key=keys[j];var val=obj[key];if(typeof val==="object"&&val!==null&&refs.indexOf(val)===-1){queue[queue.length]={obj:obj,prop:key};refs[refs.length]=val}}}compactQueue(queue);return value};var isRegExp=function isRegExp(obj){return Object.prototype.toString.call(obj)==="[object RegExp]"};var isBuffer=function isBuffer(obj){if(!obj||typeof obj!=="object"){return false}return!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj))};var combine=function combine(a,b,arrayLimit,plainObjects){if(isOverflow(a)){var newIndex=getMaxIndex(a)+1;a[newIndex]=b;setMaxIndex(a,newIndex);return a}var result=[].concat(a,b);if(result.length>arrayLimit){return markOverflow(arrayToObject(result,{plainObjects:plainObjects}),result.length-1)}return result};var maybeMap=function maybeMap(val,fn){if(isArray(val)){var mapped=[];for(var i=0;i<val.length;i+=1){mapped[mapped.length]=fn(val[i])}return mapped}return fn(val)};module.exports={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,markOverflow:markOverflow,maybeMap:maybeMap,merge:merge}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(Buffer){__webpack_require__.d(__webpack_exports__,"a",(function(){return Sha256}));function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
6734187,3204031479,3329325298];const W=new Array(64);class Sha256{constructor(){_defineProperty(this,"_a",void 0);_defineProperty(this,"_b",void 0);_defineProperty(this,"_c",void 0);_defineProperty(this,"_d",void 0);_defineProperty(this,"_e",void 0);_defineProperty(this,"_f",void 0);_defineProperty(this,"_g",void 0);_defineProperty(this,"_h",void 0);_defineProperty(this,"_block",void 0);_defineProperty(this,"_finalSize",void 0);_defineProperty(this,"_blockSize",void 0);_defineProperty(this,"_len",void 0);_defineProperty(this,"_s",void 0);_defineProperty(this,"_w",void 0);this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;this._w=W;const blockSize=64;const finalSize=56;this._block=Buffer.alloc(blockSize);this._finalSize=finalSize;this._blockSize=blockSize;this._len=0;this._s=0}update(data,encoding){if(typeof data==="string"){encoding=encoding||"utf8";data=Buffer.from(data,encoding)}const l=this._len+=data.length;let s=this._s||0;let f=0;const buffer=this._block;while(s<l){const t=Math.min(data.length,f+this._blockSize-s%this._blockSize);const ch=t-f;for(let i=0;i<ch;i++){buffer[s%this._blockSize+i]=data[i+f]}s+=ch;f+=ch;if(s%this._blockSize===0){this._update(buffer)}}this._s=s;return this}digest(encoding){const l=this._len*8;this._block[this._len%this._blockSize]=128;this._block.fill(0,this._len%this._blockSize+1);if(l%(this._blockSize*8)>=this._finalSize*8){this._update(this._block);this._block.fill(0)}this._block.writeInt32BE(l,this._blockSize-4);this._update(this._block);const hash=this._hash();return hash.toString(encoding)}_update(M){const W=this._w;let a=this._a|0;let b=this._b|0;let c=this._c|0;let d=this._d|0;let e=this._e|0;let f=this._f|0;let g=this._g|0;let h=this._h|0;let i;for(i=0;i<16;++i)W[i]=M.readInt32BE(i*4);for(;i<64;++i)W[i]=gamma1(W[i-2])+W[i-7]+gamma0(W[i-15])+W[i-16]|0;for(let j=0;j<64;++j){const T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0;const T2=sigma0(a)+maj(a,b,c)|0;h=g;g=f;f=e;e=d+T1|0;d=c;c=b;b=a;a=T1+T2|0}this._a=a+this._a|0;this._b=b+this._b|0;this._c=c+this._c|0;this._d=d+this._d|0;this._e=e+this._e|0;this._f=f+this._f|0;this._g=g+this._g|0;this._h=h+this._h|0}_hash(){const H=Buffer.alloc(32);H.writeInt32BE(this._a,0);H.writeInt32BE(this._b,4);H.writeInt32BE(this._c,8);H.writeInt32BE(this._d,12);H.writeInt32BE(this._e,16);H.writeInt32BE(this._f,20);H.writeInt32BE(this._g,24);H.writeInt32BE(this._h,28);return H}}function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function gamma1(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}}).call(this,__webpack_require__(249).Buffer)},function(module,exports){const numeric=/^[0-9]+$/;const compareIdentifiers=(a,b)=>{const anum=numeric.test(a);const bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1};const rcompareIdentifiers=(a,b)=>compareIdentifiers(b,a);module.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const eq=(a,b,loose)=>compare(a,b,loose)===0;module.exports=eq},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const neq=(a,b,loose)=>compare(a,b,loose)!==0;module.exports=neq},function(module,exports,__webpack_require__){const eq=__webpack_require__(138);const neq=__webpack_require__(139);const gt=__webpack_require__(73);const gte=__webpack_require__(107);const lt=__webpack_require__(106);const lte=__webpack_require__(108);const cmp=(a,op,b,loose)=>{switch(op){case"===":if(typeof a==="object"){a=a.version}if(typeof b==="object"){b=b.version}return a===b;case"!==":if(typeof a==="object"){a=a.version}if(typeof b==="object"){b=b.version}return a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError(`Invalid operator: ${op}`)}};module.exports=cmp},function(module,exports,__webpack_require__){var assignValue=__webpack_require__(398),castPath=__webpack_require__(409),isFunction=__webpack_require__(142),isIndex=__webpack_require__(438),isObject=__webpack_require__(113),toKey=__webpack_require__(439);function baseSet(object,path,value,customizer){if(!isObject(object)){return object}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key=="prototype"&&isFunction(nested)){throw new Error("Illegal access of function prototype")}if(index!=lastIndex){var objValue=hasOwnProperty.call(nested,key)?nested[key]:undefined;newValue=customizer?customizer(objValue,key,nested):undefined;if(newValue===undefined){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{}}}assignValue(nested,key,newValue);
6nested=nested[key]}return object}module.exports=baseSet},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(143),isObject=__webpack_require__(113);var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}module.exports=isFunction},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(111),getRawTag=__webpack_require__(403),objectToString=__webpack_require__(404);var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol?Symbol.toStringTag:undefined;function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module.exports=baseGetTag},function(module,exports){function eq(value,other){return value===other||value!==value&&other!==other}module.exports=eq},function(module,exports,__webpack_require__){"use strict";const numeric=/^[0-9]+$/;const compareIdentifiers=(a,b)=>{if(typeof a==="number"&&typeof b==="number"){return a===b?0:a<b?-1:1}const anum=numeric.test(a);const bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1};const rcompareIdentifiers=(a,b)=>compareIdentifiers(b,a);module.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const eq=(a,b,loose)=>compare(a,b,loose)===0;module.exports=eq},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const neq=(a,b,loose)=>compare(a,b,loose)!==0;module.exports=neq},function(module,exports,__webpack_require__){"use strict";const eq=__webpack_require__(146);const neq=__webpack_require__(147);const gt=__webpack_require__(81);const gte=__webpack_require__(119);const lt=__webpack_require__(118);const lte=__webpack_require__(120);const cmp=(a,op,b,loose)=>{switch(op){case"===":if(typeof a==="object"){a=a.version}if(typeof b==="object"){b=b.version}return a===b;case"!==":if(typeof a==="object"){a=a.version}if(typeof b==="object"){b=b.version}return a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError(`Invalid operator: ${op}`)}};module.exports=cmp},function(module,__webpack_exports__,__webpack_require__){"use strict"},function(module,__webpack_exports__,__webpack_require__){"use strict"},function(module,exports,__webpack_require__){"use strict";var util=__webpack_require__(57);module.exports=SchemaObject;function SchemaObject(obj){util.copy(obj,this)}},function(module,exports,__webpack_require__){"use strict";module.exports=function(data,opts){if(!opts)opts={};if(typeof opts==="function")opts={cmp:opts};var cycles=typeof opts.cycles==="boolean"?opts.cycles:false;var cmp=opts.cmp&&function(f){return function(node){return function(a,b){var aobj={key:a,value:node[a]};var bobj={key:b,value:node[b]};return f(aobj,bobj)}}}(opts.cmp);var seen=[];return function stringify(node){if(node&&node.toJSON&&typeof node.toJSON==="function"){node=node.toJSON()}if(node===undefined)return;if(typeof node=="number")return isFinite(node)?""+node:"null";if(typeof node!=="object")return JSON.stringify(node);var i,out;if(Array.isArray(node)){out="[";for(i=0;i<node.length;i++){if(i)out+=",";out+=stringify(node[i])||"null"}return out+"]"}if(node===null)return"null";if(seen.indexOf(node)!==-1){if(cycles)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var seenIndex=seen.push(node)-1;var keys=Object.keys(node).sort(cmp&&cmp(node));out="";for(i=0;i<keys.length;i++){var key=keys[i];var value=stringify(node[key]);if(!value)continue;if(out)out+=",";out+=JSON.stringify(key)+":"+value}seen.splice(seenIndex,1);return"{"+out+"}"}(data)}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_validate(it,$keyword,$ruleType){var out="";var $async=it.schema.$async===true,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}
vendor: 25,227 bytes, line 6
6if(it.isTop){out+=" var validate = ";if($async){it.async=true;out+="async "}out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if($id&&(it.opts.sourceCode||it.opts.processCode)){out+=" "+("/*# sourceURL="+$id+" */")+" "}}if(typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;if(it.schema===false){if(it.isTop){$breakOnError=true}else{out+=" var "+$valid+" = false; "}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'boolean schema is false' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(it.isTop){if($async){out+=" return data; "}else{out+=" validate.errors = null; return true; "}}else{out+=" var "+$valid+" = true; "}}if(it.isTop){out+=" }; return validate; "}return out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema));it.baseId=it.baseId||it.rootId;delete it.isTop;it.dataPathArr=[""];if(it.schema.default!==undefined&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ";out+=" var errors = 0; ";out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id)it.baseId=it.resolve.url(it.baseId,$id);if($async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="";var $errorKeyword;var $typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===true){if($typeIsArray){if($typeSchema.indexOf("null")==-1)$typeSchema=$typeSchema.concat("null")}else if($typeSchema!="null"){$typeSchema=[$typeSchema,"null"];$typeIsArray=true}}if($typeIsArray&&$typeSchema.length==1){$typeSchema=$typeSchema[0];$typeIsArray=false}if(it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)')}else if(it.opts.extendRefs!==true){$refKeywords=false;it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"')}}if(it.schema.$comment&&it.opts.$comment){out+=" "+it.RULES.all.$comment.code(it,"$comment")}if($typeSchema){if(it.opts.coerceTypes){var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema)}var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===true||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";out+=" if ("+it.util[$method]($typeSchema,$data,it.opts.strictNumbers,true)+") { ";if($coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; var "+$coerced+" = undefined; ";if(it.opts.coerceTypes=="array"){out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+") && "+$data+".length == 1) { "+$data+" = "+$data+"[0]; "+$dataType+" = typeof "+$data+"; if ("+it.util.checkDataType(it.schema.type,$data,it.opts.strictNumbers)+") "+$coerced+" = "+$data+"; } "}out+=" if ("+$coerced+" !== undefined) ; ";var arr1=$coerceToTypes;if(arr1){var $type,$i=-1,l1=arr1.length-1;while($i<l1){$type=arr1[$i+=1];if($type=="string"){out+=" else if ("+$dataType+" == 'number' || "+$dataType+" == 'boolean') "+$coerced+" = '' + "+$data+"; else if ("+$data+" === null) "+$coerced+" = ''; "}else if($type=="number"||$type=="integer"){out+=" else if ("+$dataType+" == 'boolean' || "+$data+" === null || ("+$dataType+" == 'string' && "+$data+" && "+$data+" == +"+$data+" ";if($type=="integer"){out+=" && !("+$data+" % 1)"}out+=")) "+$coerced+" = +"+$data+"; "}else if($type=="boolean"){out+=" else if ("+$data+" === 'false' || "+$data+" === 0 || "+$data+" === null) "+$coerced+" = false; else if ("+$data+" === 'true' || "+$data+" === 1) "+$coerced+" = true; "}else if($type=="null"){out+=" else if ("+$data+" === '' || "+$data+" === 0 || "+$data+" === false) "+$coerced+" = null; "}else if(it.opts.coerceTypes=="array"&&$type=="array"){out+=" else if ("+$dataType+" == 'string' || "+$dataType+" == 'number' || "+$dataType+" == 'boolean' || "+$data+" == null) "+$coerced+" = ["+$data+"]; "}}}out+=" else { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' } ";if(it.opts.messages!==false){out+=" , message: 'should be ";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } if ("+$coerced+" !== undefined) { ";var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" "+$data+" = "+$coerced+"; ";if(!$dataLvl){out+="if ("+$parentData+" !== undefined)"}out+=" "+$parentData+"["+$parentDataProperty+"] = "+$coerced+"; } "}else{var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' } ";if(it.opts.messages!==false){out+=" , message: 'should be ";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}out+=" } "}}if(it.schema.$ref&&!$refKeywords){out+=" "+it.RULES.all.$ref.code(it,"$ref")+" ";if($breakOnError){out+=" } if (errors === ";if($top){out+="0"}else{out+="errs_"+$lvl}out+=") { ";$closingBraces2+="}"}}else{var arr2=it.RULES;if(arr2){var $rulesGroup,i2=-1,l2=arr2.length-1;while(i2<l2){$rulesGroup=arr2[i2+=1];if($shouldUseGroup($rulesGroup)){if($rulesGroup.type){out+=" if ("+it.util.checkDataType($rulesGroup.type,$data,it.opts.strictNumbers)+") { "}if(it.opts.useDefaults){if($rulesGroup.type=="object"&&it.schema.properties){var $schema=it.schema.properties,$schemaKeys=Object.keys($schema);var arr3=$schemaKeys;if(arr3){var $propertyKey,i3=-1,l3=arr3.length-1;while(i3<l3){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if($sch.default!==undefined){var $passData=$data+it.util.getProperty($propertyKey);if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else{out+=" if ("+$passData+" === undefined ";if(it.opts.useDefaults=="empty"){out+=" || "+$passData+" === null || "+$passData+" === '' "}out+=" ) "+$passData+" = ";if(it.opts.useDefaults=="shared"){out+=" "+it.useDefault($sch.default)+" "}else{out+=" "+JSON.stringify($sch.default)+" "}out+="; "}}}}}else if($rulesGroup.type=="array"&&Array.isArray(it.schema.items)){var arr4=it.schema.items;if(arr4){var $sch,$i=-1,l4=arr4.length-1;while($i<l4){$sch=arr4[$i+=1];if($sch.default!==undefined){var $passData=$data+"["+$i+"]";if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else{out+=" if ("+$passData+" === undefined ";if(it.opts.useDefaults=="empty"){out+=" || "+$passData+" === null || "+$passData+" === '' "}out+=" ) "+$passData+" = ";if(it.opts.useDefaults=="shared"){out+=" "+it.useDefault($sch.default)+" "}else{out+=" "+JSON.stringify($sch.default)+" "}out+="; "}}}}}}var arr5=$rulesGroup.rules;if(arr5){var $rule,i5=-1,l5=arr5.length-1;while(i5<l5){$rule=arr5[i5+=1];if($shouldUseRule($rule)){var $code=$rule.code(it,$rule.keyword,$rulesGroup.type);if($code){out+=" "+$code+" ";if($breakOnError){$closingBraces1+="}"}}}}}if($breakOnError){out+=" "+$closingBraces1+" ";$closingBraces1=""}if($rulesGroup.type){out+=" } ";if($typeSchema&&$typeSchema===$rulesGroup.type&&!$coerceToTypes){out+=" else { ";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' } ";if(it.opts.messages!==false){out+=" , message: 'should be ";if($typeIsArray){out+=""+$typeSchema.join(",")}else{out+=""+$typeSchema}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } "}}if($breakOnError){out+=" if (errors === ";if($top){out+="0"}else{out+="errs_"+$lvl}out+=") { ";$closingBraces2+="}"}}}}}if($breakOnError){out+=" "+$closingBraces2+" "}if($top){if($async){out+=" if (errors === 0) return data; ";out+=" else throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; ";out+=" return errors === 0; "}out+=" }; return validate;"}else{out+=" var "+$valid+" = errors === errs_"+$lvl+";"}function $shouldUseGroup($rulesGroup){var rules=$rulesGroup.rules;for(var i=0;i<rules.length;i++)if($shouldUseRule(rules[i]))return true}function $shouldUseRule($rule){return it.schema[$rule.keyword]!==undefined||$rule.implements&&$ruleImplementsSomeKeyword($rule)}function $ruleImplementsSomeKeyword($rule){var impl=$rule.implements;for(var i=0;i<impl.length;i++)if(it.schema[impl[i]]!==undefined)return true}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate__limit(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $isMax=$keyword=="maximum",$exclusiveKeyword=$isMax?"exclusiveMaximum":"exclusiveMinimum",$schemaExcl=it.schema[$exclusiveKeyword],$isDataExcl=it.opts.$data&&$schemaExcl&&$schemaExcl.$data,$op=$isMax?"<":">",$notOp=$isMax?">":"<",$errorKeyword=undefined;if(!($isData||typeof $schema=="number"||$schema===undefined)){throw new Error($keyword+" must be number")}if(!($isDataExcl||$schemaExcl===undefined||typeof $schemaExcl=="number"||typeof $schemaExcl=="boolean")){throw new Error($exclusiveKeyword+" must be number or boolean")}if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ";$schemaValueExcl="schemaExcl"+$lvl;out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: '"+$exclusiveKeyword+" should be boolean' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ";if($schema===undefined){$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaValueExcl;$isData=$isDataExcl}}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{if($exclIsNumber&&$schema===undefined){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaExcl;$notOp+="="}else{if($exclIsNumber)$schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema);if($schemaExcl===($exclIsNumber?$schemaValue:true)){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$notOp+="="}else{$exclusive=false;$opStr+="="}}var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ";if(it.opts.messages!==false){out+=" , message: 'should be "+$opStr+" ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate__limitItems(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxItems"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxItems"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" items' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate__limitLength(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxLength"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}if(it.opts.unicode===false){out+=" "+$data+".length "}else{out+=" ucs2length("+$data+") "}out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT be ";if($keyword=="maxLength"){out+="longer"}else{out+="shorter"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" characters' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate__limitProperties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxProperties"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxProperties"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" properties' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},function(module){module.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true}
vendor: 4,229 bytes, line 6
6,"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(module,exports,__webpack_require__){const internalRe=__webpack_require__(63);const constants=__webpack_require__(71);const SemVer=__webpack_require__(36);const identifiers=__webpack_require__(137);const parse=__webpack_require__(55);const valid=__webpack_require__(371);const clean=__webpack_require__(372);const inc=__webpack_require__(373);const diff=__webpack_require__(374);const major=__webpack_require__(375);const minor=__webpack_require__(376);const patch=__webpack_require__(377);const prerelease=__webpack_require__(378);const compare=__webpack_require__(40);const rcompare=__webpack_require__(379);const compareLoose=__webpack_require__(380);const compareBuild=__webpack_require__(105);const sort=__webpack_require__(381);const rsort=__webpack_require__(382);const gt=__webpack_require__(73);const lt=__webpack_require__(106);const eq=__webpack_require__(138);const neq=__webpack_require__(139);const gte=__webpack_require__(107);const lte=__webpack_require__(108);const cmp=__webpack_require__(140);const coerce=__webpack_require__(383);const Comparator=__webpack_require__(74);const Range=__webpack_require__(41);const satisfies=__webpack_require__(75);const toComparators=__webpack_require__(387);const maxSatisfying=__webpack_require__(388);const minSatisfying=__webpack_require__(389);const minVersion=__webpack_require__(390);const validRange=__webpack_require__(391);const outside=__webpack_require__(109);const gtr=__webpack_require__(392);const ltr=__webpack_require__(393);const intersects=__webpack_require__(394);const simplifyRange=__webpack_require__(395);const subset=__webpack_require__(396);module.exports={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers}},function(module,exports,__webpack_require__){exports.set=__webpack_require__(397);exports.setWith=__webpack_require__(440)},function(module,exports){module.exports=__osdSharedDeps__.ElasticNumeral},function(module,exports){module.exports=function deepFreeze(o){Object.freeze(o);var oIsFunction=typeof o==="function";var hasOwnProp=Object.prototype.hasOwnProperty;
vendor: 4,601 bytes, line 6
6Object.getOwnPropertyNames(o).forEach((function(prop){if(hasOwnProp.call(o,prop)&&(oIsFunction?prop!=="caller"&&prop!=="callee"&&prop!=="arguments":true)&&o[prop]!==null&&(typeof o[prop]==="object"||typeof o[prop]==="function")&&!Object.isFrozen(o[prop])){deepFreeze(o[prop])}}));return o}},function(module,exports,__webpack_require__){"use strict";var R=typeof Reflect==="object"?Reflect:null;var ReflectApply=R&&typeof R.apply==="function"?R.apply:function ReflectApply(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)};var ReflectOwnKeys;if(R&&typeof R.ownKeys==="function"){ReflectOwnKeys=R.ownKeys}else if(Object.getOwnPropertySymbols){ReflectOwnKeys=function ReflectOwnKeys(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}}else{ReflectOwnKeys=function ReflectOwnKeys(target){return Object.getOwnPropertyNames(target)}}function ProcessEmitWarning(warning){if(console&&console.warn)console.warn(warning)}var NumberIsNaN=Number.isNaN||function NumberIsNaN(value){return value!==value};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter;module.exports.once=once;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._eventsCount=0;EventEmitter.prototype._maxListeners=undefined;var defaultMaxListeners=10;function checkListener(listener){if(typeof listener!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof listener)}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:true,get:function(){return defaultMaxListeners},set:function(arg){if(typeof arg!=="number"||arg<0||NumberIsNaN(arg)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+arg+".")}defaultMaxListeners=arg}});EventEmitter.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};EventEmitter.prototype.setMaxListeners=function setMaxListeners(n){if(typeof n!=="number"||n<0||NumberIsNaN(n)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".")}this._maxListeners=n;return this};function _getMaxListeners(that){if(that._maxListeners===undefined)return EventEmitter.defaultMaxListeners;return that._maxListeners}EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)};EventEmitter.prototype.emit=function emit(type){var args=[];for(var i=1;i<arguments.length;i++)args.push(arguments[i]);var doError=type==="error";var events=this._events;if(events!==undefined)doError=doError&&events.error===undefined;else if(!doError)return false;if(doError){var er;if(args.length>0)er=args[0];if(er instanceof Error){throw er}var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));err.context=er;throw err}var handler=events[type];if(handler===undefined)return false;if(typeof handler==="function"){ReflectApply(handler,this,args)}else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i)ReflectApply(listeners[i],this,args)}return true};function _addListener(target,type,listener,prepend){var m;var events;var existing;checkListener(listener);events=target._events;if(events===undefined){events=target._events=Object.create(null);target._eventsCount=0}else{if(events.newListener!==undefined){target.emit("newListener",type,listener.listener?listener.listener:listener);events=target._events}existing=events[type]}if(existing===undefined){existing=events[type]=listener;++target._eventsCount}else{if(typeof existing==="function"){existing=events[type]=prepend?[listener,existing]:[existing,listener]}else if(prepend){existing.unshift(listener)}else{existing.push(listener)}m=_getMaxListeners(target);if(m>0&&existing.length>m&&!existing.warned){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;ProcessEmitWarning(w)}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};
6function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function _onceWrap(target,type,listener){var state={fired:false,wrapFn:undefined,target:target,type:type,listener:listener};var wrapped=onceWrapper.bind(state);wrapped.listener=listener;state.wrapFn=wrapped;return wrapped}EventEmitter.prototype.once=function once(type,listener){checkListener(listener);this.on(type,_onceWrap(this,type,listener));return this};EventEmitter.prototype.prependOnceListener=function prependOnceListener(type,listener){checkListener(listener);this.prependListener(type,_onceWrap(this,type,listener));return this};EventEmitter.prototype.removeListener=function removeListener(type,listener){var list,events,position,i,originalListener;checkListener(listener);events=this._events;if(events===undefined)return this;list=events[type];if(list===undefined)return this;if(list===listener||list.listener===listener){if(--this._eventsCount===0)this._events=Object.create(null);else{delete events[type];if(events.removeListener)this.emit("removeListener",type,list.listener||listener)}}else if(typeof list!=="function"){position=-1;for(i=list.length-1;i>=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else{spliceOne(list,position)}if(list.length===1)events[type]=list[0];if(events.removeListener!==undefined)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(events===undefined)return this;if(events.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(events[type]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete events[type]}return this}if(arguments.length===0){var keys=Object.keys(events);var key;for(i=0;i<keys.length;++i){key=keys[i];if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}listeners=events[type];if(typeof listeners==="function"){this.removeListener(type,listeners)}else if(listeners!==undefined){for(i=listeners.length-1;i>=0;i--){this.removeListener(type,listeners[i])}}return this};function _listeners(target,type,unwrap){var events=target._events;if(events===undefined)return[];var evlistener=events[type];if(evlistener===undefined)return[];if(typeof evlistener==="function")return unwrap?[evlistener.listener||evlistener]:[evlistener];return unwrap?unwrapListeners(evlistener):arrayClone(evlistener,evlistener.length)}EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,true)};EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,false)};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events!==undefined){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener!==undefined){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(arr,n){var copy=new Array(n);for(var i=0;i<n;++i)copy[i]=arr[i];return copy}function spliceOne(list,index){for(;index+1<list.length;index++)list[index]=list[index+1];list.pop()}function unwrapListeners(arr){var ret=new Array(arr.length);for(var i=0;i<ret.length;++i){ret[i]=arr[i].listener||arr[i]}return ret}function once(emitter,name){return new Promise((function(resolve,reject){function errorListener(err){emitter.removeListener(name,resolver);reject(err)}function resolver(){if(typeof emitter.removeListener==="function"){emitter.removeListener("error",errorListener)}resolve([].slice.call(arguments))}eventTargetAgnosticAddListener(emitter,name,resolver,{once:true});if(name!=="error"){addErrorHandlerIfEventEmitter(emitter,errorListener,{once:true})}}))}function addErrorHandlerIfEventEmitter(emitter,handler,flags){if(typeof emitter.on==="function"){eventTargetAgnosticAddListener(emitter,"error",handler,flags)}}function eventTargetAgnosticAddListener(emitter,name,listener,flags){if(typeof emitter.on==="function"){if(flags.once){emitter.once(name,listener)}else{emitter.on(name,listener)}}else if(typeof emitter.addEventListener==="function"){emitter.addEventListener(name,(function wrapListener(arg){if(flags.once){emitter.removeEventListener(name,wrapListener)}listener(arg)}))}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof emitter)}}},function(module,exports,__webpack_require__){(function(global){(function(global,factory){true?module.exports=factory():undefined})(this,(function(){"use strict";var MapShim=function(){if(typeof Map!=="undefined"){return Map}function getIndex(arr,key){var result=-1;arr.some((function(entry,index){if(entry[0]===key){result=index;return true}return false}));return result}return function(){function class_1(){this.__entries__=[]}Object.defineProperty(class_1.prototype,"size",{get:function(){return this.__entries__.length},enumerable:true,configurable:true});class_1.prototype.get=function(key){var index=getIndex(this.__entries__,key);var entry=this.__entries__[index];return entry&&entry[1]};class_1.prototype.set=function(key,value){var index=getIndex(this.__entries__,key);if(~index){this.__entries__[index][1]=value}else{this.__entries__.push([key,value])}};class_1.prototype.delete=function(key){var entries=this.__entries__;var index=getIndex(entries,key);if(~index){entries.splice(index,1)}};class_1.prototype.has=function(key){return!!~getIndex(this.__entries__,key)};class_1.prototype.clear=function(){this.__entries__.splice(0)};class_1.prototype.forEach=function(callback,ctx){if(ctx===void 0){ctx=null}for(var _i=0,_a=this.__entries__;_i<_a.length;_i++){var entry=_a[_i];callback.call(ctx,entry[1],entry[0])}};return class_1}()}();var isBrowser=typeof window!=="undefined"&&typeof document!=="undefined"&&window.document===document;var global$1=function(){if(typeof global!=="undefined"&&global.Math===Math){return global}if(typeof self!=="undefined"&&self.Math===Math){return self}if(typeof window!=="undefined"&&window.Math===Math){return window}
6return Function("return this")()}();var requestAnimationFrame$1=function(){if(typeof requestAnimationFrame==="function"){return requestAnimationFrame.bind(global$1)}return function(callback){return setTimeout((function(){return callback(Date.now())}),1e3/60)}}();var trailingTimeout=2;function throttle(callback,delay){var leadingCall=false,trailingCall=false,lastCallTime=0;function resolvePending(){if(leadingCall){leadingCall=false;callback()}if(trailingCall){proxy()}}function timeoutCallback(){requestAnimationFrame$1(resolvePending)}function proxy(){var timeStamp=Date.now();if(leadingCall){if(timeStamp-lastCallTime<trailingTimeout){return}trailingCall=true}else{leadingCall=true;trailingCall=false;setTimeout(timeoutCallback,delay)}lastCallTime=timeStamp}return proxy}var REFRESH_DELAY=20;var transitionKeys=["top","right","bottom","left","width","height","size","weight"];var mutationObserverSupported=typeof MutationObserver!=="undefined";var ResizeObserverController=function(){function ResizeObserverController(){this.connected_=false;this.mutationEventsAdded_=false;this.mutationsObserver_=null;this.observers_=[];this.onTransitionEnd_=this.onTransitionEnd_.bind(this);this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}ResizeObserverController.prototype.addObserver=function(observer){if(!~this.observers_.indexOf(observer)){this.observers_.push(observer)}if(!this.connected_){this.connect_()}};ResizeObserverController.prototype.removeObserver=function(observer){var observers=this.observers_;var index=observers.indexOf(observer);if(~index){observers.splice(index,1)}if(!observers.length&&this.connected_){this.disconnect_()}};ResizeObserverController.prototype.refresh=function(){var changesDetected=this.updateObservers_();if(changesDetected){this.refresh()}};ResizeObserverController.prototype.updateObservers_=function(){var activeObservers=this.observers_.filter((function(observer){return observer.gatherActive(),observer.hasActive()}));activeObservers.forEach((function(observer){return observer.broadcastActive()}));return activeObservers.length>0};ResizeObserverController.prototype.connect_=function(){if(!isBrowser||this.connected_){return}document.addEventListener("transitionend",this.onTransitionEnd_);window.addEventListener("resize",this.refresh);if(mutationObserverSupported){this.mutationsObserver_=new MutationObserver(this.refresh);this.mutationsObserver_.observe(document,{attributes:true,childList:true,characterData:true,subtree:true})}else{document.addEventListener("DOMSubtreeModified",this.refresh);this.mutationEventsAdded_=true}this.connected_=true};ResizeObserverController.prototype.disconnect_=function(){if(!isBrowser||!this.connected_){return}document.removeEventListener("transitionend",this.onTransitionEnd_);window.removeEventListener("resize",this.refresh);if(this.mutationsObserver_){this.mutationsObserver_.disconnect()}if(this.mutationEventsAdded_){document.removeEventListener("DOMSubtreeModified",this.refresh)}this.mutationsObserver_=null;this.mutationEventsAdded_=false;this.connected_=false};ResizeObserverController.prototype.onTransitionEnd_=function(_a){var _b=_a.propertyName,propertyName=_b===void 0?"":_b;var isReflowProperty=transitionKeys.some((function(key){return!!~propertyName.indexOf(key)}));if(isReflowProperty){this.refresh()}};ResizeObserverController.getInstance=function(){if(!this.instance_){this.instance_=new ResizeObserverController}return this.instance_};ResizeObserverController.instance_=null;return ResizeObserverController}();var defineConfigurable=function(target,props){for(var _i=0,_a=Object.keys(props);_i<_a.length;_i++){var key=_a[_i];Object.defineProperty(target,key,{value:props[key],enumerable:false,writable:false,configurable:true})}return target};var getWindowOf=function(target){var ownerGlobal=target&&target.ownerDocument&&target.ownerDocument.defaultView;return ownerGlobal||global$1};var emptyRect=createRectInit(0,0,0,0);function toFloat(value){return parseFloat(value)||0}function getBordersSize(styles){var positions=[];for(var _i=1;_i<arguments.length;_i++){positions[_i-1]=arguments[_i]}return positions.reduce((function(size,position){var value=styles["border-"+position+"-width"];return size+toFloat(value)}),0)}function getPaddings(styles){var positions=["top","right","bottom","left"];var paddings={};for(var _i=0,positions_1=positions;_i<positions_1.length;_i++){var position=positions_1[_i];var value=styles["padding-"+position];paddings[position]=toFloat(value)}return paddings}function getSVGContentRect(target){var bbox=target.getBBox();return createRectInit(0,0,bbox.width,bbox.height)}function getHTMLElementContentRect(target){var clientWidth=target.clientWidth,clientHeight=target.clientHeight;if(!clientWidth&&!clientHeight){return emptyRect}var styles=getWindowOf(target).getComputedStyle(target);var paddings=getPaddings(styles);var horizPad=paddings.left+paddings.right;var vertPad=paddings.top+paddings.bottom;var width=toFloat(styles.width),height=toFloat(styles.height);if(styles.boxSizing==="border-box"){if(Math.round(width+horizPad)!==clientWidth){
6width-=getBordersSize(styles,"left","right")+horizPad}if(Math.round(height+vertPad)!==clientHeight){height-=getBordersSize(styles,"top","bottom")+vertPad}}if(!isDocumentElement(target)){var vertScrollbar=Math.round(width+horizPad)-clientWidth;var horizScrollbar=Math.round(height+vertPad)-clientHeight;if(Math.abs(vertScrollbar)!==1){width-=vertScrollbar}if(Math.abs(horizScrollbar)!==1){height-=horizScrollbar}}return createRectInit(paddings.left,paddings.top,width,height)}var isSVGGraphicsElement=function(){if(typeof SVGGraphicsElement!=="undefined"){return function(target){return target instanceof getWindowOf(target).SVGGraphicsElement}}return function(target){return target instanceof getWindowOf(target).SVGElement&&typeof target.getBBox==="function"}}();function isDocumentElement(target){return target===getWindowOf(target).document.documentElement}function getContentRect(target){if(!isBrowser){return emptyRect}if(isSVGGraphicsElement(target)){return getSVGContentRect(target)}return getHTMLElementContentRect(target)}function createReadOnlyRect(_a){var x=_a.x,y=_a.y,width=_a.width,height=_a.height;var Constr=typeof DOMRectReadOnly!=="undefined"?DOMRectReadOnly:Object;var rect=Object.create(Constr.prototype);defineConfigurable(rect,{x:x,y:y,width:width,height:height,top:y,right:x+width,bottom:height+y,left:x});return rect}function createRectInit(x,y,width,height){return{x:x,y:y,width:width,height:height}}var ResizeObservation=function(){function ResizeObservation(target){this.broadcastWidth=0;this.broadcastHeight=0;this.contentRect_=createRectInit(0,0,0,0);this.target=target}ResizeObservation.prototype.isActive=function(){var rect=getContentRect(this.target);this.contentRect_=rect;return rect.width!==this.broadcastWidth||rect.height!==this.broadcastHeight};ResizeObservation.prototype.broadcastRect=function(){var rect=this.contentRect_;this.broadcastWidth=rect.width;this.broadcastHeight=rect.height;return rect};return ResizeObservation}();var ResizeObserverEntry=function(){function ResizeObserverEntry(target,rectInit){var contentRect=createReadOnlyRect(rectInit);defineConfigurable(this,{target:target,contentRect:contentRect})}return ResizeObserverEntry}();var ResizeObserverSPI=function(){function ResizeObserverSPI(callback,controller,callbackCtx){this.activeObservations_=[];this.observations_=new MapShim;if(typeof callback!=="function"){throw new TypeError("The callback provided as parameter 1 is not a function.")}this.callback_=callback;this.controller_=controller;this.callbackCtx_=callbackCtx}ResizeObserverSPI.prototype.observe=function(target){if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}if(typeof Element==="undefined"||!(Element instanceof Object)){return}if(!(target instanceof getWindowOf(target).Element)){throw new TypeError('parameter 1 is not of type "Element".')}var observations=this.observations_;if(observations.has(target)){return}observations.set(target,new ResizeObservation(target));this.controller_.addObserver(this);this.controller_.refresh()};ResizeObserverSPI.prototype.unobserve=function(target){if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}if(typeof Element==="undefined"||!(Element instanceof Object)){return}if(!(target instanceof getWindowOf(target).Element)){throw new TypeError('parameter 1 is not of type "Element".')}var observations=this.observations_;if(!observations.has(target)){return}observations.delete(target);if(!observations.size){this.controller_.removeObserver(this)}};ResizeObserverSPI.prototype.disconnect=function(){this.clearActive();this.observations_.clear();this.controller_.removeObserver(this)};ResizeObserverSPI.prototype.gatherActive=function(){var _this=this;this.clearActive();this.observations_.forEach((function(observation){if(observation.isActive()){_this.activeObservations_.push(observation)}}))};ResizeObserverSPI.prototype.broadcastActive=function(){if(!this.hasActive()){return}var ctx=this.callbackCtx_;var entries=this.activeObservations_.map((function(observation){return new ResizeObserverEntry(observation.target,observation.broadcastRect())}
6));this.callback_.call(ctx,entries,ctx);this.clearActive()};ResizeObserverSPI.prototype.clearActive=function(){this.activeObservations_.splice(0)};ResizeObserverSPI.prototype.hasActive=function(){return this.activeObservations_.length>0};return ResizeObserverSPI}();var observers=typeof WeakMap!=="undefined"?new WeakMap:new MapShim;var ResizeObserver=function(){function ResizeObserver(callback){if(!(this instanceof ResizeObserver)){throw new TypeError("Cannot call a class as a function.")}if(!arguments.length){throw new TypeError("1 argument required, but only 0 present.")}var controller=ResizeObserverController.getInstance();var observer=new ResizeObserverSPI(callback,controller,this);observers.set(this,observer)}return ResizeObserver}();["observe","unobserve","disconnect"].forEach((function(method){ResizeObserver.prototype[method]=function(){var _a;return(_a=observers.get(this))[method].apply(_a,arguments)}}));var index=function(){if(typeof global$1.ResizeObserver!=="undefined"){return global$1.ResizeObserver}return ResizeObserver}();return index}))}).call(this,__webpack_require__(48))},function(module,exports,__webpack_require__){"use strict";const internalRe=__webpack_require__(64);const constants=__webpack_require__(79);const SemVer=__webpack_require__(37);const identifiers=__webpack_require__(145);const parse=__webpack_require__(56);const valid=__webpack_require__(446);const clean=__webpack_require__(447);const inc=__webpack_require__(448);const diff=__webpack_require__(449);const major=__webpack_require__(450);const minor=__webpack_require__(451);const patch=__webpack_require__(452);const prerelease=__webpack_require__(453);const compare=__webpack_require__(44);const rcompare=__webpack_require__(454);const compareLoose=__webpack_require__(455);const compareBuild=__webpack_require__(117);const sort=__webpack_require__(456);const rsort=__webpack_require__(457);const gt=__webpack_require__(81);const lt=__webpack_require__(118);const eq=__webpack_require__(146);const neq=__webpack_require__(147);const gte=__webpack_require__(119);const lte=__webpack_require__(120);const cmp=__webpack_require__(148);const coerce=__webpack_require__(458);const Comparator=__webpack_require__(82);const Range=__webpack_require__(45);const satisfies=__webpack_require__(83);const toComparators=__webpack_require__(460);const maxSatisfying=__webpack_require__(461);const minSatisfying=__webpack_require__(462);const minVersion=__webpack_require__(463);const validRange=__webpack_require__(464);const outside=__webpack_require__(121);const gtr=__webpack_require__(465);const ltr=__webpack_require__(466);const intersects=__webpack_require__(467);const simplifyRange=__webpack_require__(468);const subset=__webpack_require__(469);module.exports={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers}},function(module,exports){module.exports=__osdSharedDeps__.ReactRouter},function(module,exports,__webpack_require__){module.exports=minimatch;minimatch.Minimatch=Minimatch;var path=function(){try{return __webpack_require__(170)}catch(e){}}()||{sep:"/"};minimatch.sep=path.sep;var GLOBSTAR=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var expand=__webpack_require__(470);var plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var qmark="[^/]";var star=qmark+"*?";var twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?";var reSpecials=charSet("().*{}+?[]^$\\!");function charSet(s){return s.split("").reduce((function(set,c){set[c]=true;return set}),{})}var slashSplit=/\/+/;minimatch.filter=filter;function filter(pattern,options){options=options||{};return function(p,i,list){return minimatch(p,pattern,options)}}function ext(a,b){b=b||{};var t={};
6Object.keys(a).forEach((function(k){t[k]=a[k]}));Object.keys(b).forEach((function(k){t[k]=b[k]}));return t}minimatch.defaults=function(def){if(!def||typeof def!=="object"||!Object.keys(def).length){return minimatch}var orig=minimatch;var m=function minimatch(p,pattern,options){return orig(p,pattern,ext(def,options))};m.Minimatch=function Minimatch(pattern,options){return new orig.Minimatch(pattern,ext(def,options))};m.Minimatch.defaults=function defaults(options){return orig.defaults(ext(def,options)).Minimatch};m.filter=function filter(pattern,options){return orig.filter(pattern,ext(def,options))};m.defaults=function defaults(options){return orig.defaults(ext(def,options))};m.makeRe=function makeRe(pattern,options){return orig.makeRe(pattern,ext(def,options))};m.braceExpand=function braceExpand(pattern,options){return orig.braceExpand(pattern,ext(def,options))};m.match=function(list,pattern,options){return orig.match(list,pattern,ext(def,options))};return m};Minimatch.defaults=function(def){return minimatch.defaults(def).Minimatch};function minimatch(p,pattern,options){assertValidPattern(pattern);if(!options)options={};if(!options.nocomment&&pattern.charAt(0)==="#"){return false}return new Minimatch(pattern,options).match(p)}function Minimatch(pattern,options){if(!(this instanceof Minimatch)){return new Minimatch(pattern,options)}assertValidPattern(pattern);if(!options)options={};pattern=pattern.trim();if(!options.allowWindowsEscape&&path.sep!=="/"){pattern=pattern.split(path.sep).join("/")}this.options=options;this.maxGlobstarRecursion=options.maxGlobstarRecursion!==undefined?options.maxGlobstarRecursion:200;this.set=[];this.pattern=pattern;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!options.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var pattern=this.pattern;var options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=true;return}if(!pattern){this.empty=true;return}this.parseNegate();var set=this.globSet=this.braceExpand();if(options.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,set);set=this.globParts=set.map((function(s){return s.split(slashSplit)}));this.debug(this.pattern,set);set=set.map((function(s,si,set){return s.map(this.parse,this)}),this);this.debug(this.pattern,set);set=set.filter((function(s){return s.indexOf(false)===-1}));this.debug(this.pattern,set);this.set=set}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var pattern=this.pattern;var negate=false;var options=this.options;var negateOffset=0;if(options.nonegate)return;for(var i=0,l=pattern.length;i<l&&pattern.charAt(i)==="!";i++){negate=!negate;negateOffset++}if(negateOffset)this.pattern=pattern.substr(negateOffset);this.negate=negate}minimatch.braceExpand=function(pattern,options){return braceExpand(pattern,options)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(pattern,options){if(!options){if(this instanceof Minimatch){options=this.options}else{options={}}}pattern=typeof pattern==="undefined"?this.pattern:pattern;assertValidPattern(pattern);if(options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)){return[pattern]}return expand(pattern)}var MAX_PATTERN_LENGTH=1024*64;var assertValidPattern=function(pattern){if(typeof pattern!=="string"){throw new TypeError("invalid pattern")}if(pattern.length>MAX_PATTERN_LENGTH){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var SUBPARSE={};function parse(pattern,isSub){assertValidPattern(pattern);var options=this.options;if(pattern==="**"){if(!options.noglobstar)return GLOBSTAR;else pattern="*"}if(pattern==="")return"";var re="";var hasMagic=!!options.nocase;var escaping=false;var patternListStack=[];var negativeLists=[];var stateChar;var inClass=false;var reClassStart=-1;var classStart=-1;var patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var self=this;function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star;hasMagic=true;break;case"?":re+=qmark;hasMagic=true;break;default:re+="\\"+stateChar;break}self.debug("clearStateChar %j %j",stateChar,re);stateChar=false}}for(var i=0,len=pattern.length,c;i<len&&(c=pattern.charAt(i));i++){this.debug("%s\t%s %s %j",pattern,i,re,c);if(escaping&&reSpecials[c]){re+="\\"+c;escaping=false;continue}switch(c){case"/":{return false}case"\\":clearStateChar();escaping=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",pattern,i,re,c);if(inClass){this.debug(" in class");if(c==="!"&&i===classStart+1)c="^";re+=c;continue}if(c==="*"&&stateChar==="*")continue;self.debug("call clearStateChar %j",stateChar);clearStateChar();stateChar=c;if(options.noext)clearStateChar();continue;case"(":if(inClass){re+="(";
vendor: 4,242 bytes, line 6
6continue}if(!stateChar){re+="\\(";continue}patternListStack.push({type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close});re+=stateChar==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",stateChar,re);stateChar=false;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar();hasMagic=true;var pl=patternListStack.pop();re+=pl.close;if(pl.type==="!"){negativeLists.push(pl)}pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length||escaping){re+="\\|";escaping=false;continue}clearStateChar();re+="|";continue;case"[":clearStateChar();if(inClass){re+="\\"+c;continue}inClass=true;classStart=i;reClassStart=re.length;re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c;escaping=false;continue}var cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch(er){var sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]";hasMagic=hasMagic||sp[1];inClass=false;continue}hasMagic=true;inClass=false;re+=c;continue;default:clearStateChar();if(escaping){escaping=false}else if(reSpecials[c]&&!(c==="^"&&inClass)){re+="\\"}re+=c}}if(inClass){cs=pattern.substr(classStart+1);sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0];hasMagic=hasMagic||sp[1]}for(pl=patternListStack.pop();pl;pl=patternListStack.pop()){var tail=re.slice(pl.reStart+pl.open.length);this.debug("setting tail",re,pl);tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(_,$1,$2){if(!$2){$2="\\"}return $1+$1+$2+"|"}));this.debug("tail=%j\n %s",tail,tail,pl,re);var t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=true;re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar();if(escaping){re+="\\\\"}var addPatternStart=false;switch(re.charAt(0)){case"[":case".":case"(":addPatternStart=true}for(var n=negativeLists.length-1;n>-1;n--){var nl=negativeLists[n];var nlBefore=re.slice(0,nl.reStart);var nlFirst=re.slice(nl.reStart,nl.reEnd-8);var nlLast=re.slice(nl.reEnd-8,nl.reEnd);var nlAfter=re.slice(nl.reEnd);nlLast+=nlAfter;var openParensBefore=nlBefore.split("(").length-1;var cleanAfter=nlAfter;for(i=0;i<openParensBefore;i++){cleanAfter=cleanAfter.replace(/\)[+*?]?/,"")}nlAfter=cleanAfter;var dollar="";if(nlAfter===""&&isSub!==SUBPARSE){dollar="$"}var newRe=nlBefore+nlFirst+nlAfter+dollar+nlLast;re=newRe}if(re!==""&&hasMagic){re="(?=.)"+re}if(addPatternStart){re=patternStart+re}if(isSub===SUBPARSE){return[re,hasMagic]}if(!hasMagic){return globUnescape(pattern)}var flags=options.nocase?"i":"";try{var regExp=new RegExp("^"+re+"$",flags)}catch(er){return new RegExp("$.")}regExp._glob=pattern;regExp._src=re;return regExp}minimatch.makeRe=function(pattern,options){return new Minimatch(pattern,options||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var set=this.set;if(!set.length){this.regexp=false;return this.regexp}var options=this.options;var twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot;var flags=options.nocase?"i":"";var re=set.map((function(pattern){return pattern.map((function(p){return p===GLOBSTAR?twoStar:typeof p==="string"?regExpEscape(p):p._src})).join("\\/")})).join("|");re="^(?:"+re+")$";if(this.negate)re="^(?!"+re+").*$";try{this.regexp=new RegExp(re,flags)}catch(ex){this.regexp=false}return this.regexp}minimatch.match=function(list,pattern,options){options=options||{};var mm=new Minimatch(pattern,options);list=list.filter((function(f){return mm.match(f)}));if(mm.options.nonull&&!list.length){list.push(pattern)}return list};Minimatch.prototype.match=function match(f,partial){if(typeof partial==="undefined")partial=this.partial;this.debug("match",f,this.pattern);if(this.comment)return false;if(this.empty)return f==="";if(f==="/"&&partial)return true;var options=this.options;if(path.sep!=="/"){f=f.split(path.sep).join("/")}f=f.split(slashSplit);this.debug(this.pattern,"split",f);var set=this.set;this.debug(this.pattern,"set",set);var filename;var i;for(i=f.length-1;i>=0;i--){filename=f[i];if(filename)break}for(i=0;i<set.length;i++){var pattern=set[i];var file=f;if(options.matchBase&&pattern.length===1){file=[filename]}var hit=this.matchOne(file,pattern,partial);
6if(hit){if(options.flipNegate)return true;return!this.negate}}if(options.flipNegate)return false;return this.negate};Minimatch.prototype.matchOne=function(file,pattern,partial){if(pattern.indexOf(GLOBSTAR)!==-1){return this._matchGlobstar(file,pattern,partial,0,0)}return this._matchOne(file,pattern,partial,0,0)};Minimatch.prototype._matchGlobstar=function(file,pattern,partial,fileIndex,patternIndex){var i;var firstgs=-1;for(i=patternIndex;i<pattern.length;i++){if(pattern[i]===GLOBSTAR){firstgs=i;break}}var lastgs=-1;for(i=pattern.length-1;i>=0;i--){if(pattern[i]===GLOBSTAR){lastgs=i;break}}var head=pattern.slice(patternIndex,firstgs);var body=partial?pattern.slice(firstgs+1):pattern.slice(firstgs+1,lastgs);var tail=partial?[]:pattern.slice(lastgs+1);if(head.length){var fileHead=file.slice(fileIndex,fileIndex+head.length);if(!this._matchOne(fileHead,head,partial,0,0)){return false}fileIndex+=head.length}var fileTailMatch=0;if(tail.length){if(tail.length+fileIndex>file.length)return false;var tailStart=file.length-tail.length;if(this._matchOne(file,tail,partial,tailStart,0)){fileTailMatch=tail.length}else{if(file[file.length-1]!==""||fileIndex+tail.length===file.length){return false}tailStart--;if(!this._matchOne(file,tail,partial,tailStart,0)){return false}fileTailMatch=tail.length+1}}if(!body.length){var sawSome=!!fileTailMatch;for(i=fileIndex;i<file.length-fileTailMatch;i++){var f=String(file[i]);sawSome=true;if(f==="."||f===".."||!this.options.dot&&f.charAt(0)==="."){return false}}return partial||sawSome}var bodySegments=[[[],0]];var currentBody=bodySegments[0];var nonGsParts=0;var nonGsPartsSums=[0];for(var bi=0;bi<body.length;bi++){var b=body[bi];if(b===GLOBSTAR){nonGsPartsSums.push(nonGsParts);currentBody=[[],0];bodySegments.push(currentBody)}else{currentBody[0].push(b);nonGsParts++}}var idx=bodySegments.length-1;var fileLength=file.length-fileTailMatch;for(var si=0;si<bodySegments.length;si++){bodySegments[si][1]=fileLength-(nonGsPartsSums[idx--]+bodySegments[si][0].length)}return!!this._matchGlobStarBodySections(file,bodySegments,fileIndex,0,partial,0,!!fileTailMatch)};Minimatch.prototype._matchGlobStarBodySections=function(file,bodySegments,fileIndex,bodyIndex,partial,globStarDepth,sawTail){var bs=bodySegments[bodyIndex];if(!bs){for(var i=fileIndex;i<file.length;i++){sawTail=true;var f=file[i];if(f==="."||f===".."||!this.options.dot&&f.charAt(0)==="."){return false}}return sawTail}var body=bs[0];var after=bs[1];while(fileIndex<=after){var m=this._matchOne(file.slice(0,fileIndex+body.length),body,partial,fileIndex,0);if(m&&globStarDepth<this.maxGlobstarRecursion){var sub=this._matchGlobStarBodySections(file,bodySegments,fileIndex+body.length,bodyIndex+1,partial,globStarDepth+1,sawTail);if(sub!==false){return sub}}
6var f=file[fileIndex];if(f==="."||f===".."||!this.options.dot&&f.charAt(0)==="."){return false}fileIndex++}return partial||null};Minimatch.prototype._matchOne=function(file,pattern,partial,fileIndex,patternIndex){var fi,pi,fl,pl;for(fi=fileIndex,pi=patternIndex,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi];var f=file[fi];this.debug(pattern,p,f);if(p===false||p===GLOBSTAR)return false;var hit;if(typeof p==="string"){hit=f===p;this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){return fi===fl-1&&file[fi]===""}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(process){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);var react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__);var _interface__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(150);function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}const LazyBaseEditor=react__WEBPACK_IMPORTED_MODULE_0___default.a.lazy(()=>{var _process;return((_process=process)===null||_process===void 0||(_process=Object({IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE:"true"}))===null||_process===void 0?void 0:_process.NODE_ENV)==="test"?__webpack_require__.e(1).then(__webpack_require__.bind(null,171)):__webpack_require__.e(5).then(__webpack_require__.bind(null,628))});const Fallback=()=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiDelayRender"],null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiLoadingContent"],{lines:3}));const JSONDiffEditor=Object(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Suspense,{fallback:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Fallback,null)},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LazyBaseEditor,_extends({},props,{ref:ref}))));__webpack_exports__["a"]=JSONDiffEditor}).call(this,__webpack_require__(54))},function(module,exports,__webpack_require__){"use strict";var compileSchema=__webpack_require__(551),resolve=__webpack_require__(122),Cache=__webpack_require__(555),SchemaObject=__webpack_require__(151),stableStringify=__webpack_require__(152),formats=__webpack_require__(556),rules=__webpack_require__(557),$dataMetaSchema=__webpack_require__(578),util=__webpack_require__(57);module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=__webpack_require__(579);var customKeyword=__webpack_require__(580);Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=__webpack_require__(124);Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema";var META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=formats(opts.format);this._cache=opts.cache||new Cache;this._loadingSchemas={};this._compilations=[];this.RULES=rules();this._getId=chooseGetId(opts);opts.loopRequired=opts.loopRequired||Infinity;if(opts.errorDataPath=="property")opts._errorDataPathProperty=true;if(opts.serialize===undefined)opts.serialize=stableStringify;this._metaOpts=getMetaSchemaOptions(this);if(opts.formats)addInitialFormats(this);if(opts.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof opts.meta=="object")this.addMetaSchema(opts.meta);if(opts.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){v=this.getSchema(schemaKeyRef);if(!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);if(v.$async!==true)this.errors=v.errors;return valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,undefined,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)this.addSchema(schema[i],undefined,_skipValidation,_meta);return this}var id=this._getId(schema);if(id!==undefined&&typeof id!="string")throw new Error("schema id must be string");key=resolve.normalizeId(key||id);checkUnique(this,key);this._schemas[key]=this._addSchema(schema,_skipValidation,_meta,true);return this}function addMetaSchema(schema,key,skipValidation){this.addSchema(schema,key,skipValidation,true);return this}function validateSchema(schema,throwOrLogError){var $schema=schema.$schema;
vendor: 7,314 bytes, line 6
6if($schema!==undefined&&typeof $schema!="string")throw new Error("$schema must be a string");$schema=$schema||this._opts.defaultMeta||defaultMeta(this);if(!$schema){this.logger.warn("meta-schema not available");this.errors=null;return true}var valid=this.validate($schema,schema);if(!valid&&throwOrLogError){var message="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(message);else throw new Error(message)}return valid}function defaultMeta(self){var meta=self._opts.meta;self._opts.defaultMeta=typeof meta=="object"?self._getId(meta)||meta:self.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:undefined;return self._opts.defaultMeta}function getSchema(keyRef){var schemaObj=_getSchemaObj(this,keyRef);switch(typeof schemaObj){case"object":return schemaObj.validate||this._compile(schemaObj);case"string":return this.getSchema(schemaObj);case"undefined":return _getSchemaFragment(this,keyRef)}}function _getSchemaFragment(self,ref){var res=resolve.schema.call(self,{schema:{}},ref);if(res){var schema=res.schema,root=res.root,baseId=res.baseId;var v=compileSchema.call(self,schema,root,undefined,baseId);self._fragments[ref]=new SchemaObject({ref:ref,fragment:true,schema:schema,root:root,baseId:baseId,validate:v});return v}}function _getSchemaObj(self,keyRef){keyRef=resolve.normalizeId(keyRef);return self._schemas[keyRef]||self._refs[keyRef]||self._fragments[keyRef]}function removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp){_removeAllSchemas(this,this._schemas,schemaKeyRef);_removeAllSchemas(this,this._refs,schemaKeyRef);return this}switch(typeof schemaKeyRef){case"undefined":_removeAllSchemas(this,this._schemas);_removeAllSchemas(this,this._refs);this._cache.clear();return this;case"string":var schemaObj=_getSchemaObj(this,schemaKeyRef);if(schemaObj)this._cache.del(schemaObj.cacheKey);delete this._schemas[schemaKeyRef];delete this._refs[schemaKeyRef];return this;case"object":var serialize=this._opts.serialize;var cacheKey=serialize?serialize(schemaKeyRef):schemaKeyRef;this._cache.del(cacheKey);var id=this._getId(schemaKeyRef);if(id){id=resolve.normalizeId(id);delete this._schemas[id];delete this._refs[id]}}return this}function _removeAllSchemas(self,schemas,regex){for(var keyRef in schemas){var schemaObj=schemas[keyRef];if(!schemaObj.meta&&(!regex||regex.test(keyRef))){self._cache.del(schemaObj.cacheKey);delete schemas[keyRef]}}}function _addSchema(schema,skipValidation,meta,shouldAddSchema){if(typeof schema!="object"&&typeof schema!="boolean")throw new Error("schema should be object or boolean");var serialize=this._opts.serialize;var cacheKey=serialize?serialize(schema):schema;var cached=this._cache.get(cacheKey);if(cached)return cached;shouldAddSchema=shouldAddSchema||this._opts.addUsedSchema!==false;var id=resolve.normalizeId(this._getId(schema));if(id&&shouldAddSchema)checkUnique(this,id);var willValidate=this._opts.validateSchema!==false&&!skipValidation;var recursiveMeta;if(willValidate&&!(recursiveMeta=id&&id==resolve.normalizeId(schema.$schema)))this.validateSchema(schema,true);var localRefs=resolve.ids.call(this,schema);var schemaObj=new SchemaObject({id:id,schema:schema,localRefs:localRefs,cacheKey:cacheKey,meta:meta});if(id[0]!="#"&&shouldAddSchema)this._refs[id]=schemaObj;this._cache.put(cacheKey,schemaObj);if(willValidate&&recursiveMeta)this.validateSchema(schema,true);return schemaObj}function _compile(schemaObj,root){if(schemaObj.compiling){schemaObj.validate=callValidate;callValidate.schema=schemaObj.schema;callValidate.errors=null;callValidate.root=root?root:callValidate;if(schemaObj.schema.$async===true)callValidate.$async=true;return callValidate}schemaObj.compiling=true;var currentOpts;if(schemaObj.meta){currentOpts=this._opts;this._opts=this._metaOpts}var v;try{v=compileSchema.call(this,schemaObj.schema,root,schemaObj.localRefs)}catch(e){delete schemaObj.validate;throw e}finally{schemaObj.compiling=false;if(schemaObj.meta)this._opts=currentOpts}schemaObj.validate=v;schemaObj.refs=v.refs;schemaObj.refVal=v.refVal;schemaObj.root=v.root;return v;function callValidate(){var _validate=schemaObj.validate;var result=_validate.apply(this,arguments);callValidate.errors=_validate.errors;return result}}function chooseGetId(opts){switch(opts.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}function _getId(schema){if(schema.$id)this.logger.warn("schema $id ignored",schema.$id);return schema.id}function _get$Id(schema){if(schema.id)this.logger.warn("schema id ignored",schema.id);return schema.$id}function _get$IdOrId(schema){if(schema.$id&&schema.id&&schema.$id!=schema.id)throw new Error("schema $id is different from id");return schema.$id||schema.id}function errorsText(errors,options){errors=errors||this.errors;if(!errors)return"No errors";options=options||{};var separator=options.separator===undefined?", ":options.separator;var dataVar=options.dataVar===undefined?"data":options.dataVar;var text="";for(var i=0;i<errors.length;i++){var e=errors[i];if(e)text+=dataVar+e.dataPath+" "+e.message+separator}return text.slice(0,-separator.length)}function addFormat(name,format){if(typeof format=="string")format=new RegExp(format);this._formats[name]=format;return this}function addDefaultMetaSchema(self){var $dataSchema;if(self._opts.$data){$dataSchema=__webpack_require__(583);self.addMetaSchema($dataSchema,$dataSchema.$id,true)}if(self._opts.meta===false)return;var metaSchema=__webpack_require__(158);if(self._opts.$data)metaSchema=$dataMetaSchema(metaSchema,META_SUPPORT_DATA);self.addMetaSchema(metaSchema,META_SCHEMA_ID,true);self._refs["http://json-schema.org/schema"]=META_SCHEMA_ID}function addInitialSchemas(self){var optsSchemas=self._opts.schemas;if(!optsSchemas)return;if(Array.isArray(optsSchemas))self.addSchema(optsSchemas);else for(var key in optsSchemas)self.addSchema(optsSchemas[key],key)}function addInitialFormats(self){for(var name in self._opts.formats){var format=self._opts.formats[name];self.addFormat(name,format)}}function addInitialKeywords(self){for(var name in self._opts.keywords){var keyword=self._opts.keywords[name];self.addKeyword(name,keyword)}}function checkUnique(self,id){if(self._schemas[id]||self._refs[id])throw new Error('schema with key or id "'+id+'" already exists')}function getMetaSchemaOptions(self){var metaOpts=util.copy(self._opts);for(var i=0;i<META_IGNORE_OPTIONS.length;i++)delete metaOpts[META_IGNORE_OPTIONS[i]];return metaOpts}function setLogger(self){var logger=self._opts.logger;if(logger===false){self.logger={log:noop,warn:noop,error:noop}}else{if(logger===undefined)logger=console;if(!(typeof logger=="object"&&logger.log&&logger.warn&&logger.error))throw new Error("logger must implement log, warn and error methods");self.logger=logger}}function noop(){}},function(module,exports,__webpack_require__){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();
6if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),(function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),(function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,(function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p})).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){if(typeof path!=="string")path=path+"";if(path.length===0)return".";var code=path.charCodeAt(0);var hasRoot=code===47;var end=-1;var matchedSlash=true;for(var i=path.length-1;i>=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,__webpack_require__(54))},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_val_loader_dist_cjs_js_key_indexManagementDashboards_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(173);var _node_modules_val_loader_dist_cjs_js_key_indexManagementDashboards_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_val_loader_dist_cjs_js_key_indexManagementDashboards_osd_ui_shared_deps_public_path_module_creator_js__WEBPACK_IMPORTED_MODULE_0__);__osdBundles__.define("plugin/indexManagementDashboards/public",__webpack_require__,623)},function(module,exports,__webpack_require__){__webpack_require__.p=window.__osdPublicPath__["indexManagementDashboards"]},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(175);case"v7light":return __webpack_require__(177);case"v8dark":return __webpack_require__(179);case"v8light":return __webpack_require__(181);case"v9dark":return __webpack_require__(183);case"v9light":return __webpack_require__(185)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(176);
6content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#000;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #333;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(255,255,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#093b56}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(152,162,179,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#093b56;border-radius:2px}.echLegendItem{color:#dfe5ef;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#25262e}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12px;font-size:0.75rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12px;font-size:0.75rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#98a2b3}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12px;font-size:0.75rem;line-height:1.5;color:#98a2b3}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(255,255,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(255,255,255,.2)}.echHighlighter__mask{fill:rgba(29,30,36,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#000;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #333;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#000;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #333;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(255,255,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#093b56}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(152,162,179,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#093b56;border-radius:2px}.echLegendItem{color:#dfe5ef;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#25262e}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12px;font-size:0.75rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12px;font-size:0.75rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#98a2b3}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12px;font-size:0.75rem;line-height:1.5;color:#98a2b3}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(255,255,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(255,255,255,.2)}.echHighlighter__mask{fill:rgba(29,30,36,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#000;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #333;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#25262e;color:#dfe5ef;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(152,162,179,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(52,55,65,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#343741;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #535966 0%, #535966 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#f66}.coreSystemRootDomElement .ace-tm .ace_method{color:#ec7bb3}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#25b2aa}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#4db867;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#1d1e24;color:#98a2b3;border-left:1px solid #343741}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#343741}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#fff}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#343741}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#5eaac6}.coreSystemRootDomElement .ace-tm .ace_constant{color:#d28f8f}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#a097f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#9698f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#4db867}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#9ba4b6}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#4db867}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#949ce6}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#98a2b3}.coreSystemRootDomElement .ace-tm .ace_string{color:#4db867}.coreSystemRootDomElement .ace-tm .ace_comment{color:#83ac97}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#5eaac6}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#9da1a9}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#5eaac6}.coreSystemRootDomElement .ace-tm .ace_variable{color:#5eaac6}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#98a2b3}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#9a9ada}.coreSystemRootDomElement .ace-tm .ace_heading{color:#9a97ff}.coreSystemRootDomElement .ace-tm .ace_list{color:#dd85c9}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#959ed0}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#ff7575}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#08334a}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #1d1e24}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#332918}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#192d2a}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #343741}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#25262e;border:1px solid #343741}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#25262e;color:#dfe5ef}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#25b2aa}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(52,55,65,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#5eaac6}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#343741;color:#dfe5ef}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(178);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#404040;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #595959;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(255,255,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e6f0f8}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(105,112,125,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e6f0f8;border-radius:2px}.echLegendItem{color:#343741;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#f5f7fa}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12px;font-size:0.75rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12px;font-size:0.75rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#69707d}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12px;font-size:0.75rem;line-height:1.5;color:#69707d}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(255,255,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(255,255,255,.2)}.echHighlighter__mask{fill:rgba(255,255,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#404040;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #595959;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#404040;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #595959;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(255,255,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e6f0f8}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(105,112,125,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e6f0f8;border-radius:2px}.echLegendItem{color:#343741;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#f5f7fa}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12px;font-size:0.75rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12px;font-size:0.75rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#69707d}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12px;font-size:0.75rem;line-height:1.5;color:#69707d}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(255,255,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(255,255,255,.2)}.echHighlighter__mask{fill:rgba(255,255,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(0,0,0,.1),0 6px 12px 0 rgba(0,0,0,.1),0 4px 4px 0 rgba(0,0,0,.1),0 2px 2px 0 rgba(0,0,0,.1);border-radius:4px;background-color:#404040;color:#fff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:0.875rem;line-height:1.5;padding:12px;font-size:12px;font-size:0.75rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #595959;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#f5f7fa;color:#343741;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(105,112,125,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(211,218,230,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#e9edf3;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #98A2B3 0%, #98A2B3 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#bd271e}.coreSystemRootDomElement .ace-tm .ace_method{color:#c80a68}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#00756c}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#007c1e;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#fff;color:#69707d;border-left:1px solid #e9edf3}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#d3dae6}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#000}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#d3dae6}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#00739d}.coreSystemRootDomElement .ace-tm .ace_constant{color:#900}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#5848f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#5457ea}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#007c1e}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#3c4c72}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#007c1e}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#5963b5}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#646a77}.coreSystemRootDomElement .ace-tm .ace_string{color:#007c1e}.coreSystemRootDomElement .ace-tm .ace_comment{color:#41755c}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#00739d}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#656b77}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#00739d}.coreSystemRootDomElement .ace-tm .ace_variable{color:#00739d}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#646a77}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#0000a2}.coreSystemRootDomElement .ace-tm .ace_heading{color:#0c07ff}.coreSystemRootDomElement .ace-tm .ace_list{color:#b90690}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#00168e}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#d00000}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#b3d3e9}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #fff}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#fdedcc}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#cce5e3}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #d3dae6}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#f5f7fa;border:1px solid #d3dae6}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#f5f7fa;color:#343741}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#00756c}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(211,218,230,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#00739d}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#e9edf3;color:#343741}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(180);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #3a4148;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#0e4342}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(141,152,163,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#0e4342;border-radius:2px}.echLegendItem{color:#dfe5ef;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:17.9999955px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#101b25}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(17.9999955px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:13.5px;font-size:0.75rem;line-height:1.333333;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:13.5px;font-size:0.75rem;line-height:1.333333;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#8d98a3}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:13.5px;font-size:0.75rem;line-height:1.333333;color:#8d98a3}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(10,18,26,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:13.5px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #3a4148;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #3a4148;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#0e4342}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(141,152,163,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#0e4342;border-radius:2px}.echLegendItem{color:#dfe5ef;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:17.9999955px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#101b25}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(17.9999955px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:13.5px;font-size:0.75rem;line-height:1.333333;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:13.5px;font-size:0.75rem;line-height:1.333333;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#8d98a3}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:13.5px;font-size:0.75rem;line-height:1.333333;color:#8d98a3}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(10,18,26,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:13.5px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #3a4148;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#101b25;color:#dfe5ef;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(141,152,163,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(41,56,71,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#293847;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #5B6875 0%, #5B6875 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#f66}.coreSystemRootDomElement .ace-tm .ace_method{color:#ea7ab3}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#24b2aa}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#43b45f;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#0a121a;color:#8d98a3;border-left:1px solid #293847}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#293847}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#fcfeff}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#293847}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#5daac6}.coreSystemRootDomElement .ace-tm .ace_constant{color:#d08e8f}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#9e96f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#9498f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#43b45f}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#99a3b6}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#43b45f}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#939ce6}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#98a2ac}.coreSystemRootDomElement .ace-tm .ace_string{color:#43b45f}.coreSystemRootDomElement .ace-tm .ace_comment{color:#81ac97}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#5daac6}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#97a0a9}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#5daac6}.coreSystemRootDomElement .ace-tm .ace_variable{color:#5daac6}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#98a2ac}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#9899da}.coreSystemRootDomElement .ace-tm .ace_heading{color:#9897ff}.coreSystemRootDomElement .ace-tm .ace_list{color:#db85c9}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#939dd0}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#ff7475}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#0d3c3d}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #0a121a}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#3b382d}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#213c3f}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #293847}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#101b25;border:1px solid #293847}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#101b25;color:#dfe5ef}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#24b2aa}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(41,56,71,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#5daac6}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#293847;color:#dfe5ef}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(182);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e4f2f2}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e4f2f2;border-radius:2px}.echLegendItem{color:#2a3947;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:17.9999955px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#e3e5e8}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(17.9999955px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:13.5px;font-size:0.75rem;line-height:1.333333;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:13.5px;font-size:0.75rem;line-height:1.333333;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#5a6875}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:13.5px;font-size:0.75rem;line-height:1.333333;color:#5a6875}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(252,254,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:13.5px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:700;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:700;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e4f2f2}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e4f2f2;border-radius:2px}.echLegendItem{color:#2a3947;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:17.9999955px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#e3e5e8}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(17.9999955px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:13.5px;font-size:0.75rem;line-height:1.333333;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:13.5px;font-size:0.75rem;line-height:1.333333;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#5a6875}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:13.5px;font-size:0.75rem;line-height:1.333333;color:#5a6875}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(252,254,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:13.5px;font-weight:700}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(10,18,26,.1),0 6px 12px 0 rgba(10,18,26,.1),0 4px 4px 0 rgba(10,18,26,.1),0 2px 2px 0 rgba(10,18,26,.1);border-radius:4px;background-color:#293847;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:15.75px;font-size:0.875rem;line-height:1.333333;padding:12px;font-size:13.5px;font-size:0.75rem;line-height:1.333333;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:700;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#e3e5e8;color:#2a3947;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(214,217,221,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#e9ecee;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #ADB4BA 0%, #ADB4BA 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#bd271e}.coreSystemRootDomElement .ace-tm .ace_method{color:#c80a6b}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#017570}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#017b24;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#fcfeff;color:#5a6875;border-left:1px solid #e9ecee}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#d6d9dd}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#0a1219}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#d6d9dd}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#016f97}.coreSystemRootDomElement .ace-tm .ace_constant{color:#900}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#5848f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#5055e1}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#017b24}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#3c4c72}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#017b24}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#5762b2}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#5a6875}.coreSystemRootDomElement .ace-tm .ace_string{color:#017b24}.coreSystemRootDomElement .ace-tm .ace_comment{color:#40725c}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#016f97}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#626970}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#016f97}.coreSystemRootDomElement .ace-tm .ace_variable{color:#016f97}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#5a6875}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#0000a2}.coreSystemRootDomElement .ace-tm .ace_heading{color:#0c07ff}.coreSystemRootDomElement .ace-tm .ace_list{color:#b90690}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#00168e}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#d20404}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#b3d9d8}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #fcfeff}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#fbedcc}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#cae4e3}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #d6d9dd}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#e3e5e8;border:1px solid #d6d9dd}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#e3e5e8;color:#2a3947}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#017570}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(214,217,221,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#016f97}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#e9ecee;color:#2a3947}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(184);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#19222b;color:#e3e5e9;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:500;border-bottom:solid 1px #34343e;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:500;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(227,229,233,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#013652}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(149,155,162,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#013652;border-radius:2px}.echLegendItem{color:#959ba2;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18.000003px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#19222b}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18.000003px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#959ba2}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;color:#959ba2}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(227,229,233,.2)}.echHighlighterOverlay__stroke{stroke:rgba(227,229,233,.2)}.echHighlighter__mask{fill:rgba(15,23,31,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12.000002px;font-weight:500}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#19222b;color:#e3e5e9;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:500;border-bottom:solid 1px #34343e;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#19222b;color:#e3e5e9;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:500;border-bottom:solid 1px #34343e;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:500;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(227,229,233,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#013652}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(149,155,162,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#013652;border-radius:2px}.echLegendItem{color:#959ba2;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18.000003px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#19222b}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18.000003px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#959ba2}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;color:#959ba2}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(227,229,233,.2)}.echHighlighterOverlay__stroke{stroke:rgba(227,229,233,.2)}.echHighlighter__mask{fill:rgba(15,23,31,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12.000002px;font-weight:500}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#19222b;color:#e3e5e9;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:500;border-bottom:solid 1px #34343e;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#19222b;color:#959ba2;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(149,155,162,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(42,53,64,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#2a3540;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #5C666F 0%, #5C666F 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#cd5d56}.coreSystemRootDomElement .ace-tm .ace_method{color:#dd80b3}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#20afa7}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#44b061;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#0f171f;color:#959ba2;border-left:1px solid #2a3540}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#2a3540}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#fcfeff}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#2a3540}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#62a7c2}.coreSystemRootDomElement .ace-tm .ace_constant{color:#c88f92}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#9890f3}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#9094f3}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#44b061}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#969fb2}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#44b061}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#9199e0}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#999fa6}.coreSystemRootDomElement .ace-tm .ace_string{color:#44b061}.coreSystemRootDomElement .ace-tm .ace_comment{color:#7fa795}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#62a7c2}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#969ca4}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#62a7c2}.coreSystemRootDomElement .ace-tm .ace_variable{color:#62a7c2}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#999fa6}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#9697d0}.coreSystemRootDomElement .ace-tm .ace_heading{color:#9292f3}.coreSystemRootDomElement .ace-tm .ace_list{color:#d083c1}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#929bc9}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#f07b7e}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#012f49}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #0f171f}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#322413}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#051e23}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #2a3540}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#19222b;border:1px solid #2a3540}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#19222b;color:#999fa6}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#20afa7}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(42,53,64,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#62a7c2}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#2a3540;color:#959ba2}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(186);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n/*!\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the "License"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.coreSystemRootDomElement{overflow-x:hidden;min-width:100%;min-height:100%}
6:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed{padding-top:49px}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiFlyout,:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiCollapsibleNav{top:49px;height:calc(100% - 49px)}@media only screen and (min-width: 768px)and (max-width: 991px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 992px)and (max-width: 1199px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}@media only screen and (min-width: 1920px){:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 49px);top:49px}}:not(.headerIsExpanded):not(.headerIsDense).euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:49px}.headerIsExpanded.euiBody--headerIsFixed{padding-top:98px}.headerIsExpanded.euiBody--headerIsFixed .euiFlyout,.headerIsExpanded.euiBody--headerIsFixed .euiCollapsibleNav{top:98px;height:calc(100% - 98px)}@media only screen and (min-width: 768px)and (max-width: 991px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}
6@media only screen and (min-width: 992px)and (max-width: 1199px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}@media only screen and (min-width: 1920px){.headerIsExpanded.euiBody--headerIsFixed .euiPageSideBar--sticky{max-height:calc(100vh - 98px);top:98px}}.headerIsExpanded.euiBody--headerIsFixed .euiOverlayMask--belowHeader{top:98px}.headerGlobalNav .euiHeaderSectionItem:empty{min-width:0}.chrHeaderHelpMenu__version{text-transform:none}.chrHeaderBadge__wrapper{align-self:center;margin-right:16px}.euiBody--collapsibleNavIsDocked .header__toggleNavButtonSection{display:none}.osdLoadingIndicator-hidden{visibility:hidden;animation-play-state:paused}.osdGlobalBannerList{padding:16px}.osdGlobalBannerList__item+.osdGlobalBannerList__item{margin-top:8px}.osdOverlayMountWrapper{display:flex;flex-direction:column;height:100%}#opensearch-dashboards-body{min-height:100%}.app-wrapper{display:flex;flex-flow:column nowrap;margin:0 auto;min-height:calc(100vh - 49px)}.headerIsExpanded .app-wrapper{min-height:calc(100vh - 98px)}.app-wrapper.hidden-chrome{min-height:100vh}.app-wrapper-panel{display:flex;flex:1 0 auto;flex-direction:column}.app-wrapper-panel>*{flex-shrink:0}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#2a3947;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:500;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:500;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e3eff8}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e3eff8;border-radius:2px}.echLegendItem{color:#2a3947;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18.000003px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#e3e5e8}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18.000003px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#5a6875}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;color:#5a6875}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(252,254,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12.000002px;font-weight:500}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#2a3947;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:500;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.echChartStatus{visibility:hidden;pointer-events:none;z-index:-100000;width:0;height:0;position:absolute}
6.echChartBackground{position:absolute;top:0;bottom:0;left:0;right:0}.echChart{position:relative;display:flex;height:100%}.echChart--column{flex-direction:column}.echContainer{flex:1;position:relative}.echChartPointerContainer{position:absolute;top:0;bottom:0;right:0;left:0;box-sizing:border-box;user-select:none}.echChartResizer{z-index:-10000000;position:absolute;bottom:0;top:0;left:0;right:0;box-sizing:border-box}.echBrushTool{position:absolute;top:0;left:0;margin:0;padding:0;box-sizing:border-box;overflow:hidden;pointer-events:none}.echTooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#2a3947;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echTooltip__list{padding:4px}.echTooltip__header{font-weight:500;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;margin-bottom:0;padding:4px 8px}.echTooltip__item{display:flex;min-width:1px}.echTooltip__item--container{display:flex;flex:1 1 auto;padding:3px;padding-left:0;min-width:1px}.echTooltip__item--backgroundColor{position:relative;width:4px;margin-right:3px;flex-shrink:0}.echTooltip__item--color{position:absolute;top:0;left:0;right:0;bottom:0}.echTooltip__label{overflow-wrap:break-word;word-wrap:break-word;min-width:1px;flex:1 1 auto}.echTooltip__value{font-weight:500;text-align:right;font-feature-settings:"tnum";margin-left:8px}.echTooltip__rowHighlighted{background-color:rgba(252,254,255,.1)}.echTooltip--hidden{opacity:0}
6[id^=echTooltipPortal]{pointer-events:none}[id^=echAnchor]{position:absolute;pointer-events:none}.echTooltipPortal__invisible{position:fixed;visibility:hidden;width:0;height:0}.echIcon{flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor}.echIcon svg{transform:translate(0, 0)}.echIcon:focus{opacity:1;background:#e3eff8}.echLegend .echLegendList{display:grid;grid-template-columns:minmax(0, 1fr)}.echLegend--horizontal .echLegendList{grid-column-gap:24px;grid-row-gap:8px;margin-top:8px;margin-bottom:8px}.echLegend--top,.echLegend--left{order:0}.echLegend--bottom,.echLegend--right{order:1}.echLegend--debug{background:rgba(238,130,238,.2);position:relative}.echLegend .echLegendListContainer{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;mask-image:linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 0%, red 7.5px, red calc(100% - 7.5px), rgba(255, 0, 0, 0.1) 100%);contain:paint;width:100%;overflow-y:auto;overflow-x:hidden}.echLegend .echLegendListContainer::-webkit-scrollbar{width:16px;height:16px}.echLegend .echLegendListContainer::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.echLegend .echLegendListContainer::-webkit-scrollbar-corner,.echLegend .echLegendListContainer::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.echLegend .echLegendListContainer:focus{outline:none}.echLegend .echLegendListContainer[tabindex="0"]:focus:focus-visible{outline-style:auto}.echLegend .echLegendListContainer :focus{animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important;background-color:#e3eff8;border-radius:2px}.echLegendItem{color:#2a3947;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative}.echLegendItem>*:not(.background){height:18.000003px;margin-left:4px}.echLegendItem>*:not(.background):last-child:not(.echLegendItem__extra){margin-right:4px}.echLegendItem:not(.echLegendItem--hidden) .echLegendItem__color--changable{cursor:pointer}.echLegendItem:hover .background{background-color:#e3e5e8}.echLegendItem .background{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.echLegendItem__action{cursor:pointer;display:flex;justify-content:center;align-items:center;max-width:calc(18.000003px + 8px)}.echLegendItem__action .euiPopover,.echLegendItem__action .euiPopover__anchor,.echLegendItem__action .euiPopover__anchor>*:first-child{height:100%;width:100%}.echLegendItem__color{display:flex;line-height:1.5;align-items:center}.echLegendItem__label{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;max-width:100%;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;word-wrap:normal !important;flex:1 1 auto;text-align:left;vertical-align:baseline;letter-spacing:unset;align-items:center}.echLegendItem__label--clickable:hover{cursor:pointer;text-decoration:underline}.echLegendItem__extra{font-size:12.000002px;font-size:0.857143rem;line-height:1.5;text-align:right;flex:0 0 auto;margin-left:4px;font-feature-settings:"tnum";letter-spacing:unset}.echLegendItem--vertical{padding-top:2px;padding-bottom:2px}.echLegendItem--vertical:first-of-type{margin-top:2px}.echLegendItem--vertical .background{margin-top:2px;margin-bottom:2px}.echLegendItem--hidden{color:#5a6875}.echReactiveChart_noResults{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;color:#5a6875}.echHighlighter{position:absolute;pointer-events:none;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.echHighlighterOverlay__fill{fill:rgba(252,254,255,.2)}.echHighlighterOverlay__stroke{stroke:rgba(252,254,255,.2)}.echHighlighter__mask{fill:rgba(252,254,255,.5)}.echCrosshair,.echCrosshair__cursor,.echCrosshair__crossLine{position:absolute;top:0;left:0;pointer-events:none}.echScreenReaderOnly{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.echScreenReaderOnlyDebug{left:0 !important;top:0 !important;right:0 !important;bottom:0 !important;width:100% !important;height:100% !important;overflow:auto !important;background:rgba(255,255,255,.8)}.echScreenReaderOnlyDebug table,.echScreenReaderOnlyDebug td,.echScreenReaderOnlyDebug th{border:1px solid #000;font-size:12px}.echScreenReaderTable{overflow-x:auto;text-align:left}.echAnnotation{position:absolute;user-select:none;font-size:12.000002px;font-weight:500}.echAnnotation__tooltip{box-shadow:0 12px 24px 0 rgba(2,2,14,.1),0 6px 12px 0 rgba(2,2,14,.1),0 4px 4px 0 rgba(2,2,14,.1),0 2px 2px 0 rgba(2,2,14,.1);border-radius:4px;background-color:#2a3947;color:#fcfeff;z-index:9000;max-width:256px;overflow-wrap:break-word;font-size:14px;font-size:1rem;line-height:1.5;padding:12px;font-size:12.000002px;font-size:0.857143rem;line-height:1.5;padding:0;transition:opacity 250ms;pointer-events:none;user-select:none;max-width:256px}.echAnnotation__header{font-weight:500;border-bottom:solid 1px #5f656a;padding-bottom:4px;margin-bottom:4px;padding:4px 8px}.echAnnotation__details{padding:4px 8px}.echAnnotation__icon{position:relative}.echAnnotation__body{white-space:nowrap}.echCanvasRenderer{position:absolute;top:0;left:0;padding:0;margin:0;border:0;background:rgba(0,0,0,0)}.application>*,.app-container>*{position:relative}.application{position:relative;z-index:0;display:flex;flex:1 0 auto;flex-direction:column}.application>*{flex-shrink:0}:focus:not([class^=eui]):not(.osd-resetFocusState){animation:350ms cubic-bezier(0.694, 0.0482, 0.335, 1) 1 normal forwards focusRingAnimate !important}.euiComboBox input:not([class^=eui]):focus{animation:none !important}
6.euiBody--collapsibleNavIsDocked .euiBottomBar{margin-left:320px}.euiButtonIcon.euiButtonIcon--auto{height:auto;width:auto}.eui-yScrollWithShadows,.eui-xScrollWithShadows,.euiYScrollWithShadows,.euiDataGrid__controlScroll,.euiDataGridColumnSelector__columnList,.euiDataGridColumnSorting__fieldList,.euiFlyoutBody .euiFlyoutBody__overflow,.euiFlyoutBody .euiFlyoutBody__overflow.euiFlyoutBody__overflow--hasBanner,.euiModalBody .euiModalBody__overflow,.euiSelectableList__list,.echLegend .echLegendListContainer,.osdQueryBar__textarea:not(:focus):not(:invalid),.osdSavedQueryManagement__list,.dscCanvas,.vbConfig,.vbSidenav__style{contain:paint}.coreSystemRootDomElement .ace-tm{background-color:#e3e5e8;color:#2a3947;font-family:var(--font-code)}.coreSystemRootDomElement .ace-tm .ace_scrollbar{scrollbar-width:thin}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar{width:16px;height:16px}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-corner,.coreSystemRootDomElement .ace-tm .ace_scrollbar::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.coreSystemRootDomElement .ace-tm .ace_gutter-active-line,.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_active-line{background-color:rgba(214,217,221,.7)}.coreSystemRootDomElement .ace-tm .ace_snippet-marker{width:100%;background-color:#e9ecee;border:none}.coreSystemRootDomElement .ace-tm .ace_indent-guide{background:linear-gradient(to left, #ADB4BA 0%, #ADB4BA 1px, transparent 1px, transparent 100%)}.coreSystemRootDomElement .ace-tm .ace_search{z-index:1001}.coreSystemRootDomElement .ace-tm .ace_layer.ace_marker-layer{overflow:visible}.coreSystemRootDomElement .ace-tm .ace_warning{color:#c43d35}.coreSystemRootDomElement .ace-tm .ace_method{color:#c80a69}.coreSystemRootDomElement .ace-tm .ace_url,.coreSystemRootDomElement .ace-tm .ace_start_triple_quote,.coreSystemRootDomElement .ace-tm .ace_end_triple_quote{color:#007571}.coreSystemRootDomElement .ace-tm .ace_multi_string{color:#007721;font-style:italic}.coreSystemRootDomElement .ace-tm .ace_gutter{background-color:#fcfeff;color:#5a6875;border-left:1px solid #e9ecee}.coreSystemRootDomElement .ace-tm .ace_print-margin{width:1px;background:#d6d9dd}.coreSystemRootDomElement .ace-tm .ace_fold{background-color:#6b72e6}.coreSystemRootDomElement .ace-tm .ace_cursor{color:#0a1219}.coreSystemRootDomElement .ace-tm .ace_invisible{color:#d6d9dd}.coreSystemRootDomElement .ace-tm .ace_storage,.coreSystemRootDomElement .ace-tm .ace_keyword{color:#006d96}.coreSystemRootDomElement .ace-tm .ace_constant{color:#900}.coreSystemRootDomElement .ace-tm .ace_constant.ace_buildin{color:#5848f6}.coreSystemRootDomElement .ace-tm .ace_constant.ace_language{color:#5054df}.coreSystemRootDomElement .ace-tm .ace_constant.ace_library{color:#007721}.coreSystemRootDomElement .ace-tm .ace_invalid{background-color:euiCallOutColor("danger", "background");color:euiCallOutColor("danger", "foreground")}.coreSystemRootDomElement .ace-tm .ace_support.ace_function{color:#3c4c72}.coreSystemRootDomElement .ace-tm .ace_support.ace_constant{color:#007721}.coreSystemRootDomElement .ace-tm .ace_support.ace_type,.coreSystemRootDomElement .ace-tm .ace_support.ace_class{color:#5963b8}.coreSystemRootDomElement .ace-tm .ace_keyword.ace_operator{color:#5a6875}.coreSystemRootDomElement .ace-tm .ace_string{color:#007721}.coreSystemRootDomElement .ace-tm .ace_comment{color:#3f6f5a}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc{color:#006d96}.coreSystemRootDomElement .ace-tm .ace_comment.ace_doc.ace_tag{color:#636770}.coreSystemRootDomElement .ace-tm .ace_constant.ace_numeric{color:#006d96}.coreSystemRootDomElement .ace-tm .ace_variable{color:#006d96}.coreSystemRootDomElement .ace-tm .ace_xml-pe{color:#5a6875}.coreSystemRootDomElement .ace-tm .ace_entity.ace_name.ace_function{color:#0000a2}.coreSystemRootDomElement .ace-tm .ace_heading{color:#0c07ff}.coreSystemRootDomElement .ace-tm .ace_list{color:#b90690}.coreSystemRootDomElement .ace-tm .ace_meta.ace_tag{color:#00168e}.coreSystemRootDomElement .ace-tm .ace_string.ace_regex{color:#d00004}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selection{background:#b1d1eb}.coreSystemRootDomElement .ace-tm.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #fcfeff}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_step{background:#f6ebd6}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_stack{background:#cde4e1}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px;border:1px solid #d6d9dd}.coreSystemRootDomElement .ace-tm .ace_marker-layer .ace_selected-word{background:#e3e5e8;border:1px solid #d6d9dd}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete{background-color:#e3e5e8;color:#2a3947}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_completion-
6highlight{color:#007571}.coreSystemRootDomElement .ace-tm.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line{background-color:rgba(214,217,221,.7)}.coreSystemRootDomElement .ace-tm .ace_rightAlignedText{color:#006d96}.coreSystemRootDomElement .ace-tm .ace_tooltip{background-color:#e9ecee;color:#2a3947}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){(function(module,global){var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(root){var freeExports=true&&exports&&!exports.nodeType&&exports;var freeModule=true&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320){output.push(((value&1023)<<10)+(extra&1023)+65536)}else{output.push(value);counter--}}else{output.push(value)}}return output}function ucs2encode(array){return map(array,(function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output})).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128){output.push(stringFromCharCode(currentValue))}}handledCPCount=basicLength=output.length;if(basicLength){output.push(delimiter)}while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&¤tValue<m){m=currentValue}}handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}
6delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}function toUnicode(input){return mapDomain(input,(function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string}))}function toASCII(input){return mapDomain(input,(function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string}))}punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};if(true){!(__WEBPACK_AMD_DEFINE_RESULT__=function(){return punycode}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}else{}})(this)}).call(this,__webpack_require__(188)(module),__webpack_require__(48))},function(module,exports){module.exports=function(module){if(!module.webpackPolyfill){module.deprecate=function(){};module.paths=[];if(!module.children)module.children=[];Object.defineProperty(module,"loaded",{enumerable:true,get:function(){return module.l}});Object.defineProperty(module,"id",{enumerable:true,get:function(){return module.i}});module.webpackPolyfill=1}return module}},function(module,exports,__webpack_require__){"use strict";var stringify=__webpack_require__(190);var parse=__webpack_require__(226);var formats=__webpack_require__(102);module.exports={formats:formats,parse:parse,stringify:stringify}},function(module,exports,__webpack_require__){"use strict";var getSideChannel=__webpack_require__(131);var utils=__webpack_require__(135);var formats=__webpack_require__(102);var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+"[]"},comma:"comma",indices:function indices(prefix,key){return prefix+"["+key+"]"},repeat:function repeat(prefix){return prefix}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray])};var toISO=Date.prototype.toISOString;var defaultFormat=formats["default"];var defaults={addQueryPrefix:false,allowDots:false,allowEmptyArrays:false,arrayFormat:"indices",charset:"utf-8",charsetSentinel:false,commaRoundTrip:false,delimiter:"&",encode:true,encodeDotInKeys:false,encoder:utils.encode,encodeValuesOnly:false,filter:void undefined,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:false,serializeDate:function serializeDate(date){return toISO.call(date)},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function isNonNullishPrimitive(v){return typeof v==="string"||typeof v==="number"||typeof v==="boolean"||typeof v==="symbol"||typeof v==="bigint"};var sentinel={};var stringify=function stringify(object,prefix,generateArrayPrefix,commaRoundTrip,allowEmptyArrays,strictNullHandling,skipNulls,encodeDotInKeys,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,sideChannel){var obj=object;var tmpSc=sideChannel;var step=0;var findFlag=false;while((tmpSc=tmpSc.get(sentinel))!==void undefined&&!findFlag){var pos=tmpSc.get(object);step+=1;if(typeof pos!=="undefined"){if(pos===step){throw new RangeError("Cyclic object value")}else{findFlag=true}}if(typeof tmpSc.get(sentinel)==="undefined"){step=0}}if(typeof filter==="function"){obj=filter(prefix,obj)}else if(obj instanceof Date){obj=serializeDate(obj)}else if(generateArrayPrefix==="comma"&&isArray(obj)){obj=utils.maybeMap(obj,(function(value){if(value instanceof Date){return serializeDate(value)}return value}))}if(obj===null){if(strictNullHandling){return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,"key",format):prefix}obj=""}if(isNonNullishPrimitive(obj)||utils.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,"key",format);return[formatter(keyValue)+"="+formatter(encoder(obj,defaults.encoder,charset,"value",format))]}return[formatter(prefix)+"="+formatter(String(obj))]}var values=[];if(typeof obj==="undefined"){return values}var objKeys;if(generateArrayPrefix==="comma"&&isArray(obj)){if(encodeValuesOnly&&encoder){obj=utils.maybeMap(obj,encoder)}objKeys=[{value:obj.length>0?obj.join(",")||null:void undefined}]}else if(isArray(filter)){objKeys=filter}else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}var encodedPrefix=encodeDotInKeys?String(prefix).replace(/\./g,"%2E"):String(prefix);var adjustedPrefix=commaRoundTrip&&isArray(obj)&&obj.length===1?encodedPrefix+"[]":encodedPrefix;if(allowEmptyArrays&&isArray(obj)&&obj.length===0){return adjustedPrefix+"[]"}for(var j=0;j<objKeys.length;++j){var key=objKeys[j];var value=typeof key==="object"&&key&&typeof key.value!=="undefined"?key.value:obj[key];if(skipNulls&&value===null){continue}var encodedKey=allowDots&&encodeDotInKeys?String(key).replace(/\./g,"%2E"):String(key);var keyPrefix=isArray(obj)?typeof generateArrayPrefix==="function"?generateArrayPrefix(adjustedPrefix,encodedKey):adjustedPrefix:adjustedPrefix+(allowDots?"."+encodedKey:"["+encodedKey+"]");sideChannel.set(object,step);var valueSideChannel=getSideChannel();valueSideChannel.set(sentinel,sideChannel);pushToArray(values,stringify(value,keyPrefix,generateArrayPrefix,commaRoundTrip,allowEmptyArrays,strictNullHandling,skipNulls,encodeDotInKeys,generateArrayPrefix==="comma"&&encodeValuesOnly&&isArray(obj)?null:encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,valueSideChannel))}return values};var normalizeStringifyOptions=function normalizeStringifyOptions(opts){if(!opts){return defaults}if(typeof opts.allowEmptyArrays!=="undefined"&&typeof opts.allowEmptyArrays!=="boolean"){throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided")}if(typeof opts.encodeDotInKeys!=="undefined"&&typeof opts.encodeDotInKeys!=="boolean"){throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided")}if(opts.encoder!==null&&typeof opts.encoder!=="undefined"&&typeof opts.encoder!=="function"){throw new TypeError("Encoder has to be a function.")}var charset=opts.charset||defaults.charset;if(typeof opts.charset!=="undefined"&&opts.charset!=="utf-8"&&opts.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}var format=formats["default"];if(typeof opts.format!=="undefined"){if(!has.call(formats.formatters,opts.format)){throw new TypeError("Unknown format option provided.")}format=opts.format}var formatter=formats.formatters[format];var filter=defaults.filter;if(typeof opts.filter==="function"||isArray(opts.filter)){filter=opts.filter}var arrayFormat;if(opts.arrayFormat in arrayPrefixGenerators){arrayFormat=opts.arrayFormat}else if("indices"in opts){arrayFormat=opts.indices?"indices":"repeat"}else{arrayFormat=defaults.arrayFormat}if("commaRoundTrip"in opts&&typeof opts.commaRoundTrip!=="boolean"){throw new TypeError("`commaRoundTrip` must be a boolean, or absent")}var allowDots=typeof opts.allowDots==="undefined"?opts.encodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{addQueryPrefix:typeof opts.addQueryPrefix==="boolean"?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==="boolean"?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:arrayFormat,charset
6:charset,charsetSentinel:typeof opts.charsetSentinel==="boolean"?opts.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!opts.commaRoundTrip,delimiter:typeof opts.delimiter==="undefined"?defaults.delimiter:opts.delimiter,encode:typeof opts.encode==="boolean"?opts.encode:defaults.encode,encodeDotInKeys:typeof opts.encodeDotInKeys==="boolean"?opts.encodeDotInKeys:defaults.encodeDotInKeys,encoder:typeof opts.encoder==="function"?opts.encoder:defaults.encoder,encodeValuesOnly:typeof opts.encodeValuesOnly==="boolean"?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,format:format,formatter:formatter,serializeDate:typeof opts.serializeDate==="function"?opts.serializeDate:defaults.serializeDate,skipNulls:typeof opts.skipNulls==="boolean"?opts.skipNulls:defaults.skipNulls,sort:typeof opts.sort==="function"?opts.sort:null,strictNullHandling:typeof opts.strictNullHandling==="boolean"?opts.strictNullHandling:defaults.strictNullHandling}};module.exports=function(object,opts){var obj=object;var options=normalizeStringifyOptions(opts);var objKeys;var filter;if(typeof options.filter==="function"){filter=options.filter;obj=filter("",obj)}else if(isArray(options.filter)){filter=options.filter;objKeys=filter}var keys=[];if(typeof obj!=="object"||obj===null){return""}var generateArrayPrefix=arrayPrefixGenerators[options.arrayFormat];var commaRoundTrip=generateArrayPrefix==="comma"&&options.commaRoundTrip;if(!objKeys){objKeys=Object.keys(obj)}if(options.sort){objKeys.sort(options.sort)}var sideChannel=getSideChannel();for(var i=0;i<objKeys.length;++i){var key=objKeys[i];var value=obj[key];if(options.skipNulls&&value===null){continue}pushToArray(keys,stringify(value,key,generateArrayPrefix,commaRoundTrip,options.allowEmptyArrays,options.strictNullHandling,options.skipNulls,options.encodeDotInKeys,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.format,options.formatter,options.encodeValuesOnly,options.charset,sideChannel))}var joined=keys.join(options.delimiter);var prefix=options.addQueryPrefix===true?"?":"";if(options.charsetSentinel){if(options.charset==="iso-8859-1"){prefix+="utf8=%26%2310003%3B&"}else{prefix+="utf8=%E2%9C%93&"}}return joined.length>0?prefix+joined:""}},function(module,exports,__webpack_require__){(function(global){var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1e3&&num<1e3||$test.call(/e/,str)){return str}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==="number"){var int=num<0?-$floor(-num):$floor(num);if(int!==num){var intStr=String(int);var dec=$slice.call(str,intStr.length+1);return $replace.call(intStr,sepRegex,"$&_")+"."+$replace.call($replace.call(dec,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(str,sepRegex,"$&_")}var utilInspect=__webpack_require__(192);var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var quotes={__proto__:null,double:'"',single:"'"};var quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};module.exports=function inspect_(obj,options,depth,seen){var opts=options||{};if(has(opts,"quoteStyle")&&!has(quotes,opts.quoteStyle)){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has(opts,"maxStringLength")&&(typeof opts.maxStringLength==="number"?opts.maxStringLength<0&&opts.maxStringLength!==Infinity:opts.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var customInspect=has(opts,"customInspect")?opts.customInspect:true;if(typeof customInspect!=="boolean"&&customInspect!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has(opts,"indent")&&opts.indent!==null&&opts.indent!=="\t"&&!(parseInt(opts.indent,10)===opts.indent&&opts.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has(opts,"numericSeparator")&&typeof opts.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var numericSeparator=opts.numericSeparator;if(typeof obj==="undefined"){return"undefined"}
6if(obj===null){return"null"}if(typeof obj==="boolean"){return obj?"true":"false"}if(typeof obj==="string"){return inspectString(obj,opts)}if(typeof obj==="number"){if(obj===0){return Infinity/obj>0?"0":"-0"}var str=String(obj);return numericSeparator?addNumericSeparator(obj,str):str}if(typeof obj==="bigint"){var bigIntStr=String(obj)+"n";return numericSeparator?addNumericSeparator(obj,bigIntStr):bigIntStr}var maxDepth=typeof opts.depth==="undefined"?5:opts.depth;if(typeof depth==="undefined"){depth=0}if(depth>=maxDepth&&maxDepth>0&&typeof obj==="object"){return isArray(obj)?"[Array]":"[Object]"}var indent=getIndent(opts,depth);if(typeof seen==="undefined"){seen=[]}else if(indexOf(seen,obj)>=0){return"[Circular]"}function inspect(value,from,noIndent){if(from){seen=$arrSlice.call(seen);seen.push(from)}if(noIndent){var newOpts={depth:opts.depth};if(has(opts,"quoteStyle")){newOpts.quoteStyle=opts.quoteStyle}return inspect_(value,newOpts,depth+1,seen)}return inspect_(value,opts,depth+1,seen)}if(typeof obj==="function"&&!isRegExp(obj)){var name=nameOf(obj);var keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+$join.call(keys,", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?$replace.call(String(obj),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return typeof obj==="object"&&!hasShammedSymbols?markBoxed(symString):symString}if(isElement(obj)){var s="<"+$toLowerCase.call(String(obj.nodeName));var attrs=obj.attributes||[];for(var i=0;i<attrs.length;i++){s+=" "+attrs[i].name+"="+wrapQuotes(quote(attrs[i].value),"double",opts)}s+=">";if(obj.childNodes&&obj.childNodes.length){s+="..."}s+="</"+$toLowerCase.call(String(obj.nodeName))+">";return s}if(isArray(obj)){if(obj.length===0){return"[]"}var xs=arrObjKeys(obj,inspect);if(indent&&!singleLineValues(xs)){return"["+indentedJoin(xs,indent)+"]"}return"[ "+$join.call(xs,", ")+" ]"}if(isError(obj)){var parts=arrObjKeys(obj,inspect);if(!("cause"in Error.prototype)&&"cause"in obj&&!isEnumerable.call(obj,"cause")){return"{ ["+String(obj)+"] "+$join.call($concat.call("[cause]: "+inspect(obj.cause),parts),", ")+" }"}if(parts.length===0){return"["+String(obj)+"]"}return"{ ["+String(obj)+"] "+$join.call(parts,", ")+" }"}if(typeof obj==="object"&&customInspect){if(inspectSymbol&&typeof obj[inspectSymbol]==="function"&&utilInspect){return utilInspect(obj,{depth:maxDepth-depth})}else if(customInspect!=="symbol"&&typeof obj.inspect==="function"){return obj.inspect()}}if(isMap(obj)){var mapParts=[];if(mapForEach){mapForEach.call(obj,(function(value,key){mapParts.push(inspect(key,obj,true)+" => "+inspect(value,obj))}))}return collectionOf("Map",mapSize.call(obj),mapParts,indent)}
6if(isSet(obj)){var setParts=[];if(setForEach){setForEach.call(obj,(function(value){setParts.push(inspect(value,obj))}))}return collectionOf("Set",setSize.call(obj),setParts,indent)}if(isWeakMap(obj)){return weakCollectionOf("WeakMap")}if(isWeakSet(obj)){return weakCollectionOf("WeakSet")}if(isWeakRef(obj)){return weakCollectionOf("WeakRef")}if(isNumber(obj)){return markBoxed(inspect(Number(obj)))}if(isBigInt(obj)){return markBoxed(inspect(bigIntValueOf.call(obj)))}if(isBoolean(obj)){return markBoxed(booleanValueOf.call(obj))}if(isString(obj)){return markBoxed(inspect(String(obj)))}if(typeof window!=="undefined"&&obj===window){return"{ [object Window] }"}if(typeof globalThis!=="undefined"&&obj===globalThis||typeof global!=="undefined"&&obj===global){return"{ [object globalThis] }"}if(!isDate(obj)&&!isRegExp(obj)){var ys=arrObjKeys(obj,inspect);var isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object;var protoTag=obj instanceof Object?"":"null prototype";var stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?$slice.call(toStr(obj),8,-1):protoTag?"Object":"";var constructorTag=isPlainObject||typeof obj.constructor!=="function"?"":obj.constructor.name?obj.constructor.name+" ":"";var tag=constructorTag+(stringTag||protoTag?"["+$join.call($concat.call([],stringTag||[],protoTag||[]),": ")+"] ":"");if(ys.length===0){return tag+"{}"}if(indent){return tag+"{"+indentedJoin(ys,indent)+"}"}return tag+"{ "+$join.call(ys,", ")+" }"}return String(obj)};function wrapQuotes(s,defaultStyle,opts){var style=opts.quoteStyle||defaultStyle;var quoteChar=quotes[style];return quoteChar+s+quoteChar}function quote(s){return $replace.call(String(s),/"/g,""")}function canTrustToString(obj){return!toStringTag||!(typeof obj==="object"&&(toStringTag in obj||typeof obj[toStringTag]!=="undefined"))}function isArray(obj){return toStr(obj)==="[object Array]"&&canTrustToString(obj)}function isDate(obj){return toStr(obj)==="[object Date]"&&canTrustToString(obj)}function isRegExp(obj){return toStr(obj)==="[object RegExp]"&&canTrustToString(obj)}function isError(obj){return toStr(obj)==="[object Error]"&&canTrustToString(obj)}function isString(obj){return toStr(obj)==="[object String]"&&canTrustToString(obj)}function isNumber(obj){return toStr(obj)==="[object Number]"&&canTrustToString(obj)}function isBoolean(obj){return toStr(obj)==="[object Boolean]"&&canTrustToString(obj)}function isSymbol(obj){if(hasShammedSymbols){return obj&&typeof obj==="object"&&obj instanceof Symbol}if(typeof obj==="symbol"){return true}if(!obj||typeof obj!=="object"||!symToString){return false}try{symToString.call(obj);return true}catch(e){}return false}function isBigInt(obj){if(!obj||typeof obj!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(obj);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this};function has(obj,key){return hasOwn.call(obj,key)}function toStr(obj){return objectToString.call(obj)}function nameOf(f){if(f.name){return f.name}var m=$match.call(functionToString.call(f),/^function\s*([\w$]+)/);if(m){return m[1]}return null}function indexOf(xs,x){if(xs.indexOf){return xs.indexOf(x)}for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x){return i}}return-1}function isMap(x){if(!mapSize||!x||typeof x!=="object"){return false}try{mapSize.call(x);try{setSize.call(x)}catch(s){return true}return x instanceof Map}catch(e){}return false}function isWeakMap(x){if(!weakMapHas||!x||typeof x!=="object"){return false}try{weakMapHas.call(x,weakMapHas);try{weakSetHas.call(x,weakSetHas)}catch(s){return true}return x instanceof WeakMap}catch(e){}return false}function isWeakRef(x){if(!weakRefDeref||!x||typeof x!=="object"){return false}try{weakRefDeref.call(x);return true}catch(e){}return false}function isSet(x){if(!setSize||!x||typeof x!=="object"){return false}try{setSize.call(x);try{mapSize.call(x)}catch(m){return true}return x instanceof Set}catch(e){}return false}function isWeakSet(x){if(!weakSetHas||!x||typeof x!=="object"){return false}try{weakSetHas.call(x,weakSetHas);try{weakMapHas.call(x,weakMapHas)}catch(s){return true}return x instanceof WeakSet}catch(e){}return false}function isElement(x){if(!x||typeof x!=="object"){return false}if(typeof HTMLElement!=="undefined"&&x instanceof HTMLElement){return true}return typeof x.nodeName==="string"&&typeof x.getAttribute==="function"}
6function inspectString(str,opts){if(str.length>opts.maxStringLength){var remaining=str.length-opts.maxStringLength;var trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString($slice.call(str,0,opts.maxStringLength),opts)+trailer}var quoteRE=quoteREs[opts.quoteStyle||"single"];quoteRE.lastIndex=0;var s=$replace.call($replace.call(str,quoteRE,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(s,"single",opts)}function lowbyte(c){var n=c.charCodeAt(0);var x={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];if(x){return"\\"+x}return"\\x"+(n<16?"0":"")+$toUpperCase.call(n.toString(16))}function markBoxed(str){return"Object("+str+")"}function weakCollectionOf(type){return type+" { ? }"}function collectionOf(type,size,entries,indent){var joinedEntries=indent?indentedJoin(entries,indent):$join.call(entries,", ");return type+" ("+size+") {"+joinedEntries+"}"}function singleLineValues(xs){for(var i=0;i<xs.length;i++){if(indexOf(xs[i],"\n")>=0){return false}}return true}function getIndent(opts,depth){var baseIndent;if(opts.indent==="\t"){baseIndent="\t"}else if(typeof opts.indent==="number"&&opts.indent>0){baseIndent=$join.call(Array(opts.indent+1)," ")}else{return null}return{base:baseIndent,prev:$join.call(Array(depth+1),baseIndent)}}function indentedJoin(xs,indent){if(xs.length===0){return""}var lineJoiner="\n"+indent.prev+indent.base;return lineJoiner+$join.call(xs,","+lineJoiner)+"\n"+indent.prev}function arrObjKeys(obj,inspect){var isArr=isArray(obj);var xs=[];if(isArr){xs.length=obj.length;for(var i=0;i<obj.length;i++){xs[i]=has(obj,i)?inspect(obj[i],obj):""}}var syms=typeof gOPS==="function"?gOPS(obj):[];var symMap;if(hasShammedSymbols){symMap={};for(var k=0;k<syms.length;k++){symMap["$"+syms[k]]=syms[k]}}for(var key in obj){if(!has(obj,key)){continue}if(isArr&&String(Number(key))===key&&key<obj.length){continue}if(hasShammedSymbols&&symMap["$"+key]instanceof Symbol){continue}else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+": "+inspect(obj[key],obj))}else{xs.push(key+": "+inspect(obj[key],obj))}}if(typeof gOPS==="function"){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push("["+inspect(syms[j])+"]: "+inspect(obj[syms[j]],obj))}}}return xs}}).call(this,__webpack_require__(48))},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var inspect=__webpack_require__(194);var $TypeError=__webpack_require__(49);var listGetNode=function(list,key,isDelete){var prev=list;var curr;for(;(curr=prev.next)!=null;prev=curr){if(curr.key===key){prev.next=curr.next;if(!isDelete){curr.next=list.next;list.next=curr}return curr}}};var listGet=function(objects,key){if(!objects){return void undefined}var node=listGetNode(objects,key);return node&&node.value};var listSet=function(objects,key,value){var node=listGetNode(objects,key);if(node){node.value=value}else{objects.next={key:key,next:objects.next,value:value}}};var listHas=function(objects,key){if(!objects){return false}return!!listGetNode(objects,key)};var listDelete=function(objects,key){if(objects){return listGetNode(objects,key,true)}};module.exports=function getSideChannelList(){var $o;var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError("Side channel does not contain "+inspect(key))}},delete:function(key){var root=$o&&$o.next;var deletedNode=listDelete($o,key);if(deletedNode&&root&&root===deletedNode){$o=void undefined}return!!deletedNode},get:function(key){return listGet($o,key)},has:function(key){return listHas($o,key)},set:function(key,value){if(!$o){$o={next:void undefined}}listSet($o,key,value)}};return channel}},function(module,exports,__webpack_require__){(function(global){var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;
6var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1e3&&num<1e3||$test.call(/e/,str)){return str}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==="number"){var int=num<0?-$floor(-num):$floor(num);if(int!==num){var intStr=String(int);var dec=$slice.call(str,intStr.length+1);return $replace.call(intStr,sepRegex,"$&_")+"."+$replace.call($replace.call(dec,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(str,sepRegex,"$&_")}var utilInspect=__webpack_require__(195);var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var quotes={__proto__:null,double:'"',single:"'"};var quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};module.exports=function inspect_(obj,options,depth,seen){var opts=options||{};if(has(opts,"quoteStyle")&&!has(quotes,opts.quoteStyle)){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has(opts,"maxStringLength")&&(typeof opts.maxStringLength==="number"?opts.maxStringLength<0&&opts.maxStringLength!==Infinity:opts.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var customInspect=has(opts,"customInspect")?opts.customInspect:true;if(typeof customInspect!=="boolean"&&customInspect!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has(opts,"indent")&&opts.indent!==null&&opts.indent!=="\t"&&!(parseInt(opts.indent,10)===opts.indent&&opts.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has(opts,"numericSeparator")&&typeof opts.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var numericSeparator=opts.numericSeparator;if(typeof obj==="undefined"){return"undefined"}if(obj===null){return"null"}if(typeof obj==="boolean"){return obj?"true":"false"}if(typeof obj==="string"){return inspectString(obj,opts)}if(typeof obj==="number"){if(obj===0){return Infinity/obj>0?"0":"-0"}var str=String(obj);return numericSeparator?addNumericSeparator(obj,str):str}if(typeof obj==="bigint"){var bigIntStr=String(obj)+"n";return numericSeparator?addNumericSeparator(obj,bigIntStr):bigIntStr}var maxDepth=typeof opts.depth==="undefined"?5:opts.depth;if(typeof depth==="undefined"){depth=0}if(depth>=maxDepth&&maxDepth>0&&typeof obj==="object"){return isArray(obj)?"[Array]":"[Object]"}var indent=getIndent(opts,depth);if(typeof seen==="undefined"){seen=[]}else if(indexOf(seen,obj)>=0){return"[Circular]"}function inspect(value,from,noIndent){if(from){seen=$arrSlice.call(seen);seen.push(from)}if(noIndent){var newOpts={depth:opts.depth};if(has(opts,"quoteStyle")){newOpts.quoteStyle=opts.quoteStyle}return inspect_(value,newOpts,depth+1,seen)}return inspect_(value,opts,depth+1,seen)}if(typeof obj==="function"&&!isRegExp(obj)){var name=nameOf(obj);var keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+$join.call(keys,", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?$replace.call(String(obj),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return typeof obj==="object"&&!hasShammedSymbols?markBoxed(symString):symString}if(isElement(obj)){var s="<"+$toLowerCase.call(String(obj.nodeName));var attrs=obj.attributes||[];for(var i=0;i<attrs.length;i++){s+=" "+attrs[i].name+"="+wrapQuotes(quote(attrs[i].value),"double",opts)}s+=">";if(obj.childNodes&&obj.childNodes.length){s+="..."}s+="</"+$toLowerCase.call(String(obj.nodeName))+">";return s}if(isArray(obj)){if(obj.length===0){return"[]"}var xs=arrObjKeys(obj,inspect);if(indent&&!singleLineValues(xs)){return"["+indentedJoin(xs,indent)+"]"}return"[ "+$join.call(xs,", ")+" ]"}if(isError(obj)){var parts=arrObjKeys(obj,inspect);if(!("cause"in Error.prototype)&&"cause"in obj&&!isEnumerable.call(obj,"cause")){return"{ ["+String(obj)+"] "+$join.call($concat.call("[cause]: "+inspect(obj.cause),parts),", ")+" }"}if(parts.length===0){return"["+String(obj)+"]"}return"{ ["+String(obj)+"] "+$join.call(parts,", ")+" }"}if(typeof obj==="object"&&customInspect){if(inspectSymbol&&typeof obj[inspectSymbol]==="function"&&utilInspect){return utilIns
6pect(obj,{depth:maxDepth-depth})}else if(customInspect!=="symbol"&&typeof obj.inspect==="function"){return obj.inspect()}}if(isMap(obj)){var mapParts=[];if(mapForEach){mapForEach.call(obj,(function(value,key){mapParts.push(inspect(key,obj,true)+" => "+inspect(value,obj))}))}return collectionOf("Map",mapSize.call(obj),mapParts,indent)}if(isSet(obj)){var setParts=[];if(setForEach){setForEach.call(obj,(function(value){setParts.push(inspect(value,obj))}))}return collectionOf("Set",setSize.call(obj),setParts,indent)}if(isWeakMap(obj)){return weakCollectionOf("WeakMap")}if(isWeakSet(obj)){return weakCollectionOf("WeakSet")}if(isWeakRef(obj)){return weakCollectionOf("WeakRef")}if(isNumber(obj)){return markBoxed(inspect(Number(obj)))}if(isBigInt(obj)){return markBoxed(inspect(bigIntValueOf.call(obj)))}if(isBoolean(obj)){return markBoxed(booleanValueOf.call(obj))}if(isString(obj)){return markBoxed(inspect(String(obj)))}if(typeof window!=="undefined"&&obj===window){return"{ [object Window] }"}if(typeof globalThis!=="undefined"&&obj===globalThis||typeof global!=="undefined"&&obj===global){return"{ [object globalThis] }"}if(!isDate(obj)&&!isRegExp(obj)){var ys=arrObjKeys(obj,inspect);var isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object;var protoTag=obj instanceof Object?"":"null prototype";var stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?$slice.call(toStr(obj),8,-1):protoTag?"Object":"";var constructorTag=isPlainObject||typeof obj.constructor!=="function"?"":obj.constructor.name?obj.constructor.name+" ":"";var tag=constructorTag+(stringTag||protoTag?"["+$join.call($concat.call([],stringTag||[],protoTag||[]),": ")+"] ":"");if(ys.length===0){return tag+"{}"}if(indent){return tag+"{"+indentedJoin(ys,indent)+"}"}return tag+"{ "+$join.call(ys,", ")+" }"}return String(obj)};function wrapQuotes(s,defaultStyle,opts){var style=opts.quoteStyle||defaultStyle;var quoteChar=quotes[style];return quoteChar+s+quoteChar}function quote(s){return $replace.call(String(s),/"/g,""")}function canTrustToString(obj){return!toStringTag||!(typeof obj==="object"&&(toStringTag in obj||typeof obj[toStringTag]!=="undefined"))}function isArray(obj){return toStr(obj)==="[object Array]"&&canTrustToString(obj)}function isDate(obj){return toStr(obj)==="[object Date]"&&canTrustToString(obj)}function isRegExp(obj){return toStr(obj)==="[object RegExp]"&&canTrustToString(obj)}function isError(obj){return toStr(obj)==="[object Error]"&&canTrustToString(obj)}function isString(obj){return toStr(obj)==="[object String]"&&canTrustToString(obj)}function isNumber(obj){return toStr(obj)==="[object Number]"&&canTrustToString(obj)}function isBoolean(obj){return toStr(obj)==="[object Boolean]"&&canTrustToString(obj)}function isSymbol(obj){if(hasShammedSymbols){return obj&&typeof obj==="object"&&obj instanceof Symbol}if(typeof obj==="symbol"){return true}if(!obj||typeof obj!=="object"||!symToString){return false}try{symToString.call(obj);return true}catch(e){}return false}function isBigInt(obj){if(!obj||typeof obj!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(obj);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this};function has(obj,key){return hasOwn.call(obj,key)}function toStr(obj){return objectToString.call(obj)}function nameOf(f){if(f.name){return f.name}var m=$match.call(functionToString.call(f),/^function\s*([\w$]+)/);if(m){return m[1]}return null}function indexOf(xs,x){if(xs.indexOf){return xs.indexOf(x)}for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x){return i}}return-1}function isMap(x){if(!mapSize||!x||typeof x!=="object"){return false}try{mapSize.call(x);try{setSize.call(x)}catch(s){return true}return x instanceof Map}catch(e){}return false}function isWeakMap(x){if(!weakMapHas||!x||typeof x!=="object"){return false}try{weakMapHas.call(x,weakMapHas);try{weakSetHas.call(x,weakSetHas)}catch(s){return true}return x instanceof WeakMap}catch(e){}return false}function isWeakRef(x){if(!weakRefDeref||!x||typeof x!=="object"){return false}try{weakRefDeref.call(x);return true}catch(e){}return false}function isSet(x){if(!setSize||!x||typeof x!=="object"){return false}try{setSize.call(x);try{mapSize.call(x)}catch(m){return true}return x instanceof Set}catch(e){}return false}function isWeakSet(x){if(!weakSetHas||!x||typeof x!=="object"){return false}try{weakSetHas.call(x,weakSetHas);try{weakMapHas.call(x,weakMapHas)}catch(s){return true}return x instanceof WeakSet}catch(e){}return false}function isElement(x){if(!x||typeof x!=="object"){return false}if(typeof HTMLElement!=="undefined"&&x instanceof HTMLElement){return true}return typeof x.nodeName==="string"&&typeof x.getAttribute==="function"}
6function inspectString(str,opts){if(str.length>opts.maxStringLength){var remaining=str.length-opts.maxStringLength;var trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString($slice.call(str,0,opts.maxStringLength),opts)+trailer}var quoteRE=quoteREs[opts.quoteStyle||"single"];quoteRE.lastIndex=0;var s=$replace.call($replace.call(str,quoteRE,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(s,"single",opts)}function lowbyte(c){var n=c.charCodeAt(0);var x={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];if(x){return"\\"+x}return"\\x"+(n<16?"0":"")+$toUpperCase.call(n.toString(16))}function markBoxed(str){return"Object("+str+")"}function weakCollectionOf(type){return type+" { ? }"}function collectionOf(type,size,entries,indent){var joinedEntries=indent?indentedJoin(entries,indent):$join.call(entries,", ");return type+" ("+size+") {"+joinedEntries+"}"}function singleLineValues(xs){for(var i=0;i<xs.length;i++){if(indexOf(xs[i],"\n")>=0){return false}}return true}function getIndent(opts,depth){var baseIndent;if(opts.indent==="\t"){baseIndent="\t"}else if(typeof opts.indent==="number"&&opts.indent>0){baseIndent=$join.call(Array(opts.indent+1)," ")}else{return null}return{base:baseIndent,prev:$join.call(Array(depth+1),baseIndent)}}function indentedJoin(xs,indent){if(xs.length===0){return""}var lineJoiner="\n"+indent.prev+indent.base;return lineJoiner+$join.call(xs,","+lineJoiner)+"\n"+indent.prev}function arrObjKeys(obj,inspect){var isArr=isArray(obj);var xs=[];if(isArr){xs.length=obj.length;for(var i=0;i<obj.length;i++){xs[i]=has(obj,i)?inspect(obj[i],obj):""}}var syms=typeof gOPS==="function"?gOPS(obj):[];var symMap;if(hasShammedSymbols){symMap={};for(var k=0;k<syms.length;k++){symMap["$"+syms[k]]=syms[k]}}for(var key in obj){if(!has(obj,key)){continue}if(isArr&&String(Number(key))===key&&key<obj.length){continue}if(hasShammedSymbols&&symMap["$"+key]instanceof Symbol){continue}else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+": "+inspect(obj[key],obj))}else{xs.push(key+": "+inspect(obj[key],obj))}}if(typeof gOPS==="function"){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push("["+inspect(syms[j])+"]: "+inspect(obj[syms[j]],obj))}}}return xs}}).call(this,__webpack_require__(48))},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var undefined;var $Object=__webpack_require__(66);var $Error=__webpack_require__(87);var $EvalError=__webpack_require__(88);var $RangeError=__webpack_require__(89);var $ReferenceError=__webpack_require__(90);var $SyntaxError=__webpack_require__(91);var $TypeError=__webpack_require__(49);var $URIError=__webpack_require__(92);var abs=__webpack_require__(93);var floor=__webpack_require__(94);var max=__webpack_require__(95);var min=__webpack_require__(96);var pow=__webpack_require__(97);var round=__webpack_require__(98);var sign=__webpack_require__(99);var $Function=Function;var getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}};var $gOPD=__webpack_require__(198);var $defineProperty=__webpack_require__(100);var throwTypeError=function(){throw new $TypeError};var ThrowTypeError=$gOPD?function(){try{arguments.callee;return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError;var hasSymbols=__webpack_require__(200)();var getProto=__webpack_require__(101);var $ObjectGPO=__webpack_require__(68);var $ReflectGPO=__webpack_require__(67);var $apply=__webpack_require__(69);var $call=__webpack_require__(62);var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined:getProto(Uint8Array);var INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":typeof Float16Array==="undefined"?undefined:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?undefined:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
6IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":typeof JSON==="object"?JSON:undefined,"%Map%":typeof Map==="undefined"?undefined:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto){try{null.error}catch(e){var errorProto=getProto(getProto(e));INTRINSICS["%Error.prototype%"]=errorProto}}var doEval=function doEval(name){var value;if(name==="%AsyncFunction%"){value=getEvalledConstructor("async function () {}")}else if(name==="%GeneratorFunction%"){value=getEvalledConstructor("function* () {}")}else if(name==="%AsyncGeneratorFunction%"){value=getEvalledConstructor("async function* () {}")}else if(name==="%AsyncGenerator%"){var fn=doEval("%AsyncGeneratorFunction%");if(fn){value=fn.prototype}}else if(name==="%AsyncIteratorPrototype%"){var gen=doEval("%AsyncGenerator%");if(gen&&getProto){value=getProto(gen.prototype)}}INTRINSICS[name]=value;return value};var LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var bind=__webpack_require__(50);var hasOwn=__webpack_require__(208);var $concat=bind.call($call,Array.prototype.concat);var $spliceApply=bind.call($apply,Array.prototype.splice);var $replace=bind.call($call,String.prototype.replace);var $strSlice=bind.call($call,String.prototype.slice);var $exec=bind.call($call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function stringToPath(string){var first=$strSlice(string,0,1);var last=$strSlice(string,-1);if(first==="%"&&last!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else if(last==="%"&&first!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`")}var result=[];$replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match}));return result};var getBaseIntrinsic=function getBaseIntrinsic(name,allowMissing){var intrinsicName=name;var alias;if(hasOwn(LEGACY_ALIASES,intrinsicName)){alias=LEGACY_ALIASES[intrinsicName];intrinsicName="%"+alias[0]+"%"}if(hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval){value=doEval(intrinsicName)}if(typeof value==="undefined"&&!allowMissing){throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!")}return{alias:alias,name:intrinsicName,value:value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function GetIntrinsic(name,allowMissing){if(typeof name!=="string"||name.length===0){throw new $TypeError("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof allowMissing!=="boolean"){throw new $TypeError('"allowMissing" argument must be a boolean')}if($exec(/^%?[^%]*%?$/,name)===null){throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var parts=stringToPath(name);var intrinsicBaseName=parts.length>0?parts[0]:"";var intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing);var intrinsicRealName=intrinsic.name;var value=intrinsic.value;var skipFurtherCaching=false;var alias=intrinsic.alias;if(alias){intrinsicBaseName=alias[0];$spliceApply(parts,$concat([0,1],alias))}for(var i=1,isOwn=true;i<parts.length;i+=1){var part=parts[i];
vendor: 4,216 bytes, line 6
6var first=$strSlice(part,0,1);var last=$strSlice(part,-1);if((first==='"'||first==="'"||first==="`"||(last==='"'||last==="'"||last==="`"))&&first!==last){throw new $SyntaxError("property names with quotes must have matching quotes")}if(part==="constructor"||!isOwn){skipFurtherCaching=true}intrinsicBaseName+="."+part;intrinsicRealName="%"+intrinsicBaseName+"%";if(hasOwn(INTRINSICS,intrinsicRealName)){value=INTRINSICS[intrinsicRealName]}else if(value!=null){if(!(part in value)){if(!allowMissing){throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.")}return void undefined}if($gOPD&&i+1>=parts.length){var desc=$gOPD(value,part);isOwn=!!desc;if(isOwn&&"get"in desc&&!("originalValue"in desc.get)){value=desc.get}else{value=value[part]}}else{isOwn=hasOwn(value,part);value=value[part]}if(isOwn&&!skipFurtherCaching){INTRINSICS[intrinsicRealName]=value}}}return value}},function(module,exports,__webpack_require__){"use strict";module.exports=Number.isNaN||function isNaN(a){return a!==a}},function(module,exports,__webpack_require__){"use strict";var $gOPD=__webpack_require__(199);if($gOPD){try{$gOPD([],"length")}catch(e){$gOPD=null}}module.exports=$gOPD},function(module,exports,__webpack_require__){"use strict";module.exports=Object.getOwnPropertyDescriptor},function(module,exports,__webpack_require__){"use strict";var origSymbol=typeof Symbol!=="undefined"&&Symbol;var hasSymbolSham=__webpack_require__(201);module.exports=function hasNativeSymbols(){if(typeof origSymbol!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof origSymbol("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return hasSymbolSham()}},function(module,exports,__webpack_require__){"use strict";module.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var obj={};var sym=Symbol("test");var symObj=Object(sym);if(typeof sym==="string"){return false}if(Object.prototype.toString.call(sym)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(symObj)!=="[object Symbol]"){return false}var symVal=42;obj[sym]=symVal;for(var _ in obj){return false}if(typeof Object.keys==="function"&&Object.keys(obj).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(obj).length!==0){return false}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false}}return true}},function(module,exports,__webpack_require__){"use strict";var callBind=__webpack_require__(133);var gOPD=__webpack_require__(206);var hasProtoAccessor;try{hasProtoAccessor=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS"){throw e}}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__");var $Object=Object;var $getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&typeof desc.get==="function"?callBind([desc.get]):typeof $getPrototypeOf==="function"?function getDunder(value){return $getPrototypeOf(value==null?value:$Object(value))}:false},function(module,exports,__webpack_require__){"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ";var toStr=Object.prototype.toString;var max=Math.max;var funcType="[object Function]";var concatty=function concatty(a,b){var arr=[];for(var i=0;i<a.length;i+=1){arr[i]=a[i]}for(var j=0;j<b.length;j+=1){arr[j+a.length]=b[j]}return arr};var slicy=function slicy(arrLike,offset){var arr=[];for(var i=offset||0,j=0;i<arrLike.length;i+=1,j+=1){arr[j]=arrLike[i]}return arr};var joiny=function(arr,joiner){var str="";for(var i=0;i<arr.length;i+=1){str+=arr[i];if(i+1<arr.length){str+=joiner}}return str};module.exports=function bind(that){var target=this;if(typeof target!=="function"||toStr.apply(target)!==funcType){throw new TypeError(ERROR_MESSAGE+target)}
6var args=slicy(arguments,1);var bound;var binder=function(){if(this instanceof bound){var result=target.apply(this,concatty(args,arguments));if(Object(result)===result){return result}return this}return target.apply(that,concatty(args,arguments))};var boundLength=max(0,target.length-args.length);var boundArgs=[];for(var i=0;i<boundLength;i++){boundArgs[i]="$"+i}bound=Function("binder","return function ("+joiny(boundArgs,",")+"){ return binder.apply(this,arguments); }")(binder);if(target.prototype){var Empty=function Empty(){};Empty.prototype=target.prototype;bound.prototype=new Empty;Empty.prototype=null}return bound}},function(module,exports,__webpack_require__){"use strict";var bind=__webpack_require__(50);var $apply=__webpack_require__(69);var $call=__webpack_require__(62);var $reflectApply=__webpack_require__(205);module.exports=$reflectApply||bind.call($call,$apply)},function(module,exports,__webpack_require__){"use strict";module.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply},function(module,exports,__webpack_require__){"use strict";var $gOPD=__webpack_require__(207);if($gOPD){try{$gOPD([],"length")}catch(e){$gOPD=null}}module.exports=$gOPD},function(module,exports,__webpack_require__){"use strict";module.exports=Object.getOwnPropertyDescriptor},function(module,exports,__webpack_require__){"use strict";var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=__webpack_require__(50);module.exports=bind.call(call,$hasOwn)},function(module,exports,__webpack_require__){"use strict";var undefined;var $Object=__webpack_require__(66);var $Error=__webpack_require__(87);var $EvalError=__webpack_require__(88);var $RangeError=__webpack_require__(89);var $ReferenceError=__webpack_require__(90);var $SyntaxError=__webpack_require__(91);var $TypeError=__webpack_require__(49);var $URIError=__webpack_require__(92);var abs=__webpack_require__(93);var floor=__webpack_require__(94);var max=__webpack_require__(95);var min=__webpack_require__(96);var pow=__webpack_require__(97);var round=__webpack_require__(98);var sign=__webpack_require__(99);var $Function=Function;var getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}};var $gOPD=__webpack_require__(210);var $defineProperty=__webpack_require__(100);var throwTypeError=function(){throw new $TypeError};var ThrowTypeError=$gOPD?function(){try{arguments.callee;return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError;var hasSymbols=__webpack_require__(212)();var getProto=__webpack_require__(101);var $ObjectGPO=__webpack_require__(68);var $ReflectGPO=__webpack_require__(67);var $apply=__webpack_require__(69);var $call=__webpack_require__(62);var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined:getProto(Uint8Array);var INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":typeof Float16Array==="undefined"?undefined:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?undefined:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
6IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":typeof JSON==="object"?JSON:undefined,"%Map%":typeof Map==="undefined"?undefined:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto){try{null.error}catch(e){var errorProto=getProto(getProto(e));INTRINSICS["%Error.prototype%"]=errorProto}}var doEval=function doEval(name){var value;if(name==="%AsyncFunction%"){value=getEvalledConstructor("async function () {}")}else if(name==="%GeneratorFunction%"){value=getEvalledConstructor("function* () {}")}else if(name==="%AsyncGeneratorFunction%"){value=getEvalledConstructor("async function* () {}")}else if(name==="%AsyncGenerator%"){var fn=doEval("%AsyncGeneratorFunction%");if(fn){value=fn.prototype}}else if(name==="%AsyncIteratorPrototype%"){var gen=doEval("%AsyncGenerator%");if(gen&&getProto){value=getProto(gen.prototype)}}INTRINSICS[name]=value;return value};var LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var bind=__webpack_require__(50);var hasOwn=__webpack_require__(214);var $concat=bind.call($call,Array.prototype.concat);var $spliceApply=bind.call($apply,Array.prototype.splice);var $replace=bind.call($call,String.prototype.replace);var $strSlice=bind.call($call,String.prototype.slice);var $exec=bind.call($call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function stringToPath(string){var first=$strSlice(string,0,1);var last=$strSlice(string,-1);if(first==="%"&&last!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else if(last==="%"&&first!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`")}var result=[];$replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match}));return result};var getBaseIntrinsic=function getBaseIntrinsic(name,allowMissing){var intrinsicName=name;var alias;if(hasOwn(LEGACY_ALIASES,intrinsicName)){alias=LEGACY_ALIASES[intrinsicName];intrinsicName="%"+alias[0]+"%"}if(hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval){value=doEval(intrinsicName)}if(typeof value==="undefined"&&!allowMissing){throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!")}return{alias:alias,name:intrinsicName,value:value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function GetIntrinsic(name,allowMissing){if(typeof name!=="string"||name.length===0){throw new $TypeError("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof allowMissing!=="boolean"){throw new $TypeError('"allowMissing" argument must be a boolean')}if($exec(/^%?[^%]*%?$/,name)===null){throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var parts=stringToPath(name);var intrinsicBaseName=parts.length>0?parts[0]:"";var intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing);var intrinsicRealName=intrinsic.name;var value=intrinsic.value;var skipFurtherCaching=false;var alias=intrinsic.alias;if(alias){intrinsicBaseName=alias[0];$spliceApply(parts,$concat([0,1],alias))}for(var i=1,isOwn=true;i<parts.length;i+=1){var part=parts[i];
6var first=$strSlice(part,0,1);var last=$strSlice(part,-1);if((first==='"'||first==="'"||first==="`"||(last==='"'||last==="'"||last==="`"))&&first!==last){throw new $SyntaxError("property names with quotes must have matching quotes")}if(part==="constructor"||!isOwn){skipFurtherCaching=true}intrinsicBaseName+="."+part;intrinsicRealName="%"+intrinsicBaseName+"%";if(hasOwn(INTRINSICS,intrinsicRealName)){value=INTRINSICS[intrinsicRealName]}else if(value!=null){if(!(part in value)){if(!allowMissing){throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.")}return void undefined}if($gOPD&&i+1>=parts.length){var desc=$gOPD(value,part);isOwn=!!desc;if(isOwn&&"get"in desc&&!("originalValue"in desc.get)){value=desc.get}else{value=value[part]}}else{isOwn=hasOwn(value,part);value=value[part]}if(isOwn&&!skipFurtherCaching){INTRINSICS[intrinsicRealName]=value}}}return value}},function(module,exports,__webpack_require__){"use strict";var $gOPD=__webpack_require__(211);if($gOPD){try{$gOPD([],"length")}catch(e){$gOPD=null}}module.exports=$gOPD},function(module,exports,__webpack_require__){"use strict";module.exports=Object.getOwnPropertyDescriptor},function(module,exports,__webpack_require__){"use strict";var origSymbol=typeof Symbol!=="undefined"&&Symbol;var hasSymbolSham=__webpack_require__(213);module.exports=function hasNativeSymbols(){if(typeof origSymbol!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof origSymbol("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return hasSymbolSham()}},function(module,exports,__webpack_require__){"use strict";module.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var obj={};var sym=Symbol("test");var symObj=Object(sym);if(typeof sym==="string"){return false}if(Object.prototype.toString.call(sym)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(symObj)!=="[object Symbol]"){return false}var symVal=42;obj[sym]=symVal;for(var _ in obj){return false}if(typeof Object.keys==="function"&&Object.keys(obj).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(obj).length!==0){return false}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false}}return true}},function(module,exports,__webpack_require__){"use strict";var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=__webpack_require__(50);module.exports=bind.call(call,$hasOwn)},function(module,exports,__webpack_require__){(function(global){var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;
6var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1e3&&num<1e3||$test.call(/e/,str)){return str}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==="number"){var int=num<0?-$floor(-num):$floor(num);if(int!==num){var intStr=String(int);var dec=$slice.call(str,intStr.length+1);return $replace.call(intStr,sepRegex,"$&_")+"."+$replace.call($replace.call(dec,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(str,sepRegex,"$&_")}var utilInspect=__webpack_require__(216);var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var quotes={__proto__:null,double:'"',single:"'"};var quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};module.exports=function inspect_(obj,options,depth,seen){var opts=options||{};if(has(opts,"quoteStyle")&&!has(quotes,opts.quoteStyle)){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has(opts,"maxStringLength")&&(typeof opts.maxStringLength==="number"?opts.maxStringLength<0&&opts.maxStringLength!==Infinity:opts.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var customInspect=has(opts,"customInspect")?opts.customInspect:true;if(typeof customInspect!=="boolean"&&customInspect!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has(opts,"indent")&&opts.indent!==null&&opts.indent!=="\t"&&!(parseInt(opts.indent,10)===opts.indent&&opts.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has(opts,"numericSeparator")&&typeof opts.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var numericSeparator=opts.numericSeparator;if(typeof obj==="undefined"){return"undefined"}if(obj===null){return"null"}if(typeof obj==="boolean"){return obj?"true":"false"}if(typeof obj==="string"){return inspectString(obj,opts)}if(typeof obj==="number"){if(obj===0){return Infinity/obj>0?"0":"-0"}var str=String(obj);return numericSeparator?addNumericSeparator(obj,str):str}if(typeof obj==="bigint"){var bigIntStr=String(obj)+"n";return numericSeparator?addNumericSeparator(obj,bigIntStr):bigIntStr}var maxDepth=typeof opts.depth==="undefined"?5:opts.depth;if(typeof depth==="undefined"){depth=0}if(depth>=maxDepth&&maxDepth>0&&typeof obj==="object"){return isArray(obj)?"[Array]":"[Object]"}var indent=getIndent(opts,depth);if(typeof seen==="undefined"){seen=[]}else if(indexOf(seen,obj)>=0){return"[Circular]"}function inspect(value,from,noIndent){if(from){seen=$arrSlice.call(seen);seen.push(from)}if(noIndent){var newOpts={depth:opts.depth};if(has(opts,"quoteStyle")){newOpts.quoteStyle=opts.quoteStyle}return inspect_(value,newOpts,depth+1,seen)}return inspect_(value,opts,depth+1,seen)}if(typeof obj==="function"&&!isRegExp(obj)){var name=nameOf(obj);var keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+$join.call(keys,", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?$replace.call(String(obj),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return typeof obj==="object"&&!hasShammedSymbols?markBoxed(symString):symString}if(isElement(obj)){var s="<"+$toLowerCase.call(String(obj.nodeName));var attrs=obj.attributes||[];for(var i=0;i<attrs.length;i++){s+=" "+attrs[i].name+"="+wrapQuotes(quote(attrs[i].value),"double",opts)}s+=">";if(obj.childNodes&&obj.childNodes.length){s+="..."}s+="</"+$toLowerCase.call(String(obj.nodeName))+">";return s}if(isArray(obj)){if(obj.length===0){return"[]"}var xs=arrObjKeys(obj,inspect);if(indent&&!singleLineValues(xs)){return"["+indentedJoin(xs,indent)+"]"}return"[ "+$join.call(xs,", ")+" ]"}if(isError(obj)){var parts=arrObjKeys(obj,inspect);if(!("cause"in Error.prototype)&&"cause"in obj&&!isEnumerable.call(obj,"cause")){return"{ ["+String(obj)+"] "+$join.call($concat.call("[cause]: "+inspect(obj.cause),parts),", ")+" }"}if(parts.length===0){return"["+String(obj)+"]"}return"{ ["+String(obj)+"] "+$join.call(parts,", ")+" }"}if(typeof obj==="object"&&customInspect){if(inspectSymbol&&typeof obj[inspectSymbol]==="function"&&utilInspect){return utilIns
6pect(obj,{depth:maxDepth-depth})}else if(customInspect!=="symbol"&&typeof obj.inspect==="function"){return obj.inspect()}}if(isMap(obj)){var mapParts=[];if(mapForEach){mapForEach.call(obj,(function(value,key){mapParts.push(inspect(key,obj,true)+" => "+inspect(value,obj))}))}return collectionOf("Map",mapSize.call(obj),mapParts,indent)}if(isSet(obj)){var setParts=[];if(setForEach){setForEach.call(obj,(function(value){setParts.push(inspect(value,obj))}))}return collectionOf("Set",setSize.call(obj),setParts,indent)}if(isWeakMap(obj)){return weakCollectionOf("WeakMap")}if(isWeakSet(obj)){return weakCollectionOf("WeakSet")}if(isWeakRef(obj)){return weakCollectionOf("WeakRef")}if(isNumber(obj)){return markBoxed(inspect(Number(obj)))}if(isBigInt(obj)){return markBoxed(inspect(bigIntValueOf.call(obj)))}if(isBoolean(obj)){return markBoxed(booleanValueOf.call(obj))}if(isString(obj)){return markBoxed(inspect(String(obj)))}if(typeof window!=="undefined"&&obj===window){return"{ [object Window] }"}if(typeof globalThis!=="undefined"&&obj===globalThis||typeof global!=="undefined"&&obj===global){return"{ [object globalThis] }"}if(!isDate(obj)&&!isRegExp(obj)){var ys=arrObjKeys(obj,inspect);var isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object;var protoTag=obj instanceof Object?"":"null prototype";var stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?$slice.call(toStr(obj),8,-1):protoTag?"Object":"";var constructorTag=isPlainObject||typeof obj.constructor!=="function"?"":obj.constructor.name?obj.constructor.name+" ":"";var tag=constructorTag+(stringTag||protoTag?"["+$join.call($concat.call([],stringTag||[],protoTag||[]),": ")+"] ":"");if(ys.length===0){return tag+"{}"}if(indent){return tag+"{"+indentedJoin(ys,indent)+"}"}return tag+"{ "+$join.call(ys,", ")+" }"}return String(obj)};function wrapQuotes(s,defaultStyle,opts){var style=opts.quoteStyle||defaultStyle;var quoteChar=quotes[style];return quoteChar+s+quoteChar}function quote(s){return $replace.call(String(s),/"/g,""")}function canTrustToString(obj){return!toStringTag||!(typeof obj==="object"&&(toStringTag in obj||typeof obj[toStringTag]!=="undefined"))}function isArray(obj){return toStr(obj)==="[object Array]"&&canTrustToString(obj)}function isDate(obj){return toStr(obj)==="[object Date]"&&canTrustToString(obj)}function isRegExp(obj){return toStr(obj)==="[object RegExp]"&&canTrustToString(obj)}function isError(obj){return toStr(obj)==="[object Error]"&&canTrustToString(obj)}function isString(obj){return toStr(obj)==="[object String]"&&canTrustToString(obj)}function isNumber(obj){return toStr(obj)==="[object Number]"&&canTrustToString(obj)}function isBoolean(obj){return toStr(obj)==="[object Boolean]"&&canTrustToString(obj)}function isSymbol(obj){if(hasShammedSymbols){return obj&&typeof obj==="object"&&obj instanceof Symbol}if(typeof obj==="symbol"){return true}if(!obj||typeof obj!=="object"||!symToString){return false}try{symToString.call(obj);return true}catch(e){}return false}function isBigInt(obj){if(!obj||typeof obj!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(obj);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this};function has(obj,key){return hasOwn.call(obj,key)}function toStr(obj){return objectToString.call(obj)}function nameOf(f){if(f.name){return f.name}var m=$match.call(functionToString.call(f),/^function\s*([\w$]+)/);if(m){return m[1]}return null}function indexOf(xs,x){if(xs.indexOf){return xs.indexOf(x)}for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x){return i}}return-1}function isMap(x){if(!mapSize||!x||typeof x!=="object"){return false}try{mapSize.call(x);try{setSize.call(x)}catch(s){return true}return x instanceof Map}catch(e){}return false}function isWeakMap(x){if(!weakMapHas||!x||typeof x!=="object"){return false}try{weakMapHas.call(x,weakMapHas);try{weakSetHas.call(x,weakSetHas)}catch(s){return true}return x instanceof WeakMap}catch(e){}return false}function isWeakRef(x){if(!weakRefDeref||!x||typeof x!=="object"){return false}try{weakRefDeref.call(x);return true}catch(e){}return false}function isSet(x){if(!setSize||!x||typeof x!=="object"){return false}try{setSize.call(x);try{mapSize.call(x)}catch(m){return true}return x instanceof Set}catch(e){}return false}function isWeakSet(x){if(!weakSetHas||!x||typeof x!=="object"){return false}try{weakSetHas.call(x,weakSetHas);try{weakMapHas.call(x,weakMapHas)}catch(s){return true}return x instanceof WeakSet}catch(e){}return false}function isElement(x){if(!x||typeof x!=="object"){return false}if(typeof HTMLElement!=="undefined"&&x instanceof HTMLElement){return true}return typeof x.nodeName==="string"&&typeof x.getAttribute==="function"}
6function inspectString(str,opts){if(str.length>opts.maxStringLength){var remaining=str.length-opts.maxStringLength;var trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString($slice.call(str,0,opts.maxStringLength),opts)+trailer}var quoteRE=quoteREs[opts.quoteStyle||"single"];quoteRE.lastIndex=0;var s=$replace.call($replace.call(str,quoteRE,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(s,"single",opts)}function lowbyte(c){var n=c.charCodeAt(0);var x={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];if(x){return"\\"+x}return"\\x"+(n<16?"0":"")+$toUpperCase.call(n.toString(16))}function markBoxed(str){return"Object("+str+")"}function weakCollectionOf(type){return type+" { ? }"}function collectionOf(type,size,entries,indent){var joinedEntries=indent?indentedJoin(entries,indent):$join.call(entries,", ");return type+" ("+size+") {"+joinedEntries+"}"}function singleLineValues(xs){for(var i=0;i<xs.length;i++){if(indexOf(xs[i],"\n")>=0){return false}}return true}function getIndent(opts,depth){var baseIndent;if(opts.indent==="\t"){baseIndent="\t"}else if(typeof opts.indent==="number"&&opts.indent>0){baseIndent=$join.call(Array(opts.indent+1)," ")}else{return null}return{base:baseIndent,prev:$join.call(Array(depth+1),baseIndent)}}function indentedJoin(xs,indent){if(xs.length===0){return""}var lineJoiner="\n"+indent.prev+indent.base;return lineJoiner+$join.call(xs,","+lineJoiner)+"\n"+indent.prev}function arrObjKeys(obj,inspect){var isArr=isArray(obj);var xs=[];if(isArr){xs.length=obj.length;for(var i=0;i<obj.length;i++){xs[i]=has(obj,i)?inspect(obj[i],obj):""}}var syms=typeof gOPS==="function"?gOPS(obj):[];var symMap;if(hasShammedSymbols){symMap={};for(var k=0;k<syms.length;k++){symMap["$"+syms[k]]=syms[k]}}for(var key in obj){if(!has(obj,key)){continue}if(isArr&&String(Number(key))===key&&key<obj.length){continue}if(hasShammedSymbols&&symMap["$"+key]instanceof Symbol){continue}else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+": "+inspect(obj[key],obj))}else{xs.push(key+": "+inspect(obj[key],obj))}}if(typeof gOPS==="function"){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push("["+inspect(syms[j])+"]: "+inspect(obj[syms[j]],obj))}}}return xs}}).call(this,__webpack_require__(48))},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(218);var callBound=__webpack_require__(134);var inspect=__webpack_require__(224);var getSideChannelMap=__webpack_require__(132);var $TypeError=__webpack_require__(49);var $WeakMap=GetIntrinsic("%WeakMap%",true);var $weakMapGet=callBound("WeakMap.prototype.get",true);var $weakMapSet=callBound("WeakMap.prototype.set",true);var $weakMapHas=callBound("WeakMap.prototype.has",true);var $weakMapDelete=callBound("WeakMap.prototype.delete",true);module.exports=$WeakMap?function getSideChannelWeakMap(){var $wm;var $m;var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError("Side channel does not contain "+inspect(key))}},delete:function(key){if($WeakMap&&key&&(typeof key==="object"||typeof key==="function")){if($wm){return $weakMapDelete($wm,key)}}else if(getSideChannelMap){if($m){return $m["delete"](key)}}return false},get:function(key){if($WeakMap&&key&&(typeof key==="object"||typeof key==="function")){if($wm){return $weakMapGet($wm,key)}}return $m&&$m.get(key)},has:function(key){if($WeakMap&&key&&(typeof key==="object"||typeof key==="function")){if($wm){return $weakMapHas($wm,key)}}return!!$m&&$m.has(key)},set:function(key,value){if($WeakMap&&key&&(typeof key==="object"||typeof key==="function")){if(!$wm){$wm=new $WeakMap}$weakMapSet($wm,key,value)}else if(getSideChannelMap){if(!$m){$m=getSideChannelMap()}$m.set(key,value)}}};return channel}:getSideChannelMap},function(module,exports,__webpack_require__){"use strict";var undefined;var $Object=__webpack_require__(66);var $Error=__webpack_require__(87);var $EvalError=__webpack_require__(88);var $RangeError=__webpack_require__(89);var $ReferenceError=__webpack_require__(90);var $SyntaxError=__webpack_require__(91);var $TypeError=__webpack_require__(49);var $URIError=__webpack_require__(92);var abs=__webpack_require__(93);var floor=__webpack_require__(94);var max=__webpack_require__(95);var min=__webpack_require__(96);var pow=__webpack_require__(97);var round=__webpack_require__(98);var sign=__webpack_require__(99);var $Function=Function;var getEvalledConstructor=function(expressionSyntax){try{return $Function('"use strict"; return ('+expressionSyntax+").constructor;")()}catch(e){}};var $gOPD=__webpack_require__(219);var $defineProperty=__webpack_require__(100);var throwTypeError=function(){throw new $TypeError};var ThrowTypeError=$gOPD?function(){try{arguments.callee;return throwTypeError}catch(calleeThrows){try{return $gOPD(arguments,"callee").get}catch(gOPDthrows){return throwTypeError}}}():throwTypeError;var hasSymbols=__webpack_require__(221)();var getProto=__webpack_require__(101);var $ObjectGPO=__webpack_require__(68);var $ReflectGPO=__webpack_require__(67);var $apply=__webpack_require__(69);var $call=__webpack_require__(62);var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined:getProto(Uint8Array);var INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":typeof Float16Array==="undefined"?undefined:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?undefined:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
6IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":typeof JSON==="object"?JSON:undefined,"%Map%":typeof Map==="undefined"?undefined:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto){try{null.error}catch(e){var errorProto=getProto(getProto(e));INTRINSICS["%Error.prototype%"]=errorProto}}var doEval=function doEval(name){var value;if(name==="%AsyncFunction%"){value=getEvalledConstructor("async function () {}")}else if(name==="%GeneratorFunction%"){value=getEvalledConstructor("function* () {}")}else if(name==="%AsyncGeneratorFunction%"){value=getEvalledConstructor("async function* () {}")}else if(name==="%AsyncGenerator%"){var fn=doEval("%AsyncGeneratorFunction%");if(fn){value=fn.prototype}}else if(name==="%AsyncIteratorPrototype%"){var gen=doEval("%AsyncGenerator%");if(gen&&getProto){value=getProto(gen.prototype)}}INTRINSICS[name]=value;return value};var LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var bind=__webpack_require__(50);var hasOwn=__webpack_require__(223);var $concat=bind.call($call,Array.prototype.concat);var $spliceApply=bind.call($apply,Array.prototype.splice);var $replace=bind.call($call,String.prototype.replace);var $strSlice=bind.call($call,String.prototype.slice);var $exec=bind.call($call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function stringToPath(string){var first=$strSlice(string,0,1);var last=$strSlice(string,-1);if(first==="%"&&last!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else if(last==="%"&&first!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`")}var result=[];$replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match}));return result};var getBaseIntrinsic=function getBaseIntrinsic(name,allowMissing){var intrinsicName=name;var alias;if(hasOwn(LEGACY_ALIASES,intrinsicName)){alias=LEGACY_ALIASES[intrinsicName];intrinsicName="%"+alias[0]+"%"}if(hasOwn(INTRINSICS,intrinsicName)){var value=INTRINSICS[intrinsicName];if(value===needsEval){value=doEval(intrinsicName)}if(typeof value==="undefined"&&!allowMissing){throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!")}return{alias:alias,name:intrinsicName,value:value}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function GetIntrinsic(name,allowMissing){if(typeof name!=="string"||name.length===0){throw new $TypeError("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof allowMissing!=="boolean"){throw new $TypeError('"allowMissing" argument must be a boolean')}if($exec(/^%?[^%]*%?$/,name)===null){throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var parts=stringToPath(name);var intrinsicBaseName=parts.length>0?parts[0]:"";var intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing);var intrinsicRealName=intrinsic.name;var value=intrinsic.value;var skipFurtherCaching=false;var alias=intrinsic.alias;if(alias){intrinsicBaseName=alias[0];$spliceApply(parts,$concat([0,1],alias))}for(var i=1,isOwn=true;i<parts.length;i+=1){var part=parts[i];
6var first=$strSlice(part,0,1);var last=$strSlice(part,-1);if((first==='"'||first==="'"||first==="`"||(last==='"'||last==="'"||last==="`"))&&first!==last){throw new $SyntaxError("property names with quotes must have matching quotes")}if(part==="constructor"||!isOwn){skipFurtherCaching=true}intrinsicBaseName+="."+part;intrinsicRealName="%"+intrinsicBaseName+"%";if(hasOwn(INTRINSICS,intrinsicRealName)){value=INTRINSICS[intrinsicRealName]}else if(value!=null){if(!(part in value)){if(!allowMissing){throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.")}return void undefined}if($gOPD&&i+1>=parts.length){var desc=$gOPD(value,part);isOwn=!!desc;if(isOwn&&"get"in desc&&!("originalValue"in desc.get)){value=desc.get}else{value=value[part]}}else{isOwn=hasOwn(value,part);value=value[part]}if(isOwn&&!skipFurtherCaching){INTRINSICS[intrinsicRealName]=value}}}return value}},function(module,exports,__webpack_require__){"use strict";var $gOPD=__webpack_require__(220);if($gOPD){try{$gOPD([],"length")}catch(e){$gOPD=null}}module.exports=$gOPD},function(module,exports,__webpack_require__){"use strict";module.exports=Object.getOwnPropertyDescriptor},function(module,exports,__webpack_require__){"use strict";var origSymbol=typeof Symbol!=="undefined"&&Symbol;var hasSymbolSham=__webpack_require__(222);module.exports=function hasNativeSymbols(){if(typeof origSymbol!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof origSymbol("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return hasSymbolSham()}},function(module,exports,__webpack_require__){"use strict";module.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var obj={};var sym=Symbol("test");var symObj=Object(sym);if(typeof sym==="string"){return false}if(Object.prototype.toString.call(sym)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(symObj)!=="[object Symbol]"){return false}var symVal=42;obj[sym]=symVal;for(var _ in obj){return false}if(typeof Object.keys==="function"&&Object.keys(obj).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(obj).length!==0){return false}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false}}return true}},function(module,exports,__webpack_require__){"use strict";var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=__webpack_require__(50);module.exports=bind.call(call,$hasOwn)},function(module,exports,__webpack_require__){(function(global){var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;
6var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1e3&&num<1e3||$test.call(/e/,str)){return str}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==="number"){var int=num<0?-$floor(-num):$floor(num);if(int!==num){var intStr=String(int);var dec=$slice.call(str,intStr.length+1);return $replace.call(intStr,sepRegex,"$&_")+"."+$replace.call($replace.call(dec,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(str,sepRegex,"$&_")}var utilInspect=__webpack_require__(225);var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var quotes={__proto__:null,double:'"',single:"'"};var quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};module.exports=function inspect_(obj,options,depth,seen){var opts=options||{};if(has(opts,"quoteStyle")&&!has(quotes,opts.quoteStyle)){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has(opts,"maxStringLength")&&(typeof opts.maxStringLength==="number"?opts.maxStringLength<0&&opts.maxStringLength!==Infinity:opts.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var customInspect=has(opts,"customInspect")?opts.customInspect:true;if(typeof customInspect!=="boolean"&&customInspect!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has(opts,"indent")&&opts.indent!==null&&opts.indent!=="\t"&&!(parseInt(opts.indent,10)===opts.indent&&opts.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has(opts,"numericSeparator")&&typeof opts.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var numericSeparator=opts.numericSeparator;if(typeof obj==="undefined"){return"undefined"}if(obj===null){return"null"}if(typeof obj==="boolean"){return obj?"true":"false"}if(typeof obj==="string"){return inspectString(obj,opts)}if(typeof obj==="number"){if(obj===0){return Infinity/obj>0?"0":"-0"}var str=String(obj);return numericSeparator?addNumericSeparator(obj,str):str}if(typeof obj==="bigint"){var bigIntStr=String(obj)+"n";return numericSeparator?addNumericSeparator(obj,bigIntStr):bigIntStr}var maxDepth=typeof opts.depth==="undefined"?5:opts.depth;if(typeof depth==="undefined"){depth=0}if(depth>=maxDepth&&maxDepth>0&&typeof obj==="object"){return isArray(obj)?"[Array]":"[Object]"}var indent=getIndent(opts,depth);if(typeof seen==="undefined"){seen=[]}else if(indexOf(seen,obj)>=0){return"[Circular]"}function inspect(value,from,noIndent){if(from){seen=$arrSlice.call(seen);seen.push(from)}if(noIndent){var newOpts={depth:opts.depth};if(has(opts,"quoteStyle")){newOpts.quoteStyle=opts.quoteStyle}return inspect_(value,newOpts,depth+1,seen)}return inspect_(value,opts,depth+1,seen)}if(typeof obj==="function"&&!isRegExp(obj)){var name=nameOf(obj);var keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+$join.call(keys,", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?$replace.call(String(obj),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return typeof obj==="object"&&!hasShammedSymbols?markBoxed(symString):symString}if(isElement(obj)){var s="<"+$toLowerCase.call(String(obj.nodeName));var attrs=obj.attributes||[];for(var i=0;i<attrs.length;i++){s+=" "+attrs[i].name+"="+wrapQuotes(quote(attrs[i].value),"double",opts)}s+=">";if(obj.childNodes&&obj.childNodes.length){s+="..."}s+="</"+$toLowerCase.call(String(obj.nodeName))+">";return s}if(isArray(obj)){if(obj.length===0){return"[]"}var xs=arrObjKeys(obj,inspect);if(indent&&!singleLineValues(xs)){return"["+indentedJoin(xs,indent)+"]"}return"[ "+$join.call(xs,", ")+" ]"}if(isError(obj)){var parts=arrObjKeys(obj,inspect);if(!("cause"in Error.prototype)&&"cause"in obj&&!isEnumerable.call(obj,"cause")){return"{ ["+String(obj)+"] "+$join.call($concat.call("[cause]: "+inspect(obj.cause),parts),", ")+" }"}if(parts.length===0){return"["+String(obj)+"]"}return"{ ["+String(obj)+"] "+$join.call(parts,", ")+" }"}if(typeof obj==="object"&&customInspect){if(inspectSymbol&&typeof obj[inspectSymbol]==="function"&&utilInspect){return utilIns
6pect(obj,{depth:maxDepth-depth})}else if(customInspect!=="symbol"&&typeof obj.inspect==="function"){return obj.inspect()}}if(isMap(obj)){var mapParts=[];if(mapForEach){mapForEach.call(obj,(function(value,key){mapParts.push(inspect(key,obj,true)+" => "+inspect(value,obj))}))}return collectionOf("Map",mapSize.call(obj),mapParts,indent)}if(isSet(obj)){var setParts=[];if(setForEach){setForEach.call(obj,(function(value){setParts.push(inspect(value,obj))}))}return collectionOf("Set",setSize.call(obj),setParts,indent)}if(isWeakMap(obj)){return weakCollectionOf("WeakMap")}if(isWeakSet(obj)){return weakCollectionOf("WeakSet")}if(isWeakRef(obj)){return weakCollectionOf("WeakRef")}if(isNumber(obj)){return markBoxed(inspect(Number(obj)))}if(isBigInt(obj)){return markBoxed(inspect(bigIntValueOf.call(obj)))}if(isBoolean(obj)){return markBoxed(booleanValueOf.call(obj))}if(isString(obj)){return markBoxed(inspect(String(obj)))}if(typeof window!=="undefined"&&obj===window){return"{ [object Window] }"}if(typeof globalThis!=="undefined"&&obj===globalThis||typeof global!=="undefined"&&obj===global){return"{ [object globalThis] }"}if(!isDate(obj)&&!isRegExp(obj)){var ys=arrObjKeys(obj,inspect);var isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object;var protoTag=obj instanceof Object?"":"null prototype";var stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?$slice.call(toStr(obj),8,-1):protoTag?"Object":"";var constructorTag=isPlainObject||typeof obj.constructor!=="function"?"":obj.constructor.name?obj.constructor.name+" ":"";var tag=constructorTag+(stringTag||protoTag?"["+$join.call($concat.call([],stringTag||[],protoTag||[]),": ")+"] ":"");if(ys.length===0){return tag+"{}"}if(indent){return tag+"{"+indentedJoin(ys,indent)+"}"}return tag+"{ "+$join.call(ys,", ")+" }"}return String(obj)};function wrapQuotes(s,defaultStyle,opts){var style=opts.quoteStyle||defaultStyle;var quoteChar=quotes[style];return quoteChar+s+quoteChar}function quote(s){return $replace.call(String(s),/"/g,""")}function canTrustToString(obj){return!toStringTag||!(typeof obj==="object"&&(toStringTag in obj||typeof obj[toStringTag]!=="undefined"))}function isArray(obj){return toStr(obj)==="[object Array]"&&canTrustToString(obj)}function isDate(obj){return toStr(obj)==="[object Date]"&&canTrustToString(obj)}function isRegExp(obj){return toStr(obj)==="[object RegExp]"&&canTrustToString(obj)}function isError(obj){return toStr(obj)==="[object Error]"&&canTrustToString(obj)}function isString(obj){return toStr(obj)==="[object String]"&&canTrustToString(obj)}function isNumber(obj){return toStr(obj)==="[object Number]"&&canTrustToString(obj)}function isBoolean(obj){return toStr(obj)==="[object Boolean]"&&canTrustToString(obj)}function isSymbol(obj){if(hasShammedSymbols){return obj&&typeof obj==="object"&&obj instanceof Symbol}if(typeof obj==="symbol"){return true}if(!obj||typeof obj!=="object"||!symToString){return false}try{symToString.call(obj);return true}catch(e){}return false}function isBigInt(obj){if(!obj||typeof obj!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(obj);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this};function has(obj,key){return hasOwn.call(obj,key)}function toStr(obj){return objectToString.call(obj)}function nameOf(f){if(f.name){return f.name}var m=$match.call(functionToString.call(f),/^function\s*([\w$]+)/);if(m){return m[1]}return null}function indexOf(xs,x){if(xs.indexOf){return xs.indexOf(x)}for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x){return i}}return-1}function isMap(x){if(!mapSize||!x||typeof x!=="object"){return false}try{mapSize.call(x);try{setSize.call(x)}catch(s){return true}return x instanceof Map}catch(e){}return false}function isWeakMap(x){if(!weakMapHas||!x||typeof x!=="object"){return false}try{weakMapHas.call(x,weakMapHas);try{weakSetHas.call(x,weakSetHas)}catch(s){return true}return x instanceof WeakMap}catch(e){}return false}function isWeakRef(x){if(!weakRefDeref||!x||typeof x!=="object"){return false}try{weakRefDeref.call(x);return true}catch(e){}return false}function isSet(x){if(!setSize||!x||typeof x!=="object"){return false}try{setSize.call(x);try{mapSize.call(x)}catch(m){return true}return x instanceof Set}catch(e){}return false}function isWeakSet(x){if(!weakSetHas||!x||typeof x!=="object"){return false}try{weakSetHas.call(x,weakSetHas);try{weakMapHas.call(x,weakMapHas)}catch(s){return true}return x instanceof WeakSet}catch(e){}return false}function isElement(x){if(!x||typeof x!=="object"){return false}if(typeof HTMLElement!=="undefined"&&x instanceof HTMLElement){return true}return typeof x.nodeName==="string"&&typeof x.getAttribute==="function"}
6function inspectString(str,opts){if(str.length>opts.maxStringLength){var remaining=str.length-opts.maxStringLength;var trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString($slice.call(str,0,opts.maxStringLength),opts)+trailer}var quoteRE=quoteREs[opts.quoteStyle||"single"];quoteRE.lastIndex=0;var s=$replace.call($replace.call(str,quoteRE,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(s,"single",opts)}function lowbyte(c){var n=c.charCodeAt(0);var x={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];if(x){return"\\"+x}return"\\x"+(n<16?"0":"")+$toUpperCase.call(n.toString(16))}function markBoxed(str){return"Object("+str+")"}function weakCollectionOf(type){return type+" { ? }"}function collectionOf(type,size,entries,indent){var joinedEntries=indent?indentedJoin(entries,indent):$join.call(entries,", ");return type+" ("+size+") {"+joinedEntries+"}"}function singleLineValues(xs){for(var i=0;i<xs.length;i++){if(indexOf(xs[i],"\n")>=0){return false}}return true}function getIndent(opts,depth){var baseIndent;if(opts.indent==="\t"){baseIndent="\t"}else if(typeof opts.indent==="number"&&opts.indent>0){baseIndent=$join.call(Array(opts.indent+1)," ")}else{return null}return{base:baseIndent,prev:$join.call(Array(depth+1),baseIndent)}}function indentedJoin(xs,indent){if(xs.length===0){return""}var lineJoiner="\n"+indent.prev+indent.base;return lineJoiner+$join.call(xs,","+lineJoiner)+"\n"+indent.prev}function arrObjKeys(obj,inspect){var isArr=isArray(obj);var xs=[];if(isArr){xs.length=obj.length;for(var i=0;i<obj.length;i++){xs[i]=has(obj,i)?inspect(obj[i],obj):""}}var syms=typeof gOPS==="function"?gOPS(obj):[];var symMap;if(hasShammedSymbols){symMap={};for(var k=0;k<syms.length;k++){symMap["$"+syms[k]]=syms[k]}}for(var key in obj){if(!has(obj,key)){continue}if(isArr&&String(Number(key))===key&&key<obj.length){continue}if(hasShammedSymbols&&symMap["$"+key]instanceof Symbol){continue}else if($test.call(/[^\w$]/,key)){xs.push(inspect(key,obj)+": "+inspect(obj[key],obj))}else{xs.push(key+": "+inspect(obj[key],obj))}}if(typeof gOPS==="function"){for(var j=0;j<syms.length;j++){if(isEnumerable.call(obj,syms[j])){xs.push("["+inspect(syms[j])+"]: "+inspect(obj[syms[j]],obj))}}}return xs}}).call(this,__webpack_require__(48))},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var utils=__webpack_require__(135);var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowEmptyArrays:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decodeDotInKeys:false,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictDepth:false,strictMerge:true,strictNullHandling:false,throwOnLimitExceeded:false};var interpretNumericEntities=function(str){return str.replace(/&#(\d+);/g,(function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10))}))};var parseArrayValue=function(val,options,currentArrayLength){if(val&&typeof val==="string"&&options.comma&&val.indexOf(",")>-1){return val.split(",")}if(options.throwOnLimitExceeded&¤tArrayLength>=options.arrayLimit){throw new RangeError("Array limit exceeded. Only "+options.arrayLimit+" element"+(options.arrayLimit===1?"":"s")+" allowed in an array.")}return val};var isoSentinel="utf8=%26%2310003%3B";var charsetSentinel="utf8=%E2%9C%93";var parseValues=function parseQueryStringValues(str,options){var obj={__proto__:null};var cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,""):str;cleanStr=cleanStr.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var limit=options.parameterLimit===Infinity?void undefined:options.parameterLimit;var parts=cleanStr.split(options.delimiter,options.throwOnLimitExceeded?limit+1:limit);if(options.throwOnLimitExceeded&&parts.length>limit){throw new RangeError("Parameter limit exceeded. Only "+limit+" parameter"+(limit===1?"":"s")+" allowed.")}var skipIndex=-1;var i;var charset=options.charset;if(options.charsetSentinel){for(i=0;i<parts.length;++i){if(parts[i].indexOf("utf8=")===0){if(parts[i]===charsetSentinel){charset="utf-8"}else if(parts[i]===isoSentinel){charset="iso-8859-1"}skipIndex=i;i=parts.length}}}for(i=0;i<parts.length;++i){if(i===skipIndex){continue}var part=parts[i];var bracketEqualsPos=part.indexOf("]=");var pos=bracketEqualsPos===-1?part.indexOf("="):bracketEqualsPos+1;var key;var val;if(pos===-1){key=options.decoder(part,defaults.decoder,charset,"key");val=options.strictNullHandling?null:""}else{key=options.decoder(part.slice(0,pos),defaults.decoder,charset,"key");if(key!==null){val=utils.maybeMap(parseArrayValue(part.slice(pos+1),options,isArray(obj[key])?obj[key].length:0),(function(encodedVal){return options.decoder(encodedVal,defaults.decoder,charset,"value")}))}}if(val&&options.interpretNumericEntities&&charset==="iso-8859-1"){val=interpretNumericEntities(String(val))}if(part.indexOf("[]=")>-1){val=isArray(val)?[val]:val}if(options.comma&&isArray(val)&&val.length>
6options.arrayLimit){if(options.throwOnLimitExceeded){throw new RangeError("Array limit exceeded. Only "+options.arrayLimit+" element"+(options.arrayLimit===1?"":"s")+" allowed in an array.")}val=utils.combine([],val,options.arrayLimit,options.plainObjects)}if(key!==null){var existing=has.call(obj,key);if(existing&&(options.duplicates==="combine"||part.indexOf("[]=")>-1)){obj[key]=utils.combine(obj[key],val,options.arrayLimit,options.plainObjects)}else if(!existing||options.duplicates==="last"){obj[key]=val}}}return obj};var parseObject=function(chain,val,options,valuesParsed){var currentArrayLength=0;if(chain.length>0&&chain[chain.length-1]==="[]"){var parentKey=chain.slice(0,-1).join("");currentArrayLength=Array.isArray(val)&&val[parentKey]?val[parentKey].length:0}var leaf=valuesParsed?val:parseArrayValue(val,options,currentArrayLength);for(var i=chain.length-1;i>=0;--i){var obj;var root=chain[i];if(root==="[]"&&options.parseArrays){if(utils.isOverflow(leaf)){obj=leaf}else{obj=options.allowEmptyArrays&&(leaf===""||options.strictNullHandling&&leaf===null)?[]:utils.combine([],leaf,options.arrayLimit,options.plainObjects)}}else{obj=options.plainObjects?{__proto__:null}:{};var cleanRoot=root.charAt(0)==="["&&root.charAt(root.length-1)==="]"?root.slice(1,-1):root;var decodedRoot=options.decodeDotInKeys?cleanRoot.replace(/%2E/g,"."):cleanRoot;
6var index=parseInt(decodedRoot,10);var isValidArrayIndex=!isNaN(index)&&root!==decodedRoot&&String(index)===decodedRoot&&index>=0&&options.parseArrays;if(!options.parseArrays&&decodedRoot===""){obj={0:leaf}}else if(isValidArrayIndex&&index<options.arrayLimit){obj=[];obj[index]=leaf}else if(isValidArrayIndex&&options.throwOnLimitExceeded){throw new RangeError("Array limit exceeded. Only "+options.arrayLimit+" element"+(options.arrayLimit===1?"":"s")+" allowed in an array.")}else if(isValidArrayIndex){obj[index]=leaf;utils.markOverflow(obj,index)}else if(decodedRoot!=="__proto__"){obj[decodedRoot]=leaf}}leaf=obj}return leaf};var splitKeyIntoSegments=function splitKeyIntoSegments(givenKey,options){var key=options.allowDots?givenKey.replace(/\.([^.[]+)/g,"[$1]"):givenKey;if(options.depth<=0){if(!options.plainObjects&&has.call(Object.prototype,key)){if(!options.allowPrototypes){return}}return[key]}var brackets=/(\[[^[\]]*])/;var child=/(\[[^[\]]*])/g;var segment=brackets.exec(key);var parent=segment?key.slice(0,segment.index):key;var keys=[];if(parent){if(!options.plainObjects&&has.call(Object.prototype,parent)){if(!options.allowPrototypes){return}}keys[keys.length]=parent}var i=0;while((segment=child.exec(key))!==null&&i<options.depth){i+=1;var segmentContent=segment[1].slice(1,-1);if(!options.plainObjects&&has.call(Object.prototype,segmentContent)){if(!options.allowPrototypes){return}}keys[keys.length]=segment[1]}if(segment){if(options.strictDepth===true){throw new RangeError("Input depth exceeded depth option of "+options.depth+" and strictDepth is true")}keys[keys.length]="["+key.slice(segment.index)+"]"}return keys};var parseKeys=function parseQueryStringKeys(givenKey,val,options,valuesParsed){if(!givenKey){return}var keys=splitKeyIntoSegments(givenKey,options);if(!keys){return}return parseObject(keys,val,options,valuesParsed)};var normalizeParseOptions=function normalizeParseOptions(opts){if(!opts){return defaults}if(typeof opts.allowEmptyArrays!=="undefined"&&typeof opts.allowEmptyArrays!=="boolean"){throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided")}if(typeof opts.decodeDotInKeys!=="undefined"&&typeof opts.decodeDotInKeys!=="boolean"){throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided")}if(opts.decoder!==null&&typeof opts.decoder!=="undefined"&&typeof opts.decoder!=="function"){throw new TypeError("Decoder has to be a function.")}if(typeof opts.charset!=="undefined"&&opts.charset!=="utf-8"&&opts.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}if(typeof opts.throwOnLimitExceeded!=="undefined"&&typeof opts.throwOnLimitExceeded!=="boolean"){throw new TypeError("`throwOnLimitExceeded` option must be a boolean")}var charset=typeof opts.charset==="undefined"?defaults.charset:opts.charset;var duplicates=typeof opts.duplicates==="undefined"?defaults.duplicates:opts.duplicates;if(duplicates!=="combine"&&duplicates!=="first"&&duplicates!=="last"){throw new TypeError("The duplicates option must be either combine, first, or last")}var allowDots=typeof opts.allowDots==="undefined"?opts.decodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==="boolean"?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:typeof opts.allowPrototypes==="boolean"?opts.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof opts.allowSparse==="boolean"?opts.allowSparse:defaults.allowSparse,arrayLimit:typeof opts.arrayLimit==="number"?opts.arrayLimit:defaults.arrayLimit,charset:charset,charsetSentinel:typeof opts.charsetSentinel==="boolean"?opts.charsetSentinel:defaults.charsetSentinel,comma:typeof opts.comma==="boolean"?opts.comma:defaults.comma,decodeDotInKeys:typeof opts.decodeDotInKeys==="boolean"?opts.decodeDotInKeys:defaults.decodeDotInKeys,decoder:typeof opts.decoder==="function"?opts.decoder:defaults.decoder,delimiter:typeof opts.delimiter==="string"||utils.isRegExp(opts.delimiter)?opts.delimiter:defaults.delimiter,depth:typeof opts.depth==="number"||opts.depth===false?+opts.depth:defaults.depth,duplicates:duplicates,ignoreQueryPrefix:opts.ignoreQueryPrefix===true,interpretNumericEntities:typeof opts.interpretNumericEntities==="boolean"?opts.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof opts.parameterLimit==="number"?opts.parameterLimit:defaults.parameterLimit,parseArrays:opts.parseArrays!==false,plainObjects:typeof opts.plainObjects==="boolean"?opts.plainObjects:defaults.plainObjects,strictDepth:typeof opts.strictDepth==="boolean"?!!opts.strictDepth:defaults.strictDepth,strictMerge:typeof opts.strictMerge==="boolean"?!!opts.strictMerge:defaults.strictMerge,strictNullHandling:typeof opts.strictNullHandling==="boolean"?opts.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:typeof opts.throwOnLimitExceeded==="boolean"?opts.throwOnLimitExceeded:false}};module.exports=function(str,opts){var options=normalizeParseOptions(opts);if(str===""||str===null||typeof str==="undefined"){return options.plainObjects?{__proto__:null}:{}}var tempObj=typeof str==="string"?parseValues(str,options):str;var obj=options.plainObjects?{__proto__:null}:{};var keys=Object.keys(tempObj);for(var i=0;i<keys.length;++i){var key=keys[i];var newObj=parseKeys(key,tempObj[key],options,typeof str==="string");obj=utils.merge(obj,newObj,options)}if(options.allowSparse===true){return obj}return utils.compact(obj)}},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(228);case"v7light":return __webpack_require__(230);case"v8dark":return __webpack_require__(232);case"v8light":return __webpack_require__(234);case"v9dark":return __webpack_require__(236);case"v9light":return __webpack_require__(238)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(229);
6content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}50%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(231);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}50%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(233);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}
650%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(235);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}50%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(237);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}50%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(239);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.appContainer__loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1000;animation-name:appContainerFadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:2s}@keyframes appContainerFadeIn{0%{opacity:0}
650%{opacity:0}100%{opacity:1}}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports){module.exports=__osdSharedDeps__.TsLib},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var react_1=__webpack_require__(0);var useIsomorphicLayoutEffect=typeof window!=="undefined"?react_1.useLayoutEffect:react_1.useEffect;exports.default=useIsomorphicLayoutEffect},function(module,exports,__webpack_require__){"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var resolvePathname=_interopDefault(__webpack_require__(243)),valueEqual=_interopDefault(__webpack_require__(245));__webpack_require__(247);var invariant=_interopDefault(__webpack_require__(248));function _extends(){return(_extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}function addLeadingSlash(t){return"/"===t.charAt(0)?t:"/"+t}function stripLeadingSlash(t){return"/"===t.charAt(0)?t.substr(1):t}function hasBasename(t,n){return 0===t.toLowerCase().indexOf(n.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(n.length))}function stripBasename(t,n){return hasBasename(t,n)?t.substr(n.length):t}function stripTrailingSlash(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function parsePath(t){var n=t||"/",e="",a="",r=n.indexOf("#");-1!==r&&(a=n.substr(r),n=n.substr(0,r));var o=n.indexOf("?");return-1!==o&&(e=n.substr(o),n=n.substr(0,o)),{pathname:n,search:"?"===e?"":e,hash:"#"===a?"":a}}function createPath(t){var n=t.pathname,e=t.search,a=t.hash,r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),a&&"#"!==a&&(r+="#"===a.charAt(0)?a:"#"+a),r}function createLocation(t,n,e,a){var r;"string"==typeof t?(r=parsePath(t)).state=n:(void 0===(r=_extends({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==n&&void 0===r.state&&(r.state=n));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return e&&(r.key=e),a?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=resolvePathname(r.pathname,a.pathname)):r.pathname=a.pathname:r.pathname||(r.pathname="/"),r}function locationsAreEqual(t,n){return t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash&&t.key===n.key&&valueEqual(t.state,n.state)}function createTransitionManager(){var o=null;var a=[];return{setPrompt:function(t){return o=t,function(){o===t&&(o=null)}},confirmTransitionTo:function(t,n,e,a){if(null!=o){var r="function"==typeof o?o(t,n):o;"string"==typeof r?"function"==typeof e?e(r,a):a(!0):a(!1!==r)}else a(!0)},appendListener:function(t){var n=!0;function e(){n&&t.apply(void 0,arguments)}return a.push(e),function(){n=!1,a=a.filter((function(t){return t!==e}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];a.forEach((function(t){return t.apply(void 0,n)}))}}}var canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);function getConfirmation(t,n){n(window.confirm(t))}function supportsHistory(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}function supportsPopStateOnHashChange(){return-1===window.navigator.userAgent.indexOf("Trident")}function supportsGoWithoutReloadUsingHash(){return-1===window.navigator.userAgent.indexOf("Firefox")}function isExtraneousPopstateEvent(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}var PopStateEvent="popstate",HashChangeEvent="hashchange";function getHistoryState(){try{return window.history.state||{}}catch(t){return{}}}function createBrowserHistory(t){void 0===t&&(t={}),canUseDOM||invariant(!1);var s=window.history,c=supportsHistory(),n=!supportsPopStateOnHashChange(),e=t,a=e.forceRefresh,h=void 0!==a&&a,r=e.getUserConfirmation,u=void 0===r?getConfirmation:r,o=e.ke
vendor: 4,248 bytes, line 6
6yLength,i=void 0===o?6:o,f=t.basename?stripTrailingSlash(addLeadingSlash(t.basename)):"";function l(t){var n=t||{},e=n.key,a=n.state,r=window.location,o=r.pathname+r.search+r.hash;return f&&(o=stripBasename(o,f)),createLocation(o,a,e)}function d(){return Math.random().toString(36).substr(2,i)}var v=createTransitionManager();function p(t){_extends(T,t),T.length=s.length,v.notifyListeners(T.location,T.action)}function g(t){isExtraneousPopstateEvent(t)||w(l(t.state))}function P(){w(l(getHistoryState()))}var m=!1;function w(n){if(m)m=!1,p();else{v.confirmTransitionTo(n,"POP",u,(function(t){t?p({action:"POP",location:n}):function(t){var n=T.location,e=H.indexOf(n.key);-1===e&&(e=0);var a=H.indexOf(t.key);-1===a&&(a=0);var r=e-a;r&&(m=!0,L(r))}(n)}))}}var y=l(getHistoryState()),H=[y.key];function x(t){return f+createPath(t)}function L(t){s.go(t)}var O=0;function E(t){1===(O+=t)&&1===t?(window.addEventListener(PopStateEvent,g),n&&window.addEventListener(HashChangeEvent,P)):0===O&&(window.removeEventListener(PopStateEvent,g),n&&window.removeEventListener(HashChangeEvent,P))}var S=!1;var T={length:s.length,action:"POP",location:y,createHref:x,push:function(t,n){var i=createLocation(t,n,d(),T.location);v.confirmTransitionTo(i,"PUSH",u,(function(t){if(t){var n=x(i),e=i.key,a=i.state;if(c)if(s.pushState({key:e,state:a},null,n),h)window.location.href=n;else{var r=H.indexOf(T.location.key),o=H.slice(0,r+1);o.push(i.key),H=o,p({action:"PUSH",location:i})}else window.location.href=n}}))},replace:function(t,n){var o="REPLACE",i=createLocation(t,n,d(),T.location);v.confirmTransitionTo(i,o,u,(function(t){if(t){var n=x(i),e=i.key,a=i.state;if(c)if(s.replaceState({key:e,state:a},null,n),h)window.location.replace(n);else{var r=H.indexOf(T.location.key);-1!==r&&(H[r]=i.key),p({action:o,location:i})}else window.location.replace(n)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var n=v.setPrompt(t);return S||(E(1),S=!0),function(){return S&&(S=!1,E(-1)),n()}},listen:function(t){var n=v.appendListener(t);return E(1),function(){E(-1),n()}}};return T}var HashChangeEvent$1="hashchange",HashPathCoders={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+stripLeadingSlash(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:stripLeadingSlash,decodePath:addLeadingSlash},slash:{encodePath:addLeadingSlash,decodePath:addLeadingSlash}};function stripHash(t){var n=t.indexOf("#");return-1===n?t:t.slice(0,n)}function getHashPath(){var t=window.location.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)}function pushHashPath(t){window.location.hash=t}function replaceHashPath(t){window.location.replace(stripHash(window.location.href)+"#"+t)}function createHashHistory(t){void 0===t&&(t={}),canUseDOM||invariant(!1);var n=window.history,e=(supportsGoWithoutReloadUsingHash(),t),a=e.getUserConfirmation,i=void 0===a?getConfirmation:a,r=e.hashType,o=void 0===r?"slash":r,s=t.basename?stripTrailingSlash(addLeadingSlash(t.basename)):"",c=HashPathCoders[o],h=c.encodePath,u=c.decodePath;function f(){var t=u(getHashPath());return s&&(t=stripBasename(t,s)),createLocation(t)}var l=createTransitionManager();function d(t){_extends(E,t),E.length=n.length,l.notifyListeners(E.location,E.action)}var v=!1,p=null;function g(){var t=getHashPath(),n=h(t);if(t!==n)replaceHashPath(n);else{var e=f(),a=E.location;if(!v&&function(t,n){return t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash}(a,e))return;if(p===createPath(e))return;p=null,function(n){if(v)v=!1,d();else{l.confirmTransitionTo(n,"POP",i,(function(t){t?d({action:"POP",location:n}):function(t){var n=E.location,e=y.lastIndexOf(createPath(n));-1===e&&(e=0);var a=y.lastIndexOf(createPath(t));-1===a&&(a=0);var r=e-a;r&&(v=!0,H(r))}(n)}))}}(e)}}var P=getHashPath(),m=h(P);P!==m&&replaceHashPath(m);var w=f(),y=[createPath(w)];function H(t){n.go(t)}var x=0;function L(t){1===(x+=t)&&1===t?window.addEventListener(HashChangeEvent$1,g):0===x&&window.removeEventListener(HashChangeEvent$1,g)}var O=!1;var E={length:n.length,action:"POP",location:w,createHref:function(t){var n=document.querySelector("base"),e="";return n&&n.getAttribute("href")&&(e=stripHash(window.location.href)),e
vendor: 5,424 bytes, lines 6-13
6+"#"+h(s+createPath(t))},push:function(t,n){var o=createLocation(t,void 0,void 0,E.location);l.confirmTransitionTo(o,"PUSH",i,(function(t){if(t){var n=createPath(o),e=h(s+n);if(getHashPath()!==e){p=n,pushHashPath(e);var a=y.lastIndexOf(createPath(E.location)),r=y.slice(0,a+1);r.push(n),y=r,d({action:"PUSH",location:o})}else d()}}))},replace:function(t,n){var r="REPLACE",o=createLocation(t,void 0,void 0,E.location);l.confirmTransitionTo(o,r,i,(function(t){if(t){var n=createPath(o),e=h(s+n);getHashPath()!==e&&(p=n,replaceHashPath(e));var a=y.indexOf(createPath(E.location));-1!==a&&(y[a]=n),d({action:r,location:o})}}))},go:H,goBack:function(){H(-1)},goForward:function(){H(1)},block:function(t){void 0===t&&(t=!1);var n=l.setPrompt(t);return O||(L(1),O=!0),function(){return O&&(O=!1,L(-1)),n()}},listen:function(t){var n=l.appendListener(t);return L(1),function(){L(-1),n()}}};return E}function clamp(t,n,e){return Math.min(Math.max(t,n),e)}function createMemoryHistory(t){void 0===t&&(t={});var n=t,r=n.getUserConfirmation,e=n.initialEntries,a=void 0===e?["/"]:e,o=n.initialIndex,i=void 0===o?0:o,s=n.keyLength,c=void 0===s?6:s,h=createTransitionManager();function u(t){_extends(g,t),g.length=g.entries.length,h.notifyListeners(g.location,g.action)}function f(){return Math.random().toString(36).substr(2,c)}var l=clamp(i,0,a.length-1),d=a.map((function(t){return createLocation(t,void 0,"string"==typeof t?f():t.key||f())})),v=createPath;function p(t){var n=clamp(g.index+t,0,g.entries.length-1),e=g.entries[n];h.confirmTransitionTo(e,"POP",r,(function(t){t?u({action:"POP",location:e,index:n}):u()}))}var g={length:d.length,action:"POP",location:d[l],index:l,entries:d,createHref:v,push:function(t,n){var a=createLocation(t,n,f(),g.location);h.confirmTransitionTo(a,"PUSH",r,(function(t){if(t){var n=g.index+1,e=g.entries.slice(0);e.length>n?e.splice(n,e.length-n,a):e.push(a),u({action:"PUSH",location:a,index:n,entries:e})}}))},replace:function(t,n){var e="REPLACE",a=createLocation(t,n,f(),g.location);h.confirmTransitionTo(a,e,r,(function(t){t&&(g.entries[g.index]=a,u({action:e,location:a}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(t){var n=g.index+t;return 0<=n&&n<g.entries.length},block:function(t){return void 0===t&&(t=!1),h.setPrompt(t)},listen:function(t){return h.appendListener(t)}};return g}exports.createBrowserHistory=createBrowserHistory,exports.createHashHistory=createHashHistory,exports.createMemoryHistory=createMemoryHistory,exports.createLocation=createLocation,exports.locationsAreEqual=locationsAreEqual,exports.parsePath=parsePath,exports.createPath=createPath},function(module,exports,__webpack_require__){"use strict";if(true){module.exports=__webpack_require__(244)}else{}},function(module,exports,__webpack_require__){"use strict";function isAbsolute(e){return"/"===e.charAt(0)}function spliceOne(e,t){for(var s=t,n=s+1,i=e.length;n<i;s+=1,n+=1)e[s]=e[n];e.pop()}function resolvePathname(e,t){void 0===t&&(t="");var s,n=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&isAbsolute(e),r=t&&isAbsolute(t),o=l||r;if(e&&isAbsolute(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";if(i.length){var u=i[i.length-1];s="."===u||".."===u||""===u}else s=!1;for(var a=0,c=i.length;0<=c;c--){var f=i[c];"."===f?spliceOne(i,c):".."===f?(spliceOne(i,c),a++):a&&(spliceOne(i,c),a--)}if(!o)for(;a--;a)i.unshift("..");!o||""===i[0]||i[0]&&isAbsolute(i[0])||i.unshift("");var h=i.join("/");return s&&"/"!==h.substr(-1)&&(h+="/"),h}module.exports=resolvePathname},function(module,exports,__webpack_require__){"use strict";if(true){module.exports=__webpack_require__(246)}else{}},function(module,exports,__webpack_require__){"use strict";function valueOf(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function valueEqual(u,r){if(u===r)return!0;if(null==u||null==r)return!1;if(Array.isArray(u))return Array.isArray(r)&&u.length===r.length&&u.every((function(e,u){return valueEqual(e,r[u])}));if("object"!=typeof u&&"object"!=typeof r)return!1;var e=valueOf(u),t=valueOf(r);return e!==u||t!==r?valueEqual(e,t):Object.keys(Object.assign({},u,r)).every((function(e){return valueEqual(u[e],r[e])}))}module.exports=valueEqual},function(module,exports,__webpack_require__){"use strict";var isProduction="production"==="production";function warning(condition,message){if(!isProduction){if(condition){return}var text="Warning: "+message;if(typeof console!=="undefined"){console.warn(text)}try{throw Error(text)}catch(x){}}}module.exports=warning},function(module,exports,__webpack_require__){"use strict";var isProduction="production"==="production";var prefix="Invariant failed";function invariant(condition,message){if(condition){return}if(isProduction){throw new Error(prefix)}var provided=typeof message==="function"?message():message;var value=provided?prefix+": "+provided:prefix;throw new Error(value)}module.exports=invariant},function(module,exports,__webpack_require__){"use strict";(function(global){ 7/*! 8 * The buffer module from node.js, for the browser. 9 * 10 * @author Feross Aboukhadijeh <http://feross.org> 11 * @license MIT 12 */ 13var base64=__webpack_require__(250);var ieee754=__webpack_require__(251);var isArray=__webpack_require__(252);exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();
vendor: 1,680 bytes, line 13
13exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;
vendor: 5,015 bytes, line 13
13if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};Buffer.concat=function concat(list,length){if(!isArray(list)){throw new TypeError('"list" argument must be an Array of Buffers')}if(list.length===0){return Buffer.alloc(0)}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf)){throw new TypeError('"list" argument must be an Array of Buffers')}buf.copy(buffer,pos);pos+=buf.length}return buffer};function byteLength(string,encoding){if(Buffer.isBuffer(string)){return string.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer)){return string.byteLength}if(typeof string!=="string"){string=""+string}var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case undefined:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}
vendor: 4,703 bytes, line 13
13if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i<len;i+=2){swap(this,i,i+1)}return this};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2)}return this};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4)}return this};Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1}}}else{if(byteOffset+valLength>
vendor: 21,090 bytes, line 13
13arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break}}if(found)return i}}return-1}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH))}return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&127)}return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;++i){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;++i){newBuf[i]=this[i+start]}}return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i){buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0){throw new RangeError("targetStart out of bounds")}if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i<len;++i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code}}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}}else if(typeof val==="number"){val=val&255}if(start<0||this.length<start||this.length<end){throw new RangeError("Out of range index")}if(end<=start){return this}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i<end;++i){this[i]=val}}else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString());var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len]}}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,__webpack_require__(48))},function(module,exports,__webpack_require__){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i}revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function getLens(b64){var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var validLen=b64.indexOf("=");if(validLen===-1)validLen=len;
vendor: 5,860 bytes, lines 13-15
13var placeHoldersLen=validLen===len?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength(b64){var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray(b64){var tmp;var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];var arr=new Arr(_byteLength(b64,validLen,placeHoldersLen));var curByte=0;var len=placeHoldersLen>0?validLen-4:validLen;var i;for(i=0;i<len;i+=4){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[curByte++]=tmp>>16&255;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}if(placeHoldersLen===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[curByte++]=tmp&255}if(placeHoldersLen===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16&16711680)+(uint8[i+1]<<8&65280)+(uint8[i+2]&255);output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"=")}return parts.join("")}},function(module,exports){ 14/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ 15exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(254);case"v7light":return __webpack_require__(256);case"v8dark":return __webpack_require__(258);case"v8light":return __webpack_require__(260);case"v9dark":return __webpack_require__(262);case"v9light":return __webpack_require__(264)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(255);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;background:#000;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(257);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;background:#fff;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(259);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;background:#0a121a;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(261);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;background:#fcfeff;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(263);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;
15background:#02020e;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(265);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdSidecarFlyout{box-shadow:initial;position:fixed;z-index:1001;background:#fcfeff;display:flex}.osdSidecarFlyout.osdSidecarFlyout--dockedRight{top:0;height:100vh;right:0;flex-direction:row;padding-left:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedLeft{top:0;height:100vh;left:0;flex-direction:row-reverse;padding-right:8px}.osdSidecarFlyout.osdSidecarFlyout--dockedTakeover{left:0;right:0;bottom:0;flex-direction:column;padding-top:8px}.osdSidecarFlyout.osdSidecarFlyout--hide{display:none}.osdSidecarFlyout .osdSidecarMountWrapper{width:100%;height:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(267);case"v7light":return __webpack_require__(269);case"v8dark":return __webpack_require__(271);case"v8light":return __webpack_require__(273);case"v9dark":return __webpack_require__(275);case"v9light":return __webpack_require__(277)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(268);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#d4dae5;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#535966;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(27,169,245,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#1ba9f5;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(270);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#343741;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#98a2b3;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(0,107,180,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#006bb4;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(272);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#dfe3e8;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#5b6875;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(21,157,141,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#159d8d;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(274);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#2a3947;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#adb4ba;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(7,130,126,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#07827e;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(276);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#e3e5e9;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#5c666f;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(0,151,209,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#0097d1;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(278);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.sidecar-resizableButton{position:relative;flex-shrink:0;z-index:1000}.sidecar-resizableButton::before,.sidecar-resizableButton::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#2a3947;transition:width 150ms ease,height 150ms ease,transform 150ms ease,background-color 150ms ease}.sidecar-resizableButton.resizableButton--horizontal{cursor:col-resize;width:16px;margin-left:-8px;margin-right:-8px}.sidecar-resizableButton.resizableButton--horizontal::before,.sidecar-resizableButton.resizableButton--horizontal::after{width:1px;height:12px}.sidecar-resizableButton.resizableButton--horizontal::before{transform:translate(-2px, -50%)}.sidecar-resizableButton.resizableButton--horizontal::after{transform:translate(1px, -50%)}.sidecar-resizableButton.resizableButton--vertical{cursor:row-resize;height:16px;margin-top:-8px;margin-bottom:-8px}.sidecar-resizableButton.resizableButton--vertical::before,.sidecar-resizableButton.resizableButton--vertical::after{width:12px;height:1px}.sidecar-resizableButton.resizableButton--vertical::before{transform:translate(-50%, -2px)}.sidecar-resizableButton.resizableButton--vertical::after{transform:translate(-50%, 1px)}.sidecar-resizableButton:hover:not(:disabled)::before,.sidecar-resizableButton:hover:not(:disabled)::after{background-color:#adb4ba;transition-delay:150ms}.sidecar-resizableButton:focus:not(:disabled){background-color:rgba(2,104,188,.1)}.sidecar-resizableButton:focus:not(:disabled)::before,.sidecar-resizableButton:focus:not(:disabled)::after{background-color:#0268bc;transition:width 150ms ease,height 150ms ease,transform 150ms ease;transition-delay:75ms}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{height:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::before{transform:translate(-1px, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--horizontal::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--horizontal::after{transform:translate(0, -50%)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{width:100%}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::before,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::before{transform:translate(-50%, -1px
15)}.sidecar-resizableButton:hover:not(:disabled).resizableButton--vertical::after,.sidecar-resizableButton:focus:not(:disabled).resizableButton--vertical::after{transform:translate(-50%, 0)}.sidecar-resizableButton:disabled{display:none !important}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(280);case"v7light":return __webpack_require__(282);case"v8dark":return __webpack_require__(284);case"v8light":return __webpack_require__(286);case"v9dark":return __webpack_require__(288);case"v9light":return __webpack_require__(290)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(281);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(152,162,179,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(283);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(105,112,125,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(285);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(141,152,163,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(287);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(289);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(149,155,162,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(291);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,'/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.osdCollapsibleNav__recentsListGroup{scrollbar-width:thin;height:100%;overflow-y:auto;overflow-x:hidden;max-height:160px;margin-right:-8px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar{width:16px;height:16px}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-thumb{background-color:rgba(90,104,117,.5);border:6px solid rgba(0,0,0,0);background-clip:content-box}.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-corner,.osdCollapsibleNav__recentsListGroup::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.osdCollapsibleNav__recentsListGroup:focus{outline:none}.osdCollapsibleNav__recentsListGroup[tabindex="0"]:focus:focus-visible{outline-style:auto}\n',""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(293);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#141519;overflow:hidden;box-shadow:1px 0 0 #343741 !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#98a2b3}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #343741;border-color:#535966}.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(22,23,28,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#16171c}.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(295);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#fafbfd;overflow:hidden;box-shadow:1px 0 0 #d3dae6 !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#69707d}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #d3dae6;border-color:#98a2b3}.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(251,252,253,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#fbfcfd}.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(297);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#172430;overflow:hidden;box-shadow:1px 0 0 #293847 !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#8d98a3}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #293847;border-color:#5b6875}.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(14,23,33,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#0e1721}.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(299);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#f0f2f4;overflow:hidden;box-shadow:1px 0 0 #d6d9dd !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#5a6875}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #d6d9dd;border-color:#adb4ba}.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(242,244,246,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#f2f4f6}.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(301);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#0f171f;overflow:hidden;box-shadow:1px 0 0 #2a3540 !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#959ba2}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #2a3540;border-color:#5c666f}
15.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(16,21,31,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#10151f}.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(303);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.context-nav-wrapper{border:none !important;border-top-right-radius:24px;background-color:#fcfeff;overflow:hidden;box-shadow:1px 0 0 #d6d9dd !important}.context-nav-wrapper .nav-link-item{padding:8px;border-radius:8px;box-shadow:none;margin-bottom:0;margin-top:0}.context-nav-wrapper .nav-link-item .nav-link-item-btn{margin-bottom:0;padding-top:0;padding-bottom:0}.context-nav-wrapper .nav-link-parent-item{padding-top:0;padding-bottom:0;margin-bottom:8px}.context-nav-wrapper .nav-link-parent-item>.nav-link-item-btn{padding:8px;margin-bottom:4px}.context-nav-wrapper .nav-link-parent-item svg{display:none}.context-nav-wrapper .nav-link-parent-item .leftNavCustomizedAccordionIcon{display:inline-block}.context-nav-wrapper .nav-link-item-category-button{margin-bottom:4px}.context-nav-wrapper .nav-link-item-category-button .nav-link-item{padding:4px 8px}.context-nav-wrapper .nav-link-item-category-item{margin-top:24px}.context-nav-wrapper .nav-link-fake-item{margin-top:0}.context-nav-wrapper .nav-link-fake-item-button{display:none}.context-nav-wrapper .nav-nested-item{padding:8px 0}.context-nav-wrapper .nav-nested-item::after,.context-nav-wrapper .nav-nested-item .nav-link-item-btn::after{background-color:#5a6875}.context-nav-wrapper .nav-nested-item:last-of-type::after{height:20px}.context-nav-wrapper .left-navigation-wrapper{display:flex;flex-direction:column}.context-nav-wrapper .flex-1-container{flex:1}.context-nav-wrapper .bottom-container{padding:0 16px;display:flex;-ms-overflow-style:-ms-autohiding-scrollbar}.context-nav-wrapper .bottom-container.bottom-container-collapsed{flex-direction:column;align-items:center;gap:16px;padding-top:8px;padding-bottom:8px}.context-nav-wrapper .bottom-container.bottom-container-collapsed>*{justify-content:center}.context-nav-wrapper .bottom-container.bottom-container-expanded{gap:16px;padding-top:12px;padding-bottom:12px;border-top:1px solid #d6d9dd;border-color:#adb4ba}.context-nav-wrapper .navGroupEnabledNavTopWrapper{padding:0 8px;padding-left:8px}.context-nav-wrapper .navGroupEnabledNavTopWrapper .navGroupEnabledHomeIcon{margin-left:8px}.context-nav-wrapper .searchBar-wrapper{padding:16px;padding-top:8px;background-color:rgba(0,0,0,0);flex-grow:0}.context-nav-wrapper .searchBar-wrapper .searchInput{background-color:rgba(242,244,246,.5)}.context-nav-wrapper .searchBar-wrapper .searchInput:focus{background-color:#f2f4f6}
15.context-nav-wrapper .searchBarIcon{position:fixed;top:48px;left:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(305);case"v7light":return __webpack_require__(307);case"v8dark":return __webpack_require__(309);case"v8light":return __webpack_require__(311);case"v9dark":return __webpack_require__(313);case"v9light":return __webpack_require__(315)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(306);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #343741}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(308);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #d3dae6}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(310);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #293847}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(312);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #d6d9dd}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(314);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #2a3540}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(316);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.newTopNavHeader{z-index:1000;padding:0 16px 8px;box-shadow:none;border-bottom:none;background:none;height:auto;gap:8px}.newTopNavHeader.primaryHeader{padding-top:12px}.newTopNavHeader.primaryApplicationHeader{padding-top:8px}.newTopNavHeader.primaryApplicationHeader:last-child{margin-bottom:0}.newTopNavHeader .headerAppActionMenu>.euiFlexGroup{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list{gap:8px}.newTopNavHeader .headerAppActionMenu>.euiHeaderLinks>.euiHeaderLinks__list>*{margin:0}.newTopNavHeader:has(.headerDescriptionControl,.headerBottomControl){height:auto}.newTopNavHeader>.euiHeaderSection{gap:8px}.newTopNavHeader>.euiHeaderSection:only-child{width:100%}.newTopNavHeader>.euiHeaderSection>.euiHeaderSectionItem:empty{display:none}.newTopNavHeader:not(:has(>:not(:empty))),.newTopNavHeader .euiHeaderSectionItem:not(:has(>:not(:empty))){display:none}.headerGlobalNav:has(.newTopNavHeader:not(.primaryApplicationHeader)){margin-bottom:-8px}.newTopNavHeaderTitle{line-height:32px;font-size:2rem}.primaryApplicationHeader .euiHeaderSection>.euiHeaderSectionItem{align-items:stretch}.primaryApplicationHeader .headerAppActionMenuSection{flex-grow:1}.primaryApplicationHeader .headerAppActionMenu{width:100%}.navToggleInLargeScreen{position:fixed;left:0;top:0}.navToggleInSmallScreen{min-width:unset;height:32px}.stretchedActionMenu{width:100%}#globalHeaderBars:has(.primaryApplicationHeader){border-bottom:1px solid #d6d9dd}@media only screen and (min-width: 575px)and (max-width: 767px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (max-width: 574px){.secondaryPageHeaderFlexGroup{display:flex;flex-direction:column}.secondaryPageHeaderFlexGroup .euiHeaderSection--left .euiFlexGroup--responsive>.euiFlexItem,.secondaryPageHeaderFlexGroup .euiHeaderSection--right .euiFlexGroup--responsive>.euiFlexItem{margin:4px 0 !important}.leftSecondaryPageHeaderFlexGroup{margin-bottom:4px}}@media only screen and (min-width: 768px)and (max-width: 991px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}
15@media only screen and (min-width: 992px)and (max-width: 1199px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1200px)and (max-width: 1679px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1680px)and (max-width: 1919px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}@media only screen and (min-width: 1920px){.leftSecondaryPageHeaderFlexGroup{margin-right:12px}}.leftSecondaryPageHeaderFlexGroup .euiBadge,.leftSecondaryPageHeaderFlexGroup .euiHealth{line-height:32px !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(318);case"v7light":return __webpack_require__(320);case"v8dark":return __webpack_require__(322);case"v8light":return __webpack_require__(324);case"v9dark":return __webpack_require__(326);case"v9light":return __webpack_require__(328)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(319);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#7a7f89}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(321);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#6a717d}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(323);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#9fa6af}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(325);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#676e75}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(327);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#798189}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(329);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.headerControl{gap:8px}.headerControl.headerDescriptionControl .descriptionHeaderControl{max-width:80ch;line-height:1.5;color:#686c75}.headerControl.headerDescriptionControl .descriptionHeaderControl .euiHeaderLink{vertical-align:unset;border:0;height:auto}.headerControl:empty{display:none}.headerControl .euiButton{min-width:auto}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(331);case"v7light":return __webpack_require__(333);case"v8dark":return __webpack_require__(335);case"v8light":return __webpack_require__(337);case"v9dark":return __webpack_require__(339);case"v9light":return __webpack_require__(341)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(332);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(334);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(336);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(338);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(340);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(342);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.logoContainer{height:30px;padding:3px 3px 3px 10px}.logoImage{height:100%;max-width:100%}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(344);case"v7light":return __webpack_require__(346);case"v8dark":return __webpack_require__(348);case"v8light":return __webpack_require__(350);case"v9dark":return __webpack_require__(352);case"v9light":return __webpack_require__(354)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(345);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(347);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(349);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(351);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(353);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(355);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.header__homeLoaderNavButton .euiHeaderSectionItemButton__content{min-width:24px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .loaderContainer,.header__homeLoaderNavButton .euiHeaderSectionItemButton__content .homeIconContainer{grid-area:1/1;align-self:center;justify-self:center}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(357);case"v7light":return __webpack_require__(359);case"v8dark":return __webpack_require__(361);case"v8light":return __webpack_require__(363);case"v9dark":return __webpack_require__(365);case"v9light":return __webpack_require__(367)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(358);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(360);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(362);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(364);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(366);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(368);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.primaryApplicationHeader .headerRecentItemsButton{margin-top:4px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator{width:24px}.headerRecentItemsButton.headerRecentItemsButton--loadingIndicator>span{padding:0}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},function(module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},function(module,exports,__webpack_require__){const parse=__webpack_require__(55);const valid=(version,options)=>{const v=parse(version,options);return v?v.version:null};module.exports=valid},function(module,exports,__webpack_require__){const parse=__webpack_require__(55);const clean=(version,options)=>{const s=parse(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null};module.exports=clean},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const inc=(version,release,options,identifier,identifierBase)=>{if(typeof options==="string"){identifierBase=identifier;identifier=options;options=undefined}try{return new SemVer(version instanceof SemVer?version.version:version,options).inc(release,identifier,identifierBase).version}catch(er){return null}};module.exports=inc},function(module,exports,__webpack_require__){const parse=__webpack_require__(55);const diff=(version1,version2)=>{const v1=parse(version1,null,true);const v2=parse(version2,null,true);const comparison=v1.compare(v2);if(comparison===0){return null}const v1Higher=comparison>0;const highVersion=v1Higher?v1:v2;const lowVersion=v1Higher?v2:v1;const highHasPre=!!highVersion.prerelease.length;const lowHasPre=!!lowVersion.prerelease.length;if(lowHasPre&&!highHasPre){if(!lowVersion.patch&&!lowVersion.minor){return"major"}if(highVersion.patch){return"patch"}if(highVersion.minor){return"minor"}return"major"}const prefix=highHasPre?"pre":"";if(v1.major!==v2.major){return prefix+"major"}if(v1.minor!==v2.minor){return prefix+"minor"}if(v1.patch!==v2.patch){return prefix+"patch"}return"prerelease"};module.exports=diff},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const major=(a,loose)=>new SemVer(a,loose).major;module.exports=major},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const minor=(a,loose)=>new SemVer(a,loose).minor;module.exports=minor},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const patch=(a,loose)=>new SemVer(a,loose).patch;
15module.exports=patch},function(module,exports,__webpack_require__){const parse=__webpack_require__(55);const prerelease=(version,options)=>{const parsed=parse(version,options);return parsed&&parsed.prerelease.length?parsed.prerelease:null};module.exports=prerelease},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const rcompare=(a,b,loose)=>compare(b,a,loose);module.exports=rcompare},function(module,exports,__webpack_require__){const compare=__webpack_require__(40);const compareLoose=(a,b)=>compare(a,b,true);module.exports=compareLoose},function(module,exports,__webpack_require__){const compareBuild=__webpack_require__(105);const sort=(list,loose)=>list.sort((a,b)=>compareBuild(a,b,loose));module.exports=sort},function(module,exports,__webpack_require__){const compareBuild=__webpack_require__(105);const rsort=(list,loose)=>list.sort((a,b)=>compareBuild(b,a,loose));module.exports=rsort},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const parse=__webpack_require__(55);const{safeRe:re,t:t}=__webpack_require__(63);const coerce=(version,options)=>{if(version instanceof SemVer){return version}if(typeof version==="number"){version=String(version)}if(typeof version!=="string"){return null}options=options||{};let match=null;if(!options.rtl){match=version.match(re[t.COERCE])}else{let next;while((next=re[t.COERCERTL].exec(version))&&(!match||match.index+match[0].length!==version.length)){if(!match||next.index+next[0].length!==match.index+match[0].length){match=next}re[t.COERCERTL].lastIndex=next.index+next[1].length+next[2].length}re[t.COERCERTL].lastIndex=-1}if(match===null){return null}return parse(`${match[2]}.${match[3]||"0"}.${match[4]||"0"}`,options)};module.exports=coerce},function(module,exports,__webpack_require__){"use strict";const Yallist=__webpack_require__(385);const MAX=Symbol("max");const LENGTH=Symbol("length");const LENGTH_CALCULATOR=Symbol("lengthCalculator");const ALLOW_STALE=Symbol("allowStale");const MAX_AGE=Symbol("maxAge");const DISPOSE=Symbol("dispose");const NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet");const LRU_LIST=Symbol("lruList");const CACHE=Symbol("cache");const UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(options){if(typeof options==="number")options={max:options};if(!options)options={};if(options.max&&(typeof options.max!=="number"||options.max<0))throw new TypeError("max must be a non-negative number");const max=this[MAX]=options.max||Infinity;const lc=options.length||naiveLength;this[LENGTH_CALCULATOR]=typeof lc!=="function"?naiveLength:lc;this[ALLOW_STALE]=options.stale||false;if(options.maxAge&&typeof options.maxAge!=="number")throw new TypeError("maxAge must be a number");this[MAX_AGE]=options.maxAge||0;this[DISPOSE]=options.dispose;this[NO_DISPOSE_ON_SET]=options.noDisposeOnSet||false;this[UPDATE_AGE_ON_GET]=options.updateAgeOnGet||false;this.reset()}set max(mL){if(typeof mL!=="number"||mL<0)throw new TypeError("max must be a non-negative number");this[MAX]=mL||Infinity;trim(this)}get max(){return this[MAX]}set allowStale(allowStale){this[ALLOW_STALE]=!!allowStale}get allowStale(){return this[ALLOW_STALE]}set maxAge(mA){if(typeof mA!=="number")throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=mA;trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(lC){if(typeof lC!=="function")lC=naiveLength;if(lC!==this[LENGTH_CALCULATOR]){this[LENGTH_CALCULATOR]=lC;this[LENGTH]=0;this[LRU_LIST].forEach(hit=>{hit.length=this[LENGTH_CALCULATOR](hit.value,hit.key);this[LENGTH]+=hit.length})}trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(fn,thisp){thisp=thisp||this;for(let walker=this[LRU_LIST].tail;walker!==null;){const prev=walker.prev;forEachStep(this,fn,walker,thisp);walker=prev}}forEach(fn,thisp){thisp=thisp||this;for(let walker=this[LRU_LIST].head;walker!==null;){const next=walker.next;forEachStep(this,fn,walker,thisp);walker=next}}keys(){return this[LRU_LIST].toArray().map(k=>k.key)}values(){return this[LRU_LIST].toArray().map(k=>k.value)}reset(){if(this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length){this[LRU_LIST].forEach(hit=>this[DISPOSE](hit.key,hit.value))}this[CACHE]=new Map;this[LRU_LIST]=new Yallist;this[LENGTH]=0}dump(){return this[LRU_LIST].map(hit=>isStale(this,hit)?false:{k:hit.key,v:hit.value,e:hit.now+(hit.maxAge||0)}).toArray().filter(h=>h)}dumpLru(){return this[LRU_LIST]}set(key,value,maxAge){maxAge=maxAge||this[MAX_AGE];if(maxAge&&typeof maxAge!=="number")throw new TypeError("maxAge must be a number");const now=maxAge?Date.now():0;const len=this[LENGTH_CALCULATOR](value,key);if(this[CACHE].has(key)){if(len>this[MAX]){del(this,this[CACHE].get(key));return false}const node=this[CACHE].get(key);const item=node.value;if(this[DISPOSE]){if(!this[NO_DISPOSE_ON_SET])this[DISPOSE](key,item.value)}item.now=now;item.maxAge=maxAge;item.value=value;this[LENGTH]+=len-item.length;item.length=len;this.get(key);trim(this);return true}const hit=new Entry(key,value,len,now,maxAge);if(hit.length>this[MAX]){if(this[DISPOSE])this[DISPOSE](key,value);return false}this[LENGTH]+=hit.length;this[LRU_LIST].unshift(hit);
15this[CACHE].set(key,this[LRU_LIST].head);trim(this);return true}has(key){if(!this[CACHE].has(key))return false;const hit=this[CACHE].get(key).value;return!isStale(this,hit)}get(key){return get(this,key,true)}peek(key){return get(this,key,false)}pop(){const node=this[LRU_LIST].tail;if(!node)return null;del(this,node);return node.value}del(key){del(this,this[CACHE].get(key))}load(arr){this.reset();const now=Date.now();for(let l=arr.length-1;l>=0;l--){const hit=arr[l];const expiresAt=hit.e||0;if(expiresAt===0)this.set(hit.k,hit.v);else{const maxAge=expiresAt-now;if(maxAge>0){this.set(hit.k,hit.v,maxAge)}}}}prune(){this[CACHE].forEach((value,key)=>get(this,key,false))}}const get=(self,key,doUse)=>{const node=self[CACHE].get(key);if(node){const hit=node.value;if(isStale(self,hit)){del(self,node);if(!self[ALLOW_STALE])return undefined}else{if(doUse){if(self[UPDATE_AGE_ON_GET])node.value.now=Date.now();self[LRU_LIST].unshiftNode(node)}}return hit.value}};const isStale=(self,hit)=>{if(!hit||!hit.maxAge&&!self[MAX_AGE])return false;const diff=Date.now()-hit.now;return hit.maxAge?diff>hit.maxAge:self[MAX_AGE]&&diff>self[MAX_AGE]};const trim=self=>{if(self[LENGTH]>self[MAX]){for(let walker=self[LRU_LIST].tail;self[LENGTH]>self[MAX]&&walker!==null;){const prev=walker.prev;del(self,walker);walker=prev}}};const del=(self,node)=>{if(node){const hit=node.value;if(self[DISPOSE])self[DISPOSE](hit.key,hit.value);self[LENGTH]-=hit.length;self[CACHE].delete(hit.key);self[LRU_LIST].removeNode(node)}};class Entry{constructor(key,value,length,now,maxAge){this.key=key;this.value=value;this.length=length;this.now=now;this.maxAge=maxAge||0}}const forEachStep=(self,fn,node,thisp)=>{let hit=node.value;if(isStale(self,hit)){del(self,node);if(!self[ALLOW_STALE])hit=undefined}if(hit)fn.call(thisp,hit.value,hit.key,self)};module.exports=LRUCache},function(module,exports,__webpack_require__){"use strict";module.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(list){var self=this;if(!(self instanceof Yallist)){self=new Yallist}self.tail=null;self.head=null;self.length=0;if(list&&typeof list.forEach==="function"){list.forEach((function(item){self.push(item)}))}else if(arguments.length>0){for(var i=0,l=arguments.length;i<l;i++){self.push(arguments[i])}}return self}Yallist.prototype.removeNode=function(node){if(node.list!==this){throw new Error("removing node which does not belong to this list")}var next=node.next;var prev=node.prev;if(next){next.prev=prev}if(prev){prev.next=next}if(node===this.head){this.head=next}if(node===this.tail){this.tail=prev}node.list.length--;node.next=null;node.prev=null;node.list=null;return next};Yallist.prototype.unshiftNode=function(node){if(node===this.head){return}if(node.list){node.list.removeNode(node)}var head=this.head;node.list=this;node.next=head;if(head){head.prev=node}this.head=node;if(!this.tail){this.tail=node}this.length++};Yallist.prototype.pushNode=function(node){if(node===this.tail){return}if(node.list){node.list.removeNode(node)}var tail=this.tail;node.list=this;node.prev=tail;if(tail){tail.next=node}this.tail=node;if(!this.head){this.head=node}this.length++};Yallist.prototype.push=function(){for(var i=0,l=arguments.length;i<l;i++){push(this,arguments[i])}return this.length};Yallist.prototype.unshift=function(){for(var i=0,l=arguments.length;i<l;i++){unshift(this,arguments[i])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var res=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return res};Yallist.prototype.shift=function(){if(!this.head){return undefined}var res=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return res};Yallist.prototype.forEach=function(fn,thisp){thisp=thisp||this;for(var walker=this.head,i=0;walker!==null;i++){fn.call(thisp,walker.value,i,this);walker=walker.next}};Yallist.prototype.forEachReverse=function(fn,thisp){thisp=thisp||this;for(var walker=this.tail,i=this.length-1;walker!==null;i--){fn.call(thisp,walker.value,i,this);walker=walker.prev}};Yallist.prototype.get=function(n){for(var i=0,walker=this.head;walker!==null&&i<n;i++){walker=walker.next}if(i===n&&walker!==null){return walker.value}};Yallist.prototype.getReverse=function(n){for(var i=0,walker=this.tail;walker!==null&&i<n;i++){walker=walker.prev}if(i===n&&walker!==null){return walker.value}};Yallist.prototype.map=function(fn,thisp){thisp=thisp||this;var res=new Yallist;for(var walker=this.head;walker!==null;){res.push(fn.call(thisp,walker.value,this));walker=walker.next}return res};Yallist.prototype.mapReverse=function(fn,thisp){thisp=thisp||this;var res=new Yallist;for(var walker=this.tail;walker!==null;){res.push(fn.call(thisp,walker.value,this));walker=walker.prev}return res};Yallist.prototype.reduce=function(fn,initial){var acc;var walker=this.head;if(arguments.length>1){acc=initial}else if(this.head){walker=this.head.next;acc=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;walker!==null;i++){acc=fn(acc,walker.value,i);walker=walker.next}return acc};Yallist.prototype.reduceReverse=function(fn,initial){var acc;var walker=this.tail;if(arguments.length>1){acc=initial}else if(this.tail){walker=this.tail.prev;acc=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;walker!==null;i--){acc=fn(acc,walker.value,i);walker=walker.prev}return acc};Yallist.prototype.toArray=function(){var arr=new Array(this.length);for(var i=0,walker=this.head;walker!==null;i++){arr[i]=walker.value;walker=walker.next}return arr};Yallist.prototype.toArrayReverse=function(){var arr=new Array(this.length);for(var i=0,walker=this.tail;walker!==null;i++){arr[i]=walker.value;walker=walker.prev}return arr};Yallist.prototype.slice=function(from,to){to=to||this.length;if(to<0){to+=this.length}from=from||0;if(from<0){from+=this.length}var ret=new Yallist;if(to<from||to<0){return ret}if(from<0){from=0}if(to>this.length){to=this.length}for(var i=0,walker=this.head;walker!==null&&i<from;i++){walker=walker.next}for(;walker!==null&&i<to;i++,walker=walker.next){ret.push(walker.value)}return ret};Yallist.prototype.sliceReverse=function(from,to){to=to||this.length;if(to<0){to+=this.length}from=from||0;if(from<0){from+=this.length}var ret=new Yallist;if(to<from||to<0){return ret}if(from<0){from=0}if(to>this.length){to=this.length}for(var i=this.length,walker=this.tail;walker!==null&&i>to;i--){walker=walker.prev}for(;walker!==null&&i>from;i--,walker=walker.prev){ret.push(walker.value)}return ret};Yallist.prototype.splice=function(start,deleteCount,...nodes){if(start>this.length){start=this.length-1}if(start<0){start=this.length+start}for(var i=0,walker=this.head;walker!==null&&i<start;i++){walker=walker.next}var ret=[];for(var i=0;walker&&i<deleteCount;i++){ret.push(walker.value);walker=this.removeNode(walker)}if(walker===null){walker=this.tail}if(walker!==this.head&&walker!==this.tail){walker=walker.prev}for(var i=0;i<nodes.length;i++){walker=insert(this,walker,nodes[i])}return ret};Yallist.prototype.reverse=function(){var head=this.head;var tail=this.tail;for(var walker=head;walker!==null;walker=walker.prev){var p=walker.prev;walker.prev=walker.next;walker.next=p}this.head=tail;this.tail=head;return this};
15function insert(self,node,value){var inserted=node===self.head?new Node(value,null,node,self):new Node(value,node,node.next,self);if(inserted.next===null){self.tail=inserted}if(inserted.prev===null){self.head=inserted}self.length++;return inserted}function push(self,item){self.tail=new Node(item,self.tail,null,self);if(!self.head){self.head=self.tail}self.length++}function unshift(self,item){self.head=new Node(item,null,self.head,self);if(!self.tail){self.tail=self.head}self.length++}function Node(value,prev,next,list){if(!(this instanceof Node)){return new Node(value,prev,next,list)}this.list=list;this.value=value;if(prev){prev.next=this;this.prev=prev}else{this.prev=null}if(next){next.prev=this;this.next=next}else{this.next=null}}try{__webpack_require__(386)(Yallist)}catch(er){}},function(module,exports,__webpack_require__){"use strict";module.exports=function(Yallist){Yallist.prototype[Symbol.iterator]=function*(){for(let walker=this.head;walker;walker=walker.next){yield walker.value}}}},function(module,exports,__webpack_require__){const Range=__webpack_require__(41);const toComparators=(range,options)=>new Range(range,options).set.map(comp=>comp.map(c=>c.value).join(" ").trim().split(" "));module.exports=toComparators},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const Range=__webpack_require__(41);const maxSatisfying=(versions,range,options)=>{let max=null;let maxSV=null;let rangeObj=null;try{rangeObj=new Range(range,options)}catch(er){return null}versions.forEach(v=>{if(rangeObj.test(v)){if(!max||maxSV.compare(v)===-1){max=v;maxSV=new SemVer(max,options)}}});return max};module.exports=maxSatisfying},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const Range=__webpack_require__(41);const minSatisfying=(versions,range,options)=>{let min=null;let minSV=null;let rangeObj=null;try{rangeObj=new Range(range,options)}catch(er){return null}versions.forEach(v=>{if(rangeObj.test(v)){if(!min||minSV.compare(v)===1){min=v;minSV=new SemVer(min,options)}}});return min};module.exports=minSatisfying},function(module,exports,__webpack_require__){const SemVer=__webpack_require__(36);const Range=__webpack_require__(41);const gt=__webpack_require__(73);const minVersion=(range,loose)=>{range=new Range(range,loose);let minver=new SemVer("0.0.0");if(range.test(minver)){return minver}minver=new SemVer("0.0.0-0");if(range.test(minver)){return minver}minver=null;for(let i=0;i<range.set.length;++i){const comparators=range.set[i];let setMin=null;comparators.forEach(comparator=>{const compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":if(compver.prerelease.length===0){compver.patch++}else{compver.prerelease.push(0)}compver.raw=compver.format();case"":case">=":if(!setMin||gt(compver,setMin)){setMin=compver}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${comparator.operator}`)}});if(setMin&&(!minver||gt(minver,setMin))){minver=setMin}}if(minver&&range.test(minver)){return minver}return null};module.exports=minVersion},function(module,exports,__webpack_require__){const Range=__webpack_require__(41);const validRange=(range,options)=>{try{return new Range(range,options).range||"*"}catch(er){return null}};module.exports=validRange},function(module,exports,__webpack_require__){const outside=__webpack_require__(109);const gtr=(version,range,options)=>outside(version,range,">",options);module.exports=gtr},function(module,exports,__webpack_require__){const outside=__webpack_require__(109);const ltr=(version,range,options)=>outside(version,range,"<",options);module.exports=ltr},function(module,exports,__webpack_require__){const Range=__webpack_require__(41);const intersects=(r1,r2,options)=>{r1=new Range(r1,options);r2=new Range(r2,options);return r1.intersects(r2,options)};module.exports=intersects},function(module,exports,__webpack_require__){const satisfies=__webpack_require__(75);const compare=__webpack_require__(40);module.exports=(versions,range,options)=>{const set=[];let first=null;let prev=null;const v=versions.sort((a,b)=>compare(a,b,options));for(const version of v){const included=satisfies(version,range,options);if(included){prev=version;if(!first){first=version}}else{if(prev){set.push([first,prev])}prev=null;first=null}}if(first){set.push([first,null])}const ranges=[];for(const[min,max]of set){if(min===max){ranges.push(min)}else if(!max&&min===v[0]){ranges.push("*")}else if(!max){ranges.push(`>=${min}`)}else if(min===v[0]){ranges.push(`<=${max}`)}else{ranges.push(`${min} - ${max}`)}}const simplified=ranges.join(" || ");const original=typeof range.raw==="string"?range.raw:String(range);return simplified.length<original.length?simplified:range}},function(module,exports,__webpack_require__){const Range=__webpack_require__(41);const Comparator=__webpack_require__(74);const{ANY:ANY}=Comparator;const satisfies=__webpack_require__(75);const compare=__webpack_require__(40);const subset=(sub,dom,options={})=>
15{if(sub===dom){return true}sub=new Range(sub,options);dom=new Range(dom,options);let sawNonNull=false;OUTER:for(const simpleSub of sub.set){for(const simpleDom of dom.set){const isSub=simpleSubset(simpleSub,simpleDom,options);sawNonNull=sawNonNull||isSub!==null;if(isSub){continue OUTER}}if(sawNonNull){return false}}return true};const minimumVersionWithPreRelease=[new Comparator(">=0.0.0-0")];const minimumVersion=[new Comparator(">=0.0.0")];const simpleSubset=(sub,dom,options)=>{if(sub===dom){return true}if(sub.length===1&&sub[0].semver===ANY){if(dom.length===1&&dom[0].semver===ANY){return true}else if(options.includePrerelease){sub=minimumVersionWithPreRelease}else{sub=minimumVersion}}if(dom.length===1&&dom[0].semver===ANY){if(options.includePrerelease){return true}else{dom=minimumVersion}}const eqSet=new Set;let gt,lt;for(const c of sub){if(c.operator===">"||c.operator===">="){gt=higherGT(gt,c,options)}else if(c.operator==="<"||c.operator==="<="){lt=lowerLT(lt,c,options)}else{eqSet.add(c.semver)}}if(eqSet.size>1){return null}let gtltComp;if(gt&<){gtltComp=compare(gt.semver,lt.semver,options);if(gtltComp>0){return null}else if(gtltComp===0&&(gt.operator!==">="||lt.operator!=="<=")){return null}}for(const eq of eqSet){if(gt&&!satisfies(eq,String(gt),options)){return null}if(lt&&!satisfies(eq,String(lt),options)){return null}for(const c of dom){if(!satisfies(eq,String(c),options)){return false}}return true}let higher,lower;let hasDomLT,hasDomGT;let needDomLTPre=lt&&!options.includePrerelease&<.semver.prerelease.length?lt.semver:false;let needDomGTPre=gt&&!options.includePrerelease&>.semver.prerelease.length?gt.semver:false;if(needDomLTPre&&needDomLTPre.prerelease.length===1&<.operator==="<"&&needDomLTPre.prerelease[0]===0){needDomLTPre=false}for(const c of dom){hasDomGT=hasDomGT||c.operator===">"||c.operator===">=";hasDomLT=hasDomLT||c.operator==="<"||c.operator==="<=";if(gt){if(needDomGTPre){if(c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomGTPre.major&&c.semver.minor===needDomGTPre.minor&&c.semver.patch===needDomGTPre.patch){needDomGTPre=false}}if(c.operator===">"||c.operator===">="){higher=higherGT(gt,c,options);if(higher===c&&higher!==gt){return false}}else if(gt.operator===">="&&!satisfies(gt.semver,String(c),options)){return false}}if(lt){if(needDomLTPre){if(c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomLTPre.major&&c.semver.minor===needDomLTPre.minor&&c.semver.patch===needDomLTPre.patch){needDomLTPre=false}}if(c.operator==="<"||c.operator==="<="){lower=lowerLT(lt,c,options);if(lower===c&&lower!==lt){return false}}else if(lt.operator==="<="&&!satisfies(lt.semver,String(c),options)){return false}}if(!c.operator&&(lt||gt)&>ltComp!==0){return false}}if(gt&&hasDomLT&&!lt&>ltComp!==0){return false}if(lt&&hasDomGT&&!gt&>ltComp!==0){return false}if(needDomGTPre||needDomLTPre){return false}return true};const higherGT=(a,b,options)=>{if(!a){return b}const comp=compare(a.semver,b.semver,options);return comp>0?a:comp<0?b:b.operator===">"&&a.operator===">="?b:a};const lowerLT=(a,b,options)=>{if(!a){return b}const comp=compare(a.semver,b.semver,options);return comp<0?a:comp>0?b:b.operator==="<"&&a.operator==="<="?b:a};module.exports=subset},function(module,exports,__webpack_require__){var baseSet=__webpack_require__(141);function set(object,path,value){return object==null?object:baseSet(object,path,value)}module.exports=set},function(module,exports,__webpack_require__){var baseAssignValue=__webpack_require__(399),eq=__webpack_require__(144);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){baseAssignValue(object,key,value)}}module.exports=assignValue},function(module,exports,__webpack_require__){var defineProperty=__webpack_require__(400);function baseAssignValue(object,key,value){if(key=="__proto__"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}module.exports=baseAssignValue},function(module,exports,__webpack_require__){var getNative=__webpack_require__(110);var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();module.exports=defineProperty},function(module,exports,__webpack_require__){var isFunction=__webpack_require__(142),isMasked=__webpack_require__(405),isObject=__webpack_require__(113),toSource=__webpack_require__(407);var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto=Function.prototype,objectProto=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}module.exports=baseIsNative},function(module,exports,__webpack_require__){(function(global){var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module.exports=freeGlobal}).call(this,__webpack_require__(48))},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(111);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var nativeObjectToString=objectProto.toString;var symToStringTag=Symbol?Symbol.toStringTag:undefined;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}module.exports=getRawTag},function(module,exports){var objectProto=Object.prototype;var nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module.exports=objectToString},function(module,exports,__webpack_require__){var coreJsData=__webpack_require__(406);var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");
vendor: 10,354 bytes, line 15
15return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}module.exports=isMasked},function(module,exports,__webpack_require__){var root=__webpack_require__(112);var coreJsData=root["__core-js_shared__"];module.exports=coreJsData},function(module,exports){var funcProto=Function.prototype;var funcToString=funcProto.toString;function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}module.exports=toSource},function(module,exports){function getValue(object,key){return object==null?undefined:object[key]}module.exports=getValue},function(module,exports,__webpack_require__){var isArray=__webpack_require__(114),isKey=__webpack_require__(410),stringToPath=__webpack_require__(412),toString=__webpack_require__(435);function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}module.exports=castPath},function(module,exports,__webpack_require__){var isArray=__webpack_require__(114),isSymbol=__webpack_require__(115);var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}module.exports=isKey},function(module,exports){function isObjectLike(value){return value!=null&&typeof value=="object"}module.exports=isObjectLike},function(module,exports,__webpack_require__){var memoizeCapped=__webpack_require__(413);var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=memoizeCapped((function(string){var result=[];if(string.charCodeAt(0)===46){result.push("")}string.replace(rePropName,(function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)}));return result}));module.exports=stringToPath},function(module,exports,__webpack_require__){var memoize=__webpack_require__(414);var MAX_MEMOIZE_SIZE=500;function memoizeCapped(func){var result=memoize(func,(function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key}));var cache=result.cache;return result}module.exports=memoizeCapped},function(module,exports,__webpack_require__){var MapCache=__webpack_require__(415);var FUNC_ERROR_TEXT="Expected a function";function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;module.exports=memoize},function(module,exports,__webpack_require__){var mapCacheClear=__webpack_require__(416),mapCacheDelete=__webpack_require__(430),mapCacheGet=__webpack_require__(432),mapCacheHas=__webpack_require__(433),mapCacheSet=__webpack_require__(434);function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;module.exports=MapCache},function(module,exports,__webpack_require__){var Hash=__webpack_require__(417),ListCache=__webpack_require__(423),Map=__webpack_require__(429);function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}module.exports=mapCacheClear},function(module,exports,__webpack_require__){var hashClear=__webpack_require__(418),hashDelete=__webpack_require__(419),hashGet=__webpack_require__(420),hashHas=__webpack_require__(421),hashSet=__webpack_require__(422);function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;module.exports=Hash},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(76);function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}module.exports=hashClear},function(module,exports){function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}module.exports=hashDelete},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(76);var HASH_UNDEFINED="__lodash_hash_undefined__";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}module.exports=hashGet},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(76);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}module.exports=hashHas},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(76);var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}module.exports=hashSet},function(module,exports,__webpack_require__){var listCacheClear=__webpack_require__(424),listCacheDelete=__webpack_require__(425),listCacheGet=__webpack_require__(426),listCacheHas=__webpack_require__(427),listCacheSet=__webpack_require__(428);function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;module.exports=ListCache},function(module,exports){function listCacheClear(){this.__data__=[];this.size=0}module.exports=listCacheClear},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(77);var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}module.exports=listCacheDelete},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(77);function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}module.exports=listCacheGet},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(77);function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}module.exports=listCacheHas},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(77);function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}module.exports=listCacheSet},function(module,exports,__webpack_require__){var getNative=__webpack_require__(110),root=__webpack_require__(112);var Map=getNative(root,"Map");module.exports=Map},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(78);function mapCacheDelete(key){var result=getMapData(this,key)["delete"](key);this.size-=result?1:0;return result}module.exports=mapCacheDelete},function(module,exports){function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}module.exports=isKeyable},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(78);function mapCacheGet(key){return getMapData(this,key).get(key)}module.exports=mapCacheGet},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(78);function mapCacheHas(key){return getMapData(this,key).has(key)}module.exports=mapCacheHas},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(78);function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}module.exports=mapCacheSet},function(module,exports,__webpack_require__){var baseToString=__webpack_require__(436);function toString(value){return value==null?"":baseToString(value)}module.exports=toString},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(111),arrayMap=__webpack_require__(437),isArray=__webpack_require__(114),isSymbol=__webpack_require__(115);var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(value){if(typeof value=="string"){return value}if(isArray(value)){return arrayMap(value,baseToString)+""}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}module.exports=baseToString},function(module,exports){function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}module.exports=arrayMap},function(module,exports){var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}module.exports=isIndex},function(module,exports,__webpack_require__){var isSymbol
15=__webpack_require__(115);var INFINITY=1/0;function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}module.exports=toKey},function(module,exports,__webpack_require__){var baseSet=__webpack_require__(141);function setWith(object,path,value,customizer){customizer=typeof customizer=="function"?customizer:undefined;return object==null?object:baseSet(object,path,value,customizer)}module.exports=setWith},function(module,exports,__webpack_require__){"use strict";module.exports=str=>encodeURIComponent(str).replace(/[!'()*]/g,x=>`%${x.charCodeAt(0).toString(16).toUpperCase()}`)},function(module,exports,__webpack_require__){"use strict";var token="%[a-f0-9]{2}";var singleMatcher=new RegExp("("+token+")|([^%]+?)","gi");var multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(components,split){try{return[decodeURIComponent(components.join(""))]}catch(err){}if(components.length===1){return components}split=split||1;var left=components.slice(0,split);var right=components.slice(split);return Array.prototype.concat.call([],decodeComponents(left),decodeComponents(right))}function decode(input){try{return decodeURIComponent(input)}catch(err){var tokens=input.match(singleMatcher)||[];for(var i=1;i<tokens.length;i++){input=decodeComponents(tokens,i).join("");tokens=input.match(singleMatcher)||[]}return input}}function customDecodeURIComponent(input){var replaceMap={"%FE%FF":"��","%FF%FE":"��"};var match=multiMatcher.exec(input);while(match){try{replaceMap[match[0]]=decodeURIComponent(match[0])}catch(err){var result=decode(match[0]);if(result!==match[0]){replaceMap[match[0]]=result}}match=multiMatcher.exec(input)}replaceMap["%C2"]="�";var entries=Object.keys(replaceMap);for(var i=0;i<entries.length;i++){var key=entries[i];input=input.replace(new RegExp(key,"g"),replaceMap[key])}return input}module.exports=function(encodedURI){if(typeof encodedURI!=="string"){throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof encodedURI+"`")}try{encodedURI=encodedURI.replace(/\+/g," ");return decodeURIComponent(encodedURI)}catch(err){return customDecodeURIComponent(encodedURI)}}},function(module,exports,__webpack_require__){"use strict";module.exports=(string,separator)=>{if(!(typeof string==="string"&&typeof separator==="string")){throw new TypeError("Expected the arguments to be of type `string`")}if(separator===""){return[string]}const separatorIndex=string.indexOf(separator);if(separatorIndex===-1){return[string]}return[string.slice(0,separatorIndex),string.slice(separatorIndex+separator.length)]}},function(module,exports,__webpack_require__){"use strict";module.exports=function(obj,predicate){var ret={};var keys=Object.keys(obj);var isArr=Array.isArray(predicate);for(var i=0;i<keys.length;i++){var key=keys[i];var val=obj[key];if(isArr?predicate.indexOf(key)!==-1:predicate(key,val,obj)){ret[key]=val}}return ret}},function(module,exports){module.exports.id="ace/mode/json_worker";modul
vendor: 42,541 bytes, line 15
15e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/</g,"<")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r
15Â áá ââââââ
ââââââ¯âã\\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(module,exports,__webpack_require__){"use strict";const parse=__webpack_require__(56);const valid=(version,options)=>{const v=parse(version,options);return v?v.version:null};module.exports=valid},function(module,exports,__webpack_require__){"use strict";const parse=__webpack_require__(56);const clean=(version,options)=>{const s=parse(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null};module.exports=clean},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const inc=(version,release,options,identifier,identifierBase)=>{if(typeof options==="string"){identifierBase=identifier;identifier=options;options=undefined}try{return new SemVer(version instanceof SemVer?version.version:version,options).inc(release,identifier,identifierBase).version}catch(er){return null}};module.exports=inc},function(module,exports,__webpack_require__){"use strict";const parse=__webpack_require__(56);const diff=(version1,version2)=>{const v1=parse(version1,null,true);const v2=parse(version2,null,true);const comparison=v1.compare(v2);if(comparison===0){return null}const v1Higher=comparison>0;const highVersion=v1Higher?v1:v2;const lowVersion=v1Higher?v2:v1;const highHasPre=!!highVersion.prerelease.length;const lowHasPre=!!lowVersion.prerelease.length;if(lowHasPre&&!highHasPre){if(!lowVersion.patch&&!lowVersion.minor){return"major"}if(lowVersion.compareMain(highVersion)===0){if(lowVersion.minor&&!lowVersion.patch){return"minor"}return"patch"}}const prefix=highHasPre?"pre":"";if(v1.major!==v2.major){return prefix+"major"}if(v1.minor!==v2.minor){return prefix+"minor"}if(v1.patch!==v2.patch){return prefix+"patch"}return"prerelease"};module.exports=diff},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const major=(a,loose)=>new SemVer(a,loose).major;module.exports=major},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const minor=(a,loose)=>new SemVer(a,loose).minor;module.exports=minor},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const patch=(a,loose)=>new SemVer(a,loose).patch;module.exports=patch},function(module,exports,__webpack_require__){"use strict";const parse=__webpack_require__(56);const prerelease=(version,options)=>{const parsed=parse(version,options);return parsed&&parsed.prerelease.length?parsed.prerelease:null};module.exports=prerelease},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const rcompare=(a,b,loose)=>compare(b,a,loose);module.exports=rcompare},function(module,exports,__webpack_require__){"use strict";const compare=__webpack_require__(44);const compareLoose=(a,b)=>compare(a,b,true);module.exports=compareLoose},function(module,exports,__webpack_require__){"use strict";const compareBuild=__webpack_require__(117);const sort=(list,loose)=>list.sort((a,b)=>compareBuild(a,b,loose));module.exports=sort},function(module,exports,__webpack_require__){"use strict";const compareBuild=__webpack_require__(117);const rsort=(list,loose)=>list.sort((a,b)=>compareBuild(b,a,loose));module.exports=rsort},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const parse=__webpack_require__(56);const{safeRe:re,t:t}=__webpack_require__(64);const coerce=(version,options)=>{if(version instanceof SemVer){return version}if(typeof version==="number"){version=String(version)}if(typeof version!=="string"){return null}options=options||{};let match=null;if(!options.rtl){match=version.match(options.includePrerelease?re[t.COERCEFULL]:re[t.COERCE])}else{const coerceRtlRegex=options.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL];let next;while((next=coerceRtlRegex.exec(version))&&(!match||match.index+match[0].length!==version.length)){if(!match||next.index+next[0].length!==match.index+match[0].length){match=next}coerceRtlRegex.lastIndex=next.index+next[1].length+next[2].length}coerceRtlRegex.lastIndex=-1}if(match===null){return null}const major=match[2];const minor=match[3]||"0";const patch=match[4]||"0";const prerelease=options.includePrerelease&&match[5]?`-${match[5]}`:"";const build=options.includePrerelease&&match[6]?`+${match[6]}`:"";return parse(`${major}.${minor}.${patch}${prerelease}${build}`,options)};module.exports=coerce},function(module,exports,__webpack_require__){"use strict";class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(key){const value=this.map.get(key);if(value===undefined){return undefined}else{this.map.delete(key);this.map.set(key,value);return value}}delete(key){return this.map.delete(key)}set(key,value){const deleted=this.delete(key);if(!deleted&&value!==undefined){if(this.map.size>
15=this.max){const firstKey=this.map.keys().next().value;this.delete(firstKey)}this.map.set(key,value)}return this}}module.exports=LRUCache},function(module,exports,__webpack_require__){"use strict";const Range=__webpack_require__(45);const toComparators=(range,options)=>new Range(range,options).set.map(comp=>comp.map(c=>c.value).join(" ").trim().split(" "));module.exports=toComparators},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const Range=__webpack_require__(45);const maxSatisfying=(versions,range,options)=>{let max=null;let maxSV=null;let rangeObj=null;try{rangeObj=new Range(range,options)}catch(er){return null}versions.forEach(v=>{if(rangeObj.test(v)){if(!max||maxSV.compare(v)===-1){max=v;maxSV=new SemVer(max,options)}}});return max};module.exports=maxSatisfying},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const Range=__webpack_require__(45);const minSatisfying=(versions,range,options)=>{let min=null;let minSV=null;let rangeObj=null;try{rangeObj=new Range(range,options)}catch(er){return null}versions.forEach(v=>{if(rangeObj.test(v)){if(!min||minSV.compare(v)===1){min=v;minSV=new SemVer(min,options)}}});return min};module.exports=minSatisfying},function(module,exports,__webpack_require__){"use strict";const SemVer=__webpack_require__(37);const Range=__webpack_require__(45);const gt=__webpack_require__(81);const minVersion=(range,loose)=>{range=new Range(range,loose);let minver=new SemVer("0.0.0");if(range.test(minver)){return minver}minver=new SemVer("0.0.0-0");if(range.test(minver)){return minver}minver=null;for(let i=0;i<range.set.length;++i){const comparators=range.set[i];let setMin=null;comparators.forEach(comparator=>{const compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":if(compver.prerelease.length===0){compver.patch++}else{compver.prerelease.push(0)}compver.raw=compver.format();case"":case">=":if(!setMin||gt(compver,setMin)){setMin=compver}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${comparator.operator}`)}});if(setMin&&(!minver||gt(minver,setMin))){minver=setMin}}if(minver&&range.test(minver)){return minver}return null};module.exports=minVersion},function(module,exports,__webpack_require__){"use strict";const Range=__webpack_require__(45);const validRange=(range,options)=>{try{return new Range(range,options).range||"*"}catch(er){return null}};module.exports=validRange},function(module,exports,__webpack_require__){"use strict";const outside=__webpack_require__(121);const gtr=(version,range,options)=>outside(version,range,">",options);module.exports=gtr},function(module,exports,__webpack_require__){"use strict";const outside=__webpack_require__(121);const ltr=(version,range,options)=>outside(version,range,"<",options);module.exports=ltr},function(module,exports,__webpack_require__){"use strict";const Range=__webpack_require__(45);const intersects=(r1,r2,options)=>{r1=new Range(r1,options);r2=new Range(r2,options);return r1.intersects(r2,options)};module.exports=intersects},function(module,exports,__webpack_require__){"use strict";const satisfies=__webpack_require__(83);const compare=__webpack_require__(44);module.exports=(versions,range,options)=>{const set=[];let first=null;let prev=null;const v=versions.sort((a,b)=>compare(a,b,options));for(const version of v){const included=satisfies(version,range,options);if(included){prev=version;if(!first){first=version}}else{if(prev){set.push([first,prev])}prev=null;first=null}}if(first){set.push([first,null])}const ranges=[];for(const[min,max]of set){if(min===max){ranges.push(min)}else if(!max&&min===v[0]){ranges.push("*")}else if(!max){ranges.push(`>=${min}`)}else if(min===v[0]){ranges.push(`<=${max}`)}else{ranges.push(`${min} - ${max}`)}}const simplified=ranges.join(" || ");const original=typeof range.raw==="string"?range.raw:String(range);return simplified.length<original.length?simplified:range}},function(module,exports,__webpack_require__){"use strict";const Range=__webpack_require__(45);const Comparator=__webpack_require__(82);const{ANY:ANY}=Comparator;const satisfies=__webpack_require__(83);const compare=__webpack_require__(44);const subset=(sub,dom,options={})=>
15{if(sub===dom){return true}sub=new Range(sub,options);dom=new Range(dom,options);let sawNonNull=false;OUTER:for(const simpleSub of sub.set){for(const simpleDom of dom.set){const isSub=simpleSubset(simpleSub,simpleDom,options);sawNonNull=sawNonNull||isSub!==null;if(isSub){continue OUTER}}if(sawNonNull){return false}}return true};const minimumVersionWithPreRelease=[new Comparator(">=0.0.0-0")];const minimumVersion=[new Comparator(">=0.0.0")];const simpleSubset=(sub,dom,options)=>{if(sub===dom){return true}if(sub.length===1&&sub[0].semver===ANY){if(dom.length===1&&dom[0].semver===ANY){return true}else if(options.includePrerelease){sub=minimumVersionWithPreRelease}else{sub=minimumVersion}}if(dom.length===1&&dom[0].semver===ANY){if(options.includePrerelease){return true}else{dom=minimumVersion}}const eqSet=new Set;let gt,lt;for(const c of sub){if(c.operator===">"||c.operator===">="){gt=higherGT(gt,c,options)}else if(c.operator==="<"||c.operator==="<="){lt=lowerLT(lt,c,options)}else{eqSet.add(c.semver)}}if(eqSet.size>1){return null}let gtltComp;if(gt&<){gtltComp=compare(gt.semver,lt.semver,options);if(gtltComp>0){return null}else if(gtltComp===0&&(gt.operator!==">="||lt.operator!=="<=")){return null}}for(const eq of eqSet){if(gt&&!satisfies(eq,String(gt),options)){return null}if(lt&&!satisfies(eq,String(lt),options)){return null}for(const c of dom){if(!satisfies(eq,String(c),options)){return false}}return true}let higher,lower;let hasDomLT,hasDomGT;let needDomLTPre=lt&&!options.includePrerelease&<.semver.prerelease.length?lt.semver:false;let needDomGTPre=gt&&!options.includePrerelease&>.semver.prerelease.length?gt.semver:false;if(needDomLTPre&&needDomLTPre.prerelease.length===1&<.operator==="<"&&needDomLTPre.prerelease[0]===0){needDomLTPre=false}for(const c of dom){hasDomGT=hasDomGT||c.operator===">"||c.operator===">=";hasDomLT=hasDomLT||c.operator==="<"||c.operator==="<=";if(gt){if(needDomGTPre){if(c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomGTPre.major&&c.semver.minor===needDomGTPre.minor&&c.semver.patch===needDomGTPre.patch){needDomGTPre=false}}if(c.operator===">"||c.operator===">="){higher=higherGT(gt,c,options);if(higher===c&&higher!==gt){return false}}else if(gt.operator===">="&&!satisfies(gt.semver,String(c),options)){return false}}if(lt){if(needDomLTPre){if(c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomLTPre.major&&c.semver.minor===needDomLTPre.minor&&c.semver.patch===needDomLTPre.patch){needDomLTPre=false}}if(c.operator==="<"||c.operator==="<="){lower=lowerLT(lt,c,options);if(lower===c&&lower!==lt){return false}}else if(lt.operator==="<="&&!satisfies(lt.semver,String(c),options)){return false}}if(!c.operator&&(lt||gt)&>ltComp!==0){return false}}if(gt&&hasDomLT&&!lt&>ltComp!==0){return false}if(lt&&hasDomGT&&!gt&>ltComp!==0){return false}if(needDomGTPre||needDomLTPre){return false}return true};const higherGT=(a,b,options)=>{if(!a){return b}const comp=compare(a.semver,b.semver,options);return comp>0?a:comp<0?b:b.operator===">"&&a.operator===">="?b:a};const lowerLT=(a,b,options)=>{if(!a){return b}const comp=compare(a.semver,b.semver,options);return comp<0?a:comp>0?b:b.operator==="<"&&a.operator==="<="?b:a};module.exports=subset},function(module,exports,__webpack_require__){var concatMap=__webpack_require__(471);var balanced=__webpack_require__(472);module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0";var escOpen="\0OPEN"+Math.random()+"\0";var escClose="\0CLOSE"+Math.random()+"\0";var escComma="\0COMMA"+Math.random()+"\0";var escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);
15if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str,options){if(!str)return[];options=options||{};var max=options.max==null?Infinity:options.max;if(str.substr(0,2)==="{}"){str="\\{\\}"+str.substr(2)}return expand(escapeBraces(str),max,true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,max,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions){if(m.post.match(/,(?!,).*\}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str,max,true)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],max,false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,max,false):[""];return post.map((function(p){return m.pre+n[0]+p}))}}}var pre=m.pre;var post=m.post.length?expand(m.post,max,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.max(Math.abs(numeric(n[2])),1):1;var test=lte;var reverse=y<x;if(reverse){incr*=-1;test=gte}var pad=n.some(isPadded);N=[];for(var i=x;test(i,y)&&N.length<max;i+=incr){var c;if(isAlphaSequence){c=String.fromCharCode(i);if(c==="\\")c=""}else{c=String(i);if(pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,(function(el){return expand(el,max,false)}))}for(var j=0;j<N.length;j++){for(var k=0;k<post.length&&expansions.length<max;k++){var expansion=pre+N[j]+post[k];if(!isTop||isSequence||expansion)expansions.push(expansion)}}return expansions}},function(module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;i<xs.length;i++){var x=fn(xs[i],i);if(isArray(x))res.push.apply(res,x);else res.push(x)}return res};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},function(module,exports,__webpack_require__){"use strict";module.exports=balanced;function balanced(a,b,str){if(a instanceof RegExp)a=maybeMatch(a,str);if(b instanceof RegExp)b=maybeMatch(b,str);var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null}balanced.range=range;function range(a,b,str){var begs,beg,left,right,result;var ai=str.indexOf(a);var bi=str.indexOf(b,ai+1);var i=ai;if(ai>=0&&bi>0){if(a===b){return[ai,bi]}begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1)}else if(begs.length==1){result=[begs.pop(),bi]}else{beg=begs.pop();if(beg<left){left=beg;right=bi}bi=str.indexOf(b,i+1)}i=ai<bi&&ai>=0?ai:bi}if(begs.length){result=[left,right]}}return result}},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(474);case"v7light":return __webpack_require__(476);case"v8dark":return __webpack_require__(478);case"v8light":return __webpack_require__(480);case"v9dark":return __webpack_require__(482);case"v9light":return __webpack_require__(484)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(475);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);
15var content=__webpack_require__(477);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(479);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(481);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(483);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(485);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.indices-health .euiFlexItem--flexGrowZero{text-transform:capitalize}.camel-first-letter{text-transform:capitalize}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(487);case"v7light":return __webpack_require__(489);case"v8dark":return __webpack_require__(491);case"v8light":return __webpack_require__(493);case"v9dark":return __webpack_require__(495);case"v9light":return __webpack_require__(497)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(488);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(490);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(492);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(494);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(496);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(498);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ism-monaco-editor [data-mode-id=json] .hover-row.status-bar{display:none}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(500);case"v7light":return __webpack_require__(502);case"v8dark":return __webpack_require__(504);case"v8light":return __webpack_require__(506);case"v9dark":return __webpack_require__(508);case"v9light":return __webpack_require__(510)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(501);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(503);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(505);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(507);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(509);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(511);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.switch-diff-editor-modal .euiModal__flex{max-height:unset;overflow-y:unset}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(513);case"v7light":return __webpack_require__(515);case"v8dark":return __webpack_require__(517);case"v8light":return __webpack_require__(519);case"v9dark":return __webpack_require__(521);case"v9light":return __webpack_require__(523)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(514);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(516);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(518);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(520);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(522);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(524);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.accordion-in-advanced-settings.euiAccordion-isOpen .euiAccordion__childWrapper{transform:none !important}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(526);case"v7light":return __webpack_require__(528);case"v8dark":return __webpack_require__(530);case"v8light":return __webpack_require__(532);case"v9dark":return __webpack_require__(534);case"v9light":return __webpack_require__(536)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(527);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}
15.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(529);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(531);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(533);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}
15.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(535);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(537);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.channelSelect-combobox .euiComboBoxPill{display:none}.channelSelect-combobox .euiComboBoxPill.valid-option{display:inline-block}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(539);case"v7light":return __webpack_require__(541);case"v8dark":return __webpack_require__(543);case"v8light":return __webpack_require__(545);case"v9dark":return __webpack_require__(547);case"v9light":return __webpack_require__(549)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(540);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#ffce7a}.ISM-unsaved-changes-blocks.danger{background-color:#f66}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(542);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#f5a700}.ISM-unsaved-changes-blocks.danger{background-color:#bd271e}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(544);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#ffce7a}.ISM-unsaved-changes-blocks.danger{background-color:#f66}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(546);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#f5a700}.ISM-unsaved-changes-blocks.danger{background-color:#bd271e}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(548);
15content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#f4ae27}.ISM-unsaved-changes-blocks.danger{background-color:#cd5d56}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(550);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-unsaved-changes-blocks{width:4px;height:16px;display:inline-block;margin-right:8px}.ISM-unsaved-changes-blocks.warning{background-color:#e0a130}.ISM-unsaved-changes-blocks.danger{background-color:#c43d35}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){"use strict";var resolve=__webpack_require__(122),util=__webpack_require__(57),errorClasses=__webpack_require__(124),stableStringify=__webpack_require__(152);var validateGenerator=__webpack_require__(153);var ucs2length=util.ucs2length;var equal=__webpack_require__(123);var ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[undefined],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];function patternCode(i,patterns){var regExpCode=opts.regExp?"regExp":"new RegExp";return"var pattern"+i+" = "+regExpCode+"("+util.toQuotedString(patterns[i])+");"}root=root||{schema:schema,refVal:refVal,refs:refs};var c=checkCompiling.call(this,schema,root,baseId);var compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats;var RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;if(cv){cv.schema=v.schema;cv.errors=null;cv.refs=v.refs;cv.refVal=v.refVal;cv.root=v.root;cv.$async=v.$async;if(opts.sourceCode)cv.source=v.source}return v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate;var result=validate.apply(this,arguments);callValidate.errors=validate.errors;return result}
vendor: 4,172 bytes, line 15
15function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===true;var sourceCode=validateGenerator({isTop:true,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,logger:self.logger,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode;if(opts.processCode)sourceCode=opts.processCode(sourceCode,_schema);var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError","regExp",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError,opts.regExp);refVal[0]=validate}catch(e){self.logger.error("Error compiling schema, function code:",sourceCode);throw e}validate.schema=_schema;validate.errors=null;validate.refs=refs;validate.refVal=refVal;validate.root=isRoot?validate:_root;if($async)validate.$async=true;if(opts.sourceCode===true){validate.source={code:sourceCode,patterns:patterns,defaults:defaults}}return validate}function resolveRef(baseId,ref,isRoot){ref=resolve.url(baseId,ref);var refIndex=refs[ref];var _refVal,refCode;if(refIndex!==undefined){_refVal=refVal[refIndex];refCode="refVal["+refIndex+"]";return resolvedRef(_refVal,refCode)}if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==undefined){_refVal=root.refVal[rootRefId];refCode=addLocalRef(ref,_refVal);return resolvedRef(_refVal,refCode)}}refCode=addLocalRef(ref);var v=resolve.call(self,localCompile,root,ref);if(v===undefined){var localSchema=localRefs&&localRefs[ref];if(localSchema){v=resolve.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId)}}if(v===undefined){removeLocalRef(ref)}else{replaceLocalRef(ref,v);return resolvedRef(v,refCode)}}function addLocalRef(ref,v){var refId=refVal.length;refVal[refId]=v;refs[ref]=refId;return"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v){var refId=refs[ref];refVal[refId]=v}function resolvedRef(refVal,code){return typeof refVal=="object"||typeof refVal=="boolean"?{code:code,schema:refVal,inline:true}:{code:code,$async:refVal&&!!refVal.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];if(index===undefined){index=patternsHash[regexStr]=patterns.length;patterns[index]=regexStr}return"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value);var index=defaultsHash[valueStr];if(index===undefined){index=defaultsHash[valueStr]=defaults.length;defaults[index]=value}return"default"+index}}function useCustomRule(rule,schema,parentSchema,it){if(self._opts.validateSchema!==false){var deps=rule.definition.dependencies;if(deps&&!deps.every((function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)})))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro;var validate;if(compile){validate=compile.call(self,schema,parentSchema,it)}else if(macro){validate=macro.call(self,schema,parentSchema,it);if(opts.validateSchema!==false)self.validateSchema(validate,true)}else if(inline){validate=inline.call(self,it,rule.keyword,schema,parentSchema)}
15else{validate=rule.definition.validate;if(!validate)return}if(validate===undefined)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;customRules[index]=validate;return{code:"customRule"+index,validate:validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);if(index>=0)return{index:index,compiling:true};index=this._compilations.length;this._compilations[index]={schema:schema,root:root,baseId:baseId};return{index:index,compiling:false}}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);if(i>=0)this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i<this._compilations.length;i++){var c=this._compilations[i];if(c.schema==schema&&c.root==root&&c.baseId==baseId)return i}return-1}function defaultCode(i){return"var default"+i+" = defaults["+i+"];"}function refValCode(i,refVal){return refVal[i]===undefined?"":"var refVal"+i+" = refVal["+i+"];"}function customRuleCode(i){return"var customRule"+i+" = customRules["+i+"];"}function vars(arr,statement){if(!arr.length)return"";var code="";for(var i=0;i<arr.length;i++)code+=statement(i,arr);return code}},function(module,exports,__webpack_require__){ 16/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ 17(function(global,factory){true?factory(exports):undefined})(this,(function(exports){"use strict";function merge(){for(var _len=arguments.length,sets=Array(_len),_key=0;_key<_len;_key++){sets[_key]=arguments[_key]}if(sets.length>1){sets[0]=sets[0].slice(0,-1);var xl=sets.length-1;for(var x=1;x<xl;++x){sets[x]=sets[x].slice(1,-1)}sets[xl]=sets[xl].slice(1);return sets.join("")}else{return sets[0]}}function subexp(str){return"(?:"+str+")"}function typeOf(o){return o===undefined?"undefined":o===null?"null":Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(str){return str.toUpperCase()}function toArray(obj){return obj!==undefined&&obj!==null?obj instanceof Array?obj:typeof obj.length!=="number"||obj.split||obj.setInterval||obj.call?[obj]:Array.prototype.slice.call(obj):[]}function assign(target,source){var obj=target;if(source){for(var key in source){obj[key]=source[key]}}return obj}function buildExps(isIRI){var ALPHA$$="[A-Za-z]",CR$="[\\x0D]",DIGIT$$="[0-9]",DQUOTE$$="[\\x22]",HEXDIG$$=merge(DIGIT$$,"[A-Fa-f]"),LF$$="[\\x0A]",SP$$="[\\x20]",PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$)),GEN_DELIMS$$="[\\:\\/\\?\\#\\[\\]\\@]",SUB_DELIMS$$="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",RESERVED$$=merge(GEN_DELIMS$$,SUB_DELIMS$$),UCSCHAR$$=isIRI?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",IPRIVATE$$=isIRI?"[\\uE000-\\uF8FF]":"[]",UNRESERVED$$=merge(ALPHA$$,DIGIT$$,"[\\-\\.\\_\\~]",UCSCHAR$$),SCHEME$=subexp(ALPHA$$+merge(ALPHA$$,DIGIT$$,"[\\+\\-\\.]")+"*"),USERINFO$=subexp(subexp(PCT_ENCODED$+"|"+merge(UNRESERVED$$,SUB_DELIMS$$,"[\\:]"))+"*"),DEC_OCTET$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("[1-9]"+DIGIT$$)+"|"+DIGIT$$),DEC_OCTET_RELAXED$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("0?[1-9]"+DIGIT$$)+"|0?0?"+DIGIT$$),IPV4ADDRESS$=subexp(DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$),H16$=subexp(HEXDIG$$+"{1,4}"),LS32$=subexp(subexp(H16$+"\\:"+H16$)+"|"+IPV4ADDRESS$),IPV6ADDRESS1$=subexp(subexp(H16$+"\\:")+"{6}"+LS32$),IPV6ADDRESS2$=subexp("\\:\\:"+subexp(H16$+"\\:")+"{5}"+LS32$),IPV6ADDRESS3$=subexp(subexp(H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{4}"+LS32$),IPV6ADDRESS4$=subexp(subexp(subexp(H16$+"\\:")+"{0,1}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{3}"+LS32$),IPV6ADDRESS5$=subexp(subexp(subexp(H16$+"\\:")+"{0,2}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{2}"+LS32$),IPV6ADDRESS6$=subexp(subexp(subexp(H16$+"\\:")+"{0,3}"+H16$)+"?\\:\\:"+H16$+"\\:"+LS32$),IPV6ADDRESS7$=subexp(subexp(subexp(H16$+"\\:")+"{0,4}"+H16$)+"?\\:\\:"+LS32$),IPV6ADDRESS8$=subexp(subexp(subexp(H16$+"\\:")+"{0,5}"+H16$)+"?\\:\\:"+H16$),IPV6ADDRESS9$=subexp(subexp(subexp(H16$+"\\:")+"{0,6}"+H16$)+"?\\:\\:"),IPV6ADDRESS$=subexp([IPV6ADDRESS1$,IPV6ADDRESS2$,IPV6ADDRESS3$,IPV6ADDRESS4$,IPV6ADDRESS5$,IPV6ADDRESS6$,IPV6ADDRESS7$,IPV6ADDRESS8$,IPV6ADDRESS9$].join("|")),ZONEID$=subexp(subexp(UNRESERVED$$+"|"+PCT_ENCODED$)+"+"),IPV6ADDRZ$=subexp(IPV6ADDRESS$+"\\%25"
vendor: 4,155 bytes, line 17
17+ZONEID$),IPV6ADDRZ_RELAXED$=subexp(IPV6ADDRESS$+subexp("\\%25|\\%(?!"+HEXDIG$$+"{2})")+ZONEID$),IPVFUTURE$=subexp("[vV]"+HEXDIG$$+"+\\."+merge(UNRESERVED$$,SUB_DELIMS$$,"[\\:]")+"+"),IP_LITERAL$=subexp("\\["+subexp(IPV6ADDRZ_RELAXED$+"|"+IPV6ADDRESS$+"|"+IPVFUTURE$)+"\\]"),REG_NAME$=subexp(subexp(PCT_ENCODED$+"|"+merge(UNRESERVED$$,SUB_DELIMS$$))+"*"),HOST$=subexp(IP_LITERAL$+"|"+IPV4ADDRESS$+"(?!"+REG_NAME$+")"+"|"+REG_NAME$),PORT$=subexp(DIGIT$$+"*"),AUTHORITY$=subexp(subexp(USERINFO$+"@")+"?"+HOST$+subexp("\\:"+PORT$)+"?"),PCHAR$=subexp(PCT_ENCODED$+"|"+merge(UNRESERVED$$,SUB_DELIMS$$,"[\\:\\@]")),SEGMENT$=subexp(PCHAR$+"*"),SEGMENT_NZ$=subexp(PCHAR$+"+"),SEGMENT_NZ_NC$=subexp(subexp(PCT_ENCODED$+"|"+merge(UNRESERVED$$,SUB_DELIMS$$,"[\\@]"))+"+"),PATH_ABEMPTY$=subexp(subexp("\\/"+SEGMENT$)+"*"),PATH_ABSOLUTE$=subexp("\\/"+subexp(SEGMENT_NZ$+PATH_ABEMPTY$)+"?"),PATH_NOSCHEME$=subexp(SEGMENT_NZ_NC$+PATH_ABEMPTY$),PATH_ROOTLESS$=subexp(SEGMENT_NZ$+PATH_ABEMPTY$),PATH_EMPTY$="(?!"+PCHAR$+")",PATH$=subexp(PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),QUERY$=subexp(subexp(PCHAR$+"|"+merge("[\\/\\?]",IPRIVATE$$))+"*"),FRAGMENT$=subexp(subexp(PCHAR$+"|[\\/\\?]")+"*"),HIER_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),RELATIVE_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$),RELATIVE$=subexp(RELATIVE_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),URI_REFERENCE$=subexp(URI$+"|"+RELATIVE$),ABSOLUTE_URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"),GENERIC_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",RELATIVE_REF$="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",ABSOLUTE_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?$",SAMEDOC_REF$="^"+subexp("\\#("+FRAGMENT$+")")+"?$",AUTHORITY_REF$="^"+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",ALPHA$$,DIGIT$$,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",UNRESERVED$$,SUB_DELIMS$$),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",UNRESERVED$$,SUB_DELIMS$$),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",UNRESERVED$$,SUB_DELIMS$$),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",UNRESERVED$$,SUB_DELIMS$$),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",UNRESERVED$$,SUB_DELIMS$$,"[\\:\\@\\/\\?]",IPRIVATE$$),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",UNRESERVED$$,SUB_DELIMS$$,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",UNRESERVED$$,SUB_DELIMS$$),"g"),UNRESERVED:new RegExp(UNRESERVED$$,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",UNRESERVED$$,RESERVED$$),"g"),PCT_ENCODED:new RegExp(PCT_ENCODED$,"g"),IPV4ADDRESS:new RegExp("^("+IPV4ADDRESS$+")$"),IPV6ADDRESS:new RegExp("^\\[?("+IPV6ADDRESS$+")"+subexp(subexp("\\%25|\\%(?!"+HEXDIG$$+"{2})")+"("+ZONEID$+")")+"?\\]?$")}}var URI_PROTOCOL=buildExps(false);var IRI_PROTOCOL=buildExps(true);var slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"])_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i)}
17else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}else{return Array.from(arr)}};var maxInt=2147483647;var base=36;var tMin=1;var tMax=26;var skew=38;var damp=700;var initialBias=72;var initialN=128;var delimiter="-";var regexPunycode=/^xn--/;var regexNonASCII=/[^\0-\x7E]/;var regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g;var errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var baseMinusTMin=base-tMin;var floor=Math.floor;var stringFromCharCode=String.fromCharCode;function error$1(type){throw new RangeError(errors[type])}function map(array,fn){var result=[];var length=array.length;while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[];var counter=0;var length=string.length;while(counter<length){var value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){var extra=string.charCodeAt(counter++);if((extra&64512)==56320){output.push(((value&1023)<<10)+(extra&1023)+65536)}else{output.push(value);counter--}}else{output.push(value)}}return output}var ucs2encode=function ucs2encode(array){return String.fromCodePoint.apply(String,toConsumableArray(array))};var basicToDigit=function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base};var digitToBasic=function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)};var adapt=function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))};var decode=function decode(input){var output=[];var inputLength=input.length;var i=0;var n=initialN;var bias=initialBias;var basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(var j=0;j<basic;++j){if(input.charCodeAt(j)>=128){error$1("not-basic")}output.push(input.charCodeAt(j))}for(var index=basic>0?basic+1:0;index<inputLength;){var oldi=i;for(var w=1,k=base;;k+=base){if(index>=inputLength){error$1("invalid-input")}var digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error$1("overflow")}i+=digit*w;var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break}var baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error$1("overflow")}w*=baseMinusT}var out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error$1("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return String.fromCodePoint.apply(String,output)};var encode=function encode(input){var output=[];input=ucs2decode(input);var inputLength=input.length;var n=initialN;var delta=0;var bias=initialBias;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=input[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _currentValue2=_step.value;if(_currentValue2<128){output.push(stringFromCharCode(_currentValue2))}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var basicLength=output.length;var handledCPCount=basicLength;if(basicLength){output.push(delimiter)}while(handledCPCount<inputLength){var m=maxInt;var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=input[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var currentValue=_step2.value;if(currentValue>=n&¤tValue<m){m=currentValue}}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}var handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error$1("overflow")}
17delta+=(m-n)*handledCPCountPlusOne;n=m;var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=input[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var _currentValue=_step3.value;if(_currentValue<n&&++delta>maxInt){error$1("overflow")}if(_currentValue==n){var q=delta;for(var k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break}var qMinusT=q-t;var baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}}catch(err){_didIteratorError3=true;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return()}}finally{if(_didIteratorError3){throw _iteratorError3}}}++delta;++n}return output.join("")};var toUnicode=function toUnicode(input){return mapDomain(input,(function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string}))};var toASCII=function toASCII(input){return mapDomain(input,(function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string}))};var punycode={version:"2.1.0",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};var SCHEMES={};function pctEncChar(chr){var c=chr.charCodeAt(0);var e=void 0;if(c<16)e="%0"+c.toString(16).toUpperCase();else if(c<128)e="%"+c.toString(16).toUpperCase();else if(c<2048)e="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();else e="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();return e}function pctDecChars(str){var newStr="";var i=0;var il=str.length;while(i<il){var c=parseInt(str.substr(i+1,2),16);if(c<128){newStr+=String.fromCharCode(c);i+=3}else if(c>=194&&c<224){if(il-i>=6){var c2=parseInt(str.substr(i+4,2),16);newStr+=String.fromCharCode((c&31)<<6|c2&63)}else{newStr+=str.substr(i,6)}i+=6}else if(c>=224){if(il-i>=9){var _c=parseInt(str.substr(i+4,2),16);var c3=parseInt(str.substr(i+7,2),16);newStr+=String.fromCharCode((c&15)<<12|(_c&63)<<6|c3&63)}else{newStr+=str.substr(i,9)}i+=9}else{newStr+=str.substr(i,3);i+=3}}return newStr}function _normalizeComponentEncoding(components,protocol){function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(protocol.UNRESERVED)?str:decStr}if(components.scheme)components.scheme=String(components.scheme).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME,"");if(components.userinfo!==undefined)components.userinfo=String(components.userinfo).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_USERINFO,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.host!==undefined)components.host=String(components.host).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.path!==undefined)components.path=String(components.path).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(components.scheme?protocol.NOT_PATH:protocol.NOT_PATH_NOSCHEME,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.query!==undefined)components.query=String(components.query).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_QUERY,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.fragment!==undefined)components.fragment=String(components.fragment).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_FRAGMENT,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);return components}function _stripLeadingZeros(str){return str.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(host,protocol){var matches=host.match(protocol.IPV4ADDRESS)||[];var _matches=slicedToArray(matches,2),address=_matches[1];if(address){return address.split(".").map(_stripLeadingZeros).join(".")}else{return host}}function _normalizeIPv6(host,protocol){var matches=host.match(protocol.IPV6ADDRESS)||[];var _matches2=slicedToArray(matches,3),address=_matches2[1],zone=_matches2[2];if(address){var _address$toLowerCase$=address.toLowerCase().split("::").reverse(),_address$toLowerCase$2=slicedToArray(_address$toLowerCase$,2),last=_address$toLowerCase$2[0],first=_address$toLowerCase$2[1];var firstFields=first?first.split(":").map(_stripLeadingZeros):[];var lastFields=last.split(":").map(_stripLeadingZeros);var isLastFieldIPv4Address=protocol.IPV4ADDRESS.test(lastFields[lastFields.length-1]);var fieldCount=isLastFieldIPv4Address?7:8;var lastFieldsStart=lastFields.length-fieldCount;var fields=Array(fieldCount);for(var x=0;x<fieldCount;++x){fields[x]=firstFields[x]||lastFields[lastFieldsStart+x]||""}if(isLastFieldIPv4Address){fields[fieldCount-1]=_normalizeIPv4(fields[fieldCount-1],protocol)}var allZeroFields=fields.reduce((function(acc,field,index){if(!field||field==="0"){var lastLongest=acc[acc.length-1];if(lastLongest&&lastLongest.index+lastLongest.length===index){lastLongest.length++}else{acc.push({index:index,length:1})}}return acc}),[]);var longestZeroFields=allZeroFields.sort((function(a,b){return b.length-a.length}))[0];var newHost=void 0;if(longestZeroFields&&longestZeroFields.length>1){var newFirst=fields.slice(0,longestZeroFields.index);var newLast=fields.slice(longestZeroFields.index+longestZeroFields.length);newHost=newFirst.join(":")+"::"+newLast.join(":")}else{newHost=fields.join(":")}if(zone){newHost+="%"+zone}return newHost}else{return host}}var URI_PARSE=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var NO_MATCH_IS_UNDEFINED="".match(/(){0}
17/)[1]===undefined;function parse(uriString){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var components={};var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;if(options.reference==="suffix")uriString=(options.scheme?options.scheme+":":"")+"//"+uriString;var matches=uriString.match(URI_PARSE);if(matches){if(NO_MATCH_IS_UNDEFINED){components.scheme=matches[1];components.userinfo=matches[3];components.host=matches[4];components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=matches[7];components.fragment=matches[8];if(isNaN(components.port)){components.port=matches[5]}}else{components.scheme=matches[1]||undefined;components.userinfo=uriString.indexOf("@")!==-1?matches[3]:undefined;components.host=uriString.indexOf("//")!==-1?matches[4]:undefined;components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=uriString.indexOf("?")!==-1?matches[7]:undefined;components.fragment=uriString.indexOf("#")!==-1?matches[8]:undefined;if(isNaN(components.port)){components.port=uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?matches[4]:undefined}}if(components.host){components.host=_normalizeIPv6(_normalizeIPv4(components.host,protocol),protocol)}if(components.scheme===undefined&&components.userinfo===undefined&&components.host===undefined&&components.port===undefined&&!components.path&&components.query===undefined){components.reference="same-document"}else if(components.scheme===undefined){components.reference="relative"}else if(components.fragment===undefined){components.reference="absolute"}else{components.reference="uri"}if(options.reference&&options.reference!=="suffix"&&options.reference!==components.reference){components.error=components.error||"URI is not a "+options.reference+" reference."}var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)){if(components.host&&(options.domainHost||schemeHandler&&schemeHandler.domainHost)){try{components.host=punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(components,URI_PROTOCOL)}else{_normalizeComponentEncoding(components,protocol)}if(schemeHandler&&schemeHandler.parse){schemeHandler.parse(components,options)}}else{components.error=components.error||"URI can not be parsed."}return components}function _recomposeAuthority(components,options){var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];if(components.userinfo!==undefined){uriTokens.push(components.userinfo);uriTokens.push("@")}if(components.host!==undefined){uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host),protocol),protocol).replace(protocol.IPV6ADDRESS,(function(_,$1,$2){return"["+$1+($2?"%25"+$2:"")+"]"})))}if(typeof components.port==="number"||typeof components.port==="string"){uriTokens.push(":");uriTokens.push(String(components.port))}return uriTokens.length?uriTokens.join(""):undefined}var RDS1=/^\.\.?\//;var RDS2=/^\/\.(\/|$)/;var RDS3=/^\/\.\.(\/|$)/;var RDS5=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(input){var output=[];while(input.length){if(input.match(RDS1)){input=input.replace(RDS1,"")}else if(input.match(RDS2)){input=input.replace(RDS2,"/")}else if(input.match(RDS3)){input=input.replace(RDS3,"/");output.pop()}else if(input==="."||input===".."){input=""}else{var im=input.match(RDS5);if(im){var s=im[0];input=input.slice(s.length);output.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return output.join("")}function serialize(components){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var protocol=options.iri?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(schemeHandler&&schemeHandler.serialize)schemeHandler.serialize(components,options);if(components.host){if(protocol.IPV6ADDRESS.test(components.host)){}else if(options.domainHost||schemeHandler&&schemeHandler.domainHost){try{components.host=!options.iri?punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase()):punycode.toUnicode(components.host)}catch(e){components.error=components.error||"Host's domain name can not be converted to "+(!options.iri?"ASCII":"Unicode")+" via punycode: "+e}}}_normalizeComponentEncoding(components,protocol);if(options.reference!=="suffix"&&components.scheme){uriTokens.push(components.scheme);uriTokens.push(":")}
17var authority=_recomposeAuthority(components,options);if(authority!==undefined){if(options.reference!=="suffix"){uriTokens.push("//")}uriTokens.push(authority);if(components.path&&components.path.charAt(0)!=="/"){uriTokens.push("/")}}if(components.path!==undefined){var s=components.path;if(!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)){s=removeDotSegments(s)}if(authority===undefined){s=s.replace(/^\/\//,"/%2F")}uriTokens.push(s)}if(components.query!==undefined){uriTokens.push("?");uriTokens.push(components.query)}if(components.fragment!==undefined){uriTokens.push("#");uriTokens.push(components.fragment)}return uriTokens.join("")}function resolveComponents(base,relative){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var skipNormalization=arguments[3];var target={};if(!skipNormalization){base=parse(serialize(base,options),options);relative=parse(serialize(relative,options),options)}options=options||{};if(!options.tolerant&&relative.scheme){target.scheme=relative.scheme;target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(relative.userinfo!==undefined||relative.host!==undefined||relative.port!==undefined){target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(!relative.path){target.path=base.path;if(relative.query!==undefined){target.query=relative.query}else{target.query=base.query}}else{if(relative.path.charAt(0)==="/"){target.path=removeDotSegments(relative.path)}else{if((base.userinfo!==undefined||base.host!==undefined||base.port!==undefined)&&!base.path){target.path="/"+relative.path}else if(!base.path){target.path=relative.path}else{target.path=base.path.slice(0,base.path.lastIndexOf("/")+1)+relative.path}target.path=removeDotSegments(target.path)}target.query=relative.query}target.userinfo=base.userinfo;target.host=base.host;target.port=base.port}target.scheme=base.scheme}target.fragment=relative.fragment;return target}function resolve(baseURI,relativeURI,options){var schemelessOptions=assign({scheme:"null"},options);return serialize(resolveComponents(parse(baseURI,schemelessOptions),parse(relativeURI,schemelessOptions),schemelessOptions,true),schemelessOptions)}function normalize(uri,options){if(typeof uri==="string"){uri=serialize(parse(uri,options),options)}else if(typeOf(uri)==="object"){uri=parse(serialize(uri,options),options)}return uri}function equal(uriA,uriB,options){if(typeof uriA==="string"){uriA=serialize(parse(uriA,options),options)}else if(typeOf(uriA)==="object"){uriA=serialize(uriA,options)}if(typeof uriB==="string"){uriB=serialize(parse(uriB,options),options)}else if(typeOf(uriB)==="object"){uriB=serialize(uriB,options)}return uriA===uriB}function escapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.ESCAPE:IRI_PROTOCOL.ESCAPE,pctEncChar)}function unescapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.PCT_ENCODED:IRI_PROTOCOL.PCT_ENCODED,pctDecChars)}var handler={scheme:"http",domainHost:true,parse:function parse(components,options){if(!components.host){components.error=components.error||"HTTP URIs must have a host."}return components},serialize:function serialize(components,options){var secure=String(components.scheme).toLowerCase()==="https";if(components.port===(secure?443:80)||components.port===""){components.port=undefined}if(!components.path){components.path="/"}return components}};var handler$1={scheme:"https",domainHost:handler.domainHost,parse:handler.parse,serialize:handler.serialize};function isSecure(wsComponents){return typeof wsComponents.secure==="boolean"?wsComponents.secure:String(wsComponents.scheme).toLowerCase()==="wss"}var handler$2={scheme:"ws",domainHost:true,parse:function parse(components,options){var wsComponents=components;wsComponents.secure=isSecure(wsComponents);wsComponents.resourceName=(wsComponents.path||"/")+(wsComponents.query?"?"+wsComponents.query:"");
17wsComponents.path=undefined;wsComponents.query=undefined;return wsComponents},serialize:function serialize(wsComponents,options){if(wsComponents.port===(isSecure(wsComponents)?443:80)||wsComponents.port===""){wsComponents.port=undefined}if(typeof wsComponents.secure==="boolean"){wsComponents.scheme=wsComponents.secure?"wss":"ws";wsComponents.secure=undefined}if(wsComponents.resourceName){var _wsComponents$resourc=wsComponents.resourceName.split("?"),_wsComponents$resourc2=slicedToArray(_wsComponents$resourc,2),path=_wsComponents$resourc2[0],query=_wsComponents$resourc2[1];wsComponents.path=path&&path!=="/"?path:undefined;wsComponents.query=query;wsComponents.resourceName=undefined}wsComponents.fragment=undefined;return wsComponents}};var handler$3={scheme:"wss",domainHost:handler$2.domainHost,parse:handler$2.parse,serialize:handler$2.serialize};var O={};var isIRI=true;var UNRESERVED$$="[A-Za-z0-9\\-\\.\\_\\~"+(isIRI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var HEXDIG$$="[0-9A-Fa-f]";var PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$));var ATEXT$$="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var QTEXT$$="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var VCHAR$$=merge(QTEXT$$,'[\\"\\\\]');var SOME_DELIMS$$="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var UNRESERVED=new RegExp(UNRESERVED$$,"g");var PCT_ENCODED=new RegExp(PCT_ENCODED$,"g");var NOT_LOCAL_PART=new RegExp(merge("[^]",ATEXT$$,"[\\.]",'[\\"]',VCHAR$$),"g");var NOT_HFNAME=new RegExp(merge("[^]",UNRESERVED$$,SOME_DELIMS$$),"g");var NOT_HFVALUE=NOT_HFNAME;function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(UNRESERVED)?str:decStr}var handler$4={scheme:"mailto",parse:function parse$$1(components,options){var mailtoComponents=components;var to=mailtoComponents.to=mailtoComponents.path?mailtoComponents.path.split(","):[];mailtoComponents.path=undefined;if(mailtoComponents.query){var unknownHeaders=false;var headers={};var hfields=mailtoComponents.query.split("&");for(var x=0,xl=hfields.length;x<xl;++x){var hfield=hfields[x].split("=");switch(hfield[0]){case"to":var toAddrs=hfield[1].split(",");for(var _x=0,_xl=toAddrs.length;_x<_xl;++_x){to.push(toAddrs[_x])}break;case"subject":mailtoComponents.subject=unescapeComponent(hfield[1],options);break;case"body":mailtoComponents.body=unescapeComponent(hfield[1],options);break;default:unknownHeaders=true;headers[unescapeComponent(hfield[0],options)]=unescapeComponent(hfield[1],options);break}}if(unknownHeaders)mailtoComponents.headers=headers}mailtoComponents.query=undefined;for(var _x2=0,_xl2=to.length;_x2<_xl2;++_x2){var addr=to[_x2].split("@");addr[0]=unescapeComponent(addr[0]);if(!options.unicodeSupport){try{addr[1]=punycode.toASCII(unescapeComponent(addr[1],options).toLowerCase())}catch(e){mailtoComponents.error=mailtoComponents.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{addr[1]=unescapeComponent(addr[1],options).toLowerCase()}to[_x2]=addr.join("@")}return mailtoComponents},serialize:function serialize$$1(mailtoComponents,options){var components=mailtoComponents;var to=toArray(mailtoComponents.to);if(to){for(var x=0,xl=to.length;x<xl;++x){var toAddr=String(to[x]);var atIdx=toAddr.lastIndexOf("@");var localPart=toAddr.slice(0,atIdx).replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_LOCAL_PART,pctEncChar);var domain=toAddr.slice(atIdx+1);try{domain=!options.iri?punycode.toASCII(unescapeComponent(domain,options).toLowerCase()):punycode.toUnicode(domain)}catch(e){components.error=components.error||"Email address's domain name can not be converted to "+(!options.iri?"ASCII":"Unicode")+" via punycode: "+e}to[x]=localPart+"@"+domain}components.path=to.join(",")}var headers=mailtoComponents.headers=mailtoComponents.headers||{};if(mailtoComponents.subject)headers["subject"]=mailtoComponents.subject;if(mailtoComponents.body)headers["body"]=mailtoComponents.body;var fields=[];for(var name in headers){if(headers[name]!==O[name]){fields.push(name.replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFNAME,pctEncChar)+"="+headers[name].replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFVALUE,pctEncChar))}}if(fields.length){components.query=fields.join("&")}return components}};var URN_PARSE=/^([^\:]+)\:(.*)/;
17var handler$5={scheme:"urn",parse:function parse$$1(components,options){var matches=components.path&&components.path.match(URN_PARSE);var urnComponents=components;if(matches){var scheme=options.scheme||urnComponents.scheme||"urn";var nid=matches[1].toLowerCase();var nss=matches[2];var urnScheme=scheme+":"+(options.nid||nid);var schemeHandler=SCHEMES[urnScheme];urnComponents.nid=nid;urnComponents.nss=nss;urnComponents.path=undefined;if(schemeHandler){urnComponents=schemeHandler.parse(urnComponents,options)}}else{urnComponents.error=urnComponents.error||"URN can not be parsed."}return urnComponents},serialize:function serialize$$1(urnComponents,options){var scheme=options.scheme||urnComponents.scheme||"urn";var nid=urnComponents.nid;var urnScheme=scheme+":"+(options.nid||nid);var schemeHandler=SCHEMES[urnScheme];if(schemeHandler){urnComponents=schemeHandler.serialize(urnComponents,options)}var uriComponents=urnComponents;var nss=urnComponents.nss;uriComponents.path=(nid||options.nid)+":"+nss;return uriComponents}};var UUID=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var handler$6={scheme:"urn:uuid",parse:function parse(urnComponents,options){var uuidComponents=urnComponents;uuidComponents.uuid=uuidComponents.nss;uuidComponents.nss=undefined;if(!options.tolerant&&(!uuidComponents.uuid||!uuidComponents.uuid.match(UUID))){uuidComponents.error=uuidComponents.error||"UUID is not valid."}return uuidComponents},serialize:function serialize(uuidComponents,options){var urnComponents=uuidComponents;urnComponents.nss=(uuidComponents.uuid||"").toLowerCase();return urnComponents}};SCHEMES[handler.scheme]=handler;SCHEMES[handler$1.scheme]=handler$1;SCHEMES[handler$2.scheme]=handler$2;SCHEMES[handler$3.scheme]=handler$3;SCHEMES[handler$4.scheme]=handler$4;SCHEMES[handler$5.scheme]=handler$5;SCHEMES[handler$6.scheme]=handler$6;exports.SCHEMES=SCHEMES;exports.pctEncChar=pctEncChar;exports.pctDecChars=pctDecChars;exports.parse=parse;exports.removeDotSegments=removeDotSegments;exports.serialize=serialize;exports.resolveComponents=resolveComponents;exports.resolve=resolve;exports.normalize=normalize;exports.equal=equal;exports.escapeComponent=escapeComponent;exports.unescapeComponent=unescapeComponent;Object.defineProperty(exports,"__esModule",{value:true})}))},function(module,exports,__webpack_require__){"use strict";module.exports=function ucs2length(str){var length=0,len=str.length,pos=0,value;while(pos<len){length++;value=str.charCodeAt(pos++);if(value>=55296&&value<=56319&&pos<len){value=str.charCodeAt(pos);if((value&64512)==56320)pos++}}return length}},function(module,exports,__webpack_require__){"use strict";var traverse=module.exports=function(schema,opts,cb){if(typeof opts=="function"){cb=opts;opts={}}cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||function(){};var post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};traverse.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};traverse.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};traverse.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key in schema){var sch=schema[key];if(Array.isArray(sch)){if(key in traverse.arrayKeywords){for(var i=0;i<sch.length;i++)_traverse(opts,pre,post,sch[i],jsonPtr+"/"+key+"/"+i,rootSchema,jsonPtr,key,schema,i)}}else if(key in traverse.propsKeywords){if(sch&&typeof sch=="object"){for(var prop in sch)_traverse(opts,pre,post,sch[prop],jsonPtr+"/"+key+"/"+escapeJsonPtr(prop),rootSchema,jsonPtr,key,schema,prop)}}else if(key in traverse.keywords||opts.allKeys&&!(key in traverse.skipKeywords)){_traverse(opts,pre,post,sch,jsonPtr+"/"+key,rootSchema,jsonPtr,key,schema)}}post(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex)}}function escapeJsonPtr(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}},function(module,exports,__webpack_require__){"use strict";var Cache=module.exports=function Cache(){this._cache={}};Cache.prototype.put=function Cache_put(key,value){this._cache[key]=value};Cache.prototype.get=function Cache_get(key){return this._cache[key]};Cache.prototype.del=function Cache_del(key){delete this._cache[key]};Cache.prototype.clear=function Cache_clear(){this._cache={}}},function(module,exports,__webpack_require__){"use strict";var util=__webpack_require__(57);var DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];var TIME=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var HOSTNAME=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2}
17)*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var URIREF=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var URITEMPLATE=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){mode=mode=="full"?"full":"fast";return util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}
vendor: 24,458 bytes, line 17
17(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return false;var year=+matches[1];var month=+matches[2];var day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return false;var hour=matches[1];var minute=matches[2];var second=matches[3];var timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],true)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return false;try{new RegExp(str);return true}catch(e){return false}}},function(module,exports,__webpack_require__){"use strict";var ruleModules=__webpack_require__(558),toHash=__webpack_require__(57).toHash;module.exports=function rules(){var RULES=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var ALL=["type","$comment"];var KEYWORDS=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var TYPES=["number","integer","string","array","object","boolean","null"];RULES.all=toHash(ALL);RULES.types=toHash(TYPES);RULES.forEach((function(group){group.rules=group.rules.map((function(keyword){var implKeywords;if(typeof keyword=="object"){var key=Object.keys(keyword)[0];implKeywords=keyword[key];keyword=key;implKeywords.forEach((function(k){ALL.push(k);RULES.all[k]=true}))}ALL.push(keyword);var rule=RULES.all[keyword]={keyword:keyword,code:ruleModules[keyword],implements:implKeywords};return rule}));RULES.all.$comment={keyword:"$comment",code:ruleModules.$comment};if(group.type)RULES.types[group.type]=group}));RULES.keywords=toHash(ALL.concat(KEYWORDS));RULES.custom={};return RULES}},function(module,exports,__webpack_require__){"use strict";module.exports={$ref:__webpack_require__(559),allOf:__webpack_require__(560),anyOf:__webpack_require__(561),$comment:__webpack_require__(562),const:__webpack_require__(563),contains:__webpack_require__(564),dependencies:__webpack_require__(565),enum:__webpack_require__(566),format:__webpack_require__(567),if:__webpack_require__(568),items:__webpack_require__(569),maximum:__webpack_require__(154),minimum:__webpack_require__(154),maxItems:__webpack_require__(155),minItems:__webpack_require__(155),maxLength:__webpack_require__(156),minLength:__webpack_require__(156),maxProperties:__webpack_require__(157),minProperties:__webpack_require__(157),multipleOf:__webpack_require__(570),not:__webpack_require__(571),oneOf:__webpack_require__(572),pattern:__webpack_require__(573),properties:__webpack_require__(574),propertyNames:__webpack_require__(575),required:__webpack_require__(576),uniqueItems:__webpack_require__(577),validate:__webpack_require__(153)}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_ref(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $async,$refCode;if($schema=="#"||$schema=="#/"){if(it.isRoot){$async=it.async;$refCode="validate"}else{$async=it.root.schema.$async===true;$refCode="root.refVal[0]"}}else{var $refVal=it.resolveRef(it.baseId,$schema,it.isRoot);if($refVal===undefined){var $message=it.MissingRefError.message(it.baseId,$schema);if(it.opts.missingRefs=="fail"){it.logger.error($message);var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { ref: '"+it.util.escapeQuotes($schema)+"' } ";if(it.opts.messages!==false){out+=" , message: 'can\\'t resolve reference "+it.util.escapeQuotes($schema)+"' "}if(it.opts.verbose){out+=" , schema: "+it.util.toQuotedString($schema)+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if($breakOnError){out+=" if (false) { "}}else if(it.opts.missingRefs=="ignore"){it.logger.warn($message);if($breakOnError){out+=" if (true) { "}}else{throw new it.MissingRefError(it.baseId,$schema,$message)}}else if($refVal.inline){var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;$it.schema=$refVal.schema;$it.schemaPath="";$it.errSchemaPath=$schema;var $code=it.validate($it).replace(/validate\.schema/g,$refVal.code);out+=" "+$code+" ";if($breakOnError){out+=" if ("+$nextValid+") { "}}else{$async=$refVal.$async===true||it.async&&$refVal.$async!==false;$refCode=$refVal.code}}if($refCode){var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.opts.passContext){out+=" "+$refCode+".call(this, "}else{out+=" "+$refCode+"( "}out+=" "+$data+", (dataPath || '')";if(it.errorPath!='""'){out+=" + "+it.errorPath}var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+", rootData) ";var __callValidate=out;out=$$outStack.pop();if($async){if(!it.async)throw new Error("async schema referenced by sync schema");if($breakOnError){out+=" var "+$valid+"; "}out+=" try { await "+__callValidate+"; ";if($breakOnError){out+=" "+$valid+" = true; "}out+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if($breakOnError){out+=" "+$valid+" = false; "}out+=" } ";if($breakOnError){out+=" if ("+$valid+") { "}}else{out+=" if (!"+__callValidate+") { if (vErrors === null) vErrors = "+$refCode+".errors; else vErrors = vErrors.concat("+$refCode+".errors); errors = vErrors.length; } ";if($breakOnError){out+=" else { "}}}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_allOf(it,$keyword,$ruleType){var out=" ";var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$allSchemasEmpty=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i<l1){$sch=arr1[$i+=1];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){$allSchemasEmpty=false;$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($breakOnError){if($allSchemasEmpty){out+=" if (true) { "}else{out+=" "+$closingBraces.slice(0,-1)+" "}}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_anyOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $noEmptySchema=$schema.every((function($sch){return it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)}));if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i<l1){$sch=arr1[$i+=1];$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$valid+" || "+$nextValid+"; if (!"+$valid+") { ";$closingBraces+="}"}}it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$closingBraces+" if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should match some schema in anyOf' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";if(it.opts.allErrors){out+=" } "}}else{if($breakOnError){out+=" if (true) { "}}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_comment(it,$keyword,$ruleType){var out=" ";var $schema=it.schema[$keyword];var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $comment=it.util.toQuotedString($schema);if(it.opts.$comment===true){out+=" console.log("+$comment+");"}else if(typeof it.opts.$comment=="function"){out+=" self._opts.$comment("+$comment+", "+it.util.toQuotedString($errSchemaPath)+", validate.root.schema);"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_const(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!$isData){out+=" var schema"+$lvl+" = validate.schema"+$schemaPath+";"}out+="var "+$valid+" = equal("+$data+", schema"+$lvl+"); if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValue: schema"+$lvl+" } ";if(it.opts.messages!==false){out+=" , message: 'should be equal to constant' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" }";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_contains(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId,$nonEmptySchema=it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0||$schema===false:it.util.schemaHasRules($schema,it.RULES.all);out+="var "+$errs+" = errors;var "+$valid+";";if($nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" if ("+$nextValid+") break; } ";it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else{out+=" if ("+$data+".length == 0) {"}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should contain a valid item' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { ";if($nonEmptySchema){out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "}if(it.opts.allErrors){out+=" } "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_dependencies(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $schemaDeps={},$propertyDeps={},$ownProperties=it.opts.ownProperties;for($property in $schema){if($property=="__proto__")continue;var $sch=$schema[$property];var $deps=Array.isArray($sch)?$propertyDeps:$schemaDeps;$deps[$property]=$sch}out+="var "+$errs+" = errors;";var $currentErrorPath=it.errorPath;out+="var missing"+$lvl+";";for(var $property in $propertyDeps){$deps=$propertyDeps[$property];if($deps.length){out+=" if ( "+$data+it.util.getProperty($property)+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "}if($breakOnError){out+=" && ( ";var arr1=$deps;if(arr1){var $propertyKey,$i=-1,l1=arr1.length-1;while($i<l1){$propertyKey=arr1[$i+=1];if($i){out+=" || "}var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}}out+=")) { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,true):$currentErrorPath+" + "+$propertyPath}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"dependencies"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ";if(it.opts.messages!==false){out+=" , message: 'should have ";if($deps.length==1){out+="property "+it.util.escapeQuotes($deps[0])}else{out+="properties "+it.util.escapeQuotes($deps.join(", "))}out+=" when property "+it.util.escapeQuotes($property)+" is present' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{out+=" ) { ";var arr2=$deps;if(arr2){var $propertyKey,i2=-1,l2=arr2.length-1;while(i2<l2){$propertyKey=arr2[i2+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"dependencies"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ";if(it.opts.messages!==false){out+=" , message: 'should have ";if($deps.length==1){out+="property "+it.util.escapeQuotes($deps[0])}else{out+="properties "+it.util.escapeQuotes($deps.join(", "))}out+=" when property "+it.util.escapeQuotes($property)+" is present' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}out+=" } ";if($breakOnError){$closingBraces+="}";out+=" else { "}}}it.errorPath=$currentErrorPath;var $currentBaseId=$it.baseId;for(var $property in $schemaDeps){var $sch=$schemaDeps[$property];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "}out+=") { ";$it.schema=$sch;$it.schemaPath=$schemaPath+it.util.getProperty($property);$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property);out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_enum(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $i="i"+$lvl,$vSchema="schema"+$lvl;if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"}out+="var "+$valid+";";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length;
17 "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ";if(it.opts.messages!==false){out+=" , message: 'should be equal to one of the allowed values' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" }";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_format(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");if(it.opts.format===false){if($breakOnError){out+=" if (true) { "}return out}var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ";if(it.async){out+=" var async"+$lvl+" = "+$format+".async; "}out+=" "+$format+" = "+$format+".validate; } if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" (";if($unknownFormats!="ignore"){out+=" ("+$schemaValue+" && !"+$format+" ";if($allowUnknown){out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "}out+=") || "}out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ";if(it.async){out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) "}else{out+=" "+$format+"("+$data+") "}out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore"){it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"');if($breakOnError){out+=" if (true) { "}return out}else if($allowUnknown&&$unknownFormats.indexOf($schema)>=0){if($breakOnError){out+=" if (true) { "}return out}else{throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate;var $formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===true;$format=$format.validate}if($formatType!=$ruleType){if($breakOnError){out+=" if (true) { "}return out}if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);if($isObject)$formatRef+=".validate";if(typeof $format=="function"){out+=" "+$formatRef+"("+$data+") "}else{out+=" "+$formatRef+".test("+$data+") "}out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match format \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_if(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;var $thenSch=it.schema["then"],$elseSch=it.schema["else"],$thenPresent=$thenSch!==undefined&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0||$thenSch===false:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==undefined&&(it.opts.strictKeywords?typeof $else
vendor: 17,971 bytes, line 17
17Sch=="object"&&Object.keys($elseSch).length>0||$elseSch===false:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=false;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;$it.createErrors=true;out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";it.compositeRule=$it.compositeRule=$wasComposite;if($thenPresent){out+=" if ("+$nextValid+") { ";$it.schema=it.schema["then"];$it.schemaPath=it.schemaPath+".then";$it.errSchemaPath=it.errSchemaPath+"/then";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'then'; "}else{$ifClause="'then'"}out+=" } ";if($elsePresent){out+=" else { "}}else{out+=" if (!"+$nextValid+") { "}if($elsePresent){$it.schema=it.schema["else"];$it.schemaPath=it.schemaPath+".else";$it.errSchemaPath=it.errSchemaPath+"/else";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'else'; "}else{$ifClause="'else'"}out+=" } "}out+=" if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ";if(it.opts.messages!==false){out+=" , message: 'should match \"' + "+$ifClause+" + '\" schema' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_items(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;out+="var "+$errs+" = errors;var "+$valid+";";if(Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===false){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have more than "+$schema.length+" items' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";$errSchemaPath=$currErrSchemaPath;if($breakOnError){$closingBraces+="}";out+=" else { "}}var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i<l1){$sch=arr1[$i+=1];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,true);$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0||$additionalItems===false:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems;$it.schemaPath=it.schemaPath+".additionalItems";$it.errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0||$schema===false:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" for (var "+$idx+" = "+0+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" }"}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_multipleOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}out+="var division"+$lvl+";if (";if($isData){out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "}out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ";if(it.opts.multipleOfPrecision){out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" "}else{out+=" division"+$lvl+" !== parseInt(division"+$lvl+") "}out+=" ) ";if($isData){out+=" ) "}out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should be multiple of ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_not(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0||$schema===false:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.createErrors=false;var $allErrorsOption;if($it.opts.allErrors){$allErrorsOption=$it.opts.allErrors;$it.opts.allErrors=false}out+=" "+it.validate($it)+" ";$it.createErrors=true;if($allErrorsOption)$it.opts.allErrors=$allErrorsOption;it.compositeRule=$it.compositeRule=$wasComposite;out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";if(it.opts.allErrors){out+=" } "}}else{out+=" var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($breakOnError){out+=" if (false) { "}}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_oneOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i<l1){$sch=arr1[$i+=1];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId}else{out+=" var "+$nextValid+" = true; "}if($i){out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ";$closingBraces+="}"}out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }"}}it.compositeRule=$it.compositeRule=$wasComposite;out+=""+$closingBraces+"if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ";if(it.opts.messages!==false){out+=" , message: 'should match exactly one schema in oneOf' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }";if(it.opts.allErrors){out+=" } "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_pattern(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $regExpCode=it.opts.regExp?"regExp":"new RegExp";if($isData){out+=" var "+$valid+" = true; try { "+$valid+" = "+$regExpCode+"("+$schemaValue+").test("+$data+"); } catch(e) { "+$valid+" = false; } if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" !"+$valid+") {"}else{var $regexp=it.usePattern($schema);out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" !"+$regexp+".test("+$data+") ) {"}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match pattern \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_properties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl;var $schemaKeys=Object.keys($schema||{}).filter(notProto),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties).filter(notProto),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===false,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;var $required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length<it.opts.loopRequired){var $requiredHash=it.util.toHash($required)}function notProto(p){return p!=="__proto__"}out+="var "+$errs+" = errors;var "+$nextValid+" = true;";if($ownProperties){out+=" var "+$dataProperties+" = undefined;"}if($checkAdditional){if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Ob
17ject.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}if($someProperties){out+=" var isAdditional"+$lvl+" = !(false ";if($schemaKeys.length){if($schemaKeys.length>8){out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") "}else{var arr1=$schemaKeys;if(arr1){var $propertyKey,i1=-1,l1=arr1.length-1;while(i1<l1){$propertyKey=arr1[i1+=1];out+=" || "+$key+" == "+it.util.toQuotedString($propertyKey)+" "}}}}if($pPropertyKeys.length){var arr2=$pPropertyKeys;if(arr2){var $pProperty,$i=-1,l2=arr2.length-1;while($i<l2){$pProperty=arr2[$i+=1];out+=" || "+it.usePattern($pProperty)+".test("+$key+") "}}}out+=" ); if (isAdditional"+$lvl+") { "}if($removeAdditional=="all"){out+=" delete "+$data+"["+$key+"]; "}else{var $currentErrorPath=it.errorPath;var $additionalProperty="' + "+$key+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers)}if($noAdditional){if($removeAdditional){out+=" delete "+$data+"["+$key+"]; "}else{out+=" "+$nextValid+" = false; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalProperties";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"additionalProperties"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { additionalProperty: '"+$additionalProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is an invalid additional property"}else{out+="should NOT have additional properties"}out+="' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$errSchemaPath=$currErrSchemaPath;if($breakOnError){out+=" break; "}}}else if($additionalIsSchema){if($removeAdditional=="failing"){out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.schema=$aProperties;$it.schemaPath=it.schemaPath+".additionalProperties";$it.errSchemaPath=it.errSchemaPath+"/additionalProperties";$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" if (!"+$nextValid+") { errors = "+$errs+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+$data+"["+$key+"]; } ";it.compositeRule=$it.compositeRule=$wasComposite}else{$it.schema=$aProperties;$it.schemaPath=it.schemaPath+".additionalProperties";$it.errSchemaPath=it.errSchemaPath+"/additionalProperties";$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}}}it.errorPath=$currentErrorPath}if($someProperties){out+=" } "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}var $useDefaults=it.opts.useDefaults&&!it.compositeRule;if($schemaKeys.length){var arr3=$schemaKeys;if(arr3){var $propertyKey,i3=-1,l3=arr3.length-1;while(i3<l3){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sc
vendor: 8,780 bytes, line 17
17h.default!==undefined;$it.schema=$sch;$it.schemaPath=$schemaPath+$prop;$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey);$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers);$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault){out+=" "+$code+" "}else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$errSchemaPath=$currErrSchemaPath;it.errorPath=$currentErrorPath;out+=" } else { "}else{if($breakOnError){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = true; } else { "}else{out+=" if ("+$useData+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=" ) { "}}out+=" "+$code+" } "}}if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4){var $pProperty,i4=-1,l4=arr4.length-1;while(i4<l4){$pProperty=arr4[i4+=1];var $sch=$pProperties[$pProperty];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0||$sch===false:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty);$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty);if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } ";if($breakOnError){out+=" else "+$nextValid+" = true; "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_propertyNames(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;out+="var "+$errs+" = errors;";if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0||$schema===false:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;if($ownProperties){out+=" var "+$dataProperties+" = undefined; "}if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key;var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}it.compositeRule=$it.compositeRule=$wasComposite;out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"<errors; "+$i+"++) { vErrors["+$i+"].propertyName = "+$key+"; } var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"propertyNames"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { propertyName: '"+$invalidName+"' } ";if(it.opts.messages!==false){out+=" , message: 'property name \\'"+$invalidName+"\\' is invalid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}if($breakOnError){out+=" break; "}out+=" } }"}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_required(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $vSchema="schema"+$lvl;if(!$isData){if($schema.length<it.opts.loopRequired&&it.schema.properties&&Object.keys(it.schema.properties).length){var $required=[];var arr1=$schema;if(arr1){var $property,i1=-1,l1=arr1.length-1;while(i1<l1){$property=arr1[i1+=1];var $propertySch=it.schema.properties[$property];if(!($propertySch&&(it.opts.strictKeywords?typeof $propertySch=="object"&&Object.keys($propertySch).length>0||$propertySch===false:it.util.schemaHasRules($propertySch,it.RULES.all)))){$required[$required.length]=$property}}}}else{var $required=$schema}}if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError){out+=" var missing"+$lvl+"; ";if($loopRequired){if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; "}var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)}out+=" var "+$valid+" = true; ";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length;
17 "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "}out+="; if (!"+$valid+") break; } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2){var $propertyKey,$i=-1,l2=arr2.length-1;while($i<l2){$propertyKey=arr2[$i+=1];if($i){out+=" || "}var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}}out+=") { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,true):$currentErrorPath+" + "+$propertyPath}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { "}}else{if($loopRequired){if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; "}var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)}if($isData){out+=" if ("+$vSchema+" && !Array.isArray("+$vSchema+")) { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+$vSchema+" !== undefined) { "}out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length;
17 "+$i+"++) { if ("+$data+"["+$vSchema+"["+$i+"]] === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "}out+=") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ";if($isData){out+=" } "}}else{var arr3=$required;if(arr3){var $propertyKey,i3=-1,l3=arr3.length-1;while(i3<l3){$propertyKey=arr3[i3+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}}it.errorPath=$currentErrorPath}else if($breakOnError){out+=" if (true) {"}return out}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_uniqueItems(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(($schema||$isData)&&it.opts.uniqueItems!==false){if($isData){out+=" var "+$valid+"; if ("+$schemaValue+" === false || "+$schemaValue+" === undefined) "+$valid+" = true; else if (typeof "+$schemaValue+" != 'boolean') "+$valid+" = false; else { "}out+=" var i = "+$data+".length , "+$valid+" = true , j; if (i > 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0)){out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } "}else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",it.opts.strictNumbers,true)+") continue; ";if($typeIsArray){out+=" if (typeof item == 'string') item = '\"' + item; "}out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},function(module,exports,__webpack_require__){"use strict";var KEYWORDS=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];module.exports=function(metaSchema,keywordsJsonPointers){for(var i=0;i<keywordsJsonPointers.length;i++){metaSchema=JSON.parse(JSON.stringify(metaSchema));var segments=keywordsJsonPointers[i].split("/");var keywords=metaSchema;var j;for(j=1;j<segments.length;j++)keywords=keywords[segments[j]];for(j=0;j<KEYWORDS.length;j++){var key=KEYWORDS[j];var schema=keywords[key];if(schema){keywords[key]={anyOf:[schema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}}return metaSchema}},function(module,exports,__webpack_require__){"use strict";var MissingRefError=__webpack_require__(124).MissingRef;module.exports=compileAsync;function compileAsync(schema,meta,callback){var self=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof meta=="function"){callback=meta;meta=undefined}var p=loadMetaSchemaOf(schema).then((function(){var schemaObj=self._addSchema(schema,undefined,meta);return schemaObj.validate||_compileAsync(schemaObj)}));if(callback){p.then((function(v){callback(null,v)}),callback)}return p;function loadMetaSchemaOf(sch){var $schema=sch.$schema;return $schema&&!self.getSchema($schema)?compileAsync.call(self,{$ref:$schema},true):Promise.resolve()}function _compileAsync(schemaObj){try{return self._compile(schemaObj)}catch(e){if(e instanceof MissingRefError)return loadMissingSchema(e);throw e}function loadMissingSchema(e){var ref=e.missingSchema;if(added(ref))throw new Error("Schema "+ref+" is loaded but "+e.missingRef+" cannot be resolved");var schemaPromise=self._loadingSchemas[ref];if(!schemaPromise){schemaPromise=self._loadingSchemas[ref]=self._opts.loadSchema(ref);schemaPromise.then(removePromise,removePromise)}return schemaPromise.then((function(sch){if(!added(ref)){return loadMetaSchemaOf(sch).then((function(){if(!added(ref))self.addSchema(sch,ref,undefined,meta)}))}})).then((function(){return _compileAsync(schemaObj)}));function removePromise(){delete self._loadingSchemas[ref]}function added(ref){return self._refs[ref]||self._schemas[ref]}}}}},function(module,exports,__webpack_require__){"use strict";var IDENTIFIER=/^[a-z_$][a-z0-9_$-]*$/i;
vendor: 6,899 bytes, line 17
17var customRuleCode=__webpack_require__(581);var definitionSchema=__webpack_require__(582);module.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(keyword,definition){var RULES=this.RULES;if(RULES.keywords[keyword])throw new Error("Keyword "+keyword+" is already defined");if(!IDENTIFIER.test(keyword))throw new Error("Keyword "+keyword+" is not a valid identifier");if(definition){this.validateKeyword(definition,true);var dataType=definition.type;if(Array.isArray(dataType)){for(var i=0;i<dataType.length;i++)_addRule(keyword,dataType[i],definition)}else{_addRule(keyword,dataType,definition)}var metaSchema=definition.metaSchema;if(metaSchema){if(definition.$data&&this._opts.$data){metaSchema={anyOf:[metaSchema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}definition.validateSchema=this.compile(metaSchema,true)}}RULES.keywords[keyword]=RULES.all[keyword]=true;function _addRule(keyword,dataType,definition){var ruleGroup;for(var i=0;i<RULES.length;i++){var rg=RULES[i];if(rg.type==dataType){ruleGroup=rg;break}}if(!ruleGroup){ruleGroup={type:dataType,rules:[]};RULES.push(ruleGroup)}var rule={keyword:keyword,definition:definition,custom:true,code:customRuleCode,implements:definition.implements};ruleGroup.rules.push(rule);RULES.custom[keyword]=rule}return this}function getKeyword(keyword){var rule=this.RULES.custom[keyword];return rule?rule.definition:this.RULES.keywords[keyword]||false}function removeKeyword(keyword){var RULES=this.RULES;delete RULES.keywords[keyword];delete RULES.all[keyword];delete RULES.custom[keyword];for(var i=0;i<RULES.length;i++){var rules=RULES[i].rules;for(var j=0;j<rules.length;j++){if(rules[j].keyword==keyword){rules.splice(j,1);break}}}return this}function validateKeyword(definition,throwError){validateKeyword.errors=null;var v=this._validateKeyword=this._validateKeyword||this.compile(definitionSchema,true);if(v(definition))return true;validateKeyword.errors=v.errors;if(throwError)throw new Error("custom keyword definition is invalid: "+this.errorsText(v.errors));else return false}},function(module,exports,__webpack_require__){"use strict";module.exports=function generate_custom(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="";var $compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{$ruleValidate=it.useCustomRule($rule,$schema,it.schema,it);if(!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath;$validateCode=$ruleValidate.code;$compile=$rDef.compile;$inline=$rDef.inline;$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if(!($inline||$macro)){out+=""+$ruleErrs+" = null;"}out+="var "+$errs+" = errors;var "+$valid+";";if($isData&&$rDef.$data){$closingBraces+="}";out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ";if($validateSchema){$closingBraces+="}";out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { "}}if($inline){if($rDef.statements){out+=" "+$ruleValidate.validate+" "}else{out+=" "+$valid+" = "+$ruleValidate.validate+"; "}}else if($macro){var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate;$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out);out="";out+=" "+$validateCode+".call( ";if(it.opts.passContext){out+="this"}else{out+="self"}if($compile||$rDef.schema===false){out+=" , "+$data+" "}else{out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" "}out+=" , (dataPath || '')";if(it.errorPath!='""'){out+=" + "+it.errorPath}var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop();if($rDef.errors===false){out+=" "+$valid+" = ";if($asyncKeyword){out+="await "}out+=""+def_callRuleValidate+"; "}else{if($asyncKeyword){$ruleErrs="customErrors"+$lvl;out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "}else{out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}}}if($rDef.modifying){out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"}out+=""+$closingBraces;if($rDef.valid){if($breakOnError){out+=" if (true) { "}}else{out+=" if ( ";if($rDef.valid===undefined){out+=" !";if($macro){out+=""+$nextValid}else{out+=""+$valid}}else{out+=" "+!$rDef.valid+" "}out+=") { ";$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ";if(it.opts.messages!==false){out+=" , message: 'should pass \""+$rule.keyword+"\" keyword validation' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var def_customError=out;out=$$outStack.pop();if($inline){if($rDef.errors){if($rDef.errors!="full"){out+=" for (var "+$i+"="+$errs+"; "+$i+"<errors;
17 "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ';if(it.opts.verbose){out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "}out+=" } "}}else{if($rDef.errors===false){out+=" "+def_customError+" "}else{out+=" if ("+$errs+" == errors) { "+def_customError+" } else { for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ';if(it.opts.verbose){out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "}out+=" } } "}}}else if($macro){out+=" var err = ";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ";if(it.opts.messages!==false){out+=" , message: 'should pass \""+$rule.keyword+"\" keyword validation' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}}else{if($rDef.errors===false){out+=" "+def_customError+" "}else{out+=" if (Array.isArray("+$ruleErrs+")) { if (vErrors === null) vErrors = "+$ruleErrs+"; else vErrors = vErrors.concat("+$ruleErrs+"); errors = vErrors.length; for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; ';if(it.opts.verbose){out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "}out+=" } } else { "+def_customError+" } "}}out+=" } ";if($breakOnError){out+=" else { "}}return out}},function(module,exports,__webpack_require__){"use strict";var metaSchema=__webpack_require__(158);module.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:metaSchema.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:metaSchema.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},function(module){module.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(585);case"v7light":return __webpack_require__(587);case"v8dark":return __webpack_require__(589);case"v8light":return __webpack_require__(591);case"v9dark":return __webpack_require__(593);case"v9light":return __webpack_require__(595)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(586);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(588);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(590);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(592);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(594);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(596);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.index-mapping-tree .euiTreeView__node{max-height:unset;line-height:unset}.index-mapping-tree .euiTreeView__nodeInner{height:auto;padding:4px 0;margin-top:4px;margin-bottom:4px}.ism-index-mappings-field-line>*{margin-right:8px;vertical-align:middle}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(598);case"v7light":return __webpack_require__(600);case"v8dark":return __webpack_require__(602);case"v8light":return __webpack_require__(604);case"v9dark":return __webpack_require__(606);case"v9light":return __webpack_require__(608)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(599);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(601);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(603);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(605);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(607);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(609);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-notifications-first-letter-uppercase::first-letter{text-transform:uppercase}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){switch(window.__osdThemeTag__){case"v7dark":return __webpack_require__(611);case"v7light":return __webpack_require__(613);case"v8dark":return __webpack_require__(615);case"v8light":return __webpack_require__(617);case"v9dark":return __webpack_require__(619);case"v9light":return __webpack_require__(621)}},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(612);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#1ba9f5}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#f66}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(614);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#006bb4}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#bd271e}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(616);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#159d8d}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#f66}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(618);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#07827e}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#bd271e}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(620);
17content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#0097d1}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#cd5d56}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,exports,__webpack_require__){var api=__webpack_require__(11);var content=__webpack_require__(622);content=content.__esModule?content.default:content;if(typeof content==="string"){content=[[module.i,content,""]]}var options={};options.insert="head";options.singleton=false;var update=api(content,options);module.exports=content.locals||{}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);var ___CSS_LOADER_EXPORT___=_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,"/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n.ISM-component-templates-table .euiTableRow:hover .icon-hover-info{color:#0268bc}.ISM-component-templates-table .euiTableRow:hover .icon-hover-danger{color:#c43d35}\n",""]);__webpack_exports__["default"]=___CSS_LOADER_EXPORT___},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,"Action",(function(){return interfaces["Action"]}));__webpack_require__.d(__webpack_exports__,"UIAction",(function(){return interfaces["UIAction"]}));__webpack_require__.d(__webpack_exports__,"plugin",(function(){return public_plugin}));var external_osdSharedDeps_OsdI18n_=__webpack_require__(5);var core_public=__webpack_require__(174);var external_osdSharedDeps_React_=__webpack_require__(0);var external_osdSharedDeps_React_default=__webpack_require__.n(external_osdSharedDeps_React_);var external_osdSharedDeps_ReactDom_=__webpack_require__(23);var external_osdSharedDeps_ReactDom_default=__webpack_require__.n(external_osdSharedDeps_ReactDom_);var external_osdSharedDeps_OsdI18nReact_=__webpack_require__(21);var external_osdSharedDeps_Rxjs_=__webpack_require__(10);var external_osdSharedDeps_RxjsOperators_=__webpack_require__(9);var url_url=__webpack_require__(27);var url_default=__webpack_require__.n(url_url);var external_osdSharedDeps_ElasticEui_=__webpack_require__(1);var utils_mount=__webpack_require__(58);const OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/";const GITHUB_CREATE_ISSUE_LINK="https://github.com/opensearch-project/OpenSearch-Dashboards/issues/new/choose";let RightNavigationOrder=function(RightNavigationOrder){RightNavigationOrder[RightNavigationOrder["Settings"]=10]="Settings";RightNavigationOrder[RightNavigationOrder["DevTool"]=20]="DevTool";return RightNavigationOrder}({});let HeaderControlsContainer=function(HeaderControlsContainer){HeaderControlsContainer["LEFT"]="left";HeaderControlsContainer["CENTER"]="center";HeaderControlsContainer["RIGHT"]="right";HeaderControlsContainer["BADGE"]="badge";HeaderControlsContainer["DESCRIPTION"]="description";HeaderControlsContainer["BOTTOM"]="bottom";return HeaderControlsContainer}({});let HeaderVariant=function(HeaderVariant){HeaderVariant["PAGE"]="page";HeaderVariant["APPLICATION"]="application";return HeaderVariant}({});var external_osdSharedDeps_Lodash_=__webpack_require__(3);function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const defaultTitle=[];const titleSeparator=" - ";class doc_title_service_DocTitleService{constructor(){_defineProperty(this,"document",{title:""});_defineProperty(this,"baseTitle","")}start(_ref){let{document:document}=_ref;this.document=document;this.baseTitle=document.title;return{change:title=>{this.applyTitle(title)},reset:()=>{this.applyTitle(defaultTitle)}}}applyTitle(title){this.document.title=this.render(title)}render(title){const parts=[...Object(external_osdSharedDeps_Lodash_["isString"])(title)?[title]:title,this.baseTitle];return Object(external_osdSharedDeps_Lodash_["compact"])(Object(external_osdSharedDeps_Lodash_["flatten
17Deep"])(parts)).join(titleSeparator)}}function nav_controls_service_defineProperty(e,r,t){return(r=nav_controls_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nav_controls_service_toPropertyKey(t){var i=nav_controls_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function nav_controls_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class nav_controls_service_NavControlsService{constructor(){nav_controls_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["ReplaySubject"](1))}start(){const navControlsLeft$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsRight$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsCenter$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsExpandedRight$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsExpandedCenter$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsLeftBottom$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const navControlsPrimaryHeaderRight$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);return{registerLeft:navControl=>navControlsLeft$.next(new Set([...navControlsLeft$.value.values(),navControl])),registerRight:navControl=>navControlsRight$.next(new Set([...navControlsRight$.value.values(),navControl])),registerCenter:navControl=>navControlsCenter$.next(new Set([...navControlsCenter$.value.values(),navControl])),registerExpandedRight:navControl=>navControlsExpandedRight$.next(new Set([...navControlsExpandedRight$.value.values(),navControl])),registerExpandedCenter:navControl=>navControlsExpandedCenter$.next(new Set([...navControlsExpandedCenter$.value.values(),navControl])),registerLeftBottom:navControl=>navControlsLeftBottom$.next(new Set([...navControlsLeftBottom$.value.values(),navControl])),registerPrimaryHeaderRight:navControl=>navControlsPrimaryHeaderRight$.next(new Set([...navControlsPrimaryHeaderRight$.value.values(),navControl])),getLeft$:()=>navControlsLeft$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getRight$:()=>navControlsRight$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getCenter$:()=>navControlsCenter$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getExpandedRight$:()=>navControlsExpandedRight$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getExpandedCenter$:()=>navControlsExpandedCenter$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getLeftBottom$:()=>navControlsLeftBottom$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),getPrimaryHeaderRight$:()=>navControlsPrimaryHeaderRight$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(controls=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...controls.values()],"order")),Ob
17ject(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$))}}stop(){this.stop$.next()}}var pick=__webpack_require__(624);function nav_link_defineProperty(e,r,t){return(r=nav_link_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nav_link_toPropertyKey(t){var i=nav_link_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function nav_link_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class nav_link_NavLinkWrapper{constructor(properties){nav_link_defineProperty(this,"id",void 0);nav_link_defineProperty(this,"properties",void 0);if(!properties||!properties.id){throw new Error("`id` is required.")}this.id=properties.id;this.properties=Object.freeze(properties)}update(newProps){newProps=Object(pick["a"])(newProps,["disabled","hidden","url","href"]);return new nav_link_NavLinkWrapper({...this.properties,...newProps})}}var node_modules_history=__webpack_require__(51);var external_osdSharedDeps_ReactRouterDom_=__webpack_require__(18);var useObservable=__webpack_require__(22);var useObservable_default=__webpack_require__.n(useObservable);let AppStatus=function(AppStatus){AppStatus[AppStatus["accessible"]=0]="accessible";AppStatus[AppStatus["inaccessible"]=1]="inaccessible";return AppStatus}({});let AppNavLinkStatus=function(AppNavLinkStatus){AppNavLinkStatus[AppNavLinkStatus["default"]=0]="default";AppNavLinkStatus[AppNavLinkStatus["visible"]=1]="visible";AppNavLinkStatus[AppNavLinkStatus["disabled"]=2]="disabled";AppNavLinkStatus[AppNavLinkStatus["hidden"]=3]="hidden";return AppNavLinkStatus}({});let WorkspaceAvailability=function(WorkspaceAvailability){WorkspaceAvailability[WorkspaceAvailability["outsideWorkspace"]=2]="outsideWorkspace";WorkspaceAvailability[WorkspaceAvailability["insideWorkspace"]=1]="insideWorkspace";return WorkspaceAvailability}({});let AppLeaveActionType=function(AppLeaveActionType){AppLeaveActionType["confirm"]="confirm";AppLeaveActionType["default"]="default";return AppLeaveActionType}({});const AppNotFound=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{style:{minHeight:"100%"},"data-test-subj":"appNotFoundPageContent"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],{component:"main"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageContent"],{verticalPosition:"center",horizontalPosition:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{iconType:"alert",iconColor:"danger",title:external_osdSharedDeps_React_default.a.createElement("h2",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.application.appNotFound.title",defaultMessage:"Application Not Found"})),body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.application.appNotFound.pageDescription",defaultMessage:"No application was found at this URL. Try going back or choosing an app from the menu."})))}))));var app_container=__webpack_require__(227);const AppContainer=_ref=>{let{mounter:mounter,appId:appId,appPath:appPath,setAppLeaveHandler:setAppLeaveHandler,setAppActionMenu:setAppActionMenu,setAppLeftControls:setAppLeftControls,setAppCenterControls:setAppCenterControls,setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls,setAppDescriptionControls:setAppDescriptionControls,setAppBottomControls:setAppBottomControls,createScopedHistory:createScopedHistory,appStatus:appStatus,setIsMounting:setIsMounting}=_ref;const[showSpinner,setShowSpinner]=Object(external_osdSharedDeps_React_["useState"])(true);const[appNotFound,setAppNotFound]=Object(external_osdSharedDeps_React_["useState"])(false);const elementRef=Object(external_osdSharedDeps_React_["useRef"])(null);const unmountRef=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>{const unmount=()=>{if(unmountRef.current){unmountRef.current();unmountRef.current=null}};if(!mounter||appStatus!==AppStatus.accessible){return setAppNotFound(true)}setAppNotFound(false);setIsMounting(true);if(mounter.unmountBeforeMounting){unmount()}const mount=async()=>{setShowSpinner(true);try{unmountRef.current=await mounter.mount({appBasePath:mounter.appBasePath,history:createScopedHistory(appPath),element:elementRef.current,onAppLeave:handler=>setAppLeaveHandler(appId,handler),setHeaderActionMenu:menuMount=>setAppActionMenu(appId,menuMount),setHeaderLeftControls:menuMount=>setAppLeftControls(appId,menuMount),setHeaderCenterControls:menuMount=>setAppCenterControls(appId,menuMount),setHeaderRightControls:menuMount=>setAppRightControls(appId,menuMount),setHeaderBadgeControls:menuMount=>setAppBadgeControls(appId,menuMount),setHeaderDescriptionControls:menuMount=>setAppDescriptionControls(appId,menuMount),setHeaderBottomControls:menuMount=>setAppBottomControls(appId,menuMount)})||null}catch(e){console.error(e)}finally{if(elementRef.current){setShowSpinner(false);setIsMounting(false)}}};mount();return unmount},[appId,appStatus,mounter,createScopedHistory,setAppLeaveHandler,setAppActionMenu,setAppLeftControls,setAppRightControls,setAppCenterControls,setAppBadgeControls,setAppDescriptionControls,setAppBottomControls,appPath,setIsMounting]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,appNotFound&&external_osdSharedDeps_React_default.a.createElement(AppNotFound,null),showSpinner&&external_osdSharedDeps_React_default.a.createElement("div",{className:"appContainer__loading"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{"aria-label":"Loading application",size:"xl"})),external_osdSharedDeps_React_default.a.createElement("div",{key:appId,ref:elementRef}))};function scoped_history_defineProperty(e,r,t){return(r=scoped_history_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function scoped_history_toPropertyKey(t){var i=scoped_history_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function scoped_history_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ScopedHistory{constructor(parentHistory,basePath){var _this=this;this.parentHistory=parentHistory;this.basePath=basePath;scoped_history_defineProperty(this,"isActive",true);scoped_history_defineProperty(this,"listeners",new Set);scoped_history_defineProperty(this,"locationKeys",[]);scoped_history_defineProperty(this,"currentLocationKeyIndex",0);scoped_history_defineProperty(this,"createSubHistory",basePath=>new ScopedHistory(this,basePath));scoped_history_defineProperty(this,"push",(pathOrLocation,state)=>{this.verifyActive();if(typeof pathOrLocation==="string"){this.parentHistory.push(this.prependBasePath(pathOrLocation),state)}else{this.parentHistory.push(this.prependBasePath(pathOrLocation))}});scoped_history_defineProperty(this,"replace",(pathOrLocation,state)=>{this.verifyActive();if(typeof pathOrLocation==="string"){this.parentHistory.replace(this.prependBasePath(pathOrLocation),state)}else{this.parentHistory.replace(this.prependBasePath(pathOrLocation))}});scoped_history_defineProperty(this,"go",n=>{this.verifyActive();if(n===0){this.parentHistory.go(n)}else if(n<0){if(this.currentLocationKeyIndex+1+n>=1){this.parentHistory.go(n)}}else if(n<=this.currentLocationKeyIndex+this.locationKeys.length-1){this.parentHistory.go(n)}});scoped_history_defineProperty(this,"goBack",()=>{this.verifyActive();this.go(-1)});scoped_history_defineProperty(this,"goForward",()=>{this.verifyActive();this.go(1)});scoped_history_defineProperty(this,"block",prompt=>{throw new Error(`history.block is not supported. Please use the AppMountParameters.onAppLeave API.`)});scoped_history_defineProperty(this,"listen",listener=>{this.verifyActive();this.listeners.add(listener);return()=>{this.listeners.delete(listener)}});scoped_history_defineProperty(this,"createHref",(function(location){let{prependBasePath:prependBasePath=true}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_this.verifyActive();if(prependBasePath){location=_this.prependBasePath(location);if(location.pathname===undefined){location.pathname=_this.basePath}}return _this.parentHistory.createHref(location)}));const parentPath=this.parentHistory.location.pathname;if(!parentPath.startsWith(basePath)){throw new Error(`Browser location [${parentPath}] is not currently in expected basePath [${basePath}]`)}this.locationKeys.push(this.parentHistory.location.key);this.setupHistoryListener()}get length(){this.verifyActive();return this.locationKeys.length}get location(){this.verifyActive();return this.stripBasePath(this.parentHistory.location)}get action(){this.verifyActive();return this.parentHistory.action}prependBasePath(pathOrLocation){if(typeof pathOrLocation==="string"){return this.prependBasePathToString(pathOrLocation)}else{return{...pathOrLocation,pathname:pathOrLocation.pathname!==undefined?this.prependBasePathToString(pathOrLocation.pathname):undefined}}}prependBasePathToString(path){return path.length?`${this.basePath}/${path}`.replace(/\/{2,}/g,"/"):this.basePath}stripBasePath(location){return{...location,pathname:location.pathname.replace(new RegExp(`^${this.basePath}`),"")}}verifyActive(){if(!this.isActive){throw new Error(`ScopedHistory instance has fell out of navigation scope for basePath: ${this.basePath}`)}}setupHistoryListener(){const unlisten=this.parentHistory.listen((location,action)=>
17{if(!location.pathname.startsWith(this.basePath)){unlisten();this.isActive=false;return}if(action==="PUSH"){this.locationKeys=[...this.locationKeys.slice(0,this.currentLocationKeyIndex+1),location.key];this.currentLocationKeyIndex=this.locationKeys.indexOf(location.key)}else if(action==="POP"){this.currentLocationKeyIndex=this.locationKeys.indexOf(location.key)}else if(action==="REPLACE"){this.locationKeys[this.currentLocationKeyIndex]=location.key}else{throw new Error(`Unrecognized history action: ${action}`)}[...this.listeners].forEach(listener=>{listener(this.stripBasePath(location),action)})})}}const AppRouter=_ref=>{let{history:history,mounters:mounters,setAppLeaveHandler:setAppLeaveHandler,setAppActionMenu:setAppActionMenu,setAppLeftControls:setAppLeftControls,setAppCenterControls:setAppCenterControls,setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls,setAppDescriptionControls:setAppDescriptionControls,setAppBottomControls:setAppBottomControls,appStatuses$:appStatuses$,setIsMounting:setIsMounting}=_ref;const appStatuses=useObservable_default()(appStatuses$,new Map);const createScopedHistory=Object(external_osdSharedDeps_React_["useMemo"])(()=>appPath=>new ScopedHistory(history,appPath),[history]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Router"],{history:history},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Switch"],null,[...mounters].map(_ref2=>{let[appId,mounter]=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{key:mounter.appRoute,path:mounter.appRoute,exact:mounter.exactRoute,render:_ref3=>{var _appStatuses$get;let{match:{path:path}}=_ref3;return external_osdSharedDeps_React_default.a.createElement(AppContainer,{appPath:path,appStatus:(_appStatuses$get=appStatuses.get(appId))!==null&&_appStatuses$get!==void 0?_appStatuses$get:AppStatus.inaccessible,createScopedHistory:createScopedHistory,appId:appId,mounter:mounter,setAppLeaveHandler:setAppLeaveHandler,setAppLeftControls:setAppLeftControls,setAppCenterControls:setAppCenterControls,setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls,setAppDescriptionControls:setAppDescriptionControls,setAppBottomControls:setAppBottomControls,setAppActionMenu:setAppActionMenu,setIsMounting:setIsMounting})}})}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ReactRouterDom_["Route"],{path:"/app/:appId",render:_ref4=>{var _appStatuses$get2;let{match:{params:{appId:appId},url:url}}=_ref4;const[id,mounter]=mounters.has(appId)?[appId,mounters.get(appId)]:[];return external_osdSharedDeps_React_default.a.createElement(AppContainer,{appPath:url,appId:id!==null&&id!==void 0?id:appId,appStatus:(_appStatuses$get2=appStatuses.get(appId))!==null&&_appStatuses$get2!==void 0?_appStatuses$get2:AppStatus.inaccessible,createScopedHistory:createScopedHistory,mounter:mounter,setAppLeaveHandler:setAppLeaveHandler,setAppLeftControls:setAppLeftControls,setAppCenterControls:setAppCenterControls,setAppRightControls:setAppRightControls,setAppBadgeControls:setAppBadgeControls,setAppDescriptionControls:setAppDescriptionControls,setAppBottomControls:setAppBottomControls,setAppActionMenu:setAppActionMenu,setIsMounting:setIsMounting})}})))};var types_capabilities=__webpack_require__(70);function deepFreeze(object){for(const value of Object.values(object)){if(value!==null&&typeof value==="object"){deepFreeze(value)}}return Object.freeze(object)}class capabilities_service_CapabilitiesService{async start(_ref){let{appIds:appIds,http:http}=_ref;const capabilities=await http.post("/api/core/capabilities",{body:JSON.stringify({applications:appIds})});return{capabilities:deepFreeze(capabilities)}}}const appLeaveActionFactory={confirm(text,title,callback){return{type:AppLeaveActionType.confirm,text:text,title:title,callback:callback}},default(){return{type:AppLeaveActionType.default}}};function isConfirmAction(action){return action.type===AppLeaveActionType.confirm}function getLeaveAction(handler){if(!handler){return appLeaveActionFactory.default()}return handler(appLeaveActionFactory)}const removeSlashes=function(url){let{trailing:trailing=false,leading:leading=false,duplicates:duplicates=true}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(duplicates){url=url.replace(/\/{2,}/g,"/")}if(trailing){url=url.replace(/\/$/,"")}if(leading){url=url.replace(/^\//,"")}return url};const appendAppPath=function(appBasePath){let path=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";path=path===""||path.startsWith("#")||path.startsWith("?")?path:`/${path}`;const removeTrailing=path.indexOf("#")===-1&&appBasePath.indexOf("#")===-1;return removeSlashes(`${appBasePath}${path}`,{trailing:removeTrailing,duplicates:true,leading:false})};function getAppInfo(app){const navLinkStatus=app.navLinkStatus===AppNavLinkStatus.default?app.status===AppStatus.inaccessible?AppNavLinkStatus.hidden:AppNavLinkStatus.visible:app.navLinkStatus;const{updater$:updater$,mount:mount,...infos}=app;return{...infos,status:app.status,navLinkStatus:navLinkStatus,appRoute:app.appRoute}}function modifyUrl(url,urlModifier){const parsed=Object(url_url["parse"])(url,true);const meaningfulParts={auth:parsed.auth,hash:parsed.hash,hostname:parsed.hostname,pathname:parsed.pathname,port:parsed.port,protocol:parsed.protocol,query:p
17arsed.query||{},slashes:parsed.slashes};const modifiedParts=urlModifier(meaningfulParts)||meaningfulParts;return Object(url_url["format"])({auth:modifiedParts.auth,hash:modifiedParts.hash,hostname:modifiedParts.hostname,pathname:modifiedParts.pathname,port:modifiedParts.port,protocol:modifiedParts.protocol,query:modifiedParts.query,slashes:modifiedParts.slashes})}function isRelativeUrl(candidatePath){const all=Object(url_url["parse"])(candidatePath,false,true);const{protocol:protocol,hostname:hostname,port:port}=all;if(protocol!==null||hostname!==null||port!==null){return false}return true}function getUrlOrigin(url){const obj=Object(url_url["parse"])(url);if(!obj.protocol&&!obj.hostname){return null}return`${obj.protocol}//${obj.hostname}${obj.port?`:${obj.port}`:""}`}const parseAppUrl=function(url,basePath,apps){let currentUrl=arguments.length>3&&arguments[3]!==undefined?arguments[3]:window.location.href;const currentOrigin=getUrlOrigin(currentUrl);if(!currentOrigin){throw new Error("when manually provided, currentUrl must be valid url with an origin")}const currentPath=currentUrl.substring(currentOrigin.length);if(url.startsWith(currentOrigin)){url=url.substring(currentOrigin.length)}if(!url.startsWith("/")){url=Object(url_url["resolve"])(currentPath,url)}const basePathValue=basePath.get();if(basePathValue&&!url.startsWith(basePathValue)){return undefined}url=basePath.remove(url);if(!url.startsWith("/")){return undefined}for(const app of apps.values()){const appPath=app.appRoute||`/app/${app.id}`;if(url.startsWith(appPath)){const path=url.substr(appPath.length);return{app:app.id,path:path.length?path:undefined}}}};const relativeToAbsolute=url=>{const a=document.createElement("a");a.setAttribute("href",url);return a.href};function application_service_defineProperty(e,r,t){return(r=application_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function application_service_toPropertyKey(t){var i=application_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function application_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const isAppMountDeprecated=mount=>mount.length===2;function filterAvailable(m,capabilities){return new Map([...m].filter(_ref=>{let[id]=_ref;return capabilities.navLinks[id]===undefined||capabilities.navLinks[id]===true}))}const findMounter=(mounters,appRoute)=>[...mounters].find(_ref2=>{let[,mounter]=_ref2;return mounter.appRoute===appRoute});const getAppUrl=function(mounters,appId){var _mounters$get;let path=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";const appBasePath=(_mounters$get=mounters.get(appId))!==null&&_mounters$get!==void 0&&_mounters$get.appRoute?`/${mounters.get(appId).appRoute}`:`/app/${appId}`;return appendAppPath(appBasePath,path)};const allApplicationsFilter="__ALL__";class application_service_ApplicationService{constructor(){application_service_defineProperty(this,"apps",new Map);application_service_defineProperty(this,"mounters",new Map);application_service_defineProperty(this,"capabilities",new capabilities_service_CapabilitiesService);application_service_defineProperty(this,"appInternalStates",new Map);application_service_defineProperty(this,"currentAppId$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentActionMenu$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentLeftControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentCenterControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentRightControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentBadgeControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentDescriptionControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"currentBottomControls$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));application_service_defineProperty(this,"statusUpdaters$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Map));application_service_defineProperty(this,"subscriptions",[]);application_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["Subject"]);application_service_defineProperty(this,"registrationClosed",false);application_service_defineProperty(this,"history",void 0);application_service_defineProperty(this,"mountContext",void 0);application_service_defineProperty(this,"navigate",void 0);application_service_defineProperty(this,"redirectTo",void 0);application_service_defineProperty(this,"setAppLeaveHandler",(appId,handler)=>{var _this$appInternalStat;this.appInternalStates.set(appId,{...(_this$appInternalStat=this.appInternalStates.get(appId))!==null&&_this$appInternalStat!==void 0?_this$appInternalStat:{},leaveHandler:handler})});application_service_defineProperty(this,"setAppActionMenu",(appId,mount)=>{var _this$appInternalStat2;this.appInternalStates.set(appId,{...(_this$appInternalStat2=this.appInternalStates.get(appId))!==null&&_this$appInternalStat2!==void 0?_this$appInternalStat2:{},actionMenu:mount});this.refreshCurrentActionMenu()});application_service_defineProperty(this,"refreshCurrentActionMenu",()=>{var _this$appInternalStat3;const appId=this.currentAppId$.getValue();const currentActionMenu=appId?(_this$appInternalStat3=this.appInternalStates.get(appId))===null||_this$appInternalStat3===void 0?void 0:_this$appInternalStat3.actionMenu:undefined;this.currentActionMenu$.next(currentActionMenu)});application_service_defineProperty(this,"setAppLeftControls",(appPath,mount)=>
17this.setAppControls(appPath,mount,HeaderControlsContainer.LEFT));application_service_defineProperty(this,"setAppCenterControls",(appPath,mount)=>this.setAppControls(appPath,mount,HeaderControlsContainer.CENTER));application_service_defineProperty(this,"setAppRightControls",(appPath,mount)=>this.setAppControls(appPath,mount,HeaderControlsContainer.RIGHT));application_service_defineProperty(this,"setAppBadgeControls",(appPath,mount)=>this.setAppControls(appPath,mount,HeaderControlsContainer.BADGE));application_service_defineProperty(this,"setAppDescriptionControls",(appPath,mount)=>this.setAppControls(appPath,mount,HeaderControlsContainer.DESCRIPTION));application_service_defineProperty(this,"setAppBottomControls",(appPath,mount)=>this.setAppControls(appPath,mount,HeaderControlsContainer.BOTTOM));application_service_defineProperty(this,"setAppControls",(appPath,mount,container)=>{var _this$appInternalStat4;if(!appPath)return;this.appInternalStates.set(appPath,{...(_this$appInternalStat4=this.appInternalStates.get(appPath))!==null&&_this$appInternalStat4!==void 0?_this$appInternalStat4:{},[`${container}Controls`]:mount});this.refreshCurrentControls(container)});application_service_defineProperty(this,"refreshCurrentControls",container=>{var _this$appInternalStat5,_this$appInternalStat6,_this$appInternalStat7,_this$appInternalStat8,_this$appInternalStat9,_this$appInternalStat10;const appId=this.currentAppId$.getValue();switch(container){case HeaderControlsContainer.LEFT:return this.currentLeftControls$.next(appId?(_this$appInternalStat5=this.appInternalStates.get(appId))===null||_this$appInternalStat5===void 0?void 0:_this$appInternalStat5.leftControls:undefined);case HeaderControlsContainer.CENTER:return this.currentCenterControls$.next(appId?(_this$appInternalStat6=this.appInternalStates.get(appId))===null||_this$appInternalStat6===void 0?void 0:_this$appInternalStat6.centerControls:undefined);case HeaderControlsContainer.RIGHT:return this.currentRightControls$.next(appId?(_this$appInternalStat7=this.appInternalStates.get(appId))===null||_this$appInternalStat7===void 0?void 0:_this$appInternalStat7.rightControls:undefined);case HeaderControlsContainer.BADGE:return this.currentBadgeControls$.next(appId?(_this$appInternalStat8=this.appInternalStates.get(appId))===null||_this$appInternalStat8===void 0?void 0:_this$appInternalStat8.badgeControls:undefined);case HeaderControlsContainer.DESCRIPTION:return this.currentDescriptionControls$.next(appId?(_this$appInternalStat9=this.appInternalStates.get(appId))===null||_this$appInternalStat9===void 0?void 0:_this$appInternalStat9.descriptionControls:undefined);case HeaderControlsContainer.BOTTOM:return this.currentBottomControls$.next(appId?(_this$appInternalStat10=this.appInternalStates.get(appId))===null||_this$appInternalStat10===void 0?void 0:_this$appInternalStat10.bottomControls:undefined)}});application_service_defineProperty(this,"onBeforeUnload",event=>{var _this$appInternalStat11;const currentAppId=this.currentAppId$.value;if(currentAppId===undefined){return}const action=getLeaveAction((_this$appInternalStat11=this.appInternalStates.get(currentAppId))===null||_this$appInternalStat11===void 0?void 0:_this$appInternalStat11.leaveHandler);if(isConfirmAction(action)){event.preventDefault();event.returnValue=action.text}})}setup(_ref3){let{context:context,http:{basePath:basePath},redirectTo:redirectTo=(path=>{window.location.assign(path)}),history:history}=_ref3;const basename=basePath.get();this.history=history||Object(node_modules_history["createBrowserHistory"])({basename:basename});this.navigate=(url,state,replace)=>replace?this.history.replace(url,state):this.history.push(url,state);this.redirectTo=redirectTo;this.mountContext=context.createContextContainer();const registerStatusUpdater=(application,updater$)=>{const updaterId=Symbol();const subscription=updater$.subscribe(updater=>{const nextValue=new Map(this.statusUpdaters$.getValue());nextValue.set(updaterId,{application:application,updater:updater});this.statusUpdaters$.next(nextValue)});this.subscriptions.push(subscription)};const wrapMount=(plugin,app)=>{let handler;if(isAppMountDeprecated(app.mount)){handler=this.mountContext.createHandler(plugin,app.mount);if(false){}}else{handler=app.mount}return async params=>{this.currentAppId$.next(app.id);return handler(params)}};return{registerMountContext:this.mountContext.registerContext,register:(plugin,app)=>{var _app$status,_app$navLinkStatus,_app$exactRoute;app={appRoute:`/app/${app.id}`,...app};if(this.registrationClosed){throw new Error(`Applications cannot be registered after "setup"`)}else if(this.apps.has(app.id)){throw new Error(`An application is already registered with the id "${app.id}"`)}else if(findMounter(this.mounters,app.appRoute)){throw new Error(`An application is already registered with the appRoute "${app.appRoute}"`)}else if(basename&&app.appRoute.startsWith(`${basename}/`)){throw new Error("Cannot register an application route that includes HTTP base path")}const{updater$:updater$,...appProps}=app;this.apps.set(app.id,{...appProps,status:(_app$status=app.status)!==null&&_app$status!==void 0?_app$status:AppStatus.accessible,navLinkStatus:(_app$navLinkStatus=app.navLinkStatus)!==null&&_app$navLinkStatus!==void 0?_app$navLinkStatus:AppNavLinkStatus.default});if(updater$){registerStatusUpdater(app.id,updater$)}this.mounters.set(app.id,{appRoute:app.appRoute,appBasePath:basePath.prepend(app.appRoute),exactRoute:(_app$exactRoute=app.exactRoute)!==null&&_app$exactRoute!==void 0?_app$exactRoute:false,mount:wrapMount(plugin,app),unmountBeforeMounting:false})},registerAppUpdater:appUpdater$=>registerStatusUpdater(allApplicationsFilter,appUpdater$)}}async start(_ref4){var _this=this;let{http:http,overlays:overlays,workspaces:workspaces}=_ref4;if(!this.mountContext){throw new Error("ApplicationService#setup() must be invoked before start.")}const httpLoadingCount$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](0);http.addLoadingCountSource(httpLoadingCount$);this.registrationClosed=true;window.addEventListener("beforeunload",this.onBeforeUnload);const{capabilities:capabilities}=await this.capabilities.start({appIds:[...this.mounters.keys()],http:http});const availableMounters=filterAvailable(this.mounters,capabilities);const availableApps=filterAvailable(this.apps,capabilities);const applications$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](availableApps);this.statusUpdaters$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(statusUpdaters=>new Map([...availableApps].map(_ref5=>{let[id,app]=_ref5;return[id,updateStatus(app,[...statusUpdaters.values()])]})))).subscribe(apps=>applications$.next(apps));const applicationStatuses$=applications$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(apps=>new Map([...apps.entries()].map(_ref6=>{let[id,app]=_ref6;return[id,app.status]}))),Object(external_osdSharedDeps_RxjsOperators_["shareReplay"])(1));const navigateToApp=async function(appId){let{path:path,state:state,replace:replace=false}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const currentAppId=_this.currentAppId$.value;const navigatingToSameApp=currentAppId===appId;const shouldNavigate=navigatingToSameApp?true:await _this.shouldNavigate(overlays);
17if(shouldNavigate){const targetApp=applications$.value.get(appId);if(workspaces.currentWorkspaceId$.value&&(targetApp===null||targetApp===void 0?void 0:targetApp.workspaceAvailability)===WorkspaceAvailability.outsideWorkspace){window.location.assign(http.basePath.prepend(getAppUrl(availableMounters,appId,path),{withoutClientBasePath:true}));return}if(path===undefined){var _applications$$value$;path=(_applications$$value$=applications$.value.get(appId))===null||_applications$$value$===void 0?void 0:_applications$$value$.defaultPath}if(!navigatingToSameApp){_this.appInternalStates.delete(_this.currentAppId$.value)}_this.navigate(getAppUrl(availableMounters,appId,path),state,replace);_this.currentAppId$.next(appId)}};this.currentAppId$.subscribe(()=>this.refreshCurrentActionMenu());this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.LEFT));this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.CENTER));this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.RIGHT));this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.BADGE));this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.DESCRIPTION));this.currentAppId$.subscribe(()=>this.refreshCurrentControls(HeaderControlsContainer.BOTTOM));return{applications$:applications$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(apps=>new Map([...apps.entries()].map(_ref7=>{let[id,app]=_ref7;return[id,getAppInfo(app)]}))),Object(external_osdSharedDeps_RxjsOperators_["shareReplay"])(1)),capabilities:capabilities,currentAppId$:this.currentAppId$.pipe(Object(external_osdSharedDeps_RxjsOperators_["filter"])(appId=>appId!==undefined),Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentActionMenu$:this.currentActionMenu$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentLeftControls$:this.currentLeftControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentCenterControls$:this.currentCenterControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentRightControls$:this.currentRightControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentBadgeControls$:this.currentBadgeControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentDescriptionControls$:this.currentDescriptionControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),currentBottomControls$:this.currentBottomControls$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setAppLeftControls:mount=>this.setAppLeftControls(this.currentAppId$.value,mount),setAppCenterControls:mount=>this.setAppCenterControls(this.currentAppId$.value,mount),setAppRightControls:mount=>this.setAppRightControls(this.currentAppId$.value,mount),setAppBadgeControls:mount=>this.setAppBadgeControls(this.currentAppId$.value,mount),setAppDescriptionControls:mount=>this.setAppDescriptionControls(this.currentAppId$.value,mount),setAppBottomControls:mount=>this.setAppBottomControls(this.currentAppId$.value,mount),history:this.history,registerMountContext:this.mountContext.registerContext,getUrlForApp:function(appId){let{path:path,absolute:absolute=false}=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const targetApp=applications$.value.get(appId);const relUrl=http.basePath.prepend(getAppUrl(availableMounters,appId,path),{withoutClientBasePath:(targetApp===null||targetApp===void 0?void 0:targetApp.workspaceAvailability)===WorkspaceAvailability.outsideWorkspace});return absolute?relativeToAbsolute(relUrl):relUrl},navigateToApp:navigateToApp,navigateToUrl:async url=>{const appInfo=parseAppUrl(url,http.basePath,this.apps);if(appInfo){return navigateToApp(appInfo.app,{path:appInfo.path})}else{return this.redirectTo(url)}},getComponent:()=>{if(!this.history){return null}return external_osdSharedDeps_React_default.a.createElement(AppRouter,{history:this.history,mounters:availableMounters,appStatuses$:applicationStatuses$,setAppLeaveHandler:this.setAppLeaveHandler,setAppActionMenu:this.setAppActionMenu,setAppLeftControls:this.setAppLeftControls,setAppCenterControls:this.setAppCenterControls,setAppRightControls:this.setAppRightControls,setAppBadgeControls:this.setAppBadgeControls,setAppDescriptionControls:this.setAppDescriptionControls,setAppBottomControls:this.setAppBottomControls,setIsMounting:isMounting=>httpLoadingCount$.next(isMounting?1:0)})}}}async shouldNavigate(overlays){var _this$appInternalStat12;const currentAppId=this.currentAppId$.value;
17if(currentAppId===undefined){return true}const action=getLeaveAction((_this$appInternalStat12=this.appInternalStates.get(currentAppId))===null||_this$appInternalStat12===void 0?void 0:_this$appInternalStat12.leaveHandler);if(isConfirmAction(action)){const confirmed=await overlays.openConfirm(action.text,{title:action.title,"data-test-subj":"appLeaveConfirmModal"});if(!confirmed){return false}if(action!==null&&action!==void 0&&action.callback){action.callback()}}return true}stop(){this.stop$.next();this.currentAppId$.complete();this.currentActionMenu$.complete();this.currentLeftControls$.complete();this.currentCenterControls$.complete();this.currentRightControls$.complete();this.currentBadgeControls$.complete();this.currentDescriptionControls$.complete();this.currentBottomControls$.complete();this.statusUpdaters$.complete();this.subscriptions.forEach(sub=>sub.unsubscribe());window.removeEventListener("beforeunload",this.onBeforeUnload)}}const updateStatus=(app,statusUpdaters)=>{let changes={};statusUpdaters.forEach(wrapper=>{if(wrapper.application!==allApplicationsFilter&&wrapper.application!==app.id){return}const fields=wrapper.updater(app);if(fields){var _changes$status,_fields$status,_changes$navLinkStatu,_fields$navLinkStatus;changes={...changes,...fields,status:Math.max((_changes$status=changes.status)!==null&&_changes$status!==void 0?_changes$status:0,(_fields$status=fields.status)!==null&&_fields$status!==void 0?_fields$status:0),navLinkStatus:Math.max((_changes$navLinkStatu=changes.navLinkStatus)!==null&&_changes$navLinkStatu!==void 0?_changes$navLinkStatu:0,(_fields$navLinkStatus=fields.navLinkStatus)!==null&&_fields$navLinkStatus!==void 0?_fields$navLinkStatus:0)}}});return{...app,...changes}};function toNavLink(app,basePath){const useAppStatus=app.navLinkStatus===AppNavLinkStatus.default;let relativeBaseUrl=basePath.prepend(app.appRoute);if(app.workspaceAvailability===WorkspaceAvailability.outsideWorkspace){relativeBaseUrl=basePath.prepend(app.appRoute,{withoutClientBasePath:true})}const url=to_nav_link_relativeToAbsolute(appendAppPath(relativeBaseUrl,app.defaultPath));const baseUrl=to_nav_link_relativeToAbsolute(relativeBaseUrl);return new nav_link_NavLinkWrapper({...app,hidden:useAppStatus?app.status===AppStatus.inaccessible:app.navLinkStatus===AppNavLinkStatus.hidden,disabled:useAppStatus?false:app.navLinkStatus===AppNavLinkStatus.disabled,baseUrl:baseUrl,href:url,url:url})}function to_nav_link_relativeToAbsolute(url){const a=document.createElement("a");a.setAttribute("href",url);return a.href}function nav_links_service_defineProperty(e,r,t){return(r=nav_links_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nav_links_service_toPropertyKey(t){var i=nav_links_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function nav_links_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class nav_links_service_NavLinksService{constructor(){nav_links_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["ReplaySubject"](1))}start(_ref){let{application:application,http:http}=_ref;const appLinks$=application.applications$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(apps=>new Map([...apps].filter(_ref2=>{let[,app]=_ref2;return!app.chromeless}).map(_ref3=>{let[appId,app]=_ref3;return[appId,toNavLink(app,http.basePath)]}))));const linkUpdaters$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]);const navLinks$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Map);Object(external_osdSharedDeps_Rxjs_["combineLatest"])([appLinks$,linkUpdaters$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref4=>{let[appLinks,linkUpdaters]=_ref4;return linkUpdaters.reduce((links,updater)=>updater(links),appLinks)})).subscribe(navlinks=>{navLinks$.next(navlinks)});const forceAppSwitcherNavigation$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](false);return{getNavLinks$:()=>navLinks$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(sortNavLinks),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),get(id){const link=navLinks$.value.get(id);return link&&link.properties},getAll(){return sortNavLinks(navLinks$.value)},has(id){return navLinks$.value.has(id)},showOnly(id){if(!this.has(id)){return}const updater=navLinks=>new Map([...navLinks.entries()].filter(_ref5=>{let[linkId]=_ref5;return linkId===id}));linkUpdaters$.next([...linkUpdaters$.value,updater])},update(id,values){if(!this.has(id)){return}const updater=navLinks=>new Map([...navLinks.entries()].map(_ref6=>{let[linkId,link]=_ref6;return[linkId,link.id===id?link.update(values):link]}));linkUpdaters$.next([...linkUpdaters$.value,updater]);return this.get(id)},enableForcedAppSwitcherNavigation(){forceAppSwitcherNavigation$.next(true)},getForceAppSwitcherNavigation$(){return forceAppSwitcherNavigation$.asObservable()}}}stop(){this.stop$.next()}}function sortNavLinks(navLinks){return Object(external_osdSharedDeps_Lodash_["sortBy"])([...navLinks.values()].map(link=>link.properties),"order")}function persisted_log_defineProperty(e,r,t){return(r=persisted_log_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function persisted_log_toPropertyKey(t){var i=persisted_log_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function persisted_log_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class persisted_log_PersistedLog{constructor(name,options){let storage=arguments.length>2&&arguments[2]!==undefined?arguments[2]:localStorage;persisted_log_defineProperty(this,"name",void 0);persisted_log_defineProperty(this,"maxLength",void 0);persisted_log_defineProperty(this,"isEqual",void 0);persisted_log_defineProperty(this,"storage",void 0);persisted_log_defineProperty(this,"items$",void 0);this.name=name;this.maxLength=typeof options.maxLength==="string"?this.maxLength=parseInt(options.maxLength,10):options.maxLength;this.isEqual=options.isEqual||external_osdSharedDeps_Lodash_["isEqual"];this.storage=storage;this.items$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](this.loadItems());if(this.maxLength!==undefined&&!isNaN(this.maxLength)){this.items$.
17next(Object(external_osdSharedDeps_Lodash_["take"])(this.items$.value,this.maxLength))}}add(val){if(val==null){return this.items$.value}const nextItems=[val,...[...this.items$.value].filter(item=>!this.isEqual(item,val))].slice(0,this.maxLength);this.storage.setItem(this.name,JSON.stringify(nextItems));this.items$.next(nextItems);return nextItems}get(){return Object(external_osdSharedDeps_Lodash_["cloneDeep"])(this.items$.value)}get$(){return this.items$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(items=>Object(external_osdSharedDeps_Lodash_["cloneDeep"])(items)))}loadItems(){try{return JSON.parse(this.storage.getItem(this.name)||"[]")}catch{return[]}}}var utils=__webpack_require__(26);async function createLogKey(type,optionalIdentifier){const baseKey=`opensearchDashboards.history.${type}`;if(!optionalIdentifier){return baseKey}const protectedIdentifier=(new utils["b"]).update(optionalIdentifier,"utf8").digest("base64");return`${baseKey}-${protectedIdentifier}`}class recently_accessed_service_RecentlyAccessedService{async start(_ref){let{http:http,workspaces:workspaces,application:application}=_ref;const logKey=await createLogKey("recentlyAccessed",http.basePath.getBasePath());const history=new persisted_log_PersistedLog(logKey,{maxLength:20,isEqual:(oldItem,newItem)=>oldItem.id===newItem.id});const workspaceEnabled=application.capabilities.workspaces.enabled;return{add:(link,label,id,meta)=>{const currentWorkspaceId=workspaces.currentWorkspaceId$.getValue();history.add({link:link,label:label,id:id,...currentWorkspaceId&&{workspaceId:currentWorkspaceId},...meta&&{meta:{lastAccessedTime:Date.now(),...meta}}})},get:()=>history.get().filter(item=>workspaceEnabled?!!item.workspaceId:true),get$:()=>history.get$().pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(items=>items.filter(item=>workspaceEnabled?!!item.workspaceId:true)))}}}var classnames=__webpack_require__(30);var classnames_default=__webpack_require__.n(classnames);function loading_indicator_defineProperty(e,r,t){return(r=loading_indicator_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function loading_indicator_toPropertyKey(t){var i=loading_indicator_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function loading_indicator_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class loading_indicator_LoadingIndicator extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);loading_indicator_defineProperty(this,"loadingCountSubscription",void 0);loading_indicator_defineProperty(this,"state",{visible:false})}componentDidMount(){this.loadingCountSubscription=this.props.loadingCount$.subscribe(count=>{this.setState({visible:count>0})})}componentWillUnmount(){if(this.loadingCountSubscription){this.loadingCountSubscription.unsubscribe();this.loadingCountSubscription=undefined}}render(){const className=classnames_default()(!this.state.visible&&"osdLoadingIndicator-hidden");const testSubj=this.state.visible?"globalLoadingIndicator":"globalLoadingIndicator-hidden";const ariaHidden=this.state.visible?false:true;const ariaLabel=external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.loadingIndicatorAriaLabel",{defaultMessage:"Loading content"});return!this.props.showAsBar?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{className:className,"data-test-subj":testSubj,"aria-hidden":ariaHidden,"aria-label":ariaLabel}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiProgress"],{className:className,"data-test-subj":testSubj,"aria-hidden":ariaHidden,"aria-label":ariaLabel,position:"fixed",color:"accent",size:"xs"})}}loading_indicator_defineProperty(loading_indicator_LoadingIndicator,"defaultProps",{showAsBar:false});function priority_map_defineProperty(e,r,t){return(r=priority_map_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function priority_map_toPropertyKey(t){var i=priority_map_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function priority_map_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class PriorityMap{constructor(map){priority_map_defineProperty(this,"map",void 0);this.map=map?new Map(sortEntries(map)):new Map}add(key,value){return new PriorityMap(new Map(sortEntries([...this.map,[key,value]])))}remove(key){return new PriorityMap(new Map([...this.map].filter(_ref=>{let[itemKey]=_ref;return itemKey!==key})))}has(key){return this.map.has(key)}[Symbol.iterator](){return this.map[Symbol.iterator]()}values(){return this.map.values()}}const sortEntries=map=>Object(external_osdSharedDeps_Lodash_["sortBy"])([...map],"1.priority").reverse();const BannersList=_ref=>{let{banners$:banners$}=_ref;const[banners,setBanners]=Object(external_osdSharedDeps_React_["useState"])([]);Object(external_osdSharedDeps_React_["useEffect"])(()=>{const subscription=banners$.subscribe(setBanners);return()=>subscription.unsubscribe()},[banners$]);if(banners.length===0){return null}return external_osdSharedDeps_React_default.a.createElement("div",{className:"osdGlobalBannerList"},banners.map(banner=>
17external_osdSharedDeps_React_default.a.createElement(BannerItem,{key:banner.id,banner:banner})))};const BannerItem=_ref2=>{let{banner:banner}=_ref2;const element=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useEffect"])(()=>banner.mount(element.current),[banner]);return external_osdSharedDeps_React_default.a.createElement("div",{"data-test-priority":banner.priority,className:"osdGlobalBannerList__item",ref:element})};function user_banner_service_defineProperty(e,r,t){return(r=user_banner_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function user_banner_service_toPropertyKey(t){var i=user_banner_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function user_banner_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ReactMarkdownLazy=external_osdSharedDeps_React_default.a.lazy(()=>__webpack_require__.e(3).then(__webpack_require__.t.bind(null,831,7)));class user_banner_service_UserBannerService{constructor(){user_banner_service_defineProperty(this,"settingsSubscription",void 0)}start(_ref){let{banners:banners,i18n:i18n,uiSettings:uiSettings}=_ref;let id;let timeout;const dismiss=()=>{banners.remove(id);clearTimeout(timeout)};const updateBanner=()=>{const content=uiSettings.get("notifications:banner");const lifetime=uiSettings.get("notifications:lifetime:banner");if(typeof content!=="string"||content.length===0||typeof lifetime!=="number"){dismiss();return}id=banners.replace(id,el=>{external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{title:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.overlays.banner.attentionTitle",defaultMessage:"Attention"}),iconType:"help"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Suspense,{fallback:external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],null))},external_osdSharedDeps_React_default.a.createElement(ReactMarkdownLazy,{renderers:{root:external_osdSharedDeps_React_["Fragment"]},source:content.trim()})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButton"],{type:"primary",size:"s",onClick:()=>banners.remove(id)},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.overlays.banner.closeButtonLabel",defaultMessage:"Close"})))),el);timeout=setTimeout(dismiss,lifetime);return()=>external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(el)},100)};updateBanner();this.settingsSubscription=uiSettings.getUpdate$().pipe(Object(external_osdSharedDeps_RxjsOperators_["filter"])(_ref2=>{let{key:key}=_ref2;return key==="notifications:banner"||key==="notifications:lifetime:banner"})).subscribe(()=>updateBanner())}stop(){if(this.settingsSubscription){this.settingsSubscription.unsubscribe();this.settingsSubscription=undefined}}}function banners_service_defineProperty(e,r,t){return(r=banners_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function banners_service_toPropertyKey(t){var i=banners_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function banners_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class banners_service_OverlayBannersService{constructor(){banners_service_defineProperty(this,"userBanner",new user_banner_service_UserBannerService)}start(_ref){let{i18n:i18n,uiSettings:uiSettings}=_ref;let uniqueId=0;const genId=()=>`${uniqueId++}`;const banners$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new PriorityMap);const service={add:function(mount){let priority=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;const id=genId();const nextBanner={id:id,mount:mount,priority:priority};banners$.next(banners$.value.add(id,nextBanner));return id},remove:id=>
17{if(!banners$.value.has(id)){return false}banners$.next(banners$.value.remove(id));return true},replace(id,mount){let priority=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!id||!banners$.value.has(id)){return this.add(mount,priority)}const nextId=genId();const nextBanner={id:nextId,mount:mount,priority:priority};banners$.next(banners$.value.remove(id).add(nextId,nextBanner));return nextId},get$(){return banners$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(bannerMap=>[...bannerMap.values()]))},getComponent(){return external_osdSharedDeps_React_default.a.createElement(BannersList,{banners$:this.get$()})}};this.userBanner.start({banners:service,i18n:i18n,uiSettings:uiSettings});return service}stop(){this.userBanner.stop()}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function flyout_service_defineProperty(e,r,t){return(r=flyout_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function flyout_service_toPropertyKey(t){var i=flyout_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function flyout_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class flyout_service_FlyoutRef{constructor(){flyout_service_defineProperty(this,"onClose",void 0);flyout_service_defineProperty(this,"closeSubject",new external_osdSharedDeps_Rxjs_["Subject"]);this.onClose=this.closeSubject.toPromise()}close(){if(!this.closeSubject.closed){this.closeSubject.next();this.closeSubject.complete()}return this.onClose}}class flyout_service_FlyoutService{constructor(){flyout_service_defineProperty(this,"activeFlyout",null);flyout_service_defineProperty(this,"targetDomElement",null)}start(_ref){var _this=this;let{i18n:i18n,targetDomElement:targetDomElement}=_ref;this.targetDomElement=targetDomElement;return{open:function(mount){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_this.activeFlyout){_this.activeFlyout.close();_this.cleanupDom()}const flyout=new flyout_service_FlyoutRef;flyout.onClose.then(()=>{if(_this.activeFlyout===flyout){_this.cleanupDom()}});_this.activeFlyout=flyout;Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],_extends({},options,{onClose:()=>flyout.close()}),external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:mount,className:"osdOverlayMountWrapper"}))),_this.targetDomElement);return flyout},close:()=>{if(this.activeFlyout){this.activeFlyout.close();this.cleanupDom()}}}}cleanupDom(){if(this.targetDomElement!=null){Object(external_osdSharedDeps_ReactDom_["unmountComponentAtNode"])(this.targetDomElement);this.targetDomElement.innerHTML=""}this.activeFlyout=null}}function modal_service_extends(){return modal_service_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},modal_service_extends.apply(null,arguments)}function modal_service_defineProperty(e,r,t){return(r=modal_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function modal_service_toPropertyKey(t){var i=modal_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function modal_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
17class modal_service_ModalRef{constructor(){modal_service_defineProperty(this,"onClose",void 0);modal_service_defineProperty(this,"closeSubject",new external_osdSharedDeps_Rxjs_["Subject"]);this.onClose=this.closeSubject.toPromise()}close(){if(!this.closeSubject.closed){this.closeSubject.next();this.closeSubject.complete()}return this.onClose}}class modal_service_ModalService{constructor(){modal_service_defineProperty(this,"activeModal",null);modal_service_defineProperty(this,"targetDomElement",null)}start(_ref){var _this=this;let{i18n:i18n,targetDomElement:targetDomElement}=_ref;this.targetDomElement=targetDomElement;return{open:function(mount){let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_this.activeModal){_this.activeModal.close();_this.cleanupDom()}const modal=new modal_service_ModalRef;modal.onClose.then(()=>{if(_this.activeModal===modal){_this.cleanupDom()}});_this.activeModal=modal;Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModal"],modal_service_extends({},options,{onClose:()=>modal.close()}),external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:mount,className:"osdOverlayMountWrapper"}))),targetDomElement);return modal},openConfirm:(message,options)=>{if(this.activeModal){this.activeModal.close();this.cleanupDom()}return new Promise((resolve,reject)=>{let resolved=false;const closeModal=confirmed=>{resolved=true;modal.close();resolve(confirmed)};const modal=new modal_service_ModalRef;modal.onClose.then(()=>{if(this.activeModal===modal){this.cleanupDom()}if(!resolved){closeModal(false)}});this.activeModal=modal;const props={...options,children:typeof message==="string"?message:external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:message,className:"osdOverlayMountWrapper"}),onCancel:()=>closeModal(false),onConfirm:()=>closeModal(true),cancelButtonText:(options===null||options===void 0?void 0:options.cancelButtonText)||external_osdSharedDeps_OsdI18n_["i18n"].translate("core.overlays.confirm.cancelButton",{defaultMessage:"Cancel"}),confirmButtonText:(options===null||options===void 0?void 0:options.confirmButtonText)||external_osdSharedDeps_OsdI18n_["i18n"].translate("core.overlays.confirm.okButton",{defaultMessage:"Confirm"})};Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiConfirmModal"],props)),targetDomElement)})}}}cleanupDom(){if(this.targetDomElement!=null){Object(external_osdSharedDeps_ReactDom_["unmountComponentAtNode"])(this.targetDomElement);this.targetDomElement.innerHTML=""}this.activeModal=null}}var components_sidecar=__webpack_require__(253);var resizable_button=__webpack_require__(266);function isMouseEvent(event){return typeof event==="object"&&"pageX"in event&&"pageY"in event}const getPosition=(event,isHorizontal)=>{const clientX=isMouseEvent(event)?event.clientX:event.touches[0].clientX;const clientY=isMouseEvent(event)?event.clientY:event.touches[0].clientY;return isHorizontal?clientX:clientY};const getOsdSidecarPaddingStyle=config=>{if(!(config!==null&&config!==void 0&&config.isHidden)&&((config===null||config===void 0?void 0:config.dockedMode)===SIDECAR_DOCKED_MODE.LEFT||(config===null||config===void 0?void 0:config.dockedMode)===SIDECAR_DOCKED_MODE.RIGHT)){const{dockedMode:dockedMode,paddingSize:paddingSize}=config;return{[`padding${dockedMode===SIDECAR_DOCKED_MODE.LEFT?"Left":"Right"}`]:paddingSize}}return{}};const MIN_SIDECAR_SIZE=350;const ResizableButton=_ref=>{let{dockedMode:dockedMode,onResize:onResize,flyoutSize:flyoutSize}=_ref;const isHorizontal=dockedMode!==SIDECAR_DOCKED_MODE.TAKEOVER;const classes=classnames_default()("sidecar-resizableButton",{"resizableButton--vertical":!isHorizontal,"resizableButton--horizontal":isHorizontal});const initialMouseXorY=Object(external_osdSharedDeps_React_["useRef"])(0);const initialFlyoutSize=Object(external_osdSharedDeps_React_["useRef"])(flyoutSize);const setFocus=e=>
17e.currentTarget.focus();const onMouseDown=Object(external_osdSharedDeps_React_["useCallback"])(event=>{const onMouseUp=()=>{initialMouseXorY.current=0;window.removeEventListener("mousemove",onMouseMove);window.removeEventListener("mouseup",onMouseUp);window.removeEventListener("touchmove",onMouseMove);window.removeEventListener("touchend",onMouseUp)};const onMouseMove=e=>{let offset;if(dockedMode===SIDECAR_DOCKED_MODE.LEFT){offset=getPosition(e,isHorizontal)-initialMouseXorY.current}else{offset=initialMouseXorY.current-getPosition(e,isHorizontal)}const newFlyoutSize=initialFlyoutSize.current+offset;onResize(Math.max(newFlyoutSize,MIN_SIDECAR_SIZE))};window.addEventListener("mousemove",onMouseMove);window.addEventListener("mouseup",onMouseUp);window.addEventListener("touchmove",onMouseMove);window.addEventListener("touchend",onMouseUp);initialMouseXorY.current=getPosition(event,isHorizontal);initialFlyoutSize.current=flyoutSize},[isHorizontal,flyoutSize,dockedMode,onResize]);return external_osdSharedDeps_React_default.a.createElement("button",{className:classes,"data-test-subj":"resizableButton",type:"button",onClick:setFocus,onMouseDown:onMouseDown,onTouchStart:onMouseDown})};const Sidecar=_ref=>{var _sidecarConfig$paddin;let{sidecarConfig$:sidecarConfig$,options:options,setSidecarConfig:setSidecarConfig,i18n:i18n,mount:mount}=_ref;const sidecarConfig=useObservable_default()(sidecarConfig$,undefined);const classes=classnames_default()("osdSidecarFlyout",{"osdSidecarFlyout--dockedRight":(sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.dockedMode)===SIDECAR_DOCKED_MODE.RIGHT,"osdSidecarFlyout--dockedLeft":(sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.dockedMode)===SIDECAR_DOCKED_MODE.LEFT,"osdSidecarFlyout--dockedTakeover":(sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.dockedMode)===SIDECAR_DOCKED_MODE.TAKEOVER,"osdSidecarFlyout--hide":(sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.isHidden)===true},options.className);const handleResize=Object(external_osdSharedDeps_React_["useCallback"])(newSize=>{setSidecarConfig({paddingSize:newSize})},[setSidecarConfig]);const flyoutSizeStyle=Object(external_osdSharedDeps_React_["useMemo"])(()=>(sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.dockedMode)===SIDECAR_DOCKED_MODE.TAKEOVER?{height:sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.paddingSize}:{width:sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.paddingSize},[sidecarConfig]);return external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement("div",{"data-test-subj":options["data-test-subj"],style:flyoutSizeStyle,className:classes},external_osdSharedDeps_React_default.a.createElement(ResizableButton,{onResize:handleResize,dockedMode:sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.dockedMode,flyoutSize:(_sidecarConfig$paddin=sidecarConfig===null||sidecarConfig===void 0?void 0:sidecarConfig.paddingSize)!==null&&_sidecarConfig$paddin!==void 0?_sidecarConfig$paddin:0}),external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:mount,className:"osdSidecarMountWrapper"})))};function sidecar_service_defineProperty(e,r,t){return(r=sidecar_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function sidecar_service_toPropertyKey(t){var i=sidecar_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function sidecar_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class sidecar_service_SidecarRef{constructor(){sidecar_service_defineProperty(this,"onClose",void 0);sidecar_service_defineProperty(this,"closeSubject",new external_osdSharedDeps_Rxjs_["Subject"]);this.onClose=this.closeSubject.toPromise()}close(){if(!this.closeSubject.closed){this.closeSubject.next();this.closeSubject.complete()}return this.onClose}}let SIDECAR_DOCKED_MODE=function(SIDECAR_DOCKED_MODE){SIDECAR_DOCKED_MODE["LEFT"]="left";SIDECAR_DOCKED_MODE["RIGHT"]="right";SIDECAR_DOCKED_MODE["TAKEOVER"]="takeover";return SIDECAR_DOCKED_MODE}({});class sidecar_service_SidecarService{constructor(){sidecar_service_defineProperty(this,"activeSidecar",null);sidecar_service_defineProperty(this,"targetDomElement",null);sidecar_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["ReplaySubject"](1))}start(_ref){let{i18n:i18n,targetDomElement:targetDomElement}=_ref;this.targetDomElement=targetDomElement;const sidecarConfig$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const getSidecarConfig$=()=>sidecarConfig$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$));const setSidecarConfig=config=>{if(sidecarConfig$.value||!sidecarConfig$.value&&config.dockedMode&&config.paddingSize){sidecarConfig$.next({...sidecarConfig$.value,...config})}};return{getSidecarConfig$:getSidecarConfig$,setSidecarConfig:setSidecarConfig,open:(mount,options)=>{if(this.activeSidecar){setSidecarConfig({paddingSize:0});this.activeSidecar.close();this.cleanupDom()}const sidecar=new sidecar_service_SidecarRef;setSidecarConfig(options.config);sidecar.onClose.then(()=>
17{if(this.activeSidecar===sidecar){this.cleanupDom()}});this.activeSidecar=sidecar;Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(Sidecar,{sidecarConfig$:sidecarConfig$,setSidecarConfig:setSidecarConfig,options:options,i18n:i18n,mount:mount}),this.targetDomElement);return sidecar},hide:()=>{setSidecarConfig({isHidden:true})},show:()=>{setSidecarConfig({isHidden:false})}}}cleanupDom(){if(this.targetDomElement!=null){Object(external_osdSharedDeps_ReactDom_["unmountComponentAtNode"])(this.targetDomElement);this.targetDomElement.innerHTML=""}this.activeSidecar=null}}function overlay_service_defineProperty(e,r,t){return(r=overlay_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function overlay_service_toPropertyKey(t){var i=overlay_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function overlay_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class overlay_service_OverlayService{constructor(){overlay_service_defineProperty(this,"bannersService",new banners_service_OverlayBannersService);overlay_service_defineProperty(this,"modalService",new modal_service_ModalService);overlay_service_defineProperty(this,"flyoutService",new flyout_service_FlyoutService);overlay_service_defineProperty(this,"sidecarService",new sidecar_service_SidecarService)}start(_ref){let{i18n:i18n,targetDomElement:targetDomElement,uiSettings:uiSettings}=_ref;const flyoutElement=document.createElement("div");targetDomElement.appendChild(flyoutElement);const flyouts=this.flyoutService.start({i18n:i18n,targetDomElement:flyoutElement});const banners=this.bannersService.start({i18n:i18n,uiSettings:uiSettings});const modalElement=document.createElement("div");targetDomElement.appendChild(modalElement);const modals=this.modalService.start({i18n:i18n,targetDomElement:modalElement});const sidecarElement=document.createElement("div");targetDomElement.appendChild(sidecarElement);const sidecars=this.sidecarService.start({i18n:i18n,targetDomElement:sidecarElement});return{banners:banners,openFlyout:flyouts.open.bind(flyouts),closeFlyout:flyouts.close.bind(flyouts),openModal:modals.open.bind(modals),openConfirm:modals.openConfirm.bind(modals),sidecar:sidecars}}}var collapsible_nav=__webpack_require__(279);const isModifiedOrPrevented=event=>event.metaKey||event.altKey||event.ctrlKey||event.shiftKey||event.defaultPrevented;const aliasedApps={discover:["data-explorer"]};const isActiveNavLink=(appId,linkId)=>{var _aliasedApps$linkId;return!!(appId===linkId||(_aliasedApps$linkId=aliasedApps[linkId])!==null&&_aliasedApps$linkId!==void 0&&_aliasedApps$linkId.includes(appId||""))};function createEuiListItem(_ref){let{link:link,appId:appId,basePath:basePath,onClick:onClick=(()=>{}),navigateToApp:navigateToApp,dataTestSubj:dataTestSubj,externalLink:externalLink=false}=_ref;const{href:href,id:id,title:title,disabled:disabled,euiIconType:euiIconType,icon:icon,tooltip:tooltip}=link;return{label:tooltip!==null&&tooltip!==void 0?tooltip:title,href:href,onClick(event){if(!isModifiedOrPrevented(event)){onClick(event)}if(!externalLink&&event.button===0&&!isModifiedOrPrevented(event)){event.preventDefault();navigateToApp(id)}},isActive:isActiveNavLink(appId,id),isDisabled:disabled,"data-test-subj":dataTestSubj,...basePath&&{iconType:euiIconType,icon:!euiIconType&&icon?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:basePath.prepend(`/${icon}`),size:"m"}):undefined}}}function createRecentNavLink(recentLink,navLinks,basePath,navigateToUrl){let workspaceEnabled=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;const{link:link,label:label,workspaceId:workspaceId}=recentLink;const href=to_nav_link_relativeToAbsolute(basePath.prepend(workspaceEnabled?Object(utils["c"])(link,workspaceId||"",basePath):link,{withoutClientBasePath:true}));const navLink=navLinks.find(nl=>href.startsWith(nl.baseUrl));let titleAndAriaLabel=label;if(navLink){titleAndAriaLabel=external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.recentLinks.linkItem.screenReaderLabel",{defaultMessage:"{recentlyAccessedItemLinklabel}, type: {pageType}",values:{recentlyAccessedItemLinklabel:label,pageType:navLink.title}})}return{href:href,label:label,title:titleAndAriaLabel,"aria-label":titleAndAriaLabel,iconType:navLink===null||navLink===void 0?void 0:navLink.euiIconType,onClick(event){if(event.button===0&&!isModifiedOrPrevented(event)){event.preventDefault();navigateToUrl(href)}}}}var types=__webpack_require__(19);const sortBy=key=>(a,b)=>a[key]>b[key]?1:b[key]>a[key]?-1:0;const groupBy=(array,getKey)=>array.reduce((result,currentValue)=>{const groupKey=String(getKey(currentValue));if(!result[groupKey]){result[groupKey]=[]}result[groupKey].push(currentValue);return result},{});const LinkItemType={LINK:"link",CATEGORY:"category",PARENT_LINK:"parentLink"};function getAllCategories(allCategorizedLinks){const allCategories={};for(const[key,value]of Object.entries(allCategorizedLinks)){allCategories[key]=value[0].category}return allCategories}function fulfillRegistrationLinksToChromeNavLinks(registerNavLinks,navLinks){const allExistingNavLinkId=navLinks.map(link=>link.id);return registerNavLinks.filter(navLink=>allExistingNavLinkId.includes(navLink.id)).map(navLink=>({...navLinks[allExistingNavLinkId.indexOf(navLink.id)],...navLink}))||[]}const getOrderedLinks=navLinks=>navLinks.sort(sortBy("order"));function walkLinkItemsTree(props,callback){props.linkItems.forEac
17h(item=>{callback({parentItem:props.parentItem,currentItem:item});if(item.itemType===LinkItemType.PARENT_LINK){walkLinkItemsTree({linkItems:item.links,parentItem:item},callback)}else if(item.itemType===LinkItemType.CATEGORY){walkLinkItemsTree({linkItems:item.links||[],parentItem:item},callback)}})}const generateItemTypeByLink=(navLink,navLinksGroupedByParentNavLink)=>{const navLinksUnderParentId=navLinksGroupedByParentNavLink[navLink.id];if(navLinksUnderParentId){return{itemType:LinkItemType.PARENT_LINK,link:navLink,links:getOrderedLinks(navLinksUnderParentId||[]).map(navLinkUnderParentId=>generateItemTypeByLink(navLinkUnderParentId,navLinksGroupedByParentNavLink)),order:navLink.order}}else{return{itemType:LinkItemType.LINK,link:navLink,order:navLink.order}}};function getOrderedLinksOrCategories(navLinks){const allNavLinksWithParentNavLink=navLinks.filter(navLink=>navLink.parentNavLinkId);const navLinksGroupedByParentNavLink=groupBy(allNavLinksWithParentNavLink,navLink=>navLink.parentNavLinkId);const groupedNavLinks=groupBy(navLinks.filter(item=>!item.parentNavLinkId),link=>{var _link$category;return link===null||link===void 0||(_link$category=link.category)===null||_link$category===void 0?void 0:_link$category.id});const{undefined:unknowns=[],...allCategorizedLinks}=groupedNavLinks;const categoryDictionary=getAllCategories(allCategorizedLinks);const unusedParentNavLinks=Object.keys(navLinksGroupedByParentNavLink).filter(navLinkId=>!navLinks.find(navLink=>navLink.id===navLinkId));const result=[...unknowns.map(linkWithoutCategory=>generateItemTypeByLink(linkWithoutCategory,navLinksGroupedByParentNavLink)),...Object.keys(allCategorizedLinks).map(categoryKey=>{var _categoryDictionary$c;return{itemType:LinkItemType.CATEGORY,category:categoryDictionary[categoryKey],order:(_categoryDictionary$c=categoryDictionary[categoryKey])===null||_categoryDictionary$c===void 0?void 0:_categoryDictionary$c.order,links:getOrderedLinks(allCategorizedLinks[categoryKey]).map(navLink=>generateItemTypeByLink(navLink,navLinksGroupedByParentNavLink))}}),...unusedParentNavLinks.reduce((total,groupId)=>[...total,...navLinksGroupedByParentNavLink[groupId].map(navLink=>generateItemTypeByLink(navLink,navLinksGroupedByParentNavLink))],[])];return result.sort(sortBy("order"))}const getSortedNavLinks=(navLinks,enricher)=>{const sortedNavLinksTree=getOrderedLinksOrCategories(navLinks);const acc=[];walkLinkItemsTree({linkItems:sortedNavLinksTree},props=>{const{currentItem:currentItem,parentItem:parentItem}=props;const enricheredResult=enricher?enricher(currentItem,parentItem):currentItem;if(enricheredResult.itemType===LinkItemType.LINK||enricheredResult.itemType===LinkItemType.PARENT_LINK){if(enricheredResult.link){acc.push(enricheredResult.link)}}});return acc};const getVisibleUseCases=navGroupMap=>Object.values(navGroupMap).filter(navGroup=>navGroup.status!==types["a"].Hidden&&navGroup.type===undefined);function getCategoryLocalStorageKey(id){return`core.navGroup.${id}`}function getIsCategoryOpen(id,storage){var _storage$getItem;const value=(_storage$getItem=storage.getItem(getCategoryLocalStorageKey(id)))!==null&&_storage$getItem!==void 0?_storage$getItem:"true";return value==="true"}function setIsCategoryOpen(id,isOpen,storage){storage.setItem(getCategoryLocalStorageKey(id),`${isOpen}`)}function collapsible_nav_extends(){return collapsible_nav_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},collapsible_nav_extends.apply(null,arguments)}function collapsible_nav_getAllCategories(allCategorizedLinks){const allCategories={};for(const[key,value]of Object.entries(allCategorizedLinks)){allCategories[key]=value[0].category}return allCategories}function getOrderedCategories(mainCategories,categoryDictionary){return Object(external_osdSharedDeps_Lodash_["sortBy"])(Object.keys(mainCategories),categoryName=>{var _categoryDictionary$c;return(_categoryDictionary$c=categoryDictionary[categoryName])===null||_categoryDictionary$c===void 0?void 0:_categoryDictionary$c.order})}function CollapsibleNav(_ref){let{basePath:basePath,collapsibleNavHeaderRender:collapsibleNavHeaderRender,id:id,isLocked:isLocked,isNavOpen:isNavOpen,homeHref:homeHref,storage:storage=window.localStorage,onIsLockedUpdate:onIsLockedUpdate,closeNav:closeNav,navigateToApp:navigateToApp,navigateToUrl:navigateToUrl,logos:logos,workspaceEnabled:wor
17kspaceEnabled,...observables}=_ref;const navLinks=useObservable_default()(observables.navLinks$,[]).filter(link=>!link.hidden);const recentlyAccessed=useObservable_default()(observables.recentlyAccessed$,[]);const customNavLink=useObservable_default()(observables.customNavLink$,undefined);const appId=useObservable_default()(observables.appId$,"");const lockRef=Object(external_osdSharedDeps_React_["useRef"])(null);const groupedNavLinks=Object(external_osdSharedDeps_Lodash_["groupBy"])(navLinks,link=>{var _link$category;return link===null||link===void 0||(_link$category=link.category)===null||_link$category===void 0?void 0:_link$category.id});const{undefined:unknowns=[],...allCategorizedLinks}=groupedNavLinks;const categoryDictionary=collapsible_nav_getAllCategories(allCategorizedLinks);const orderedCategories=getOrderedCategories(allCategorizedLinks,categoryDictionary);const readyForEUI=function(link){let needsIcon=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return createEuiListItem({link:link,appId:appId,dataTestSubj:"collapsibleNavAppLink",navigateToApp:navigateToApp,onClick:closeNav,...needsIcon&&{basePath:basePath}})};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNav"],{"data-test-subj":"collapsibleNav",id:id,"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.screenReaderLabel",{defaultMessage:"Primary"}),isOpen:isNavOpen,isDocked:isLocked,onClose:closeNav,outsideClickCloses:false},collapsibleNavHeaderRender&&collapsibleNavHeaderRender(),customNavLink&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"],{background:"light",className:"eui-yScroll",style:{maxHeight:"40vh"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{listItems:[createEuiListItem({link:customNavLink,basePath:basePath,navigateToApp:navigateToApp,dataTestSubj:"collapsibleNavCustomNavLink",onClick:closeNav,externalLink:true})],maxWidth:"none",color:"text",gutterSize:"none",size:"s"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"none"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"],{key:"recentlyViewed",background:"light",title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.recentlyViewed",{defaultMessage:"Recently viewed"}),isCollapsible:true,initialIsOpen:getIsCategoryOpen("recentlyViewed",storage),onToggle:isCategoryOpen=>setIsCategoryOpen("recentlyViewed",isCategoryOpen,storage),"data-test-subj":"collapsibleNavGroup-recentlyViewed"},recentlyAccessed.length>0?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.recentlyViewedAriaLabel",{defaultMessage:"Recently viewed links"}),listItems:recentlyAccessed.map(link=>{const{iconType:iconType,onClick:onClick,...hydratedLink}=createRecentNavLink(link,navLinks,basePath,navigateToUrl,!!workspaceEnabled);return{...hydratedLink,"data-test-subj":"collapsibleNavAppLink--recent",onClick:event=>{if(!isModifiedOrPrevented(event)){closeNav();onClick(event)}}}}),maxWidth:"none",color:"subdued",gutterSize:"none",size:"s",className:"osdCollapsibleNav__recentsListGroup"}):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",color:"subdued",style:{padding:"0 8px 8px"}},external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.EmptyRecentlyViewed",{defaultMessage:"No recently viewed items"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"none"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{className:"eui-yScroll"},orderedCategories.map(categoryName=>{const category=categoryDictionary[categoryName];const opensearchLinkLogo=category.id==="opensearchDashboards"?logos.Mark.url:category.euiIconType;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"],{key:category.id,iconType:opensearchLinkLogo,title:category.label,isCollapsible:true,initialIsOpen:getIsCategoryOpen(category.id,storage),onToggle:isCategoryOpen=>setIsCategoryOpen(category.id,isCategoryOpen,storage),"data-test-subj":`collapsibleNavGroup-${category.id}`,"data-test-opensearch-logo":opensearchLinkLogo},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNavSection.screenReaderLabel",{defaultMessage:"Primary navigation links, {category}",values:{category:category.label}}),listItems:allCategorizedLinks[categoryName].map(link=>readyForEUI(link)),maxWidth:"none",color:"subdued",gutterSize:"none",size:"s"}))}),unknowns.map((link,i)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"],{"data-test-subj":`collapsibleNavGroup-noCategory`,key:i},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{flush:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroupItem"],collapsible_nav_extends({color:"text",size:"s"},readyForEUI(link,true)))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiShowFor"],{sizes:["l","xl","xxl","xxxl"]}
17,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{flush:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroupItem"],{"data-test-subj":"collapsible-nav-lock",buttonRef:lockRef,size:"xs",color:"subdued",label:isLocked?external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNavSection.undockLabel",{defaultMessage:"Undock navigation"}):external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNavSection.dockLabel",{defaultMessage:"Dock navigation"}),"aria-label":isLocked?external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNavSection.undockAriaLabel",{defaultMessage:"Undock primary navigation"}):external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNavSection.dockAriaLabel",{defaultMessage:"Dock primary navigation"}),onClick:()=>{onIsLockedUpdate(!isLocked);if(lockRef.current){lockRef.current.focus()}},iconType:isLocked?"lock":"lockOpen"}))))))}var collapsible_nav_group_enabled=__webpack_require__(103);var core_utils=__webpack_require__(29);function collapsible_nav_group_enabled_top_extends(){return collapsible_nav_group_enabled_top_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},collapsible_nav_group_enabled_top_extends.apply(null,arguments)}const CollapsibleNavTop=_ref=>{let{collapsibleNavHeaderRender:collapsibleNavHeaderRender,currentNavGroup:currentNavGroup,navigateToApp:navigateToApp,logos:logos,onClickShrink:onClickShrink,shouldShrinkNavigation:shouldShrinkNavigation,homeLink:homeLink}=_ref;const homeIcon=logos.Mark.url;const homeLinkProps=Object(external_osdSharedDeps_React_["useMemo"])(()=>{if(homeLink){const propsForHomeIcon=createEuiListItem({link:homeLink,appId:"home",dataTestSubj:"collapsibleNavHome",navigateToApp:navigateToApp});return{"data-test-subj":propsForHomeIcon["data-test-subj"],onClick:propsForHomeIcon.onClick}}return{}},[homeLink,navigateToApp]);const onIconClick=Object(external_osdSharedDeps_React_["useCallback"])(e=>{var _homeLinkProps$onClic;(_homeLinkProps$onClic=homeLinkProps.onClick)===null||_homeLinkProps$onClic===void 0||_homeLinkProps$onClic.call(homeLinkProps,e)},[homeLinkProps]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{color:"transparent",hasBorder:false,hasShadow:false,className:"navGroupEnabledNavTopWrapper"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{responsive:false,justifyContent:"spaceBetween"},!shouldShrinkNavigation?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],collapsible_nav_group_enabled_top_extends({flush:"both"},homeLinkProps,{onClick:onIconClick,className:"navGroupEnabledHomeIcon"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:homeIcon,size:"xl","data-test-subj":`collapsibleNavIcon-${homeIcon}`}))):null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{onClick:onClickShrink,iconType:shouldShrinkNavigation?"menu":"menuLeft",color:"subdued",display:"empty","aria-label":"shrink-button","data-test-subj":"collapsibleNavShrinkButton",size:"xs"}))),((currentNavGroup===null||currentNavGroup===void 0?void 0:currentNavGroup.type)||collapsibleNavHeaderRender)&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),
17currentNavGroup!==null&¤tNavGroup!==void 0&¤tNavGroup.type?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h3",null,currentNavGroup.title)):collapsibleNavHeaderRender===null||collapsibleNavHeaderRender===void 0?void 0:collapsibleNavHeaderRender()))};function header_extension_defineProperty(e,r,t){return(r=header_extension_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function header_extension_toPropertyKey(t){var i=header_extension_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function header_extension_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class header_extension_HeaderExtension extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);header_extension_defineProperty(this,"ref",external_osdSharedDeps_React_default.a.createRef());header_extension_defineProperty(this,"unrender",void 0)}componentDidMount(){this.renderExtension()}componentDidUpdate(prevProps){if(this.props.extension===prevProps.extension){return}this.unrenderExtension();this.renderExtension()}componentWillUnmount(){this.unrenderExtension()}render(){return external_osdSharedDeps_React_default.a.createElement("div",{ref:this.ref})}renderExtension(){if(!this.ref.current){throw new Error("<HeaderExtension /> mounted without ref")}if(this.props.extension){this.unrender=this.props.extension(this.ref.current)}}unrenderExtension(){if(this.unrender){this.unrender();this.unrender=undefined}}}function HeaderNavControls(_ref){let{navControls$:navControls$,side:side,className:className}=_ref;const navControls=useObservable_default()(navControls$,[]);if(!navControls){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,navControls.map((navControl,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{key:index,border:side?side==="left"?"right":"left":"none",className:className},external_osdSharedDeps_React_default.a.createElement(header_extension_HeaderExtension,{extension:navControl.mount}))))}function collapsible_nav_groups_label_getIsCategoryOpen(storageKey){let storage=arguments.length>1&&arguments[1]!==undefined?arguments[1]:window.localStorage;return getIsCategoryOpen(storageKey,storage)}function CollapsibleNavGroupsLabel(props){const{collapsible:collapsible,storageKey:storageKey,storage:storage=window.localStorage,label:label,onToggle:onToggle}=props;const[,setRenderKey]=Object(external_osdSharedDeps_React_["useState"])(Date.now());const isOpen=collapsible?collapsible_nav_groups_label_getIsCategoryOpen(storageKey,storage):true;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",className:`${collapsible?"euiAccordion__button":undefined}`,gutterSize:"none","data-test-subj":props["data-test-subj"],onClick:e=>{e.stopPropagation();if(!collapsible){return}setIsCategoryOpen(storageKey,!isOpen,storage);setRenderKey(Date.now());onToggle===null||onToggle===void 0||onToggle(!isOpen)}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,label),collapsible?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:isOpen?"minus":"plus",className:"leftNavCustomizedAccordionIcon"})):null)}const titleForSeeAll=external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.seeAllLabel",{defaultMessage:"See all..."});const LEVEL_FOR_ROOT_ITEMS=1;function NavGroups(_ref){let{navLinks:navLinks,suffix:suffix,style:style,appId:appId,navigateToApp:navigateToApp,onNavItemClick:onNavItemClick,categoryCollapsible:categoryCollapsible,currentWorkspaceId:currentWorkspaceId}=_ref;const[,setRenderKey]=Object(external_osdSharedDeps_React_["useState"])(Date.now());const createNavItem=_ref2=>{let{link:link,className:className}=_ref2;const euiListItem=createEuiListItem({link:link,appId:appId,dataTestSubj:`collapsibleNavAppLink-${link.id}`,navigateToApp:navigateToApp,onClick:event=>{onNavItemClick(event,link)}});return{id:`${link.id}-${link.title}`,name:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],null,link.title),onClick:euiListItem.onClick,href:euiListItem.href,emphasize:euiListItem.isActive,className:`nav-link-item ${className||""}`,buttonClassName:"nav-link-item-btn","data-test-subj":euiListItem["data-test-subj"],"aria-label":link.title}};const createSideNavItem=(navLink,level,className)=>{if(navLink.itemType===LinkItemType.LINK){if(navLink.link.title===titleForSeeAll){const navItem=createNavItem({link:navLink.link});return{...navItem,name:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"success"},navItem.name),emphasize:false}}return createNavItem({link:navLink.link,className:className})}if(navLink.itemType===LinkItemType.PARENT_LINK&&navLink.link){const props=createNavItem({link:navLink.link});const parentOpenKey=`${currentWorkspaceId?`${currentWorkspaceId}-`:""}${navLink.link.id}`;const parentItem={...props,forceOpen:true,id:`${props.id}-${!!collapsible_nav_groups_label_getIsCategoryOpen(parentOpenKey)}`,href:undefined,onClick:undefined,"data-test-subj":undefined,className:classnames_default()(props.className,"nav-link-parent-item"),name:external_osdSharedDeps_React_default.a.createElement(CollapsibleNavGroupsLabel,{label:props.name,storageKey:parentOpenKey,collapsible:!categoryCollapsible,onToggle:()=>setRenderKey(Date.now()),"data-test-subj":props["data-test-subj"]}
17),items:(collapsible_nav_groups_label_getIsCategoryOpen(parentOpenKey)?navLink.links:[]).map(subNavLink=>createSideNavItem(subNavLink,level+1,"nav-nested-item"))};if(level===LEVEL_FOR_ROOT_ITEMS){return{className:"nav-link-fake-item",buttonClassName:"nav-link-fake-item-button",name:"",items:[parentItem],id:`fake_${props.id}`}}return parentItem}if(navLink.itemType===LinkItemType.CATEGORY){var _navLink$category,_navLink$category$id,_navLink$category2,_navLink$category$lab,_navLink$category3,_ref3,_navLink$category4;const categoryOpenKey=`${currentWorkspaceId?`${currentWorkspaceId}-`:""}${(_navLink$category=navLink.category)===null||_navLink$category===void 0?void 0:_navLink$category.id}`;return{id:(_navLink$category$id=(_navLink$category2=navLink.category)===null||_navLink$category2===void 0?void 0:_navLink$category2.id)!==null&&_navLink$category$id!==void 0?_navLink$category$id:"",name:external_osdSharedDeps_React_default.a.createElement(CollapsibleNavGroupsLabel,{label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("span",{className:"euiCollapsibleNavGroup__heading nav-link-item"},(_navLink$category$lab=(_navLink$category3=navLink.category)===null||_navLink$category3===void 0?void 0:_navLink$category3.label)!==null&&_navLink$category$lab!==void 0?_navLink$category$lab:"")),collapsible:!!categoryCollapsible,storageKey:categoryOpenKey,onToggle:()=>setRenderKey(Date.now())}),items:(_ref3=!categoryCollapsible||collapsible_nav_groups_label_getIsCategoryOpen(categoryOpenKey)?navLink.links:[])===null||_ref3===void 0?void 0:_ref3.map(link=>createSideNavItem(link,level+1)),"aria-label":(_navLink$category4=navLink.category)===null||_navLink$category4===void 0?void 0:_navLink$category4.label,className:"nav-link-item-category-item",buttonClassName:"nav-link-item-category-button"}}return{}};const orderedLinksOrCategories=getOrderedLinksOrCategories(navLinks);const sideNavItems=orderedLinksOrCategories.map(navLink=>createSideNavItem(navLink,LEVEL_FOR_ROOT_ITEMS)).filter(navItem=>!!navItem.id);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{style:style},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSideNav"],{items:sideNavItems,isOpenOnMobile:true,mobileBreakpoints:[]}),suffix)}function global_search_service_defineProperty(e,r,t){return(r=global_search_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function global_search_service_toPropertyKey(t){var i=global_search_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function global_search_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const SAVED_OBJECTS_SYMBOL="@";const COMMANDS_SYMBOL=">";const SearchCommandTypes={PAGES:{description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.pages.description",{defaultMessage:"Pages"}
17),alias:null},SAVED_OBJECTS:{description:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.assets.description",{defaultMessage:"Assets"}),alias:SAVED_OBJECTS_SYMBOL}};class GlobalSearchService{constructor(){global_search_service_defineProperty(this,"searchCommands",[])}registerSearchCommand(searchHandler){const exists=this.searchCommands.find(item=>item.id===searchHandler.id);if(exists){console.warn(`Duplicate SearchCommands id ${searchHandler.id} found`);return}this.searchCommands.push(searchHandler)}setup(){return{registerSearchCommand:this.registerSearchCommand.bind(this)}}start(){return{getAllSearchCommands:()=>this.searchCommands}}}const HeaderSearchBarIcon=_ref=>{let{globalSearchCommands:globalSearchCommands}=_ref;const[isSearchPopoverOpen,setIsSearchPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const buttonRef=Object(external_osdSharedDeps_React_["useRef"])(null);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{panelPaddingSize:"s",anchorPosition:"downCenter",repositionOnScroll:true,isOpen:isSearchPopoverOpen,closePopover:()=>{setIsSearchPopoverOpen(false)},button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.icon.toolTip",{defaultMessage:"Search"})},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{"aria-label":"search",iconType:"search",color:"text",buttonRef:buttonRef,"data-test-subj":"globalSearch-leftNav-icon",onClick:()=>{var _buttonRef$current;setIsSearchPopoverOpen(!isSearchPopoverOpen);(_buttonRef$current=buttonRef.current)===null||_buttonRef$current===void 0||_buttonRef$current.blur()}}))},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasBorder:false,hasShadow:false,paddingSize:"none",style:{minHeight:"300px",minWidth:"400px"}},external_osdSharedDeps_React_default.a.createElement(HeaderSearchBar,{globalSearchCommands:globalSearchCommands,panel:true,onSearchResultClick:()=>{var _buttonRef$current2;setIsSearchPopoverOpen(false);(_buttonRef$current2=buttonRef.current)===null||_buttonRef$current2===void 0||_buttonRef$current2.blur()}})))};const HeaderSearchBar=_ref2=>{let{globalSearchCommands:globalSearchCommands,panel:panel,onSearchResultClick:onSearchResultClick}=_ref2;const[results,setResults]=Object(external_osdSharedDeps_React_["useState"])([]);const[isLoading,setIsLoading]=Object(external_osdSharedDeps_React_["useState"])(false);const[isPopoverOpen,setIsPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const closePopover=()=>{setIsPopoverOpen(false);setResults([])};const resultSection=(items,sectionHeader)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"column",gutterSize:"xs"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"xs",color:"subdued"},sectionHeader))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,items.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{flush:true,gutterSize:"none",maxWidth:false},items.map((item,index)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroupItem"],{key:index,label:item,color:"text"}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.emptyResult.description",{defaultMessage:"No results found."}))));const searchResultSections=results&&results.length?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"column",gutterSize:"none"},results.map(result=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:result.key},result))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"xs"},external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.emptyResult.description",{defaultMessage:"No results found."}));const onSearch=Object(external_osdSharedDeps_React_["useCallback"])(async value=>{const filteredCommands=globalSearchCommands.filter(command=>{const alias=SearchCommandTypes[command.type].alias;return alias&&value.startsWith(alias)});const defaultSearchCommands=globalSearchCommands.filter(command=>!SearchCommandTypes[command.type].alias);if(filteredCommands.length===0){filteredCommands.push(...defaultSearchCommands)}if(value&&filteredCommands&&filteredCommands.length){setIsPopoverOpen(true);setIsLoading(true);const settleResults=await Promise.allSettled(filteredCommands.map(command=>{const callback=onSearchResultClick||closePopover;const alias=SearchCommandTypes[command.type].alias;const queryValue=alias?value.replace(alias,"").trim():value;return command.run(queryValue,callback).then(items=>({items:items,type:command.type}))}));const searchResults=settleResults.filter(result=>result.status==="fulfilled").map(result=>result.value).reduce((acc,_ref3)=>{let{items:items,type:type}=_ref3;return{...acc,[type]:(acc[type]||[]).concat(items)}},{});const sections=Object.entries(searchResults).map(_ref4=>{let[key,items]=_ref4;const sectionHeader=SearchCommandTypes[key].description;return resultSection(items,sectionHeader)});setIsLoading(false);
17setResults(sections)}else{setResults([])}},[globalSearchCommands,onSearchResultClick]);const searchBar=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFieldSearch"],{compressed:true,incremental:true,onSearch:onSearch,fullWidth:true,placeholder:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.globalSearch.input.placeholder",{defaultMessage:"Search the menu"}),isLoading:isLoading,"aria-label":"Search the menus","data-test-subj":"global-search-input",className:"searchInput",onFocus:()=>{setIsPopoverOpen(true)}});const searchBarPanel=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasBorder:false,hasShadow:false,paddingSize:"none","data-test-subj":"search-result-panel"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{direction:"column",gutterSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,searchBar),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,searchResultSections)));if(panel){return searchBarPanel}else{return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,!isPopoverOpen&&searchBar,isPopoverOpen&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{panelStyle:{minWidth:"400px",minHeight:"100px"},button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null),zIndex:2e3,panelPaddingSize:"s",attachToAnchor:true,ownFocus:true,display:"block",isOpen:isPopoverOpen,closePopover:()=>{closePopover()}},searchBarPanel))}};function collapsible_nav_group_enabled_extends(){return collapsible_nav_group_enabled_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},collapsible_nav_group_enabled_extends.apply(null,arguments)}const collapsible_nav_group_enabled_titleForSeeAll=external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.seeAllLabel",{defaultMessage:"See all..."});var NavWidth=function(NavWidth){NavWidth[NavWidth["Expanded"]=270]="Expanded";NavWidth[NavWidth["Collapsed"]=48]="Collapsed";return NavWidth}(NavWidth||{});function CollapsibleNavGroupEnabled(_ref){let{basePath:basePath,id:id,isNavOpen:isNavOpen,storage:storage=window.localStorage,closeNav:closeNav,navigateToApp:navigateToApp,navigateToUrl:navigateToUrl,logos:logos,setCurrentNavGroup:setCurrentNavGroup,capabilities:capabilities,collapsibleNavHeaderRender:collapsibleNavHeaderRender,globalSearchCommands:globalSearchCommands,...observables}=_ref;const allNavLinks=useObservable_default()(observables.navLinks$,[]);const navLinks=allNavLinks.filter(link=>!link.hidden);const homeLink=Object(external_osdSharedDeps_React_["useMemo"])(()=>allNavLinks.find(item=>item.id==="home"),[allNavLinks]);const appId=useObservable_default()(observables.appId$,"");const navGroupsMap=useObservable_default()(observables.navGroupsMap$,{});const currentNavGroup=useObservable_default()(observables.currentNavGroup$,undefined);const currentWorkspace=useObservable_default()(observables.currentWorkspace$);const visibleUseCases=Object(external_osdSharedDeps_React_["useMemo"])(()=>getVisibleUseCases(navGroupsMap),[navGroupsMap]);const currentNavGroupId=Object(external_osdSharedDeps_React_["useMemo"])(()=>{if(!currentNavGroup){if(visibleUseCases.length===1){return visibleUseCases[0].id}if(!capabilities.workspaces.enabled){return core_utils["a"]}}return currentNavGroup===null||currentNavGroup===void 0?void 0:currentNavGroup.id},[capabilities,currentNavGroup,visibleUseCases]);const shouldAppendManageCategory=capabilities.workspaces.enabled?!currentNavGroupId:currentNavGroupId===core_utils["a"];const navLinksForRender=Object(external_osdSharedDeps_React_["useMemo"])(()=>{const getSystemNavGroups=()=>{const result=[];
17Object.values(navGroupsMap).sort(sortBy("order")).forEach(navGroup=>{if(navGroup.type!==types["b"].SYSTEM){return}const visibleNavLinksWithinNavGroup=fulfillRegistrationLinksToChromeNavLinks(navGroup.navLinks,navLinks);if(visibleNavLinksWithinNavGroup[0]){result.push({...visibleNavLinksWithinNavGroup[0],title:navGroup.title,category:core_utils["b"].manage})}});return result};const navLinksResult=[];if(currentNavGroupId){var _navGroupsMap$current;navLinksResult.push(...((_navGroupsMap$current=navGroupsMap[currentNavGroupId])===null||_navGroupsMap$current===void 0?void 0:_navGroupsMap$current.navLinks)||[])}if(shouldAppendManageCategory){navLinksResult.push(...getSystemNavGroups())}return fulfillRegistrationLinksToChromeNavLinks(navLinksResult,navLinks)},[navLinks,navGroupsMap,currentNavGroupId,shouldAppendManageCategory]);const width=Object(external_osdSharedDeps_React_["useMemo"])(()=>{if(!isNavOpen){return NavWidth.Collapsed}return NavWidth.Expanded},[isNavOpen]);const onGroupClick=(e,group)=>{var _navGroupsMap$group$i;const fulfilledLinks=fulfillRegistrationLinksToChromeNavLinks((_navGroupsMap$group$i=navGroupsMap[group.id])===null||_navGroupsMap$group$i===void 0?void 0:_navGroupsMap$group$i.navLinks,navLinks);setCurrentNavGroup(group.id);const firstLink=fulfilledLinks[0];if(firstLink){const propsForEui=createEuiListItem({link:firstLink,appId:appId,dataTestSubj:"collapsibleNavAppLink",navigateToApp:navigateToApp});propsForEui.onClick(e)}};const rendeLeftNav=props=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlyout"],collapsible_nav_group_enabled_extends({"data-test-subj":"collapsibleNav",id:id,side:"left","aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.screenReaderLabel",{defaultMessage:"Primary"}),type:"push",onClose:closeNav,outsideClickCloses:false,className:"context-nav-wrapper",size:width,closeButtonPosition:"outside",hideCloseButton:true,paddingSize:"none",ownFocus:false},props),external_osdSharedDeps_React_default.a.createElement("div",{className:"eui-fullHeight left-navigation-wrapper"},!isNavOpen?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasBorder:false,borderRadius:"none",paddingSize:"s",hasShadow:false,color:"transparent",style:{flexGrow:0}},external_osdSharedDeps_React_default.a.createElement(CollapsibleNavTop,{homeLink:homeLink,collapsibleNavHeaderRender:collapsibleNavHeaderRender,navigateToApp:navigateToApp,logos:logos,currentNavGroup:currentNavGroupId?navGroupsMap[currentNavGroupId]:undefined,shouldShrinkNavigation:!isNavOpen,onClickShrink:closeNav})),!isNavOpen?external_osdSharedDeps_React_default.a.createElement("div",{className:"searchBarIcon euiHeaderSectionItemButton"},globalSearchCommands&&external_osdSharedDeps_React_default.a.createElement(HeaderSearchBarIcon,{globalSearchCommands:globalSearchCommands})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasBorder:false,paddingSize:"s",hasShadow:false,className:"searchBar-wrapper"},globalSearchCommands&&external_osdSharedDeps_React_default.a.createElement(HeaderSearchBar,{globalSearchCommands:globalSearchCommands})),!isNavOpen?null:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasBorder:false,borderRadius:"none",paddingSize:!isNavOpen?"s":"m",hasShadow:false,className:"eui-yScroll flex-1-container",color:"transparent",style:{paddingTop:0}},external_osdSharedDeps_React_default.a.createElement(NavGroups,{navLinks:navLinksForRender,navigateToApp:navigateToApp,onNavItemClick:(event,navItem)=>{var _navItem$category;if(navItem.title===collapsible_nav_group_enabled_titleForSeeAll&&(_navItem$category=navItem.category)!==null&&_navItem$category!==void 0&&_navItem$category.id){const navGroup=navGroupsMap[navItem.category.id];onGroupClick(event,navGroup)}},appId:appId,categoryCollapsible:currentNavGroupId===core_utils["a"],currentWorkspaceId:currentWorkspace===null||currentWorkspace===void 0?void 0:currentWorkspace.id})),!isNavOpen?external_osdSharedDeps_React_default.a.createElement("div",{className:"flex-1-container"}):null,external_osdSharedDeps_React_default.a.createElement("div",{className:classnames_default()({"bottom-container":true,"eui-xScroll":isNavOpen,"bottom-container-collapsed":!isNavOpen,"bottom-container-expanded":isNavOpen})},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsLeftBottom$,className:classnames_default()({"nav-control
17s-padding":isNavOpen})}))));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHideFor"],{sizes:["xs","s","m"]},rendeLeftNav()),isNavOpen?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiShowFor"],{sizes:["xs","s","m"]},rendeLeftNav({type:"overlay",size:undefined,outsideClickCloses:true,paddingSize:undefined,ownFocus:true})):null)}var header=__webpack_require__(304);const HeaderActionMenu=_ref=>{let{actionMenu$:actionMenu$}=_ref;const[mounter,setMounter]=Object(external_osdSharedDeps_React_["useState"])({mount:undefined});Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>{const s=actionMenu$.subscribe(value=>{setMounter({mount:value})});return()=>s.unsubscribe()},[actionMenu$]);const elementRef=Object(external_osdSharedDeps_React_["useRef"])(null);const unmountRef=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>{if(unmountRef.current){unmountRef.current();unmountRef.current=null}if(mounter.mount&&elementRef.current){try{unmountRef.current=mounter.mount(elementRef.current)}catch(e){console.error(e)}}},[mounter]);return external_osdSharedDeps_React_default.a.createElement("div",{"data-test-subj":"headerAppActionMenu",className:"headerAppActionMenu",ref:elementRef})};function header_badge_defineProperty(e,r,t){return(r=header_badge_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function header_badge_toPropertyKey(t){var i=header_badge_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function header_badge_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class header_badge_HeaderBadge extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);header_badge_defineProperty(this,"subscription",void 0);this.state={badge:undefined}}componentDidMount(){this.subscribe()}componentDidUpdate(prevProps){if(prevProps.badge$===this.props.badge$){return}this.unsubscribe();this.subscribe()}componentWillUnmount(){this.unsubscribe()}render(){if(this.state.badge==null){return null}return external_osdSharedDeps_React_default.a.createElement("div",{className:"chrHeaderBadge__wrapper"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBetaBadge"],{"data-test-subj":"headerBadge","data-test-badge-label":this.state.badge.text,tabIndex:0,label:this.state.badge.text,tooltipContent:this.state.badge.tooltip,iconType:this.state.badge.iconType}))}subscribe(){this.subscription=this.props.badge$.subscribe(badge=>{this.setState({badge:badge})})}unsubscribe(){if(this.subscription){this.subscription.unsubscribe();this.subscription=undefined}}}function HeaderBreadcrumbs(_ref){let{appTitle$:appTitle$,breadcrumbs$:breadcrumbs$,breadcrumbsEnricher$:breadcrumbsEnricher$,useUpdatedHeader:useUpdatedHeader,renderFullLength:renderFullLength,hideTrailingSeparator:hideTrailingSeparator}=_ref;const appTitle=useObservable_default()(appTitle$,"OpenSearch Dashboards");const breadcrumbs=useObservable_default()(breadcrumbs$,[]);const[breadcrumbEnricher,setBreadcrumbEnricher]=Object(external_osdSharedDeps_React_["useState"])(undefined);Object(external_osdSharedDeps_React_["useEffect"])(()=>{const sub=breadcrumbsEnricher$.subscribe(enricher=>{setBreadcrumbEnricher(()=>enricher)});return()=>sub.unsubscribe()});let crumbs=breadcrumbs;if(breadcrumbs.length===0&&appTitle){crumbs=[{text:appTitle}]}if(breadcrumbEnricher){crumbs=breadcrumbEnricher(crumbs)}crumbs=crumbs.map((breadcrumb,i)=>({...breadcrumb,"data-test-subj":classnames_default()("breadcrumb",breadcrumb["data-test-subj"],i===0&&"first",i===crumbs.length-1&&"last")}));const remainingCrumbs=useUpdatedHeader?crumbs.slice(0,-1):crumbs;if(hideTrailingSeparator){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSimplifiedBreadcrumbs"],{breadcrumbs:crumbs,hideLastBreadCrumb:!renderFullLength,max:10,"data-test-subj":"breadcrumbs",hideTrailingSeparator:true,disableTrailingLink:true})}else{return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderBreadcrumbs"],{breadcrumbs:renderFullLength?crumbs:remainingCrumbs,max:10,"data-test-subj":"breadcrumbs",simplify:!!useUpdatedHeader})}}var header_controls_container=__webpack_require__(317);const header_controls_container_HeaderControlsContainer=_ref=>
17{let{controls$:controls$,className:className,"data-test-subj":testSubject}=_ref;const[mounter,setMounter]=Object(external_osdSharedDeps_React_["useState"])({mount:undefined});Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>{const s=controls$.subscribe(value=>{setMounter({mount:value})});return()=>s.unsubscribe()},[controls$]);const elementRef=Object(external_osdSharedDeps_React_["useRef"])(null);const unmountRef=Object(external_osdSharedDeps_React_["useRef"])(null);Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>{if(unmountRef.current){unmountRef.current();unmountRef.current=null}if(mounter.mount&&elementRef.current){try{unmountRef.current=mounter.mount(elementRef.current)}catch(e){console.error(e)}}},[mounter]);const containerClassName=classnames_default()("euiHeaderSection","euiHeaderSection--dontGrow","headerControl",className);return external_osdSharedDeps_React_default.a.createElement("div",{"data-test-subj":testSubject||"headerControl",className:containerClassName,ref:elementRef})};function header_help_menu_extends(){return header_help_menu_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},header_help_menu_extends.apply(null,arguments)}function header_help_menu_defineProperty(e,r,t){return(r=header_help_menu_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function header_help_menu_toPropertyKey(t){var i=header_help_menu_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function header_help_menu_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class header_help_menu_HeaderHelpMenuUI extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);header_help_menu_defineProperty(this,"subscription",void 0);header_help_menu_defineProperty(this,"createGithubUrl",(labels,title)=>{const url=new URL("https://github.com/opensearch-project/OpenSearch-Dashboards/issues/new?");if(labels.length){url.searchParams.set("labels",labels.join(","))}if(title){url.searchParams.set("title",title)}return url.toString()});header_help_menu_defineProperty(this,"createCustomLink",(index,text,addSpacer,buttonProps)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],{key:`helpButton${index}`},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],header_help_menu_extends({},buttonProps,{size:"xs",flush:"left"}),text),addSpacer&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"})));header_help_menu_defineProperty(this,"onMenuButtonClick",()=>{this.setState({isOpen:!this.state.isOpen})});header_help_menu_defineProperty(this,"closeMenu",()=>{this.setState({isOpen:false})});this.state={isOpen:false,helpExtension:undefined,helpSupportUrl:""}}componentDidMount(){this.subscription=Object(external_osdSharedDeps_Rxjs_["combineLatest"])(this.props.helpExtension$,this.props.helpSupportUrl$).subscribe(_ref=>{let[helpExtension,helpSupportUrl]=_ref;this.setState({helpExtension:helpExtension,helpSupportUrl:helpSupportUrl})})}componentWillUnmount(){if(this.subscription){this.subscription.unsubscribe();this.subscription=undefined}}render(){const{intl:intl,opensearchDashboardsVersion:opensearchDashboardsVersion,useDefaultContent:useDefaultContent,opensearchDashboardsDocLink:opensearchDashboardsDocLink,surveyLink:surveyLink,useUpdatedAppearance:useUpdatedAppearance}=this.props;const{helpExtension:helpExtension,helpSupportUrl:helpSupportUrl}=this.state;const defaultContent=useDefaultContent?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_["Fragment"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{href:opensearchDashboardsDocLink,target:"_blank",size:"xs",flush:"left"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuOpenSearchDashboardsDocumentationTitle",defaultMessage:"Documentation"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{href:helpSupportUrl,target:"_blank",size:"xs",flush:"left"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuAskOpenSearchTitle",defaultMessage:"Community"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),surveyLink&&external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{href:surveyLink,target:"_blank",size:"xs",flush:"left"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuFeedbackSurveyTitle",defaultMessage:"Give feedback"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"xs"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],{href:GITHUB_CREATE_ISSUE_LINK,target:"_blank",size:"xs",iconType:"logoGithub",flush:"left"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuOpenGitHubIssueTitle",defaultMessage:"Open an issue in G
17itHub"}))):null;let customContent;if(helpExtension){const{appName:appName,links:links,content:content}=helpExtension;const getFeedbackText=()=>external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.chrome.headerGlobalNav.helpMenuGiveFeedbackOnApp",{defaultMessage:"Give feedback on {appName}",values:{appName:helpExtension.appName}});const customLinks=links&&links.map((link,index)=>{const{linkType:linkType,title:title,labels:labels=[],content:text,...rest}=link;switch(linkType){case"documentation":return this.createCustomLink(index,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuDocumentation",defaultMessage:"Documentation"}),index<links.length-1,{target:"_blank",rel:"noopener",...rest});case"github":return this.createCustomLink(index,getFeedbackText(),index<links.length-1,{iconType:"logoGithub",href:this.createGithubUrl(labels,title),target:"_blank",rel:"noopener",...rest});case"discuss":return this.createCustomLink(index,getFeedbackText(),index<links.length-1,{iconType:"editorComment",target:"_blank",rel:"noopener",...rest});case"custom":return this.createCustomLink(index,text,index<links.length-1,{...rest});default:break}});customContent=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"xxs"},external_osdSharedDeps_React_default.a.createElement("h3",null,appName)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),customLinks,content&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,customLinks&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(header_extension_HeaderExtension,{extension:content})))}const button=useUpdatedAppearance?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:intl.formatMessage({id:"core.ui.chrome.headerGlobalNav.helpMenuButtonTitle",defaultMessage:"Help"})},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{iconType:"iInCircle",color:"text",size:"xs","aria-expanded":this.state.isOpen,"aria-haspopup":"true","aria-label":intl.formatMessage({id:"core.ui.chrome.headerGlobalNav.helpMenuButtonAriaLabel",defaultMessage:"Help menu"}),onClick:this.onMenuButtonClick})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:intl.formatMessage({id:"core.ui.chrome.headerGlobalNav.helpMenuButtonTitle",defaultMessage:"Help"}),delay:"long",position:"bottom"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItemButton"],{"aria-expanded":this.state.isOpen,"aria-haspopup":"true","aria-label":intl.formatMessage({id:"core.ui.chrome.headerGlobalNav.helpMenuButtonAriaLabel",defaultMessage:"Help menu"}),onClick:this.onMenuButtonClick},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"questionInCircle",size:"m"})));return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{anch
17orPosition:useUpdatedAppearance?"rightDown":"downRight",button:button,closePopover:this.closeMenu,"data-test-subj":"helpMenuButton",id:"headerHelpMenu",isOpen:this.state.isOpen,ownFocus:true,repositionOnScroll:true,panelPaddingSize:"s"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopoverTitle"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{responsive:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,external_osdSharedDeps_React_default.a.createElement("h2",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuTitle",defaultMessage:"Help"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,className:"chrHeaderHelpMenu__version"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.chrome.headerGlobalNav.helpMenuVersion",defaultMessage:"v {version}",values:{version:opensearchDashboardsVersion}})))),external_osdSharedDeps_React_default.a.createElement("div",{style:{maxWidth:270}},defaultContent,defaultContent&&customContent&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHorizontalRule"],{margin:"m"}),customContent))}}const HeaderHelpMenu=Object(external_osdSharedDeps_OsdI18nReact_["injectI18n"])(header_help_menu_HeaderHelpMenuUI);HeaderHelpMenu.defaultProps={useDefaultContent:true};var header_logo=__webpack_require__(330);function header_logo_onClick(event,forceNavigation,navLinks,navigateToApp){var _event$nativeEvent$ta;const anchor=(_event$nativeEvent$ta=event.nativeEvent.target)===null||_event$nativeEvent$ta===void 0?void 0:_event$nativeEvent$ta.closest("a");if(!anchor){return}const navLink=navLinks.find(item=>item.href===anchor.href);if(navLink&&navLink.disabled){event.preventDefault();return}if(event.isDefaultPrevented()||event.altKey||event.metaKey||event.ctrlKey){return}if(forceNavigation){const toParsed=url_default.a.parse(anchor.href);const fromParsed=url_default.a.parse(document.location.href);const sameProto=toParsed.protocol===fromParsed.protocol;const sameHost=toParsed.host===fromParsed.host;const samePath=toParsed.path===fromParsed.path;if(sameProto&&sameHost&&samePath){if(toParsed.hash){document.location.reload()}event.stopPropagation()}}else{navigateToApp("home");event.preventDefault()}}function HeaderLogo(_ref){let{href:href,navigateToApp:navigateToApp,branding:branding,logos:logos,backgroundColorScheme:backgroundColorScheme,...observables}=_ref;const forceNavigation=useObservable_default()(observables.forceNavigation$,false);const navLinks=useObservable_default()(observables.navLinks$,[]);const{applicationTitle:applicationTitle="opensearch dashboards"}=branding;const{[backgroundColorScheme==="dark"?"dark":"light"]:{url:logoURL},type:logoType}=logos.Application;const testSubj=`${logoType}Logo`;const alt=`${applicationTitle} logo`;return external_osdSharedDeps_React_default.a.createElement("a",{"data-test-subj":"logo",onClick:e=>header_logo_onClick(e,forceNavigation,navLinks,navigateToApp),href:href,"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel",{defaultMessage:"Go to home page"}),className:"logoContainer"},external_osdSharedDeps_React_default.a.createElement("img",{"data-test-subj":testSubj,"data-test-image-url":logoURL,src:logoURL,alt:alt,loading:"lazy",className:"logoImage"}))}var home_loader=__webpack_require__(343);const HomeIcon=_ref=>{let{branding:branding,logos:logos}=_ref;const{applicationTitle:applicationTitle="opensearch dashboards",useExpandedHeader:useExpandedHeader=true}=branding;const{url:markURL,type:markType}=logos.Mark;let markIcon=markURL;let testSubj=`${markType}Mark`;let markIconSize="l";if(markType!=="custom"&&useExpandedHeader){markIcon="home";testSubj="homeIcon";markIconSize="m"}const alt=`${applicationTitle} home`;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{"data-test-subj":testSubj,"data-test-image-url":markIcon,type:markIcon,title:alt,size:markIconSize,className:"logoImage"})};function findClosestAnchor(element){let current=element;while(current){if(current.tagName==="A"){return current}if(!current.parentElement||current.parentElement===document.body){return undefined}current=current.parentElement}}function home_loader_onClick(event,forceNavigation,navLinks,navigateToApp){const anchor=findClosestAnchor(event.nativeEvent.target);if(!anchor){return}const navLink=navLinks.find(item=>item.href===anchor.href);if(navLink&&navLink.disabled){event.preventDefault();return}if(event.isDefaultPrevented()||event.altKey||event.metaKey||event.ctrlKey){return}if(forceNavigation){const toParsed=url_default.a.parse(anchor.href);const fromParsed=url_default.a.parse(document.location.href);const sameProto=toParsed.protocol===fromParsed.protocol;const sameHost=toParsed.host===fromParsed.host;const samePath=toParsed.path===fromParsed.path;if(sameProto&&sameHost&&samePath){if(toParsed.hash){document.location.reload()}event.stopPropagation()}}else{navigateToApp("home");event.preventDefault()}}function HomeLoader(_ref){let{href:href,navigateToApp:navigateToApp,branding:branding,logos:logos,...observables}=_ref;const forceNavigation=useObservable_default()(observables.forceNavigation$,false);const navLinks=useObservable_default()(observables.navLinks$,[]);const loadingCount=useObservable_default()(observables.loadingCount$,0);const label=external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel",{defaultMessage:"Go to home page"});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:label,delay:"long"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItemButton"],{className:"header__homeLoaderNavButton","data-test-subj":"homeLoader",onClick:e=>home_loader_onClick(e,forceNavigation,navLinks,navigateToApp),href:href,"aria-label":label},!(loadingCount>0)&&external_osdSharedDeps_React_default.a.createElement("div",{className:"homeIconContainer"},external_osdSharedDeps_React_default.a.createElement(HomeIcon,{branding:branding,logos:logos}
17)),external_osdSharedDeps_React_default.a.createElement("div",{className:"loaderContainer"},external_osdSharedDeps_React_default.a.createElement(loading_indicator_LoadingIndicator,{loadingCount$:observables.loadingCount$}))))}var external_osdSharedDeps_Moment_=__webpack_require__(28);var external_osdSharedDeps_Moment_default=__webpack_require__.n(external_osdSharedDeps_Moment_);var recent_items=__webpack_require__(356);function recent_items_extends(){return recent_items_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},recent_items_extends.apply(null,arguments)}const widthForRightMargin=8;const bulkGetDetail=(savedObjects,http)=>Promise.all(savedObjects.map(obj=>http.get(`/api/opensearch-dashboards/management/saved_objects/${encodeURIComponent(obj.type)}/${encodeURIComponent(obj.id)}`,{prependOptions:{withoutClientBasePath:true}}).catch(error=>({id:obj.id,type:obj.type,error:error,attributes:{},references:[],meta:{},updated_at:""}))));const recentsRadios=[{id:"5",label:"5 pages"},{id:"10",label:"10 pages"},{id:"15",label:"15 pages"}];const RecentItems=_ref=>{let{recentlyAccessed$:recentlyAccessed$,workspaceList$:workspaceList$,navigateToUrl:navigateToUrl,navLinks$:navLinks$,basePath:basePath,renderBreadcrumbs:renderBreadcrumbs,buttonSize:buttonSize="s",http:http,loadingCount$:loadingCount$,workspaceEnabled:workspaceEnabled}=_ref;const[isPopoverOpen,setIsPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const[isPreferencesPopoverOpen,setIsPreferencesPopoverOpen]=Object(external_osdSharedDeps_React_["useState"])(false);const recentlyAccessedItems=useObservable_default()(recentlyAccessed$,[]);const[recentsRadioIdSelected,setRecentsRadioIdSelected]=Object(external_osdSharedDeps_React_["useState"])(recentsRadios[0].id);const workspaceList=useObservable_default()(workspaceList$,[]);const[detailedSavedObjects,setDetailedSavedObjects]=Object(external_osdSharedDeps_React_["useState"])([]);const navLinks=useObservable_default()(navLinks$,[]);const loadingCount=useObservable_default()(loadingCount$,0);const handleItemClick=link=>{navigateToUrl(link);setIsPopoverOpen(false)};const preferencePopover=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{"data-test-subj":"preferencesSettingPopover",ownFocus:false,panelPaddingSize:"s",button:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],{color:"primary",size:"xs",onClick:()=>{setIsPreferencesPopoverOpen(IsPreferencesPopoverOpe=>!IsPreferencesPopoverOpe)},iconType:"managementApp","data-test-subj":"preferencesSettingButton","aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.header.recent.preferences.buttonAriaLabel",{defaultMessage:"Preferences setting"})}),isOpen:isPreferencesPopoverOpen,anchorPosition:"downLeft",closePopover:()=>{setIsPreferencesPopoverOpen(false)}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopoverTitle"],null,external_osdSharedDeps_OsdI18n_["i18n"].translate("core.header.recent.preferences.title",{defaultMessage:"Preferences"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiRadioGroup"],{options:recentsRadios,idSelected:recentsRadioIdSelected,onChange:id=>{setRecentsRadioIdSelected(id);setIsPreferencesPopoverOpen(false)},name:"radio group",legend:{children:external_osdSharedDeps_React_default.a.createElement("span",null,external_osdSharedDeps_OsdI18n_["i18n"].translate("core.header.recent.preferences.legend",{defaultMessage:"Recents"}))}}));const recentButtonCommonProps={"aria-expanded":isPopoverOpen,"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.chrome.headerGlobalNav.viewRecentItemsAriaLabel",{defaultMessage:"View recents"}),onClick:()=>setIsPopoverOpen(prev=>!prev),"data-test-subj":"recentItemsSectionButton"};const recentButton=external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.chrome.headerGlobalNav.viewRecentItemsTooltip",{defaultMessage:"Recent"}),delay:"long",position:"bottom"},!(loadingCount>0)?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonIcon"],recent_items_extends({iconType:"recent",color:"text",size:"xs","aria-haspopup":"true",className:"headerRecentItemsButton"},recentButtonCommonProps)):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButtonEmpty"],recent_items_extends({size:"xs","aria-haspopup":"true",className:"headerRecentItemsButton headerRecentItemsButton--loadingIndicator"},recentButtonCommonProps),external_osdSharedDeps_React_default.a.createElement(loading_indicator_LoadingIndicator,{loadingCount$:loadingCount$})));Object(external_osdSharedDeps_React_["useEffect"])(()=>{const savedObjects=recentlyAccessedItems.filter(item=>{var _item$meta;return((_item$meta=item.meta)===null||_item$meta===void 0?void 0:_item$meta.type)&&(!item.workspaceId||item.workspaceId&&!!workspaceList.find(workspace=>workspace.id===item.workspaceId))}).map(item=>{var _item$meta2;return{type:((_item$meta2=item.meta)===null||_item$meta2===void 0?void 0:_item$meta2.type)||"",id:item.id}});if(savedObjects.length){bulkGetDetail(savedObjects,http).then(res=>{const formatDetailedSavedObjects=res.map(obj=>{const recentAccessItem=recentlyAccessedItems.find(item=>item.id===obj.id);const findWorkspace=workspaceList.find(workspace=>workspace.id===recentAccessItem.workspaceId);return{...recentAccessItem,...obj,...recentAccessItem.meta,updatedAt:external_osdSharedDeps_Moment_default()(obj===null||obj===void 0?void 0:obj.updated_at).valueOf(),workspaceName:findWorkspace===null||findWorkspace===void 0?void 0:findWorkspace.name}});setDetailedSavedObjects(formatDetailedSavedObjects)})}},[recentlyAccessedItems,http,workspaceList]);const selectedRecentItems=Object(external_osdSharedDeps_React_["useMemo"])(()=>detailedSavedObjects.slice(0,Number(recentsRadioIdSelected)),[detailedSavedObjects,recentsRadioIdSelected]);return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPopover"],{button:recentButton,isOpen:isPopoverOpen,closePopover:()=>{setIsPopoverOpen(false)},anchorPosition:"downCenter",repositionOnScroll:true,initialFocus:false,panelPaddingSize:"m"},renderBreadcrumbs,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPanel"],{hasShadow:false,hasBorder:false,paddingSize:"none",style:{maxHeight:"35vh"},className:"euiYScrollWithShadows"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"xxs"},external_osdSharedDeps_React_default.a.createElement("h4",null,external_osdSharedDeps_OsdI18n_["i18n"].translate("core.header.recent.title",{defaultMessage:"Recent assets"}))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),selectedRecentItems.length>0?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroup"],{flush:true,gutterSize:"s"},selectedRecentItems.map(item=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiListGroupItem"],{onClick:()=>
17handleItemClick(createRecentNavLink(item,navLinks.filter(link=>!link.hidden),basePath,navigateToUrl,!!workspaceEnabled).href),key:item.link,style:{padding:"1px"},label:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{style:{marginRight:widthForRightMargin},type:item.meta.icon||"apps",color:"text"}),item.label+" ",item.workspaceName?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTextColor"],{color:"subdued"},"(",item.workspaceName,")"):null),color:"text",size:"s"}))):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"subdued",size:"s"},external_osdSharedDeps_OsdI18n_["i18n"].translate("core.header.recent.no.recents",{defaultMessage:"No recently viewed items"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"m"})),preferencePopover)};function header_extends(){return header_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},header_extends.apply(null,arguments)}const hasValue=value=>{if(Array.isArray(value)&&value.length===0){return false}return Boolean(value)};function Header(_ref){let{http:http,opensearchDashboardsVersion:opensearchDashboardsVersion,opensearchDashboardsDocLink:opensearchDashboardsDocLink,application:application,basePath:basePath,onIsLockedUpdate:onIsLockedUpdate,homeHref:homeHref,branding:branding,survey:survey,logos:logos,collapsibleNavHeaderRender:collapsibleNavHeaderRender,navGroupEnabled:navGroupEnabled,setCurrentNavGroup:setCurrentNavGroup,useUpdatedHeader:useUpdatedHeader,globalSearchCommands:globalSearchCommands,...observables}=_ref;const isVisible=useObservable_default()(observables.isVisible$,false);const headerVariant=useObservable_default()(observables.headerVariant$,HeaderVariant.PAGE);const isLocked=useObservable_default()(observables.isLocked$,false);const[isNavOpenState,setIsNavOpenState]=Object(external_osdSharedDeps_React_["useState"])(false);const sidecarConfig=useObservable_default()(observables.sidecarConfig$,undefined);const breadcrumbs=useObservable_default()(observables.breadcrumbs$,[]);const currentLeftControls=Object(utils["f"])(application.currentLeftControls$);const navControlsLeft=useObservable_default()(observables.navControlsLeft$);const currentCenterControls=Object(utils["f"])(application.currentCenterControls$);const navControlsExpandedCenter=useObservable_default()(observables.navControlsExpandedCenter$);const navControlsCenter=useObservable_default()(observables.navControlsCenter$);const currentRightControls=Object(utils["f"])(application.currentRightControls$);const navControlsExpandedRight=useObservable_default()(observables.navControlsExpandedRight$);const navControlsRight=useObservable_default()(observables.navControlsRight$);const currentActionMenu=Object(utils["f"])(application.currentActionMenu$);const currentBadgeControls=Object(utils["f"])(application.currentBadgeControls$);const observableBadge=useObservable_default()(observables.badge$);const sidecarPaddingStyle=Object(external_osdSharedDeps_React_["useMemo"])(()=>getOsdSidecarPaddingStyle(sidecarConfig),[sidecarConfig]);const isNavOpen=useUpdatedHeader?isLocked:isNavOpenState;const setIsNavOpen=Object(external_osdSharedDeps_React_["useCallback"])(value=>{if(useUpdatedHeader){onIsLockedUpdate(value)}else{setIsNavOpenState(value)}},[setIsNavOpenState,onIsLockedUpdate,useUpdatedHeader]);if(!isVisible){return external_osdSharedDeps_React_default.a.createElement(loading_indicator_LoadingIndicator,{loadingCount$:observables.loadingCount$,showAsBar:true})}const toggleCollapsibleNavRef=Object(external_osdSharedDeps_React_["createRef"])();const navId=Object(external_osdSharedDeps_ElasticEui_["htmlIdGenerator"])()();const className=classnames_default()("hide-for-sharing","headerGlobalNav");const{useExpandedHeader:useExpandedHeader=true}=branding;const useApplicationHeader=headerVariant===HeaderVariant.APPLICATION;const expandedHeaderColorScheme="dark";const renderLegacyExpandedHeader=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"expandedHeader",theme:expandedHeaderColorScheme,style:sidecarPaddingStyle,position:"fixed",sections:[{items:[external_osdSharedDeps_React_default.a.createElement(HeaderLogo,{href:homeHref,forceNavigation$:observables.forceAppSwitcherNavigation$,navLinks$:observables.navLinks$,navigateToApp:application.navigateToApp,branding:branding,logos:logos,backgroundColorScheme:expandedHeaderColorScheme})],borders:"none"},{items:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiShowFor"],{sizes:["m","l","xl","xxl","xxxl"]}
17,external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsExpandedCenter$}))],borders:"none"},{items:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHideFor"],{sizes:["m","l","xl","xxl","xxxl"]},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsExpandedCenter$})),external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsExpandedRight$})],borders:"none"}]});const renderBreadcrumbs=(renderFullLength,hideTrailingSeparator)=>external_osdSharedDeps_React_default.a.createElement(HeaderBreadcrumbs,{appTitle$:observables.appTitle$,breadcrumbs$:observables.breadcrumbs$,breadcrumbsEnricher$:observables.breadcrumbsEnricher$,useUpdatedHeader:useUpdatedHeader,renderFullLength:renderFullLength,hideTrailingSeparator:hideTrailingSeparator});const renderNavToggle=()=>{const renderNavToggleWithExtraProps=props=>{const{isSmallScreen:isSmallScreen,...others}=props;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItemButton"],header_extends({"data-test-subj":"toggleNavButton","aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.toggleNavAriaLabel",{defaultMessage:"Toggle primary navigation"}),onClick:()=>setIsNavOpen(!isNavOpen),"aria-expanded":isNavOpen,"aria-pressed":isNavOpen,"aria-controls":navId,ref:toggleCollapsibleNavRef},others,{className:classnames_default()(useUpdatedHeader?useApplicationHeader?"newAppTopNavExpander":"newPageTopNavExpander":undefined,props.className)}),props.isSmallScreen?external_osdSharedDeps_React_default.a.createElement("span",{className:"euiButtonIcon euiButtonIcon--subdued euiButtonIcon--xSmall "},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.menu",{defaultMessage:"Menu"}),type:"menu",size:"s"})):external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"menu",size:"m",title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.primaryNav.menu",{defaultMessage:"Menu"})}))};return useUpdatedHeader?external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,isNavOpen?null:renderNavToggleWithExtraProps({className:"navToggleInLargeScreen eui-hideFor--xs eui-hideFor--s eui-hideFor--m"}),renderNavToggleWithExtraProps({flush:"both",className:"navToggleInSmallScreen eui-hideFor--xl eui-hideFor--l eui-hideFor--xxl eui-hideFor--xxxl",isSmallScreen:true})):renderNavToggleWithExtraProps({})};const renderLeftControls=()=>{const hasLeftControls=hasValue(currentLeftControls);const hasNavControlsLeft=hasValue(navControlsLeft);if(!hasLeftControls&&!hasNavControlsLeft&&useUpdatedHeader){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerLeftControl",controls$:application.currentLeftControls$})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:useUpdatedHeader?"none":"right"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{side:"left",navControls$:observables.navControlsLeft$})))};const renderCenterControls=()=>{const hasCenterControls=hasValue(currentCenterControls);const hasNavControlsExpandedCenter=hasValue(navControlsExpandedCenter);const hasNavControlsCenter=hasValue(navControlsCenter);if(!hasCenterControls&&!hasNavControlsExpandedCenter&&!hasNavControlsCenter&&useUpdatedHeader){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsExpandedCenter$})),useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerCenterControl",controls$:application.currentCenterControls$})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:useUpdatedHeader?"none":"left"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsCenter$})))};const renderRightControls=()=>{const hasNavControlsExpandedRight=hasValue(navControlsExpandedRight);const hasRightControls=hasValue(currentRightControls);const hasNavControlsRight=hasValue(navControlsRight);
17if(!hasRightControls&&!hasNavControlsExpandedRight&&!hasNavControlsRight&&useUpdatedHeader){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsExpandedRight$})),useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerRightControl",controls$:application.currentRightControls$})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:useUpdatedHeader?"none":"left"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{side:"right",navControls$:observables.navControlsRight$})))};const renderActionMenu=()=>{const hasActionMenu=hasValue(currentActionMenu);if(!hasActionMenu&&useUpdatedHeader){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none",className:"headerAppActionMenuSection"},external_osdSharedDeps_React_default.a.createElement(HeaderActionMenu,{actionMenu$:application.currentActionMenu$}))};const renderBadge=()=>{const hasBadge=hasValue(observableBadge);const hasCurrentBadgeControls=hasValue(currentBadgeControls);if(!hasBadge&&!hasCurrentBadgeControls&&useUpdatedHeader){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,useUpdatedHeader&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerBadgeControl",controls$:application.currentBadgeControls$})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(header_badge_HeaderBadge,{badge$:observables.badge$})))};const renderHelp=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"left"},external_osdSharedDeps_React_default.a.createElement(HeaderHelpMenu,{helpExtension$:observables.helpExtension$,helpSupportUrl$:observables.helpSupportUrl$,opensearchDashboardsDocLink:opensearchDashboardsDocLink,opensearchDashboardsVersion:opensearchDashboardsVersion,surveyLink:survey}));const renderRecentItems=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:useUpdatedHeader?"none":"right"},external_osdSharedDeps_React_default.a.createElement(RecentItems,{http:http,navLinks$:observables.navLinks$,basePath:basePath,recentlyAccessed$:observables.recentlyAccessed$,workspaceList$:observables.workspaceList$,navigateToUrl:application.navigateToUrl,renderBreadcrumbs:renderBreadcrumbs(true,true),buttonSize:useApplicationHeader?"s":"xs",loadingCount$:observables.loadingCount$,workspaceEnabled:application.capabilities.workspaces.enabled}));const renderPrimaryHeaderRight=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none"},external_osdSharedDeps_React_default.a.createElement(HeaderNavControls,{navControls$:observables.navControlsPrimaryHeaderRight$}));const leftControls=renderLeftControls();const centerControls=renderCenterControls();const rightControls=renderRightControls();const actionMenu=renderActionMenu();const badge=renderBadge();const renderLegacyHeader=()=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{position:"fixed",className:"primaryHeader",style:sidecarPaddingStyle},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"right",className:"header__toggleNavButtonSection"},renderNavToggle()),leftControls,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"right"},external_osdSharedDeps_React_default.a.createElement(HomeLoader,{href:homeHref,forceNavigation$:observables.forceAppSwitcherNavigation$,navLinks$:observables.navLinks$,navigateToApp:application.navigateToApp,branding:branding,logos:logos,loadingCount$:observables.loadingCount$}))),renderBreadcrumbs(),badge,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{side:"right"},actionMenu,centerControls,rightControls,renderHelp()));const renderPageHeader=()=>{var _breadcrumbs;return external_osdSharedDeps_React_default.a.createElement("div",{style:sidecarPaddingStyle},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"primaryHeader newTopNavHeader"},renderNavToggle(),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{grow:false},renderRecentItems()),renderBreadcrumbs(false,false),renderPrimaryHeaderRight()),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"newTopNavHeader"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{justifyContent:"spaceBetween",gutterSize:"none",className:"secondaryPageHeaderFlexGroup"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{side:"left",grow:true,style:{flexShrink:1}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s",className:"leftSecondaryPageHeaderFlexGroup"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItem"],{border:"none","data-test-subj":"headerApplicationTitle"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"l",className:"newTopNavHeaderTitle"},breadcrumbs&&external_osdSharedDeps_React_default.a.createElement("h1",{className:"eui-textBreakWord"},(_breadcrumbs=breadcrumbs[breadcrumbs.length-1])===null||_breadcrumbs===void 0?void 0:_breadcrumbs.text)))),badge&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},badge),leftControls&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},leftControls))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{side:"right"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{gutterSize:"s"},centerControls&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,centerControls),actionMenu&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null,actionMenu),right
17Controls&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],null," ",rightControls))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"newTopNavHeader"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerDescriptionControl",controls$:application.currentDescriptionControls$,className:"headerDescriptionControl"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"newTopNavHeader"},external_osdSharedDeps_React_default.a.createElement(header_controls_container_HeaderControlsContainer,{"data-test-subj":"headerBottomControl",controls$:application.currentBottomControls$,className:"headerBottomControl"})))};const renderApplicationHeader=()=>external_osdSharedDeps_React_default.a.createElement("div",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeader"],{className:"primaryApplicationHeader newTopNavHeader",style:sidecarPaddingStyle},renderNavToggle(),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{side:"left",grow:true},renderRecentItems(),actionMenu),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSection"],{side:"right"},rightControls,renderPrimaryHeaderRight())),external_osdSharedDeps_React_default.a.createElement("div",{id:"applicationHeaderFilterBar"}));const renderHeader=()=>useApplicationHeader?renderApplicationHeader():renderPageHeader();return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("header",{className:className,"data-test-subj":"headerGlobalNav"},external_osdSharedDeps_React_default.a.createElement("div",{id:"globalHeaderBars"},!useUpdatedHeader&&useExpandedHeader&&renderLegacyExpandedHeader(),useUpdatedHeader?renderHeader():renderLegacyHeader()),navGroupEnabled?external_osdSharedDeps_React_default.a.createElement(CollapsibleNavGroupEnabled,{appId$:application.currentAppId$,collapsibleNavHeaderRender:collapsibleNavHeaderRender,id:navId,navLinks$:observables.navLinks$,isNavOpen:isNavOpen,basePath:basePath,navigateToApp:application.navigateToApp,navigateToUrl:application.navigateToUrl,closeNav:()=>{setIsNavOpen(false);if(toggleCollapsibleNavRef.current){toggleCollapsibleNavRef.current.focus()}},customNavLink$:observables.customNavLink$,logos:logos,navGroupsMap$:observables.navGroupsMap$,navControlsLeftBottom$:observables.navControlsLeftBottom$,currentNavGroup$:observables.currentNavGroup$,setCurrentNavGroup:setCurrentNavGroup,capabilities:application.capabilities,currentWorkspace$:observables.currentWorkspace$,globalSearchCommands:globalSearchCommands}):external_osdSharedDeps_React_default.a.createElement(CollapsibleNav,{appId$:application.currentAppId$,collapsibleNavHeaderRender:collapsibleNavHeaderRender,id:navId,isLocked:isLocked,navLinks$:observables.navLinks$,recentlyAccessed$:observables.recentlyAccessed$,isNavOpen:isNavOpen,homeHref:homeHref,basePath:basePath,navigateToApp:application.navigateToApp,navigateToUrl:application.navigateToUrl,onIsLockedUpdate:onIsLockedUpdate,closeNav:()=>{setIsNavOpen(false);if(toggleCollapsibleNavRef.current){toggleCollapsibleNavRef.current.focus()}},customNavLink$:observables.customNavLink$,logos:logos,workspaceEnabled:application.capabilities.workspaces.enabled})))}const RightNavigationButton=_ref=>{let{application:application,http:http,appId:appId,iconType:iconType,title:title}=_ref;const targetUrl=Object(external_osdSharedDeps_React_["useMemo"])(()=>{const appUrl=application.getUrlForApp(appId,{path:"/",absolute:false});return http.basePath.prepend(http.basePath.remove(appUrl),{withoutClientBasePath:true})},[application,http.basePath,appId]);const isLeftClickEvent=event=>event.button===0;const navigateToApp=event=>{if(isLeftClickEvent(event)&&!isModifiedOrPrevented(event)){event.preventDefault();application.navigateToUrl(targetUrl)}return};return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiToolTip"],{content:title,delay:"long",position:"bottom"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiHeaderSectionItemButton"],{"data-test-subj":"rightNavigationButton","aria-label":title,onClick:navigateToApp,href:targetUrl},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:iconType,size:"m",color:"text"})))};let ImageType=function(ImageType){ImageType["DEFAULT"]="default";ImageType["CUSTOM"]="custom";ImageType["ALTERNATIVE"]="alternative";return ImageType}({});let ColorScheme=function(ColorScheme){ColorScheme["LIGHT"]="light";ColorScheme["DARK"]="dark";return ColorScheme}({});const OPENSEARCH_DASHBOARDS_THEMED="ui/logos/opensearch_dashboards.svg";const OPENSEARCH_DASHBOARDS_ON_LIGHT="ui/logos/opensearch_dashboards_on_light.svg";const OPENSEARCH_DASHBOARDS_ON_DARK="ui/logos/opensearch_dashboards_on_dark.svg";const OPENSEARCH_THEMED="ui/logos/opensearch.svg";const OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg";const OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg";const MARK_THEMED="ui/logos/opensearch_mark.svg";const MARK_ON_LIGHT="ui/logos/opensearch_mark_on_light.svg";const MARK_ON_DARK="ui/logos/opensearch_mark_on_dark.svg";const CENTER_MARK_THEMED="ui/logos/opensearch_center_mark.svg";const CENTER_MARK_ON_LIGHT="ui/logos/opensearch_center_mark_on_light.svg";const CENTER_MARK_ON_DARK="ui/logos/opensearch_center_mark_on_dark.svg";const ANIMATED_MARK_THEMED="ui/logos/opensearch_spinner.svg";const ANIMATED_MARK_ON_LIGHT="ui/logos/opensearch_spinner_on_light.svg";const ANIMATED_MARK_ON_DARK="ui/logos/opensearch_spinner_on_dark.svg";const getFirstUsableAsset=function(assets){let requireDarkColorScheme=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;for(const{url:url,type:type,colorScheme:colorScheme}of assets){if(url&&(requireDarkColorScheme||colorScheme==="light"))return{url:url,type:type}}throw new Error("No default asset found")};const getLogo=function(assets){let requireDarkColorScheme=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;const lightAsset=getFirstUsableAsset(assets,false);const darkAsset=getFirstUsableAsset(assets,true);const colorSchemeAsset=requireDarkColorScheme?darkAsset:lightAsset;return{light:lightAsset,dark:darkAsset,url:colorSchemeAsset.url,type:colorSchemeAsset.type}};const getLogos=function(){let branding=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let serverBasePath=arguments.length>1?arguments[1]:undefined;const{logo:{defaultUrl:customLogoUrl,darkModeUrl:customDarkLogoUrl}={},mark:{defaultUrl:customMarkUrl,darkModeUrl:customDarkMarkUrl}={},loadingLogo:{defaultUrl:customAnimatedUrl,darkModeUrl:customDarkAnimatedMarkUrl}={},darkMode:darkMode=false}=branding;const defaultLightColorSchemeOpenSearchDashboards=`${serverBasePath}/${OPENSEARCH_DASHBOARDS_ON_LIGHT}`;
17const defaultDarkColorSchemeOpenSearchDashboards=`${serverBasePath}/${OPENSEARCH_DASHBOARDS_ON_DARK}`;const defaultLightColorSchemeOpenSearch=`${serverBasePath}/${OPENSEARCH_ON_LIGHT}`;const defaultDarkColorSchemeOpenSearch=`${serverBasePath}/${OPENSEARCH_ON_DARK}`;const defaultLightColorSchemeMark=`${serverBasePath}/${MARK_ON_LIGHT}`;const defaultDarkColorSchemeMark=`${serverBasePath}/${MARK_ON_DARK}`;const defaultLightColorSchemeCenterMark=`${serverBasePath}/${CENTER_MARK_ON_LIGHT}`;const defaultDarkColorSchemeCenterMark=`${serverBasePath}/${CENTER_MARK_ON_DARK}`;const defaultLightColorSchemeAnimatedMark=`${serverBasePath}/${ANIMATED_MARK_ON_LIGHT}`;const defaultDarkColorSchemeAnimatedMark=`${serverBasePath}/${ANIMATED_MARK_ON_DARK}`;const colorScheme=darkMode?ColorScheme.DARK:ColorScheme.LIGHT;return deepFreeze({OpenSearch:getLogo([{url:customDarkLogoUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.DARK},{url:customLogoUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.LIGHT},{url:defaultDarkColorSchemeOpenSearch,type:ImageType.DEFAULT,colorScheme:ColorScheme.DARK},{url:defaultLightColorSchemeOpenSearch,type:ImageType.DEFAULT,colorScheme:ColorScheme.LIGHT}],darkMode),Application:getLogo([{url:customDarkLogoUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.DARK},{url:customLogoUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.LIGHT},{url:defaultDarkColorSchemeOpenSearchDashboards,type:ImageType.DEFAULT,colorScheme:ColorScheme.DARK},{url:defaultLightColorSchemeOpenSearchDashboards,type:ImageType.DEFAULT,colorScheme:ColorScheme.LIGHT}],darkMode),Mark:getLogo([{url:customDarkMarkUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.DARK},{url:customMarkUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.LIGHT},{url:defaultDarkColorSchemeMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.DARK},{url:defaultLightColorSchemeMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.LIGHT}],darkMode),CenterMark:getLogo([{url:customDarkMarkUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.DARK},{url:customMarkUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.LIGHT},{url:defaultDarkColorSchemeCenterMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.DARK},{url:defaultLightColorSchemeCenterMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.LIGHT}],darkMode),AnimatedMark:getLogo([{url:customDarkAnimatedMarkUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.DARK},{url:customAnimatedUrl,type:ImageType.CUSTOM,colorScheme:ColorScheme.LIGHT},{url:customDarkMarkUrl,type:ImageType.ALTERNATIVE,colorScheme:ColorScheme.DARK},{url:customMarkUrl,type:ImageType.ALTERNATIVE,colorScheme:ColorScheme.LIGHT},{url:defaultDarkColorSchemeAnimatedMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.DARK},{url:defaultLightColorSchemeAnimatedMark,type:ImageType.DEFAULT,colorScheme:ColorScheme.LIGHT}],darkMode),colorScheme:colorScheme})};function nav_group_service_defineProperty(e,r,t){return(r=nav_group_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nav_group_service_toPropertyKey(t){var i=nav_group_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function nav_group_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const CURRENT_NAV_GROUP_ID="core.chrome.currentNavGroupId";const customCategory={id:"custom",label:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.customNavList.label",{defaultMessage:"Custom"}),order:(core_utils["b"].manage.order||0)+500};class nav_group_service_ChromeNavGroupService{constructor(){nav_group_service_defineProperty(this,"navGroupsMap$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"]({}));nav_group_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["ReplaySubject"](1));nav_group_service_defineProperty(this,"navLinks$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]));
17nav_group_service_defineProperty(this,"navGroupEnabled",false);nav_group_service_defineProperty(this,"navGroupEnabledUiSettingsSubscription",void 0);nav_group_service_defineProperty(this,"navGroupUpdaters$$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]));nav_group_service_defineProperty(this,"currentNavGroup$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined));nav_group_service_defineProperty(this,"currentNavGroupSubscription",void 0);nav_group_service_defineProperty(this,"currentAppIdSubscription",void 0)}addNavLinkToGroup(currentGroupsMap,navGroup,navLink){const matchedGroup=currentGroupsMap[navGroup.id];if(matchedGroup){const links=matchedGroup.navLinks;const isLinkExistInGroup=links.some(link=>link.id===navLink.id);if(isLinkExistInGroup){console.warn(`[ChromeService] Navlink of ${navLink.id} has already been registered in group ${navGroup.id}`);return currentGroupsMap}matchedGroup.navLinks.push(navLink)}else{currentGroupsMap[navGroup.id]={...navGroup,navLinks:[navLink]}}return currentGroupsMap}sortNavGroupNavLinks(navLinks,allValidNavLinks){return getSortedNavLinks(fulfillRegistrationLinksToChromeNavLinks(navLinks,allValidNavLinks))}getNavLinksForAllUseCase(navGroupsMap,navLinks){var _navGroupsMap$ALL_USE;const navLinksResult=[...((_navGroupsMap$ALL_USE=navGroupsMap[core_utils["a"]])===null||_navGroupsMap$ALL_USE===void 0?void 0:_navGroupsMap$ALL_USE.navLinks)||[]];const linkIdsWithNavGroupInfo=Object.values(navGroupsMap).reduce((accumulator,navGroup)=>{if(!navGroup.type){const categoryInfo={id:navGroup.id,label:navGroup.title,order:navGroup.order};const fulfilledLinksOfNavGroup=fulfillRegistrationLinksToChromeNavLinks(navGroup.navLinks,navLinks);const linksForAllUseCaseWithinNavGroup=[];fulfilledLinksOfNavGroup.forEach(navLink=>{if(!navLink.showInAllNavGroup){return}linksForAllUseCaseWithinNavGroup.push({...navLink,category:categoryInfo})});navLinksResult.push(...linksForAllUseCaseWithinNavGroup);if(!linksForAllUseCaseWithinNavGroup.length){fulfillRegistrationLinksToChromeNavLinks(navGroup.navLinks,navLinks).forEach(navLink=>{if(navLinksResult.find(navLinkInAll=>navLinkInAll.id===navLink.id)){return}navLinksResult.push({...navLink,category:customCategory})})}}return[...accumulator,...navGroup.navLinks.map(navLink=>navLink.id)]},[]);navLinks.forEach(navLink=>{if(linkIdsWithNavGroupInfo.includes(navLink.id)){return}navLinksResult.push({...navLink,category:customCategory})});return navLinksResult}getSortedNavGroupsMap$(){return Object(external_osdSharedDeps_Rxjs_["combineLatest"])([this.getUpdatedNavGroupsMap$(),this.navLinks$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref=>{let[navGroupsMap,navLinks]=_ref;return Object.keys(navGroupsMap).reduce((sortedNavGroupsMap,navGroupId)=>{const navGroup=navGroupsMap[navGroupId];if(navGroupId===core_utils["a"]){sortedNavGroupsMap[navGroupId]={...navGroup,navLinks:this.sortNavGroupNavLinks(this.getNavLinksForAllUseCase(navGroupsMap,navLinks),navLinks)}}else{sortedNavGroupsMap[navGroupId]={...navGroup,navLinks:this.sortNavGroupNavLinks(navGroup.navLinks,navLinks)}}return sortedNavGroupsMap},{})}))}getUpdatedNavGroupsMap$(){return Object(external_osdSharedDeps_Rxjs_["combineLatest"])([this.navGroupsMap$,this.navGroupUpdaters$$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["switchMap"])(_ref2=>{let[navGroupsMap,updaters$]=_ref2;if(updaters$.length===0){return Object(external_osdSharedDeps_Rxjs_["of"])(navGroupsMap)}return Object(external_osdSharedDeps_Rxjs_["combineLatest"])(updaters$).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(updaters=>Object.keys(navGroupsMap).reduce((previousValue,currentKey)=>({...previousValue,[currentKey]:updaters.reduce((prevNavGroup,currentUpdater)=>({...prevNavGroup,...currentUpdater(prevNavGroup)}),navGroupsMap[currentKey])}),{})))}))}setup(_ref3){let{uiSettings:uiSettings}=_ref3;this.navGroupEnabledUiSettingsSubscription=uiSettings.get$("home:useNewHomePage",false).subscribe(value=>{this.navGroupEnabled=value});return{addNavLinksToGroup:(navGroup,navLinks)=>{const currentGroupsMap={...this.navGroupsMap$.getValue()};const navGroupsMapAfterAdd=navLinks.reduce((groupsMap,navLink)=>this.addNavLinkToGroup(groupsMap,navGroup,navLink),currentGroupsMap);this.navGroupsMap$.next(navGroupsMapAfterAdd)},getNavGroupEnabled:()=>this.navGroupEnabled,registerNavGroupUpdater:updater$=>{this.navGroupUpdaters$$.next([...this.navGroupUpdaters$$.getValue(),updater$]);return()=>{this.navGroupUpdaters$$.next(this.navGroupUpdaters$$.getValue().filter(item=>item!==updater$))}}}}async start(_ref4){let{navLinks:navLinks,application:application,breadcrumbsEnricher$:breadcrumbsEnricher$,workspaces:workspaces}=_ref4;this.navLinks$=navLinks.getNavLinks$();const currentNavGroupId=sessionStorage.getItem(CURRENT_NAV_GROUP_ID);this.currentNavGroup$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](currentNavGroupId?this.navGroupsMap$.getValue()[currentNavGroupId]:undefined);const setCurrentNavGroup=navGroupId=>{const navGroup=navGroupId?this.navGroupsMap$.getValue()[navGroupId]:undefined;if(navGroup){this.currentNavGroup$.next(navGroup);sessionStorage.setItem(CURRENT_NAV_GROUP_ID,navGroup.id)}else{this.currentNavGroup$.next(undefined);sessionStorage.removeItem(CURRENT_NAV_GROUP_ID)}};const currentNavGroupSorted$=Object(external_osdSharedDeps_Rxjs_["combineLatest"])([this.get
17SortedNavGroupsMap$(),this.currentNavGroup$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref5=>{let[navGroupsMapSorted,currentNavGroup]=_ref5;if(currentNavGroup){return navGroupsMapSorted[currentNavGroup.id]}}));if(this.navGroupEnabled&&!workspaces.currentWorkspace$.getValue()){this.currentNavGroupSubscription=currentNavGroupSorted$.subscribe(currentNavGroup=>{if(currentNavGroup){breadcrumbsEnricher$.next(breadcrumbs=>this.prependCurrentNavGroupToBreadcrumbs(breadcrumbs,currentNavGroup,application.navigateToApp))}else{breadcrumbsEnricher$.next(undefined)}})}this.currentAppIdSubscription=Object(external_osdSharedDeps_Rxjs_["combineLatest"])([application.currentAppId$,this.getSortedNavGroupsMap$()]).subscribe(_ref6=>{let[appId,navGroupMap]=_ref6;if(appId&&navGroupMap){const appIdNavGroupMap=new Map;const visibleUseCases=getVisibleUseCases(navGroupMap);const mapAppIdToNavGroup=navGroup=>{navGroup.navLinks.forEach(navLink=>{const navLinkId=navLink.id;const navGroupSet=appIdNavGroupMap.get(navLinkId)||new Set;navGroupSet.add(navGroup.id);appIdNavGroupMap.set(navLinkId,navGroupSet)})};if(visibleUseCases.length===1){visibleUseCases.forEach(navGroup=>mapAppIdToNavGroup(navGroup))}else{Object.values(navGroupMap).forEach(navGroup=>{if(navGroup.status===types["a"].Hidden){return}mapAppIdToNavGroup(navGroup)})}const navGroups=appIdNavGroupMap.get(appId);if(navGroups&&navGroups.size===1){const navGroupId=navGroups.values().next().value;const navGroupInfo=navGroupMap[navGroupId];if(application.capabilities.workspaces.enabled&&visibleUseCases.length>1&&navGroupInfo.type!==types["b"].SYSTEM){setCurrentNavGroup(undefined)}else{setCurrentNavGroup(navGroupId)}}else if(!navGroups){setCurrentNavGroup(undefined)}}});return{getNavGroupsMap$:()=>this.getSortedNavGroupsMap$(),getNavGroupEnabled:()=>this.navGroupEnabled,getCurrentNavGroup$:()=>currentNavGroupSorted$,setCurrentNavGroup:setCurrentNavGroup}}prependCurrentNavGroupToBreadcrumbs(breadcrumbs,currentNavGroup,navigateToApp){const navGroupBreadcrumb={text:currentNavGroup.title,onClick:()=>{if(currentNavGroup.navLinks&¤tNavGroup.navLinks.length){navigateToApp(currentNavGroup.navLinks[0].id)}}};return[navGroupBreadcrumb,...breadcrumbs]}async stop(){var _this$navGroupEnabled,_this$currentAppIdSub,_this$currentNavGroup;this.stop$.next();(_this$navGroupEnabled=this.navGroupEnabledUiSettingsSubscription)===null||_this$navGroupEnabled===void 0||_this$navGroupEnabled.unsubscribe();(_this$currentAppIdSub=this.currentAppIdSubscription)===null||_this$currentAppIdSub===void 0||_this$currentAppIdSub.unsubscribe();(_this$currentNavGroup=this.currentNavGroupSubscription)===null||_this$currentNavGroup===void 0||_this$currentNavGroup.unsubscribe()}}function chrome_service_defineProperty(e,r,t){return(r=chrome_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function chrome_service_toPropertyKey(t){var i=chrome_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function chrome_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const IS_LOCKED_KEY="core.chrome.isLocked";class chrome_service_ChromeService{constructor(params){this.params=params;chrome_service_defineProperty(this,"isVisible$",void 0);chrome_service_defineProperty(this,"isForceHidden$",void 0);chrome_service_defineProperty(this,"headerVariant$",void 0);chrome_service_defineProperty(this,"headerVariantOverride$",void 0);chrome_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["ReplaySubject"](1));chrome_service_defineProperty(this,"navControls",new nav_controls_service_NavControlsService);chrome_service_defineProperty(this,"navLinks",new nav_links_service_NavLinksService);chrome_service_defineProperty(this,"recentlyAccessed",new recently_accessed_service_RecentlyAccessedService);chrome_service_defineProperty(this,"docTitle",new doc_title_service_DocTitleService);chrome_service_defineProperty(this,"navGroup",new nav_group_service_ChromeNavGroupService);chrome_service_defineProperty(this,"globalSearch",new GlobalSearchService);chrome_service_defineProperty(this,"useUpdatedHeader",false);chrome_service_defineProperty(this,"updatedHeaderSubscription",void 0);chrome_service_defineProperty(this,"collapsibleNavHeaderRender",void 0)}initVisibility(application){const isEmbedded="embed"in Object(url_url["parse"])(location.hash.slice(1),true).query;this.isForceHidden$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](isEmbedded);const appHidden$=Object(external_osdSharedDeps_Rxjs_["merge"])(Object(external_osdSharedDeps_Rxjs_["of"])(true),application.currentAppId$.pipe(Object(external_osdSharedDeps_RxjsOperators_["switchMap"])(appId=>application.applications$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(applications=>!!appId&&applications.has(appId)&&!!applications.get(appId).chromeless)))));this.isVisible$=Object(external_osdSharedDeps_Rxjs_["combineLatest"])([appHidden$,this.isForceHidden$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref=>{let[appHidden,forceHidden]=_ref;return!appHidden&&!forceHidden}),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$))}initHeaderVariant(application){this.headerVariantOverride$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const appHeaderVariant$=application.currentAppId$.pipe(Object(external_osdSharedDeps_RxjsOperators_["switchMap"])(appId=>application.applications$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(applications=>appId&&applications.has(appId)&&applications.get(appId).headerVariant))));this.headerVariant$=Object(external_osdSharedDeps_Rxjs_["combineLatest"])([appHeaderVariant$,this.headerVariantOverride$]).pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref2=>{let[appHeaderVariant,headerVariantOverride]=_ref2;return headerVariantOverride||appHeaderVariant}),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$))}setup(_ref3){let{uiSettings:uiSettings}=_ref3;
17const navGroup=this.navGroup.setup({uiSettings:uiSettings});const globalSearch=this.globalSearch.setup();return{registerCollapsibleNavHeader:render=>{if(this.collapsibleNavHeaderRender){console.warn("[ChromeService] An existing custom collapsible navigation bar header render has been overridden.")}this.collapsibleNavHeaderRender=render},navGroup:navGroup,globalSearch:globalSearch}}async start(_ref4){let{application:application,docLinks:docLinks,http:http,injectedMetadata:injectedMetadata,notifications:notifications,uiSettings:uiSettings,overlays:overlays,workspaces:workspaces}=_ref4;this.initVisibility(application);this.initHeaderVariant(application);this.updatedHeaderSubscription=uiSettings.get$("home:useNewHomePage",false).subscribe(value=>{this.useUpdatedHeader=value});const appTitle$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"]("Overview");const applicationClasses$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](new Set);const helpExtension$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const breadcrumbs$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]);const breadcrumbsEnricher$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const badge$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const customNavLink$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](undefined);const helpSupportUrl$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK);const isNavDrawerLocked$=new external_osdSharedDeps_Rxjs_["BehaviorSubject"](localStorage.getItem(IS_LOCKED_KEY)==="true");const sidecarConfig$=overlays.sidecar.getSidecarConfig$();const navControls=this.navControls.start();const navLinks=this.navLinks.start({application:application,http:http});const recentlyAccessed=await this.recentlyAccessed.start({http:http,workspaces:workspaces,application:application});const docTitle=this.docTitle.start({document:window.document});const navGroup=await this.navGroup.start({navLinks:navLinks,application:application,breadcrumbsEnricher$:breadcrumbsEnricher$,workspaces:workspaces});const globalSearch=this.globalSearch.start();application.currentAppId$.subscribe(()=>{helpExtension$.next(undefined);breadcrumbs$.next([]);badge$.next(undefined);docTitle.reset()});const setIsNavDrawerLocked=isLocked=>{isNavDrawerLocked$.next(isLocked);localStorage.setItem(IS_LOCKED_KEY,`${isLocked}`)};const getIsNavDrawerLocked$=isNavDrawerLocked$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$));const logos=getLogos(injectedMetadata.getBranding(),http.basePath.serverBasePath);if(this.useUpdatedHeader){navControls.registerLeftBottom({order:9e3,mount:element=>{external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(HeaderHelpMenu,{helpExtension$:helpExtension$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),helpSupportUrl$:helpSupportUrl$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),opensearchDashboardsDocLink:docLinks.links.opensearchDashboards.introduction,opensearchDashboardsVersion:injectedMetadata.getOpenSearchDashboardsVersion(),surveyLink:injectedMetadata.getSurvey(),useUpdatedAppearance:true})),element);return()=>external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}})}const isIE=()=>{const ua=window.navigator.userAgent;const msie=ua.indexOf("MSIE ");const trident=ua.indexOf("Trident/");return msie>0||trident>0};if(!this.params.browserSupportsCsp&&injectedMetadata.getCspConfig().warnLegacyBrowsers){notifications.toasts.addWarning({title:Object(utils_mount["b"])(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.chrome.legacyBrowserWarning",defaultMessage:"Your browser does not meet the security requirements for OpenSearch Dashboards."}))})}if(isIE()){notifications.toasts.addWarning({title:Object(utils_mount["b"])(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.chrome.browserDeprecationWarning",defaultMessage:"Internet Explorer lacks features required for OpenSearch Dashboards to function correctly; please use one of {link}.",values:{link:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLink"],{target:"_blank",href:docLinks.links.opensearchDashboards.browser,external:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.chrome.browserDeprecationLink",defaultMessage:"the supported browsers listed on our website"}))}}))})}return{navControls:navControls,navLinks:navLinks,recentlyAccessed:recentlyAccessed,docTitle:docTitle,logos:logos,navGroup:navGroup,globalSearch:globalSearch,getHeaderComponent:()=>external_osdSharedDeps_React_default.a.createElement(Header,{http:http,loadingCount$:http.getLoadingCount$(),application:application,appTitle$:appTitle$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),badge$:badge$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),basePath:http.basePath,breadcrumbs$:breadcrumbs$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),breadcrumbsEnricher$:breadcrumbsEnricher$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),customNavLink$:customNavLink$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),opensearchDashboardsDocLink:docLinks.links.opensearchDashboards.introduction,forceAppSwitcherNavigation$:navLinks.getForceAppSwitcherNavigation$(),helpExtension$:helpExtension$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),helpSupportUrl$:helpSupportUrl$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),homeHref:application.getUrlForApp("home"),isVisible$:this.isVisible$,headerVariant$:this.headerVariant$,opensearchDashboardsVersion:injectedMetadata.getOpenSearchDashboardsVersion(),navLinks$:navLinks.getNavLinks$(),recentlyAccessed$:recentlyAccessed.get$(),navControlsLeft$:navControls.getLeft$(),navControlsCenter$:navControls.getCenter$(),navControlsRight$:navControls.getRight$(),navControlsExpandedCenter$:navControls.getExpandedCenter$(),navControlsExpandedRight$:navControls.getExpandedRight$(),navControlsLeftBottom$:navControls.getLeftBottom$(),navControlsPrimaryHeaderRight$:navControls.getPrimaryHeaderRight$(),onIsLockedUpdate:setIsNavDrawerLocked,isLocked$:getIsNavDrawerLocked$,branding:injectedMetadata.getBranding(),logos:logos,survey:injectedMetadata.getSurvey(),collapsibleNavHeaderRender:this.collapsibleNavHeaderRender,sidecarConfig$:sidecarConfig$,navGroupEnabled:navGroup.getNavGroupEnabled(),currentNavGroup$:navGroup.getCurrentNavGroup$(),navGroupsMap$:navGroup.getNavGroupsMap$(),setCurrentNavGroup:navGroup.setCurrentNavGroup,workspaceList$:workspaces.workspaceList$,currentWorkspace$:workspaces.currentWorkspace$,useUpdatedHeader:this.useUpd
17atedHeader,globalSearchCommands:globalSearch.getAllSearchCommands()}),setAppTitle:appTitle=>appTitle$.next(appTitle),getIsVisible$:()=>this.isVisible$,setIsVisible:isVisible=>this.isForceHidden$.next(!isVisible),getHeaderVariant$:()=>this.headerVariant$,setHeaderVariant:variant=>this.headerVariantOverride$.next(variant),getApplicationClasses$:()=>applicationClasses$.pipe(Object(external_osdSharedDeps_RxjsOperators_["map"])(set=>[...set]),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),addApplicationClass:className=>{const update=new Set([...applicationClasses$.getValue()]);update.add(className);applicationClasses$.next(update)},removeApplicationClass:className=>{const update=new Set([...applicationClasses$.getValue()]);update.delete(className);applicationClasses$.next(update)},getBadge$:()=>badge$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setBadge:badge=>{badge$.next(badge)},getBreadcrumbs$:()=>breadcrumbs$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setBreadcrumbs:newBreadcrumbs=>{breadcrumbs$.next(newBreadcrumbs)},getBreadcrumbsEnricher$:()=>breadcrumbsEnricher$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setBreadcrumbsEnricher:enricher=>{breadcrumbsEnricher$.next(enricher)},getHelpExtension$:()=>helpExtension$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setHelpExtension:helpExtension=>{helpExtension$.next(helpExtension)},setHelpSupportUrl:url=>helpSupportUrl$.next(url),getIsNavDrawerLocked$:()=>getIsNavDrawerLocked$,getCustomNavLink$:()=>customNavLink$.pipe(Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$)),setCustomNavLink:customNavLink=>{customNavLink$.next(customNavLink)}}}stop(){var _this$updatedHeaderSu;this.navLinks.stop();this.navGroup.stop();(_this$updatedHeaderSu=this.updatedHeaderSubscription)===null||_this$updatedHeaderSu===void 0||_this$updatedHeaderSu.unsubscribe();this.stop$.next()}}function fatal_errors_screen_defineProperty(e,r,t){return(r=fatal_errors_screen_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function fatal_errors_screen_toPropertyKey(t){var i=fatal_errors_screen_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function fatal_errors_screen_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class fatal_errors_screen_FatalErrorsScreen extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);fatal_errors_screen_defineProperty(this,"state",{errors:[]});fatal_errors_screen_defineProperty(this,"subscription",void 0);fatal_errors_screen_defineProperty(this,"onClickGoBack",e=>{e.preventDefault();window.history.back()});fatal_errors_screen_defineProperty(this,"onClickClearSession",e=>{e.preventDefault();localStorage.clear();sessionStorage.clear();window.location.hash="";window.location.reload()})}componentDidMount(){this.subscription=external_osdSharedDeps_Rxjs_["merge"](external_osdSharedDeps_Rxjs_["fromEvent"](window,"hashchange").pipe(Object(external_osdSharedDeps_RxjsOperators_["tap"])(()=>{window.location.reload()})),this.props.errorInfo$.pipe(Object(external_osdSharedDeps_RxjsOperators_["tap"])(error=>{this.setState(state=>({...state,errors:[...state.errors,error]}))}))).subscribe({error(error){console.error("Uncaught error in fatal error screen internals",error)}})}componentWillUnmount(){if(this.subscription){this.subscription.unsubscribe();this.subscription=undefined}}render(){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{style:{minHeight:"100vh"}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],{component:"main"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageContent"],{verticalPosition:"center",horizontalPosition:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{iconType:"alert",iconColor:"danger",title:external_osdSharedDeps_React_default.a.createElement("h2",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.fatalErrors.somethingWentWrongTitle",defaultMessage:"Something went wrong"})),body:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.fatalErrors.tryRefreshingPageDescription",defaultMessage:"Try refreshing the page. If that doesn't work, go back to the previous page or clear your session data."}))),actions:[external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{color:"primary",fill:true,onClick:this.onClickClearSession,"data-test-subj":"clearSession"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.fatalErrors.clearYourSessionButtonLabel",defaultMessage:"Clear your session"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButtonEmpty"],{onClick:this.onClickGoBack,"data-test-subj":"goBack"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.fatalErrors.goBackButtonLabel",defaultMessage:"Go back"}))]}),this.state.errors.map((error,i)=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{key:i,title:error.message,color:"danger",iconType:"alert"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{language:"bash",className:"eui-textBreakAll"},`Version: ${this.props.opensearchDashboardsVersion}`+"\n"+`Build: ${this.props.buildNumber}`+"\n"+(error.stack?error.stack:"")))))))}}var util=__webpack_require__(126);function formatErrorMessage(error){if(typeof error==="string"){return error}if(!error){return Object(util["inspect"])(error)}if(error.resp&&error.resp.error&&error.resp.error.root_cause){return error.resp.error.root_cause.map(cause=>cause.reason).join("\n")}if(error.body&&typeof error.body.message==="string"){return error.body.message}if(error instanceof Error&&error.message){return error.message}return Object(util["inspect"])(error)}function formatStack(err){if(err.stack&&!err.stack.includes(err.message)){return"Error: "+err.message+"\n"+err.stack}return err.stack}function getErrorInfo(error,source){const prefix=source?source+": ":"";return{message:prefix+formatErrorMessage(error),stack:formatStack(error)}}function fatal_errors_service_defineProperty(e,r,t){return(r=fatal_errors_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function fatal_errors_service_toPropertyKey(t){var i=fatal_errors_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function fatal_errors_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class fatal_errors_service_FatalErrorsService{constructor(rootDomElement,onFirstErrorCb){this.rootDomElement=rootDomElement;this.onFirstErrorCb=onFirstErrorCb;fatal_errors_service_defineProperty(this,"errorInfo$",new external_osdSharedDeps_Rxjs_["ReplaySubject"]);fatal_errors_service_defineProperty(this,"fatalErrors",void 0)}setup(_ref){let{i18n:i18n,injectedMetadata:injectedMetadata}=_ref;this.errorInfo$.pipe(Object(external_osdSharedDeps_RxjsOperators_["first"])(),Object(external_osdSharedDeps_RxjsOperators_["tap"])(()=>{this.onFirstErrorCb();this.renderError(injectedMetadata,i18n)})).subscribe({error:error=>{console.error("Uncaught error in fatal error service internals",error)}});this.fatalErrors={add:(error,source)=>{const errorInfo=getErrorInfo(error,source);this.errorInfo$.next(errorInfo);if(error instanceof Error){console.error(error)}throw error},get$:()=>this.errorInfo$.asObservable()};this.setupGlobalErrorHandlers(this.fatalErrors);return this.fatalErrors}start(){const{fatalErrors:fatalErrors}=this;if(!fatalErrors){throw new Error("FatalErrorsService#setup() must be invoked before start.")}return fatalErrors}renderError(injectedMetadata,i18n){this.rootDomElement.textContent="";const container=document.createElement("div");this.rootDomElement.appendChild(container);Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(fatal_errors_screen_FatalErrorsScreen,{buildNumber:injectedMetadata.getOpenSearchDashboardsBuildNumber(),opensearchDashboardsVersion:injectedMetadata.getOpenSearchDashboardsVersion(),errorInfo$:this.errorInfo$}
17)),container)}setupGlobalErrorHandlers(fatalErrorsSetup){if(window.addEventListener){window.addEventListener("unhandledrejection",(function(e){console.log(`Detected an unhandled Promise rejection.\n${e.reason}`)}))}}}function base_path_defineProperty(e,r,t){return(r=base_path_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function base_path_toPropertyKey(t){var i=base_path_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function base_path_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class base_path_BasePath{constructor(){let basePath=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";let serverBasePath=arguments.length>1&&arguments[1]!==undefined?arguments[1]:basePath;let clientBasePath=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";this.basePath=basePath;this.serverBasePath=serverBasePath;this.clientBasePath=clientBasePath;base_path_defineProperty(this,"get",()=>`${this.basePath}${this.clientBasePath}`);base_path_defineProperty(this,"getBasePath",()=>this.basePath);base_path_defineProperty(this,"prepend",(path,prependOptions)=>{const{withoutClientBasePath:withoutClientBasePath}=prependOptions||{};const basePath=withoutClientBasePath?this.basePath:this.get();if(!basePath)return path;return modifyUrl(path,parts=>{if(!parts.hostname&&parts.pathname&&parts.pathname.startsWith("/")){parts.pathname=`${basePath}${parts.pathname}`}})});base_path_defineProperty(this,"remove",(path,prependOptions)=>{const{withoutClientBasePath:withoutClientBasePath}=prependOptions||{};const basePath=withoutClientBasePath?this.basePath:this.get();if(!basePath){return path}if(path===basePath){return"/"}if(path.startsWith(`${basePath}/`)){return path.slice(basePath.length)}return path})}}function anonymous_paths_service_defineProperty(e,r,t){return(r=anonymous_paths_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function anonymous_paths_service_toPropertyKey(t){var i=anonymous_paths_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function anonymous_paths_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class AnonymousPathsService{constructor(){anonymous_paths_service_defineProperty(this,"paths",new Set)}setup(_ref){let{basePath:basePath}=_ref;return{isAnonymous:path=>{const pathWithoutBasePath=basePath.remove(path);return this.paths.has(normalizePath(pathWithoutBasePath))},register:path=>{this.paths.add(normalizePath(path))},normalizePath:normalizePath}}start(deps){return this.setup(deps)}stop(){}}const normalizePath=path=>{let normalized=path.toLowerCase();if(normalized.endsWith("/")){normalized=normalized.slice(0,normalized.length-1)}if(!normalized.startsWith("/")){normalized=`/${normalized}`}return normalized};function loading_count_service_defineProperty(e,r,t){return(r=loading_count_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function loading_count_service_toPropertyKey(t){var i=loading_count_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function loading_count_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class loading_count_service_LoadingCountService{constructor(){loading_count_service_defineProperty(this,"stop$",new external_osdSharedDeps_Rxjs_["Subject"]);loading_count_service_defineProperty(this,"loadingCount$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](0))}setup(_ref){let{fatalErrors:fatalErrors}=_ref;return{getLoadingCount$:()=>this.loadingCount$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])()),addLoadingCountSource:count$=>{count$.pipe(Object(external_osdSharedDeps_RxjsOperators_["distinctUntilChanged"])(),Object(external_osdSharedDeps_RxjsOperators_["tap"])(count=>
17{if(count<0){throw new Error("Observables passed to loadingCount.add() must only emit positive numbers")}}),Object(external_osdSharedDeps_RxjsOperators_["takeUntil"])(this.stop$),Object(external_osdSharedDeps_RxjsOperators_["endWith"])(0),Object(external_osdSharedDeps_RxjsOperators_["startWith"])(0),Object(external_osdSharedDeps_RxjsOperators_["pairwise"])(),Object(external_osdSharedDeps_RxjsOperators_["map"])(_ref2=>{let[prev,next]=_ref2;return next-prev})).subscribe({next:delta=>{this.loadingCount$.next(this.loadingCount$.getValue()+delta)},error:error=>fatalErrors.add(error)})}}}start(_ref3){let{fatalErrors:fatalErrors}=_ref3;return this.setup({fatalErrors:fatalErrors})}stop(){this.stop$.next();this.loadingCount$.complete()}}var umd=__webpack_require__(127);var umd_default=__webpack_require__.n(umd);const stringify=(obj,replacer,space)=>{let text;let numeralsAreNumbers=true;const checkForBigInts=replacer?function(key,val){if(typeof val==="bigint"){numeralsAreNumbers=false;return replacer.call(this,key,Number(val))}return replacer.call(this,key,val)}:(key,val)=>{if(typeof val==="bigint"){numeralsAreNumbers=false;return Number(val)}return val};text=JSON.stringify(obj,checkForBigInts,space);if(!numeralsAreNumbers){const temp=umd_default.a.stringify(obj,{replacer:replacer,space:space,withBigInt:false,quote:'"',quoteNames:true});if(temp)text=temp}return text};const parse=(text,reviver)=>{let obj;let numeralsAreNumbers=true;const inspectValueForLargeNumerals=val=>{if(numeralsAreNumbers&&typeof val==="number"&&isFinite(val)&&(val<Number.MIN_SAFE_INTEGER||val>Number.MAX_SAFE_INTEGER)){numeralsAreNumbers=false}return val};const checkForLargeNumerals=reviver?function(key,val){return inspectValueForLargeNumerals(reviver.call(this,key,val))}:(key,val)=>inspectValueForLargeNumerals(val);obj=JSON.parse(text,checkForLargeNumerals);if(!numeralsAreNumbers){const temp=umd_default.a.parse(text,reviver,{withLongNumerals:true});if(temp)obj=temp}return obj};function http_fetch_error_defineProperty(e,r,t){return(r=http_fetch_error_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function http_fetch_error_toPropertyKey(t){var i=http_fetch_error_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function http_fetch_error_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class HttpFetchError extends Error{constructor(message,name,request,response,body){super(message);this.request=request;this.response=response;this.body=body;http_fetch_error_defineProperty(this,"name",void 0);http_fetch_error_defineProperty(this,"req",void 0);http_fetch_error_defineProperty(this,"res",void 0);this.name=name;this.req=request;this.res=response;if(Error.captureStackTrace){Error.captureStackTrace(this,HttpFetchError)}}}function http_intercept_controller_defineProperty(e,r,t){return(r=http_intercept_controller_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function http_intercept_controller_toPropertyKey(t){var i=http_intercept_controller_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function http_intercept_controller_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class HttpInterceptController{constructor(){http_intercept_controller_defineProperty(this,"_halted",false)}get halted(){return this._halted}halt(){this._halted=true}}class HttpInterceptHaltError extends Error{constructor(){super("HTTP Intercept Halt");if(Error.captureStackTrace){Error.captureStackTrace(this,HttpInterceptHaltError)}}}async function interceptRequest(options,interceptors,controller){let current;return[...interceptors].reduceRight((promise,interceptor)=>promise.then(async fetchOptions=>{current=fetchOptions;checkHalt(controller);if(!interceptor.request){return fetchOptions}const overrides=await interceptor.request(current,controller);return{...current,...overrides}},async error=>{checkHalt(controller,error);if(!interceptor.requestError){throw error}const overrides=await interceptor.requestError({error:error,fetchOptions:current},controller);if(!overrides){throw error}current={...current,...overrides};return current}),Promise.resolve(options))}async function interceptResponse(fetchOptions,responsePromise,interceptors,controller){let current;return await[...interceptors].reduce((promise,interceptor)=>promise.then(async httpResponse=>{current=httpResponse;checkHalt(controller);if(!interceptor.response){return httpResponse}const interceptorOverrides=await interceptor.response(httpResponse,controller)||{};return{...httpResponse,...interceptorOverrides}},async error=>{const request=error.request||current&¤t.request;checkHalt(controller,error);if(!interceptor.responseError){throw error}try{const next=await interceptor.responseError({error:error,fetchOptions:fetchOptions,request:request,response:error.response||current&¤t.response,body:error.body||current&¤t.body},controller);checkHalt(controller,error);if(!next){throw error}return{...next,request:request,fetchOptions:fetchOptions}}catch(err){checkHalt(controller,err);throw err}}),responsePromise)}function checkHalt(controller,error){if(error instanceof HttpInterceptHaltError){throw error}else if(controller.halted){throw new HttpInterceptHaltError}}function fetch_defineProperty(e,r,t){return(r=fetch_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function fetch_toPropertyKey(t){var i=fetch_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function fetch_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const JSON_CONTENT=/^(application\/(json|x-javascript)|text\/(x-)?javascript|x-json)(;.*)?$/;const NDJSON_CONTENT=/^(application\/ndjson)(;.*)?$/;const removedUndefined=obj=>Object(external_osdSharedDeps_Lodash_["omitBy"])(obj,v=>v===undefined);class fetch_Fetch{constructor(params){this.params=params;fetch_defineProperty(this,"interceptors",new Set);fetch_defineProperty(this,"requestCount$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](0));fetch_defineProperty(this,"delete",this.shorthand("DELETE"));fetch_defineProperty(this,"get",this.shorthand("GET"));fetch_defineProperty(this,"head",this.shorthand("HEAD"));fetch_defineProperty(this,"options",this.shorthand("options"));fetch_defineProperty(this,"patch",this.shorthand("PATCH"));fetch_defineProperty(this,"post",this.shorthand("POST"));fetch_defineProperty(this,"put",this.shorthand("PUT"));fetch_defineProperty(this,"fetch",async(pathOrOptions,options)=>{const optionsWithPath=validateFetchArguments(pathOrOptions,options);const controller=new HttpInterceptController;return new Promise(async(resolve,reject)=>{try{this.requestCount$.next(this.requestCount$.value+1);const interceptedOptions=await interceptRequest(optionsWithPath,this.interceptors,controller);const initialResponse=this.fetchResponse(interceptedOptions);const interceptedResponse=await interceptResponse(interceptedOptions,initialResponse,this.interceptors,controller);if(optionsWithPath.asResponse){resolve(interceptedResponse)}else{resolve(interceptedResponse.body)}}catch(error){if(!(error instanceof HttpInterceptHaltError)){reject(error)}}finally{this.requestCount$.next(this.requestCount$.value-1)}})})}intercept(interceptor){this.interceptors.add(interceptor);return()=>{this.interceptors.delete(interceptor)}}removeAllInterceptors(){this.interceptors.clear()}getRequestCount$(){return this.requestCount$.asObservable()}createRequest(options){const{query:query,prependBasePath:shouldPrependBasePath,asResponse:asResponse,asSystemRequest:asSystemRequest,...fetchOptions}
17={method:"GET",credentials:"same-origin",prependBasePath:true,...options,headers:removedUndefined({"Content-Type":"application/json",...options.headers})};const url=Object(url_url["format"])({pathname:shouldPrependBasePath?this.params.basePath.prepend(options.path,options.prependOptions):options.path,query:removedUndefined(query)});if(asSystemRequest){fetchOptions.headers["osd-system-request"]="true"}const basePath=this.params.basePath.get();if(isRelativeUrl(url)||url===basePath||url.startsWith(`${basePath}/`)){fetchOptions.headers["osd-version"]=this.params.opensearchDashboardsVersion;fetchOptions.headers["osd-xsrf"]="osd-fetch"}return new Request(url,fetchOptions)}async fetchResponse(fetchOptions){const request=this.createRequest(fetchOptions);let response;let body=null;try{response=await window.fetch(request)}catch(err){var _err$name;throw new HttpFetchError(err.message,(_err$name=err.name)!==null&&_err$name!==void 0?_err$name:"Error",request)}const contentType=response.headers.get("Content-Type")||"";try{if(NDJSON_CONTENT.test(contentType)){body=await response.blob()}else if(JSON_CONTENT.test(contentType)){body=fetchOptions.withLongNumeralsSupport||fetchOptions.withLongNumerals?parse(await response.text()):await response.json()}else{const text=await response.text();try{body=fetchOptions.withLongNumeralsSupport||fetchOptions.withLongNumerals?parse(text):JSON.parse(text)}catch(err){body=text}}}catch(err){var _err$name2;throw new HttpFetchError(err.message,(_err$name2=err.name)!==null&&_err$name2!==void 0?_err$name2:"Error",request,response,body)}if(!response.ok){throw new HttpFetchError(response.statusText,"Error",request,response,body)}return{fetchOptions:fetchOptions,request:request,response:response,body:body}}shorthand(method){return(pathOrOptions,options)=>{const optionsWithPath=validateFetchArguments(pathOrOptions,options);return this.fetch({...optionsWithPath,method:method})}}}const validateFetchArguments=(pathOrOptions,options)=>{var _fullOptions$headers;let fullOptions;if(typeof pathOrOptions==="string"&&(typeof options==="object"||options===undefined)){fullOptions={...options,path:pathOrOptions}}else if(typeof pathOrOptions==="object"&&options===undefined){fullOptions=pathOrOptions}else{throw new Error(`Invalid fetch arguments, must either be (string, object) or (object, undefined), received (${typeof pathOrOptions}, ${typeof options})`)}const invalidHeaders=Object.keys((_fullOptions$headers=fullOptions.headers)!==null&&_fullOptions$headers!==void 0?_fullOptions$headers:{}).filter(headerName=>headerName.startsWith("osd-"));if(invalidHeaders.length){throw new Error(`Invalid fetch headers, headers beginning with "osd-" are not allowed: [${invalidHeaders.join(",")}]`)}return fullOptions};var constants=__webpack_require__(52);function http_service_defineProperty(e,r,t){return(r=http_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function http_service_toPropertyKey(t){var i=http_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function http_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class http_service_HttpService{constructor(){http_service_defineProperty(this,"anonymousPaths",new AnonymousPathsService);http_service_defineProperty(this,"loadingCount",new loading_count_service_LoadingCountService);http_service_defineProperty(this,"service",void 0)}setup(_ref){let{injectedMetadata:injectedMetadata,fatalErrors:fatalErrors}=_ref;const opensearchDashboardsVersion=injectedMetadata.getOpenSearchDashboardsVersion();let clientBasePath="";const workspaceId=Object(utils["d"])(window.location.href,injectedMetadata.getBasePath());if(workspaceId){clientBasePath=`${constants["a"]}/${workspaceId}`}const basePath=new base_path_BasePath(injectedMetadata.getBasePath(),injectedMetadata.getServerBasePath(),clientBasePath);const fetchService=new fetch_Fetch({basePath:basePath,opensearchDashboardsVersion:opensearchDashboardsVersion});const loadingCount=this.loadingCount.setup({fatalErrors:fatalErrors});loadingCount.addLoadingCountSource(fetchService.getRequestCount$());this.service={basePath:basePath,anonymousPaths:this.anonymousPaths.setup({basePath:basePath}),intercept:fetchService.intercept.bind(fetchService),fetch:fetchService.fetch.bind(fetchService),delete:fetchService.delete.bind(fetchService),get:fetchService.get.bind(fetchService),head:fetchService.head.bind(fetchService),options:fetchService.options.bind(fetchService),patch:fetchService.patch.bind(fetchService),post:fetchService.post.bind(fetchService),put:fetchService.put.bind(fetchService),...loadingCount};return this.service}
17start(){if(!this.service){throw new Error(`HttpService#setup() must be called first!`)}return this.service}stop(){this.loadingCount.stop()}}const getEuiContextMapping=()=>{const euiContextMapping={"euiBasicTable.selectAllRows":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiBasicTable.selectAllRows",{defaultMessage:"Select all rows",description:"ARIA and displayed label on a checkbox to select all table rows"}),"euiBasicTable.selectThisRow":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiBasicTable.selectThisRow",{defaultMessage:"Select this row",description:"ARIA and displayed label on a checkbox to select a single table row"}),"euiBasicTable.tableDescription":_ref=>{let{itemCount:itemCount}=_ref;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiBasicTable.tableDescription",{defaultMessage:"Below is a table of {itemCount} items.",values:{itemCount:itemCount},description:"Screen reader text to describe the size of a table"})},"euiBottomBar.screenReaderAnnouncement":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiBottomBar.screenReaderAnnouncement",{defaultMessage:"There is a new menu opening with page level controls at the end of the document.",description:"Screen reader announcement that functionality is available in the page document"}),"euiBreadcrumbs.collapsedBadge.ariaLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiBreadcrumbs.collapsedBadge.ariaLabel",{defaultMessage:"Show all breadcrumbs",description:"Displayed when one or more breadcrumbs are hidden."}),"euiCardSelect.select":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCardSelect.select",{defaultMessage:"Select",description:"Displayed button text when a card option can be selected."}),"euiCardSelect.selected":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCardSelect.selected",{defaultMessage:"Selected",description:"Displayed button text when a card option is selected."}),"euiCardSelect.unavailable":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCardSelect.unavailable",{defaultMessage:"Unavailable",description:"Displayed button text when a card option is unavailable."}),"euiCodeBlock.copyButton":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCodeBlock.copyButton",{defaultMessage:"Copy",description:"ARIA label for a button that copies source code text to the clipboard"}),"euiCodeEditor.startEditing":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCodeEditor.startEditing",{defaultMessage:"Press Enter to start editing."}),"euiCodeEditor.startInteracting":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCodeEditor.startInteracting",{defaultMessage:"Press Enter to start interacting with the code."}),"euiCodeEditor.stopEditing":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCodeEditor.stopEditing",{defaultMessage:"When you're done, press Escape to stop editing."}),"euiCodeEditor.stopInteracting":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCodeEditor.stopInteracting",{defaultMessage:"When you're done, press Escape to stop interacting with the code."}),"euiCollapsedItemActions.allActions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCollapsedItemActions.allActions",{defaultMessage:"All actions",description:"ARIA label and tooltip content describing a button that expands an actions menu"}),"euiColorPicker.screenReaderAnnouncement":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColorPicker.screenReaderAnnouncement",{defaultMessage:"A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.",description:"Message when the color picker popover is opened. Describes the interaction with the elements in the popover."}),"euiColorPicker.swatchAriaLabel":_ref2=>{let{swatch:swatch}=_ref2;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColorPicker.swatchAriaLabel",{defaultMessage:"Select {swatch} as the color",values:{swatch:swatch},description:"Screen reader text to describe the action and hex value of the selectable option"})},"euiColorStopThumb.removeLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColorStopThumb.removeLabel",{defaultMessage:"Remove this stop",description:"Label accompanying a button whose action will remove the color stop"}),"euiColorStopThumb.screenReaderAnnouncement":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColorStopThumb.screenReaderAnnouncement",{defaultMessage:"A popup with a color stop edit form opened. Tab forward to cycle through form controls or press escape to close this popup.",description:"Message when the color picker popover has o
17pened for an individual color stop thumb."}),"euiColorStops.screenReaderAnnouncement":_ref3=>{let{label:label,readOnly:readOnly,disabled:disabled}=_ref3;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColorStops.screenReaderAnnouncement",{defaultMessage:"{label}: {readOnly} {disabled} Color stop picker. Each stop consists of a number and corresponding color value. Use the Down and Up arrow keys to select individual stops. Press the Enter key to create a new stop.",values:{label:label,readOnly:readOnly,disabled:disabled},description:"Screen reader text to describe the composite behavior of the color stops component."})},"euiColumnSelector.hideAll":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSelector.hideAll",{defaultMessage:"Hide all"}),"euiColumnSelector.selectAll":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSelector.selectAll",{defaultMessage:"Show all"}),"euiColumnSorting.clearAll":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSorting.clearAll",{defaultMessage:"Clear sorting"}),"euiColumnSorting.emptySorting":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSorting.emptySorting",{defaultMessage:"Currently no fields are sorted"}),"euiColumnSorting.pickFields":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSorting.pickFields",{defaultMessage:"Pick fields to sort by"}),"euiColumnSorting.sortFieldAriaLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSorting.sortFieldAriaLabel",{defaultMessage:"Sort by:"}),"euiColumnSortingDraggable.activeSortLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSortingDraggable.activeSortLabel",{defaultMessage:"is sorting this data grid"}),"euiColumnSortingDraggable.defaultSortAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSortingDraggable.defaultSortAsc",{defaultMessage:"A-Z",description:"Ascending sort label"}),"euiColumnSortingDraggable.defaultSortDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSortingDraggable.defaultSortDesc",{defaultMessage:"Z-A",description:"Descending sort label"}),"euiColumnSortingDraggable.removeSortLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSortingDraggable.removeSortLabel",{defaultMessage:"Remove from data grid sort:"}),"euiColumnSortingDraggable.toggleLegend":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiColumnSortingDraggable.toggleLegend",{defaultMessage:"Select sorting method for field:"}),"euiComboBoxOptionsList.allOptionsSelected":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiComboBoxOptionsList.allOptionsSelected",{defaultMessage:"You've selected all available options"}),"euiComboBoxOptionsList.alreadyAdded":_ref4=>{let{label:label}=_ref4;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.euiComboBoxOptionsList.alreadyAdded",defaultMessage:"{label} has already been added",values:{label:label}})},"euiComboBoxOptionsList.createCustomOption":_ref5=>{let{key:key,searchValue:searchValue}=_ref5;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.euiComboBoxOptionsList.createCustomOption",defaultMessage:"Hit {key} to add {searchValue} as a custom option",values:{key:key,searchValue:searchValue}})},"euiComboBoxOptionsList.loadingOptions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiComboBoxOptionsList.loadingOptions",{defaultMessage:"Loading options",description:"Placeholder message while data is asynchronously loaded"}),"euiComboBoxOptionsList.noAvailableOptions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiComboBoxOptionsList.noAvailableOptions",{defaultMessage:"There aren't any options available"}),"euiComboBoxOptionsList.noMatchingOptions":_ref6=>{let{searchValue:searchValue}=_ref6;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.euiComboBoxOptionsList.noMatchingOptions",defaultMessage:"{searchValue} doesn't match any options",values:{searchValue:searchValue}})},"euiComboBoxPill.removeSelection":_ref7=>{let{children:children}=_ref7;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiComboBoxPill.removeSelection",{defaultMessage:"Remove {children} from selection in this group",values:{children:children},description:"ARIA label, `children` is the human-friendly value of an option"})},"euiCommonlyUsedTimeRanges.legend":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiCommonlyUsedTimeRanges.legend",{defaultMessage:"Commonly used"}),"euiDataGrid.screenReaderNotice":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGrid.screenReaderNotice",{defaultMessage:"Cell contains interactive content."}),"euiDataGridCell.expandButtonTitle":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridCell.expandButtonTitle",{defaultMessage:"Click or hit enter to interact with cell content"}),"euiDataGridSchema.booleanSortTextAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.booleanSortTextAsc",{defaultMessage:"True-False",description:"Ascending boolean label"}),"euiDataGridSchema.booleanSortTextDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.booleanSortTextDesc",{defaultMessage:"False-True",description:"Descending boolean label"}),"euiDataGridSchema.currencySortTextAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.currencySortTextAsc",{defaultMessage:"Low-High",description:"Ascending currency label"}),"euiDataGridSchema.currencySortTextDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.currencySortTextDesc",{defaultMessage:"High-Low",description:"Descending currency label"}),"euiDataGridSchema.dateSortTextAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.dateSortTextAsc",{defaultMessage:"New-Old",description:"Ascending date label"}),"euiDataGridSchema.dateSortTextDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.dateSortTextDesc",{defaultMessage:"Old-New",description:"Descending date label"}),"euiDataGridSchema.numberSortTextAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.numberSortTextAsc",{defaultMessage:"Low-High",description:"Ascending number label"}),"euiDataGridSchema.numberSortTextDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.numberSortTextDesc",{defaultMessage:"High-Low",description:"Descending number label"}),"euiDataGridSchema.jsonSortTextAsc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.jsonSortTextAsc",{defaultMessage:"Small-Large",description:"Ascending size label"}),"euiDataGridSchema.jsonSortTextDesc":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiDataGridSchema.jsonSortTextDesc",{defaultMessage:"Large-Small",description:"Descending size label"}),"euiFilterButton.filterBadge":_ref8=>{let{count:count,hasActiveFilters:hasActiveFilters}=_ref8;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiFilterButton.filterBadge",{defaultMessage:"{count} {filterCountLabel} filters",values:{count:count,filterCountLabel:hasActiveFilters?"active":"available"}})},"euiForm.addressFormErrors":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiForm.addressFormErrors",{defaultMessage:"Please address the errors in your form."}
17),"euiFormControlLayoutClearButton.label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiFormControlLayoutClearButton.label",{defaultMessage:"Clear input",description:"ARIA label on a button that removes any entry in a form field"}),"euiHeaderAlert.dismiss":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiHeaderAlert.dismiss",{defaultMessage:"Dismiss",description:"ARIA label on a button that dismisses/removes a notification"}),"euiHeaderLinks.appNavigation":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiHeaderLinks.appNavigation",{defaultMessage:"App navigation",description:"ARIA label on a `nav` element"}),"euiHeaderLinks.openNavigationMenu":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiHeaderLinks.openNavigationMenu",{defaultMessage:"Open navigation menu"}),"euiHue.label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiHue.label",{defaultMessage:'Select the HSV color mode "hue" value'}),"euiImage.closeImage":_ref9=>{let{alt:alt}=_ref9;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiImage.closeImage",{defaultMessage:"Close full screen {alt} image",values:{alt:alt}})},"euiImage.openImage":_ref10=>{let{alt:alt}=_ref10;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiImage.openImage",{defaultMessage:"Open full screen {alt} image",values:{alt:alt}})},"euiLink.external.ariaLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiLink.external.ariaLabel",{defaultMessage:"External link"}),"euiModal.closeModal":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiModal.closeModal",{defaultMessage:"Closes this modal window"}),"euiPagination.jumpToLastPage":_ref11=>{let{pageCount:pageCount}=_ref11;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiPagination.jumpToLastPage",{defaultMessage:"Jump to the last page, number {pageCount}",values:{pageCount:pageCount}})},"euiPagination.nextPage":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiPagination.nextPage",{defaultMessage:"Next page"}),"euiPagination.pageOfTotal":_ref12=>{let{page:page,total:total}=_ref12;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiPagination.pageOfTotal",{defaultMessage:"Page {page} of {total}",values:{page:page,total:total}})},"euiPagination.previousPage":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiPagination.previousPage",{defaultMessage:"Previous page"}),"euiPopover.screenReaderAnnouncement":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiPopover.screenReaderAnnouncement",{defaultMessage:"You are in a dialog. To close this dialog, hit escape."}),"euiQuickSelect.applyButton":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.applyButton",{defaultMessage:"Apply"}),"euiQuickSelect.fullDescription":_ref13=>{let{timeTense:timeTense,timeValue:timeValue,timeUnit:timeUnit}=_ref13;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.fullDescription",{defaultMessage:"Currently set to {timeTense} {timeValue} {timeUnit}.",values:{timeTense:timeTense,timeValue:timeValue,timeUnit:timeUnit}})},"euiQuickSelect.legendText":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.legendText",{defaultMessage:"Quick select a time range"}),"euiQuickSelect.nextLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.nextLabel",{defaultMessage:"Next time window"}),"euiQuickSelect.previousLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.previousLabel",{defaultMessage:"Previous time window"}),"euiQuickSelect.quickSelectTitle":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.quickSelectTitle",{defaultMessage:"Quick select"}),"euiQuickSelect.tenseLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.tenseLabel",{defaultMessage:"Time tense"}),"euiQuickSelect.unitLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.unitLabel",{defaultMessage:"Time unit"}),"euiQuickSelect.valueLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiQuickSelect.valueLabel",{defaultMessage:"Time value"}),"euiRefreshInterval.fullDescription":_ref14=>{let{optionValue:optionValue,optionText:optionText}=_ref14;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRefreshInterval.fullDescription",{defaultMessage:"Currently set to {optionValue} {optionText}.",values:{optionValue:optionValue,optionText:optionText}})},"euiRefreshInterval.legend":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRefreshInterval.legend",{defaultMessage:"Refresh every"}),"euiRefreshInterval.start":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRefreshInterval.start",{defaultMessage:"Start"}),"euiRefreshInterval.stop":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRefreshInterval.stop",{defaultMessage:"Stop"}),"euiRelativeTab.fullDescription":_ref15=>{let{unit:unit}=_ref15;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRelativeTab.fullDescription",{defaultMessage:"The unit is changeable. Currently set to {unit}.",values:{unit:unit}})},"euiRelativeTab.relativeDate":_ref16=>{let{position:position}=_ref16;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRelativeTab.relativeDate",{defaultMessage:"{position} date",values:{position:position}})},"euiRelativeTab.roundingLabel":_ref17=>{let{unit:unit}=_ref17;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRelativeTab.roundingLabel",{defaultMessage:"Round to the {unit}",values:{unit:unit}})},"euiRelativeTab.unitInputLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiRelativeTab.unitInputLabel",{defaultMessage:"Relative time span"}),"euiSaturation.roleDescription":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSaturation.roleDescription",{defaultMessage:"HSV color mode saturation and value selection"}),"euiSaturation.screenReaderAnnouncement":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSaturation.screenReaderAnnouncement",{defaultMessage:'Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode "saturation" and "value" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the "saturation" value. Up and down decrease and increase (respectively) the "value" value.'}),"euiSelectable.loadingOptions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSelectable.loadingOptions",{defaultMessage:"Loading options",description:"Placeholder message while data is asynchronously loaded"}),"euiSelectable.noAvailableOptions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSelectable.noAvailableOptions",{defaultMessage:"There aren't any options available"}),"euiSelectable.noMatchingOptions":_ref18=>{let{searchValue:searchValue}=_ref18;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.euiSelectable.noMatchingOptions",defaultMessage:"{searchValue} doesn't match any options",values:{searchValue:searchValue}})},"euiStat.loadingText":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStat.loadingText",{defaultMessage:"Statistic is loading"}),"euiStep.ariaLabel":_ref19=>{let{status:status}=_ref19;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStep.ariaLabel",{defaultMessage:"{stepStatus}",values:{stepStatus:status==="incomplete"?"Incomplete Step":"Step"}})},"euiStepHorizontal.buttonTitle":_ref20=>{let{step:step,title:title,disabled:disabled,isComplete:isComplete}=_ref20;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStepHorizontal.buttonTitle",{defaultMessage:"Step {step}: {title}{titleAppendix}",values:{step:step,title:title,titleAppendix:disabled?" is disabled":isComplete?" is complete":""}})},"euiStepHorizontal.step":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStepHorizontal.step",{defaultMessage:"Step",description:"Screen reader text announcing information about a step in some process"}),"euiStepNumber.hasErrors":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStepNumber.hasErrors",{defaultMessage:"has errors",description:"Used as the title attribute on an image or svg icon to indicate a given process step has errors"}),"euiStepNumber.hasWarnings":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStepNumber.hasWarnings",{defaultMessage:"has warnings",description:"Used as the title attribute on an image or svg icon to indicate a given process step has warnings"}),"euiStepNumber.isComplete":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStepNumber.isComplete",{defaultMessage:"complete",description:"Used as the title attribute on an image or svg icon to indicate a given process step is complete"}),"euiStyleSelector.buttonText":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiStyleSelector.buttonText",{defaultMessage:"Density"}),"euiSuperDatePicker.showDatesButtonLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperDatePicker.showDatesButtonLabel",{defaultMessage:"Show dates",description:"Displayed in a button that shows date picker"}),"euiSuperSelect.screenReaderAnnouncement":_ref21=>{let{optionsCount:optionsCount}=_ref21;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperSelect.screenReaderAnnouncement",{defaultMessage:"You are in a form selector of {optionsCount} items and must select a single option. Use the Up and Down keys to navigate or Escape to close.",values:{optionsCount:optionsCount}})},"euiSuperSelectControl.selectAnOption":_ref22=>{let{selectedValue:selectedValue}=_ref22;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperSelectControl.selectAnOption",{defaultMessage:"Select an option: {selectedValue}, is selected",values:{selectedValue:selectedValue}})},"euiSuperUpdateButton.cannotUpdateTooltip":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperUpdateButton.cannotUpdateTooltip",{defaultMessage:"Cannot update",description:"Displayed in a tooltip when updates can't happen"}),"euiSuperUpdateButton.clickToApplyTooltip":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperUpdateButton.clickToApplyTooltip",{defaultMessage:"Click to apply",description:"Displayed in a tooltip when there are changes that haven't been applied"}),"euiSuperUpdateButton.refreshButtonLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperUpdateButton.refreshButtonLabel",{defaultMessage:"Refresh",description:"Displayed in a button that refreshes based on date picked"}),"euiSuperUpdateButton.updatingButtonLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperUpdateButton.updatingButtonLabel",{defaultMessage:"Updating",description:"Displayed in a button that refreshes when updates are happening"}),"euiSuperUpdateButton.updateButtonLabel":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiSuperUpdateButton.updateButtonLabel",{defaultMessage:"Update",description:"Displayed in a button that updates based on date picked"}),"euiTablePagination.rowsPerPage":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiTablePagination.rowsPerPage",{defaultMessage:"Rows per page",description:"Displayed in a button that toggles a table pagination menu"}),"euiTablePagination.rowsPerPageOption":_ref23=>{let{rowsPerPage:rowsPerPage}=_ref23;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiTablePagination.rowsPerPageOption",{defaultMessage:"{rowsPerPage} rows",description:"Displayed in a button that toggles the number of visible rows",values:{rowsPerPage:rowsPerPage}})},"euiTableSortMobile.sorting":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiTableSortMobile.sorting",{defaultMessage:"Sorting",description:"Displayed in a button that toggles a table sorting menu"}),"euiToast.dismissToast":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiToast.dismissToast",{defaultMessage:"Dismiss toast"}),"euiToast.newNotification":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiToast.newNotification",{defaultMessage:"A new notification appears"}),"euiToast.notification":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiToast.notification",{defaultMessage:"Notification",description:"ARIA label on an element containing a notification"}),"euiTreeView.ariaLabel":_ref24=>{let{nodeLabel:nodeLabel,ariaLabel:ariaLabel}=_ref24;return external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiTreeView.ariaLabel",{defaultMessage:"{nodeLabel} child of {ariaLabel}",values:{nodeLabel:nodeLabel,ariaLabel:ariaLabel}})},"euiTreeView.listNavigationInstructions":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.euiTreeView.listNavigationInstructions",{defaultMessage:"You can quickly navigate this list using arrow keys."})};return euiContextMapping};class i18n_service_I18nService{getContext(){const euiContextMapping=getEuiContextMapping();const mapping={...euiContextMapping};return{Context:function I18nContext(_ref){let{children:children}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiContext"],{i18n:{mapping:mapping}},children))}}}start(){return this.getContext()}stop(){}}function global_toast_list_defineProperty(e,r,t){return(r=global_toast_list_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function global_toast_list_toPropertyKey(t){var i=global_toast_list_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function global_toast_list_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const convertToEui=toast=>({...toast,title:typeof toast.title==="function"?external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:toast.title}
17):toast.title,text:typeof toast.text==="function"?external_osdSharedDeps_React_default.a.createElement(utils["a"],{mount:toast.text}):toast.text});class global_toast_list_GlobalToastList extends external_osdSharedDeps_React_default.a.Component{constructor(){super(...arguments);global_toast_list_defineProperty(this,"state",{toasts:[]});global_toast_list_defineProperty(this,"subscription",void 0)}componentDidMount(){this.subscription=this.props.toasts$.subscribe(toasts=>{this.setState({toasts:toasts})})}componentWillUnmount(){if(this.subscription){this.subscription.unsubscribe()}}render(){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiGlobalToastList"],{"aria-label":external_osdSharedDeps_OsdI18n_["i18n"].translate("core.notifications.globalToast.ariaLabel",{defaultMessage:"Notification message list"}),"data-test-subj":"globalToastList",toasts:this.state.toasts.map(convertToEui),dismissToast:_ref=>{let{id:id}=_ref;return this.props.dismissToast(id)},toastLifeTimeMs:Infinity})}}const isRequestError=e=>{if("body"in e){var _e$body;return((_e$body=e.body)===null||_e$body===void 0||(_e$body=_e$body.attributes)===null||_e$body===void 0||(_e$body=_e$body.error)===null||_e$body===void 0?void 0:_e$body.caused_by)!==undefined}return false};function showErrorDialog(_ref){let{title:title,error:error,openModal:openModal,i18nContext:i18nContext}=_ref;const I18nContext=i18nContext();let text="";if(isRequestError(error)){var _error$body,_error$body2;text+=`${error===null||error===void 0||(_error$body=error.body)===null||_error$body===void 0||(_error$body=_error$body.attributes)===null||_error$body===void 0||(_error$body=_error$body.error)===null||_error$body===void 0?void 0:_error$body.caused_by.type}\n`;text+=`${error===null||error===void 0||(_error$body2=error.body)===null||_error$body2===void 0||(_error$body2=_error$body2.attributes)===null||_error$body2===void 0||(_error$body2=_error$body2.error)===null||_error$body2===void 0?void 0:_error$body2.caused_by.reason}\n\n`}if(error.stack){text+=error.stack}const modal=openModal(error_toast_mount(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(I18nContext,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeader"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalHeaderTitle"],null,title)),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalBody"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCallOut"],{size:"s",color:"danger",iconType:"alert",title:error.message}),text&&external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],{size:"s"}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCodeBlock"],{isCopyable:true,paddingSize:"s"},text))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiModalFooter"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSmallButton"],{onClick:()=>modal.close(),fill:true},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.notifications.errorToast.closeModal",defaultMessage:"Close"})))))))}function ErrorToast(_ref2){let{title:title,error:error,toastMessage:toastMessage,openModal:openModal,i18nContext:i18nContext}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_React_default.a.Fragment,null,external_osdSharedDeps_React_default.a.createElement("p",{"data-test-subj":"errorToastMessage"},toastMessage),external_osdSharedDeps_React_default.a.createElement("div",{className:"eui-textRight"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiButton"],{size:"s",color:"danger",onClick:()=>showErrorDialog({title:title,error:error,openModal:openModal,i18nContext:i18nContext})},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.toasts.errorToast.seeFullError",defaultMessage:"See the full error"}))))}const error_toast_mount=component=>container=>{external_osdSharedDeps_ReactDom_default.a.render(component,container);return()=>external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(container)};function toasts_api_defineProperty(e,r,t){return(r=toasts_api_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function toasts_api_toPropertyKey(t){var i=toasts_api_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function toasts_api_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const normalizeToast=toastOrTitle=>{if(typeof toastOrTitle==="string"){return{title:toastOrTitle}}return toastOrTitle};class toasts_api_ToastsApi{constructor(deps){toasts_api_defineProperty(this,"toasts$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]));toasts_api_defineProperty(this,"idCounter",0);
17toasts_api_defineProperty(this,"uiSettings",void 0);toasts_api_defineProperty(this,"overlays",void 0);toasts_api_defineProperty(this,"i18n",void 0);this.uiSettings=deps.uiSettings}start(_ref){let{overlays:overlays,i18n:i18n}=_ref;this.overlays=overlays;this.i18n=i18n}get$(){return this.toasts$.asObservable()}add(toastOrTitle){if(typeof toastOrTitle!=="string"){const toastObject=toastOrTitle;const list=this.toasts$.getValue();const existingToast=list.find(toast=>toast.id===toastObject.id);if(existingToast){return existingToast}}const toast={id:String(this.idCounter++),toastLifeTimeMs:this.uiSettings.get("notifications:lifetime:info"),...normalizeToast(toastOrTitle)};this.toasts$.next([...this.toasts$.getValue(),toast]);return toast}remove(toastOrId){const toRemove=typeof toastOrId==="string"?toastOrId:toastOrId.id;const list=this.toasts$.getValue();const listWithoutToast=list.filter(t=>t.id!==toRemove);if(listWithoutToast.length!==list.length){this.toasts$.next(listWithoutToast)}}addInfo(toastOrTitle,options){return this.add({color:"primary",iconType:"iInCircle",...normalizeToast(toastOrTitle),...options})}addSuccess(toastOrTitle,options){return this.add({color:"success",iconType:"check",...normalizeToast(toastOrTitle),...options})}addWarning(toastOrTitle,options){return this.add({color:"warning",iconType:"help",toastLifeTimeMs:this.uiSettings.get("notifications:lifetime:warning"),...normalizeToast(toastOrTitle),...options})}addDanger(toastOrTitle,options){return this.add({color:"danger",iconType:"alert",toastLifeTimeMs:this.uiSettings.get("notifications:lifetime:warning"),...normalizeToast(toastOrTitle),...options})}addError(error,options){const message=options.toastMessage||error.message;return this.add({color:"danger",iconType:"alert",toastLifeTimeMs:this.uiSettings.get("notifications:lifetime:error"),text:Object(utils["e"])(external_osdSharedDeps_React_default.a.createElement(ErrorToast,{openModal:this.openModal.bind(this),error:error,title:options.title,toastMessage:message,i18nContext:()=>this.i18n.Context})),...options})}openModal(){if(!this.overlays){throw new Error(`Modal opened before ToastService was started.`)}return this.overlays.openModal(...arguments)}}function toasts_service_defineProperty(e,r,t){return(r=toasts_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function toasts_service_toPropertyKey(t){var i=toasts_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function toasts_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class toasts_service_ToastsService{constructor(){toasts_service_defineProperty(this,"api",void 0);toasts_service_defineProperty(this,"targetDomElement",void 0)}setup(_ref){let{uiSettings:uiSettings}=_ref;this.api=new toasts_api_ToastsApi({uiSettings:uiSettings});return this.api}start(_ref2){let{i18n:i18n,overlays:overlays,targetDomElement:targetDomElement}=_ref2;this.api.start({overlays:overlays,i18n:i18n});this.targetDomElement=targetDomElement;Object(external_osdSharedDeps_ReactDom_["render"])(external_osdSharedDeps_React_default.a.createElement(i18n.Context,null,external_osdSharedDeps_React_default.a.createElement(global_toast_list_GlobalToastList,{dism
17issToast:toastId=>this.api.remove(toastId),toasts$:this.api.get$()})),targetDomElement);return this.api}stop(){if(this.targetDomElement){Object(external_osdSharedDeps_ReactDom_["unmountComponentAtNode"])(this.targetDomElement);this.targetDomElement.textContent=""}}}function notifications_service_defineProperty(e,r,t){return(r=notifications_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function notifications_service_toPropertyKey(t){var i=notifications_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function notifications_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class notifications_service_NotificationsService{constructor(){notifications_service_defineProperty(this,"toasts",void 0);notifications_service_defineProperty(this,"uiSettingsErrorSubscription",void 0);notifications_service_defineProperty(this,"targetDomElement",void 0);this.toasts=new toasts_service_ToastsService}setup(_ref){let{uiSettings:uiSettings}=_ref;const notificationSetup={toasts:this.toasts.setup({uiSettings:uiSettings})};this.uiSettingsErrorSubscription=uiSettings.getUpdateErrors$().subscribe(error=>{notificationSetup.toasts.addDanger({title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.notifications.unableUpdateUISettingNotificationMessageTitle",{defaultMessage:"Unable to update UI setting"}),text:error.message})});return notificationSetup}start(_ref2){let{i18n:i18nDep,overlays:overlays,targetDomElement:targetDomElement}=_ref2;this.targetDomElement=targetDomElement;const toastsContainer=document.createElement("div");targetDomElement.appendChild(toastsContainer);return{toasts:this.toasts.start({i18n:i18nDep,overlays:overlays,targetDomElement:toastsContainer})}}stop(){this.toasts.stop();if(this.targetDomElement){this.targetDomElement.textContent=""}if(this.uiSettingsErrorSubscription){this.uiSettingsErrorSubscription.unsubscribe()}}}function withTimeout(_ref){let{promise:promise,timeout:timeout,errorMessage:errorMessage}=_ref;return Promise.race([promise,new Promise((resolve,reject)=>setTimeout(()=>reject(new Error(errorMessage)),timeout))])}function read(name){const coreWindow=window;const exportId=`plugin/${name}/public`;if(!coreWindow.__osdBundles__.has(exportId)){throw new Error(`Definition of plugin "${name}" not found and may have failed to load.`)}const pluginExport=coreWindow.__osdBundles__.get(exportId);if(typeof(pluginExport===null||pluginExport===void 0?void 0:pluginExport.plugin)!=="function"){throw new Error(`Definition of plugin "${name}" should be a function.`)}else{return pluginExport.plugin}}function plugin_defineProperty(e,r,t){return(r=plugin_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function plugin_toPropertyKey(t){var i=plugin_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function plugin_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class plugin_PluginWrapper{constructor(discoveredPlugin,opaqueId,initializerContext){this.discoveredPlugin=discoveredPlugin;this.opaqueId=opaqueId;this.initializerContext=initializerContext;plugin_defineProperty(this,"name",void 0);plugin_defineProperty(this,"configPath",void 0);plugin_defineProperty(this,"requiredPlugins",void 0);plugin_defineProperty(this,"optionalPlugins",void 0);plugin_defineProperty(this,"instance",void 0);plugin_defineProperty(this,"startDependencies$",new external_osdSharedDeps_Rxjs_["Subject"]);plugin_defineProperty(this,"startDependencies",this.startDependencies$.pipe(Object(external_osdSharedDeps_RxjsOperators_["first"])()).toPromise());this.name=discoveredPlugin.id;this.configPath=discoveredPlugin.configPath;this.requiredPlugins=discoveredPlugin.requiredPlugins;this.optionalPlugins=discoveredPlugin.optionalPlugins}async setup(setupContext,plugins){this.instance=await this.createPluginInstance();return await this.instance.setup(setupContext,plugins)}async start(startContext,plugins){if(this.instance===undefined){throw new Error(`Plugin "${this.name}" can't be started since it isn't set up.`)}const startContract=await this.instance.start(startContext,plugins);this.startDependencies$.next([startContext,plugins,startContract]);return startContract}stop(){if(this.instance===undefined){throw new Error(`Plugin "${this.name}" can't be stopped since it isn't set up.`)}if(typeof this.instance.stop==="function"){this.instance.stop()}this.instance=undefined}async createPluginInstance(){const initializer=read(this.name);const instance=initializer(this.initializerContext);if(typeof instance.setup!=="function"){throw new Error(`Instance of plugin "${this.name}" does not define "setup" function.`)}else if(typeof instance.start!=="function"){throw new Error(`Instance of plugin "${this.name}" does not define "start" function.`)}return instance}}function createPluginInitializerContext(coreContext,opaqueId,pluginManifest,pluginConfig){return{opaqueId:opaqueId,env:coreContext.env,config:{get(){return pluginConfig}}}}function createPluginSetupContext(coreContext,deps,plugin){return{application:{register:app=>deps.application.register(plugin.opaqueId,app),registerAppUpdater:statusUpdater$=>deps.application.registerAppUpdater(statusUpdater$),registerMountContext:(contextName,provider)=>deps.application.registerMountContext(plugin.opaqueId,contextName,provider)},chrome:deps.chrome,context:deps.context,fatalErrors:deps.fatalErrors,http:deps.http,notifications:deps.notifications,uiSettings:deps.uiSettings,injectedMetadata:{getInjectedVar:deps.injectedMetadata.getInjectedVar,getBranding:deps.injectedMetadata.getBranding},getStartServices:()=>plugin.startDependencies,workspaces:deps.workspaces}}function createPluginStartContext(coreContext,deps,plugin){return{application:{applications$:deps.application.applications$,currentAppId$:deps.application.currentAppId$,capabilities:deps.application.capabilities,navigateToApp:deps.application.navigateToApp,navigateToUrl:deps.application.navigateToUrl,getUrlForApp:deps.application.getUrlForApp,setAppLeftControls:deps.application.setAppLeftControls,setAppCenterControls:deps.application.setAppCenterControls,setAppRightControls:deps.application.setAppRightControls,setAppBadgeControls:deps.application.setAppBadgeControls,setAppDescriptionControls:deps.application.setAppDescriptionControls,setAppBottomControls:deps.application.setAppBottomControls,registerMountContext:(contextName,provider)=>deps.application.registerMountContext(plugin.opaqueId,contextName,provider)},docLinks:deps.docLinks,http:deps.http,chrome:Object(external_osdSharedDeps_Lodash_["omit"])(deps.chrome,"getComponent"),i18n:deps.i18n,notifications:deps.notifications,overlays:deps.overlays,uiSettings:deps.uiSettings,savedObjects:deps.savedObjects,injectedMetadata:{getInjectedVar:deps.injectedMetadata.getInjectedVar,getBranding:deps.injectedMetadata.getBranding},fatalErrors:deps.fatalErrors,workspaces:deps.workspaces}}function plugins_service_defineProperty(e,r,t){return(r=plugins_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function plugins_service_toPropertyKey(t){var i=plugins_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function plugins_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const Sec=1e3;class plugins_service_PluginsService{constructor(coreContext,plugins){this.coreContext=coreContext;plugins_service_defineProperty(this,"plugins",new Map);plugins_service_defineProperty(this,"pluginDependencies",new Map);plugins_service_defineProperty(this,"satupPlugins",[]);const opaqueIds=new Map(plugins.map(p=>[p.id,Symbol(p.id)]));plugins.forEach(_ref=>{let{id:id,plugin:plugin,config:config={}}=_ref;this.pluginDependencies.set(id,[...plugin.requiredPlugins,...plugin.optionalPlugins.filter(optPlugin=>opaqueIds.has(optPlugin))]);this.plugins.set(id,new plugin_PluginWrapper(plugin,opaqueIds.get(id),createPluginInitializerContext(this.coreContext,opaqueIds.get(id),plugin,config)))})}getOpaqueIds(){return new Map([...this.pluginDependencies].map(_ref2=>{let[id,deps]=_ref2;return[this.plugins.get(id).opaqueId,deps.map(depId=>this.plugins.get(depId).opaqueId)]}))}async setup(deps){const contracts=new Map;for(const[pluginName,plugin]of this.plugins.entries()){const pluginDepContracts=[...this.pluginDependencies.get(pluginName)].reduce((depContracts,dependencyName)=>{if(contracts.has(dependencyName)){depContracts[dependencyName]=contracts.get(dependencyName)}return depContracts},{});const contract=await withTimeout({promise:plugin.setup(createPluginSetupContext(this.coreContext,deps,plugin),pluginDepContracts),timeout:30*Sec,errorMessage:`Setup lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`});contracts.set(pluginName,contract);this.satupPlugins.push(pluginName)}return{contracts:contracts}}async start(deps){const contracts=new Map;for(const[pluginName,plugin]of this.plugins.entries()){const pluginDepContracts=[...this.pluginDependencies.get(pluginName)].reduce((depContracts,dependencyName)=>{if(contracts.has(dependencyName)){depContracts[dependencyName]=contracts.get(dependencyName)}return depContracts},{});const contract=await withTimeout({promise:plugin.start(createPluginStartContext(this.coreContext,deps,plugin),pluginDepContracts),timeout:30*Sec,errorMessage:`Start lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`});contracts.set(pluginName,contract)}return{contracts:contracts}}async stop(){for(const pluginName of this.satupPlugins.reverse()){this.plugins.get(pluginName).stop()}}}const SharedGlobalConfigKeys={opensearchDashboards:["index","configIndex","autocompleteTerminateAfter","autocompleteTimeout","dashboardAdmin","futureNavigation"],opensearch:["shardTimeout","requestTimeout","pingTimeout"],path:["data"],savedObjects:["maxImportPayloadBytes","permission"]};function ui_settings_api_defineProperty(e,r,t){return(r=ui_settings_api_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ui_settings_api_toPropertyKey(t){var i=ui_settings_api_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ui_settings_api_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const NOOP_CHANGES={values:{},callback:()=>{}};class ui_settings_api_UiSettingsApi{constructor(http){this.http=http;ui_settings_api_defineProperty(this,"pendingChanges",void 0);
17ui_settings_api_defineProperty(this,"sendInProgress",false);ui_settings_api_defineProperty(this,"loadingCount$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](0))}batchSet(key,value){return new Promise((resolve,reject)=>{const prev=this.pendingChanges||NOOP_CHANGES;this.pendingChanges={values:{...prev.values,[key]:value},callback(error,resp){prev.callback(error,resp);if(error){reject(error)}else{resolve(resp)}}};this.flushPendingChanges()})}getLoadingCount$(){return this.loadingCount$.asObservable()}stop(){this.loadingCount$.complete()}hasPendingChanges(){return!!(this.pendingChanges&&this.sendInProgress)}async flushPendingChanges(){if(!this.pendingChanges){return}if(this.sendInProgress){return}const changes=this.pendingChanges;this.pendingChanges=undefined;try{this.sendInProgress=true;changes.callback(undefined,await this.sendRequest("POST","/api/opensearch-dashboards/settings",{changes:changes.values}))}catch(error){changes.callback(error)}finally{this.sendInProgress=false;this.flushPendingChanges()}}async sendRequest(method,path,body){try{this.loadingCount$.next(this.loadingCount$.getValue()+1);return await this.http.fetch(path,{method:method,body:JSON.stringify(body),headers:{accept:"application/json"}})}catch(err){if(err.response){if(err.response.status===400){throw new Error(err.body.message)}if(err.response.status>400){throw new Error(`Request failed with status code: ${err.response.status}`)}}throw err}finally{this.loadingCount$.next(this.loadingCount$.getValue()-1)}}}function ui_settings_client_defineProperty(e,r,t){return(r=ui_settings_client_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ui_settings_client_toPropertyKey(t){var i=ui_settings_client_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ui_settings_client_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ui_settings_client_UiSettingsClient{constructor(params){ui_settings_client_defineProperty(this,"update$",new external_osdSharedDeps_Rxjs_["Subject"]);ui_settings_client_defineProperty(this,"saved$",new external_osdSharedDeps_Rxjs_["Subject"]);ui_settings_client_defineProperty(this,"updateErrors$",new external_osdSharedDeps_Rxjs_["Subject"]);ui_settings_client_defineProperty(this,"api",void 0);ui_settings_client_defineProperty(this,"defaults",void 0);ui_settings_client_defineProperty(this,"cache",void 0);this.api=params.api;this.defaults=Object(external_osdSharedDeps_Lodash_["cloneDeep"])(params.defaults);this.cache=Object(external_osdSharedDeps_Lodash_["defaultsDeep"])({},this.defaults,Object(external_osdSharedDeps_Lodash_["cloneDeep"])(params.initialSettings));params.done$.subscribe({complete:()=>{this.update$.complete();this.saved$.complete();this.updateErrors$.complete()}})}getAll(){return Object(external_osdSharedDeps_Lodash_["cloneDeep"])(this.cache)}getDefault(key){const declared=this.isDeclared(key);if(!declared){throw new Error(`Unexpected \`IUiSettingsClient.getDefaultValue("${key}")\` call on unrecognized configuration setting "${key}".\nPlease check that the setting for "${key}" exists.`)}return this.resolveValue(this.cache[key].value,this.cache[key].type)}get(key,defaultOverride){const declared=this.isDeclared(key);if(!declared&&defaultOverride!==undefined){return defaultOverride}if(!declared){throw new Error(`Unexpected \`IUiSettingsClient.get("${key}")\` call on unrecognized configuration setting "${key}".\nSetting an initial value via \`IUiSettingsClient.set("${key}", value)\` before attempting to retrieve\nany custom setting value for "${key}" may fix this issue.\nYou can use \`IUiSettingsClient.get("${key}", defaultValue)\`, which will just return\n\`defaultValue\` when the key is unrecognized.`)}const type=this.cache[key].type;const userValue=this.cache[key].userValue;const defaultValue=defaultOverride!==undefined?defaultOverride:this.cache[key].value;const value=userValue==null?defaultValue:userValue;return this.resolveValue(value,type)}get$(key,defaultOverride){return Object(external_osdSharedDeps_Rxjs_["concat"])(Object(external_osdSharedDeps_Rxjs_["defer"])(()=>Object(external_osdSharedDeps_Rxjs_["of"])(this.get(key,defaultOverride))),this.update$.pipe(Object(external_osdSharedDeps_RxjsOperators_["filter"])(update=>update.key===key),Object(external_osdSharedDeps_RxjsOperators_["map"])(()=>this.get(key,defaultOverride))))}async set(key,value){return await this.update(key,value)}async remove(key){return await this.update(key,null)}isDeclared(key){return key in this.cache}isDefault(key){return!this.isDeclared(key)||this.cache[key].userValue==null}isCustom(key){return this.isDeclared(key)&&!("value"in this.cache[key])}
17isOverridden(key){return this.isDeclared(key)&&Boolean(this.cache[key].isOverridden)}overrideLocalDefault(key,newDefault){const prevDefault=this.defaults[key]?this.defaults[key].value:undefined;this.defaults[key]={...this.defaults[key]||{},value:newDefault};this.cache[key]={...this.cache[key]||{},value:newDefault};if(this.cache[key].userValue==null){this.update$.next({key:key,newValue:newDefault,oldValue:prevDefault});this.saved$.next({key:key,newValue:newDefault,oldValue:prevDefault})}}getUpdate$(){return this.update$.asObservable()}getSaved$(){return this.saved$.asObservable()}getUpdateErrors$(){return this.updateErrors$.asObservable()}resolveValue(value,type){if(type==="json"){return JSON.parse(value)}return type==="number"&&typeof value!=="bigint"?isFinite(value)&&(value>Number.MAX_SAFE_INTEGER||value<Number.MIN_SAFE_INTEGER)?BigInt(value):parseFloat(value):value}assertUpdateAllowed(key){if(this.isOverridden(key)){throw new Error(`Unable to update "${key}" because its value is overridden by the OpenSearch Dashboards server`)}}async update(key,newVal){this.assertUpdateAllowed(key);const declared=this.isDeclared(key);const defaults=this.defaults;const oldVal=declared?this.cache[key].userValue:undefined;const unchanged=oldVal===newVal;if(unchanged){return true}const initialVal=declared?this.get(key):undefined;this.setLocally(key,newVal);try{const{settings:settings}=await this.api.batchSet(key,newVal);this.cache=Object(external_osdSharedDeps_Lodash_["defaultsDeep"])({},defaults,settings);this.saved$.next({key:key,newValue:newVal,oldValue:initialVal});return true}catch(error){this.setLocally(key,initialVal);this.updateErrors$.next(error);return false}}setLocally(key,newValue){this.assertUpdateAllowed(key);if(!this.isDeclared(key)){this.cache[key]={}}const oldValue=this.get(key);if(newValue===null){delete this.cache[key].userValue}else{const{type:type}=this.cache[key];if(type==="json"&&typeof newValue!=="string"){this.cache[key].userValue=JSON.stringify(newValue)}else{this.cache[key].userValue=newValue}}this.update$.next({key:key,newValue:newValue,oldValue:oldValue})}}function ui_settings_service_defineProperty(e,r,t){return(r=ui_settings_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ui_settings_service_toPropertyKey(t){var i=ui_settings_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function ui_settings_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class ui_settings_service_UiSettingsService{constructor(){ui_settings_service_defineProperty(this,"uiSettingsApi",void 0);ui_settings_service_defineProperty(this,"uiSettingsClient",void 0);ui_settings_service_defineProperty(this,"done$",new external_osdSharedDeps_Rxjs_["Subject"])}setup(_ref){let{http:http,injectedMetadata:injectedMetadata}=_ref;this.uiSettingsApi=new ui_settings_api_UiSettingsApi(http);http.addLoadingCountSource(this.uiSettingsApi.getLoadingCount$());const legacyMetadata=injectedMetadata.getLegacyMetadata();this.uiSettingsClient=new ui_settings_client_UiSettingsClient({api:this.uiSettingsApi,defaults:legacyMetadata.uiSettings.defaults,initialSettings:legacyMetadata.uiSettings.user,done$:this.done$});return this.uiSettingsClient}start(){return this.uiSettingsClient}stop(){this.done$.complete();if(this.uiSettingsApi){this.uiSettingsApi.stop()}}}var semver=__webpack_require__(159);class doc_links_service_DocLinksService{setup(){}start(_ref){let{injectedMetadata:injectedMetadata}=_ref;const buildVersion=injectedMetadata.getOpenSearchDashboardsVersion();const pkgBranch=injectedMetadata.getOpenSearchDashboardsBranch();let branch=pkgBranch;if(pkgBranch==="main"){branch="latest"}else{const validDocPathsPattern=/^\d+\.\d+$/;const parsedBuildVersion=Object(semver["parse"])(buildVersion);if(!validDocPathsPattern.test(pkgBranch)&&parsedBuildVersion){branch=`${parsedBuildVersion.major}.${parsedBuildVersion.minor}`}}const DOC_LINK_VERSION=branch;const OPENSEARCH_WEBSITE_URL="https://opensearch.org/";const OPENSEARCH_WEBSITE_DOCS=`${OPENSEARCH_WEBSITE_URL}docs/${DOC_LINK_VERSION}`;const OPENSEARCH_VERSIONED_DOCS=`${OPENSEARCH_WEBSITE_DOCS}/opensearch/`;const OPENSEARCH_DASHBOARDS_VERSIONED_DOCS=`${OPENSEARCH_WEBSITE_DOCS}/dashboards/`;return deepFreeze({DOC_LINK_VERSION:DOC_LINK_VERSION,OPENSEARCH_WEBSITE_URL:OPENSEARCH_WEBSITE_URL,links:{opensearch:{introduction:`${OPENSEARCH_VERSIONED_DOCS}index/`,installation:{base:`${OPENSEARCH_VERSIONED_DOCS}install/index/`,compatibility:`${OPENSEARCH_VERSIONED_DOCS}install/compatibility/`,docker:`${OPENSEARCH_VERSIONED_DOCS}install/docker`,dockerSecurity:`${OPENSEARCH_VERSIONED_DOCS}install/docker-security`,helm:`${OPENSEARCH_VERSIONED_DOCS}install/helm/`,tar:`${OPENSEARCH_VERSIONED_DOCS}install/tar/`,ansible:`${OPENSEARCH_VERSIONED_DOCS}install/ansible/`,settings:`${OPENSEARCH_VERSIONED_DOCS}install/important-settings/`,plugins:`${OPENSEARCH_VERSIONED_DOCS}install/plugins/`},configuration:`${OPENSEARCH_VERSIONED_DOCS}configuration/`,cluster:{base:`${OPENSEARCH_VERSIONED_DOCS}cluster/`,naming:`${OPENSEARCH_VERSIONED_DOCS}cluster/#step-1-name-a-cluster`,set_attribute:`${OPENSEARCH_VERSIONED_DOCS}cluster/#step-2-set-node-attributes-for-each-node-in-a-cluster`,build_cluster:`${OPENSEARCH_VERSIONED_DOCS}cluster/#step-3-bind-a-cluster-to-specific-ip-addresses`,config_host:`${OPENSEARCH_VERSIONED_DOCS}cluster/cluster/#step-4-configure-discovery-hosts-for-a-cluster`,start:`${OPENSEARCH_VERSIONED_DOCS}cluster/#step-5-start-the-cluster`,config_shard:`${OPENSEARCH_VERSIONED_DOCS}cluster/#advanced-step-6-configure-shard-allocation-awareness-or-forced-awareness`,setup_hot_ar
17ch:`${OPENSEARCH_VERSIONED_DOCS}cluster/#advanced-step-7-set-up-a-hot-warm-architecture`},indexData:{base:`${OPENSEARCH_VERSIONED_DOCS}index-data/`,naming:`${OPENSEARCH_VERSIONED_DOCS}index-data/#naming-restrictions-for-indices`,read_data:`${OPENSEARCH_VERSIONED_DOCS}index-data/#read-data`,update_data:`${OPENSEARCH_VERSIONED_DOCS}index-data/#update-data`,delete_data:`${OPENSEARCH_VERSIONED_DOCS}index-data/#delete-data`},indexAlias:{base:`${OPENSEARCH_VERSIONED_DOCS}index-alias/`,create_alias:`${OPENSEARCH_VERSIONED_DOCS}index-alias/#create-aliases`,add_remove_index:`${OPENSEARCH_VERSIONED_DOCS}index-alias/#add-or-remove-indices`,manage_alias:`${OPENSEARCH_VERSIONED_DOCS}index-alias/#manage-aliases`,filtered_alias:`${OPENSEARCH_VERSIONED_DOCS}index-alias/#create-filtered-aliases`,alias_option:`${OPENSEARCH_VERSIONED_DOCS}index-alias/#index-alias-options`},dataStreams:`${OPENSEARCH_VERSIONED_DOCS}data-streams/`,aggregations:{base:`${OPENSEARCH_VERSIONED_DOCS}aggregations/`,metric:{base:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/`,types:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#types-of-metric-aggregations`,sum:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#sum-min-max-avg`,cardinality:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#cardinality`,value_count:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#value_count`,stats:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#stats-extended_stats-matrix_stats`,percentile:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#percentile-percentile_ranks`,geo_bound:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#geo_bound`,top_hits:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#top_hits`,scripted_metric:`${OPENSEARCH_VERSIONED_DOCS}metric-agg/#scripted_metric`},bucket:{base:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/`,terms:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#terms`,smapler:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#sampler-diversified_sampler`,significant_terms:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#significant_terms-significant_text`,missing:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#missing`,histogram:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#histogram-date_histogram`,range:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#range-date_range-ip_range`,filter:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#filter-filters`,global:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#global`,geo:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#geo_distance-geohash_grid`,adjacency_matrix:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#adjacency_matrix`,nested:`${OPENSEARCH_VERSIONED_DOCS}bucket-agg/#nested-reverse_nested`},pipeline:{base:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/`,syntax:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#pipeline-aggregation-syntax`,types:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#types-of-pipeline-aggregations`,avg_bucket:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#avg_bucket-sum_bucket-min_bucket-max_bucket`,stats_bucket:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#stats_bucket-extended_stats_bucket`,bucket_script:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#bucket_script-bucket_selector`,bucket_sort:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#bucket_sort`,cumulative_sum:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#cumulative_sum`,derivative:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#derivative`,moving_avg:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#moving_avg`,serial_diff:`${OPENSEARCH_VERSIONED_DOCS}pipeline-agg/#serial_diff`}},indexTemplates:{base:`${OPENSEARCH_VERSIONED_DOCS}index-templates`,composable:`${OPENSEARCH_VERSIONED_DOCS}index-templates/#composable-index-templates`,options:`${OPENSEARCH_VERSIONED_DOCS}index-templates/#index-template-options`},reindexData:{base:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/`,all:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#reindex-all-documents`,remote:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#reindex-from-a-remote-cluster`,subset:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#reindex-a-subset-of-documents`,combine:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#combine-one-or-more-indices`,unique:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#reindex-only-unique-documents`,transform:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#transform-documents-during-reindexing`,update:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#update-documents-in-the-current-index`,source:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#source-index-options`,destination:`${OPENSEARCH_VERSIONED_DOCS}reindex-data/#destination-index-options`},queryDSL:{base:`${OPENSEARCH_VERSIONED_DOCS}
17query-dsl/index/`,term:{base:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/`,terms:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#terms`,ids:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#ids`,range:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#range`,prefix:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#prefix`,exists:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#exists`,wildcards:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#wildcards`,regex:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/term/#regex`},fullText:{base:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/`,match:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#match`,multi_match:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#multi-match`,match_phrase:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#match-phrase`,common_terms:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#common-terms`,query_string:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#query-string`,options:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/full-text/#options`},boolQuery:`${OPENSEARCH_VERSIONED_DOCS}query-dsl/bool/`},searchTemplate:{base:`${OPENSEARCH_VERSIONED_DOCS}search-template`,create:`${OPENSEARCH_VERSIONED_DOCS}search-template/#create-search-templates`,execute:`${OPENSEARCH_VERSIONED_DOCS}search-template/#save-and-execute-search-templates`,advanced_operation:`${OPENSEARCH_VERSIONED_DOCS}search-template/#advanced-parameter-conversion-with-search-templates`,multiple_search:`${OPENSEARCH_VERSIONED_DOCS}search-template/#multiple-search-templates`,manage:`${OPENSEARCH_VERSIONED_DOCS}search-template/#manage-search-templates`},searchExperience:{base:`${OPENSEARCH_VERSIONED_DOCS}ux`,autocomplete:`${OPENSEARCH_VERSIONED_DOCS}ux/#autocomplete-queries`,paginate:`${OPENSEARCH_VERSIONED_DOCS}ux/#paginate-results`,scroll:`${OPENSEARCH_VERSIONED_DOCS}ux/#scroll-search`,sort:`${OPENSEARCH_VERSIONED_DOCS}ux/#sort-results`,highlight_match:`${OPENSEARCH_VERSIONED_DOCS}ux/#highlight-query-matches`},logs:{base:`${OPENSEARCH_VERSIONED_DOCS}logs`,application_log:`${OPENSEARCH_VERSIONED_DOCS}logs/#application-logs`,slow_log:`${OPENSEARCH_VERSIONED_DOCS}logs/#slow-logs`,deprecation_log:`${OPENSEARCH_VERSIONED_DOCS}logs/#deprecation-logs`},snapshotRestore:{base:`${OPENSEARCH_VERSIONED_DOCS}snapshot-restore`,register:`${OPENSEARCH_VERSIONED_DOCS}snapshot-restore/#register-repository`,take_snapshot:`${OPENSEARCH_VERSIONED_DOCS}snapshot-restore/#take-snapshots`,restore_snapshot:`${OPENSEARCH_VERSIONED_DOCS}snapshot-restore/#restore-snapshots`,security_plugin:`${OPENSEARCH_VERSIONED_DOCS}snapshot-restore/#security-plugin-considerations`},supportedUnits:`${OPENSEARCH_VERSIONED_DOCS}units`,commonParameters:`${OPENSEARCH_VERSIONED_DOCS}common-parameters`,popularAPI:`${OPENSEARCH_VERSIONED_DOCS}popular-api`,restAPI:{base:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index/`,indexAPI:{base:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/index/`,create:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/create-index/`,exists:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/exists/`,delete:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/delete-index/`,get:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/get-index/`,close:`${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/close-index/`}},dateMath:`${OPENSEARCH_VERSIONED_DOCS}supported-field-types/date/#date-math`,openSearchForum:"https://forum.opensearch.org/t/feedback-experimental-feature-connect-to-external-data-sources/11144"},opensearchDashboards:{introduction:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}index/`,installation:{base:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/index/`,docker:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/docker/`,tar:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/tar/`,helm:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/helm/`,tls:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/tls/`,plugins:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}install/plugins/`},mapTiles:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}maptiles`,ganttCharts:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}gantt`,reporting:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}reporting`,devTools:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dev-tools/index-dev/`,notebooks:{base:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks`,notebook_tutorial:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks/#get-started-with-notebooks`,paragraph_tutorial:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks/#paragraph-actions`,sample_notebook:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks/#sample-notebooks`,create_report:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}notebooks/#create-a-report`}
17,dql:{base:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql`,terms_query:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql/#terms-query`,boolean_query:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql/#boolean-query`,date_query:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql/#date-and-range-queries`,nested_query:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql/#nested-field-query`},browser:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}browser-compatibility`,dataSource:{guide:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}discover/multi-data-sources/`,s3DataSource:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}management/S3-data-source/`},visualize:{guide:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}visualize/viz-index/`},dashboards:{quickStart:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}quickstart/`,createDashboards:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dashboard/index/`},management:{advancedSettings:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}management/advanced-settings/`},workspace:{collaborators:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}workspace/workspace-acl/#defining-workspace-collaborators`,privacy:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}workspace/workspace-acl/#configuring-workspace-privacy`}},noDocumentation:{auditbeat:`${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`,filebeat:`${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`,metricbeat:`${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`,heartbeat:`${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`,logstash:`${OPENSEARCH_WEBSITE_DOCS}`,functionbeat:`${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`,winlogbeat:`${OPENSEARCH_WEBSITE_DOCS}`,siem:`${OPENSEARCH_WEBSITE_DOCS}`,indexPatterns:{loadingData:`${OPENSEARCH_WEBSITE_DOCS}`,introduction:`${OPENSEARCH_WEBSITE_DOCS}`},management:{opensearchDashboardsGeneralSettings:`${OPENSEARCH_WEBSITE_DOCS}`,opensearchDashboardsSearchSettings:`${OPENSEARCH_WEBSITE_DOCS}`,dashboardSettings:`${OPENSEARCH_WEBSITE_DOCS}`},scriptedFields:{scriptFields:`${OPENSEARCH_WEBSITE_DOCS}`,scriptAggs:`${OPENSEARCH_WEBSITE_DOCS}`,painless:`${OPENSEARCH_WEBSITE_DOCS}`,painlessApi:`${OPENSEARCH_WEBSITE_DOCS}`,painlessSyntax:`${OPENSEARCH_WEBSITE_DOCS}`,luceneExpressions:`${OPENSEARCH_WEBSITE_DOCS}`},addData:`${OPENSEARCH_WEBSITE_DOCS}`,vega:`${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}`,savedObject:{manageSavedObject:`${OPENSEARCH_WEBSITE_DOCS}/security/multi-tenancy/mt-agg-view/`},clusterAPI:{clusterRoute:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/cluster-api/cluster-awareness/`,clusterState:`${OPENSEARCH_WEBSITE_DOCS}`,clusterStats:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/cluster-api/cluster-stats/`,clusterPending:`${OPENSEARCH_WEBSITE_DOCS}`},mappingTypes:`${OPENSEARCH_WEBSITE_DOCS}/field-types/mappings/`,moduleScripting:`${OPENSEARCH_WEBSITE_DOCS}`,indexAPI:{indexAnalyze:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/analyze-apis/index/`,indexClearCache:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/clear-index-cache/`,indexClone:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/clone/`,indexSynced:`${OPENSEARCH_WEBSITE_DOCS}`,indexFlush:`${OPENSEARCH_WEBSITE_DOCS}`,indexForceMerge:`${OPENSEARCH_WEBSITE_DOCS}`,indexSetting:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/get-settings/`,indexUpgrade:`${OPENSEARCH_WEBSITE_DOCS}`,indexUpdateSetting:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/update-settings/`,indexRecovery:`${OPENSEARCH_WEBSITE_DOCS}`,indexRefresh:`${OPENSEARCH_WEBSITE_DOCS}`,indexRollover:`${OPENSEARCH_WEBSITE_DOCS}`,indexSegment:`${OPENSEARCH_WEBSITE_DOCS}`,indexShardStore:`${OPENSEARCH_WEBSITE_DOCS}`,indexShrink:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/shrink-index/`,indexSplit:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/split/`,indexStats:`${OPENSEARCH_WEBSITE_DOCS}`,indexGetFieldMapping:`${OPENSEARCH_WEBSITE_DOCS}`,indexGetMapping:`${OPENSEARCH_WEBSITE_DOCS}`,indexOpenClose:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/open-index/`,indexPutMapping:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/index-apis/put-mapping/`,indexSearchValidate:`${OPENSEARCH_WEBSITE_DOCS}`},ingest:{deletePipeline:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/ingest-apis/delete-ingest/`,getPipeline:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/ingest-apis/get-ingest/`,putPipeline:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/ingest-apis/create-update-ingest/`,simulatePipeline:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/ingest-apis/simulate-ingest/`,grokProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/grok/`,appendProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,bytesProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,ingestCircleProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,csvProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/csv/`,convertProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/string-converter/`,dataProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/date/`,dataIndexNamProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/date/`,dissectProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,dotExpandProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,dropProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/drop-events/`,failProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,foreachProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,geoIPProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,gusbProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,htmlstripProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,inferenceProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,joinProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,jsonProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/parse-json/`,kvProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/key-value/`,lowecaseProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/lowercase-string/`,pipelineProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,removeProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,renameProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/rename-keys/`,scriptProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,setProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,securityUserProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,splitProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/split-string/`,sortProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,trimProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/trim-string/`,uppercaseProcessor:`${OPENSEARCH_WEBSITE_DOCS}/data-prepper/pipelines/configuration/processors/uppercase-string/`,urldecodeProcessor:`${OPENSEARCH_WEBSITE_DOCS}`,userAgentProcessor:`${OPENSEARCH_WEBSITE_DOCS}`},nodes:{info:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/nodes-apis/nodes-info/`,hotThreads:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/nodes-apis/nodes-hot-threads/`,reloadSecuritySetting:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/nodes-apis/nodes-reload-secure/`,nodeStats:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/nodes-apis/nodes-stats/`,usage:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/nodes-apis/nodes-usage/`},reIndex:{rethrottle:`${OPENSEARCH_WEBSITE_DOCS}`},apmServer:`${OPENSEARCH_WEBSITE_DOCS}`,tutorial:{loadDataTutorial:`${OPENSEARCH_WEBSITE_DOCS}`,visualizeTutorial:`${OPENSEARCH_WEBSITE_DOCS}`},scroll:{clear_scroll:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/scroll/`},documentAPI:{delete_by_query:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/document-apis/delete-by-query/`,multiTermVector:`${OPENSEARCH_WEBSITE_DOCS}`,termVector:`${OPENSEARCH_WEBSITE_DOCS}`,update_by_query_rethrottle:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/document-apis/update-by-query/`},filed_caps:`${OPENSEARCH_WEBSITE_DOCS}`,painless_execute:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/script-apis/exec-script/`,search:{search:`${OPENSEARCH_WEBSITE_DOCS}
17/api-reference/search/`,searchRankEval:`${OPENSEARCH_WEBSITE_DOCS}`,searchShards:`${OPENSEARCH_WEBSITE_DOCS}`,searchFieldCap:`${OPENSEARCH_WEBSITE_DOCS}`},snapshot:{deleteSnapshot:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/snapshots/delete-snapshot/`,deleteRepository:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/snapshots/delete-snapshot-repository/`,cleanup:`${OPENSEARCH_WEBSITE_DOCS}`,veirfyRepository:`${OPENSEARCH_WEBSITE_DOCS}/api-reference/snapshots/verify-snapshot-repository/`},lucene:{base:`${OPENSEARCH_WEBSITE_DOCS}/query-dsl/full-text/query-string/`},ppl:{base:`${OPENSEARCH_WEBSITE_DOCS}/search-plugins/sql/ppl/syntax/`},sql:{base:`${OPENSEARCH_WEBSITE_DOCS}/search-plugins/sql/sql/basic/`},sqlPplLimitation:{base:`${OPENSEARCH_WEBSITE_DOCS}/search-plugins/sql/limitation/`}}}})}}var opensearch_safer_lodash_set=__webpack_require__(160);function simple_saved_object_defineProperty(e,r,t){return(r=simple_saved_object_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function simple_saved_object_toPropertyKey(t){var i=simple_saved_object_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function simple_saved_object_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class simple_saved_object_SimpleSavedObject{constructor(client,_ref){let{id:id,type:type,version:version,attributes:attributes,error:error,references:references,migrationVersion:migrationVersion,updated_at:updateAt,workspaces:workspaces}=_ref;this.client=client;simple_saved_object_defineProperty(this,"attributes",void 0);simple_saved_object_defineProperty(this,"_version",void 0);simple_saved_object_defineProperty(this,"id",void 0);simple_saved_object_defineProperty(this,"type",void 0);simple_saved_object_defineProperty(this,"migrationVersion",void 0);simple_saved_object_defineProperty(this,"error",void 0);simple_saved_object_defineProperty(this,"references",void 0);simple_saved_object_defineProperty(this,"updated_at",void 0);simple_saved_object_defineProperty(this,"workspaces",void 0);this.id=id;this.type=type;this.attributes=attributes||{};this.references=references||[];this._version=version;this.migrationVersion=migrationVersion;this.updated_at=updateAt;this.workspaces=workspaces;if(error){this.error=error}}get(key){return Object(external_osdSharedDeps_Lodash_["get"])(this.attributes,key)}set(key,value){return Object(opensearch_safer_lodash_set["set"])(this.attributes,key,value)}has(key){return Object(external_osdSharedDeps_Lodash_["has"])(this.attributes,key)}save(){if(this.id){return this.client.update(this.type,this.id,this.attributes,{migrationVersion:this.migrationVersion,references:this.references})}else{return this.client.create(this.type,this.attributes,{migrationVersion:this.migrationVersion,references:this.references})}}delete(){return this.client.delete(this.type,this.id)}}function saved_objects_client_defineProperty(e,r,t){return(r=saved_objects_client_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function saved_objects_client_toPropertyKey(t){var i=saved_objects_client_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function saved_objects_client_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const join=function(){for(var _len=arguments.length,uriComponents=new Array(_len),_key=0;_key<_len;_key++){uriComponents[_key]=arguments[_key]}return uriComponents.filter(comp=>Boolean(comp)).map(encodeURIComponent).join("/")};const BATCH_INTERVAL=100;const API_BASE_URL="/api/saved_objects/";const getObjectsToFetch=queue=>{const objects=[];const inserted=new Set;queue.forEach(_ref=>{let{id:id,type:type}=_ref;if(!inserted.has(`${type}|${id}`)){objects.push({id:id,type:type});inserted.add(`${type}|${id}`)}});return objects};
17class saved_objects_client_SavedObjectsClient{formatWorkspacesParams(options){const currentWorkspaceId=this.currentWorkspaceId;let finalWorkspaces;if(options.hasOwnProperty("workspaces")){finalWorkspaces=options.workspaces}else if(typeof currentWorkspaceId==="string"){finalWorkspaces=[currentWorkspaceId]}if(finalWorkspaces){return{workspaces:finalWorkspaces}}return{}}constructor(http){var _this=this;saved_objects_client_defineProperty(this,"http",void 0);saved_objects_client_defineProperty(this,"batchQueue",void 0);saved_objects_client_defineProperty(this,"currentWorkspaceId",void 0);saved_objects_client_defineProperty(this,"processBatchQueue",Object(external_osdSharedDeps_Lodash_["throttle"])(async()=>{const queue=[...this.batchQueue];this.batchQueue=[];try{const objectsToFetch=getObjectsToFetch(queue);const{saved_objects:savedObjects}=await this.performBulkGet(objectsToFetch);queue.forEach(queueItem=>{const foundObject=savedObjects.find(savedObject=>savedObject.id===queueItem.id&&savedObject.type===queueItem.type);if(foundObject){queueItem.resolve(this.createSavedObject(Object(external_osdSharedDeps_Lodash_["cloneDeep"])(foundObject)))}else{queueItem.resolve(this.createSavedObject(Object(external_osdSharedDeps_Lodash_["pick"])(queueItem,["id","type"])))}})}catch(err){queue.forEach(queueItem=>{queueItem.reject(err)})}},BATCH_INTERVAL,{leading:false}));saved_objects_client_defineProperty(this,"create",(function(type,attributes){let options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!type||!attributes){return Promise.reject(new Error("requires type and attributes"))}const path=_this.getPath([type,options.id]);const query={overwrite:options.overwrite};const createRequest=_this.savedObjectsFetch(path,{method:"POST",query:query,body:JSON.stringify({attributes:attributes,migrationVersion:options.migrationVersion,references:options.references,..._this.formatWorkspacesParams(options)})});return createRequest.then(resp=>_this.createSavedObject(resp))}));saved_objects_client_defineProperty(this,"bulkCreate",(function(){let objects=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];let options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{overwrite:false};const path=_this.getPath(["_bulk_create"]);const query={overwrite:options.overwrite};const request=_this.savedObjectsFetch(path,{method:"POST",query:{...query,..._this.formatWorkspacesParams(options)},body:JSON.stringify(objects)});return request.then(resp=>{resp.saved_objects=resp.saved_objects.map(d=>_this.createSavedObject(d));return renameKeys({saved_objects:"savedObjects"},resp)})}));saved_objects_client_defineProperty(this,"delete",(type,id,options)=>{if(!type||!id){return Promise.reject(new Error("requires type and id"))}const query={force:!!(options!==null&&options!==void 0&&options.force)};return this.savedObjectsFetch(this.getPath([type,id]),{method:"DELETE",query:query})});saved_objects_client_defineProperty(this,"find",options=>{const path=this.getPath(["_find"]);const renameMap={defaultSearchOperator:"default_search_operator",fields:"fields",hasReference:"has_reference",page:"page",perPage:"per_page",search:"search",searchFields:"search_fields",sortField:"sort_field",type:"type",filter:"filter",namespaces:"namespaces",preference:"preference",workspaces:"workspaces"};const renamedQuery=renameKeys(renameMap,{...options,...this.formatWorkspacesParams(options)});const query=external_osdSharedDeps_Lodash_["pick"].apply(null,[renamedQuery,...Object.values(renameMap)]);if(query.has_reference)query.has_reference=JSON.stringify(query.has_reference);const request=this.savedObjectsFetch(path,{method:"GET",query:query});return request.then(resp=>renameKeys({saved_objects:"savedObjects",total:"total",per_page:"perPage",page:"page"},{...resp,saved_objects:resp.saved_objects.map(d=>this.createSavedObject(d))}))});saved_objects_client_defineProperty(this,"get",(type,id)=>{if(!type||!id){return Promise.reject(new Error("requires type and id"))}return new Promise((resolve,reject)=>{this.batchQueue.push({type:type,id:id,resolve:resolve,reject:reject});this.processBatchQueue()})});saved_objects_client_defineProperty(this,"bulkGet",(function(){let objects=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const filteredObjects=objects.map(obj=>Object(external_osdSharedDeps_Lodash_["pick"])(obj,["id","type"]));return _this.performBulkGet(filteredObjects).then(resp=>{resp.saved_objects=resp.saved_objects.map(d=>_this.createSavedObject(d));return renameKeys({saved_objects:"savedObjects"},resp)})}));this.http=http;this.batchQueue=[]}setCurrentWorkspace(workspaceId){this.currentWorkspaceId=workspaceId}async performBulkGet(objects){const path=this.getPath(["_bulk_get"]);const request=this.savedObjectsFetch(path,{method:"POST",body:JSON.stringify(objects)});return request}update(type,id,attributes){let{version:version,migrationVersion:migrationVersion,references:references}=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!type||!id||!attributes){return Promise.reject(new Error("requires type, id and attributes"))}const path=this.getPath([type,id]);const body={attributes:attributes,migrationVersion:migrationVersion,references:references,version:version};return this.savedObjectsFetch(path,{method:"PUT",body:JSON.stringify(body)}).then(resp=>this.createSavedObject(resp))}bulkUpdate(){let objects=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];const path=this.getPath(["_bulk_update"]);return this.savedObjectsFetch(path,{method:"PUT",body:JSON.stringify(objects)}).then(resp=>{resp.saved_objects=resp.saved_objects.map(d=>this.createSavedObject(d));return renameKeys({saved_objects:"savedObjects"},resp)})}createSavedObject(options){return new simple_saved_object_SimpleSavedObject(this,options)}getPath(path){return Object(url_url["resolve"])(API_BASE_URL,join(...path))}savedObjectsFetch(path,_ref2){let{method:method,query:query,body:body}=_ref2;return this.http.fetch(path,{method:method,query:query,body:body})}}const renameKeys=(keysMap,obj)=>Object.keys(obj).reduce((acc,key)=>({...acc,...{[keysMap[key]||key]:obj[key]}}),{});class saved_objects_service_SavedObjectsService{async setup(){}async start(_ref){let{http:http}=_ref;return{client:new saved_objects_client_SavedObjectsClient(http)}}async stop(){}}var utils_context=__webpack_require__(38);class context_service_ContextService{constructor(core){this.core=core}setup(_ref){let{pluginDependencies:pluginDependencies}=_ref;return{createContextContainer:()=>new utils_context["a"](pluginDependencies,this.core.coreId)}}}const IE_REGEX=/(; ?MSIE |Edge\/\d|Trident\/[\d+\.]+;.*rv:*11\.\d+)/;const IS_IE=IE_REGEX.test(window.navigator.userAgent);const URL_MAX_LENGTH=IS_IE?2e3:25e3;const URL_WARNING_LENGTH=IS_IE?1e3:24e3;const ERROR_ROUTE="/app/error";const setupUrlOverflowDetection=_ref=>{let{basePath:basePath,history:history,toasts:toasts,uiSettings:uiSettings}=_ref;return history.listen(location=>{if(uiSettings.get("state:storeInSessionStorage")||history.location.pathname.startsWith(ERROR_ROUTE)){return}const absUrl=history.createHref(location);const absUrlLength=absUrl.length;if(absUrlLength>URL_MAX_LENGTH){const href=history.createHref({pathname:ERROR_ROUTE,search:`errorType=urlOverflow`});window.location.assign(href)}else if(absUrlLength>=URL_WARNING_LENGTH){toasts.addWarning({title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle",{defaultMessage:"The URL is big and OpenSearch Dashboards might stop working"}),text:Object(utils["e"])(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage",defaultMessage:"Either enable the {storeInSessionStorageParam} option in {advancedSettingsLink} or simplify the onscreen visuals.",values:{storeInSessionStorageParam:external_osdSharedDeps_React_default.a.createElement("code",null,"state:storeInSessionStorage"),advancedSettingsLink:external_osdSharedDeps_React_default.a.createElement("a",{href:basePath.prepend("/app/management/opensearch-dashboards/settings")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage.advancedSettingsLinkText",defaultMessage:"advanced settings"}))}}))})}})};const UrlOverflowUi=_ref=>{let{basePath:basePath}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s",textAlign:"left"},external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.optionsToFixErrorDescription",defaultMessage:"Things to try:"})),external_osdSharedDeps_React_default.a.createElement("ul",null,external_osdSharedDeps_React_default.a.createElement("li",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.optionsToFixError.enableOptionText",defaultMessage:"Enable the {storeInSessionStorageConfig} option in {opensearchDashboardsSettingsLink}.",values:{storeInSessionStorageConfig:external_osdSharedDeps_React_default.a.createElement("code",null,"state:storeInSessionStorage"),opensearchDashboardsSettingsLink:external_osdSharedDeps_React_default.a.createElement("a",{href:basePath.prepend("/app/management/opensearch-dashboards/settings")},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.optionsToFixError.enableOptionText.advancedSettingsLinkText",defaultMessage:"Advanced Settings"}))}})),external_osdSharedDeps_React_default.a.createElement("li",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.optionsToFixError.removeStuffFromDashboardText",defaultMessage:"Simplify the object you are editing by removing content or filters."})),IS_IE&&external_osdSharedDeps_React_default.a.createElement("li",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.ui.errorUrlOverflow.optionsToFixError.doNotUseIEText",defaultMessage:"Upgrade to a modern browser. Every other supported browser we know of doesn't have this limit."}))))};const ErrorPage=_ref=>{var _title;let{title:title,children:children}=_ref;title=(_title=title)!==null&&_title!==void 0?_title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.application.appRenderError.defaultTitle",{defaultMessage:"Application error"});return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{style:{minHeight:"100%"},"data-test-subj":"appRenderErrorPageContent"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],{component:"main"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageContent"],{verticalPosition:"center",horizontalPosition:"center"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiEmptyPrompt"],{iconType:"alert",iconColor:"danger",title:external_osdSharedDeps_React_default.a.createElement("h2",null,title),body:children}))))};const ErrorApp=_ref2=>{let{basePath:basePath,history:history}=_ref2;const[currentLocation,setCurrentLocation]=Object(external_osdSharedDeps_React_["useState"])(history.location);Object(external_osdSharedDeps_React_["useLayoutEffect"])(()=>history.listen(location=>setCurrentLocation(location)),[history]);const searchParams=new URLSearchParams(currentLocation.search);const errorType=searchParams.get("errorType");if(errorType==="urlOverflow"){return external_osdSharedDeps_React_default.a.createElement(ErrorPage,{title:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.ui.errorUrlOverflow.errorTitle",{defaultMessage:"The URL for this object is too long, and we can't display it"})},external_osdSharedDeps_React_default.a.createElement(UrlOverflowUi,{basePath:basePath}))}return external_osdSharedDeps_React_default.a.createElement(ErrorPage,null)};const error_application_renderApp=(_ref3,_ref4)=>{let{element:element,history:history}=_ref3;let{basePath:basePath}=_ref4;external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(ErrorApp,{history:history,basePath:basePath})),element);return()=>{external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}};var external_osdSharedDeps_ElasticNumeral_=__webpack_require__(161);var external_osdSharedDeps_ElasticNumeral_default=__webpack_require__.n(external_osdSharedDeps_ElasticNumeral_);function formatNumber(num,type){let format;let postfix="";switch(type){case"byte":format="0.00 b";break;case"time":format="0.00";postfix=" ms";break;case"integer":format="0";break;case"float":default:format="0.00"}return external_osdSharedDeps_ElasticNumeral_default()(num).format(format)+postfix}function formatMetrics(_ref){let{metrics:metrics}=_ref;if(!metrics){return[]}return[{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.heapTotalHeader",{defaultMessage:"Heap total"}),value:metrics.process.memory.heap.size_limit,type:"byte"},{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.heapUsedHeader",{defaultMessage:"Heap used"}),value:metrics.process.memory.heap.used_in_bytes,type:"byte"},{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.loadHeader",{defaultMessage:"Load"}),value:[metrics.os.load["1m"],metrics.os.load["5m"],metrics.os.load["15m"]],type:"time"},{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.resTimeAvgHeader",{defaultMessage:"Response time avg"}),value:metrics.response_times.avg_in_millis,type:"time"},{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.resTimeMaxHeader",{defaultMessage:"Response time max"}),value:metrics.response_times.max_in_millis,type:"time"},{name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.metricsTiles.columns.requestsPerSecHeader",{defaultMessage:"Requests per second"}),value:metrics.requests.total*1e3/metrics.collection_interval_in_millis,type:"float"}]}function formatStatus(status){return{id:status.id,state:{id:status.state,title:status.title,message:status.message,uiColor:status.uiColor}}}async function loadStatus(_ref2){let{http:http,notifications:notifications}=_ref2;let response;try{response=await http.get("/api/status")}catch(e){var _e$response$status,_e$response;if(((_e$response$status=(_e$response=e.response)===null||_e$response===void 0?void 0:_e$response.status)!==null&&_e$response$status!==void 0?_e$response$status:0)>=400){var _e$response2;notifications.toasts.addDanger(external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.loadStatus.serverStatusCodeErrorMessage",{defaultMessage:"Failed to request server status with status code {responseStatus}",values:{responseStatus:(_e$response2=e.response)===null||_e$response2===void 0?void 0:_e$response2.status}}))}else{notifications.toasts.addDanger(external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.loadStatus.serverIsDownErrorMessage",{defaultMessage:"Failed to request server status. Perhaps your server is down?"}))}throw e}return{name:response.name,version:response.version,statuses:response.status.statuses.map(formatStatus),serverState:formatStatus(response.status.overall).state,metrics:formatMetrics(response)}}const MetricTile=_ref=>{let{metric:metric}=_ref;const{name:name}=metric;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCard"],{"data-test-subj":`serverMetric-${formatMetricId(metric)}`,layout:"horizontal",title:formatMetric(metric),description:name})};const MetricTiles=_ref2=>{let{metrics:metrics}=_ref2;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGrid"],{colu
17mns:3},metrics.map(metric=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{key:metric.name,"data-test-subj":"serverMetric"},external_osdSharedDeps_React_default.a.createElement(MetricTile,{metric:metric}))))};const formatMetric=_ref3=>{let{value:value,type:type}=_ref3;const metrics=Array.isArray(value)?value:[value];return metrics.map(metric=>formatNumber(metric,type)).join(", ")};const formatMetricId=_ref4=>{let{name:name}=_ref4;return name.toLowerCase().replace(/[ ]+/g,"-")};const ServerStatus=_ref=>{let{name:name,serverState:serverState}=_ref;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"spaceBetween",style:{flexGrow:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],null,external_osdSharedDeps_React_default.a.createElement("h2",{"data-test-subj":"serverStatusTitle"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.statusPage.serverStatus.statusTitle",defaultMessage:"OpenSearch Dashboards status is {opensearchDashboardsStatus}",values:{opensearchDashboardsStatus:external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBadge"],{"data-test-subj":"serverStatusTitleBadge",color:serverState.uiColor,"aria-label":serverState.title},serverState.title)}})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",null,name))))};const tableColumns=[{field:"state",name:"",render:state=>external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiIcon"],{type:"dot","aria-hidden":true,color:state.uiColor}),width:"32px"},{field:"id",name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.statusTable.columns.idHeader",{defaultMessage:"ID"})},{field:"state",name:external_osdSharedDeps_OsdI18n_["i18n"].translate("core.statusPage.statusTable.columns.statusHeader",{defaultMessage:"Status"}),render:state=>external_osdSharedDeps_React_default.a.createElement("span",null,state.message)}];const StatusTable=_ref=>{let{statuses:statuses}=_ref;if(!statuses){return null}return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiBasicTable"],{columns:tableColumns,items:statuses,rowProps:_ref2=>{let{state:state}=_ref2;return{className:`status-table-row-${state.uiColor}`}},"data-test-subj":"statusBreakdown"})};function status_app_defineProperty(e,r,t){return(r=status_app_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function status_app_toPropertyKey(t){var i=status_app_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function status_app_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class status_app_StatusApp extends external_osdSharedDeps_React_["Component"]{constructor(props){super(props);
17status_app_defineProperty(this,"_isMounted",false);this.state={loading:true,fetchError:false,data:null}}async componentDidMount(){this._isMounted=true;const{http:http,notifications:notifications}=this.props;try{const data=await loadStatus({http:http,notifications:notifications});if(!this._isMounted)return;this.setState({loading:false,fetchError:false,data:data})}catch(e){if(!this._isMounted)return;this.setState({fetchError:true,loading:false,data:null})}}componentWillUnmount(){this._isMounted=false}render(){const{loading:loading,fetchError:fetchError,data:data}=this.state;if(loading){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiLoadingSpinner"],{size:"l"})}if(fetchError){return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{color:"danger"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.statusPage.statusApp.loadingErrorText",defaultMessage:"An error occurred loading the status"}))}const{metrics:metrics,statuses:statuses,serverState:serverState,name:name,version:version}=data;const{build_hash:buildHash,build_number:buildNumber}=version;return external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPage"],{className:"stsPage","data-test-subj":"statusPageRoot"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageBody"],{component:"main",restrictWidth:true},external_osdSharedDeps_React_default.a.createElement(ServerStatus,{name:name,serverState:serverState}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(MetricTiles,{metrics:metrics}),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiPageContent"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],{alignItems:"center",justifyContent:"spaceBetween"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiTitle"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("h2",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.statusPage.statusApp.statusTitle",defaultMessage:"Plugin status"})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexGroup"],null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",{"data-test-subj":"statusBuildNumber"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.statusPage.statusApp.statusActions.buildText",defaultMessage:"BUILD {buildNum}",values:{buildNum:external_osdSharedDeps_React_default.a.createElement("strong",null,buildNumber)}})))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiText"],{size:"s"},external_osdSharedDeps_React_default.a.createElement("p",{"data-test-subj":"statusBuildHash"},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"core.statusPage.statusApp.statusActions.commitText",defaultMessage:"COMMIT {buildSha}",values:{buildSha:external_osdSharedDeps_React_default.a.createElement("strong",null,buildHash)}}))))))),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiSpacer"],null),external_osdSharedDeps_React_default.a.createElement(StatusTable,{statuses:statuses}))))}}const render_app_renderApp=(_ref,_ref2)=>{let{element:element}=_ref;let{http:http,notifications:notifications}=_ref2;external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement(status_app_StatusApp,{http:http,notifications:notifications})),element);return()=>{external_osdSharedDeps_ReactDom_default.a.unmountComponentAtNode(element)}};function core_app_defineProperty(e,r,t){return(r=core_app_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function core_app_toPropertyKey(t){var i=core_app_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function core_app_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class core_app_CoreApp{constructor(coreContext){this.coreContext=coreContext;core_app_defineProperty(this,"stopHistoryListening",void 0)}setup(_ref){let{http:http,application:application,injectedMetadata:injectedMetadata,notifications:notifications}=_ref;application.register(this.coreContext.coreId,{id:"error",title:"Ap
17p Error",navLinkStatus:AppNavLinkStatus.hidden,mount(params){return error_application_renderApp(params,{basePath:http.basePath})}});if(injectedMetadata.getAnonymousStatusPage()){http.anonymousPaths.register("/status")}application.register(this.coreContext.coreId,{id:"status",title:"Server Status",appRoute:"/status",chromeless:true,navLinkStatus:AppNavLinkStatus.hidden,mount(params){return render_app_renderApp(params,{http:http,notifications:notifications})}})}start(_ref2){let{application:application,http:http,notifications:notifications,uiSettings:uiSettings}=_ref2;if(!application.history){return}this.stopHistoryListening=setupUrlOverflowDetection({basePath:http.basePath,history:application.history,toasts:notifications.toasts,uiSettings:uiSettings})}stop(){if(this.stopHistoryListening){this.stopHistoryListening();this.stopHistoryListening=undefined}}}function injected_metadata_service_defineProperty(e,r,t){return(r=injected_metadata_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function injected_metadata_service_toPropertyKey(t){var i=injected_metadata_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function injected_metadata_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class injected_metadata_service_InjectedMetadataService{constructor(params){this.params=params;injected_metadata_service_defineProperty(this,"state",deepFreeze(this.params.injectedMetadata))}start(){return this.setup()}setup(){return{getBasePath:()=>this.state.basePath,getServerBasePath:()=>this.state.serverBasePath,getAnonymousStatusPage:()=>this.state.anonymousStatusPage,getOpenSearchDashboardsVersion:()=>this.state.version,getCspConfig:()=>this.state.csp,getPlugins:()=>this.state.uiPlugins,getLegacyMetadata:()=>this.state.legacyMetadata,getInjectedVar:(name,defaultValue)=>Object(external_osdSharedDeps_Lodash_["get"])(this.state.vars,name,defaultValue),getInjectedVars:()=>this.state.vars,getOpenSearchDashboardsBuildNumber:()=>this.state.buildNumber,getOpenSearchDashboardsBranch:()=>this.state.branch,getBranding:()=>this.state.branding,getSurvey:()=>this.state.survey}}}var external_osdSharedDeps_MomentTimezone_=__webpack_require__(32);var external_osdSharedDeps_MomentTimezone_default=__webpack_require__.n(external_osdSharedDeps_MomentTimezone_);function moment_service_defineProperty(e,r,t){return(r=moment_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function moment_service_toPropertyKey(t){var i=moment_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function moment_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class moment_service_MomentService{constructor(){moment_service_defineProperty(this,"uiSettingsSub
17scription",void 0)}async setup(){}async start(_ref){let{uiSettings:uiSettings}=_ref;const setDefaultTimezone=tz=>{const zone=external_osdSharedDeps_MomentTimezone_default.a.tz.zone(tz);if(zone)external_osdSharedDeps_MomentTimezone_default.a.tz.setDefault(zone.name)};const setStartDayOfWeek=day=>{const dow=external_osdSharedDeps_MomentTimezone_default.a.weekdays().indexOf(day);external_osdSharedDeps_MomentTimezone_default.a.updateLocale(external_osdSharedDeps_MomentTimezone_default.a.locale(),{week:{dow:dow}})};this.uiSettingsSubscription=Object(external_osdSharedDeps_Rxjs_["merge"])(uiSettings.get$("dateFormat:tz").pipe(Object(external_osdSharedDeps_RxjsOperators_["tap"])(setDefaultTimezone)),uiSettings.get$("dateFormat:dow").pipe(Object(external_osdSharedDeps_RxjsOperators_["tap"])(setStartDayOfWeek))).subscribe()}async stop(){if(this.uiSettingsSubscription){this.uiSettingsSubscription.unsubscribe();this.uiSettingsSubscription=undefined}}}var disable_animations="*:not(.essentialAnimation),\n*:not(.essentialAnimation):before,\n*:not(.essentialAnimation):after {\n /**\n * set the animation/transition duration to 0s so that animation callbacks are\n * still triggered, allowing components that require them to remain functional\n */\n\n -webkit-animation-duration: 0s !important;\n animation-duration: 0s !important;\n\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n\n -webkit-transition-delay: 0s !important;\n transition-delay: 0s !important;\n}\n";function styles_service_defineProperty(e,r,t){return(r=styles_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function styles_service_toPropertyKey(t){var i=styles_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function styles_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class styles_service_StylesService{constructor(){styles_service_defineProperty(this,"uiSettingsSub
17scription",void 0)}async setup(){}async start(_ref){let{uiSettings:uiSettings}=_ref;const disableAnimationsStyleTag=document.createElement("style");disableAnimationsStyleTag.setAttribute("id","disableAnimationsCss");document.head.appendChild(disableAnimationsStyleTag);const setDisableAnimations=disableAnimations=>{disableAnimationsStyleTag.textContent=disableAnimations?disable_animations:""};this.uiSettingsSubscription=uiSettings.get$("accessibility:disableAnimations").subscribe(setDisableAnimations)}async stop(){if(this.uiSettingsSubscription){this.uiSettingsSubscription.unsubscribe();this.uiSettingsSubscription=undefined}}}function integrations_service_defineProperty(e,r,t){return(r=integrations_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function integrations_service_toPropertyKey(t){var i=integrations_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function integrations_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class integrations_service_IntegrationsService{constructor(){integrations_service_defineProperty(this,"styles",new styles_service_StylesService);integrations_service_defineProperty(this,"moment",new moment_service_MomentService)}async setup(){await this.styles.setup();await this.moment.setup()}async start(_ref){let{uiSettings:uiSettings}=_ref;await this.styles.start({uiSettings:uiSettings});await this.moment.start({uiSettings:uiSettings})}async stop(){await this.styles.stop();await this.moment.stop()}}const AppWrapper=_ref=>{let{chromeVisible$:chromeVisible$,sidecarConfig$:sidecarConfig$,children:children}=_ref;const visible=useObservable_default()(chromeVisible$);const sidecarConfig=useObservable_default()(sidecarConfig$,undefined);const sidecarPaddingStyle=Object(external_osdSharedDeps_React_["useMemo"])(()=>getOsdSidecarPaddingStyle(sidecarConfig),[sidecarConfig]);return external_osdSharedDeps_React_default.a.createElement("div",{id:"app-wrapper",className:classnames_default()("app-wrapper",{"hidden-chrome":!visible}),style:sidecarPaddingStyle},children)};const app_containers_AppContainer=_ref2=>{let{classes$:classes$,children:children}=_ref2;const classes=useObservable_default()(classes$);return external_osdSharedDeps_React_default.a.createElement("div",{className:classnames_default()("application",classes)},children)};class rendering_service_RenderingService{start(_ref){let{application:application,chrome:chrome,overlays:overlays,targetDomElement:targetDomElement}=_ref;const chromeUi=chrome.getHeaderComponent();const appUi=application.getComponent();const bannerUi=overlays.banners.getComponent();external_osdSharedDeps_ReactDom_default.a.render(external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["I18nProvider"],null,external_osdSharedDeps_React_default.a.createElement("div",{className:"content","data-test-subj":"opensearchDashboardsChrome"},chromeUi,external_osdSharedDeps_React_default.a.createElement(AppWrapper,{chromeVisible$:chrome.getIsVisible$(),sidecarConfig$:overlays.sidecar.getSidecarConfig$()},external_osdSharedDeps_React_default.a.createElement("div",{className:"app-wrapper-panel"},external_osdSharedDeps_React_default.a.createElement("div",{id:"globalBannerList"},bannerUi),external_osdSharedDeps_React_default.a.createElement(app_containers_AppContainer,{classes$:chrome.getApplicationClasses$()},appUi))))),targetDomElement)}}function workspaces_service_defineProperty(e,r,t){return(r=workspaces_service_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function workspaces_service_toPropertyKey(t){var i=workspaces_service_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function workspaces_service_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var WORKSPACE_ERROR=function(WORKSPACE_ERROR){WORKSPACE_ERROR["WORKSPACE_IS_STALE"]="WORKSPACE_IS_STALE";return WORKSPACE_ERROR}(WORKSPACE_ERROR||{});class workspaces_service_WorkspacesService{constructor(){workspaces_service_defineProperty(this,"currentWorkspaceId$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](""));workspaces_service_defineProperty(this,"workspaceList$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"]([]));
17workspaces_service_defineProperty(this,"currentWorkspace$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](null));workspaces_service_defineProperty(this,"initialized$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](false));workspaces_service_defineProperty(this,"client$",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](null));Object(external_osdSharedDeps_Rxjs_["combineLatest"])([this.initialized$,this.workspaceList$,this.currentWorkspaceId$]).subscribe(_ref=>{let[workspaceInitialized,workspaceList,currentWorkspaceId]=_ref;if(workspaceInitialized){const currentWorkspace=workspaceList.find(w=>w&&w.id===currentWorkspaceId);if(!Object(external_osdSharedDeps_Lodash_["isEqual"])(currentWorkspace,this.currentWorkspace$.getValue())){this.currentWorkspace$.next(currentWorkspace!==null&¤tWorkspace!==void 0?currentWorkspace:null)}if(currentWorkspaceId&&!(currentWorkspace!==null&¤tWorkspace!==void 0&¤tWorkspace.id)){this.currentWorkspaceId$.error({reason:WORKSPACE_ERROR.WORKSPACE_IS_STALE});this.currentWorkspace$.error({reason:WORKSPACE_ERROR.WORKSPACE_IS_STALE})}}})}setup(){return{currentWorkspaceId$:this.currentWorkspaceId$,currentWorkspace$:this.currentWorkspace$,workspaceList$:this.workspaceList$,initialized$:this.initialized$,setClient:client=>{this.client$.next(client)}}}start(){return{currentWorkspaceId$:this.currentWorkspaceId$,currentWorkspace$:this.currentWorkspace$,workspaceList$:this.workspaceList$,initialized$:this.initialized$,client$:this.client$}}async stop(){this.currentWorkspace$.unsubscribe();this.currentWorkspaceId$.unsubscribe();this.workspaceList$.unsubscribe();this.initialized$.unsubscribe();this.client$.unsubscribe()}}function core_system_defineProperty(e,r,t){return(r=core_system_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function core_system_toPropertyKey(t){var i=core_system_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function core_system_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}class core_system_CoreSystem{constructor(params){core_system_defineProperty(this,"fatalErrors",void 0);core_system_defineProperty(this,"injectedMetadata",void 0);core_system_defineProperty(this,"notifications",void 0);core_system_defineProperty(this,"http",void 0);core_system_defineProperty(this,"savedObjects",void 0);core_system_defineProperty(this,"uiSettings",void 0);core_system_defineProperty(this,"chrome",void 0);core_system_defineProperty(this,"i18n",void 0);core_system_defineProperty(this,"overlay",void 0);core_system_defineProperty(this,"plugins",void 0);core_system_defineProperty(this,"application",void 0);core_system_defineProperty(this,"docLinks",void 0);core_system_defineProperty(this,"rendering",void 0);core_system_defineProperty(this,"context",void 0);core_system_defineProperty(this,"integrations",void 0);core_system_defineProperty(this,"coreApp",void 0);core_system_defineProperty(this,"rootDomElement",void 0);core_system_defineProperty(this,"coreContext",void 0);core_system_defineProperty(this,"workspaces",void 0);core_system_defineProperty(this,"fatalErrorsSetup",null);const{rootDomElement:rootDomElement,browserSupportsCsp:browserSupportsCsp,injectedMetadata:injectedMetadata}=params;this.rootDomElement=rootDomElement;this.i18n=new i18n_service_I18nService;this.injectedMetadata=new injected_metadata_service_InjectedMetadataService({injectedMetadata:injectedMetadata});this.fatalErrors=new fatal_errors_service_FatalErrorsService(rootDomElement,()=>{this.stop()});this.notifications=new notifications_service_NotificationsService;this.http=new http_service_HttpService;this.savedObjects=new saved_objects_service_SavedObjectsService;this.uiSettings=new ui_settings_service_UiSettingsService;this.overlay=new overlay_service_OverlayService;this.chrome=new chrome_service_ChromeService({browserSupportsCsp:browserSupportsCsp});this.docLinks=new doc_links_service_DocLinksService;
17this.rendering=new rendering_service_RenderingService;this.application=new application_service_ApplicationService;this.integrations=new integrations_service_IntegrationsService;this.workspaces=new workspaces_service_WorkspacesService;this.coreContext={coreId:Symbol("core"),env:injectedMetadata.env};this.context=new context_service_ContextService(this.coreContext);this.plugins=new plugins_service_PluginsService(this.coreContext,injectedMetadata.uiPlugins);this.coreApp=new core_app_CoreApp(this.coreContext)}async setup(){try{const injectedMetadata=this.injectedMetadata.setup();this.fatalErrorsSetup=this.fatalErrors.setup({injectedMetadata:injectedMetadata,i18n:this.i18n.getContext()});await this.integrations.setup();this.docLinks.setup();const http=this.http.setup({injectedMetadata:injectedMetadata,fatalErrors:this.fatalErrorsSetup});const uiSettings=this.uiSettings.setup({http:http,injectedMetadata:injectedMetadata});const notifications=this.notifications.setup({uiSettings:uiSettings});const workspaces=this.workspaces.setup();const pluginDependencies=this.plugins.getOpaqueIds();const context=this.context.setup({pluginDependencies:new Map([...pluginDependencies])});const application=this.application.setup({context:context,http:http});this.coreApp.setup({application:application,http:http,injectedMetadata:injectedMetadata,notifications:notifications});const chrome=this.chrome.setup({uiSettings:uiSettings});const core={application:application,context:context,chrome:chrome,fatalErrors:this.fatalErrorsSetup,http:http,injectedMetadata:injectedMetadata,notifications:notifications,uiSettings:uiSettings,workspaces:workspaces};await this.plugins.setup(core);return{fatalErrors:this.fatalErrorsSetup}}catch(error){if(this.fatalErrorsSetup&&(typeof error==="string"||error instanceof Error)){this.fatalErrorsSetup.add(error)}else{console.log(error)}}}async start(){try{var _injectedMetadata$get;const injectedMetadata=await this.injectedMetadata.start();const uiSettings=await this.uiSettings.start();const docLinks=this.docLinks.start({injectedMetadata:injectedMetadata});const http=await this.http.start();const savedObjects=await this.savedObjects.start({http:http});const i18n=await this.i18n.start();const fatalErrors=await this.fatalErrors.start();await this.integrations.start({uiSettings:uiSettings});const coreUiTargetDomElement=document.createElement("div");coreUiTargetDomElement.id="opensearch-dashboards-body";const notificationsTargetDomElement=document.createElement("div");const overlayTargetDomElement=document.createElement("div");const overlays=this.overlay.start({i18n:i18n,targetDomElement:overlayTargetDomElement,uiSettings:uiSettings});const notifications=await this.notifications.start({i18n:i18n,overlays:overlays,targetDomElement:notificationsTargetDomElement});const workspaces=this.workspaces.start();const application=await this.application.start({http:http,overlays:overlays,workspaces:workspaces});const chrome=await this.chrome.start({application:application,docLinks:docLinks,http:http,injectedMetadata:injectedMetadata,notifications:notifications,uiSettings:uiSettings,overlays:overlays,workspaces:workspaces});this.coreApp.start({application:application,http:http,notifications:notifications,uiSettings:uiSettings});application.registerMountContext(this.coreContext.coreId,"core",()=>({application:Object(pick["a"])(application,["capabilities","navigateToApp"]),chrome:chrome,docLinks:docLinks,http:http,i18n:i18n,injectedMetadata:Object(pick["a"])(injectedMetadata,["getInjectedVar","getBranding"]),notifications:notifications,overlays:overlays,savedObjects:savedObjects,uiSettings:uiSettings,workspaces:workspaces}));const core={application:application,chrome:chrome,docLinks:docLinks,http:http,savedObjects:savedObjects,i18n:i18n,injectedMetadata:injectedMetadata,notifications:notifications,overlays:overlays,uiSettings:uiSettings,fatalErrors:fatalErrors,workspaces:workspaces};await this.plugins.start(core);let{useExpandedHeader:useExpandedHeader=true}=(_injectedMetadata$get=injectedMetadata.getBranding())!==null&&_injectedMetadata$get!==void 0?_injectedMetadata$get:{};if(uiSettings.get("home:useNewHomePage")){useExpandedHeader=false;this.rootDomElement.classList.add("headerIsDense")}this.rootDomElement.textContent="";this.rootDomElement.classList.add("coreSystemRootDomElement");
17if(useExpandedHeader){this.rootDomElement.classList.add("headerIsExpanded")}this.rootDomElement.appendChild(coreUiTargetDomElement);this.rootDomElement.appendChild(notificationsTargetDomElement);this.rootDomElement.appendChild(overlayTargetDomElement);this.rendering.start({application:application,chrome:chrome,overlays:overlays,targetDomElement:coreUiTargetDomElement});return{application:application}}catch(error){if(this.fatalErrorsSetup&&(typeof error==="string"||error instanceof Error)){this.fatalErrorsSetup.add(error)}else{console.error(error)}}}stop(){this.plugins.stop();this.coreApp.stop();this.notifications.stop();this.http.stop();this.integrations.stop();this.uiSettings.stop();this.chrome.stop();this.i18n.stop();this.application.stop();this.workspaces.stop();this.rootDomElement.textContent=""}}function apm_system_defineProperty(e,r,t){return(r=apm_system_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function apm_system_toPropertyKey(t){var i=apm_system_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function apm_system_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const HTTP_REQUEST_TRANSACTION_NAME_REGEX=/^(GET|POST|PUT|HEAD|PATCH|DELETE|OPTIONS|CONNECT|TRACE)\s(.*)$/;class apm_system_ApmSystem{constructor(apmConfig){let basePath=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";this.apmConfig=apmConfig;this.basePath=basePath;apm_system_defineProperty(this,"enabled",void 0);this.enabled=apmConfig!=null&&!!apmConfig.active}async setup(){if(!this.enabled)return;const{init:init,apm:apm}=await __webpack_require__.e(4).then(__webpack_require__.t.bind(null,832,7));const{globalLabels:globalLabels,...apmConfig}=this.apmConfig;if(globalLabels){apm.addLabels(globalLabels)}this.addHttpRequestNormalization(apm);init(apmConfig)}async start(start){if(!this.enabled||!start)return;start.application.currentAppId$.subscribe(appId=>{const apmInstance=window.opensearchApm;if(appId&&apmInstance&&typeof apmInstance.startTransaction==="function"){apmInstance.startTransaction(`/app/${appId}`,"route-change",{managed:true,canReuse:true})}})}addHttpRequestNormalization(apm){apm.observe("transaction:end",t=>{if(t.type!=="http-request"){return}const matches=t.name.match(HTTP_REQUEST_TRANSACTION_NAME_REGEX);if(!matches){return}const[,method,originalUrl]=matches;const normalizedUrl=modifyUrl(originalUrl,parts=>{var _parts$pathname;const isAbsolute=parts.hostname&&parts.protocol&&parts.port;if(isAbsolute&&(parts.hostname!==window.location.hostname||parts.protocol!==window.location.protocol||parts.port!==window.location.port)){return}parts.protocol=null;parts.hostname=null;parts.port=null;parts.slashes=false;if(parts.pathname===this.basePath){parts.pathname="/"}else if((_parts$pathname=parts.pathname)!==null&&_parts$pathname!==void 0&&_parts$pathname.startsWith(`${this.basePath}/`)){var _parts$pathname2;parts.pathname=(_parts$pathname2=parts.pathname)===null||_parts$pathname2===void 0?void 0:_parts$pathname2.slice(this.basePath.length)}});t.name=`${method} ${normalizedUrl}`})}}async function __osdBootstrap__(){const injectedMetadata=JSON.parse(document.querySelector("osd-injected-metadata").getAttribute("data"));const globals=typeof window==="undefined"?{}:window;const themeTag=globals.__osdThemeTag__||"";injectedMetadata.branding.darkMode=themeTag.endsWith("dark");let i18nError;const apmSystem=new apm_system_ApmSystem(injectedMetadata.vars.apmConfig,injectedMetadata.basePath);await Promise.all([apmSystem.setup().catch(console.warn),external_osdSharedDeps_OsdI18n_["i18n"].load(injectedMetadata.i18n.translationsUrl).catch(error=>{i18nError=error})]);const coreSystem=new core_system_CoreSystem({injectedMetadata:injectedMetadata,rootDomElement:document.body,browserSupportsCsp:!window.__osdCspNotEnforced__});const setup=await coreSystem.setup();if(i18nError&&setup){setup.fatalErrors.add(i18nError)}const start=await coreSystem.start();await apmSystem.start(start);if(window.__i18nWarning){const warning=window.__i18nWarning;console.warn(`${warning.title}: ${warning.text}`);delete window.__i18nWarning}if(window.__localeWarning){const warning=window.__localeWarning;console.warn(`${warning.title}: ${warning.text}`);delete window.__localeWarning}}var helpers=__webpack_require__(31);var utils_constants=__webpack_require__(2);var JobHandler=__webpack_require__(25);var Main=__webpack_require__(125);var Services=__webpack_require__(8);function public_plugin_defineProperty(e,r,t){return(r=public_plugin_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function public_plugin_toPropertyKey(t){var i=public_plugin_toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}function public_plugin_toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}const ISM_CATEGORIES=Object.freeze({automation_policies:{id:"automation_policies",label:"Automation policies",order:2e3},templates:{id:"templates",label:"Templates",order:3e3},index_backup_and_recovery:{id:"index_backup_and_recovery",label:"Index backup and recovery",order:4e3}});const ISM_FEATURE_DESCRIPTION=Object.freeze({index_management:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.indexManagement.description",{defaultMessage:"Manage your indexes with state polices, templates and aliases. You can also roll up or transform your indexes."}),snapshot_management:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.snapshotManagement.description",{defaultMessage:"Back up and restore your cluster's indexes and state. Setup a policy to automate snapshot creation and deletion."}),indexes:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.indexes.description",{defaultMessage:"Configure and manage indexes."}),policy_managed_indexes:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.policyManagedIndexes.description",{defaultMessage:"View indexes managed by Index State Management (ISM) policies."}),data_streams:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.dataStream
17s.description",{defaultMessage:"Simplify time-series data management."}),aliases:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.aliases.description",{defaultMessage:"Organize multiple indexes under virtual index names."}),index_state_management_policies:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.indexStateManagementPolicies.description",{defaultMessage:"Automate periodic administrative tasks."}),index_templates:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.indexTemplates.description",{defaultMessage:"Create predefined mappings and settings for new indexes."}),notification_settings:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.notificationSettings.description",{defaultMessage:"Set default notifications on index operation statuses."}),rollup_jobs:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.rollupJobs.description",{defaultMessage:"Reduce data granularity by rolling up old data into summarized indexes."}),transform_jobs:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.transformJobs.description",{defaultMessage:"Create summarized views of your data organized by specific fields."}),index_snapshots:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.indexSnapshots.description",{defaultMessage:"Back up your indexes."}),snapshot_policies:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.snapshotPolicies.description",{defaultMessage:"Set up automatic data snapshots."}),snapshot_repositories:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.snapshotRepositories.description",{defaultMessage:"Configure remote storage for snapshots."}),component_templates:external_osdSharedDeps_OsdI18n_["i18n"].translate("index-management-dashboards-plugin.componentTemplates.description",{defaultMessage:"Define components for your index templates."})});class plugin_IndexManagementPlugin{constructor(initializerContext){this.initializerContext=initializerContext;public_plugin_defineProperty(this,"updateDefaultRouteOfManagementApplications",()=>{var _dataSourceObservable;const hash=`#/?dataSourceId=${((_dataSourceObservable=Main["a"].value)===null||_dataSourceObservable===void 0?void 0:_dataSourceObservable.id)||""}`;return{defaultPath:hash}});public_plugin_defineProperty(this,"appStateUpdater",new external_osdSharedDeps_Rxjs_["BehaviorSubject"](this.updateDefaultRouteOfManagementApplications))}setup(core,_ref){let{managementOverview:managementOverview,dataSourceManagement:dataSourceManagement}=_ref;Object(JobHandler["b"])(core);const mountWrapper=async(params,redirect)=>{const{renderApp:renderApp}=await __webpack_require__.e(0).then(__webpack_require__.bind(null,833));const[coreStart,depsStart]=await core.getStartServices();return renderApp(coreStart,depsStart,params,redirect,dataSourceManagement)};if(managementOverview){managementOverview.register({id:"opensearch_index_management_dashboards",title:"Index Management",order:9010,description:external_osdSharedDeps_OsdI18n_["i18n"].translate("indexManagement.description",{defaultMessage:"Manage your indexes with state polices, templates and aliases. You can also roll up or transform your indexes."})});managementOverview.register({id:"opensearch_snapshot_management_dashboards",title:"Snapshot Management",order:9020,description:external_osdSharedDeps_OsdI18n_["i18n"].translate("snapshotManagement.description",{defaultMessage:"Back up and restore your cluster's indexes and state. Setup a policy to automate snapshot creation and deletion."})})}const imApplicationID="opensearch_index_management_dashboards";const smApplicationID="opensearch_snapshot_management_dashboards";core.application.register({id:imApplicationID,title:"Index Management",order:9010,category:core_utils["b"].management,workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.index_management,updater$:this.appStateUpdater,mount:async params=>{const{renderApp:renderApp}=await __webpack_require__.e(0).then(__webpack_require__.bind(null,833));const[coreStart,depsStart]=await core.getStartServices();return renderApp(coreStart,depsStart,params,utils_constants["D"].INDEX_POLICIES,dataSourceManagement)}});core.application.register({id:smApplicationID,title:"Snapshot Management",order:9020,category:core_utils["b"].management,workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.snapshot_management,updater$:this.appStateUpdater,mount:async params=>{const{renderApp:renderApp}=await __webpack_require__.e(0).then(__webpack_require__.bind(null,833));const[coreStart,depsStart]=await core.getStartServices();return renderApp(coreStart,depsStart,params,utils_constants["D"].SNAPSHOT_POLICIES,dataSourceManagement)}});if(core.chrome.navGroup.getNavGroupEnabled()){core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].INDICES)}`,title:"Indexes",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.indexes,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].INDICES)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].MANAGED_INDICES)}`,title:"Policy-managed indexes",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.policy_managed_indexes,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].MANAGED_INDICES)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].DATA_STREAMS)}`,title:"Data streams",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.data_streams,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].DATA_STREAMS)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].ALIASES)}`,title:"Index aliases",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.aliases,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].ALIASES)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].TEMPLATES)}`,title:"Index templates",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.index_templates,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].TEMPLATES)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].COMPOSABLE_TEMPLATES)}`,title:"Component templates",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.component_templates,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].COMPOSABLE_TEMPLATES)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].NOTIFICATIONS)}`,title:"Index operation notifications",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.notification_settings,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].NOTIFICATIONS)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].ROLLUPS)}`,title:"Rollup jobs",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.rollup_jobs,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].ROLLUPS)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].TRANSFORMS)}`,title:"Transform jobs",workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.transform_jobs,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].TRANSFORMS)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].SNAPSHOTS)}`,title:"Index snapshots",category:ISM_CATEGORIES.index_backup_and_recovery,workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.index_snapshots,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].SNAPSHOTS)});core.application.register({id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].REPOSITORIES)}`,title:"Snapshot repositories",category:ISM_CATEGORIES.index_backup_and_recovery,workspaceAvailability:WorkspaceAvailability.outsideWorkspace,description:ISM_FEATURE_DESCRIPTION.snapshot_repositories,updater$:this.appStateUpdater,mount:async params=>mountWrapper(params,utils_constants["D"].REPOSITORIES)})}Main["a"].subscribe(dataSourceOption=>{if(dataSourceOption){this.appStateUpdater.next(this.updateDefaultRouteOfManagementApplications)}});core.chrome.navGroup.addNavLinksToGroup(core_utils["c"].dataAdministration,[{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].INDICES)}`,category:core_utils["b"].manageData,order:200}
17,{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].MANAGED_INDICES)}`,category:ISM_CATEGORIES.automation_policies,order:100},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].DATA_STREAMS)}`,category:core_utils["b"].manageData,order:400},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].ALIASES)}`,category:core_utils["b"].manageData,order:300},{id:imApplicationID,category:ISM_CATEGORIES.automation_policies,title:"Index State Management policies",order:200},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].TEMPLATES)}`,category:ISM_CATEGORIES.templates,order:100},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].NOTIFICATIONS)}`,category:core_utils["b"].manageData,order:500},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].ROLLUPS)}`,category:ISM_CATEGORIES.automation_policies,order:300},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].TRANSFORMS)}`,category:ISM_CATEGORIES.automation_policies,order:400},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].SNAPSHOTS)}`,category:ISM_CATEGORIES.index_backup_and_recovery,order:100},{id:smApplicationID,category:ISM_CATEGORIES.index_backup_and_recovery,title:"Snapshot policies",order:200},{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].REPOSITORIES)}`,category:ISM_CATEGORIES.index_backup_and_recovery,order:300}
17,{id:`opensearch_index_management_dashboards_${encodeURIComponent(utils_constants["D"].COMPOSABLE_TEMPLATES)}`,category:ISM_CATEGORIES.templates,order:200}]);return{registerAction:(actionType,uiActionCtor,defaultAction)=>{helpers["a"].registerAction(actionType,uiActionCtor,defaultAction)}}}start(core,_ref2){let{navigation:navigation}=_ref2;Object.freeze(helpers["a"].repository);Object(Services["g"])(navigation.ui);Object(Services["f"])(core.application);Object(Services["h"])(core.uiSettings);return{}}}var interfaces=__webpack_require__(20);function public_plugin(initializerContext){return new plugin_IndexManagementPlugin(initializerContext)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return pick}));function pick(obj,keys){return keys.reduce((acc,key)=>{if(obj.hasOwnProperty(key)){acc[key]=obj[key]}return acc},{})}},function(module,exports){module.exports=__osdSharedDeps__.MonacoBarePluginApi},function(module,exports){module.exports=__osdSharedDeps__.OsdMonaco},function(module,exports){module.exports=__osdSharedDeps__.Theme}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.