"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_primer_react_lib-esm_FormControl_FormControl_js"],{13275:(e,t,a)=>{a.d(t,{z:()=>r});function r(e,t,{direction:a="vertical",startMargin:r=0,endMargin:n=0,behavior:i="smooth"}={}){let l="vertical"===a?"top":"left",o="vertical"===a?"bottom":"right",s="vertical"===a?"scrollTop":"scrollLeft",{[l]:d,[o]:c}=e.getBoundingClientRect(),{[l]:u,[o]:p}=t.getBoundingClientRect();if(dp-n){let e=c-p+t[s];t.scrollTo({behavior:i,[l]:e+n})}}},96721:(e,t,a)=>{a.d(t,{Z:()=>j});var r=a(67294);let n=(0,r.createContext)(null);var i=a(51526),l=a(31171),o=a(70697);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let v=(0,r.useContext)(n);if(null===v)throw Error("AutocompleteContext returned null values");let{activeDescendantRef:b,autocompleteSuggestion:h="",id:y,inputRef:x,inputValue:w="",isMenuDirectlyActivated:E,setInputValue:M,setShowMenu:C,showMenu:k}=v;(0,l.z)(f,x);let[Z,I]=(0,r.useState)(!0),{safeSetTimeout:N}=(0,o.Z)(),O=(0,r.useCallback)(e=>{t&&t(e),C(!0)},[t,C]),j=(0,r.useCallback)(e=>{a&&a(e),N(()=>{document.activeElement!==x.current&&C(!1)},0)},[a,C,x,N]),A=(0,r.useCallback)(e=>{d&&d(e),M(e.currentTarget.value),k||C(!0)},[d,M,C,k]),D=(0,r.useCallback)(e=>{var t;c&&c(e),"Backspace"===e.key&&I(!1),"Escape"===e.key&&null!==(t=x.current)&&void 0!==t&&t.value&&(M(""),x.current.value="")},[x,M,I,c]),z=(0,r.useCallback)(e=>{u&&u(e),"Backspace"===e.key&&I(!0)},[I,u]),T=(0,r.useCallback)(e=>{if(p&&p(e),k&&"Enter"===e.key&&b.current){e.preventDefault(),e.nativeEvent.stopImmediatePropagation();let t=new KeyboardEvent(e.type,e.nativeEvent);b.current.dispatchEvent(t)}},[b,k,p]);return(0,r.useEffect)(()=>{x.current&&(h||(x.current.value=w),Z&&h&&(w||E)&&(x.current.value=h,0===h.toLowerCase().indexOf(w.toLowerCase())&&x.current.setSelectionRange(w.length,h.length)))},[h,w,x,E]),(0,r.useEffect)(()=>{M(void 0!==m?m.toString():"")},[m,M]),r.createElement(e,s({onFocus:O,onBlur:j,onChange:A,onKeyDown:D,onKeyPress:T,onKeyUp:z,ref:x,"aria-controls":`${y}-listbox`,"aria-autocomplete":"both",role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-owns":`${y}-listbox`,autoComplete:"off",id:y},g))});d.displayName="AutocompleteInput";var c=a(13275),u=a(52516),p=a(17840),m=a(42483),g=a(74121),f=a(14543),v=a(85529),b=a(53670);function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t(t,a)=>e(t)===e(a)?0:e(t)?-1:1,x={startMargin:0,endMargin:8},w=(e,t)=>t.includes(e);function E(e){let t=(0,r.useContext)(n);if(null===t)throw Error("AutocompleteContext returned null values");let{activeDescendantRef:a,id:i,inputRef:l,inputValue:o="",scrollContainerRef:s,setAutocompleteSuggestion:d,setShowMenu:E,setInputValue:M,setIsMenuDirectlyActivated:C,setSelectedItemLength:k,showMenu:Z}=t,{items:I,selectedItemIds:N,sortOnCloseFn:O,emptyStateText:j="No selectable options",addNewItem:A,loading:D,selectionVariant:z="single",filterFn:T,"aria-labelledby":S,onOpenChange:L,onSelectedChange:V,customScrollContainerRef:U}=e,R=(0,r.useRef)(null),P=(0,r.useRef)([]),[F,G]=(0,r.useState)(),[B,_]=(0,r.useState)(I.map(({id:e})=>e)),W=(0,f.M)(i),H=(0,r.useMemo)(()=>I.map(e=>({...e,role:"option",id:e.id,active:(null==F?void 0:F.id)===e.id,selected:"multiple"===z?N.includes(e.id):void 0,onAction:e=>{var t;let a=N.filter(t=>t!==e.id),r=N.includes(e.id)?a:[...a,e.id],n=V||function(e){let{text:t=""}=Array.isArray(e)?e.slice(-1)[0]:e;M(t)};(n(r.map(e=>I.find(t=>t.id===e))),"multiple"===z)?(M(""),d("")):(E(!1),null===(t=l.current)||void 0===t||t.setSelectionRange(l.current.value.length,l.current.value.length))}})),[F,I,N,l,V,z,d,M,E]),J=(0,r.useMemo)(()=>B.reduce((e,t,a)=>(e[t]=a,e),{}),[B]),q=(0,r.useMemo)(()=>H.filter(T||function(e,t){var a;return!!(null===(a=e.text)||void 0===a?void 0:a.toLowerCase().startsWith(o.toLowerCase()))}).sort((e,t)=>J[e.id]-J[t.id]),[H,J,T,o]),Q=(0,r.useMemo)(()=>[...q,...A?[{...A,role:"option",key:A.id,active:(null==F?void 0:F.id)===A.id,selected:"multiple"===z?N.includes(A.id):void 0,leadingVisual:()=>r.createElement(v.PlusIcon,null),onAction:e=>{A.handleAddItem({...e,id:e.id||W,leadingVisual:void 0}),"multiple"===z&&(M(""),d(""))}}]:[]],[q,A,d,z,M,W,F,N]);if(r.useEffect(()=>{P.current=Q}),(0,p.v)({containerRef:R,focusOutBehavior:"wrap",focusableElementFilter:e=>!(e instanceof HTMLInputElement),activeDescendantFocus:l,onActiveDescendantChanged:(e,t,r)=>{if(a.current=e||null,e){let t=P.current.find(t=>{var a;return t.id===(null===(a=e.closest("li"))||void 0===a?void 0:a.getAttribute("data-id"))});G(t),C(r)}e&&U&&U.current&&r?(0,c.z)(e,U.current,x):e&&s.current&&r&&(0,c.z)(e,s.current,x)}},[D]),(0,r.useEffect)(()=>{var e;null!=F&&null!==(e=F.text)&&void 0!==e&&e.startsWith(o)&&!N.includes(F.id)?d(F.text):d("")},[F,o,N,d]),(0,r.useEffect)(()=>{let e=[...B].sort(O||y(e=>w(e,N))),t=e.length===B.length&&e.every((e,t)=>e===B[t]);!1!==Z||t||_(e),L&&L(!!Z)},[Z,L,N,O,B]),(0,r.useEffect)(()=>{N.length&&k(N.length)},[N,k]),"single"===z&&N.length>1)throw Error('Autocomplete: selectionVariant "single" cannot be used with multiple selected items');return r.createElement(b.Z,{isVisible:Z},D?r.createElement(m.Z,{p:3,display:"flex",justifyContent:"center"},r.createElement(g.Z,null)):r.createElement("div",{ref:R},Q.length?r.createElement(u.S,{selectionVariant:z,role:"listbox",id:`${i}-listbox`,"aria-labelledby":S},Q.map(e=>{let{id:t,onAction:a,children:n,text:i,leadingVisual:l,trailingVisual:o,...s}=e;return r.createElement(u.S.Item,h({key:t,onSelect:()=>a(e)},s,{id:t,"data-id":t}),l&&r.createElement(u.S.LeadingVisual,null,r.createElement(l,null)),null!=n?n:i,o&&r.createElement(u.S.TrailingVisual,null,r.createElement(o,null)))})):!1!==j&&null!==j?r.createElement(m.Z,{p:3},j):null))}E.displayName="AutocompleteMenu",E.displayName="AutocompleteMenu";var M=a(48158),C=a(8677);function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t{p(!1)},[p]);return"undefined"==typeof window?null:m?r.createElement(C.ZP,k({returnFocusRef:d,preventFocusOnOpen:!0,onClickOutside:v,onEscape:v,ref:g,top:null==f?void 0:f.top,left:null==f?void 0:f.left,sx:{overflow:"auto"}},s),a):r.createElement(b.Z,{"aria-hidden":"true"},a)}Z.displayName="AutocompleteOverlay";let I={inputValue:"",showMenu:!1,isMenuDirectlyActivated:!1,autocompleteSuggestion:"",selectedItemLength:0},N=(e,t)=>{let{type:a,payload:r}=t;switch(a){case"inputValue":return{...e,inputValue:r};case"showMenu":return{...e,showMenu:r};case"isMenuDirectlyActivated":return{...e,isMenuDirectlyActivated:r};case"autocompleteSuggestion":return{...e,autocompleteSuggestion:r};case"selectedItemLength":return{...e,selectedItemLength:r};default:return e}},O=({children:e,id:t})=>{let a=(0,r.useRef)(null),i=(0,r.useRef)(null),l=(0,r.useRef)(null),[o,s]=(0,r.useReducer)(N,I),{inputValue:d,showMenu:c,autocompleteSuggestion:u,isMenuDirectlyActivated:p,selectedItemLength:m}=o,g=(0,r.useCallback)(e=>{s({type:"inputValue",payload:e})},[]),v=(0,r.useCallback)(e=>{s({type:"showMenu",payload:e})},[]),b=(0,r.useCallback)(e=>{s({type:"autocompleteSuggestion",payload:e})},[]),h=(0,r.useCallback)(e=>{s({type:"isMenuDirectlyActivated",payload:e})},[]),y=(0,r.useCallback)(e=>{s({type:"selectedItemLength",payload:e})},[]),x=(0,f.M)(t);return r.createElement(n.Provider,{value:{activeDescendantRef:a,autocompleteSuggestion:u,id:x,inputRef:l,inputValue:d,isMenuDirectlyActivated:p,scrollContainerRef:i,selectedItemLength:m,setAutocompleteSuggestion:b,setInputValue:g,setIsMenuDirectlyActivated:h,setShowMenu:v,setSelectedItemLength:y,showMenu:c}},e)};O.displayName="Autocomplete";var j=Object.assign(O,{Context:n,Input:d,Menu:E,Overlay:Z})},99782:(e,t,a)=>{a.d(t,{Z:()=>g});var r=a(15388),n=a(67294),i=a(66044),l=a(69848),o=a(15173),s=a(56167),d=a(23383),c=a(42379),u=a(29178);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let b=(0,i.i)(v),h=(0,n.useContext)(s.w);return(0,l.Z)(()=>{b.current&&(b.current.indeterminate=a||!1)},[a,e,b]),(0,n.useEffect)(()=>{let{current:e}=b;e&&(a?e.setAttribute("aria-checked","mixed"):e.setAttribute("aria-checked",e.checked?"true":"false"))}),n.createElement(m,p({type:"checkbox",disabled:r,ref:b,checked:!a&&e,defaultChecked:t,sx:d,required:c,"aria-required":c?"true":"false","aria-invalid":"error"===u?"true":"false",onChange:e=>{h.onChange&&h.onChange(e),o&&o(e)},value:g,name:g},f))});g.displayName="Checkbox"},56167:(e,t,a)=>{a.d(t,{w:()=>n});var r=a(67294);let n=(0,r.createContext)({})},9770:(e,t,a)=>{a.d(t,{Z:()=>I});var r=a(67294),n=a(96721),i=a(42483),l=a(99782),o=a(5359),s=a(13503),d=a(51526),c=a(70294),u=a(17791),p=a(58761),m=a(85099),g=a(42379),f=a(69889),v=a(14543),b=a(97011);let h=({children:e,disabled:t,id:a,sx:n})=>r.createElement(b.Z,{color:t?"fg.subtle":"fg.muted",display:"block",fontSize:0,id:a,sx:n},e);h.displayName="InputCaption";var y=a(26408);let x=({children:e,sx:t,id:a})=>{let{captionId:n,disabled:i}=(0,y.NJ)();return r.createElement(h,{id:a||n||"",disabled:i,sx:t},e)};x.displayName="FormControlCaption";var w=a(95415);let E=({as:e,children:t,htmlFor:a,id:n,visuallyHidden:i,sx:l,...o})=>{let{disabled:s,id:d,required:c}=(0,y.NJ)(),u="legend"===e||"span"===e?{as:e,id:n,visuallyHidden:i,required:c,disabled:s,sx:l,...o}:{as:e,id:n,visuallyHidden:i,htmlFor:a||d,required:c,disabled:s,sx:l,...o};return r.createElement(w.Z,u,t)};E.displayName="FormControlLabel";let M=({children:e,sx:t})=>{let{disabled:a,captionId:n}=(0,y.NJ)();return r.createElement(i.Z,{color:a?"fg.muted":"fg.default",sx:{"> *":{minWidth:n?(0,g.U2)("fontSizes.4"):(0,g.U2)("fontSizes.2"),minHeight:n?(0,g.U2)("fontSizes.4"):(0,g.U2)("fontSizes.2"),fill:"currentColor"},...t},ml:2},e)};M.displayName="FormControlLeadingVisual";var C=a(15209);let k=({children:e,variant:t,sx:a,id:n})=>{let{validationMessageId:i}=(0,y.NJ)();return r.createElement(C.Z,{validationStatus:t,id:n||i||"",sx:a},e)};k.displayName="FormControlValidation";let Z=r.forwardRef(({children:e,disabled:t,layout:a="vertical",id:b,required:h,sx:w},C)=>{var Z,I,N;let[O,j]=(0,f.R)(e,{caption:x,label:E,leadingVisual:M,validation:k}),A=[n.Z,l.Z,o.Z,s.Z,d.Z,c.Z,u.ZP],D=(0,r.useContext)(p.Z),z=D.disabled||t,T=(0,v.M)(b),S=O.validation?`${T}-validationMessage`:void 0,L=O.caption?`${T}-caption`:void 0,V=null===(Z=O.validation)||void 0===Z?void 0:Z.props.variant,U=j.find(e=>A.some(t=>r.isValidElement(e)&&e.type===t)),R=r.isValidElement(U)&&U.props,P=r.isValidElement(U)&&(U.type===l.Z||U.type===o.Z);U&&(null!=R&&R.id&&console.warn("instead of passing the 'id' prop directly to the input component, it should be passed to the parent component, "),null!=R&&R.disabled&&console.warn("instead of passing the 'disabled' prop directly to the input component, it should be passed to the parent component, "),null!=R&&R.required&&console.warn("instead of passing the 'required' prop directly to the input component, it should be passed to the parent component, ")),O.label||console.error(`The input field with the id ${T} MUST have a FormControl.Label child. If you want to hide the label, pass the 'visuallyHidden' prop to the FormControl.Label component.`),P?(O.validation&&console.warn("Validation messages are not rendered for an individual checkbox or radio. The validation message should be shown for all options."),j.find(e=>{var t;return r.isValidElement(e)&&(null===(t=e.props)||void 0===t?void 0:t.required)})&&console.warn("An individual checkbox or radio cannot be a required field.")):O.leadingVisual&&console.warn("A leading visual is only rendered for a checkbox or radio form control. If you want to render a leading visual inside of your input, check if your input supports a leading visual.");let F=null===(I=O.label)||void 0===I?void 0:I.props.visuallyHidden;return r.createElement(y.wg,{value:{captionId:L,disabled:z,id:T,required:h,validationMessageId:S}},P||"horizontal"===a?r.createElement(i.Z,{ref:C,display:"flex",alignItems:O.leadingVisual?"center":void 0,sx:w},r.createElement(i.Z,{sx:{"> input":{marginLeft:0,marginRight:0}}},r.isValidElement(U)&&r.cloneElement(U,{id:T,disabled:z,"aria-describedby":L}),j.filter(e=>r.isValidElement(e)&&![l.Z,o.Z].some(t=>e.type===t))),O.leadingVisual&&r.createElement(i.Z,{color:z?"fg.muted":"fg.default",sx:{"> *":{minWidth:O.caption?(0,g.U2)("fontSizes.4"):(0,g.U2)("fontSizes.2"),minHeight:O.caption?(0,g.U2)("fontSizes.4"):(0,g.U2)("fontSizes.2"),fill:"currentColor"}},ml:2},O.leadingVisual),!(null!==(N=O.label)&&void 0!==N&&N.props.visuallyHidden)||O.caption?r.createElement(i.Z,{display:"flex",flexDirection:"column",ml:2},O.label,O.caption):r.createElement(r.Fragment,null,O.label,O.caption)):r.createElement(i.Z,{ref:C,display:"flex",flexDirection:"column",alignItems:"flex-start",sx:{...F?{"> *:not(label) + *":{marginTop:1}}:{"> * + *":{marginTop:1}},...w}},O.label,r.isValidElement(U)&&r.cloneElement(U,Object.assign({id:T,required:h,disabled:z,validationStatus:V,"aria-describedby":[S,L].filter(Boolean).join(" ")},U.props)),j.filter(e=>r.isValidElement(e)&&!A.some(t=>e.type===t)),O.validation?r.createElement(m.Z,{show:!0},O.validation):null,O.caption))});var I=Object.assign(Z,{Caption:x,Label:E,LeadingVisual:M,Validation:k})},26408:(e,t,a)=>{a.d(t,{NJ:()=>l,op:()=>o,wg:()=>i});var r=a(67294);let n=(0,r.createContext)(null),i=n.Provider;function l(){var e;return null!==(e=(0,r.useContext)(n))&&void 0!==e?e:{}}function o(e={}){let t=(0,r.useContext)(n);return t?{disabled:t.disabled,id:t.id,required:t.required,validationStatus:t.validationStatus,"aria-describedby":[t.validationMessageId,t.captionId].filter(Boolean).join(" ")||void 0,...e}:e}},5359:(e,t,a)=>{a.d(t,{Z:()=>p});var r=a(15388),n=a(67294),i=a(15173),l=a(56397),o=a(23383),s=a(42379),d=a(29178);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let g=(0,n.useContext)(l.L),f=a||(null==g?void 0:g.name);return f||console.warn("A radio input must have a `name` attribute. Pass `name` as a prop directly to each Radio, or nest them in a `RadioGroup` component with a `name` prop"),n.createElement(u,c({type:"radio",value:d,name:f,ref:m,disabled:t,checked:e,"aria-checked":e?"true":"false",required:o,"aria-required":o?"true":"false","aria-invalid":"error"===s?"true":"false",sx:i,onChange:e=>{(null==g?void 0:g.onChange)&&g.onChange(e),r&&r(e)}},p))});p.displayName="Radio"},56397:(e,t,a)=>{a.d(t,{L:()=>c,Z:()=>p});var r=a(67294),n=a(49297),i=a(48987),l=a(4776),o=a(14682),s=a(55744);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[o,u]=(0,s.d)(null),p=e=>{let{value:t,checked:a}=e.currentTarget;if(a){u(t);return}};return r.createElement(c.Provider,{value:{disabled:t,name:i,onChange:e=>{a&&(p(e),a(o.current,e))}}},r.createElement(n.Z,d({disabled:t},l),e))};u.displayName="RadioGroup";var p=Object.assign(u,{Caption:i.Z,Label:l.Z,Validation:o.Z})},13503:(e,t,a)=>{a.d(t,{Z:()=>f});var r=a(67294),n=a(15388),i=a(20682),l=a(9996),o=a.n(l);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",{"aria-hidden":"true",width:"16",height:"16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e},r.createElement("path",{d:"m4.074 9.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.043 9H4.251a.25.25 0 0 0-.177.427ZM4.074 7.47 7.47 4.073a.25.25 0 0 1 .354 0L11.22 7.47a.25.25 0 0 1-.177.426H4.251a.25.25 0 0 1-.177-.426Z"}));c.displayName="ArrowIndicatorSVG";let u=(0,n.ZP)(c).withConfig({displayName:"Select__ArrowIndicator",componentId:"sc-li6bhs-1"})(["pointer-events:none;position:absolute;right:",";top:50%;transform:translateY(-50%);"],"4px"),p=r.forwardRef(({block:e,children:t,contrast:a,disabled:n,placeholder:l,size:c,required:p,validationStatus:m,sx:g={},...f},v)=>r.createElement(i.ZP,{block:e,contrast:a,disabled:n,size:c,validationStatus:m,sx:o()({overflow:"hidden",position:"relative","@media screen and (forced-colors: active)":{svg:{fill:n?"GrayText":"FieldText"}}},g)},r.createElement(d,s({ref:v,required:p,disabled:n,"aria-invalid":"error"===m?"true":"false","data-hasplaceholder":!!l,defaultValue:null!=l?l:void 0},f),l&&r.createElement("option",{value:"",disabled:p,hidden:p},l),t),r.createElement(u,null))),m=e=>r.createElement("option",e);m.displayName="Option";let g=e=>r.createElement("optgroup",e);g.displayName="OptGroup";var f=Object.assign(p,{Option:m,OptGroup:g})},70294:(e,t,a)=>{a.d(t,{Z:()=>w});var r=a(48542),n=a(78160),i=a(27999),l=RegExp("^("+(0,i.compose)(i.Dh,i.cp,i.$_,i.bK,i.GQ,i.Cg,i.Oq,i.FK,i.eC,i.AF,i.jn,i.YK,i.ui).propNames.join("|")+")$"),o=function(e){var t={};for(var a in e)l.test(a)||(t[a]=e[a]);return t},s=a(67294),d=a(14890),c=a(42483),u=a(31171),p=a(17840),m=a(97011),g=a(84817),f=a(20682),v=a(38535),b=a(72691);function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t!e.getAttributeNames().includes("aria-hidden"),getNextFocusable:e=>{var t;if(!W&&0!==W)return;let a=W+1;return("next"===e&&(a+=1),"previous"===e&&(a-=1),a>k.length||a<1)?_.current||void 0:null===(t=Q.current)||void 0===t?void 0:t.children[a]}},[W]),Y=e=>{Z(e),setTimeout(()=>{var e,t,a;let r=null===(e=Q.current)||void 0===e?void 0:e.children[W||0],i=r&&(0,n.EB)(r)?r:Array.from((null===(t=Q.current)||void 0===t?void 0:t.children)||[]).find(e=>(0,n.EB)(e));i?i.focus():null===(a=_.current)||void 0===a||a.focus()},0)},$=e=>()=>{M||H(e)},K=()=>{H(void 0),setTimeout(()=>{var e;!(null!==(e=Q.current)&&void 0!==e&&e.contains(document.activeElement))&&V&&q(!0)},0)},X=e=>{if("Escape"===e.key){var t;null===(t=_.current)||void 0===t||t.focus()}},ee=e=>{e.stopPropagation()},et=J?k.slice(0,V):k,ea=i&&("leading"===l||!!(t&&"trailing"!==l)),er=i&&("trailing"===l||"auto"===l&&!t);return s.createElement(f.ZP,{block:E,className:w,contrast:x,disabled:M,hasLeadingVisual:!!(t||ea),hasTrailingVisual:!!(a||er),width:D,minWidth:z,maxWidth:T,size:{small:"small",medium:"small",large:"medium",xlarge:"medium"}[O],validationStatus:S,variant:L,onClick:()=>{var e;null===(e=_.current)||void 0===e||e.focus()},sx:{paddingLeft:f.Qk,py:`calc(${f.Qk} / 2)`,...E?{display:"flex",width:"100%"}:{},...A?{maxHeight:A,overflow:"auto"}:{},...N?{overflow:"auto"}:{},...C}},e&&!t&&s.createElement(e,{className:"TextInput-icon"}),s.createElement(b.Z,{hasLoadingIndicator:"boolean"==typeof i,visualPosition:"leading",showLoadingIndicator:ea},"string"!=typeof t&&(0,d.isValidElementType)(t)?s.createElement(t,null):t),s.createElement(c.Z,{ref:Q,display:"flex",sx:{alignItems:"center",flexWrap:N?"nowrap":"wrap",marginLeft:"-0.25rem",marginBottom:"-0.25rem",flexGrow:1,"> *":{flexShrink:0,marginLeft:"0.25rem",marginBottom:"0.25rem"}}},s.createElement(c.Z,{sx:{order:1,flexGrow:1}},s.createElement(v.Z,h({ref:_,disabled:M,onFocus:e=>{F&&F(e),H(void 0),V&&q(!1)},onBlur:e=>{P&&P(e),setTimeout(()=>{var e;!(null!==(e=Q.current)&&void 0!==e&&e.contains(document.activeElement))&&V&&q(!0)},0)},onKeyDown:e=>{var t;if(G&&G(e),null!==(t=_.current)&&void 0!==t&&t.value)return;let a=k[k.length-1];"Backspace"===e.key&&a&&(Y(a.id),_.current&&(_.current.value=`${a.text} `),setTimeout(()=>{var e;null===(e=_.current)||void 0===e||e.select()},0))},type:"text",sx:{height:"100%"},"aria-invalid":"error"===S?"true":"false"},B))),et.map(({id:e,...t},a)=>s.createElement(I,h({disabled:M,key:e,onFocus:$(a),onBlur:K,onKeyUp:X,onClick:ee,isSelected:W===a,onRemove:()=>{Y(e)},hideRemoveButton:M||j,size:O,tabIndex:0},t))),J&&k.length-et.length?s.createElement(m.Z,{color:"fg.muted",fontSize:y[O]},"+",k.length-et.length):null),s.createElement(b.Z,{hasLoadingIndicator:"boolean"==typeof i,visualPosition:"trailing",showLoadingIndicator:er},"string"!=typeof a&&(0,d.isValidElementType)(a)?s.createElement(a,null):a))}x.displayName="TextInputWithTokensInnerComponent";let w=s.forwardRef(x);w.displayName="TextInputWithTokens"},17791:(e,t,a)=>{a.d(t,{ZP:()=>p});var r=a(15388),n=a(67294),i=a(20682),l=a(15173);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;te.resize&&(0,r.iv)(["resize:",";"],e.resize),e=>e.disabled&&(0,r.iv)(["resize:none;"]),l.Z),p=n.forwardRef(({value:e,disabled:t,sx:a,required:r,validationStatus:l,rows:p=s,cols:m=d,resize:g=c,block:f,contrast:v,...b},h)=>n.createElement(i.FD,{sx:a,validationStatus:l,disabled:t,block:f,contrast:v},n.createElement(u,o({value:e,resize:g,"aria-required":r,"aria-invalid":"error"===l?"true":"false",ref:h,disabled:t,rows:p,cols:m},b))));p.displayName="Textarea"},49297:(e,t,a)=>{a.d(t,{Z:()=>h});var r=a(67294),n=a(15388),i=a(42483),l=a(85099),o=a(42379),s=a(14543),d=a(48987),c=a(4776),u=a(14682),p=a(58761),m=a(53670),g=a(69889);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t * + *{margin-top:",";}"],(0,o.U2)("space.2")),b=({"aria-labelledby":e,children:t,disabled:a=!1,id:n,required:o=!1,sx:b})=>{let[h,y]=(0,g.R)(t,{caption:d.Z,label:c.Z,validation:u.Z}),x=r.Children.toArray(t).find(e=>r.isValidElement(e)&&e.type===c.Z),w=r.Children.toArray(t).find(e=>r.isValidElement(e)&&e.type===u.Z?e:null),E=r.Children.toArray(t).find(e=>r.isValidElement(e)&&e.type===d.Z?e:null),M=(0,s.M)(n),C=w?`${M}-validationMessage`:void 0,k=E?`${M}-caption`:void 0;x||e||console.warn("A choice group must be labelled using a `CheckboxOrRadioGroup.Label` child, or by passing `aria-labelledby` to the CheckboxOrRadioGroup component.");let Z=r.isValidElement(x)&&!x.props.visuallyHidden;return r.createElement(p.Z.Provider,{value:{disabled:a,required:o,captionId:k,validationMessageId:C}},r.createElement("div",null,r.createElement(i.Z,f({border:"none",margin:0,mb:w?2:void 0,padding:0},x&&{as:"fieldset",disabled:a},{sx:b}),x?r.createElement(i.Z,{as:"legend",mb:Z?2:void 0,padding:0},h.label,h.caption,r.isValidElement(h.validation)&&h.validation.props.children&&r.createElement(m.Z,null,h.validation.props.children)):h.caption,r.createElement(v,!x&&{"aria-labelledby":e,"aria-describedby":[C,k].filter(Boolean).join(" "),as:"div",role:"group"},r.Children.toArray(y).filter(e=>r.isValidElement(e)))),w&&r.createElement(l.Z,{"aria-hidden":!!x,show:!0},h.validation)))};b.displayName="CheckboxOrRadioGroup";var h=Object.assign(b,{Caption:d.Z,Label:c.Z,Validation:u.Z})},48987:(e,t,a)=>{a.d(t,{Z:()=>l});var r=a(67294),n=a(97011),i=a(58761);let l=({children:e,sx:t})=>{let{disabled:a,captionId:l}=r.useContext(i.Z);return r.createElement(n.Z,{color:a?"fg.muted":"fg.subtle",fontSize:1,id:l,sx:t},e)};l.displayName="CheckboxOrRadioGroupCaption"},58761:(e,t,a)=>{a.d(t,{Z:()=>n});var r=a(67294);let n=r.createContext({})},4776:(e,t,a)=>{a.d(t,{Z:()=>o});var r=a(67294),n=a(42483),i=a(53670),l=a(58761);let o=({children:e,visuallyHidden:t=!1,sx:a})=>{let{required:o,disabled:s}=r.useContext(l.Z);return r.createElement(i.Z,{isVisible:!t,title:o?"required field":void 0,sx:{display:"block",color:s?"fg.muted":void 0,fontSize:2,...a}},o?r.createElement(n.Z,{display:"flex",as:"span"},r.createElement(n.Z,{mr:1},e),r.createElement("span",null,"*")):e)};o.displayName="CheckboxOrRadioGroupLabel"},14682:(e,t,a)=>{a.d(t,{Z:()=>l});var r=a(67294),n=a(15209),i=a(58761);let l=({children:e,variant:t,sx:a})=>{let{validationMessageId:l=""}=r.useContext(i.Z);return r.createElement(n.Z,{validationStatus:t,id:l,sx:a},e)};l.displayName="CheckboxOrRadioGroupValidation"},95415:(e,t,a)=>{a.d(t,{Z:()=>o});var r=a(67294),n=a(42483),i=a(53670);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(i.Z,l({isVisible:!d,as:u,htmlFor:a,id:o,sx:{fontWeight:"bold",fontSize:1,display:"block",color:t?"fg.muted":"fg.default",cursor:t?"not-allowed":"pointer",alignSelf:"flex-start",...c}},p),s?r.createElement(n.Z,{display:"flex",as:"span"},r.createElement(n.Z,{mr:1},e),r.createElement("span",null,"*")):e);o.displayName="InputLabel"},15209:(e,t,a)=>{a.d(t,{Z:()=>d});var r=a(85529),n=a(67294),i=a(42483),l=a(97011);let o={success:r.CheckCircleFillIcon,error:r.AlertFillIcon},s={success:"success.fg",error:"danger.fg"},d=({children:e,id:t,validationStatus:a,sx:r})=>{let d=a?o[a]:void 0,c=a?s[a]:void 0,u=16/12;return n.createElement(l.Z,{sx:{fontSize:0,fontWeight:"bold",alignItems:"start",color:c,display:"flex",a:{color:"currentColor",textDecoration:"underline"},...r},"aria-live":"polite"},d&&n.createElement(i.Z,{as:"span",alignItems:"center",display:"flex",minHeight:12*u,mr:1,"aria-hidden":"true"},n.createElement(d,{size:12,fill:"currentColor"})),n.createElement(i.Z,{as:"span",id:t,sx:{lineHeight:u}},e))};d.displayName="InputValidation"},85099:(e,t,a)=>{a.d(t,{Z:()=>s});var r=a(67294),n=a(15388),i=a(42483);let l=(0,n.F4)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),o=n.ZP.div.withConfig({displayName:"ValidationAnimationContainer__AnimatedElement",componentId:"sc-8z5a3g-0"})(["animation:",";@media (prefers-reduced-motion){animation:none;}"],e=>e.show&&(0,n.iv)(["170ms "," cubic-bezier(0.44,0.74,0.36,1);"],l)),s=({show:e,children:t})=>{let[a,n]=(0,r.useState)(e);return(0,r.useEffect)(()=>{e&&n(!0)},[e]),a?r.createElement(i.Z,{height:e?"auto":0,overflow:"hidden"},r.createElement(o,{show:e,onAnimationEnd:()=>{e||n(!1)}},t)):null}},29178:(e,t,a)=>{a.d(t,{m:()=>i});var r=a(15388),n=a(42379);let i=(0,r.iv)(["appearance:none;border-color:",";border-style:solid;border-width:",";cursor:pointer;display:grid;height:var(--base-size-16,16px);margin:0;margin-top:0.125rem;place-content:center;position:relative;width:var(--base-size-16,16px);&:disabled{background-color:",";border-color:var(--control-borderColor-disabled,",");}"],(0,n.U2)("colors.neutral.emphasis"),(0,n.U2)("borderWidths.1"),(0,n.U2)("colors.input.disabledBg"),(0,n.U2)("colors.border.default"))}}]); //# sourceMappingURL=vendors-node_modules_primer_react_lib-esm_FormControl_FormControl_js-ffa3852d1e3b.js.map