/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.apm_bundle_jsonpfunction=window.apm_bundle_jsonpfunction||[]).push([[6],{112:function(e,t,a){"use strict";function n(e){const[,t="",a=""]=e.match(/(^-?\d+)?(\w+)?/)||[];return{amount:parseInt(t,10),unit:a}}function i({amount:e,unit:t}){return`${e}${t}`}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}))},118:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(9),i=a(0),s=a(112);function l(e,t){return Object(n.isFinite)(e)&&Object(n.isFinite)(t)?"between":Object(n.isFinite)(e)?"gt":Object(n.isFinite)(t)?"lt":void 0}function r(e,t){return i.i18n.translate("xpack.apm.agentConfig.range.errorText",{defaultMessage:"{rangeType, select,\n between {Must be between {min} and {max}}\n gt {Must be greater than {min}}\n lt {Must be less than {max}}\n other {Must be an integer}\n }",values:{min:e,max:t,rangeType:l("string"==typeof e?Object(s.a)(e).amount:e,"string"==typeof t?Object(s.a)(t).amount:t)}})}},170:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(35),i=a(84),s=a(118);function l({min:e=-1/0,max:t=1/0}={}){const a=Object(s.a)(e,t);return new n.Type("integerRt",n.string.is,((s,l)=>i.either.chain(n.string.validate(s,l),(i=>{const r=parseInt(i,10);return r>=e&&r<=t?n.success(i):n.failure(s,l,a)}))),n.identity)}},171:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(35),i=a(84),s=a(10),l=a.n(s),r=a(112),o=a(118);function p(e){if(e){const{amount:t,unit:a}=Object(r.a)(e);if(isFinite(t)&&a)return function({amount:e,unit:t}){return l.a.duration(e,t)}({amount:t,unit:a})}}function u({min:e,max:t}){var a,s;const l=null!==(a=p(e))&&void 0!==a?a:-1/0,r=null!==(s=p(t))&&void 0!==s?s:1/0,u=Object(o.a)(e,t);return new n.Type("durationRt",n.string.is,((e,t)=>i.either.chain(n.string.validate(e,t),(a=>{const i=p(a);return void 0!==i&&i>=l&&i<=r?n.success(a):n.failure(e,t,u)}))),n.identity)}},204:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(35),i=a(84),s=a(112),l=a(118),r=a(4);const o=["B","KB","MB","GB","TB","PB","EB"];function p({value:e,decimalUnitBase:t}){if(e){const{amount:a,unit:n}=Object(s.a)(e);if(Object(r.a)(a)&&n)return function(e,t,a){const n=a?1e3:1024,i=t?o.indexOf(t.toUpperCase()):0;if(!(i<0))return e*n**i}(a,n,t)}}function u({min:e,max:t}){var a,s;const r=null!==(a=p({value:e,decimalUnitBase:!0}))&&void 0!==a?a:-1/0,o=null!==(s=p({value:t,decimalUnitBase:!0}))&&void 0!==s?s:1/0,u=Object(l.a)(e,t);return new n.Type("storageSizeRt",n.string.is,((e,t)=>i.either.chain(n.string.validate(e,t),(a=>{const i=p({value:a,decimalUnitBase:!0});return void 0!==i&&i>=r&&i<=o?n.success(a):n.failure(e,t,u)}))),n.identity)}},480:function(e,t,a){"use strict";a.d(t,"a",(function(){return D}));var n=a(17),i=a(0),s=a(1),l=a.n(s),r=a(21),o=a(170),p=a(84),u=a(141),g=a(9);const c=i.i18n.translate("xpack.apm.fleet_integration.settings.requiredLabel",{defaultMessage:"Required"}),m=i.i18n.translate("xpack.apm.fleet_integration.settings.optionalLabel",{defaultMessage:"Optional"}),d=i.i18n.translate("xpack.apm.fleet_integration.settings.requiredFieldLabel",{defaultMessage:"Required field"});function f(e,t){return function e(a){return!a.map((a=>{var n;if("advanced_setting"===a.type)return e(a.settings);if(a.settings)return e(a.settings);const{isValid:i}=b(a,null===(n=t[a.key])||void 0===n?void 0:n.value);return i})).flat().some((e=>!e))}(e)}function b(e,t){if(!Object(g.isFinite)(t)&&Object(g.isEmpty)(t))return{isValid:!e.required,message:d};if(e.validation){const a=e.validation.decode(String(t)),n=u.PathReporter.report(a)[0];return{isValid:Object(p.isRight)(a),message:n}}return{isValid:!0,message:""}}var y=a(171),x=a(35);const k=new RegExp(/[\[\]]/),h="enable_rum";var _=a(37),v=a(204);const M="tail_sampling_enabled",T="tls_enabled";var A=a(40);const E=a.n(A).a.div.withConfig({displayName:"FixedHeightDiv",componentId:"sc-ycdtce-0"})(["height:300px;"]),w=i.i18n.translate("xpack.apm.fleet_integration.settings.enabledLabel",{defaultMessage:"Enabled"}),S=i.i18n.translate("xpack.apm.fleet_integration.settings.disabledLabel",{defaultMessage:"Disabled"});function L({row:e,value:t,onChange:a,isDisabled:s}){switch(e.type){case"boolean":return l.a.createElement(n.EuiSwitch,{"data-test-subj":e.dataTestSubj,disabled:s,label:e.placeholder||(t?w:S),checked:t,onChange:t=>{a(e.key,t.target.checked)}});case"duration":case"storageSize":case"text":return l.a.createElement(n.EuiFieldText,{"data-test-subj":e.dataTestSubj,disabled:s,value:t,prepend:s?l.a.createElement(n.EuiIcon,{type:"lock"}):void 0,onChange:t=>{a(e.key,t.target.value)}});case"area":return l.a.createElement(n.EuiTextArea,{"data-test-subj":e.dataTestSubj,disabled:s,value:t,onChange:t=>{a(e.key,t.target.value)}});case"bytes":case"integer":return l.a.createElement(n.EuiFieldNumber,{"data-test-subj":e.dataTestSubj,disabled:s,value:t,onChange:t=>{a(e.key,t.target.value)}});case"combo":{const s=Array.isArray(t)?t.map((e=>({label:e}))):[];return l.a.createElement(n.EuiComboBox,{"data-test-subj":e.dataTestSubj,noSuggestions:!0,placeholder:i.i18n.translate("xpack.apm.fleet_integration.settings.selectOrCreateOptions",{defaultMessage:"Select or create options"}),options:s,selectedOptions:s,onChange:t=>{a(e.key,t.map((({label:e})=>e)))},onCreateOption:n=>{a(e.key,[...t,n])},isClearable:!0})}case"yaml":return l.a.createElement(E,null,l.a.createElement(r.CodeEditor,{languageId:"yaml",width:"100%",height:"300px",value:t,onChange:t=>{a(e.key,t)},options:{ariaLabel:i.i18n.translate("xpack.apm.fleet_integration.settings.yamlCodeEditor",{defaultMessage:"YAML Code Editor"}),wordWrap:"off",tabSize:2,lineNumbers:"off",lineNumbersMinChars:0,folding:!1,lineDecorationsWidth:0,overviewRulerBorder:!1}}));default:throw new Error(`Unknown type "${e.type}"`)}}function C({settingsSection:e,vars:t,onChange:a}){const{title:s,subtitle:r,settings:o,isPlatinumLicence:p}=e;return l.a.createElement(n.EuiPanel,null,l.a.createElement(n.EuiFlexGroup,{direction:"column",gutterSize:"s"},l.a.createElement(n.EuiFlexItem,null,l.a.createElement(n.EuiTitle,{size:"s"},l.a.createElement("h3",null,s,"  ",p&&l.a.createElement(n.EuiBetaBadge,{label:i.i18n.translate("xpack.apm.fleet_integration.settings.platinumBadgeLabel",{defaultMessage:"Platinum"}),title:i.i18n.translate("xpack.apm.fleet_integration.settings.platinumBadgeTooltipTitle",{defaultMessage:"Platinum license required"}),tooltipContent:i.i18n.translate("xpack.apm.fleet_integration.settings.platinumBadgeTooltipDescription",{defaultMessage:"Configurations are saved but ignored if your Kibana licence is not Platinum."})})))),r&&l.a.createElement(n.EuiFlexItem,null,l.a.createElement(n.EuiText,{size:"s",color:"subdued"},r))),l.a.createElement(n.EuiHorizontalRule,{margin:"s"}),o.map((e=>function({initialSetting:e,vars:t,onChange:a}){return function e(i){if("advanced_setting"===i.type)return l.a.createElement(P,null,i.settings.map((t=>e(t))));const{key:s}=i,r=null==t?void 0:t[s];if(!r)return null;const{value:o,frozen:p}=r,{isValid:u,message:g}=b(i,o);return l.a.createElement(l.a.Fragment,{key:s},l.a.createElement(n.EuiDescribedFormGroup,{title:l.a.createElement("h3",null,i.rowTitle),description:i.rowDescription},l.a.createElement(n.EuiFormRow,{label:i.label,isInvalid:!u,error:u?void 0:g,helpText:l.a.createElement(n.EuiText,{size:"xs"},i.helpText),labelAppend:l.a.createElement(n.EuiText,{size:"xs",color:"subdued"},i.labelAppend)},l.a.createElement(L,{row:i,onChange:a,value:o,isDisabled:p}))),i.settings&&o&&i.settings.map((t=>e(t))))}(e)}({initialSetting:e,vars:t,onChange:a}))))}function P({children:e}){const[t,a]=Object(s.useState)(!1);return l.a.createElement(l.a.Fragment,null,l.a.createElement(n.EuiFlexGroup,null,l.a.createElement(n.EuiFlexItem,null),l.a.createElement(n.EuiFlexItem,null,l.a.createElement(n.EuiFlexGroup,null,l.a.createElement(n.EuiFlexItem,{grow:!1},l.a.createElement(n.EuiButtonEmpty,{"data-test-subj":"apmAdvancedOptionsAdvancedOptionsButton",iconType:t?"arrowDown":"arrowRight",onClick:()=>{a((e=>!e))}},i.i18n.translate("xpack.apm.fleet_integration.settings.advancedOptionsLavel",{defaultMessage:"Advanced options"})))))),t&&l.a.createElement(l.a.Fragment,null,l.a.createElement(n.EuiHorizontalRule,null),e))}function D({vars:e={},updateAPMPolicy:t}){var a;const u=null===(a=Object(r.useKibana)().services.docLinks)||void 0===a?void 0:a.links.apm.tailSamplingPolicies,{apmSettings:g,rumSettings:d,tlsSettings:b,agentAuthorizationSettings:A,tailSamplingSettings:E,debugSettings:w}=Object(s.useMemo)((()=>{return{apmSettings:[{type:"text",key:"host",labelAppend:c,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.hostLabel",{defaultMessage:"Host"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.hostTitle",{defaultMessage:"Server configuration"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.hostDescription",{defaultMessage:"Host defines the host and port the server is listening on. URL is the unchangeable, publicly reachable server URL for deployments on Elastic Cloud or ECK."}),dataTestSubj:"packagePolicyHostInput",required:!0},{type:"text",key:"url",labelAppend:c,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.urlLabel",{defaultMessage:"URL"}),dataTestSubj:"packagePolicyUrlInput",required:!0},{type:"advanced_setting",settings:[{key:"max_header_bytes",type:"integer",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxHeaderBytesLabel",{defaultMessage:"Maximum size of a request's header (bytes)"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxHeaderBytesTitle",{defaultMessage:"Limits"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxHeaderBytesDescription",{defaultMessage:"Set limits on request headers sizes and timing configurations."}),validation:Object(o.a)({min:1})},{key:"idle_timeout",type:"duration",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.idleTimeoutLabel",{defaultMessage:"Idle time before underlying connection is closed"}),validation:Object(y.a)({min:"1ms"})},{key:"read_timeout",type:"duration",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.readTimeoutLabel",{defaultMessage:"Maximum duration for reading an entire request"}),validation:Object(y.a)({min:"1ms"})},{key:"shutdown_timeout",type:"duration",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.shutdownTimeoutLabel",{defaultMessage:"Maximum duration before releasing resources when shutting down"}),validation:Object(y.a)({min:"1ms"})},{key:"write_timeout",type:"duration",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.writeTimeoutLabel",{defaultMessage:"Maximum duration for writing a response"}),validation:Object(y.a)({min:"1ms"})},{key:"max_event_bytes",type:"integer",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxEventBytesLabel",{defaultMessage:"Maximum size per event (bytes)"}),validation:Object(o.a)({min:1})},{key:"max_connections",type:"integer",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxConnectionsLabel",{defaultMessage:"Simultaneously accepted connections"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.maxConnectionsHelpText",{defaultMessage:"0 for unlimited"}),validation:Object(o.a)({min:0})},{key:"response_headers",type:"area",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.responseHeadersLabel",{defaultMessage:"Custom HTTP headers added to HTTP responses"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.responseHeadersHelpText",{defaultMessage:"Might be used for security policy compliance."}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.responseHeadersTitle",{defaultMessage:"Custom headers"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.responseHeadersDescription",{defaultMessage:"Custom HTTP headers added to HTTP responses"})},{key:"capture_personal_data",type:"boolean",rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.capturePersonalDataTitle",{defaultMessage:"Capture personal data"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.capturePersonalDataDescription",{defaultMessage:"Capture personal data such as IP or User Agent"})},{key:"default_service_environment",type:"text",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.defaultServiceEnvironmentLabel",{defaultMessage:"Default Service Environment"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.defaultServiceEnvironmentTitle",{defaultMessage:"Service configuration"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.defaultServiceEnvironmentDescription",{defaultMessage:"Default service environment to record in events which have no service environment defined."})}]}],rumSettings:[{key:h,type:"boolean",rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.enableRumTitle",{defaultMessage:"Enable RUM"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.enableRumDescription",{defaultMessage:"Enable Real User Monitoring (RUM)"}),settings:[{key:"rum_allow_origins",type:"combo",label:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowOriginsLabel",{defaultMessage:"Allowed Origins"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowOriginsHelpText",{defaultMessage:"Allowed Origin headers to be sent by User Agents."}),validation:new x.Type("allowedOriginsRt",x.string.is,((e,t)=>p.either.chain(x.string.validate(e,t),(a=>k.test(a)?x.failure(e,t,i.i18n.translate("xpack.apm.fleet_integration.settings.rum.allowedHeadersValidation",{defaultMessage:"Square brackets not allowed"})):x.success(a)))),x.identity)},{key:"rum_allow_headers",type:"combo",label:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowHeaderLabel",{defaultMessage:"Access-Control-Allow-Headers"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowHeaderHelpText",{defaultMessage:'Supported Access-Control-Allow-Headers in addition to "Content-Type", "Content-Encoding" and "Accept".'}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowHeaderTitle",{defaultMessage:"Custom headers"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumAllowHeaderDescription",{defaultMessage:"Configure authentication for the agent"})},{key:"rum_response_headers",type:"area",label:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumResponseHeadersLabel",{defaultMessage:"Custom HTTP response headers"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumResponseHeadersHelpText",{defaultMessage:"Added to RUM responses, e.g. for security policy compliance."})},{type:"advanced_setting",settings:[{key:"rum_library_pattern",type:"text",label:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumLibraryPatternLabel",{defaultMessage:"Library Frame Pattern"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumLibraryPatternHelpText",{defaultMessage:"Identify library frames by matching a stacktrace frame's file_name and abs_path against this regexp."})},{key:"rum_exclude_from_grouping",type:"text",label:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumExcludeFromGroupingLabel",{defaultMessage:"Exclude from grouping"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.rumExcludeFromGroupingHelpText",{defaultMessage:"Exclude stacktrace frames from error group calculations by matching a stacktrace frame's `file_name` against this regexp."})}]}]}],tlsSettings:[{key:T,rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsEnabledTitle",{defaultMessage:"Enable TLS"}),type:"boolean",settings:[{key:"tls_certificate",type:"text",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsCertificateLabel",{defaultMessage:"File path to server certificate"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsCertificateTitle",{defaultMessage:"TLS certificate"}),labelAppend:c,required:!0},{key:"tls_key",type:"text",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsKeyLabel",{defaultMessage:"File path to server certificate key"}),labelAppend:c,required:!0},{key:"tls_supported_protocols",type:"combo",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsSupportedProtocolsLabel",{defaultMessage:"Supported protocol versions"}),labelAppend:m},{key:"tls_cipher_suites",type:"combo",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsCipherSuitesLabel",{defaultMessage:"Cipher suites for TLS connections"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsCipherSuitesHelpText",{defaultMessage:"Not configurable for TLS 1.3."}),labelAppend:m},{key:"tls_curve_types",type:"combo",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.tlsCurveTypesLabel",{defaultMessage:"Curve types for ECDHE based cipher suites"}),labelAppend:m}]}],debugSettings:[{key:"expvar_enabled",type:"boolean",labelAppend:m,rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.expvarEnabledTitle",{defaultMessage:"Enable APM Server Golang expvar support"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.expvarEnabledDescription",{defaultMessage:"Exposed under /debug/vars"})},{key:"pprof_enabled",type:"boolean",labelAppend:m,rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.pprofEnabledTitle",{defaultMessage:"Enable APM Server pprof support"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.pprofEnabledDescription",{defaultMessage:"Expose HTTP endpoints to retrieve profiling data"})}],agentAuthorizationSettings:[{type:"boolean",key:"api_key_enabled",labelAppend:m,placeholder:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyAuthenticationPlaceholder",{defaultMessage:"API key for agent authentication"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyAuthenticationHelpText",{defaultMessage:"Enable API Key auth between APM Server and APM Agents."}),settings:[{key:"api_key_limit",type:"integer",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyLimitLabel",{defaultMessage:"Number of keys"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyLimitHelpText",{defaultMessage:"Might be used for security policy compliance."}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyLimitTitle",{defaultMessage:"Maximum number of API keys of Agent authentication"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.apiKeyLimitDescription",{defaultMessage:"Restrict number of unique API keys per minute, used for auth between APM Agents and Server."}),validation:Object(o.a)({min:1})}]},{type:"text",key:"secret_token",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.secretTokenLabel",{defaultMessage:"Secret token"})},{type:"boolean",key:"anonymous_enabled",rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousEnabledTitle",{defaultMessage:"Anonymous Agent access"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousEnabledHelpText",{defaultMessage:"Enable anonymous access to APM Server for select APM Agents."}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousEnabledDescription",{defaultMessage:"Allow anonymous access only for specified agents and/or services. This is primarily intended to allow limited access for untrusted agents, such as Real User Monitoring. When anonymous auth is enabled, only agents matching the Allowed Agents and services matching the Allowed Services configuration are allowed. See below for details on default values."}),settings:[{type:"combo",key:"anonymous_allow_agent",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousAllowAgentLabel",{defaultMessage:"Allowed agents"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousAllowAgentHelpText",{defaultMessage:"Allowed agent names for anonymous access."})},{type:"combo",key:"anonymous_allow_service",labelAppend:m,label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousAllowServiceLabel",{defaultMessage:"Allowed services"}),helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousAllowServiceHelpText",{defaultMessage:"Allowed service names for anonymous access."})},{key:"anonymous_rate_limit_ip_limit",type:"integer",label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousRateLimitIpLimitLabel",{defaultMessage:"Rate limit (IP limit)"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousRateLimitIpLimitHelpText",{defaultMessage:"Number of unique client IPs for which a distinct rate limit will be maintained."}),validation:Object(o.a)({min:1})},{key:"anonymous_rate_limit_event_limit",type:"integer",label:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousRateLimitEventLimitLabel",{defaultMessage:"Event rate limit (event limit)"}),labelAppend:m,helpText:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.anonymousRateLimitEventLimitHelpText",{defaultMessage:"Maximum number of events per client IP per second."}),validation:Object(o.a)({min:1})}]}],tailSamplingSettings:(e=u,[{key:M,rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingEnabledTitle",{defaultMessage:"Enable tail-based sampling"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.enableTailSamplingDescription",{defaultMessage:"Enable tail-based sampling."}),type:"boolean",settings:[{key:"tail_sampling_interval",type:"duration",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingInterval",{defaultMessage:"Tail sampling interval"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingIntervalTitle",{defaultMessage:"Interval"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingIntervalDescription",{defaultMessage:"Interval for synchronization between multiple APM Servers. Should be in the order of tens of seconds or low minutes."}),labelAppend:m,required:!1,validation:Object(y.a)({min:"1s"})},{key:"tail_sampling_policies",type:"yaml",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPolicies",{defaultMessage:"Tail sampling policies"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPoliciesTitle",{defaultMessage:"Policies"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingPoliciesDescription",{defaultMessage:"Policies map trace events to a sample rate. Each policy must specify a sample rate. Trace events are matched to policies in the order specified. All policy conditions must be true for a trace event to match. Each policy list should conclude with a policy that only specifies a sample rate. This final policy is used to catch remaining trace events that don’t match a stricter policy."}),helpText:e&&l.a.createElement(_.FormattedMessage,{id:"xpack.apm.fleet_integration.settings.tailSamplingDocsHelpText",defaultMessage:"Learn more about tail sampling policies in our {link}.",values:{link:l.a.createElement(n.EuiLink,{"data-test-subj":"apmGetTailSamplingSettingsDocsLink",href:e,target:"_blank"},i.i18n.translate("xpack.apm.fleet_integration.settings.tailSamplingDocsHelpTextLink",{defaultMessage:"docs"}))}}),required:!0},{key:"tail_sampling_storage_limit",type:"storageSize",label:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingStorageLimit",{defaultMessage:"Tail sampling storage limit"}),rowTitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingStorageLimitTitle",{defaultMessage:"Storage limit"}),rowDescription:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.tailSamplingStorageLimitDescription",{defaultMessage:"The amount of storage space allocated for trace events matching tail sampling policies. Caution: Setting this limit higher than the allowed space may cause APM Server to become unhealthy."}),labelAppend:m,required:!1,validation:Object(v.a)({min:"0GB"})}]}])};var e}),[u]);function S(a,n){const i=function(e,t,a){return{...e,[t]:{...e[t],value:a}}}(e,a,n),s=f(g,i)&&function(e,t){return!e[h].value||f(t,e)}(i,d)&&function(e,t){return!e[T].value||f(t,e)}(i,b)&&f(A,i)&&function(e,t){return!e[M].value||f(t,e)}(i,E)&&f(w,i);t(i,s)}const L=[{id:"apm",title:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.settings.title",{defaultMessage:"General"}),subtitle:i.i18n.translate("xpack.apm.fleet_integration.settings.apm.settings.subtitle",{defaultMessage:"Settings for the APM integration."}),settings:g},{id:"rum",title:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.settings.title",{defaultMessage:"Real User Monitoring"}),subtitle:i.i18n.translate("xpack.apm.fleet_integration.settings.rum.settings.subtitle",{defaultMessage:"Manage the configuration of the RUM JS agent."}),settings:d},{id:"tls",title:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.settings.title",{defaultMessage:"TLS Settings"}),subtitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tls.settings.subtitle",{defaultMessage:"Settings for TLS certification."}),settings:b},{id:"agentAuthorization",title:i.i18n.translate("xpack.apm.fleet_integration.settings.agentAuthorization.settings.title",{defaultMessage:"Agent authorization"}),settings:A},...e[M]?[{id:"tailSampling",title:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.settings.title",{defaultMessage:"Tail-based sampling"}),subtitle:i.i18n.translate("xpack.apm.fleet_integration.settings.tailSampling.settings.subtitle",{defaultMessage:"Manage tail-based sampling for services and traces."}),settings:E,isPlatinumLicence:!0}]:[],{id:"debug",title:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.settings.title",{defaultMessage:"Debug settings"}),subtitle:i.i18n.translate("xpack.apm.fleet_integration.settings.debug.settings.subtitle",{defaultMessage:"Settings for the APM server debug flags"}),settings:w}];return l.a.createElement(l.a.Fragment,null,L.map((t=>l.a.createElement(l.a.Fragment,{key:t.id},l.a.createElement(C,{settingsSection:t,vars:e,onChange:S}),l.a.createElement(n.EuiSpacer,null)))))}}}]);