@ansible/ansible-ui-framework 2.4.532 → 2.4.534

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -41474,7 +41474,7 @@ function lCe(e) {
41474
41474
  id: o,
41475
41475
  style: { backgroundPosition: "calc(100% - 1.2em) .5em", padding: 0 },
41476
41476
  "aria-invalid": e.invalid ? "true" : void 0,
41477
- children: /* @__PURE__ */ v.jsx("div", { id: e.id, ref: l, style: { height: "100%" } })
41477
+ children: /* @__PURE__ */ v.jsx("div", { id: e.id, "data-cy": e.id, ref: l, style: { height: "100%" } })
41478
41478
  }
41479
41479
  );
41480
41480
  }
@@ -41688,7 +41688,7 @@ function QAe(e) {
41688
41688
  sCe,
41689
41689
  {
41690
41690
  ...h,
41691
- label: o ? /* @__PURE__ */ v.jsxs("span", { style: { alignItems: "center" }, children: [
41691
+ label: o ? /* @__PURE__ */ v.jsxs("span", { "data-cy": "expandable", style: { alignItems: "center" }, children: [
41692
41692
  /* @__PURE__ */ v.jsx(
41693
41693
  tj,
41694
41694
  {
package/index.umd.cjs CHANGED
@@ -463,7 +463,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
463
463
  ${e.value}
464
464
  \`\`\``}}function F_e(e){return typeof e=="string"||"language"in e?[Y6(e)]:Array.isArray(e)?e.map(Y6):[q6(e)]}function N_e(e){const t={contents:F_e(e.contents)};return e.range&&(t.range=ln(e.range)),t}function vy(e){return{character:e.column-1,line:e.lineNumber-1}}function z_e(e){const{Uri:t}=pr(),n={range:ln(e.range)};return e.tooltip!=null&&(n.tooltip=e.tooltip),e.target!=null&&(n.url=t.parse(e.target)),n}function B_e(e){const{Uri:t}=pr(),n={range:ln(e.targetRange),targetSelectionRange:ln(e.targetSelectionRange),uri:t.parse(e.targetUri)};return e.originSelectionRange&&(n.originSelectionRange=ln(e.originSelectionRange)),n}function K6(e,t,n){const r=new Map,i=c=>{if(t==="*")return!0;const u=c.getLanguageId();return Array.isArray(t)?t.includes(u):t===u},a=async c=>{const u=await n.provideMarkerData(c);!c.isDisposed()&&i(c)&&e.editor.setModelMarkers(c,n.owner,u??[])},o=c=>{if(!i(c))return;let u;r.set(String(c.uri),c.onDidChangeContent(()=>{clearTimeout(u),u=setTimeout(()=>{a(c)},500)})),a(c)},l=c=>{e.editor.setModelMarkers(c,n.owner,[]);const u=String(c.uri),f=r.get(u);f&&(f.dispose(),r.delete(u))},s=[e.editor.onDidCreateModel(o),e.editor.onWillDisposeModel(c=>{var u;l(c),(u=n.doReset)==null||u.call(n,c)}),e.editor.onDidChangeModelLanguage(c=>{var u;l(c.model),o(c.model),(u=n.doReset)==null||u.call(n,c.model)})];for(const c of e.editor.getModels())o(c);return{dispose(){for(const c of r.keys())l(e.editor.getModel(e.Uri.parse(c)));for(;s.length;)s.pop().dispose()}}}function W_e(e,t){let{createData:n,interval:r=3e4,label:i,moduleId:a,stopWhenIdleFor:o=12e4}=t,l,s=0,c=!1;const u=()=>{l&&(l.dispose(),l=void 0)},f=setInterval(()=>{if(!l)return;Date.now()-s>o&&u()},r);return{dispose(){c=!0,clearInterval(f),u()},getWorker(...d){if(c)throw new Error("Worker manager has been disposed");return s=Date.now(),l||(l=e.editor.createWebWorker({createData:n,label:i,moduleId:a})),l.withSyncedResources(d)},updateCreateData(d){n=d,u()}}}function Z6(e){return{owner:"yaml",async provideMarkerData(t){const r=await(await e(t.uri)).doValidation(String(t.uri));return r==null?void 0:r.map(i=>V6(i))},async doReset(t){await(await e(t.uri)).resetSchema(String(t.uri))}}}function R_e(e){return{triggerCharacters:[" ",":"],async provideCompletionItems(t,n){const r=t.uri,i=t.getWordUntilPosition(n),o=await(await e(r)).doComplete(String(r),vy(n));if(o)return D_e(o,{range:{startLineNumber:n.lineNumber,startColumn:i.startColumn,endLineNumber:n.lineNumber,endColumn:i.endColumn}})}}}function V_e(e){return{async provideDefinition(t,n){const r=t.uri,a=await(await e(r)).doDefinition(String(r),vy(n));return a==null?void 0:a.map(B_e)}}}function H_e(e){return{async provideHover(t,n){const r=t.uri,a=await(await e(r)).doHover(String(r),vy(n));if(a)return N_e(a)}}}function U_e(e){return{async provideDocumentSymbols(t){const n=t.uri,i=await(await e(n)).findDocumentSymbols(String(n));return i==null?void 0:i.map(G6)}}}function q_e(e){return{async provideDocumentFormattingEdits(t){const n=t.uri,i=await(await e(n)).format(String(n));return i==null?void 0:i.map(H6)}}}function G_e(e){return{async provideLinks(t){const n=t.uri,i=await(await e(n)).findLinks(String(n));if(i)return{links:i.map(z_e)}}}}function Y_e(e){return{async provideCodeActions(t,n,r){const i=t.uri,o=await(await e(i)).getCodeAction(String(i),py(n),A_e(r));if(o)return{actions:o.map(l=>C_e(l)),dispose(){}}}}}function K_e(e){return{async provideFoldingRanges(t){const n=t.uri,i=await(await e(n)).getFoldingRanges(String(n));return i==null?void 0:i.map($_e)}}}function Z_e(e,t){const n={completion:!0,customTags:[],enableSchemaRequest:!1,format:!0,isKubernetes:!1,hover:!0,schemas:[],validate:!0,yamlVersion:"1.2",...t};m_e(e),e.languages.register({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"]});const r=W_e(e,{label:"yaml",moduleId:"monaco-yaml/yaml.worker",createData:n});let i=K6(e,"yaml",Z6(r.getWorker));const a=[r,e.languages.registerCompletionItemProvider("yaml",R_e(r.getWorker)),e.languages.registerHoverProvider("yaml",H_e(r.getWorker)),e.languages.registerDefinitionProvider("yaml",V_e(r.getWorker)),e.languages.registerDocumentSymbolProvider("yaml",U_e(r.getWorker)),e.languages.registerDocumentFormattingEditProvider("yaml",q_e(r.getWorker)),e.languages.registerLinkProvider("yaml",G_e(r.getWorker)),e.languages.registerCodeActionProvider("yaml",Y_e(r.getWorker)),e.languages.registerFoldingRangeProvider("yaml",K_e(r.getWorker)),e.languages.setLanguageConfiguration("yaml",{comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.languages.IndentAction.Indent}}]})];return{dispose(){for(const o of a)o.dispose()},update(o){r.updateCreateData(Object.assign(n,o)),i.dispose(),i=K6(e,"yaml",Z6(r.getWorker))}}}function X_e(e){const{onChange:t,language:n,setError:r,name:i,clearErrors:a}=e,o="data-editor",l=x.useRef(null),s=x.useRef({}),c=Ja();return x.useEffect(()=>{var f;Z_e(Pn,{validate:!0,format:!0,schemas:[{uri:"",fileMatch:[],schema:{type:"object",properties:{},additionalProperties:!0}}]}),Pn.editor.defineTheme("my-dark",{base:"vs-dark",inherit:!0,colors:{"editor.background":"#00000000","minimap.background":"#00000000","scrollbarSlider.background":"#FFFFFF22"},rules:[{token:"",background:"#222222"}]}),Pn.editor.defineTheme("my-light",{base:"vs",inherit:!0,colors:{"editor.background":"#FFFFFF00","minimap.background":"#FFFFFF00","scrollbarSlider.background":"#FFFFFF22"},rules:[]});let u;return Pn.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),l.current&&(u=(f=Pn==null?void 0:Pn.editor)==null?void 0:f.create(l.current,{lineNumbers:"on",theme:"my-dark",lineDecorationsWidth:8,padding:{top:6,bottom:8},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0}),s.current.editor=u),window.MonacoEnvironment={getWorker(d,h){switch(h){case"editorWorkerService":return new Worker(new URL("/assets/editor.worker-9a091e5f.js",self.location),{type:"module"});case"json":return new Worker(new URL("/assets/json.worker-f7b9576c.js",self.location),{type:"module"});case"yaml":return new Worker(new URL("/assets/yaml.worker-b08097eb.js",self.location),{type:"module"});default:throw new Error(`Unknown label ${h}`)}}},()=>{u.dispose()}},[]),x.useEffect(()=>{var g,y,_,b,S,O,w,A,T;const u=(g=s==null?void 0:s.current)==null?void 0:g.editor,f=Pn.editor.getModels()[0];u&&f&&n&&Pn.editor.setModelLanguage(f,n),(b=(_=(y=s.current)==null?void 0:y.editor)==null?void 0:_.getModel())==null||b.onDidChangeContent(()=>{var k,P;t(((P=(k=s.current)==null?void 0:k.editor)==null?void 0:P.getValue())??"")});const d=(O=(S=s.current)==null?void 0:S.editor)==null?void 0:O.getValue();(w=s.current)!=null&&w.editor&&d!==e.value&&((T=(A=s.current)==null?void 0:A.editor)==null||T.setValue(e.value));const h=e.value.split(`
465
465
  `),p=document.getElementById(o);h.length>0&&p&&(p.style.minHeight="75px",p.style.height=`${(h.length+3)*19}px`)},[e.value,n,t]),so(l,()=>{var u;(u=s.current)!=null&&u.editor&&s.current.editor.layout()}),x.useEffect(()=>{var u;(u=s.current)!=null&&u.editor&&s.current.editor.updateOptions({theme:c.activeTheme==="dark"?"my-dark":"my-light"})},[c.activeTheme]),x.useEffect(()=>{Pn.editor.onDidChangeMarkers(()=>{var f,d;const u=Pn.editor.getModelMarkers({owner:(d=(f=Pn.editor)==null?void 0:f.getModels()[0])==null?void 0:d.getLanguageId()});u.length>0?r(i,{message:u.map(h=>h.message).join(`
466
- `)}):a(i)})},[r,a,i]),v.jsx("div",{className:"pf-c-form-control",id:o,style:{backgroundPosition:"calc(100% - 1.2em) .5em",padding:0},"aria-invalid":e.invalid?"true":void 0,children:v.jsx("div",{id:e.id,ref:l,style:{height:"100%"}})})}function J_e(e){const{name:t,children:n,helperText:r,helperTextInvalid:i,isRequired:a,labelHelp:o,labelHelpTitle:l,label:s}=e;return v.jsx(C.FormGroup,{id:`${e.id??""}-form-group`,"data-cy":t+"-form-group",fieldId:e.id,label:s,helperText:r,helperTextInvalid:i,validated:i?"error":void 0,isRequired:a,labelInfo:e.additionalControls,labelIcon:o?v.jsx(ia,{title:l,help:o}):void 0,children:n})}const Bd=Le(C.ToggleGroupItem)`
466
+ `)}):a(i)})},[r,a,i]),v.jsx("div",{className:"pf-c-form-control",id:o,style:{backgroundPosition:"calc(100% - 1.2em) .5em",padding:0},"aria-invalid":e.invalid?"true":void 0,children:v.jsx("div",{id:e.id,"data-cy":e.id,ref:l,style:{height:"100%"}})})}function J_e(e){const{name:t,children:n,helperText:r,helperTextInvalid:i,isRequired:a,labelHelp:o,labelHelpTitle:l,label:s}=e;return v.jsx(C.FormGroup,{id:`${e.id??""}-form-group`,"data-cy":t+"-form-group",fieldId:e.id,label:s,helperText:r,helperTextInvalid:i,validated:i?"error":void 0,isRequired:a,labelInfo:e.additionalControls,labelIcon:o?v.jsx(ia,{title:l,help:o}):void 0,children:n})}const Bd=Le(C.ToggleGroupItem)`
467
467
  &&:first-child#copy-button {
468
468
  margin-right: auto;
469
469
  }
@@ -471,7 +471,7 @@ ${e.value}
471
471
  color: var(--pf-c-form__helper-text--m-error--Color);
472
472
  font-size: var(--pf-c-form__helper-text--FontSize);
473
473
  `;function exe(e){const{t}=ut(),{handleCopy:n,handleDownload:r,handleUpload:i,allowCopy:a,allowDownload:o,allowUpload:l,toggleLanguages:s,setLanguage:c,selectedLanguage:u,errors:f,name:d}=e,h=[];a&&h.push(v.jsx(C.Tooltip,{content:t("Copy"),children:v.jsx(Bd,{id:"copy-button","data-cy":"copy-button","aria-label":t("Copy to clipboard"),icon:v.jsx(Ce.CopyIcon,{}),type:"button",onClick:()=>n()},"copy-button")},"copy-file")),l&&h.push(v.jsx(C.Tooltip,{content:t("Upload"),children:v.jsx(Bd,{id:"upload-button","data-cy":"upload-button","aria-label":t("Upload from file"),icon:v.jsx(Ce.UploadIcon,{}),type:"button",onClick:()=>i()},"upload-button")},"upload-file")),o&&h.push(v.jsx(C.Tooltip,{content:t("Download"),children:v.jsx(Bd,{id:"download-button","data-cy":"download-button","aria-label":t("Download file"),icon:v.jsx(Ce.DownloadIcon,{}),type:"button",onClick:()=>r()},"download-button")},"download-file"));const p=(s==null?void 0:s.map(g=>v.jsx(Bd,{id:`toggle-${g}`,"data-cy":`toggle-${g}`,"aria-label":t("Toggle to {{language}}",{language:g}),isSelected:u===g,isDisabled:!!f[d],text:g,type:"button",onChange:()=>c(g)},g)))||[];return v.jsxs(C.Flex,{justifyContent:{default:"justifyContentSpaceBetween"},children:[v.jsx(C.FlexItem,{children:v.jsx(C.ToggleGroup,{isCompact:!0,children:h})}),v.jsx(C.FlexItem,{align:{default:"alignRight"},children:v.jsx(C.ToggleGroup,{isCompact:!0,children:p})})]})}function txe(e){const{t}=ut(),{allowCopy:n=!0,allowDownload:r=!0,allowUpload:i=!0,defaultExpanded:a,isExpandable:o,isReadOnly:l,isRequired:s,label:c,name:u,toggleLanguages:f,validate:d,...h}=e,{formState:{isSubmitting:p,isValidating:g,errors:y},setError:_,clearErrors:b,getValues:S,control:O,setValue:w}=mi(),[A,T]=x.useState("yaml"),[k,P]=x.useState(!a),N=x.useRef(null),M=yh(),{writeToClipboard:j}=u_(),D=e.id??u.split(".").join("-");x.useEffect(()=>{y[u]||b(u)},[y,u,b]);const I=x.useCallback(J=>{const U=S(u);if(!(J!=="json"&&J!=="yaml"||!U)){if(d_e(U))return J==="json"?w(u,U):w(u,R6(U));if(f_e(U))return J==="json"?w(u,U):w(u,R6(JSON.stringify(U)));J==="json"?w(u,u_e(U)):w(u,U)}},[S,u,w]),W=x.useCallback(J=>{try{I(J),T(J)}catch(U){U instanceof Error?_(u,{message:U.message}):_(u,{message:t("Invalid syntax")})}},[I,u,_,t]),X=x.useCallback(()=>{j(S(u))},[S,u,j]),ne=x.useCallback(()=>{N.current&&N.current.click()},[]),re=x.useCallback(()=>{h_e(u||"codeEditorData",S(u));const U={variant:"success",title:t("File downloaded")};M.addAlert(U)},[M,S,u,t]),Z=x.useCallback(J=>{const U=J[0],Y=new FileReader;Y.onload=()=>{const G=Y.result;if(typeof G=="string"){w(u,G);const ie={variant:"success",title:t("File uploaded")};M.addAlert(ie)}},Y.onerror=()=>{const G={variant:"danger",title:t("Failed to upload file"),children:t("Unable to upload")};M.addAlert(G)},Y.readAsText(U)},[w,u,t,M]),R=FE({onDrop:Z,multiple:!1});return v.jsx(Uo,{name:u,control:O,shouldUnregister:!0,render:({field:{name:J,onChange:U,value:Y},fieldState:{error:G}})=>{var se;const ie=[...new Set((se=G==null?void 0:G.message)==null?void 0:se.split(`
474
- `))],z=Y!=null&&Y!=="";return v.jsx(J_e,{...h,label:o?v.jsxs("span",{style:{alignItems:"center"},children:[v.jsx(Ce.AngleRightIcon,{style:{transform:k?"rotate(0deg)":"rotate(90deg)",transition:"transform"},onClick:()=>P(K=>!K),"aria-label":t("Expand or collapse extra variables")}),e.label]}):e.label,id:D,helperTextInvalid:!(d&&g)&&(ie==null?void 0:ie.map(K=>v.jsx(Q_e,{children:K},K))),children:(!o||!k)&&v.jsxs(v.Fragment,{children:[v.jsx(exe,{allowCopy:n,allowDownload:r,allowUpload:i,errors:y,handleCopy:()=>X(),handleDownload:re,handleUpload:ne,name:J,selectedLanguage:A,setLanguage:W,toggleLanguages:f},"actions-row"),v.jsxs("div",{id:"code-editor-dropzone",...R.getRootProps({disabled:z}),style:{width:"100%",height:"100%"},children:[v.jsx("input",{id:"code-editor-dropzone-input",...R.getInputProps(),ref:N}),v.jsx(X_e,{setError:_,clearErrors:b,id:D,"data-cy":D,name:J,language:A,value:Y,onChange:U,isReadOnly:l||p,invalid:!(d&&g)&&(G==null?void 0:G.message)!==void 0})]})]})})},rules:{required:typeof c=="string"&&s===!0?{value:!0,message:`${Xn(c.toLocaleLowerCase())} is required.`}:void 0,validate:e.validate}})}function nxe(e){const{name:t,label:n,labelHelpTitle:r,labelHelp:i,additionalControls:a,placeholderText:o,options:l,footer:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,fieldNameToResetOnFieldChange:p}=e,g=Ha(e),{control:y,formState:{isSubmitting:_,isValidating:b},resetField:S}=mi(),[O,w]=x.useState(!1),A=x.useCallback(()=>w(!O),[O]),[T]=mt();return v.jsx(Uo,{name:t,control:y,shouldUnregister:!0,render:({field:{onChange:k,value:P},fieldState:{error:N}})=>{P===""&&l.length===1&&d&&k(l[0].value);const M=(I,W)=>{var X;k((X=l.find(ne=>ne.label===W.toString()))==null?void 0:X.value),p&&S(p),w(!1)},j=N!=null&&N.message?h&&b?T.validating:N==null?void 0:N.message:void 0,D=l.find(I=>I.value===P);return v.jsx(C.FormGroup,{id:`${g??""}-form-group`,fieldId:g,label:n,labelIcon:i?v.jsx(ia,{title:r,help:i}):void 0,labelInfo:a,helperText:c,helperTextInvalid:j,validated:j?"error":void 0,isRequired:d,"data-cy":`${g??""}-form-group`,children:v.jsx(C.Select,{id:g,label:void 0,placeholderText:o,variant:"single","aria-describedby":g?`${g}-form-group`:void 0,selections:D==null?void 0:D.label,onSelect:M,isOpen:O,onToggle:A,onClear:d?void 0:()=>{k(null),w(!1)},maxHeight:280,validated:j?"error":void 0,isDisabled:u||f||_,hasPlaceholderStyle:!0,footer:s,ouiaId:"menu-select","data-cy":g,children:l.map(I=>{const W=br(I);return v.jsx(C.SelectOption,{id:W,value:I.label,label:I.label,description:I.description,"data-cy":W,children:I.label},I.label)})})})},rules:{required:typeof n=="string"&&d===!0?{value:!0,message:`${Xn(n.toLocaleLowerCase())} is required.`}:void 0,validate:h}})}function rxe(e){const{name:t,id:n,helperText:r,validate:i,additionalControls:a,formLabel:o,labelHelp:l,labelHelpTitle:s,...c}=e,{control:u,formState:{isSubmitting:f,isValidating:d}}=mi();return v.jsx(Uo,{name:t,control:u,shouldUnregister:!0,render:({field:{onChange:h,value:p},fieldState:{error:g}})=>v.jsx(C.FormGroup,{helperTextInvalid:!(i&&d)&&(g==null?void 0:g.message),fieldId:n,"data-cy":n+"-form-group",label:o,helperText:r,validated:g!=null&&g.message?"error":void 0,labelInfo:a,labelIcon:l?v.jsx(ia,{title:s,help:l}):void 0,children:v.jsx(C.Switch,{"data-cy":n+"-toggle",...c,isChecked:p,onChange:y=>h(y),isDisabled:f})})})}function ixe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:l,button:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:_,pattern:b,selectTitle:S,selectOpen:O,selectValue:w,autoFocus:A,autoComplete:T}=e,k=Ha(e),{control:P,setValue:N,formState:{isSubmitting:M,isValidating:j}}=mi(),[D,I]=x.useState(!1),[W]=mt();return v.jsx(Uo,{name:n,control:P,shouldUnregister:!0,render:({field:{onChange:X,value:ne,name:re},fieldState:{error:Z}})=>{const R=Z!=null&&Z.message?h&&j?W.validating:Z==null?void 0:Z.message:void 0;function J(U){X(U.trimStart())}return v.jsx(C.FormGroup,{id:`${k??""}-form-group`,fieldId:k,label:r,helperText:c,helperTextInvalid:R,validated:R?"error":void 0,isRequired:d,labelIcon:a?v.jsx(ia,{title:i,help:a}):void 0,labelInfo:o,"data-cy":`${r==null?void 0:r.toLowerCase().split(" ").join("-")}-form-group`,children:v.jsxs(C.InputGroup,{children:[v.jsx(C.TextArea,{id:k,placeholder:l,onChange:J,value:ne??"","aria-describedby":k?`${k}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:A,autoComplete:T||"off","data-cy":k}),t==="password"&&v.jsx(C.Button,{variant:"control",onClick:()=>I(!D),isDisabled:u||f,children:D?v.jsx(Ce.EyeIcon,{}):v.jsx(Ce.EyeSlashIcon,{})}),S&&v.jsx(C.Button,{ouiaId:`lookup-${re}-button`,variant:"control",onClick:()=>O==null?void 0:O(U=>{if(w){const Y=w(U);N(re,Y,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:v.jsx(Ce.SearchIcon,{})}),s&&s]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Xn(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Xn(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Xn(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof _=="number"||typeof _=="string")?{value:_,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${_}.`}:p,pattern:b}})}function axe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:l,button:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:_,pattern:b,selectTitle:S,selectOpen:O,selectValue:w,autoFocus:A,autoComplete:T}=e,k=Ha(e),{control:P,setValue:N,formState:{isSubmitting:M,isValidating:j}}=mi(),[D,I]=x.useState(!1),[W]=mt();return v.jsx(Uo,{name:n,control:P,shouldUnregister:!0,render:({field:{onChange:X,value:ne,name:re},fieldState:{error:Z}})=>{const R=Z!=null&&Z.message?h&&j?W.validating:Z==null?void 0:Z.message:void 0;function J(U){X(U.trimStart())}return v.jsx(C.FormGroup,{id:`${k??""}-form-group`,fieldId:k,label:r,helperText:c,helperTextInvalid:R,validated:R?"error":void 0,isRequired:d,labelIcon:a?v.jsx(ia,{title:i,help:a}):void 0,labelInfo:o,"data-cy":`${r==null?void 0:r.toLowerCase().split(" ").join("-")}-form-group`,children:v.jsxs(C.InputGroup,{children:[v.jsx(C.TextInput,{id:k,placeholder:l,onChange:J,value:ne??"","aria-describedby":k?`${k}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:A,autoComplete:T||"off","data-cy":k}),t==="password"&&v.jsx(C.Button,{variant:"control",onClick:()=>I(!D),isDisabled:u||f,children:D?v.jsx(Ce.EyeIcon,{}):v.jsx(Ce.EyeSlashIcon,{})}),S&&v.jsx(C.Button,{ouiaId:`lookup-${re}-button`,variant:"control",onClick:()=>O==null?void 0:O(U=>{if(w){const Y=w(U);N(re,Y,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:v.jsx(Ce.SearchIcon,{})}),s&&s]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Xn(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Xn(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Xn(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof _=="number"||typeof _=="string")?{value:_,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${_}.`}:p,pattern:b}})}const yy=Symbol.for("yaml.alias"),oxe=Symbol.for("yaml.document"),Ia=Symbol.for("yaml.map"),X6=Symbol.for("yaml.pair"),by=Symbol.for("yaml.scalar"),Ys=Symbol.for("yaml.seq"),Br=Symbol.for("yaml.node.type"),Jo=e=>!!e&&typeof e=="object"&&e[Br]===yy,Wd=e=>!!e&&typeof e=="object"&&e[Br]===oxe,J6=e=>!!e&&typeof e=="object"&&e[Br]===Ia,Ht=e=>!!e&&typeof e=="object"&&e[Br]===X6,It=e=>!!e&&typeof e=="object"&&e[Br]===by,_y=e=>!!e&&typeof e=="object"&&e[Br]===Ys;function kn(e){if(e&&typeof e=="object")switch(e[Br]){case Ia:case Ys:return!0}return!1}function bn(e){if(e&&typeof e=="object")switch(e[Br]){case yy:case Ia:case by:case Ys:return!0}return!1}const lxe=e=>(It(e)||kn(e))&&!!e.anchor,La=Symbol("break visit"),sxe=Symbol("skip children"),Ks=Symbol("remove node");function Zs(e,t){const n=cxe(t);Wd(e)?Qo(null,e.contents,n,Object.freeze([e]))===Ks&&(e.contents=null):Qo(null,e,n,Object.freeze([]))}Zs.BREAK=La,Zs.SKIP=sxe,Zs.REMOVE=Ks;function Qo(e,t,n,r){const i=uxe(e,t,n,r);if(bn(i)||Ht(i))return fxe(e,r,i),Qo(e,i,n,r);if(typeof i!="symbol"){if(kn(t)){r=Object.freeze(r.concat(t));for(let a=0;a<t.items.length;++a){const o=Qo(a,t.items[a],n,r);if(typeof o=="number")a=o-1;else{if(o===La)return La;o===Ks&&(t.items.splice(a,1),a-=1)}}}else if(Ht(t)){r=Object.freeze(r.concat(t));const a=Qo("key",t.key,n,r);if(a===La)return La;a===Ks&&(t.key=null);const o=Qo("value",t.value,n,r);if(o===La)return La;o===Ks&&(t.value=null)}}return i}function cxe(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function uxe(e,t,n,r){var i,a,o,l,s;if(typeof n=="function")return n(e,t,r);if(J6(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(_y(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(Ht(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(It(t))return(l=n.Scalar)==null?void 0:l.call(n,e,t,r);if(Jo(t))return(s=n.Alias)==null?void 0:s.call(n,e,t,r)}function fxe(e,t,n){const r=t[t.length-1];if(kn(r))r.items[e]=n;else if(Ht(r))e==="key"?r.key=n:r.value=n;else if(Wd(r))r.contents=n;else{const i=Jo(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}function Q6(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Xs(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,a=r.length;i<a;++i){const o=r[i],l=Xs(e,r,String(i),o);l===void 0?delete r[i]:l!==o&&(r[i]=l)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const a=r.get(i),o=Xs(e,r,i,a);o===void 0?r.delete(i):o!==a&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const a=Xs(e,r,i,i);a===void 0?r.delete(i):a!==i&&(r.delete(i),r.add(a))}else for(const[i,a]of Object.entries(r)){const o=Xs(e,r,i,a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}return e.call(t,n,r)}function vr(e,t,n){if(Array.isArray(e))return e.map((r,i)=>vr(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!lxe(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=a=>{r.res=a,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class xy{constructor(t){Object.defineProperty(this,Br,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){if(!Wd(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=vr(this,"",o);if(typeof i=="function")for(const{count:s,res:c}of o.anchors.values())i(c,s);return typeof a=="function"?Xs(a,{"":l},"",l):l}}class dxe extends xy{constructor(t){super(yy),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Zs(t,{Node:(r,i)=>{if(i===this)return Zs.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:a}=n,o=this.resolve(i);if(!o){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}let l=r.get(o);if(l||(vr(o,null,n),l=r.get(o)),!l||l.res===void 0){const s="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(s)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Rd(i,o,r)),l.count*l.aliasCount>a)){const s="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(s)}return l.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(Q6(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}}function Rd(e,t,n){if(Jo(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(kn(t)){let r=0;for(const i of t.items){const a=Rd(e,i,n);a>r&&(r=a)}return r}else if(Ht(t)){const r=Rd(e,t.key,n),i=Rd(e,t.value,n);return Math.max(r,i)}return 1}const eP=e=>!e||typeof e!="function"&&typeof e!="object";class At extends xy{constructor(t){super(by),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:vr(this.value,t,n)}toString(){return String(this.value)}}At.BLOCK_FOLDED="BLOCK_FOLDED",At.BLOCK_LITERAL="BLOCK_LITERAL",At.PLAIN="PLAIN",At.QUOTE_DOUBLE="QUOTE_DOUBLE",At.QUOTE_SINGLE="QUOTE_SINGLE";const hxe="tag:yaml.org,2002:";function mxe(e,t,n){if(t){const r=n.filter(a=>a.tag===t),i=r.find(a=>!a.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function Vd(e,t,n){var f,d,h;if(Wd(e)&&(e=e.contents),bn(e))return e;if(Ht(e)){const p=(d=(f=n.schema[Ia]).createNode)==null?void 0:d.call(f,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:l}=n;let s;if(r&&e&&typeof e=="object"){if(s=l.get(e),s)return s.anchor||(s.anchor=i(e)),new dxe(s.anchor);s={anchor:null,node:null},l.set(e,s)}t!=null&&t.startsWith("!!")&&(t=hxe+t.slice(2));let c=mxe(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const p=new At(e);return s&&(s.node=p),p}c=e instanceof Map?o[Ia]:Symbol.iterator in Object(e)?o[Ys]:o[Ia]}a&&(a(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,e,n):typeof((h=c==null?void 0:c.nodeClass)==null?void 0:h.from)=="function"?c.nodeClass.from(n.schema,e,n):new At(e);return t?u.tag=t:c.default||(u.tag=c.tag),s&&(s.node=u),u}function tP(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const o=[];o[a]=r,r=o}else r=new Map([[a,r]])}return Vd(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const gxe=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Hd extends xy{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>bn(r)||Ht(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(gxe(t))this.add(n);else{const[r,...i]=t,a=this.get(r,!0);if(kn(a))a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,tP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(kn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,a=this.get(r,!0);return i.length===0?!n&&It(a)?a.value:a:kn(a)?a.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Ht(n))return!1;const r=n.value;return r==null||t&&It(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return kn(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const a=this.get(r,!0);if(kn(a))a.setIn(i,n);else if(a===void 0&&this.schema)this.set(r,tP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Hd.maxFlowStringSingleLineLength=60;const pxe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Js(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const $a=(e,t,n)=>e.endsWith(`
474
+ `))],z=Y!=null&&Y!=="";return v.jsx(J_e,{...h,label:o?v.jsxs("span",{"data-cy":"expandable",style:{alignItems:"center"},children:[v.jsx(Ce.AngleRightIcon,{style:{transform:k?"rotate(0deg)":"rotate(90deg)",transition:"transform"},onClick:()=>P(K=>!K),"aria-label":t("Expand or collapse extra variables")}),e.label]}):e.label,id:D,helperTextInvalid:!(d&&g)&&(ie==null?void 0:ie.map(K=>v.jsx(Q_e,{children:K},K))),children:(!o||!k)&&v.jsxs(v.Fragment,{children:[v.jsx(exe,{allowCopy:n,allowDownload:r,allowUpload:i,errors:y,handleCopy:()=>X(),handleDownload:re,handleUpload:ne,name:J,selectedLanguage:A,setLanguage:W,toggleLanguages:f},"actions-row"),v.jsxs("div",{id:"code-editor-dropzone",...R.getRootProps({disabled:z}),style:{width:"100%",height:"100%"},children:[v.jsx("input",{id:"code-editor-dropzone-input",...R.getInputProps(),ref:N}),v.jsx(X_e,{setError:_,clearErrors:b,id:D,"data-cy":D,name:J,language:A,value:Y,onChange:U,isReadOnly:l||p,invalid:!(d&&g)&&(G==null?void 0:G.message)!==void 0})]})]})})},rules:{required:typeof c=="string"&&s===!0?{value:!0,message:`${Xn(c.toLocaleLowerCase())} is required.`}:void 0,validate:e.validate}})}function nxe(e){const{name:t,label:n,labelHelpTitle:r,labelHelp:i,additionalControls:a,placeholderText:o,options:l,footer:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,fieldNameToResetOnFieldChange:p}=e,g=Ha(e),{control:y,formState:{isSubmitting:_,isValidating:b},resetField:S}=mi(),[O,w]=x.useState(!1),A=x.useCallback(()=>w(!O),[O]),[T]=mt();return v.jsx(Uo,{name:t,control:y,shouldUnregister:!0,render:({field:{onChange:k,value:P},fieldState:{error:N}})=>{P===""&&l.length===1&&d&&k(l[0].value);const M=(I,W)=>{var X;k((X=l.find(ne=>ne.label===W.toString()))==null?void 0:X.value),p&&S(p),w(!1)},j=N!=null&&N.message?h&&b?T.validating:N==null?void 0:N.message:void 0,D=l.find(I=>I.value===P);return v.jsx(C.FormGroup,{id:`${g??""}-form-group`,fieldId:g,label:n,labelIcon:i?v.jsx(ia,{title:r,help:i}):void 0,labelInfo:a,helperText:c,helperTextInvalid:j,validated:j?"error":void 0,isRequired:d,"data-cy":`${g??""}-form-group`,children:v.jsx(C.Select,{id:g,label:void 0,placeholderText:o,variant:"single","aria-describedby":g?`${g}-form-group`:void 0,selections:D==null?void 0:D.label,onSelect:M,isOpen:O,onToggle:A,onClear:d?void 0:()=>{k(null),w(!1)},maxHeight:280,validated:j?"error":void 0,isDisabled:u||f||_,hasPlaceholderStyle:!0,footer:s,ouiaId:"menu-select","data-cy":g,children:l.map(I=>{const W=br(I);return v.jsx(C.SelectOption,{id:W,value:I.label,label:I.label,description:I.description,"data-cy":W,children:I.label},I.label)})})})},rules:{required:typeof n=="string"&&d===!0?{value:!0,message:`${Xn(n.toLocaleLowerCase())} is required.`}:void 0,validate:h}})}function rxe(e){const{name:t,id:n,helperText:r,validate:i,additionalControls:a,formLabel:o,labelHelp:l,labelHelpTitle:s,...c}=e,{control:u,formState:{isSubmitting:f,isValidating:d}}=mi();return v.jsx(Uo,{name:t,control:u,shouldUnregister:!0,render:({field:{onChange:h,value:p},fieldState:{error:g}})=>v.jsx(C.FormGroup,{helperTextInvalid:!(i&&d)&&(g==null?void 0:g.message),fieldId:n,"data-cy":n+"-form-group",label:o,helperText:r,validated:g!=null&&g.message?"error":void 0,labelInfo:a,labelIcon:l?v.jsx(ia,{title:s,help:l}):void 0,children:v.jsx(C.Switch,{"data-cy":n+"-toggle",...c,isChecked:p,onChange:y=>h(y),isDisabled:f})})})}function ixe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:l,button:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:_,pattern:b,selectTitle:S,selectOpen:O,selectValue:w,autoFocus:A,autoComplete:T}=e,k=Ha(e),{control:P,setValue:N,formState:{isSubmitting:M,isValidating:j}}=mi(),[D,I]=x.useState(!1),[W]=mt();return v.jsx(Uo,{name:n,control:P,shouldUnregister:!0,render:({field:{onChange:X,value:ne,name:re},fieldState:{error:Z}})=>{const R=Z!=null&&Z.message?h&&j?W.validating:Z==null?void 0:Z.message:void 0;function J(U){X(U.trimStart())}return v.jsx(C.FormGroup,{id:`${k??""}-form-group`,fieldId:k,label:r,helperText:c,helperTextInvalid:R,validated:R?"error":void 0,isRequired:d,labelIcon:a?v.jsx(ia,{title:i,help:a}):void 0,labelInfo:o,"data-cy":`${r==null?void 0:r.toLowerCase().split(" ").join("-")}-form-group`,children:v.jsxs(C.InputGroup,{children:[v.jsx(C.TextArea,{id:k,placeholder:l,onChange:J,value:ne??"","aria-describedby":k?`${k}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:A,autoComplete:T||"off","data-cy":k}),t==="password"&&v.jsx(C.Button,{variant:"control",onClick:()=>I(!D),isDisabled:u||f,children:D?v.jsx(Ce.EyeIcon,{}):v.jsx(Ce.EyeSlashIcon,{})}),S&&v.jsx(C.Button,{ouiaId:`lookup-${re}-button`,variant:"control",onClick:()=>O==null?void 0:O(U=>{if(w){const Y=w(U);N(re,Y,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:v.jsx(Ce.SearchIcon,{})}),s&&s]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Xn(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Xn(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Xn(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof _=="number"||typeof _=="string")?{value:_,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${_}.`}:p,pattern:b}})}function axe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:l,button:s,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:_,pattern:b,selectTitle:S,selectOpen:O,selectValue:w,autoFocus:A,autoComplete:T}=e,k=Ha(e),{control:P,setValue:N,formState:{isSubmitting:M,isValidating:j}}=mi(),[D,I]=x.useState(!1),[W]=mt();return v.jsx(Uo,{name:n,control:P,shouldUnregister:!0,render:({field:{onChange:X,value:ne,name:re},fieldState:{error:Z}})=>{const R=Z!=null&&Z.message?h&&j?W.validating:Z==null?void 0:Z.message:void 0;function J(U){X(U.trimStart())}return v.jsx(C.FormGroup,{id:`${k??""}-form-group`,fieldId:k,label:r,helperText:c,helperTextInvalid:R,validated:R?"error":void 0,isRequired:d,labelIcon:a?v.jsx(ia,{title:i,help:a}):void 0,labelInfo:o,"data-cy":`${r==null?void 0:r.toLowerCase().split(" ").join("-")}-form-group`,children:v.jsxs(C.InputGroup,{children:[v.jsx(C.TextInput,{id:k,placeholder:l,onChange:J,value:ne??"","aria-describedby":k?`${k}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:A,autoComplete:T||"off","data-cy":k}),t==="password"&&v.jsx(C.Button,{variant:"control",onClick:()=>I(!D),isDisabled:u||f,children:D?v.jsx(Ce.EyeIcon,{}):v.jsx(Ce.EyeSlashIcon,{})}),S&&v.jsx(C.Button,{ouiaId:`lookup-${re}-button`,variant:"control",onClick:()=>O==null?void 0:O(U=>{if(w){const Y=w(U);N(re,Y,{shouldValidate:!0})}},S),"aria-label":"Options menu",isDisabled:u||M,children:v.jsx(Ce.SearchIcon,{})}),s&&s]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Xn(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Xn(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Xn(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof _=="number"||typeof _=="string")?{value:_,message:`${Xn(r.toLocaleLowerCase())} cannot be greater than ${_}.`}:p,pattern:b}})}const yy=Symbol.for("yaml.alias"),oxe=Symbol.for("yaml.document"),Ia=Symbol.for("yaml.map"),X6=Symbol.for("yaml.pair"),by=Symbol.for("yaml.scalar"),Ys=Symbol.for("yaml.seq"),Br=Symbol.for("yaml.node.type"),Jo=e=>!!e&&typeof e=="object"&&e[Br]===yy,Wd=e=>!!e&&typeof e=="object"&&e[Br]===oxe,J6=e=>!!e&&typeof e=="object"&&e[Br]===Ia,Ht=e=>!!e&&typeof e=="object"&&e[Br]===X6,It=e=>!!e&&typeof e=="object"&&e[Br]===by,_y=e=>!!e&&typeof e=="object"&&e[Br]===Ys;function kn(e){if(e&&typeof e=="object")switch(e[Br]){case Ia:case Ys:return!0}return!1}function bn(e){if(e&&typeof e=="object")switch(e[Br]){case yy:case Ia:case by:case Ys:return!0}return!1}const lxe=e=>(It(e)||kn(e))&&!!e.anchor,La=Symbol("break visit"),sxe=Symbol("skip children"),Ks=Symbol("remove node");function Zs(e,t){const n=cxe(t);Wd(e)?Qo(null,e.contents,n,Object.freeze([e]))===Ks&&(e.contents=null):Qo(null,e,n,Object.freeze([]))}Zs.BREAK=La,Zs.SKIP=sxe,Zs.REMOVE=Ks;function Qo(e,t,n,r){const i=uxe(e,t,n,r);if(bn(i)||Ht(i))return fxe(e,r,i),Qo(e,i,n,r);if(typeof i!="symbol"){if(kn(t)){r=Object.freeze(r.concat(t));for(let a=0;a<t.items.length;++a){const o=Qo(a,t.items[a],n,r);if(typeof o=="number")a=o-1;else{if(o===La)return La;o===Ks&&(t.items.splice(a,1),a-=1)}}}else if(Ht(t)){r=Object.freeze(r.concat(t));const a=Qo("key",t.key,n,r);if(a===La)return La;a===Ks&&(t.key=null);const o=Qo("value",t.value,n,r);if(o===La)return La;o===Ks&&(t.value=null)}}return i}function cxe(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function uxe(e,t,n,r){var i,a,o,l,s;if(typeof n=="function")return n(e,t,r);if(J6(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(_y(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(Ht(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(It(t))return(l=n.Scalar)==null?void 0:l.call(n,e,t,r);if(Jo(t))return(s=n.Alias)==null?void 0:s.call(n,e,t,r)}function fxe(e,t,n){const r=t[t.length-1];if(kn(r))r.items[e]=n;else if(Ht(r))e==="key"?r.key=n:r.value=n;else if(Wd(r))r.contents=n;else{const i=Jo(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}function Q6(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Xs(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,a=r.length;i<a;++i){const o=r[i],l=Xs(e,r,String(i),o);l===void 0?delete r[i]:l!==o&&(r[i]=l)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const a=r.get(i),o=Xs(e,r,i,a);o===void 0?r.delete(i):o!==a&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const a=Xs(e,r,i,i);a===void 0?r.delete(i):a!==i&&(r.delete(i),r.add(a))}else for(const[i,a]of Object.entries(r)){const o=Xs(e,r,i,a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}return e.call(t,n,r)}function vr(e,t,n){if(Array.isArray(e))return e.map((r,i)=>vr(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!lxe(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=a=>{r.res=a,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class xy{constructor(t){Object.defineProperty(this,Br,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){if(!Wd(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=vr(this,"",o);if(typeof i=="function")for(const{count:s,res:c}of o.anchors.values())i(c,s);return typeof a=="function"?Xs(a,{"":l},"",l):l}}class dxe extends xy{constructor(t){super(yy),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Zs(t,{Node:(r,i)=>{if(i===this)return Zs.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:a}=n,o=this.resolve(i);if(!o){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}let l=r.get(o);if(l||(vr(o,null,n),l=r.get(o)),!l||l.res===void 0){const s="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(s)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Rd(i,o,r)),l.count*l.aliasCount>a)){const s="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(s)}return l.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(Q6(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}}function Rd(e,t,n){if(Jo(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(kn(t)){let r=0;for(const i of t.items){const a=Rd(e,i,n);a>r&&(r=a)}return r}else if(Ht(t)){const r=Rd(e,t.key,n),i=Rd(e,t.value,n);return Math.max(r,i)}return 1}const eP=e=>!e||typeof e!="function"&&typeof e!="object";class At extends xy{constructor(t){super(by),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:vr(this.value,t,n)}toString(){return String(this.value)}}At.BLOCK_FOLDED="BLOCK_FOLDED",At.BLOCK_LITERAL="BLOCK_LITERAL",At.PLAIN="PLAIN",At.QUOTE_DOUBLE="QUOTE_DOUBLE",At.QUOTE_SINGLE="QUOTE_SINGLE";const hxe="tag:yaml.org,2002:";function mxe(e,t,n){if(t){const r=n.filter(a=>a.tag===t),i=r.find(a=>!a.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function Vd(e,t,n){var f,d,h;if(Wd(e)&&(e=e.contents),bn(e))return e;if(Ht(e)){const p=(d=(f=n.schema[Ia]).createNode)==null?void 0:d.call(f,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:l}=n;let s;if(r&&e&&typeof e=="object"){if(s=l.get(e),s)return s.anchor||(s.anchor=i(e)),new dxe(s.anchor);s={anchor:null,node:null},l.set(e,s)}t!=null&&t.startsWith("!!")&&(t=hxe+t.slice(2));let c=mxe(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const p=new At(e);return s&&(s.node=p),p}c=e instanceof Map?o[Ia]:Symbol.iterator in Object(e)?o[Ys]:o[Ia]}a&&(a(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,e,n):typeof((h=c==null?void 0:c.nodeClass)==null?void 0:h.from)=="function"?c.nodeClass.from(n.schema,e,n):new At(e);return t?u.tag=t:c.default||(u.tag=c.tag),s&&(s.node=u),u}function tP(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const o=[];o[a]=r,r=o}else r=new Map([[a,r]])}return Vd(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const gxe=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Hd extends xy{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>bn(r)||Ht(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(gxe(t))this.add(n);else{const[r,...i]=t,a=this.get(r,!0);if(kn(a))a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,tP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(kn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,a=this.get(r,!0);return i.length===0?!n&&It(a)?a.value:a:kn(a)?a.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Ht(n))return!1;const r=n.value;return r==null||t&&It(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return kn(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const a=this.get(r,!0);if(kn(a))a.setIn(i,n);else if(a===void 0&&this.schema)this.set(r,tP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Hd.maxFlowStringSingleLineLength=60;const pxe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Js(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const $a=(e,t,n)=>e.endsWith(`
475
475
  `)?Js(n,t):n.includes(`
476
476
  `)?`
477
477
  `+Js(n,t):(e.endsWith(" ")?"":" ")+n,nP="flow",Sy="block",Ud="quoted";function qd(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return e;const s=Math.max(1+a,1+i-t.length);if(e.length<=s)return e;const c=[],u={};let f=i-t.length;typeof r=="number"&&(r>i-Math.max(2,a)?c.push(0):f=i-r);let d,h,p=!1,g=-1,y=-1,_=-1;n===Sy&&(g=rP(e,g),g!==-1&&(f=g+s));for(let S;S=e[g+=1];){if(n===Ud&&S==="\\"){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}_=g}if(S===`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.532",
4
+ "version": "2.4.534",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",