@ansible/ansible-ui-framework 0.0.656 → 0.0.657

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +120 -120
  2. package/index.umd.cjs +2 -2
  3. package/package.json +1 -1
package/index.umd.cjs CHANGED
@@ -158,14 +158,14 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
158
158
  }
159
159
  `,sc=cr(Me.SyncAltIcon)`
160
160
  animation: ${wp} 1.75s linear infinite;
161
- `;sc.displayName="RunningIcon";const Ti=S.createContext({addAlert:()=>null,removeAlert:()=>null,replaceAlert:()=>null,removeAlerts:()=>null});function xp(){return S.useContext(Ti)}function ic(t){const[e,r]=S.useState([]),[n]=S.useState(()=>{function s(l){r(c=>l?c.filter(l):[])}function i(l){r(c=>c.filter(d=>d!==l))}function a(l){Number.isInteger(l.timeout)&&(setTimeout(()=>i(l),l.timeout),delete l.timeout),r(c=>{const d=c.findIndex(h=>h===l);if(d!==-1){const h=[...c];return h[d]=l,h}else return[...c,l]})}function o(l,c){r(d=>{const h=d.findIndex(u=>u===l);if(h!==-1){Number.isInteger(c.timeout)&&(setTimeout(()=>i(c),c.timeout),delete c.timeout);const u=[...d];return u[h]=c,u}return d})}return{addAlert:a,removeAlert:i,removeAlerts:s,replaceAlert:o}});return f.jsxs(Ti.Provider,{value:n,children:[f.jsx(v.AlertGroup,{isToast:!0,isLiveRegion:!0,children:e.map((s,i)=>S.createElement(v.Alert,{...s,key:s.key??s.id??i,actionClose:f.jsx(v.AlertActionCloseButton,{onClose:()=>n.removeAlert(s)})}))}),t.children]})}function Sp(t){const{bytes:e}=t;if(!+e)return f.jsx(f.Fragment,{});const r=1024,n=t.decimals?t.decimals:0,s=n<0?0:n,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(r));return f.jsx(f.Fragment,{children:`${parseFloat((e/Math.pow(r,a)).toFixed(s))} ${i[a]}`})}function Ep(t){const[e]=pt(),r=Gr(),n=t.used/t.capacity;if(t.capacity===0)return f.jsx(f.Fragment,{});const s=n>=.8?"var(--pf-global--palette--red":n>=.5?"var(--pf-global--palette--gold":"var(--pf-global--palette--green",i=r.activeTheme==="light"?`${s}-100)`:`${s}-600)`,a=r.activeTheme==="light"?`${s}-400)`:`${s}-200)`,o=r.activeTheme==="light"?"#0002":"#fff2";return f.jsxs(v.Flex,{alignItems:{default:"alignItemsBaseline"},spaceItems:{default:"spaceItemsSm"},children:[t.capacity>0&&f.jsx(v.FlexItem,{children:f.jsx("div",{style:{width:18,height:25,background:i,marginBottom:-9,paddingTop:Math.max(0,Math.min(25,25*(t.capacity-t.used)/t.capacity)),borderRadius:2,border:`thin solid ${o}`},children:f.jsx("div",{style:{width:"100%",height:"100%",background:a,borderRadius:2}})})}),t.format?f.jsx(v.FlexItem,{children:t.format.replace("{used}",t.used.toString()).replace("{capacity}",t.capacity.toString())}):f.jsxs(v.FlexItem,{children:[t.used,` ${e.ofText} `,t.capacity]})]})}function $p(t){return t.text?f.jsx(v.ClipboardCopy,{hoverTip:"Copy",clickTip:"Copied",variant:"inline-compact",style:{display:"flex",flexWrap:"nowrap",borderRadius:4},onCopy:()=>{navigator.clipboard.writeText(t.text??"")},children:f.jsx(v.Truncate,{content:t.text,style:{minWidth:t.minWidth}})}):f.jsx(f.Fragment,{})}function _p(t){const e=S.useMemo(()=>new Date(t.start??0).valueOf(),[t.start]),r=S.useMemo(()=>new Date(t.finish??0).valueOf(),[t.finish]),[n,s]=S.useState(Math.max(0,r-e.valueOf()));S.useEffect(()=>{const d=setInterval(()=>{e&&(t.finish?s(Math.max(0,r-e)):s(Math.max(0,Date.now()-e)))},1e3);return()=>clearTimeout(d)},[e,r,t.finish]);const i=Math.floor(n/1e3),a=Math.floor(i%60),o=Math.floor(i/60%60),l=Math.floor(i/60/60%24),c=Math.floor(i/60/60/24);return e?f.jsxs(v.Split,{children:[c!==0&&f.jsxs(v.SplitItem,{children:[c,"d"," "]}),l!==0&&f.jsxs(v.SplitItem,{children:[l,"h"," "]}),o!==0&&f.jsxs(v.SplitItem,{children:[o,"m"," "]}),f.jsxs(v.SplitItem,{children:[a,"s"]})]}):f.jsx(f.Fragment,{})}function ac(t){const{disablePadding:e}=t,r=Gr(),n=r.formLayout,s=r.formColumns,i=!1;return f.jsx(v.PageSection,{variant:"light",padding:{default:"noPadding"},className:"dark-1",children:f.jsx(v.DescriptionList,{orientation:{sm:n,md:n,lg:n,xl:n,"2xl":n},columnModifier:s==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:e?void 0:24},isCompact:i,children:t.children})})}function kp(t){const{item:e,columns:r}=t;return e?f.jsx(ac,{children:r.map(n=>f.jsx(yn,{label:n.header,children:f.jsx(bt,{column:n,item:e})},n.id))}):f.jsx(f.Fragment,{})}function oc(t){const{onSelect:e,value:r}=t,n=S.useCallback((l,c)=>{var d;e(l,(d=t.options.find(h=>h.label===c.toString()))==null?void 0:d.value)},[e,t.options]),{options:s}=t;s.sort((l,c)=>(l.group??"")<(c.group??"")?-1:(l.group??"")>(c.group??"")?1:l.label<c.label?-1:l.label>c.label?1:0);const i=s.reduce((l,c)=>{const d=c.group??"";let h=l[d];return h||(h=[],l[d]=h),h.push(c),l},{}),a=Object.keys(i).length>1||Object.keys(i).length===1&&Object.keys(i)[0]!=="",o=t.options.find(l=>l.value===r);return f.jsx(mr,{...t,value:o==null?void 0:o.label,onSelect:n,isGrouped:a,children:a?Object.keys(i).map(l=>f.jsx(v.SelectGroup,{label:l,children:i[l].map(c=>f.jsx(v.SelectOption,{value:c.label,label:c.label,description:c.description,children:c.label},c.label))},l)):s.map(l=>f.jsx(v.SelectOption,{value:l.label,label:l.label,description:l.description,children:l.label},l.label))})}function lc(t){const[e,r]=S.useState(!1),{helperTextInvalid:n,...s}=t;return f.jsx(is,{...t,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextArea,{...s,id:t.id,label:void 0,"aria-describedby":t.id?`${t.id}-form-group`:void 0,validated:t.helperTextInvalid?"error":void 0}),t.type==="password"&&f.jsx(v.Button,{variant:"control",onClick:()=>r(!e),isDisabled:t.isDisabled||t.isReadOnly,children:e?f.jsx(Me.EyeIcon,{}):f.jsx(Me.EyeSlashIcon,{})})]})})}function cc(t){const[e,r]=S.useState(!1),{children:n,isReadOnly:s,placeholder:i,...a}=t,o=t.id?t.id:typeof t.label=="string"?t.label.toLowerCase().split(" ").join("-"):void 0;return f.jsx(is,{...a,id:o,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextInput,{placeholder:i,onChange:t.onChange,id:o,onBlur:t.onBlur,label:void 0,value:t.value,"aria-describedby":o?`${o}-form-group`:void 0,validated:t.helperTextInvalid?"error":void 0,type:t.type==="password"?e?"text":"password":t.type,readOnlyVariant:s?"default":void 0}),t.type==="password"&&f.jsx(v.Button,{variant:"control",onClick:()=>r(!e),isDisabled:t.isDisabled||t.isReadOnly,children:e?f.jsx(Me.EyeIcon,{}):f.jsx(Me.EyeSlashIcon,{})}),t.children]})})}var xn=t=>t.type==="checkbox",Yr=t=>t instanceof Date,Et=t=>t==null;const uc=t=>typeof t=="object";var ht=t=>!Et(t)&&!Array.isArray(t)&&uc(t)&&!Yr(t),dc=t=>ht(t)&&t.target?xn(t.target)?t.target.checked:t.target.value:t,Tp=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,fc=(t,e)=>t.has(Tp(e)),jp=t=>{const e=t.constructor&&t.constructor.prototype;return ht(e)&&e.hasOwnProperty("isPrototypeOf")},ji=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function er(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(ji&&(t instanceof Blob||t instanceof FileList))&&(r||ht(t)))if(e=r?[]:{},!Array.isArray(t)&&!jp(t))e=t;else for(const n in t)e[n]=er(t[n]);else return t;return e}var Sn=t=>Array.isArray(t)?t.filter(Boolean):[],it=t=>t===void 0,he=(t,e,r)=>{if(!e||!ht(t))return r;const n=Sn(e.split(/[,[\].]+?/)).reduce((s,i)=>Et(s)?s:s[i],t);return it(n)||n===t?it(t[e])?r:t[e]:n};const as={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},zt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},tr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hc=S.createContext(null),Ut=()=>S.useContext(hc),Op=t=>{const{children:e,...r}=t;return S.createElement(hc.Provider,{value:r},e)};var mc=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==zt.all&&(e._proxyFormState[a]=!n||zt.all),r&&(r[a]=!0),t[a]}});return s},It=t=>ht(t)&&!Object.keys(t).length,pc=(t,e,r,n)=>{r(t);const{name:s,...i}=t;return It(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!n||zt.all))},os=t=>Array.isArray(t)?t:[t],gc=(t,e,r)=>r&&e?t===e:!t||!e||t===e||os(t).some(n=>n&&(n.startsWith(e)||e.startsWith(n)));function Oi(t){const e=S.useRef(t);e.current=t,S.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}function yc(t){const e=Ut(),{control:r=e.control,disabled:n,name:s,exact:i}=t||{},[a,o]=S.useState(r._formState),l=S.useRef(!0),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=S.useRef(s);return d.current=s,Oi({disabled:n,next:h=>l.current&&gc(d.current,h.name,i)&&pc(h,c.current,r._updateFormState)&&o({...r._formState,...h}),subject:r._subjects.state}),S.useEffect(()=>{l.current=!0;const h=r._proxyFormState.isDirty&&r._getDirty();return h!==r._formState.isDirty&&r._subjects.state.next({isDirty:h}),c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}},[r]),mc(a,r,c.current,!1)}var Gt=t=>typeof t=="string",vc=(t,e,r,n,s)=>Gt(t)?(n&&e.watch.add(t),he(r,t,s)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),he(r,i))):(n&&(e.watchAll=!0),r);function Pp(t){const e=Ut(),{control:r=e.control,name:n,defaultValue:s,disabled:i,exact:a}=t||{},o=S.useRef(n);o.current=n,Oi({disabled:i,subject:r._subjects.values,next:d=>{gc(o.current,d.name,a)&&c(er(vc(o.current,r._names,d.values||r._formValues,!1,s)))}});const[l,c]=S.useState(r._getWatch(n,s));return S.useEffect(()=>r._removeUnmounted()),l}var Pi=t=>/^\w*$/.test(t),bc=t=>Sn(t.replace(/["|']|\]/g,"").split(/\.|\[/));function Je(t,e,r){let n=-1;const s=Pi(e)?[e]:bc(e),i=s.length,a=i-1;for(;++n<i;){const o=s[n];let l=r;if(n!==a){const c=t[o];l=ht(c)||Array.isArray(c)?c:isNaN(+s[n+1])?{}:[]}t[o]=l,t=t[o]}return t}function wc(t){const e=Ut(),{name:r,control:n=e.control,shouldUnregister:s}=t,i=fc(n._names.array,r),a=Pp({control:n,name:r,defaultValue:he(n._formValues,r,he(n._defaultValues,r,t.defaultValue)),exact:!0}),o=yc({control:n,name:r}),l=S.useRef(n.register(r,{...t.rules,value:a}));return S.useEffect(()=>{const c=n._options.shouldUnregister||s,d=(h,u)=>{const m=he(n._fields,h);m&&(m._f.mount=u)};if(d(r,!0),c){const h=er(he(n._options.defaultValues,r));Je(n._defaultValues,r,h),it(he(n._formValues,r))&&Je(n._formValues,r,h)}return()=>{(i?c&&!n._state.action:c)?n.unregister(r):d(r,!1)}},[r,n,i,s]),{field:{name:r,value:a,onChange:S.useCallback(c=>l.current.onChange({target:{value:dc(c),name:r},type:as.CHANGE}),[r]),onBlur:S.useCallback(()=>l.current.onBlur({target:{value:he(n._formValues,r),name:r},type:as.BLUR}),[r,n]),ref:c=>{const d=he(n._fields,r);d&&c&&(d._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:h=>c.setCustomValidity(h),reportValidity:()=>c.reportValidity()})}},formState:o,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(o.errors,r)},isDirty:{enumerable:!0,get:()=>!!he(o.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!he(o.touchedFields,r)},error:{enumerable:!0,get:()=>he(o.errors,r)}})}}const Tr=t=>t.render(wc(t));var xc=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{};const Ci=(t,e,r)=>{for(const n of r||Object.keys(t)){const s=he(t,n);if(s){const{_f:i,...a}=s;if(i&&e(i.name)){if(i.ref.focus){i.ref.focus();break}else if(i.refs&&i.refs[0].focus){i.refs[0].focus();break}}else ht(a)&&Ci(a,e)}}};var Sc=t=>({isOnSubmit:!t||t===zt.onSubmit,isOnBlur:t===zt.onBlur,isOnChange:t===zt.onChange,isOnAll:t===zt.all,isOnTouch:t===zt.onTouched}),Ec=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length)))),Cp=(t,e,r)=>{const n=Sn(he(t,r));return Je(n,"root",e[r]),Je(t,r,n),t},Zr=t=>typeof t=="boolean",Ni=t=>t.type==="file",pr=t=>typeof t=="function",ls=t=>{if(!ji)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},cs=t=>Gt(t),Ii=t=>t.type==="radio",us=t=>t instanceof RegExp;const $c={value:!1,isValid:!1},_c={value:!0,isValid:!0};var kc=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!it(t[0].attributes.value)?it(t[0].value)||t[0].value===""?_c:{value:t[0].value,isValid:!0}:_c:$c}return $c};const Tc={isValid:!1,value:null};var jc=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Tc):Tc;function Oc(t,e,r="validate"){if(cs(t)||Array.isArray(t)&&t.every(cs)||Zr(t)&&!t)return{type:r,message:cs(t)?t:"",ref:e}}var Kr=t=>ht(t)&&!us(t)?t:{value:t,message:""},Pc=async(t,e,r,n,s)=>{const{ref:i,refs:a,required:o,maxLength:l,minLength:c,min:d,max:h,pattern:u,validate:m,name:p,valueAsNumber:y,mount:b,disabled:k}=t._f,O=he(e,p);if(!b||k)return{};const $=a?a[0]:i,x=M=>{n&&$.reportValidity&&($.setCustomValidity(Zr(M)?"":M||""),$.reportValidity())},w={},B=Ii(i),R=xn(i),T=B||R,E=(y||Ni(i))&&it(i.value)&&it(O)||ls(i)&&i.value===""||O===""||Array.isArray(O)&&!O.length,P=xc.bind(null,p,r,w),I=(M,V,G,K=tr.maxLength,J=tr.minLength)=>{const re=M?V:G;w[p]={type:M?K:J,message:re,ref:i,...P(M?K:J,re)}};if(s?!Array.isArray(O)||!O.length:o&&(!T&&(E||Et(O))||Zr(O)&&!O||R&&!kc(a).isValid||B&&!jc(a).isValid)){const{value:M,message:V}=cs(o)?{value:!!o,message:o}:Kr(o);if(M&&(w[p]={type:tr.required,message:V,ref:$,...P(tr.required,V)},!r))return x(V),w}if(!E&&(!Et(d)||!Et(h))){let M,V;const G=Kr(h),K=Kr(d);if(!Et(O)&&!isNaN(O)){const J=i.valueAsNumber||O&&+O;Et(G.value)||(M=J>G.value),Et(K.value)||(V=J<K.value)}else{const J=i.valueAsDate||new Date(O),re=_=>new Date(new Date().toDateString()+" "+_),se=i.type=="time",D=i.type=="week";Gt(G.value)&&O&&(M=se?re(O)>re(G.value):D?O>G.value:J>new Date(G.value)),Gt(K.value)&&O&&(V=se?re(O)<re(K.value):D?O<K.value:J<new Date(K.value))}if((M||V)&&(I(!!M,G.message,K.message,tr.max,tr.min),!r))return x(w[p].message),w}if((l||c)&&!E&&(Gt(O)||s&&Array.isArray(O))){const M=Kr(l),V=Kr(c),G=!Et(M.value)&&O.length>+M.value,K=!Et(V.value)&&O.length<+V.value;if((G||K)&&(I(G,M.message,V.message),!r))return x(w[p].message),w}if(u&&!E&&Gt(O)){const{value:M,message:V}=Kr(u);if(us(M)&&!O.match(M)&&(w[p]={type:tr.pattern,message:V,ref:i,...P(tr.pattern,V)},!r))return x(V),w}if(m){if(pr(m)){const M=await m(O,e),V=Oc(M,$);if(V&&(w[p]={...V,...P(tr.validate,V.message)},!r))return x(V.message),w}else if(ht(m)){let M={};for(const V in m){if(!It(M)&&!r)break;const G=Oc(await m[V](O,e),$,V);G&&(M={...G,...P(V,G.message)},x(G.message),r&&(w[p]=M))}if(!It(M)&&(w[p]={ref:$,...M},!r))return w}}return x(!0),w};function Np(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=it(t)?n++:t[e[n++]];return t}function Ip(t){for(const e in t)if(!it(t[e]))return!1;return!0}function gt(t,e){const r=Array.isArray(e)?e:Pi(e)?[e]:bc(e),n=r.length===1?t:Np(t,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(ht(n)&&It(n)||Array.isArray(n)&&Ip(n))&&gt(t,r.slice(0,-1)),t}function Di(){let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}}var ds=t=>Et(t)||!uc(t);function jr(t,e){if(ds(t)||ds(e))return t===e;if(Yr(t)&&Yr(e))return t.getTime()===e.getTime();const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const s of r){const i=t[s];if(!n.includes(s))return!1;if(s!=="ref"){const a=e[s];if(Yr(i)&&Yr(a)||ht(i)&&ht(a)||Array.isArray(i)&&Array.isArray(a)?!jr(i,a):i!==a)return!1}}return!0}var Cc=t=>t.type==="select-multiple",Dp=t=>Ii(t)||xn(t),Ai=t=>ls(t)&&t.isConnected,Nc=t=>{for(const e in t)if(pr(t[e]))return!0;return!1};function fs(t,e={}){const r=Array.isArray(t);if(ht(t)||r)for(const n in t)Array.isArray(t[n])||ht(t[n])&&!Nc(t[n])?(e[n]=Array.isArray(t[n])?[]:{},fs(t[n],e[n])):Et(t[n])||(e[n]=!0);return e}function Ic(t,e,r){const n=Array.isArray(t);if(ht(t)||n)for(const s in t)Array.isArray(t[s])||ht(t[s])&&!Nc(t[s])?it(e)||ds(r[s])?r[s]=Array.isArray(t[s])?fs(t[s],[]):{...fs(t[s])}:Ic(t[s],Et(e)?{}:e[s],r[s]):r[s]=!jr(t[s],e[s]);return r}var Fi=(t,e)=>Ic(t,e,fs(e)),Dc=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>it(t)?t:e?t===""?NaN:t&&+t:r&&Gt(t)?new Date(t):n?n(t):t;function Mi(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return Ni(e)?e.files:Ii(e)?jc(t.refs).value:Cc(e)?[...e.selectedOptions].map(({value:r})=>r):xn(e)?kc(t.refs).value:Dc(it(e.value)?t.ref.value:e.value,t)}var Ap=(t,e,r,n)=>{const s={};for(const i of t){const a=he(e,i);a&&Je(s,i,a._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},En=t=>it(t)?t:us(t)?t.source:ht(t)?us(t.value)?t.value.source:t.value:t,Fp=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function Ac(t,e,r){const n=he(t,r);if(n||Pi(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),a=he(e,i),o=he(t,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(o&&o.type)return{name:i,error:o};s.pop()}return{name:r}}var Mp=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,Vp=(t,e)=>!Sn(he(t,e)).length&&gt(t,e);const Lp={mode:zt.onSubmit,reValidateMode:zt.onChange,shouldFocusError:!0};function Rp(t={},e){let r={...Lp,...t},n={submitCount:0,isDirty:!1,isLoading:pr(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},s={},i=ht(r.defaultValues)||ht(r.values)?er(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:er(i),o={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Di(),array:Di(),state:Di()},m=t.resetOptions&&t.resetOptions.keepDirtyValues,p=Sc(r.mode),y=Sc(r.reValidateMode),b=r.criteriaMode===zt.all,k=C=>U=>{clearTimeout(d),d=setTimeout(C,U)},O=async C=>{if(h.isValid||C){const U=r.resolver?It((await E()).errors):await I(s,!0);U!==n.isValid&&u.state.next({isValid:U})}},$=C=>h.isValidating&&u.state.next({isValidating:C}),x=(C,U=[],W,le,oe=!0,Q=!0)=>{if(le&&W){if(o.action=!0,Q&&Array.isArray(he(s,C))){const ge=W(he(s,C),le.argA,le.argB);oe&&Je(s,C,ge)}if(Q&&Array.isArray(he(n.errors,C))){const ge=W(he(n.errors,C),le.argA,le.argB);oe&&Je(n.errors,C,ge),Vp(n.errors,C)}if(h.touchedFields&&Q&&Array.isArray(he(n.touchedFields,C))){const ge=W(he(n.touchedFields,C),le.argA,le.argB);oe&&Je(n.touchedFields,C,ge)}h.dirtyFields&&(n.dirtyFields=Fi(i,a)),u.state.next({name:C,isDirty:V(C,U),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Je(a,C,U)},w=(C,U)=>{Je(n.errors,C,U),u.state.next({errors:n.errors})},B=(C,U,W,le)=>{const oe=he(s,C);if(oe){const Q=he(a,C,it(W)?he(i,C):W);it(Q)||le&&le.defaultChecked||U?Je(a,C,U?Q:Mi(oe._f)):J(C,Q),o.mount&&O()}},R=(C,U,W,le,oe)=>{let Q=!1,ge=!1;const Ae={name:C};if(!W||le){h.isDirty&&(ge=n.isDirty,n.isDirty=Ae.isDirty=V(),Q=ge!==Ae.isDirty);const Oe=jr(he(i,C),U);ge=he(n.dirtyFields,C),Oe?gt(n.dirtyFields,C):Je(n.dirtyFields,C,!0),Ae.dirtyFields=n.dirtyFields,Q=Q||h.dirtyFields&&ge!==!Oe}if(W){const Oe=he(n.touchedFields,C);Oe||(Je(n.touchedFields,C,W),Ae.touchedFields=n.touchedFields,Q=Q||h.touchedFields&&Oe!==W)}return Q&&oe&&u.state.next(Ae),Q?Ae:{}},T=(C,U,W,le)=>{const oe=he(n.errors,C),Q=h.isValid&&Zr(U)&&n.isValid!==U;if(t.delayError&&W?(c=k(()=>w(C,W)),c(t.delayError)):(clearTimeout(d),c=null,W?Je(n.errors,C,W):gt(n.errors,C)),(W?!jr(oe,W):oe)||!It(le)||Q){const ge={...le,...Q&&Zr(U)?{isValid:U}:{},errors:n.errors,name:C};n={...n,...ge},u.state.next(ge)}$(!1)},E=async C=>r.resolver(a,r.context,Ap(C||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation)),P=async C=>{const{errors:U}=await E();if(C)for(const W of C){const le=he(U,W);le?Je(n.errors,W,le):gt(n.errors,W)}else n.errors=U;return U},I=async(C,U,W={valid:!0})=>{for(const le in C){const oe=C[le];if(oe){const{_f:Q,...ge}=oe;if(Q){const Ae=l.array.has(Q.name),Oe=await Pc(oe,a,b,r.shouldUseNativeValidation&&!U,Ae);if(Oe[Q.name]&&(W.valid=!1,U))break;!U&&(he(Oe,Q.name)?Ae?Cp(n.errors,Oe,Q.name):Je(n.errors,Q.name,Oe[Q.name]):gt(n.errors,Q.name))}ge&&await I(ge,U,W)}}return W.valid},M=()=>{for(const C of l.unMount){const U=he(s,C);U&&(U._f.refs?U._f.refs.every(W=>!Ai(W)):!Ai(U._f.ref))&&z(C)}l.unMount=new Set},V=(C,U)=>(C&&U&&Je(a,C,U),!jr(L(),i)),G=(C,U,W)=>vc(C,l,{...o.mount?a:it(U)?i:Gt(C)?{[C]:U}:U},W,U),K=C=>Sn(he(o.mount?a:i,C,t.shouldUnregister?he(i,C,[]):[])),J=(C,U,W={})=>{const le=he(s,C);let oe=U;if(le){const Q=le._f;Q&&(!Q.disabled&&Je(a,C,Dc(U,Q)),oe=ls(Q.ref)&&Et(U)?"":U,Cc(Q.ref)?[...Q.ref.options].forEach(ge=>ge.selected=oe.includes(ge.value)):Q.refs?xn(Q.ref)?Q.refs.length>1?Q.refs.forEach(ge=>(!ge.defaultChecked||!ge.disabled)&&(ge.checked=Array.isArray(oe)?!!oe.find(Ae=>Ae===ge.value):oe===ge.value)):Q.refs[0]&&(Q.refs[0].checked=!!oe):Q.refs.forEach(ge=>ge.checked=ge.value===oe):Ni(Q.ref)?Q.ref.value="":(Q.ref.value=oe,Q.ref.type||u.values.next({name:C,values:{...a}})))}(W.shouldDirty||W.shouldTouch)&&R(C,oe,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&_(C)},re=(C,U,W)=>{for(const le in U){const oe=U[le],Q=`${C}.${le}`,ge=he(s,Q);(l.array.has(C)||!ds(oe)||ge&&!ge._f)&&!Yr(oe)?re(Q,oe,W):J(Q,oe,W)}},se=(C,U,W={})=>{const le=he(s,C),oe=l.array.has(C),Q=er(U);Je(a,C,Q),oe?(u.array.next({name:C,values:{...a}}),(h.isDirty||h.dirtyFields)&&W.shouldDirty&&u.state.next({name:C,dirtyFields:Fi(i,a),isDirty:V(C,Q)})):le&&!le._f&&!Et(Q)?re(C,Q,W):J(C,Q,W),Ec(C,l)&&u.state.next({...n}),u.values.next({name:C,values:{...a}}),!o.mount&&e()},D=async C=>{const U=C.target;let W=U.name,le=!0;const oe=he(s,W),Q=()=>U.type?Mi(oe._f):dc(C);if(oe){let ge,Ae;const Oe=Q(),ye=C.type===as.BLUR||C.type===as.FOCUS_OUT,Ke=!Fp(oe._f)&&!r.resolver&&!he(n.errors,W)&&!oe._f.deps||Mp(ye,he(n.touchedFields,W),n.isSubmitted,y,p),Ot=Ec(W,l,ye);Je(a,W,Oe),ye?(oe._f.onBlur&&oe._f.onBlur(C),c&&c(0)):oe._f.onChange&&oe._f.onChange(C);const $t=R(W,Oe,ye,!1),_t=!It($t)||Ot;if(!ye&&u.values.next({name:W,type:C.type,values:{...a}}),Ke)return h.isValid&&O(),_t&&u.state.next({name:W,...Ot?{}:$t});if(!ye&&Ot&&u.state.next({...n}),$(!0),r.resolver){const{errors:j}=await E([W]),F=Ac(n.errors,s,W),A=Ac(j,s,F.name||W);ge=A.error,W=A.name,Ae=It(j)}else ge=(await Pc(oe,a,b,r.shouldUseNativeValidation))[W],le=isNaN(Oe)||Oe===he(a,W,Oe),le&&(ge?Ae=!1:h.isValid&&(Ae=await I(s,!0)));le&&(oe._f.deps&&_(oe._f.deps),T(W,Ae,ge,$t))}},_=async(C,U={})=>{let W,le;const oe=os(C);if($(!0),r.resolver){const Q=await P(it(C)?C:oe);W=It(Q),le=C?!oe.some(ge=>he(Q,ge)):W}else C?(le=(await Promise.all(oe.map(async Q=>{const ge=he(s,Q);return await I(ge&&ge._f?{[Q]:ge}:ge)}))).every(Boolean),!(!le&&!n.isValid)&&O()):le=W=await I(s);return u.state.next({...!Gt(C)||h.isValid&&W!==n.isValid?{}:{name:C},...r.resolver||!C?{isValid:W}:{},errors:n.errors,isValidating:!1}),U.shouldFocus&&!le&&Ci(s,Q=>Q&&he(n.errors,Q),C?oe:l.mount),le},L=C=>{const U={...i,...o.mount?a:{}};return it(C)?U:Gt(C)?he(U,C):C.map(W=>he(U,W))},q=(C,U)=>({invalid:!!he((U||n).errors,C),isDirty:!!he((U||n).dirtyFields,C),isTouched:!!he((U||n).touchedFields,C),error:he((U||n).errors,C)}),Z=C=>{C&&os(C).forEach(U=>gt(n.errors,U)),u.state.next({errors:C?n.errors:{}})},ee=(C,U,W)=>{const le=(he(s,C,{_f:{}})._f||{}).ref;Je(n.errors,C,{...U,ref:le}),u.state.next({name:C,errors:n.errors,isValid:!1}),W&&W.shouldFocus&&le&&le.focus&&le.focus()},ce=(C,U)=>pr(C)?u.values.subscribe({next:W=>C(G(void 0,U),W)}):G(C,U,!0),z=(C,U={})=>{for(const W of C?os(C):l.mount)l.mount.delete(W),l.array.delete(W),U.keepValue||(gt(s,W),gt(a,W)),!U.keepError&&gt(n.errors,W),!U.keepDirty&&gt(n.dirtyFields,W),!U.keepTouched&&gt(n.touchedFields,W),!r.shouldUnregister&&!U.keepDefaultValue&&gt(i,W);u.values.next({values:{...a}}),u.state.next({...n,...U.keepDirty?{isDirty:V()}:{}}),!U.keepIsValid&&O()},ve=(C,U={})=>{let W=he(s,C);const le=Zr(U.disabled);return Je(s,C,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:C}},name:C,mount:!0,...U}}),l.mount.add(C),W?le&&Je(a,C,U.disabled?void 0:he(a,C,Mi(W._f))):B(C,!0,U.value),{...le?{disabled:U.disabled}:{},...r.shouldUseNativeValidation?{required:!!U.required,min:En(U.min),max:En(U.max),minLength:En(U.minLength),maxLength:En(U.maxLength),pattern:En(U.pattern)}:{},name:C,onChange:D,onBlur:D,ref:oe=>{if(oe){ve(C,U),W=he(s,C);const Q=it(oe.value)&&oe.querySelectorAll&&oe.querySelectorAll("input,select,textarea")[0]||oe,ge=Dp(Q),Ae=W._f.refs||[];if(ge?Ae.find(Oe=>Oe===Q):Q===W._f.ref)return;Je(s,C,{_f:{...W._f,...ge?{refs:[...Ae.filter(Ai),Q,...Array.isArray(he(i,C))?[{}]:[]],ref:{type:Q.type,name:C}}:{ref:Q}}}),B(C,!1,void 0,Q)}else W=he(s,C,{}),W._f&&(W._f.mount=!1),(r.shouldUnregister||U.shouldUnregister)&&!(fc(l.array,C)&&o.action)&&l.unMount.add(C)}}},ie=()=>r.shouldFocusError&&Ci(s,C=>C&&he(n.errors,C),l.mount),Pe=(C,U)=>async W=>{W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let le=er(a);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:oe,values:Q}=await E();n.errors=oe,le=Q}else await I(s);gt(n.errors,"root"),It(n.errors)?(u.state.next({errors:{}}),await C(le,W)):(U&&await U({...n.errors},W),ie(),setTimeout(ie)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:It(n.errors),submitCount:n.submitCount+1,errors:n.errors})},$e=(C,U={})=>{he(s,C)&&(it(U.defaultValue)?se(C,he(i,C)):(se(C,U.defaultValue),Je(i,C,U.defaultValue)),U.keepTouched||gt(n.touchedFields,C),U.keepDirty||(gt(n.dirtyFields,C),n.isDirty=U.defaultValue?V(C,he(i,C)):V()),U.keepError||(gt(n.errors,C),h.isValid&&O()),u.state.next({...n}))},Se=(C,U={})=>{const W=C||i,le=er(W),oe=C&&!It(C)?le:i;if(U.keepDefaultValues||(i=W),!U.keepValues){if(U.keepDirtyValues||m)for(const Q of l.mount)he(n.dirtyFields,Q)?Je(oe,Q,he(a,Q)):se(Q,he(oe,Q));else{if(ji&&it(C))for(const Q of l.mount){const ge=he(s,Q);if(ge&&ge._f){const Ae=Array.isArray(ge._f.refs)?ge._f.refs[0]:ge._f.ref;if(ls(Ae)){const Oe=Ae.closest("form");if(Oe){Oe.reset();break}}}}s={}}a=t.shouldUnregister?U.keepDefaultValues?er(i):{}:le,u.array.next({values:{...oe}}),u.values.next({values:{...oe}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!o.mount&&e(),o.mount=!h.isValid||!!U.keepIsValid,o.watch=!!t.shouldUnregister,u.state.next({submitCount:U.keepSubmitCount?n.submitCount:0,isDirty:U.keepDirty?n.isDirty:!!(U.keepDefaultValues&&!jr(C,i)),isSubmitted:U.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U.keepDirtyValues?n.dirtyFields:U.keepDefaultValues&&C?Fi(i,C):{},touchedFields:U.keepTouched?n.touchedFields:{},errors:U.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},X=(C,U)=>Se(pr(C)?C(a):C,U),Be=(C,U={})=>{const W=he(s,C),le=W&&W._f;if(le){const oe=le.refs?le.refs[0]:le.ref;oe.focus&&(oe.focus(),U.shouldSelect&&oe.select())}},Ve=C=>{n={...n,...C}};return pr(r.defaultValues)&&r.defaultValues().then(C=>{X(C,r.resetOptions),u.state.next({isLoading:!1})}),{control:{register:ve,unregister:z,getFieldState:q,_executeSchema:E,_getWatch:G,_getDirty:V,_updateValid:O,_removeUnmounted:M,_updateFieldArray:x,_getFieldArray:K,_reset:Se,_updateFormState:Ve,_subjects:u,_proxyFormState:h,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(C){o=C},get _defaultValues(){return i},get _names(){return l},set _names(C){l=C},get _formState(){return n},set _formState(C){n=C},get _options(){return r},set _options(C){r={...r,...C}}},trigger:_,register:ve,handleSubmit:Pe,watch:ce,setValue:se,getValues:L,reset:X,resetField:$e,clearErrors:Z,unregister:z,setError:ee,setFocus:Be,getFieldState:q}}function Bp(t={}){const e=S.useRef(),[r,n]=S.useState({isDirty:!1,isValidating:!1,isLoading:pr(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:pr(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Rp(t,()=>n(i=>({...i}))),formState:r});const s=e.current.control;return s._options=t,Oi({subject:s._subjects.state,next:i=>{pc(i,s._proxyFormState,s._updateFormState,!0)&&n({...s._formState})}}),S.useEffect(()=>{t.values&&!jr(t.values,s._defaultValues)&&s._reset(t.values,s._options.resetOptions)},[t.values,s]),S.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),e.current.formState=mc(r,s),e.current}function zp(t){const{name:e,readOnly:r,validate:n,...s}=t,{control:i,formState:{isSubmitting:a}}=Ut();return f.jsx(Tr,{name:e,control:i,shouldUnregister:!0,render:({field:{onChange:o,value:l}})=>f.jsx(v.Checkbox,{...s,id:t.id??e.split(".").join("-"),isChecked:!!l,onChange:o,readOnly:r||a,minLength:void 0,maxLength:void 0,ref:void 0}),rules:{validate:n}})}function gr(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Up(t){const{isReadOnly:e,validate:r,...n}=t,{label:s,name:i,isRequired:a}=t,{control:o,formState:{isSubmitting:l,isValidating:c}}=Ut(),d=t.id??i.split(".").join("-");return f.jsx(Tr,{name:i,control:o,shouldUnregister:!0,render:({field:{onChange:h,value:u},fieldState:{error:m}})=>f.jsx(is,{...n,id:d,helperTextInvalid:!(r&&c)&&(m==null?void 0:m.message),children:f.jsx(Fc,{id:d,value:u,onChange:h,isReadOnly:e||l,invalid:!(r&&c)&&(m==null?void 0:m.message)!==void 0})}),rules:{required:typeof s=="string"&&a===!0?{value:!0,message:`${gr(s.toLocaleLowerCase())} is required.`}:void 0,validate:t.validate}})}function Fc(t){const{onChange:e}=t,r=S.useRef(null),n=S.useRef({}),s=Gr();return S.useEffect(()=>{var a;let i;return bs.editor.defineTheme("my-dark",{base:"vs-dark",inherit:!0,colors:{"editor.background":"#00000000","minimap.background":"#00000000","scrollbarSlider.background":"#FFFFFF22"},rules:[{token:"",background:"#222222"}]}),bs.editor.defineTheme("my-light",{base:"vs",inherit:!0,colors:{"editor.background":"#FFFFFF00","minimap.background":"#FFFFFF00","scrollbarSlider.background":"#FFFFFF22"},rules:[]}),r.current&&(i=bs.editor.create(r.current,{language:"yaml",lineNumbers:"off",theme:"my-dark",lineDecorationsWidth:8,padding:{top:6,bottom:8},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0}),n.current.editor=i,(a=i.getModel())==null||a.onDidChangeContent(()=>{e==null||e(i.getValue()??"")})),()=>{i.dispose()}},[e]),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.getValue()!==t.value&&n.current.editor.setValue(t.value??"")},[t.value]),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.updateOptions({readOnly:t.isReadOnly})},[t.isReadOnly]),Cn(r,()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.layout()}),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.updateOptions({theme:s.activeTheme==="dark"?"my-dark":"my-light"})},[s.activeTheme]),f.jsx("div",{className:"pf-c-form-control",style:{padding:0,height:400},"aria-invalid":t.invalid?"true":void 0,children:f.jsx("div",{id:t.id,ref:r,style:{height:"100%"}})})}function Wp(t){const{control:e,formState:{isSubmitting:r}}=Ut();return f.jsx(Tr,{name:t.name,control:e,shouldUnregister:!0,render:({field:{onChange:n,value:s},fieldState:{error:i}})=>f.jsx(mr,{...t,value:s,onSelect:(a,o)=>n(o),helperTextInvalid:i==null?void 0:i.message,isReadOnly:t.isReadOnly||r})})}function qp(t){const{label:e,isRequired:r,validate:n}=t,{control:s,formState:{isSubmitting:i}}=Ut();return f.jsx(Tr,{name:t.name,control:s,shouldUnregister:!0,render:({field:{onChange:a,value:o},fieldState:{error:l}})=>(o===""&&t.options.length===1&&r&&a(t.options[0].value),f.jsx(oc,{...t,id:t.id??t.name,value:o,onSelect:(c,d)=>a(d),helperTextInvalid:l==null?void 0:l.message,isReadOnly:t.isReadOnly||i})),rules:{required:typeof e=="string"&&r===!0?{value:!0,message:`${gr(e.toLocaleLowerCase())} is required.`}:void 0,validate:n}})}function Hp(t){const{name:e,id:r,helperText:n,validate:s,additionalControls:i,formLabel:a,labelHelp:o,labelHelpTitle:l,...c}=t,{control:d,formState:{isSubmitting:h,isValidating:u}}=Ut();return f.jsx(Tr,{name:e,control:d,shouldUnregister:!0,render:({field:{onChange:m,value:p},fieldState:{error:y}})=>f.jsx(v.FormGroup,{helperTextInvalid:!(s&&u)&&(y==null?void 0:y.message),fieldId:r,label:a,helperText:n,validated:y!=null&&y.message?"error":void 0,labelInfo:i,labelIcon:o?f.jsx(Si,{title:l,help:o}):void 0,children:f.jsx(v.Switch,{...c,isChecked:p,onChange:b=>m(b),isDisabled:h})})})}function Gp(t){const{name:e,label:r,isReadOnly:n,isRequired:s,minLength:i,maxLength:a,pattern:o,validate:l}=t,{control:c,formState:{isSubmitting:d}}=Ut();return f.jsx(Tr,{name:e,control:c,shouldUnregister:!0,render:({field:{onChange:h,value:u},fieldState:{error:m}})=>f.jsx(lc,{...t,id:t.id??e,value:u,onChange:h,helperTextInvalid:m==null?void 0:m.message,isReadOnly:n||d,minLength:void 0,maxLength:void 0}),rules:{required:typeof r=="string"&&s===!0?{value:!0,message:`${gr(r.toLocaleLowerCase())} is required.`}:void 0,minLength:typeof r=="string"&&typeof i=="number"?{value:i,message:`${gr(r.toLocaleLowerCase())} must be at least ${i} characters.`}:i,maxLength:typeof r=="string"&&typeof a=="number"?{value:a,message:`${gr(r.toLocaleLowerCase())} cannot be greater than ${a} characters.`}:a,pattern:o,validate:l}})}function Yp(t){const{name:e,isReadOnly:r,isRequired:n,minLength:s,maxLength:i,pattern:a,validate:o,selectTitle:l,button:c,id:d,selectOpen:h,selectValue:u,...m}=t,{label:p}=t,{control:y,setValue:b,trigger:k,formState:{isSubmitting:O,isValidating:$}}=Ut(),[x]=pt();return f.jsx(Tr,{name:e,control:y,shouldUnregister:!0,render:({field:{onChange:w,value:B,name:R},fieldState:{error:T}})=>f.jsx(cc,{...m,onBlur:()=>k(R),isRequired:n,id:d??R.split(".").join("-"),value:B,onChange:w,helperTextInvalid:T!=null&&T.message?o&&$?x.validating:T==null?void 0:T.message:void 0,isReadOnly:r||O,minLength:void 0,maxLength:void 0,children:l&&f.jsx(v.Button,{ouiaId:`lookup-${R}-button`,variant:"control",onClick:()=>h==null?void 0:h(E=>{if(u){const P=u(E);b(R,P,{shouldValidate:!0})}},l),"aria-label":"Options menu",isDisabled:O,children:f.jsx(Me.SearchIcon,{})})}),rules:{required:typeof p=="string"&&n===!0?{value:!0,message:`${gr(p.toLocaleLowerCase())} is required.`}:void 0,minLength:typeof p=="string"&&typeof s=="number"?{value:s,message:`${gr(p.toLocaleLowerCase())} must be at least ${s} characters.`}:s,maxLength:typeof p=="string"&&typeof i=="number"?{value:i,message:`${gr(p.toLocaleLowerCase())} cannot be greater than ${i} characters.`}:i,pattern:a,validate:o}})}function Zp(t){const{register:e,setValue:r,formState:{isSubmitting:n}}=Ut(),s=e(t.name),{fieldState:i}=wc({name:t.name}),a=i.error;let o=t.id??t.name;return o=o.split(".").join("-"),f.jsx(S.Fragment,{children:f.jsx(v.FormGroup,{id:`${o}-form-group`,fieldId:o,label:t.label,helperText:t.helperText,isRequired:t.required,validated:a!=null&&a.message?"error":void 0,helperTextInvalid:a==null?void 0:a.message,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextInput,{id:o,type:t.secret?"password":"text","aria-describedby":`${o}-form-group`,isRequired:t.required,validated:a!=null&&a.message?"error":void 0,autoFocus:t.autoFocus,placeholder:t.placeholder,...s,onChange:(l,c)=>void s.onChange(c),isReadOnly:n}),f.jsx(v.Button,{variant:"control",onClick:()=>{var l;return(l=t.selectOpen)==null?void 0:l.call(t,c=>{if(t.selectValue){const d=t.selectValue(c);r(t.name,d,{shouldValidate:!0})}},t.selectTitle)},"aria-label":"Options menu",isDisabled:n,children:f.jsx(Me.SearchIcon,{})})]})})})}var Mc=function(t,e,r){if(t&&"reportValidity"in t){var n=he(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Vc=function(t,e){var r=function(s){var i=e.fields[s];i&&i.ref&&"reportValidity"in i.ref?Mc(i.ref,s,t):i.refs&&i.refs.forEach(function(a){return Mc(a,s,t)})};for(var n in e.fields)r(n)},Kp=function(t,e){e.shouldUseNativeValidation&&Vc(t,e);var r={};for(var n in t){var s=he(e.fields,n);Je(r,n,Object.assign(t[n],{ref:s&&s.ref}))}return r};function Lc(){return(Lc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Rc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xe(t){var e={exports:{}};return t(e,e.exports),e.exports}var be=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class r{}e._CodeOrName=r,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(u){if(super(),!e.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class s extends r{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((m,p)=>`${m}${p}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((m,p)=>(p instanceof n&&(m[p.str]=(m[p.str]||0)+1),m),{})}}function i(h,...u){const m=[h[0]];let p=0;for(;p<u.length;)l(m,u[p]),m.push(h[++p]);return new s(m)}e._Code=s,e.nil=new s(""),e._=i;const a=new s("+");function o(h,...u){const m=[d(h[0])];let p=0;for(;p<u.length;)m.push(a),l(m,u[p]),m.push(a,d(h[++p]));return function(y){let b=1;for(;b<y.length-1;){if(y[b]===a){const k=c(y[b-1],y[b+1]);if(k!==void 0){y.splice(b-1,3,k);continue}y[b++]="+"}b++}}(m),new s(m)}function l(h,u){var m;u instanceof s?h.push(...u._items):h.push(u instanceof n?u:typeof(m=u)=="number"||typeof m=="boolean"||m===null?m:d(Array.isArray(m)?m.join(","):m))}function c(h,u){return u==='""'?h:h==='""'?u:typeof h=="string"?u instanceof n||h[h.length-1]!=='"'?void 0:typeof u!="string"?`${h.slice(0,-1)}${u}"`:u[0]==='"'?h.slice(0,-1)+u.slice(1):void 0:typeof u!="string"||u[0]!=='"'||h instanceof n?void 0:`"${h}${u.slice(1)}`}function d(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=o,e.addCodeArg=l,e.strConcat=function(h,u){return u.emptyStr()?h:h.emptyStr()?u:o`${h}${u}`},e.stringify=function(h){return new s(d(h))},e.safeStringify=d,e.getProperty=function(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new s(`.${h}`):i`[${h}]`},e.getEsmExportName=function(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new s(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)},e.regexpCode=function(h){return new s(h.toString())}}),Dt=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new be.Name("const"),let:new be.Name("let"),var:new be.Name("var")};class s{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof be.Name?l:this.name(l)}name(l){return new be.Name(this._newName(l))}_newName(l){return`${l}${(this._names[l]||this._nameGroup(l)).index++}`}_nameGroup(l){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class i extends be.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:d}){this.value=l,this.scopePath=be._`.${new be.Name(c)}[${d}]`}}e.ValueScopeName=i;const a=be._`\n`;e.ValueScope=class extends s{constructor(o){super(o),this._values={},this._scope=o.scope,this.opts={...o,_n:o.lines?a:be.nil}}get(){return this._scope}name(o){return new i(o,this._newName(o))}value(o,l){var c;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(o),{prefix:h}=d,u=(c=l.key)!==null&&c!==void 0?c:l.ref;let m=this._values[h];if(m){const b=m.get(u);if(b)return b}else m=this._values[h]=new Map;m.set(u,d);const p=this._scope[h]||(this._scope[h]=[]),y=p.length;return p[y]=l.ref,d.setValue(l,{property:h,itemIndex:y}),d}getValue(o,l){const c=this._values[o];if(c)return c.get(l)}scopeRefs(o,l=this._values){return this._reduceValues(l,c=>{if(c.scopePath===void 0)throw new Error(`CodeGen: name "${c}" has no value`);return be._`${o}${c.scopePath}`})}scopeCode(o=this._values,l,c){return this._reduceValues(o,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},l,c)}_reduceValues(o,l,c={},d){let h=be.nil;for(const u in o){const m=o[u];if(!m)continue;const p=c[u]=c[u]||new Map;m.forEach(y=>{if(p.has(y))return;p.set(y,n.Started);let b=l(y);if(b)h=be._`${h}${this.opts.es5?e.varKinds.var:e.varKinds.const} ${y} = ${b};${this.opts._n}`;else{if(!(b=d==null?void 0:d(y)))throw new r(y);h=be._`${h}${b}${this.opts._n}`}p.set(y,n.Completed)})}return h}}}),g=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var r=be;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var n=Dt;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new be._Code(">"),GTE:new be._Code(">="),LT:new be._Code("<"),LTE:new be._Code("<="),EQ:new be._Code("==="),NEQ:new be._Code("!=="),NOT:new be._Code("!"),OR:new be._Code("||"),AND:new be._Code("&&"),ADD:new be._Code("+")};class s{optimizeNodes(){return this}optimizeNames(_,L){return this}}class i extends s{constructor(_,L,q){super(),this.varKind=_,this.name=L,this.rhs=q}render({es5:_,_n:L}){return`${_?Dt.varKinds.var:this.varKind} ${this.name}${this.rhs===void 0?"":` = ${this.rhs}`};`+L}optimizeNames(_,L){if(_[this.name.str])return this.rhs&&(this.rhs=M(this.rhs,_,L)),this}get names(){return this.rhs instanceof be._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(_,L,q){super(),this.lhs=_,this.rhs=L,this.sideEffects=q}render({_n:_}){return`${this.lhs} = ${this.rhs};`+_}optimizeNames(_,L){if(!(this.lhs instanceof be.Name)||_[this.lhs.str]||this.sideEffects)return this.rhs=M(this.rhs,_,L),this}get names(){return I(this.lhs instanceof be.Name?{}:{...this.lhs.names},this.rhs)}}class o extends a{constructor(_,L,q,Z){super(_,q,Z),this.op=L}render({_n:_}){return`${this.lhs} ${this.op}= ${this.rhs};`+_}}class l extends s{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`${this.label}:`+_}}class c extends s{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`break${this.label?` ${this.label}`:""};`+_}}class d extends s{constructor(_){super(),this.error=_}render({_n:_}){return`throw ${this.error};`+_}get names(){return this.error.names}}class h extends s{constructor(_){super(),this.code=_}render({_n:_}){return`${this.code};`+_}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(_,L){return this.code=M(this.code,_,L),this}get names(){return this.code instanceof be._CodeOrName?this.code.names:{}}}class u extends s{constructor(_=[]){super(),this.nodes=_}render(_){return this.nodes.reduce((L,q)=>L+q.render(_),"")}optimizeNodes(){const{nodes:_}=this;let L=_.length;for(;L--;){const q=_[L].optimizeNodes();Array.isArray(q)?_.splice(L,1,...q):q?_[L]=q:_.splice(L,1)}return _.length>0?this:void 0}optimizeNames(_,L){const{nodes:q}=this;let Z=q.length;for(;Z--;){const ee=q[Z];ee.optimizeNames(_,L)||(V(_,ee.names),q.splice(Z,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((_,L)=>P(_,L.names),{})}}class m extends u{render(_){return"{"+_._n+super.render(_)+"}"+_._n}}class p extends u{}class y extends m{}y.kind="else";class b extends m{constructor(_,L){super(L),this.condition=_}render(_){let L=`if(${this.condition})`+super.render(_);return this.else&&(L+="else "+this.else.render(_)),L}optimizeNodes(){super.optimizeNodes();const _=this.condition;if(_===!0)return this.nodes;let L=this.else;if(L){const q=L.optimizeNodes();L=this.else=Array.isArray(q)?new y(q):q}return L?_===!1?L instanceof b?L:L.nodes:this.nodes.length?this:new b(G(_),L instanceof b?[L]:L.nodes):_!==!1&&this.nodes.length?this:void 0}optimizeNames(_,L){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(_,L),super.optimizeNames(_,L)||this.else)return this.condition=M(this.condition,_,L),this}get names(){const _=super.names;return I(_,this.condition),this.else&&P(_,this.else.names),_}}b.kind="if";class k extends m{}k.kind="for";class O extends k{constructor(_){super(),this.iteration=_}render(_){return`for(${this.iteration})`+super.render(_)}optimizeNames(_,L){if(super.optimizeNames(_,L))return this.iteration=M(this.iteration,_,L),this}get names(){return P(super.names,this.iteration.names)}}class $ extends k{constructor(_,L,q,Z){super(),this.varKind=_,this.name=L,this.from=q,this.to=Z}render(_){const L=_.es5?Dt.varKinds.var:this.varKind,{name:q,from:Z,to:ee}=this;return`for(${L} ${q}=${Z}; ${q}<${ee}; ${q}++)`+super.render(_)}get names(){const _=I(super.names,this.from);return I(_,this.to)}}class x extends k{constructor(_,L,q,Z){super(),this.loop=_,this.varKind=L,this.name=q,this.iterable=Z}render(_){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(_)}optimizeNames(_,L){if(super.optimizeNames(_,L))return this.iterable=M(this.iterable,_,L),this}get names(){return P(super.names,this.iterable.names)}}class w extends m{constructor(_,L,q){super(),this.name=_,this.args=L,this.async=q}render(_){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(_)}}w.kind="func";class B extends u{render(_){return"return "+super.render(_)}}B.kind="return";class R extends m{render(_){let L="try"+super.render(_);return this.catch&&(L+=this.catch.render(_)),this.finally&&(L+=this.finally.render(_)),L}optimizeNodes(){var _,L;return super.optimizeNodes(),(_=this.catch)===null||_===void 0||_.optimizeNodes(),(L=this.finally)===null||L===void 0||L.optimizeNodes(),this}optimizeNames(_,L){var q,Z;return super.optimizeNames(_,L),(q=this.catch)===null||q===void 0||q.optimizeNames(_,L),(Z=this.finally)===null||Z===void 0||Z.optimizeNames(_,L),this}get names(){const _=super.names;return this.catch&&P(_,this.catch.names),this.finally&&P(_,this.finally.names),_}}class T extends m{constructor(_){super(),this.error=_}render(_){return`catch(${this.error})`+super.render(_)}}T.kind="catch";class E extends m{render(_){return"finally"+super.render(_)}}function P(D,_){for(const L in _)D[L]=(D[L]||0)+(_[L]||0);return D}function I(D,_){return _ instanceof be._CodeOrName?P(D,_.names):D}function M(D,_,L){return D instanceof be.Name?Z(D):(q=D)instanceof be._Code&&q._items.some(ee=>ee instanceof be.Name&&_[ee.str]===1&&L[ee.str]!==void 0)?new be._Code(D._items.reduce((ee,ce)=>(ce instanceof be.Name&&(ce=Z(ce)),ce instanceof be._Code?ee.push(...ce._items):ee.push(ce),ee),[])):D;var q;function Z(ee){const ce=L[ee.str];return ce===void 0||_[ee.str]!==1?ee:(delete _[ee.str],ce)}}function V(D,_){for(const L in _)D[L]=(D[L]||0)-(_[L]||0)}function G(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:be._`!${se(D)}`}E.kind="finally",e.CodeGen=class{constructor(D,_={}){this._values={},this._blockStarts=[],this._constants={},this.opts={..._,_n:_.lines?`
161
+ `;sc.displayName="RunningIcon";const Ti=S.createContext({addAlert:()=>null,removeAlert:()=>null,replaceAlert:()=>null,removeAlerts:()=>null});function xp(){return S.useContext(Ti)}function ic(t){const[e,r]=S.useState([]),[n]=S.useState(()=>{function s(l){r(c=>l?c.filter(l):[])}function i(l){r(c=>c.filter(d=>d!==l))}function a(l){Number.isInteger(l.timeout)&&(setTimeout(()=>i(l),l.timeout),delete l.timeout),r(c=>{const d=c.findIndex(h=>h===l);if(d!==-1){const h=[...c];return h[d]=l,h}else return[...c,l]})}function o(l,c){r(d=>{const h=d.findIndex(u=>u===l);if(h!==-1){Number.isInteger(c.timeout)&&(setTimeout(()=>i(c),c.timeout),delete c.timeout);const u=[...d];return u[h]=c,u}return d})}return{addAlert:a,removeAlert:i,removeAlerts:s,replaceAlert:o}});return f.jsxs(Ti.Provider,{value:n,children:[f.jsx(v.AlertGroup,{isToast:!0,isLiveRegion:!0,children:e.map((s,i)=>S.createElement(v.Alert,{...s,key:s.key??s.id??i,actionClose:f.jsx(v.AlertActionCloseButton,{onClose:()=>n.removeAlert(s)})}))}),t.children]})}function Sp(t){const{bytes:e}=t;if(!+e)return f.jsx(f.Fragment,{});const r=1024,n=t.decimals?t.decimals:0,s=n<0?0:n,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(r));return f.jsx(f.Fragment,{children:`${parseFloat((e/Math.pow(r,a)).toFixed(s))} ${i[a]}`})}function Ep(t){const[e]=pt(),r=Gr(),n=t.used/t.capacity;if(t.capacity===0)return f.jsx(f.Fragment,{});const s=n>=.8?"var(--pf-global--palette--red":n>=.5?"var(--pf-global--palette--gold":"var(--pf-global--palette--green",i=r.activeTheme==="light"?`${s}-100)`:`${s}-600)`,a=r.activeTheme==="light"?`${s}-400)`:`${s}-200)`,o=r.activeTheme==="light"?"#0002":"#fff2";return f.jsxs(v.Flex,{alignItems:{default:"alignItemsBaseline"},spaceItems:{default:"spaceItemsSm"},children:[t.capacity>0&&f.jsx(v.FlexItem,{children:f.jsx("div",{style:{width:18,height:25,background:i,marginBottom:-9,paddingTop:Math.max(0,Math.min(25,25*(t.capacity-t.used)/t.capacity)),borderRadius:2,border:`thin solid ${o}`},children:f.jsx("div",{style:{width:"100%",height:"100%",background:a,borderRadius:2}})})}),t.format?f.jsx(v.FlexItem,{children:t.format.replace("{used}",t.used.toString()).replace("{capacity}",t.capacity.toString())}):f.jsxs(v.FlexItem,{children:[t.used,` ${e.ofText} `,t.capacity]})]})}function $p(t){return t.text?f.jsx(v.ClipboardCopy,{hoverTip:"Copy",clickTip:"Copied",variant:"inline-compact",style:{display:"flex",flexWrap:"nowrap",borderRadius:4},onCopy:()=>{navigator.clipboard.writeText(t.text??"")},children:f.jsx(v.Truncate,{content:t.text,style:{minWidth:t.minWidth}})}):f.jsx(f.Fragment,{})}function _p(t){const e=S.useMemo(()=>new Date(t.start??0).valueOf(),[t.start]),r=S.useMemo(()=>new Date(t.finish??0).valueOf(),[t.finish]),[n,s]=S.useState(Math.max(0,r-e.valueOf()));S.useEffect(()=>{const d=setInterval(()=>{e&&(t.finish?s(Math.max(0,r-e)):s(Math.max(0,Date.now()-e)))},1e3);return()=>clearTimeout(d)},[e,r,t.finish]);const i=Math.floor(n/1e3),a=Math.floor(i%60),o=Math.floor(i/60%60),l=Math.floor(i/60/60%24),c=Math.floor(i/60/60/24);return e?f.jsxs(v.Split,{children:[c!==0&&f.jsxs(v.SplitItem,{children:[c,"d"," "]}),l!==0&&f.jsxs(v.SplitItem,{children:[l,"h"," "]}),o!==0&&f.jsxs(v.SplitItem,{children:[o,"m"," "]}),f.jsxs(v.SplitItem,{children:[a,"s"]})]}):f.jsx(f.Fragment,{})}function ac(t){const{disablePadding:e}=t,r=Gr(),n=r.formLayout,s=r.formColumns,i=!1;return f.jsx(v.PageSection,{variant:"light",padding:{default:"noPadding"},className:"dark-1",children:f.jsx(v.DescriptionList,{orientation:{sm:n,md:n,lg:n,xl:n,"2xl":n},columnModifier:s==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:e?void 0:24},isCompact:i,children:t.children})})}function kp(t){const{item:e,columns:r}=t;return e?f.jsx(ac,{children:r.map(n=>f.jsx(yn,{label:n.header,children:f.jsx(bt,{column:n,item:e})},n.id??n.header))}):f.jsx(f.Fragment,{})}function oc(t){const{onSelect:e,value:r}=t,n=S.useCallback((l,c)=>{var d;e(l,(d=t.options.find(h=>h.label===c.toString()))==null?void 0:d.value)},[e,t.options]),{options:s}=t;s.sort((l,c)=>(l.group??"")<(c.group??"")?-1:(l.group??"")>(c.group??"")?1:l.label<c.label?-1:l.label>c.label?1:0);const i=s.reduce((l,c)=>{const d=c.group??"";let h=l[d];return h||(h=[],l[d]=h),h.push(c),l},{}),a=Object.keys(i).length>1||Object.keys(i).length===1&&Object.keys(i)[0]!=="",o=t.options.find(l=>l.value===r);return f.jsx(mr,{...t,value:o==null?void 0:o.label,onSelect:n,isGrouped:a,children:a?Object.keys(i).map(l=>f.jsx(v.SelectGroup,{label:l,children:i[l].map(c=>f.jsx(v.SelectOption,{value:c.label,label:c.label,description:c.description,children:c.label},c.label))},l)):s.map(l=>f.jsx(v.SelectOption,{value:l.label,label:l.label,description:l.description,children:l.label},l.label))})}function lc(t){const[e,r]=S.useState(!1),{helperTextInvalid:n,...s}=t;return f.jsx(is,{...t,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextArea,{...s,id:t.id,label:void 0,"aria-describedby":t.id?`${t.id}-form-group`:void 0,validated:t.helperTextInvalid?"error":void 0}),t.type==="password"&&f.jsx(v.Button,{variant:"control",onClick:()=>r(!e),isDisabled:t.isDisabled||t.isReadOnly,children:e?f.jsx(Me.EyeIcon,{}):f.jsx(Me.EyeSlashIcon,{})})]})})}function cc(t){const[e,r]=S.useState(!1),{children:n,isReadOnly:s,placeholder:i,...a}=t,o=t.id?t.id:typeof t.label=="string"?t.label.toLowerCase().split(" ").join("-"):void 0;return f.jsx(is,{...a,id:o,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextInput,{placeholder:i,onChange:t.onChange,id:o,onBlur:t.onBlur,label:void 0,value:t.value,"aria-describedby":o?`${o}-form-group`:void 0,validated:t.helperTextInvalid?"error":void 0,type:t.type==="password"?e?"text":"password":t.type,readOnlyVariant:s?"default":void 0}),t.type==="password"&&f.jsx(v.Button,{variant:"control",onClick:()=>r(!e),isDisabled:t.isDisabled||t.isReadOnly,children:e?f.jsx(Me.EyeIcon,{}):f.jsx(Me.EyeSlashIcon,{})}),t.children]})})}var xn=t=>t.type==="checkbox",Yr=t=>t instanceof Date,Et=t=>t==null;const uc=t=>typeof t=="object";var ht=t=>!Et(t)&&!Array.isArray(t)&&uc(t)&&!Yr(t),dc=t=>ht(t)&&t.target?xn(t.target)?t.target.checked:t.target.value:t,Tp=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,fc=(t,e)=>t.has(Tp(e)),jp=t=>{const e=t.constructor&&t.constructor.prototype;return ht(e)&&e.hasOwnProperty("isPrototypeOf")},ji=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function er(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(ji&&(t instanceof Blob||t instanceof FileList))&&(r||ht(t)))if(e=r?[]:{},!Array.isArray(t)&&!jp(t))e=t;else for(const n in t)e[n]=er(t[n]);else return t;return e}var Sn=t=>Array.isArray(t)?t.filter(Boolean):[],it=t=>t===void 0,he=(t,e,r)=>{if(!e||!ht(t))return r;const n=Sn(e.split(/[,[\].]+?/)).reduce((s,i)=>Et(s)?s:s[i],t);return it(n)||n===t?it(t[e])?r:t[e]:n};const as={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},zt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},tr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hc=S.createContext(null),Ut=()=>S.useContext(hc),Op=t=>{const{children:e,...r}=t;return S.createElement(hc.Provider,{value:r},e)};var mc=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==zt.all&&(e._proxyFormState[a]=!n||zt.all),r&&(r[a]=!0),t[a]}});return s},It=t=>ht(t)&&!Object.keys(t).length,pc=(t,e,r,n)=>{r(t);const{name:s,...i}=t;return It(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!n||zt.all))},os=t=>Array.isArray(t)?t:[t],gc=(t,e,r)=>r&&e?t===e:!t||!e||t===e||os(t).some(n=>n&&(n.startsWith(e)||e.startsWith(n)));function Oi(t){const e=S.useRef(t);e.current=t,S.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}function yc(t){const e=Ut(),{control:r=e.control,disabled:n,name:s,exact:i}=t||{},[a,o]=S.useState(r._formState),l=S.useRef(!0),c=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=S.useRef(s);return d.current=s,Oi({disabled:n,next:h=>l.current&&gc(d.current,h.name,i)&&pc(h,c.current,r._updateFormState)&&o({...r._formState,...h}),subject:r._subjects.state}),S.useEffect(()=>{l.current=!0;const h=r._proxyFormState.isDirty&&r._getDirty();return h!==r._formState.isDirty&&r._subjects.state.next({isDirty:h}),c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}},[r]),mc(a,r,c.current,!1)}var Gt=t=>typeof t=="string",vc=(t,e,r,n,s)=>Gt(t)?(n&&e.watch.add(t),he(r,t,s)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),he(r,i))):(n&&(e.watchAll=!0),r);function Pp(t){const e=Ut(),{control:r=e.control,name:n,defaultValue:s,disabled:i,exact:a}=t||{},o=S.useRef(n);o.current=n,Oi({disabled:i,subject:r._subjects.values,next:d=>{gc(o.current,d.name,a)&&c(er(vc(o.current,r._names,d.values||r._formValues,!1,s)))}});const[l,c]=S.useState(r._getWatch(n,s));return S.useEffect(()=>r._removeUnmounted()),l}var Pi=t=>/^\w*$/.test(t),bc=t=>Sn(t.replace(/["|']|\]/g,"").split(/\.|\[/));function Je(t,e,r){let n=-1;const s=Pi(e)?[e]:bc(e),i=s.length,a=i-1;for(;++n<i;){const o=s[n];let l=r;if(n!==a){const c=t[o];l=ht(c)||Array.isArray(c)?c:isNaN(+s[n+1])?{}:[]}t[o]=l,t=t[o]}return t}function wc(t){const e=Ut(),{name:r,control:n=e.control,shouldUnregister:s}=t,i=fc(n._names.array,r),a=Pp({control:n,name:r,defaultValue:he(n._formValues,r,he(n._defaultValues,r,t.defaultValue)),exact:!0}),o=yc({control:n,name:r}),l=S.useRef(n.register(r,{...t.rules,value:a}));return S.useEffect(()=>{const c=n._options.shouldUnregister||s,d=(h,u)=>{const m=he(n._fields,h);m&&(m._f.mount=u)};if(d(r,!0),c){const h=er(he(n._options.defaultValues,r));Je(n._defaultValues,r,h),it(he(n._formValues,r))&&Je(n._formValues,r,h)}return()=>{(i?c&&!n._state.action:c)?n.unregister(r):d(r,!1)}},[r,n,i,s]),{field:{name:r,value:a,onChange:S.useCallback(c=>l.current.onChange({target:{value:dc(c),name:r},type:as.CHANGE}),[r]),onBlur:S.useCallback(()=>l.current.onBlur({target:{value:he(n._formValues,r),name:r},type:as.BLUR}),[r,n]),ref:c=>{const d=he(n._fields,r);d&&c&&(d._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:h=>c.setCustomValidity(h),reportValidity:()=>c.reportValidity()})}},formState:o,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(o.errors,r)},isDirty:{enumerable:!0,get:()=>!!he(o.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!he(o.touchedFields,r)},error:{enumerable:!0,get:()=>he(o.errors,r)}})}}const Tr=t=>t.render(wc(t));var xc=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{};const Ci=(t,e,r)=>{for(const n of r||Object.keys(t)){const s=he(t,n);if(s){const{_f:i,...a}=s;if(i&&e(i.name)){if(i.ref.focus){i.ref.focus();break}else if(i.refs&&i.refs[0].focus){i.refs[0].focus();break}}else ht(a)&&Ci(a,e)}}};var Sc=t=>({isOnSubmit:!t||t===zt.onSubmit,isOnBlur:t===zt.onBlur,isOnChange:t===zt.onChange,isOnAll:t===zt.all,isOnTouch:t===zt.onTouched}),Ec=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length)))),Cp=(t,e,r)=>{const n=Sn(he(t,r));return Je(n,"root",e[r]),Je(t,r,n),t},Zr=t=>typeof t=="boolean",Ni=t=>t.type==="file",pr=t=>typeof t=="function",ls=t=>{if(!ji)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},cs=t=>Gt(t),Ii=t=>t.type==="radio",us=t=>t instanceof RegExp;const $c={value:!1,isValid:!1},_c={value:!0,isValid:!0};var kc=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!it(t[0].attributes.value)?it(t[0].value)||t[0].value===""?_c:{value:t[0].value,isValid:!0}:_c:$c}return $c};const Tc={isValid:!1,value:null};var jc=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Tc):Tc;function Oc(t,e,r="validate"){if(cs(t)||Array.isArray(t)&&t.every(cs)||Zr(t)&&!t)return{type:r,message:cs(t)?t:"",ref:e}}var Kr=t=>ht(t)&&!us(t)?t:{value:t,message:""},Pc=async(t,e,r,n,s)=>{const{ref:i,refs:a,required:o,maxLength:l,minLength:c,min:d,max:h,pattern:u,validate:m,name:p,valueAsNumber:y,mount:b,disabled:k}=t._f,O=he(e,p);if(!b||k)return{};const $=a?a[0]:i,x=M=>{n&&$.reportValidity&&($.setCustomValidity(Zr(M)?"":M||""),$.reportValidity())},w={},B=Ii(i),R=xn(i),T=B||R,E=(y||Ni(i))&&it(i.value)&&it(O)||ls(i)&&i.value===""||O===""||Array.isArray(O)&&!O.length,P=xc.bind(null,p,r,w),I=(M,V,G,K=tr.maxLength,J=tr.minLength)=>{const re=M?V:G;w[p]={type:M?K:J,message:re,ref:i,...P(M?K:J,re)}};if(s?!Array.isArray(O)||!O.length:o&&(!T&&(E||Et(O))||Zr(O)&&!O||R&&!kc(a).isValid||B&&!jc(a).isValid)){const{value:M,message:V}=cs(o)?{value:!!o,message:o}:Kr(o);if(M&&(w[p]={type:tr.required,message:V,ref:$,...P(tr.required,V)},!r))return x(V),w}if(!E&&(!Et(d)||!Et(h))){let M,V;const G=Kr(h),K=Kr(d);if(!Et(O)&&!isNaN(O)){const J=i.valueAsNumber||O&&+O;Et(G.value)||(M=J>G.value),Et(K.value)||(V=J<K.value)}else{const J=i.valueAsDate||new Date(O),re=_=>new Date(new Date().toDateString()+" "+_),se=i.type=="time",D=i.type=="week";Gt(G.value)&&O&&(M=se?re(O)>re(G.value):D?O>G.value:J>new Date(G.value)),Gt(K.value)&&O&&(V=se?re(O)<re(K.value):D?O<K.value:J<new Date(K.value))}if((M||V)&&(I(!!M,G.message,K.message,tr.max,tr.min),!r))return x(w[p].message),w}if((l||c)&&!E&&(Gt(O)||s&&Array.isArray(O))){const M=Kr(l),V=Kr(c),G=!Et(M.value)&&O.length>+M.value,K=!Et(V.value)&&O.length<+V.value;if((G||K)&&(I(G,M.message,V.message),!r))return x(w[p].message),w}if(u&&!E&&Gt(O)){const{value:M,message:V}=Kr(u);if(us(M)&&!O.match(M)&&(w[p]={type:tr.pattern,message:V,ref:i,...P(tr.pattern,V)},!r))return x(V),w}if(m){if(pr(m)){const M=await m(O,e),V=Oc(M,$);if(V&&(w[p]={...V,...P(tr.validate,V.message)},!r))return x(V.message),w}else if(ht(m)){let M={};for(const V in m){if(!It(M)&&!r)break;const G=Oc(await m[V](O,e),$,V);G&&(M={...G,...P(V,G.message)},x(G.message),r&&(w[p]=M))}if(!It(M)&&(w[p]={ref:$,...M},!r))return w}}return x(!0),w};function Np(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=it(t)?n++:t[e[n++]];return t}function Ip(t){for(const e in t)if(!it(t[e]))return!1;return!0}function gt(t,e){const r=Array.isArray(e)?e:Pi(e)?[e]:bc(e),n=r.length===1?t:Np(t,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(ht(n)&&It(n)||Array.isArray(n)&&Ip(n))&&gt(t,r.slice(0,-1)),t}function Di(){let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}}var ds=t=>Et(t)||!uc(t);function jr(t,e){if(ds(t)||ds(e))return t===e;if(Yr(t)&&Yr(e))return t.getTime()===e.getTime();const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const s of r){const i=t[s];if(!n.includes(s))return!1;if(s!=="ref"){const a=e[s];if(Yr(i)&&Yr(a)||ht(i)&&ht(a)||Array.isArray(i)&&Array.isArray(a)?!jr(i,a):i!==a)return!1}}return!0}var Cc=t=>t.type==="select-multiple",Dp=t=>Ii(t)||xn(t),Ai=t=>ls(t)&&t.isConnected,Nc=t=>{for(const e in t)if(pr(t[e]))return!0;return!1};function fs(t,e={}){const r=Array.isArray(t);if(ht(t)||r)for(const n in t)Array.isArray(t[n])||ht(t[n])&&!Nc(t[n])?(e[n]=Array.isArray(t[n])?[]:{},fs(t[n],e[n])):Et(t[n])||(e[n]=!0);return e}function Ic(t,e,r){const n=Array.isArray(t);if(ht(t)||n)for(const s in t)Array.isArray(t[s])||ht(t[s])&&!Nc(t[s])?it(e)||ds(r[s])?r[s]=Array.isArray(t[s])?fs(t[s],[]):{...fs(t[s])}:Ic(t[s],Et(e)?{}:e[s],r[s]):r[s]=!jr(t[s],e[s]);return r}var Fi=(t,e)=>Ic(t,e,fs(e)),Dc=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>it(t)?t:e?t===""?NaN:t&&+t:r&&Gt(t)?new Date(t):n?n(t):t;function Mi(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return Ni(e)?e.files:Ii(e)?jc(t.refs).value:Cc(e)?[...e.selectedOptions].map(({value:r})=>r):xn(e)?kc(t.refs).value:Dc(it(e.value)?t.ref.value:e.value,t)}var Ap=(t,e,r,n)=>{const s={};for(const i of t){const a=he(e,i);a&&Je(s,i,a._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},En=t=>it(t)?t:us(t)?t.source:ht(t)?us(t.value)?t.value.source:t.value:t,Fp=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function Ac(t,e,r){const n=he(t,r);if(n||Pi(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),a=he(e,i),o=he(t,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(o&&o.type)return{name:i,error:o};s.pop()}return{name:r}}var Mp=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,Vp=(t,e)=>!Sn(he(t,e)).length&&gt(t,e);const Lp={mode:zt.onSubmit,reValidateMode:zt.onChange,shouldFocusError:!0};function Rp(t={},e){let r={...Lp,...t},n={submitCount:0,isDirty:!1,isLoading:pr(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},s={},i=ht(r.defaultValues)||ht(r.values)?er(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:er(i),o={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:Di(),array:Di(),state:Di()},m=t.resetOptions&&t.resetOptions.keepDirtyValues,p=Sc(r.mode),y=Sc(r.reValidateMode),b=r.criteriaMode===zt.all,k=C=>U=>{clearTimeout(d),d=setTimeout(C,U)},O=async C=>{if(h.isValid||C){const U=r.resolver?It((await E()).errors):await I(s,!0);U!==n.isValid&&u.state.next({isValid:U})}},$=C=>h.isValidating&&u.state.next({isValidating:C}),x=(C,U=[],W,le,oe=!0,Q=!0)=>{if(le&&W){if(o.action=!0,Q&&Array.isArray(he(s,C))){const ge=W(he(s,C),le.argA,le.argB);oe&&Je(s,C,ge)}if(Q&&Array.isArray(he(n.errors,C))){const ge=W(he(n.errors,C),le.argA,le.argB);oe&&Je(n.errors,C,ge),Vp(n.errors,C)}if(h.touchedFields&&Q&&Array.isArray(he(n.touchedFields,C))){const ge=W(he(n.touchedFields,C),le.argA,le.argB);oe&&Je(n.touchedFields,C,ge)}h.dirtyFields&&(n.dirtyFields=Fi(i,a)),u.state.next({name:C,isDirty:V(C,U),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Je(a,C,U)},w=(C,U)=>{Je(n.errors,C,U),u.state.next({errors:n.errors})},B=(C,U,W,le)=>{const oe=he(s,C);if(oe){const Q=he(a,C,it(W)?he(i,C):W);it(Q)||le&&le.defaultChecked||U?Je(a,C,U?Q:Mi(oe._f)):J(C,Q),o.mount&&O()}},R=(C,U,W,le,oe)=>{let Q=!1,ge=!1;const Ae={name:C};if(!W||le){h.isDirty&&(ge=n.isDirty,n.isDirty=Ae.isDirty=V(),Q=ge!==Ae.isDirty);const Oe=jr(he(i,C),U);ge=he(n.dirtyFields,C),Oe?gt(n.dirtyFields,C):Je(n.dirtyFields,C,!0),Ae.dirtyFields=n.dirtyFields,Q=Q||h.dirtyFields&&ge!==!Oe}if(W){const Oe=he(n.touchedFields,C);Oe||(Je(n.touchedFields,C,W),Ae.touchedFields=n.touchedFields,Q=Q||h.touchedFields&&Oe!==W)}return Q&&oe&&u.state.next(Ae),Q?Ae:{}},T=(C,U,W,le)=>{const oe=he(n.errors,C),Q=h.isValid&&Zr(U)&&n.isValid!==U;if(t.delayError&&W?(c=k(()=>w(C,W)),c(t.delayError)):(clearTimeout(d),c=null,W?Je(n.errors,C,W):gt(n.errors,C)),(W?!jr(oe,W):oe)||!It(le)||Q){const ge={...le,...Q&&Zr(U)?{isValid:U}:{},errors:n.errors,name:C};n={...n,...ge},u.state.next(ge)}$(!1)},E=async C=>r.resolver(a,r.context,Ap(C||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation)),P=async C=>{const{errors:U}=await E();if(C)for(const W of C){const le=he(U,W);le?Je(n.errors,W,le):gt(n.errors,W)}else n.errors=U;return U},I=async(C,U,W={valid:!0})=>{for(const le in C){const oe=C[le];if(oe){const{_f:Q,...ge}=oe;if(Q){const Ae=l.array.has(Q.name),Oe=await Pc(oe,a,b,r.shouldUseNativeValidation&&!U,Ae);if(Oe[Q.name]&&(W.valid=!1,U))break;!U&&(he(Oe,Q.name)?Ae?Cp(n.errors,Oe,Q.name):Je(n.errors,Q.name,Oe[Q.name]):gt(n.errors,Q.name))}ge&&await I(ge,U,W)}}return W.valid},M=()=>{for(const C of l.unMount){const U=he(s,C);U&&(U._f.refs?U._f.refs.every(W=>!Ai(W)):!Ai(U._f.ref))&&z(C)}l.unMount=new Set},V=(C,U)=>(C&&U&&Je(a,C,U),!jr(L(),i)),G=(C,U,W)=>vc(C,l,{...o.mount?a:it(U)?i:Gt(C)?{[C]:U}:U},W,U),K=C=>Sn(he(o.mount?a:i,C,t.shouldUnregister?he(i,C,[]):[])),J=(C,U,W={})=>{const le=he(s,C);let oe=U;if(le){const Q=le._f;Q&&(!Q.disabled&&Je(a,C,Dc(U,Q)),oe=ls(Q.ref)&&Et(U)?"":U,Cc(Q.ref)?[...Q.ref.options].forEach(ge=>ge.selected=oe.includes(ge.value)):Q.refs?xn(Q.ref)?Q.refs.length>1?Q.refs.forEach(ge=>(!ge.defaultChecked||!ge.disabled)&&(ge.checked=Array.isArray(oe)?!!oe.find(Ae=>Ae===ge.value):oe===ge.value)):Q.refs[0]&&(Q.refs[0].checked=!!oe):Q.refs.forEach(ge=>ge.checked=ge.value===oe):Ni(Q.ref)?Q.ref.value="":(Q.ref.value=oe,Q.ref.type||u.values.next({name:C,values:{...a}})))}(W.shouldDirty||W.shouldTouch)&&R(C,oe,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&_(C)},re=(C,U,W)=>{for(const le in U){const oe=U[le],Q=`${C}.${le}`,ge=he(s,Q);(l.array.has(C)||!ds(oe)||ge&&!ge._f)&&!Yr(oe)?re(Q,oe,W):J(Q,oe,W)}},se=(C,U,W={})=>{const le=he(s,C),oe=l.array.has(C),Q=er(U);Je(a,C,Q),oe?(u.array.next({name:C,values:{...a}}),(h.isDirty||h.dirtyFields)&&W.shouldDirty&&u.state.next({name:C,dirtyFields:Fi(i,a),isDirty:V(C,Q)})):le&&!le._f&&!Et(Q)?re(C,Q,W):J(C,Q,W),Ec(C,l)&&u.state.next({...n}),u.values.next({name:C,values:{...a}}),!o.mount&&e()},D=async C=>{const U=C.target;let W=U.name,le=!0;const oe=he(s,W),Q=()=>U.type?Mi(oe._f):dc(C);if(oe){let ge,Ae;const Oe=Q(),ye=C.type===as.BLUR||C.type===as.FOCUS_OUT,Ke=!Fp(oe._f)&&!r.resolver&&!he(n.errors,W)&&!oe._f.deps||Mp(ye,he(n.touchedFields,W),n.isSubmitted,y,p),Ot=Ec(W,l,ye);Je(a,W,Oe),ye?(oe._f.onBlur&&oe._f.onBlur(C),c&&c(0)):oe._f.onChange&&oe._f.onChange(C);const $t=R(W,Oe,ye,!1),_t=!It($t)||Ot;if(!ye&&u.values.next({name:W,type:C.type,values:{...a}}),Ke)return h.isValid&&O(),_t&&u.state.next({name:W,...Ot?{}:$t});if(!ye&&Ot&&u.state.next({...n}),$(!0),r.resolver){const{errors:j}=await E([W]),F=Ac(n.errors,s,W),A=Ac(j,s,F.name||W);ge=A.error,W=A.name,Ae=It(j)}else ge=(await Pc(oe,a,b,r.shouldUseNativeValidation))[W],le=isNaN(Oe)||Oe===he(a,W,Oe),le&&(ge?Ae=!1:h.isValid&&(Ae=await I(s,!0)));le&&(oe._f.deps&&_(oe._f.deps),T(W,Ae,ge,$t))}},_=async(C,U={})=>{let W,le;const oe=os(C);if($(!0),r.resolver){const Q=await P(it(C)?C:oe);W=It(Q),le=C?!oe.some(ge=>he(Q,ge)):W}else C?(le=(await Promise.all(oe.map(async Q=>{const ge=he(s,Q);return await I(ge&&ge._f?{[Q]:ge}:ge)}))).every(Boolean),!(!le&&!n.isValid)&&O()):le=W=await I(s);return u.state.next({...!Gt(C)||h.isValid&&W!==n.isValid?{}:{name:C},...r.resolver||!C?{isValid:W}:{},errors:n.errors,isValidating:!1}),U.shouldFocus&&!le&&Ci(s,Q=>Q&&he(n.errors,Q),C?oe:l.mount),le},L=C=>{const U={...i,...o.mount?a:{}};return it(C)?U:Gt(C)?he(U,C):C.map(W=>he(U,W))},q=(C,U)=>({invalid:!!he((U||n).errors,C),isDirty:!!he((U||n).dirtyFields,C),isTouched:!!he((U||n).touchedFields,C),error:he((U||n).errors,C)}),Z=C=>{C&&os(C).forEach(U=>gt(n.errors,U)),u.state.next({errors:C?n.errors:{}})},ee=(C,U,W)=>{const le=(he(s,C,{_f:{}})._f||{}).ref;Je(n.errors,C,{...U,ref:le}),u.state.next({name:C,errors:n.errors,isValid:!1}),W&&W.shouldFocus&&le&&le.focus&&le.focus()},ce=(C,U)=>pr(C)?u.values.subscribe({next:W=>C(G(void 0,U),W)}):G(C,U,!0),z=(C,U={})=>{for(const W of C?os(C):l.mount)l.mount.delete(W),l.array.delete(W),U.keepValue||(gt(s,W),gt(a,W)),!U.keepError&&gt(n.errors,W),!U.keepDirty&&gt(n.dirtyFields,W),!U.keepTouched&&gt(n.touchedFields,W),!r.shouldUnregister&&!U.keepDefaultValue&&gt(i,W);u.values.next({values:{...a}}),u.state.next({...n,...U.keepDirty?{isDirty:V()}:{}}),!U.keepIsValid&&O()},ve=(C,U={})=>{let W=he(s,C);const le=Zr(U.disabled);return Je(s,C,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:C}},name:C,mount:!0,...U}}),l.mount.add(C),W?le&&Je(a,C,U.disabled?void 0:he(a,C,Mi(W._f))):B(C,!0,U.value),{...le?{disabled:U.disabled}:{},...r.shouldUseNativeValidation?{required:!!U.required,min:En(U.min),max:En(U.max),minLength:En(U.minLength),maxLength:En(U.maxLength),pattern:En(U.pattern)}:{},name:C,onChange:D,onBlur:D,ref:oe=>{if(oe){ve(C,U),W=he(s,C);const Q=it(oe.value)&&oe.querySelectorAll&&oe.querySelectorAll("input,select,textarea")[0]||oe,ge=Dp(Q),Ae=W._f.refs||[];if(ge?Ae.find(Oe=>Oe===Q):Q===W._f.ref)return;Je(s,C,{_f:{...W._f,...ge?{refs:[...Ae.filter(Ai),Q,...Array.isArray(he(i,C))?[{}]:[]],ref:{type:Q.type,name:C}}:{ref:Q}}}),B(C,!1,void 0,Q)}else W=he(s,C,{}),W._f&&(W._f.mount=!1),(r.shouldUnregister||U.shouldUnregister)&&!(fc(l.array,C)&&o.action)&&l.unMount.add(C)}}},ie=()=>r.shouldFocusError&&Ci(s,C=>C&&he(n.errors,C),l.mount),Pe=(C,U)=>async W=>{W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let le=er(a);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:oe,values:Q}=await E();n.errors=oe,le=Q}else await I(s);gt(n.errors,"root"),It(n.errors)?(u.state.next({errors:{}}),await C(le,W)):(U&&await U({...n.errors},W),ie(),setTimeout(ie)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:It(n.errors),submitCount:n.submitCount+1,errors:n.errors})},$e=(C,U={})=>{he(s,C)&&(it(U.defaultValue)?se(C,he(i,C)):(se(C,U.defaultValue),Je(i,C,U.defaultValue)),U.keepTouched||gt(n.touchedFields,C),U.keepDirty||(gt(n.dirtyFields,C),n.isDirty=U.defaultValue?V(C,he(i,C)):V()),U.keepError||(gt(n.errors,C),h.isValid&&O()),u.state.next({...n}))},Se=(C,U={})=>{const W=C||i,le=er(W),oe=C&&!It(C)?le:i;if(U.keepDefaultValues||(i=W),!U.keepValues){if(U.keepDirtyValues||m)for(const Q of l.mount)he(n.dirtyFields,Q)?Je(oe,Q,he(a,Q)):se(Q,he(oe,Q));else{if(ji&&it(C))for(const Q of l.mount){const ge=he(s,Q);if(ge&&ge._f){const Ae=Array.isArray(ge._f.refs)?ge._f.refs[0]:ge._f.ref;if(ls(Ae)){const Oe=Ae.closest("form");if(Oe){Oe.reset();break}}}}s={}}a=t.shouldUnregister?U.keepDefaultValues?er(i):{}:le,u.array.next({values:{...oe}}),u.values.next({values:{...oe}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!o.mount&&e(),o.mount=!h.isValid||!!U.keepIsValid,o.watch=!!t.shouldUnregister,u.state.next({submitCount:U.keepSubmitCount?n.submitCount:0,isDirty:U.keepDirty?n.isDirty:!!(U.keepDefaultValues&&!jr(C,i)),isSubmitted:U.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U.keepDirtyValues?n.dirtyFields:U.keepDefaultValues&&C?Fi(i,C):{},touchedFields:U.keepTouched?n.touchedFields:{},errors:U.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},X=(C,U)=>Se(pr(C)?C(a):C,U),Be=(C,U={})=>{const W=he(s,C),le=W&&W._f;if(le){const oe=le.refs?le.refs[0]:le.ref;oe.focus&&(oe.focus(),U.shouldSelect&&oe.select())}},Ve=C=>{n={...n,...C}};return pr(r.defaultValues)&&r.defaultValues().then(C=>{X(C,r.resetOptions),u.state.next({isLoading:!1})}),{control:{register:ve,unregister:z,getFieldState:q,_executeSchema:E,_getWatch:G,_getDirty:V,_updateValid:O,_removeUnmounted:M,_updateFieldArray:x,_getFieldArray:K,_reset:Se,_updateFormState:Ve,_subjects:u,_proxyFormState:h,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(C){o=C},get _defaultValues(){return i},get _names(){return l},set _names(C){l=C},get _formState(){return n},set _formState(C){n=C},get _options(){return r},set _options(C){r={...r,...C}}},trigger:_,register:ve,handleSubmit:Pe,watch:ce,setValue:se,getValues:L,reset:X,resetField:$e,clearErrors:Z,unregister:z,setError:ee,setFocus:Be,getFieldState:q}}function Bp(t={}){const e=S.useRef(),[r,n]=S.useState({isDirty:!1,isValidating:!1,isLoading:pr(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:pr(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Rp(t,()=>n(i=>({...i}))),formState:r});const s=e.current.control;return s._options=t,Oi({subject:s._subjects.state,next:i=>{pc(i,s._proxyFormState,s._updateFormState,!0)&&n({...s._formState})}}),S.useEffect(()=>{t.values&&!jr(t.values,s._defaultValues)&&s._reset(t.values,s._options.resetOptions)},[t.values,s]),S.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),e.current.formState=mc(r,s),e.current}function zp(t){const{name:e,readOnly:r,validate:n,...s}=t,{control:i,formState:{isSubmitting:a}}=Ut();return f.jsx(Tr,{name:e,control:i,shouldUnregister:!0,render:({field:{onChange:o,value:l}})=>f.jsx(v.Checkbox,{...s,id:t.id??e.split(".").join("-"),isChecked:!!l,onChange:o,readOnly:r||a,minLength:void 0,maxLength:void 0,ref:void 0}),rules:{validate:n}})}function gr(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Up(t){const{isReadOnly:e,validate:r,...n}=t,{label:s,name:i,isRequired:a}=t,{control:o,formState:{isSubmitting:l,isValidating:c}}=Ut(),d=t.id??i.split(".").join("-");return f.jsx(Tr,{name:i,control:o,shouldUnregister:!0,render:({field:{onChange:h,value:u},fieldState:{error:m}})=>f.jsx(is,{...n,id:d,helperTextInvalid:!(r&&c)&&(m==null?void 0:m.message),children:f.jsx(Fc,{id:d,value:u,onChange:h,isReadOnly:e||l,invalid:!(r&&c)&&(m==null?void 0:m.message)!==void 0})}),rules:{required:typeof s=="string"&&a===!0?{value:!0,message:`${gr(s.toLocaleLowerCase())} is required.`}:void 0,validate:t.validate}})}function Fc(t){const{onChange:e}=t,r=S.useRef(null),n=S.useRef({}),s=Gr();return S.useEffect(()=>{var a;let i;return bs.editor.defineTheme("my-dark",{base:"vs-dark",inherit:!0,colors:{"editor.background":"#00000000","minimap.background":"#00000000","scrollbarSlider.background":"#FFFFFF22"},rules:[{token:"",background:"#222222"}]}),bs.editor.defineTheme("my-light",{base:"vs",inherit:!0,colors:{"editor.background":"#FFFFFF00","minimap.background":"#FFFFFF00","scrollbarSlider.background":"#FFFFFF22"},rules:[]}),r.current&&(i=bs.editor.create(r.current,{language:"yaml",lineNumbers:"off",theme:"my-dark",lineDecorationsWidth:8,padding:{top:6,bottom:8},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0}),n.current.editor=i,(a=i.getModel())==null||a.onDidChangeContent(()=>{e==null||e(i.getValue()??"")})),()=>{i.dispose()}},[e]),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.getValue()!==t.value&&n.current.editor.setValue(t.value??"")},[t.value]),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.updateOptions({readOnly:t.isReadOnly})},[t.isReadOnly]),Cn(r,()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.layout()}),S.useEffect(()=>{var i;(i=n.current)!=null&&i.editor&&n.current.editor.updateOptions({theme:s.activeTheme==="dark"?"my-dark":"my-light"})},[s.activeTheme]),f.jsx("div",{className:"pf-c-form-control",style:{padding:0,height:400},"aria-invalid":t.invalid?"true":void 0,children:f.jsx("div",{id:t.id,ref:r,style:{height:"100%"}})})}function Wp(t){const{control:e,formState:{isSubmitting:r}}=Ut();return f.jsx(Tr,{name:t.name,control:e,shouldUnregister:!0,render:({field:{onChange:n,value:s},fieldState:{error:i}})=>f.jsx(mr,{...t,value:s,onSelect:(a,o)=>n(o),helperTextInvalid:i==null?void 0:i.message,isReadOnly:t.isReadOnly||r})})}function qp(t){const{label:e,isRequired:r,validate:n}=t,{control:s,formState:{isSubmitting:i}}=Ut();return f.jsx(Tr,{name:t.name,control:s,shouldUnregister:!0,render:({field:{onChange:a,value:o},fieldState:{error:l}})=>(o===""&&t.options.length===1&&r&&a(t.options[0].value),f.jsx(oc,{...t,id:t.id??t.name,value:o,onSelect:(c,d)=>a(d),helperTextInvalid:l==null?void 0:l.message,isReadOnly:t.isReadOnly||i})),rules:{required:typeof e=="string"&&r===!0?{value:!0,message:`${gr(e.toLocaleLowerCase())} is required.`}:void 0,validate:n}})}function Hp(t){const{name:e,id:r,helperText:n,validate:s,additionalControls:i,formLabel:a,labelHelp:o,labelHelpTitle:l,...c}=t,{control:d,formState:{isSubmitting:h,isValidating:u}}=Ut();return f.jsx(Tr,{name:e,control:d,shouldUnregister:!0,render:({field:{onChange:m,value:p},fieldState:{error:y}})=>f.jsx(v.FormGroup,{helperTextInvalid:!(s&&u)&&(y==null?void 0:y.message),fieldId:r,label:a,helperText:n,validated:y!=null&&y.message?"error":void 0,labelInfo:i,labelIcon:o?f.jsx(Si,{title:l,help:o}):void 0,children:f.jsx(v.Switch,{...c,isChecked:p,onChange:b=>m(b),isDisabled:h})})})}function Gp(t){const{name:e,label:r,isReadOnly:n,isRequired:s,minLength:i,maxLength:a,pattern:o,validate:l}=t,{control:c,formState:{isSubmitting:d}}=Ut();return f.jsx(Tr,{name:e,control:c,shouldUnregister:!0,render:({field:{onChange:h,value:u},fieldState:{error:m}})=>f.jsx(lc,{...t,id:t.id??e,value:u,onChange:h,helperTextInvalid:m==null?void 0:m.message,isReadOnly:n||d,minLength:void 0,maxLength:void 0}),rules:{required:typeof r=="string"&&s===!0?{value:!0,message:`${gr(r.toLocaleLowerCase())} is required.`}:void 0,minLength:typeof r=="string"&&typeof i=="number"?{value:i,message:`${gr(r.toLocaleLowerCase())} must be at least ${i} characters.`}:i,maxLength:typeof r=="string"&&typeof a=="number"?{value:a,message:`${gr(r.toLocaleLowerCase())} cannot be greater than ${a} characters.`}:a,pattern:o,validate:l}})}function Yp(t){const{name:e,isReadOnly:r,isRequired:n,minLength:s,maxLength:i,pattern:a,validate:o,selectTitle:l,button:c,id:d,selectOpen:h,selectValue:u,...m}=t,{label:p}=t,{control:y,setValue:b,trigger:k,formState:{isSubmitting:O,isValidating:$}}=Ut(),[x]=pt();return f.jsx(Tr,{name:e,control:y,shouldUnregister:!0,render:({field:{onChange:w,value:B,name:R},fieldState:{error:T}})=>f.jsx(cc,{...m,onBlur:()=>k(R),isRequired:n,id:d??R.split(".").join("-"),value:B,onChange:w,helperTextInvalid:T!=null&&T.message?o&&$?x.validating:T==null?void 0:T.message:void 0,isReadOnly:r||O,minLength:void 0,maxLength:void 0,children:l&&f.jsx(v.Button,{ouiaId:`lookup-${R}-button`,variant:"control",onClick:()=>h==null?void 0:h(E=>{if(u){const P=u(E);b(R,P,{shouldValidate:!0})}},l),"aria-label":"Options menu",isDisabled:O,children:f.jsx(Me.SearchIcon,{})})}),rules:{required:typeof p=="string"&&n===!0?{value:!0,message:`${gr(p.toLocaleLowerCase())} is required.`}:void 0,minLength:typeof p=="string"&&typeof s=="number"?{value:s,message:`${gr(p.toLocaleLowerCase())} must be at least ${s} characters.`}:s,maxLength:typeof p=="string"&&typeof i=="number"?{value:i,message:`${gr(p.toLocaleLowerCase())} cannot be greater than ${i} characters.`}:i,pattern:a,validate:o}})}function Zp(t){const{register:e,setValue:r,formState:{isSubmitting:n}}=Ut(),s=e(t.name),{fieldState:i}=wc({name:t.name}),a=i.error;let o=t.id??t.name;return o=o.split(".").join("-"),f.jsx(S.Fragment,{children:f.jsx(v.FormGroup,{id:`${o}-form-group`,fieldId:o,label:t.label,helperText:t.helperText,isRequired:t.required,validated:a!=null&&a.message?"error":void 0,helperTextInvalid:a==null?void 0:a.message,children:f.jsxs(v.InputGroup,{children:[f.jsx(v.TextInput,{id:o,type:t.secret?"password":"text","aria-describedby":`${o}-form-group`,isRequired:t.required,validated:a!=null&&a.message?"error":void 0,autoFocus:t.autoFocus,placeholder:t.placeholder,...s,onChange:(l,c)=>void s.onChange(c),isReadOnly:n}),f.jsx(v.Button,{variant:"control",onClick:()=>{var l;return(l=t.selectOpen)==null?void 0:l.call(t,c=>{if(t.selectValue){const d=t.selectValue(c);r(t.name,d,{shouldValidate:!0})}},t.selectTitle)},"aria-label":"Options menu",isDisabled:n,children:f.jsx(Me.SearchIcon,{})})]})})})}var Mc=function(t,e,r){if(t&&"reportValidity"in t){var n=he(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Vc=function(t,e){var r=function(s){var i=e.fields[s];i&&i.ref&&"reportValidity"in i.ref?Mc(i.ref,s,t):i.refs&&i.refs.forEach(function(a){return Mc(a,s,t)})};for(var n in e.fields)r(n)},Kp=function(t,e){e.shouldUseNativeValidation&&Vc(t,e);var r={};for(var n in t){var s=he(e.fields,n);Je(r,n,Object.assign(t[n],{ref:s&&s.ref}))}return r};function Lc(){return(Lc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Rc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xe(t){var e={exports:{}};return t(e,e.exports),e.exports}var be=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class r{}e._CodeOrName=r,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(u){if(super(),!e.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class s extends r{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((m,p)=>`${m}${p}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((m,p)=>(p instanceof n&&(m[p.str]=(m[p.str]||0)+1),m),{})}}function i(h,...u){const m=[h[0]];let p=0;for(;p<u.length;)l(m,u[p]),m.push(h[++p]);return new s(m)}e._Code=s,e.nil=new s(""),e._=i;const a=new s("+");function o(h,...u){const m=[d(h[0])];let p=0;for(;p<u.length;)m.push(a),l(m,u[p]),m.push(a,d(h[++p]));return function(y){let b=1;for(;b<y.length-1;){if(y[b]===a){const k=c(y[b-1],y[b+1]);if(k!==void 0){y.splice(b-1,3,k);continue}y[b++]="+"}b++}}(m),new s(m)}function l(h,u){var m;u instanceof s?h.push(...u._items):h.push(u instanceof n?u:typeof(m=u)=="number"||typeof m=="boolean"||m===null?m:d(Array.isArray(m)?m.join(","):m))}function c(h,u){return u==='""'?h:h==='""'?u:typeof h=="string"?u instanceof n||h[h.length-1]!=='"'?void 0:typeof u!="string"?`${h.slice(0,-1)}${u}"`:u[0]==='"'?h.slice(0,-1)+u.slice(1):void 0:typeof u!="string"||u[0]!=='"'||h instanceof n?void 0:`"${h}${u.slice(1)}`}function d(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=o,e.addCodeArg=l,e.strConcat=function(h,u){return u.emptyStr()?h:h.emptyStr()?u:o`${h}${u}`},e.stringify=function(h){return new s(d(h))},e.safeStringify=d,e.getProperty=function(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new s(`.${h}`):i`[${h}]`},e.getEsmExportName=function(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new s(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)},e.regexpCode=function(h){return new s(h.toString())}}),Dt=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new be.Name("const"),let:new be.Name("let"),var:new be.Name("var")};class s{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof be.Name?l:this.name(l)}name(l){return new be.Name(this._newName(l))}_newName(l){return`${l}${(this._names[l]||this._nameGroup(l)).index++}`}_nameGroup(l){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class i extends be.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:d}){this.value=l,this.scopePath=be._`.${new be.Name(c)}[${d}]`}}e.ValueScopeName=i;const a=be._`\n`;e.ValueScope=class extends s{constructor(o){super(o),this._values={},this._scope=o.scope,this.opts={...o,_n:o.lines?a:be.nil}}get(){return this._scope}name(o){return new i(o,this._newName(o))}value(o,l){var c;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(o),{prefix:h}=d,u=(c=l.key)!==null&&c!==void 0?c:l.ref;let m=this._values[h];if(m){const b=m.get(u);if(b)return b}else m=this._values[h]=new Map;m.set(u,d);const p=this._scope[h]||(this._scope[h]=[]),y=p.length;return p[y]=l.ref,d.setValue(l,{property:h,itemIndex:y}),d}getValue(o,l){const c=this._values[o];if(c)return c.get(l)}scopeRefs(o,l=this._values){return this._reduceValues(l,c=>{if(c.scopePath===void 0)throw new Error(`CodeGen: name "${c}" has no value`);return be._`${o}${c.scopePath}`})}scopeCode(o=this._values,l,c){return this._reduceValues(o,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},l,c)}_reduceValues(o,l,c={},d){let h=be.nil;for(const u in o){const m=o[u];if(!m)continue;const p=c[u]=c[u]||new Map;m.forEach(y=>{if(p.has(y))return;p.set(y,n.Started);let b=l(y);if(b)h=be._`${h}${this.opts.es5?e.varKinds.var:e.varKinds.const} ${y} = ${b};${this.opts._n}`;else{if(!(b=d==null?void 0:d(y)))throw new r(y);h=be._`${h}${b}${this.opts._n}`}p.set(y,n.Completed)})}return h}}}),g=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var r=be;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var n=Dt;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new be._Code(">"),GTE:new be._Code(">="),LT:new be._Code("<"),LTE:new be._Code("<="),EQ:new be._Code("==="),NEQ:new be._Code("!=="),NOT:new be._Code("!"),OR:new be._Code("||"),AND:new be._Code("&&"),ADD:new be._Code("+")};class s{optimizeNodes(){return this}optimizeNames(_,L){return this}}class i extends s{constructor(_,L,q){super(),this.varKind=_,this.name=L,this.rhs=q}render({es5:_,_n:L}){return`${_?Dt.varKinds.var:this.varKind} ${this.name}${this.rhs===void 0?"":` = ${this.rhs}`};`+L}optimizeNames(_,L){if(_[this.name.str])return this.rhs&&(this.rhs=M(this.rhs,_,L)),this}get names(){return this.rhs instanceof be._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(_,L,q){super(),this.lhs=_,this.rhs=L,this.sideEffects=q}render({_n:_}){return`${this.lhs} = ${this.rhs};`+_}optimizeNames(_,L){if(!(this.lhs instanceof be.Name)||_[this.lhs.str]||this.sideEffects)return this.rhs=M(this.rhs,_,L),this}get names(){return I(this.lhs instanceof be.Name?{}:{...this.lhs.names},this.rhs)}}class o extends a{constructor(_,L,q,Z){super(_,q,Z),this.op=L}render({_n:_}){return`${this.lhs} ${this.op}= ${this.rhs};`+_}}class l extends s{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`${this.label}:`+_}}class c extends s{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`break${this.label?` ${this.label}`:""};`+_}}class d extends s{constructor(_){super(),this.error=_}render({_n:_}){return`throw ${this.error};`+_}get names(){return this.error.names}}class h extends s{constructor(_){super(),this.code=_}render({_n:_}){return`${this.code};`+_}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(_,L){return this.code=M(this.code,_,L),this}get names(){return this.code instanceof be._CodeOrName?this.code.names:{}}}class u extends s{constructor(_=[]){super(),this.nodes=_}render(_){return this.nodes.reduce((L,q)=>L+q.render(_),"")}optimizeNodes(){const{nodes:_}=this;let L=_.length;for(;L--;){const q=_[L].optimizeNodes();Array.isArray(q)?_.splice(L,1,...q):q?_[L]=q:_.splice(L,1)}return _.length>0?this:void 0}optimizeNames(_,L){const{nodes:q}=this;let Z=q.length;for(;Z--;){const ee=q[Z];ee.optimizeNames(_,L)||(V(_,ee.names),q.splice(Z,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((_,L)=>P(_,L.names),{})}}class m extends u{render(_){return"{"+_._n+super.render(_)+"}"+_._n}}class p extends u{}class y extends m{}y.kind="else";class b extends m{constructor(_,L){super(L),this.condition=_}render(_){let L=`if(${this.condition})`+super.render(_);return this.else&&(L+="else "+this.else.render(_)),L}optimizeNodes(){super.optimizeNodes();const _=this.condition;if(_===!0)return this.nodes;let L=this.else;if(L){const q=L.optimizeNodes();L=this.else=Array.isArray(q)?new y(q):q}return L?_===!1?L instanceof b?L:L.nodes:this.nodes.length?this:new b(G(_),L instanceof b?[L]:L.nodes):_!==!1&&this.nodes.length?this:void 0}optimizeNames(_,L){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(_,L),super.optimizeNames(_,L)||this.else)return this.condition=M(this.condition,_,L),this}get names(){const _=super.names;return I(_,this.condition),this.else&&P(_,this.else.names),_}}b.kind="if";class k extends m{}k.kind="for";class O extends k{constructor(_){super(),this.iteration=_}render(_){return`for(${this.iteration})`+super.render(_)}optimizeNames(_,L){if(super.optimizeNames(_,L))return this.iteration=M(this.iteration,_,L),this}get names(){return P(super.names,this.iteration.names)}}class $ extends k{constructor(_,L,q,Z){super(),this.varKind=_,this.name=L,this.from=q,this.to=Z}render(_){const L=_.es5?Dt.varKinds.var:this.varKind,{name:q,from:Z,to:ee}=this;return`for(${L} ${q}=${Z}; ${q}<${ee}; ${q}++)`+super.render(_)}get names(){const _=I(super.names,this.from);return I(_,this.to)}}class x extends k{constructor(_,L,q,Z){super(),this.loop=_,this.varKind=L,this.name=q,this.iterable=Z}render(_){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(_)}optimizeNames(_,L){if(super.optimizeNames(_,L))return this.iterable=M(this.iterable,_,L),this}get names(){return P(super.names,this.iterable.names)}}class w extends m{constructor(_,L,q){super(),this.name=_,this.args=L,this.async=q}render(_){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(_)}}w.kind="func";class B extends u{render(_){return"return "+super.render(_)}}B.kind="return";class R extends m{render(_){let L="try"+super.render(_);return this.catch&&(L+=this.catch.render(_)),this.finally&&(L+=this.finally.render(_)),L}optimizeNodes(){var _,L;return super.optimizeNodes(),(_=this.catch)===null||_===void 0||_.optimizeNodes(),(L=this.finally)===null||L===void 0||L.optimizeNodes(),this}optimizeNames(_,L){var q,Z;return super.optimizeNames(_,L),(q=this.catch)===null||q===void 0||q.optimizeNames(_,L),(Z=this.finally)===null||Z===void 0||Z.optimizeNames(_,L),this}get names(){const _=super.names;return this.catch&&P(_,this.catch.names),this.finally&&P(_,this.finally.names),_}}class T extends m{constructor(_){super(),this.error=_}render(_){return`catch(${this.error})`+super.render(_)}}T.kind="catch";class E extends m{render(_){return"finally"+super.render(_)}}function P(D,_){for(const L in _)D[L]=(D[L]||0)+(_[L]||0);return D}function I(D,_){return _ instanceof be._CodeOrName?P(D,_.names):D}function M(D,_,L){return D instanceof be.Name?Z(D):(q=D)instanceof be._Code&&q._items.some(ee=>ee instanceof be.Name&&_[ee.str]===1&&L[ee.str]!==void 0)?new be._Code(D._items.reduce((ee,ce)=>(ce instanceof be.Name&&(ce=Z(ce)),ce instanceof be._Code?ee.push(...ce._items):ee.push(ce),ee),[])):D;var q;function Z(ee){const ce=L[ee.str];return ce===void 0||_[ee.str]!==1?ee:(delete _[ee.str],ce)}}function V(D,_){for(const L in _)D[L]=(D[L]||0)-(_[L]||0)}function G(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:be._`!${se(D)}`}E.kind="finally",e.CodeGen=class{constructor(D,_={}){this._values={},this._blockStarts=[],this._constants={},this.opts={..._,_n:_.lines?`
162
162
  `:""},this._extScope=D,this._scope=new Dt.Scope({parent:D}),this._nodes=[new p]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,_){const L=this._extScope.value(D,_);return(this._values[L.prefix]||(this._values[L.prefix]=new Set)).add(L),L}getScopeValue(D,_){return this._extScope.getValue(D,_)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,_,L,q){const Z=this._scope.toName(_);return L!==void 0&&q&&(this._constants[Z.str]=L),this._leafNode(new i(D,Z,L)),Z}const(D,_,L){return this._def(Dt.varKinds.const,D,_,L)}let(D,_,L){return this._def(Dt.varKinds.let,D,_,L)}var(D,_,L){return this._def(Dt.varKinds.var,D,_,L)}assign(D,_,L){return this._leafNode(new a(D,_,L))}add(D,_){return this._leafNode(new o(D,e.operators.ADD,_))}code(D){return typeof D=="function"?D():D!==be.nil&&this._leafNode(new h(D)),this}object(...D){const _=["{"];for(const[L,q]of D)_.length>1&&_.push(","),_.push(L),(L!==q||this.opts.es5)&&(_.push(":"),(0,be.addCodeArg)(_,q));return _.push("}"),new be._Code(_)}if(D,_,L){if(this._blockNode(new b(D)),_&&L)this.code(_).else().code(L).endIf();else if(_)this.code(_).endIf();else if(L)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new b(D))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(b,y)}_for(D,_){return this._blockNode(D),_&&this.code(_).endFor(),this}for(D,_){return this._for(new O(D),_)}forRange(D,_,L,q,Z=this.opts.es5?Dt.varKinds.var:Dt.varKinds.let){const ee=this._scope.toName(D);return this._for(new $(Z,ee,_,L),()=>q(ee))}forOf(D,_,L,q=Dt.varKinds.const){const Z=this._scope.toName(D);if(this.opts.es5){const ee=_ instanceof be.Name?_:this.var("_arr",_);return this.forRange("_i",0,be._`${ee}.length`,ce=>{this.var(Z,be._`${ee}[${ce}]`),L(Z)})}return this._for(new x("of",q,Z,_),()=>L(Z))}forIn(D,_,L,q=this.opts.es5?Dt.varKinds.var:Dt.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,be._`Object.keys(${_})`,L);const Z=this._scope.toName(D);return this._for(new x("in",q,Z,_),()=>L(Z))}endFor(){return this._endBlockNode(k)}label(D){return this._leafNode(new l(D))}break(D){return this._leafNode(new c(D))}return(D){const _=new B;if(this._blockNode(_),this.code(D),_.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(B)}try(D,_,L){if(!_&&!L)throw new Error('CodeGen: "try" without "catch" and "finally"');const q=new R;if(this._blockNode(q),this.code(D),_){const Z=this.name("e");this._currNode=q.catch=new T(Z),_(Z)}return L&&(this._currNode=q.finally=new E,this.code(L)),this._endBlockNode(T,E)}throw(D){return this._leafNode(new d(D))}block(D,_){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(_),this}endBlock(D){const _=this._blockStarts.pop();if(_===void 0)throw new Error("CodeGen: not in self-balancing block");const L=this._nodes.length-_;if(L<0||D!==void 0&&L!==D)throw new Error(`CodeGen: wrong number of nodes: ${L} vs ${D} expected`);return this._nodes.length=_,this}func(D,_=be.nil,L,q){return this._blockNode(new w(D,_,L)),q&&this.code(q).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,_){const L=this._currNode;if(L instanceof D||_&&L instanceof _)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${_?`${D.kind}/${_.kind}`:D.kind}"`)}_elseNode(D){const _=this._currNode;if(!(_ instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=_.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const _=this._nodes;_[_.length-1]=D}},e.not=G;const K=re(e.operators.AND);e.and=function(...D){return D.reduce(K)};const J=re(e.operators.OR);function re(D){return(_,L)=>_===be.nil?L:L===be.nil?_:be._`${se(_)} ${D} ${se(L)}`}function se(D){return D instanceof be.Name?D:be._`(${D})`}e.or=function(...D){return D.reduce(J)}}),me=Xe(function(t,e){function r(u,m=u.schema){const{opts:p,self:y}=u;if(!p.strictSchema||typeof m=="boolean")return;const b=y.RULES.keywords;for(const k in m)b[k]||h(u,`unknown keyword: "${k}"`)}function n(u,m){if(typeof u=="boolean")return!u;for(const p in u)if(m[p])return!0;return!1}function s(u){return typeof u=="number"?`${u}`:u.replace(/~/g,"~0").replace(/\//g,"~1")}function i(u){return u.replace(/~1/g,"/").replace(/~0/g,"~")}function a({mergeNames:u,mergeToName:m,mergeValues:p,resultToName:y}){return(b,k,O,$)=>{const x=O===void 0?k:O instanceof g.Name?(k instanceof g.Name?u(b,k,O):m(b,k,O),O):k instanceof g.Name?(m(b,O,k),k):p(k,O);return $!==g.Name||x instanceof g.Name?x:y(b,x)}}function o(u,m){if(m===!0)return u.var("props",!0);const p=u.var("props",g._`{}`);return m!==void 0&&l(u,p,m),p}function l(u,m,p){Object.keys(p).forEach(y=>u.assign(g._`${m}${(0,g.getProperty)(y)}`,!0))}Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0,e.toHash=function(u){const m={};for(const p of u)m[p]=!0;return m},e.alwaysValidSchema=function(u,m){return typeof m=="boolean"?m:Object.keys(m).length===0||(r(u,m),!n(m,u.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=n,e.schemaHasRulesButRef=function(u,m){if(typeof u=="boolean")return!u;for(const p in u)if(p!=="$ref"&&m.all[p])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:u,schemaPath:m},p,y,b){if(!b){if(typeof p=="number"||typeof p=="boolean")return p;if(typeof p=="string")return g._`${p}`}return g._`${u}${m}${(0,g.getProperty)(y)}`},e.unescapeFragment=function(u){return i(decodeURIComponent(u))},e.escapeFragment=function(u){return encodeURIComponent(s(u))},e.escapeJsonPointer=s,e.unescapeJsonPointer=i,e.eachItem=function(u,m){if(Array.isArray(u))for(const p of u)m(p);else m(u)},e.mergeEvaluated={props:a({mergeNames:(u,m,p)=>u.if(g._`${p} !== true && ${m} !== undefined`,()=>{u.if(g._`${m} === true`,()=>u.assign(p,!0),()=>u.assign(p,g._`${p} || {}`).code(g._`Object.assign(${p}, ${m})`))}),mergeToName:(u,m,p)=>u.if(g._`${p} !== true`,()=>{m===!0?u.assign(p,!0):(u.assign(p,g._`${p} || {}`),l(u,p,m))}),mergeValues:(u,m)=>u===!0||{...u,...m},resultToName:o}),items:a({mergeNames:(u,m,p)=>u.if(g._`${p} !== true && ${m} !== undefined`,()=>u.assign(p,g._`${m} === true ? true : ${p} > ${m} ? ${p} : ${m}`)),mergeToName:(u,m,p)=>u.if(g._`${p} !== true`,()=>u.assign(p,m===!0||g._`${p} > ${m} ? ${p} : ${m}`)),mergeValues:(u,m)=>u===!0||Math.max(u,m),resultToName:(u,m)=>u.var("items",m)})},e.evaluatedPropsToName=o,e.setEvaluated=l;const c={};var d;function h(u,m,p=u.opts.strictSchema){if(p){if(m=`strict mode: ${m}`,p===!0)throw new Error(m);u.self.logger.warn(m)}}e.useFunc=function(u,m){return u.scopeValue("func",{ref:m,code:c[m.code]||(c[m.code]=new be._Code(m.code))})},function(u){u[u.Num=0]="Num",u[u.Str=1]="Str"}(d=e.Type||(e.Type={})),e.getErrorPath=function(u,m,p){if(u instanceof g.Name){const y=m===d.Num;return p?y?g._`"[" + ${u} + "]"`:g._`"['" + ${u} + "']"`:y?g._`"/" + ${u}`:g._`"/" + ${u}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return p?(0,g.getProperty)(u).toString():"/"+s(u)},e.checkStrictMode=h});const Jp={data:new g.Name("data"),valCxt:new g.Name("valCxt"),instancePath:new g.Name("instancePath"),parentData:new g.Name("parentData"),parentDataProperty:new g.Name("parentDataProperty"),rootData:new g.Name("rootData"),dynamicAnchors:new g.Name("dynamicAnchors"),vErrors:new g.Name("vErrors"),errors:new g.Name("errors"),this:new g.Name("this"),self:new g.Name("self"),scope:new g.Name("scope"),json:new g.Name("json"),jsonPos:new g.Name("jsonPos"),jsonLen:new g.Name("jsonLen"),jsonPart:new g.Name("jsonPart")};var te=Object.defineProperty({default:Jp},"__esModule",{value:!0}),jt=Xe(function(t,e){function r(l,c){const d=l.const("err",c);l.if(g._`${te.default.vErrors} === null`,()=>l.assign(te.default.vErrors,g._`[${d}]`),g._`${te.default.vErrors}.push(${d})`),l.code(g._`${te.default.errors}++`)}function n(l,c){const{gen:d,validateName:h,schemaEnv:u}=l;u.$async?d.throw(g._`new ${l.ValidationError}(${c})`):(d.assign(g._`${h}.errors`,c),d.return(!1))}Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0,e.keywordError={message:({keyword:l})=>g.str`must pass "${l}" keyword validation`},e.keyword$DataError={message:({keyword:l,schemaType:c})=>c?g.str`"${l}" keyword must be ${c} ($data)`:g.str`"${l}" keyword is invalid ($data)`},e.reportError=function(l,c=e.keywordError,d,h){const{it:u}=l,{gen:m,compositeRule:p,allErrors:y}=u,b=i(l,c,d);h??(p||y)?r(m,b):n(u,g._`[${b}]`)},e.reportExtraError=function(l,c=e.keywordError,d){const{it:h}=l,{gen:u,compositeRule:m,allErrors:p}=h;r(u,i(l,c,d)),m||p||n(h,te.default.vErrors)},e.resetErrorsCount=function(l,c){l.assign(te.default.errors,c),l.if(g._`${te.default.vErrors} !== null`,()=>l.if(c,()=>l.assign(g._`${te.default.vErrors}.length`,c),()=>l.assign(te.default.vErrors,null)))},e.extendErrors=function({gen:l,keyword:c,schemaValue:d,data:h,errsCount:u,it:m}){if(u===void 0)throw new Error("ajv implementation error");const p=l.name("err");l.forRange("i",u,te.default.errors,y=>{l.const(p,g._`${te.default.vErrors}[${y}]`),l.if(g._`${p}.instancePath === undefined`,()=>l.assign(g._`${p}.instancePath`,(0,g.strConcat)(te.default.instancePath,m.errorPath))),l.assign(g._`${p}.schemaPath`,g.str`${m.errSchemaPath}/${c}`),m.opts.verbose&&(l.assign(g._`${p}.schema`,d),l.assign(g._`${p}.data`,h))})};const s={keyword:new g.Name("keyword"),schemaPath:new g.Name("schemaPath"),params:new g.Name("params"),propertyName:new g.Name("propertyName"),message:new g.Name("message"),schema:new g.Name("schema"),parentSchema:new g.Name("parentSchema")};function i(l,c,d){const{createErrors:h}=l.it;return h===!1?g._`{}`:function(u,m,p={}){const{gen:y,it:b}=u,k=[a(b,p),o(u,p)];return function(O,{params:$,message:x},w){const{keyword:B,data:R,schemaValue:T,it:E}=O,{opts:P,propertyName:I,topSchemaRef:M,schemaPath:V}=E;w.push([s.keyword,B],[s.params,typeof $=="function"?$(O):$||g._`{}`]),P.messages&&w.push([s.message,typeof x=="function"?x(O):x]),P.verbose&&w.push([s.schema,T],[s.parentSchema,g._`${M}${V}`],[te.default.data,R]),I&&w.push([s.propertyName,I])}(u,m,k),y.object(...k)}(l,c,d)}function a({errorPath:l},{instancePath:c}){const d=c?g.str`${l}${(0,me.getErrorPath)(c,me.Type.Str)}`:l;return[te.default.instancePath,(0,g.strConcat)(te.default.instancePath,d)]}function o({keyword:l,it:{errSchemaPath:c}},{schemaPath:d,parentSchema:h}){let u=h?c:g.str`${c}/${l}`;return d&&(u=g.str`${u}${(0,me.getErrorPath)(d,me.Type.Str)}`),[s.schemaPath,u]}}),Bc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const r={message:"boolean schema is false"};function n(s,i){const{gen:a,data:o}=s;(0,jt.reportError)({gen:a,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s},r,void 0,i)}e.topBoolOrEmptySchema=function(s){const{gen:i,schema:a,validateName:o}=s;a===!1?n(s,!1):typeof a=="object"&&a.$async===!0?i.return(te.default.data):(i.assign(g._`${o}.errors`,null),i.return(!0))},e.boolOrEmptySchema=function(s,i){const{gen:a,schema:o}=s;o===!1?(a.var(i,!1),n(s)):a.var(i,!0)}}),zc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(n){return typeof n=="string"&&r.has(n)},e.getRules=function(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}}),hs=Xe(function(t,e){function r(s,i){return i.rules.some(a=>n(s,a))}function n(s,i){var a;return s[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(o=>s[o]!==void 0))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:s,self:i},a){const o=i.RULES.types[a];return o&&o!==!0&&r(s,o)},e.shouldUseGroup=r,e.shouldUseRule=n}),Yt=Xe(function(t,e){var r;function n(c){const d=Array.isArray(c)?c:c?[c]:[];if(d.every(zc.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0,function(c){c[c.Correct=0]="Correct",c[c.Wrong=1]="Wrong"}(r=e.DataType||(e.DataType={})),e.getSchemaTypes=function(c){const d=n(c.type);if(d.includes("null")){if(c.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&c.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');c.nullable===!0&&d.push("null")}return d},e.getJSONTypes=n,e.coerceAndCheckDataType=function(c,d){const{gen:h,data:u,opts:m}=c,p=function(b,k){return k?b.filter(O=>s.has(O)||k==="array"&&O==="array"):[]}(d,m.coerceTypes),y=d.length>0&&!(p.length===0&&d.length===1&&(0,hs.schemaHasRulesForType)(c,d[0]));if(y){const b=a(d,u,m.strictNumbers,r.Wrong);h.if(b,()=>{p.length?function(k,O,$){const{gen:x,data:w,opts:B}=k,R=x.let("dataType",g._`typeof ${w}`),T=x.let("coerced",g._`undefined`);B.coerceTypes==="array"&&x.if(g._`${R} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>x.assign(w,g._`${w}[0]`).assign(R,g._`typeof ${w}`).if(a(O,w,B.strictNumbers),()=>x.assign(T,w))),x.if(g._`${T} !== undefined`);for(const P of $)(s.has(P)||P==="array"&&B.coerceTypes==="array")&&E(P);function E(P){switch(P){case"string":return void x.elseIf(g._`${R} == "number" || ${R} == "boolean"`).assign(T,g._`"" + ${w}`).elseIf(g._`${w} === null`).assign(T,g._`""`);case"number":return void x.elseIf(g._`${R} == "boolean" || ${w} === null
163
163
  || (${R} == "string" && ${w} && ${w} == +${w})`).assign(T,g._`+${w}`);case"integer":return void x.elseIf(g._`${R} === "boolean" || ${w} === null
164
164
  || (${R} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(T,g._`+${w}`);case"boolean":return void x.elseIf(g._`${w} === "false" || ${w} === 0 || ${w} === null`).assign(T,!1).elseIf(g._`${w} === "true" || ${w} === 1`).assign(T,!0);case"null":return x.elseIf(g._`${w} === "" || ${w} === 0 || ${w} === false`),void x.assign(T,null);case"array":x.elseIf(g._`${R} === "string" || ${R} === "number"
165
165
  || ${R} === "boolean" || ${w} === null`).assign(T,g._`[${w}]`)}}x.else(),l(k),x.endIf(),x.if(g._`${T} !== undefined`,()=>{x.assign(w,T),function({gen:P,parentData:I,parentDataProperty:M},V){P.if(g._`${I} !== undefined`,()=>P.assign(g._`${I}[${M}]`,V))}(k,T)})}(c,d,p):l(c)})}return y};const s=new Set(["string","number","integer","boolean","null"]);function i(c,d,h,u=r.Correct){const m=u===r.Correct?g.operators.EQ:g.operators.NEQ;let p;switch(c){case"null":return g._`${d} ${m} null`;case"array":p=g._`Array.isArray(${d})`;break;case"object":p=g._`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":p=y(g._`!(${d} % 1) && !isNaN(${d})`);break;case"number":p=y();break;default:return g._`typeof ${d} ${m} ${c}`}return u===r.Correct?p:(0,g.not)(p);function y(b=g.nil){return(0,g.and)(g._`typeof ${d} == "number"`,b,h?g._`isFinite(${d})`:g.nil)}}function a(c,d,h,u){if(c.length===1)return i(c[0],d,h,u);let m;const p=(0,me.toHash)(c);if(p.array&&p.object){const y=g._`typeof ${d} != "object"`;m=p.null?y:g._`!${d} || ${y}`,delete p.null,delete p.array,delete p.object}else m=g.nil;p.number&&delete p.integer;for(const y in p)m=(0,g.and)(m,i(y,d,h,u));return m}e.checkDataType=i,e.checkDataTypes=a;const o={message:({schema:c})=>`must be ${c}`,params:({schema:c,schemaValue:d})=>typeof c=="string"?g._`{type: ${c}}`:g._`{type: ${d}}`};function l(c){const d=function(h){const{gen:u,data:m,schema:p}=h,y=(0,me.schemaRefOrVal)(h,p,"type");return{gen:u,keyword:"type",data:m,schema:p.type,schemaCode:y,schemaValue:y,parentSchema:p,params:{},it:h}}(c);(0,jt.reportError)(d,o)}e.reportTypeError=l}),Xp=Xe(function(t,e){function r(n,s,i){const{gen:a,compositeRule:o,data:l,opts:c}=n;if(i===void 0)return;const d=g._`${l}${(0,g.getProperty)(s)}`;if(o)return void(0,me.checkStrictMode)(n,`default is ignored for: ${d}`);let h=g._`${d} === undefined`;c.useDefaults==="empty"&&(h=g._`${h} || ${d} === null || ${d} === ""`),a.if(h,g._`${d} = ${(0,g.stringify)(i)}`)}Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0,e.assignDefaults=function(n,s){const{properties:i,items:a}=n.schema;if(s==="object"&&i)for(const o in i)r(n,o,i[o].default);else s==="array"&&Array.isArray(a)&&a.forEach((o,l)=>r(n,l,o.default))}}),rt=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;const r=me;function n(l){return l.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:g._`Object.prototype.hasOwnProperty`})}function s(l,c,d){return g._`${n(l)}.call(${c}, ${d})`}function i(l,c,d,h){const u=g._`${c}${(0,g.getProperty)(d)} === undefined`;return h?(0,g.or)(u,(0,g.not)(s(l,c,d))):u}function a(l){return l?Object.keys(l).filter(c=>c!=="__proto__"):[]}e.checkReportMissingProp=function(l,c){const{gen:d,data:h,it:u}=l;d.if(i(d,h,c,u.opts.ownProperties),()=>{l.setParams({missingProperty:g._`${c}`},!0),l.error()})},e.checkMissingProp=function({gen:l,data:c,it:{opts:d}},h,u){return(0,g.or)(...h.map(m=>(0,g.and)(i(l,c,m,d.ownProperties),g._`${u} = ${m}`)))},e.reportMissingProp=function(l,c){l.setParams({missingProperty:c},!0),l.error()},e.hasPropFunc=n,e.isOwnProperty=s,e.propertyInData=function(l,c,d,h){const u=g._`${c}${(0,g.getProperty)(d)} !== undefined`;return h?g._`${u} && ${s(l,c,d)}`:u},e.noPropertyInData=i,e.allSchemaProperties=a,e.schemaProperties=function(l,c){return a(c).filter(d=>!(0,me.alwaysValidSchema)(l,c[d]))},e.callValidateCode=function({schemaCode:l,data:c,it:{gen:d,topSchemaRef:h,schemaPath:u,errorPath:m},it:p},y,b,k){const O=k?g._`${l}, ${c}, ${h}${u}`:c,$=[[te.default.instancePath,(0,g.strConcat)(te.default.instancePath,m)],[te.default.parentData,p.parentData],[te.default.parentDataProperty,p.parentDataProperty],[te.default.rootData,te.default.rootData]];p.opts.dynamicRef&&$.push([te.default.dynamicAnchors,te.default.dynamicAnchors]);const x=g._`${O}, ${d.object(...$)}`;return b!==g.nil?g._`${y}.call(${b}, ${x})`:g._`${y}(${x})`};const o=g._`new RegExp`;e.usePattern=function({gen:l,it:{opts:c}},d){const h=c.unicodeRegExp?"u":"",{regExp:u}=c.code,m=u(d,h);return l.scopeValue("pattern",{key:m.toString(),ref:m,code:g._`${u.code==="new RegExp"?o:(0,r.useFunc)(l,u)}(${d}, ${h})`})},e.validateArray=function(l){const{gen:c,data:d,keyword:h,it:u}=l,m=c.name("valid");if(u.allErrors){const y=c.let("valid",!0);return p(()=>c.assign(y,!1)),y}return c.var(m,!0),p(()=>c.break()),m;function p(y){const b=c.const("len",g._`${d}.length`);c.forRange("i",0,b,k=>{l.subschema({keyword:h,dataProp:k,dataPropType:me.Type.Num},m),c.if((0,g.not)(m),y)})}},e.validateUnion=function(l){const{gen:c,schema:d,keyword:h,it:u}=l;if(!Array.isArray(d))throw new Error("ajv implementation error");if(d.some(y=>(0,me.alwaysValidSchema)(u,y))&&!u.opts.unevaluated)return;const m=c.let("valid",!1),p=c.name("_valid");c.block(()=>d.forEach((y,b)=>{const k=l.subschema({keyword:h,schemaProp:b,compositeRule:!0},p);c.assign(m,g._`${m} || ${p}`),l.mergeValidEvaluated(k,p)||c.if((0,g.not)(m))})),l.result(m,()=>l.reset(),()=>l.error(!0))}}),$n=Xe(function(t,e){function r(s){const{gen:i,data:a,it:o}=s;i.if(o.parentData,()=>i.assign(a,g._`${o.parentData}[${o.parentDataProperty}]`))}function n(s,i,a){if(a===void 0)throw new Error(`keyword "${i}" failed to compile`);return s.scopeValue("keyword",typeof a=="function"?{ref:a}:{ref:a,code:(0,g.stringify)(a)})}Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0,e.macroKeywordCode=function(s,i){const{gen:a,keyword:o,schema:l,parentSchema:c,it:d}=s,h=i.macro.call(d.self,l,c,d),u=n(a,o,h);d.opts.validateSchema!==!1&&d.self.validateSchema(h,!0);const m=a.name("valid");s.subschema({schema:h,schemaPath:g.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},m),s.pass(m,()=>s.error(!0))},e.funcKeywordCode=function(s,i){var a;const{gen:o,keyword:l,schema:c,parentSchema:d,$data:h,it:u}=s;(function({schemaEnv:O},$){if($.async&&!O.$async)throw new Error("async keyword in sync schema")})(u,i);const m=!h&&i.compile?i.compile.call(u.self,c,d,u):i.validate,p=n(o,l,m),y=o.let("valid");function b(O=i.async?g._`await `:g.nil){o.assign(y,g._`${O}${(0,rt.callValidateCode)(s,p,u.opts.passContext?te.default.this:te.default.self,!("compile"in i&&!h||i.schema===!1))}`,i.modifying)}function k(O){var $;o.if((0,g.not)(($=i.valid)!==null&&$!==void 0?$:y),O)}s.block$data(y,function(){if(i.errors===!1)b(),i.modifying&&r(s),k(()=>s.error());else{const O=i.async?function(){const $=o.let("ruleErrs",null);return o.try(()=>b(g._`await `),x=>o.assign(y,!1).if(g._`${x} instanceof ${u.ValidationError}`,()=>o.assign($,g._`${x}.errors`),()=>o.throw(x))),$}():function(){const $=g._`${p}.errors`;return o.assign($,null),b(g.nil),$}();i.modifying&&r(s),k(()=>function($,x){const{gen:w}=$;w.if(g._`Array.isArray(${x})`,()=>{w.assign(te.default.vErrors,g._`${te.default.vErrors} === null ? ${x} : ${te.default.vErrors}.concat(${x})`).assign(te.default.errors,g._`${te.default.vErrors}.length`),(0,jt.extendErrors)($)},()=>$.error())}(s,O))}}),s.ok((a=i.valid)!==null&&a!==void 0?a:y)},e.validSchemaType=function(s,i,a=!1){return!i.length||i.some(o=>o==="array"?Array.isArray(s):o==="object"?s&&typeof s=="object"&&!Array.isArray(s):typeof s==o||a&&s===void 0)},e.validateKeywordUsage=function({schema:s,opts:i,self:a,errSchemaPath:o},l,c){if(Array.isArray(l.keyword)?!l.keyword.includes(c):l.keyword!==c)throw new Error("ajv implementation error");const d=l.dependencies;if(d!=null&&d.some(h=>!Object.prototype.hasOwnProperty.call(s,h)))throw new Error(`parent schema must have dependencies of ${c}: ${d.join(",")}`);if(l.validateSchema&&!l.validateSchema(s[c])){const h=`keyword "${c}" value is invalid at path "${o}": `+a.errorsText(l.validateSchema.errors);if(i.validateSchema!=="log")throw new Error(h);a.logger.error(h)}}}),Vi=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0,e.getSubschema=function(r,{keyword:n,schemaProp:s,schema:i,schemaPath:a,errSchemaPath:o,topSchemaRef:l}){if(n!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(n!==void 0){const c=r.schema[n];return s===void 0?{schema:c,schemaPath:g._`${r.schemaPath}${(0,g.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:c[s],schemaPath:g._`${r.schemaPath}${(0,g.getProperty)(n)}${(0,g.getProperty)(s)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,me.escapeFragment)(s)}`}}if(i!==void 0){if(a===void 0||o===void 0||l===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(r,n,{dataProp:s,dataPropType:i,data:a,dataTypes:o,propertyName:l}){if(a!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=n;if(s!==void 0){const{errorPath:h,dataPathArr:u,opts:m}=n;d(c.let("data",g._`${n.data}${(0,g.getProperty)(s)}`,!0)),r.errorPath=g.str`${h}${(0,me.getErrorPath)(s,i,m.jsPropertySyntax)}`,r.parentDataProperty=g._`${s}`,r.dataPathArr=[...u,r.parentDataProperty]}function d(h){r.data=h,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,h]}a!==void 0&&(d(a instanceof g.Name?a:c.let("data",a,!0)),l!==void 0&&(r.propertyName=l)),o&&(r.dataTypes=o)},e.extendSubschemaMode=function(r,{jtdDiscriminator:n,jtdMetadata:s,compositeRule:i,createErrors:a,allErrors:o}){i!==void 0&&(r.compositeRule=i),a!==void 0&&(r.createErrors=a),o!==void 0&&(r.allErrors=o),r.jtdDiscriminator=n,r.jtdMetadata=s}}),Li=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(s=n;s--!=0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(s=n;s--!=0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!=0;){var a=i[s];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r},Qp=Xe(function(t){var e=t.exports=function(n,s,i){typeof s=="function"&&(i=s,s={}),r(s,typeof(i=s.cb||i)=="function"?i:i.pre||function(){},i.post||function(){},n,"",n)};function r(n,s,i,a,o,l,c,d,h,u){if(a&&typeof a=="object"&&!Array.isArray(a)){for(var m in s(a,o,l,c,d,h,u),a){var p=a[m];if(Array.isArray(p)){if(m in e.arrayKeywords)for(var y=0;y<p.length;y++)r(n,s,i,p[y],o+"/"+m+"/"+y,l,o,m,a,y)}else if(m in e.propsKeywords){if(p&&typeof p=="object")for(var b in p)r(n,s,i,p[b],o+"/"+m+"/"+b.replace(/~/g,"~0").replace(/\//g,"~1"),l,o,m,a,b)}else(m in e.keywords||n.allKeys&&!(m in e.skipKeywords))&&r(n,s,i,p,o+"/"+m,l,o,m,a)}i(a,o,l,c,d,h,u)}}e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}}),lt=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(h,u=!0){return typeof h=="boolean"||(u===!0?!s(h):!!u&&i(h)<=u)};const n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(h){for(const u in h){if(n.has(u))return!0;const m=h[u];if(Array.isArray(m)&&m.some(s)||typeof m=="object"&&s(m))return!0}return!1}function i(h){let u=0;for(const m in h)if(m==="$ref"||(u++,!r.has(m)&&(typeof h[m]=="object"&&(0,me.eachItem)(h[m],p=>u+=i(p)),u===1/0)))return 1/0;return u}function a(h,u="",m){m!==!1&&(u=c(u));const p=h.parse(u);return o(h,p)}function o(h,u){return h.serialize(u).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=o;const l=/#\/?$/;function c(h){return h?h.replace(l,""):""}e.normalizeId=c,e.resolveUrl=function(h,u,m){return m=c(m),h.resolve(u,m)};const d=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(h,u){if(typeof h=="boolean")return{};const{schemaId:m,uriResolver:p}=this.opts,y=c(h[m]||u),b={"":y},k=a(p,y,!1),O={},$=new Set;return Qp(h,{allKeys:!0},(B,R,T,E)=>{if(E===void 0)return;const P=k+R;let I=b[E];function M(G){if(G=c(I?(0,this.opts.uriResolver.resolve)(I,G):G),$.has(G))throw w(G);$.add(G);let K=this.refs[G];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?x(B,K.schema,G):G!==c(P)&&(G[0]==="#"?(x(B,O[G],G),O[G]=B):this.refs[G]=P),G}function V(G){if(typeof G=="string"){if(!d.test(G))throw new Error(`invalid anchor "${G}"`);M.call(this,`#${G}`)}}typeof B[m]=="string"&&(I=M.call(this,B[m])),V.call(this,B.$anchor),V.call(this,B.$dynamicAnchor),b[R]=I}),O;function x(B,R,T){if(R!==void 0&&!Li(B,R))throw w(T)}function w(B){return new Error(`reference "${B}" resolves to more than one schema`)}}}),_n=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const r=Yt;function n({gen:$,validateName:x,schema:w,schemaEnv:B,opts:R},T){R.code.es5?$.func(x,g._`${te.default.data}, ${te.default.valCxt}`,B.$async,()=>{$.code(g._`"use strict"; ${s(w,R)}`),function(E,P){E.if(te.default.valCxt,()=>{E.var(te.default.instancePath,g._`${te.default.valCxt}.${te.default.instancePath}`),E.var(te.default.parentData,g._`${te.default.valCxt}.${te.default.parentData}`),E.var(te.default.parentDataProperty,g._`${te.default.valCxt}.${te.default.parentDataProperty}`),E.var(te.default.rootData,g._`${te.default.valCxt}.${te.default.rootData}`),P.dynamicRef&&E.var(te.default.dynamicAnchors,g._`${te.default.valCxt}.${te.default.dynamicAnchors}`)},()=>{E.var(te.default.instancePath,g._`""`),E.var(te.default.parentData,g._`undefined`),E.var(te.default.parentDataProperty,g._`undefined`),E.var(te.default.rootData,te.default.data),P.dynamicRef&&E.var(te.default.dynamicAnchors,g._`{}`)})}($,R),$.code(T)}):$.func(x,g._`${te.default.data}, ${function(E){return g._`{${te.default.instancePath}="", ${te.default.parentData}, ${te.default.parentDataProperty}, ${te.default.rootData}=${te.default.data}${E.dynamicRef?g._`, ${te.default.dynamicAnchors}={}`:g.nil}}={}`}(R)}`,B.$async,()=>$.code(s(w,R)).code(T))}function s($,x){const w=typeof $=="object"&&$[x.schemaId];return w&&(x.code.source||x.code.process)?g._`/*# sourceURL=${w} */`:g.nil}function i({schema:$,self:x}){if(typeof $=="boolean")return!$;for(const w in $)if(x.RULES.all[w])return!0;return!1}function a($){return typeof $.schema!="boolean"}function o($){(0,me.checkUnknownRules)($),function(x){const{schema:w,errSchemaPath:B,opts:R,self:T}=x;w.$ref&&R.ignoreKeywordsWithRef&&(0,me.schemaHasRulesButRef)(w,T.RULES)&&T.logger.warn(`$ref: keywords ignored in schema at path "${B}"`)}($)}function l($,x){if($.opts.jtd)return d($,[],!1,x);const w=(0,Yt.getSchemaTypes)($.schema);d($,w,!(0,Yt.coerceAndCheckDataType)($,w),x)}function c({gen:$,schemaEnv:x,schema:w,errSchemaPath:B,opts:R}){const T=w.$comment;if(R.$comment===!0)$.code(g._`${te.default.self}.logger.log(${T})`);else if(typeof R.$comment=="function"){const E=g.str`${B}/$comment`,P=$.scopeValue("root",{ref:x.root});$.code(g._`${te.default.self}.opts.$comment(${T}, ${E}, ${P}.schema)`)}}function d($,x,w,B){const{gen:R,schema:T,data:E,allErrors:P,opts:I,self:M}=$,{RULES:V}=M;function G(K){(0,hs.shouldUseGroup)(T,K)&&(K.type?(R.if((0,r.checkDataType)(K.type,E,I.strictNumbers)),h($,K),x.length===1&&x[0]===K.type&&w&&(R.else(),(0,r.reportTypeError)($)),R.endIf()):h($,K),P||R.if(g._`${te.default.errors} === ${B||0}`))}!T.$ref||!I.ignoreKeywordsWithRef&&(0,me.schemaHasRulesButRef)(T,V)?(I.jtd||function(K,J){!K.schemaEnv.meta&&K.opts.strictTypes&&(function(re,se){se.length&&(re.dataTypes.length?(se.forEach(D=>{u(re.dataTypes,D)||m(re,`type "${D}" not allowed by context "${re.dataTypes.join(",")}"`)}),re.dataTypes=re.dataTypes.filter(D=>u(se,D))):re.dataTypes=se)}(K,J),K.opts.allowUnionTypes||function(re,se){se.length>1&&(se.length!==2||!se.includes("null"))&&m(re,"use allowUnionTypes to allow union type keyword")}(K,J),function(re,se){const D=re.self.RULES.all;for(const _ in D){const L=D[_];if(typeof L=="object"&&(0,hs.shouldUseRule)(re.schema,L)){const{type:q}=L.definition;q.length&&!q.some(Z=>{return(ee=se).includes(ce=Z)||ce==="number"&&ee.includes("integer");var ee,ce})&&m(re,`missing type "${q.join(",")}" for keyword "${_}"`)}}}(K,K.dataTypes))}($,x),R.block(()=>{for(const K of V.rules)G(K);G(V.post)})):R.block(()=>y($,"$ref",V.all.$ref.definition))}function h($,x){const{gen:w,schema:B,opts:{useDefaults:R}}=$;R&&(0,Xp.assignDefaults)($,x.type),w.block(()=>{for(const T of x.rules)(0,hs.shouldUseRule)(B,T)&&y($,T.keyword,T.definition,x.type)})}function u($,x){return $.includes(x)||x==="integer"&&$.includes("number")}function m($,x){(0,me.checkStrictMode)($,x+=` at "${$.schemaEnv.baseId+$.errSchemaPath}" (strictTypes)`,$.opts.strictTypes)}e.validateFunctionCode=function($){a($)&&(o($),i($))?function(x){const{schema:w,opts:B,gen:R}=x;n(x,()=>{B.$comment&&w.$comment&&c(x),function(T){const{schema:E,opts:P}=T;E.default!==void 0&&P.useDefaults&&P.strictSchema&&(0,me.checkStrictMode)(T,"default is ignored in the schema root")}(x),R.let(te.default.vErrors,null),R.let(te.default.errors,0),B.unevaluated&&function(T){const{gen:E,validateName:P}=T;T.evaluated=E.const("evaluated",g._`${P}.evaluated`),E.if(g._`${T.evaluated}.dynamicProps`,()=>E.assign(g._`${T.evaluated}.props`,g._`undefined`)),E.if(g._`${T.evaluated}.dynamicItems`,()=>E.assign(g._`${T.evaluated}.items`,g._`undefined`))}(x),l(x),function(T){const{gen:E,schemaEnv:P,validateName:I,ValidationError:M,opts:V}=T;P.$async?E.if(g._`${te.default.errors} === 0`,()=>E.return(te.default.data),()=>E.throw(g._`new ${M}(${te.default.vErrors})`)):(E.assign(g._`${I}.errors`,te.default.vErrors),V.unevaluated&&function({gen:G,evaluated:K,props:J,items:re}){J instanceof g.Name&&G.assign(g._`${K}.props`,J),re instanceof g.Name&&G.assign(g._`${K}.items`,re)}(T),E.return(g._`${te.default.errors} === 0`))}(x)})}($):n($,()=>(0,Bc.topBoolOrEmptySchema)($))};class p{constructor(x,w,B){if((0,$n.validateKeywordUsage)(x,w,B),this.gen=x.gen,this.allErrors=x.allErrors,this.keyword=B,this.data=x.data,this.schema=x.schema[B],this.$data=w.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,me.schemaRefOrVal)(x,this.schema,B,this.$data),this.schemaType=w.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=w,this.$data)this.schemaCode=x.gen.const("vSchema",O(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,$n.validSchemaType)(this.schema,w.schemaType,w.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(w.schemaType)}`);("code"in w?w.trackErrors:w.errors!==!1)&&(this.errsCount=x.gen.const("_errs",te.default.errors))}result(x,w,B){this.failResult((0,g.not)(x),w,B)}failResult(x,w,B){this.gen.if(x),B?B():this.error(),w?(this.gen.else(),w(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,w){this.failResult((0,g.not)(x),void 0,w)}fail(x){if(x===void 0)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(x),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:w}=this;this.fail(g._`${w} !== undefined && (${(0,g.or)(this.invalid$data(),x)})`)}error(x,w,B){if(w)return this.setParams(w),this._error(x,B),void this.setParams({});this._error(x,B)}_error(x,w){(x?jt.reportExtraError:jt.reportError)(this,this.def.error,w)}$dataError(){(0,jt.reportError)(this,this.def.$dataError||jt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,jt.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,w){w?Object.assign(this.params,x):this.params=x}block$data(x,w,B=g.nil){this.gen.block(()=>{this.check$data(x,B),w()})}check$data(x=g.nil,w=g.nil){if(!this.$data)return;const{gen:B,schemaCode:R,schemaType:T,def:E}=this;B.if((0,g.or)(g._`${R} === undefined`,w)),x!==g.nil&&B.assign(x,!0),(T.length||E.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),x!==g.nil&&B.assign(x,!1)),B.else()}invalid$data(){const{gen:x,schemaCode:w,schemaType:B,def:R,it:T}=this;return(0,g.or)(function(){if(B.length){if(!(w instanceof g.Name))throw new Error("ajv implementation error");const E=Array.isArray(B)?B:[B];return g._`${(0,r.checkDataTypes)(E,w,T.opts.strictNumbers,r.DataType.Wrong)}`}return g.nil}(),function(){if(R.validateSchema){const E=x.scopeValue("validate$data",{ref:R.validateSchema});return g._`!${E}(${w})`}return g.nil}())}subschema(x,w){const B=(0,Vi.getSubschema)(this.it,x);(0,Vi.extendSubschemaData)(B,this.it,x),(0,Vi.extendSubschemaMode)(B,x);const R={...this.it,...B,items:void 0,props:void 0};return function(T,E){a(T)&&(o(T),i(T))?function(P,I){const{schema:M,gen:V,opts:G}=P;G.$comment&&M.$comment&&c(P),function(J){const re=J.schema[J.opts.schemaId];re&&(J.baseId=(0,lt.resolveUrl)(J.opts.uriResolver,J.baseId,re))}(P),function(J){if(J.schema.$async&&!J.schemaEnv.$async)throw new Error("async schema in sync schema")}(P);const K=V.const("_errs",te.default.errors);l(P,K),V.var(I,g._`${K} === ${te.default.errors}`)}(T,E):(0,Bc.boolOrEmptySchema)(T,E)}(R,w),R}mergeEvaluated(x,w){const{it:B,gen:R}=this;B.opts.unevaluated&&(B.props!==!0&&x.props!==void 0&&(B.props=me.mergeEvaluated.props(R,x.props,B.props,w)),B.items!==!0&&x.items!==void 0&&(B.items=me.mergeEvaluated.items(R,x.items,B.items,w)))}mergeValidEvaluated(x,w){const{it:B,gen:R}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return R.if(w,()=>this.mergeEvaluated(x,g.Name)),!0}}function y($,x,w,B){const R=new p($,w,x);"code"in w?w.code(R,B):R.$data&&w.validate?(0,$n.funcKeywordCode)(R,w):"macro"in w?(0,$n.macroKeywordCode)(R,w):(w.compile||w.validate)&&(0,$n.funcKeywordCode)(R,w)}e.KeywordCxt=p;const b=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O($,{dataLevel:x,dataNames:w,dataPathArr:B}){let R,T;if($==="")return te.default.rootData;if($[0]==="/"){if(!b.test($))throw new Error(`Invalid JSON-pointer: ${$}`);R=$,T=te.default.rootData}else{const M=k.exec($);if(!M)throw new Error(`Invalid JSON-pointer: ${$}`);const V=+M[1];if(R=M[2],R==="#"){if(V>=x)throw new Error(I("property/index",V));return B[x-V]}if(V>x)throw new Error(I("data",V));if(T=w[x-V],!R)return T}let E=T;const P=R.split("/");for(const M of P)M&&(T=g._`${T}${(0,g.getProperty)((0,me.unescapeJsonPointer)(M))}`,E=g._`${E} && ${T}`);return E;function I(M,V){return`Cannot access ${M} ${V} levels up, current level is ${x}`}}e.getData=O});class eg extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}var Uc=Object.defineProperty({default:eg},"__esModule",{value:!0});class tg extends Error{constructor(e,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,lt.resolveUrl)(e,r,n),this.missingSchema=(0,lt.normalizeId)((0,lt.getFullPath)(e,this.missingRef))}}var Ri=Object.defineProperty({default:tg},"__esModule",{value:!0}),rr=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;class r{constructor(h){var u;let m;this.refs={},this.dynamicAnchors={},typeof h.schema=="object"&&(m=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(u=h.baseId)!==null&&u!==void 0?u:(0,lt.normalizeId)(m==null?void 0:m[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=m==null?void 0:m.$async,this.refs={}}}function n(d){const h=i.call(this,d);if(h)return h;const u=(0,lt.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:m,lines:p}=this.opts.code,{ownProperties:y}=this.opts,b=new g.CodeGen(this.scope,{es5:m,lines:p,ownProperties:y});let k;d.$async&&(k=b.scopeValue("Error",{ref:Uc.default,code:g._`require("ajv/dist/runtime/validation_error").default`}));const O=b.scopeName("validate");d.validateName=O;const $={gen:b,allErrors:this.opts.allErrors,data:te.default.data,parentData:te.default.parentData,parentDataProperty:te.default.parentDataProperty,dataNames:[te.default.data],dataPathArr:[g.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:b.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,g.stringify)(d.schema)}:{ref:d.schema}),validateName:O,ValidationError:k,schema:d.schema,schemaEnv:d,rootId:u,baseId:d.baseId||u,schemaPath:g.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:g._`""`,opts:this.opts,self:this};let x;try{this._compilations.add(d),(0,_n.validateFunctionCode)($),b.optimize(this.opts.code.optimize);const w=b.toString();x=`${b.scopeRefs(te.default.scope)}return ${w}`,this.opts.code.process&&(x=this.opts.code.process(x,d));const B=new Function(`${te.default.self}`,`${te.default.scope}`,x)(this,this.scope.get());if(this.scope.value(O,{ref:B}),B.errors=null,B.schema=d.schema,B.schemaEnv=d,d.$async&&(B.$async=!0),this.opts.code.source===!0&&(B.source={validateName:O,validateCode:w,scopeValues:b._values}),this.opts.unevaluated){const{props:R,items:T}=$;B.evaluated={props:R instanceof g.Name?void 0:R,items:T instanceof g.Name?void 0:T,dynamicProps:R instanceof g.Name,dynamicItems:T instanceof g.Name},B.source&&(B.source.evaluated=(0,g.stringify)(B.evaluated))}return d.validate=B,d}catch(w){throw delete d.validate,delete d.validateName,x&&this.logger.error("Error compiling schema, function code:",x),w}finally{this._compilations.delete(d)}}function s(d){return(0,lt.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:n.call(this,d)}function i(d){for(const m of this._compilations)if((h=m).schema===(u=d).schema&&h.root===u.root&&h.baseId===u.baseId)return m;var h,u}function a(d,h){let u;for(;typeof(u=this.refs[h])=="string";)h=u;return u||this.schemas[h]||o.call(this,d,h)}function o(d,h){const u=this.opts.uriResolver.parse(h),m=(0,lt._getFullPath)(this.opts.uriResolver,u);let p=(0,lt.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&m===p)return c.call(this,u,d);const y=(0,lt.normalizeId)(m),b=this.refs[y]||this.schemas[y];if(typeof b=="string"){const k=o.call(this,d,b);return typeof(k==null?void 0:k.schema)!="object"?void 0:c.call(this,u,k)}if(typeof(b==null?void 0:b.schema)=="object"){if(b.validate||n.call(this,b),y===(0,lt.normalizeId)(h)){const{schema:k}=b,{schemaId:O}=this.opts,$=k[O];return $&&(p=(0,lt.resolveUrl)(this.opts.uriResolver,p,$)),new r({schema:k,schemaId:O,root:d,baseId:p})}return c.call(this,u,b)}}e.SchemaEnv=r,e.compileSchema=n,e.resolveRef=function(d,h,u){var m;u=(0,lt.resolveUrl)(this.opts.uriResolver,h,u);const p=d.refs[u];if(p)return p;let y=a.call(this,d,u);if(y===void 0){const b=(m=d.localRefs)===null||m===void 0?void 0:m[u],{schemaId:k}=this.opts;b&&(y=new r({schema:b,schemaId:k,root:d,baseId:h}))}return y!==void 0?d.refs[u]=s.call(this,y):void 0},e.getCompilingSchema=i,e.resolveSchema=o;const l=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function c(d,{baseId:h,schema:u,root:m}){var p;if(((p=d.fragment)===null||p===void 0?void 0:p[0])!=="/")return;for(const k of d.fragment.slice(1).split("/")){if(typeof u=="boolean")return;const O=u[(0,me.unescapeFragment)(k)];if(O===void 0)return;const $=typeof(u=O)=="object"&&u[this.opts.schemaId];!l.has(k)&&$&&(h=(0,lt.resolveUrl)(this.opts.uriResolver,h,$))}let y;if(typeof u!="boolean"&&u.$ref&&!(0,me.schemaHasRulesButRef)(u,this.RULES)){const k=(0,lt.resolveUrl)(this.opts.uriResolver,h,u.$ref);y=o.call(this,m,k)}const{schemaId:b}=this.opts;return y=y||new r({schema:u,schemaId:b,root:m,baseId:h}),y.schema!==y.root.schema?y:void 0}}),Wc={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},qc=Xe(function(t,e){(function(r){function n(){for(var j=arguments.length,F=Array(j),A=0;A<j;A++)F[A]=arguments[A];if(F.length>1){F[0]=F[0].slice(0,-1);for(var H=F.length-1,ae=1;ae<H;++ae)F[ae]=F[ae].slice(1,-1);return F[H]=F[H].slice(1),F.join("")}return F[0]}function s(j){return"(?:"+j+")"}function i(j){return j===void 0?"undefined":j===null?"null":Object.prototype.toString.call(j).split(" ").pop().split("]").shift().toLowerCase()}function a(j){return j.toUpperCase()}function o(j){var F="[A-Za-z]",A="[0-9]",H=n(A,"[A-Fa-f]"),ae=s(s("%[EFef]"+H+"%"+H+H+"%"+H+H)+"|"+s("%[89A-Fa-f]"+H+"%"+H+H)+"|"+s("%"+H+H)),pe="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",we=n("[\\:\\/\\?\\#\\[\\]\\@]",pe),Te=j?"[\\uE000-\\uF8FF]":"[]",Ne=n(F,A,"[\\-\\.\\_\\~]",j?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");s(F+n(F,A,"[\\+\\-\\.]")+"*"),s(s(ae+"|"+n(Ne,pe,"[\\:]"))+"*");var ze=s(s("25[0-5]")+"|"+s("2[0-4][0-9]")+"|"+s("1[0-9][0-9]")+"|"+s("0?[1-9][0-9]")+"|0?0?"+A),et=s(ze+"\\."+ze+"\\."+ze+"\\."+ze),Ee=s(H+"{1,4}"),qe=s(s(Ee+"\\:"+Ee)+"|"+et),Ze=s(s(Ee+"\\:")+"{6}"+qe),ct=s("\\:\\:"+s(Ee+"\\:")+"{5}"+qe),He=s(s(Ee)+"?\\:\\:"+s(Ee+"\\:")+"{4}"+qe),ut=s(s(s(Ee+"\\:")+"{0,1}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{3}"+qe),yt=s(s(s(Ee+"\\:")+"{0,2}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{2}"+qe),wt=s(s(s(Ee+"\\:")+"{0,3}"+Ee)+"?\\:\\:"+Ee+"\\:"+qe),nr=s(s(s(Ee+"\\:")+"{0,4}"+Ee)+"?\\:\\:"+qe),sr=s(s(s(Ee+"\\:")+"{0,5}"+Ee)+"?\\:\\:"+Ee),kt=s(s(s(Ee+"\\:")+"{0,6}"+Ee)+"?\\:\\:"),At=s([Ze,ct,He,ut,yt,wt,nr,sr,kt].join("|")),Wt=s(s(Ne+"|"+ae)+"+");s("[vV]"+H+"+\\."+n(Ne,pe,"[\\:]")+"+"),s(s(ae+"|"+n(Ne,pe))+"*");var Ft=s(ae+"|"+n(Ne,pe,"[\\:\\@]"));return s(s(ae+"|"+n(Ne,pe,"[\\@]"))+"+"),s(s(Ft+"|"+n("[\\/\\?]",Te))+"*"),{NOT_SCHEME:new RegExp(n("[^]",F,A,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Ne,pe),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Ne,pe),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Ne,pe),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Ne,pe),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Ne,pe,"[\\:\\@\\/\\?]",Te),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Ne,pe,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Ne,pe),"g"),UNRESERVED:new RegExp(Ne,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Ne,we),"g"),PCT_ENCODED:new RegExp(ae,"g"),IPV4ADDRESS:new RegExp("^("+et+")$"),IPV6ADDRESS:new RegExp("^\\[?("+At+")"+s(s("\\%25|\\%(?!"+H+"{2})")+"("+Wt+")")+"?\\]?$")}}var l=o(!1),c=o(!0),d=function(j,F){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return function(A,H){var ae=[],pe=!0,we=!1,Te=void 0;try{for(var Ne,ze=A[Symbol.iterator]();!(pe=(Ne=ze.next()).done)&&(ae.push(Ne.value),!H||ae.length!==H);pe=!0);}catch(et){we=!0,Te=et}finally{try{!pe&&ze.return&&ze.return()}finally{if(we)throw Te}}return ae}(j,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")},h=2147483647,u=36,m=/^xn--/,p=/[^\0-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,O=String.fromCharCode;function $(j){throw new RangeError(b[j])}function x(j,F){var A=j.split("@"),H="";return A.length>1&&(H=A[0]+"@",j=A[1]),H+function(ae,pe){for(var we=[],Te=ae.length;Te--;)we[Te]=pe(ae[Te]);return we}((j=j.replace(y,".")).split("."),F).join(".")}var w=function(j,F){return j+22+75*(j<26)-((F!=0)<<5)},B=function(j,F,A){var H=0;for(j=A?k(j/700):j>>1,j+=k(j/F);j>455;H+=u)j=k(j/35);return k(H+36*j/(j+38))},R=function(j){return x(j,function(F){return p.test(F)?"xn--"+function(A){var H=[],ae=(A=function(_e){for(var dt=[],Qe=0,nt=_e.length;Qe<nt;){var mt=_e.charCodeAt(Qe++);if(mt>=55296&&mt<=56319&&Qe<nt){var ir=_e.charCodeAt(Qe++);(64512&ir)==56320?dt.push(((1023&mt)<<10)+(1023&ir)+65536):(dt.push(mt),Qe--)}else dt.push(mt)}return dt}(A)).length,pe=128,we=0,Te=72,Ne=!0,ze=!1,et=void 0;try{for(var Ee,qe=A[Symbol.iterator]();!(Ne=(Ee=qe.next()).done);Ne=!0){var Ze=Ee.value;Ze<128&&H.push(O(Ze))}}catch(_e){ze=!0,et=_e}finally{try{!Ne&&qe.return&&qe.return()}finally{if(ze)throw et}}var ct=H.length,He=ct;for(ct&&H.push("-");He<ae;){var ut=h,yt=!0,wt=!1,nr=void 0;try{for(var sr,kt=A[Symbol.iterator]();!(yt=(sr=kt.next()).done);yt=!0){var At=sr.value;At>=pe&&At<ut&&(ut=At)}}catch(_e){wt=!0,nr=_e}finally{try{!yt&&kt.return&&kt.return()}finally{if(wt)throw nr}}var Wt=He+1;ut-pe>k((h-we)/Wt)&&$("overflow"),we+=(ut-pe)*Wt,pe=ut;var Ft=!0,ps=!1,gs=void 0;try{for(var ys,N=A[Symbol.iterator]();!(Ft=(ys=N.next()).done);Ft=!0){var ne=ys.value;if(ne<pe&&++we>h&&$("overflow"),ne==pe){for(var ue=we,xe=u;;xe+=u){var Ie=xe<=Te?1:xe>=Te+26?26:xe-Te;if(ue<Ie)break;var Ge=ue-Ie,Ce=u-Ie;H.push(O(w(Ie+Ge%Ce,0))),ue=k(Ge/Ce)}H.push(O(w(ue,0))),Te=B(we,Wt,He==ct),we=0,++He}}}catch(_e){ps=!0,gs=_e}finally{try{!Ft&&N.return&&N.return()}finally{if(ps)throw gs}}++we,++pe}return H.join("")}(F):F})},T=function(j){return x(j,function(F){return m.test(F)?function(A){var H,ae=[],pe=A.length,we=0,Te=128,Ne=72,ze=A.lastIndexOf("-");ze<0&&(ze=0);for(var et=0;et<ze;++et)A.charCodeAt(et)>=128&&$("not-basic"),ae.push(A.charCodeAt(et));for(var Ee=ze>0?ze+1:0;Ee<pe;){for(var qe=we,Ze=1,ct=u;;ct+=u){Ee>=pe&&$("invalid-input");var He=(H=A.charCodeAt(Ee++))-48<10?H-22:H-65<26?H-65:H-97<26?H-97:u;(He>=u||He>k((h-we)/Ze))&&$("overflow"),we+=He*Ze;var ut=ct<=Ne?1:ct>=Ne+26?26:ct-Ne;if(He<ut)break;var yt=u-ut;Ze>k(h/yt)&&$("overflow"),Ze*=yt}var wt=ae.length+1;Ne=B(we-qe,wt,qe==0),k(we/wt)>h-Te&&$("overflow"),Te+=k(we/wt),we%=wt,ae.splice(we++,0,Te)}return String.fromCodePoint.apply(String,ae)}(F.slice(4).toLowerCase()):F})},E={};function P(j){var F=j.charCodeAt(0);return F<16?"%0"+F.toString(16).toUpperCase():F<128?"%"+F.toString(16).toUpperCase():F<2048?"%"+(F>>6|192).toString(16).toUpperCase()+"%"+(63&F|128).toString(16).toUpperCase():"%"+(F>>12|224).toString(16).toUpperCase()+"%"+(F>>6&63|128).toString(16).toUpperCase()+"%"+(63&F|128).toString(16).toUpperCase()}function I(j){for(var F="",A=0,H=j.length;A<H;){var ae=parseInt(j.substr(A+1,2),16);if(ae<128)F+=String.fromCharCode(ae),A+=3;else if(ae>=194&&ae<224){if(H-A>=6){var pe=parseInt(j.substr(A+4,2),16);F+=String.fromCharCode((31&ae)<<6|63&pe)}else F+=j.substr(A,6);A+=6}else if(ae>=224){if(H-A>=9){var we=parseInt(j.substr(A+4,2),16),Te=parseInt(j.substr(A+7,2),16);F+=String.fromCharCode((15&ae)<<12|(63&we)<<6|63&Te)}else F+=j.substr(A,9);A+=9}else F+=j.substr(A,3),A+=3}return F}function M(j,F){function A(H){var ae=I(H);return ae.match(F.UNRESERVED)?ae:H}return j.scheme&&(j.scheme=String(j.scheme).replace(F.PCT_ENCODED,A).toLowerCase().replace(F.NOT_SCHEME,"")),j.userinfo!==void 0&&(j.userinfo=String(j.userinfo).replace(F.PCT_ENCODED,A).replace(F.NOT_USERINFO,P).replace(F.PCT_ENCODED,a)),j.host!==void 0&&(j.host=String(j.host).replace(F.PCT_ENCODED,A).toLowerCase().replace(F.NOT_HOST,P).replace(F.PCT_ENCODED,a)),j.path!==void 0&&(j.path=String(j.path).replace(F.PCT_ENCODED,A).replace(j.scheme?F.NOT_PATH:F.NOT_PATH_NOSCHEME,P).replace(F.PCT_ENCODED,a)),j.query!==void 0&&(j.query=String(j.query).replace(F.PCT_ENCODED,A).replace(F.NOT_QUERY,P).replace(F.PCT_ENCODED,a)),j.fragment!==void 0&&(j.fragment=String(j.fragment).replace(F.PCT_ENCODED,A).replace(F.NOT_FRAGMENT,P).replace(F.PCT_ENCODED,a)),j}function V(j){return j.replace(/^0*(.*)/,"$1")||"0"}function G(j,F){var A=j.match(F.IPV4ADDRESS)||[],H=d(A,2)[1];return H?H.split(".").map(V).join("."):j}function K(j,F){var A=j.match(F.IPV6ADDRESS)||[],H=d(A,3),ae=H[1],pe=H[2];if(ae){for(var we=ae.toLowerCase().split("::").reverse(),Te=d(we,2),Ne=Te[0],ze=Te[1],et=ze?ze.split(":").map(V):[],Ee=Ne.split(":").map(V),qe=F.IPV4ADDRESS.test(Ee[Ee.length-1]),Ze=qe?7:8,ct=Ee.length-Ze,He=Array(Ze),ut=0;ut<Ze;++ut)He[ut]=et[ut]||Ee[ct+ut]||"";qe&&(He[Ze-1]=G(He[Ze-1],F));var yt=He.reduce(function(kt,At,Wt){if(!At||At==="0"){var Ft=kt[kt.length-1];Ft&&Ft.index+Ft.length===Wt?Ft.length++:kt.push({index:Wt,length:1})}return kt},[]).sort(function(kt,At){return At.length-kt.length})[0],wt=void 0;if(yt&&yt.length>1){var nr=He.slice(0,yt.index),sr=He.slice(yt.index+yt.length);wt=nr.join(":")+"::"+sr.join(":")}else wt=He.join(":");return pe&&(wt+="%"+pe),wt}return j}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,re="".match(/(){0}/)[1]===void 0;function se(j){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A={},H=F.iri!==!1?c:l;F.reference==="suffix"&&(j=(F.scheme?F.scheme+":":"")+"//"+j);var ae=j.match(J);if(ae){re?(A.scheme=ae[1],A.userinfo=ae[3],A.host=ae[4],A.port=parseInt(ae[5],10),A.path=ae[6]||"",A.query=ae[7],A.fragment=ae[8],isNaN(A.port)&&(A.port=ae[5])):(A.scheme=ae[1]||void 0,A.userinfo=j.indexOf("@")!==-1?ae[3]:void 0,A.host=j.indexOf("//")!==-1?ae[4]:void 0,A.port=parseInt(ae[5],10),A.path=ae[6]||"",A.query=j.indexOf("?")!==-1?ae[7]:void 0,A.fragment=j.indexOf("#")!==-1?ae[8]:void 0,isNaN(A.port)&&(A.port=j.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ae[4]:void 0)),A.host&&(A.host=K(G(A.host,H),H)),A.reference=A.scheme!==void 0||A.userinfo!==void 0||A.host!==void 0||A.port!==void 0||A.path||A.query!==void 0?A.scheme===void 0?"relative":A.fragment===void 0?"absolute":"uri":"same-document",F.reference&&F.reference!=="suffix"&&F.reference!==A.reference&&(A.error=A.error||"URI is not a "+F.reference+" reference.");var pe=E[(F.scheme||A.scheme||"").toLowerCase()];if(F.unicodeSupport||pe&&pe.unicodeSupport)M(A,H);else{if(A.host&&(F.domainHost||pe&&pe.domainHost))try{A.host=R(A.host.replace(H.PCT_ENCODED,I).toLowerCase())}catch(we){A.error=A.error||"Host's domain name can not be converted to ASCII via punycode: "+we}M(A,l)}pe&&pe.parse&&pe.parse(A,F)}else A.error=A.error||"URI can not be parsed.";return A}function D(j,F){var A=F.iri!==!1?c:l,H=[];return j.userinfo!==void 0&&(H.push(j.userinfo),H.push("@")),j.host!==void 0&&H.push(K(G(String(j.host),A),A).replace(A.IPV6ADDRESS,function(ae,pe,we){return"["+pe+(we?"%25"+we:"")+"]"})),typeof j.port!="number"&&typeof j.port!="string"||(H.push(":"),H.push(String(j.port))),H.length?H.join(""):void 0}var _=/^\.\.?\//,L=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,Z=/^\/?(?:.|\n)*?(?=\/|$)/;function ee(j){for(var F=[];j.length;)if(j.match(_))j=j.replace(_,"");else if(j.match(L))j=j.replace(L,"/");else if(j.match(q))j=j.replace(q,"/"),F.pop();else if(j==="."||j==="..")j="";else{var A=j.match(Z);if(!A)throw new Error("Unexpected dot segment condition");var H=A[0];j=j.slice(H.length),F.push(H)}return F.join("")}function ce(j){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=F.iri?c:l,H=[],ae=E[(F.scheme||j.scheme||"").toLowerCase()];if(ae&&ae.serialize&&ae.serialize(j,F),j.host&&!A.IPV6ADDRESS.test(j.host)){if(F.domainHost||ae&&ae.domainHost)try{j.host=F.iri?T(j.host):R(j.host.replace(A.PCT_ENCODED,I).toLowerCase())}catch(Te){j.error=j.error||"Host's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+Te}}M(j,A),F.reference!=="suffix"&&j.scheme&&(H.push(j.scheme),H.push(":"));var pe=D(j,F);if(pe!==void 0&&(F.reference!=="suffix"&&H.push("//"),H.push(pe),j.path&&j.path.charAt(0)!=="/"&&H.push("/")),j.path!==void 0){var we=j.path;F.absolutePath||ae&&ae.absolutePath||(we=ee(we)),pe===void 0&&(we=we.replace(/^\/\//,"/%2F")),H.push(we)}return j.query!==void 0&&(H.push("?"),H.push(j.query)),j.fragment!==void 0&&(H.push("#"),H.push(j.fragment)),H.join("")}function z(j,F){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},H={};return arguments[3]||(j=se(ce(j,A),A),F=se(ce(F,A),A)),!(A=A||{}).tolerant&&F.scheme?(H.scheme=F.scheme,H.userinfo=F.userinfo,H.host=F.host,H.port=F.port,H.path=ee(F.path||""),H.query=F.query):(F.userinfo!==void 0||F.host!==void 0||F.port!==void 0?(H.userinfo=F.userinfo,H.host=F.host,H.port=F.port,H.path=ee(F.path||""),H.query=F.query):(F.path?(F.path.charAt(0)==="/"?H.path=ee(F.path):(H.path=j.userinfo===void 0&&j.host===void 0&&j.port===void 0||j.path?j.path?j.path.slice(0,j.path.lastIndexOf("/")+1)+F.path:F.path:"/"+F.path,H.path=ee(H.path)),H.query=F.query):(H.path=j.path,H.query=F.query!==void 0?F.query:j.query),H.userinfo=j.userinfo,H.host=j.host,H.port=j.port),H.scheme=j.scheme),H.fragment=F.fragment,H}function ve(j,F){return j&&j.toString().replace(F&&F.iri?c.PCT_ENCODED:l.PCT_ENCODED,I)}var ie={scheme:"http",domainHost:!0,parse:function(j,F){return j.host||(j.error=j.error||"HTTP URIs must have a host."),j},serialize:function(j,F){var A=String(j.scheme).toLowerCase()==="https";return j.port!==(A?443:80)&&j.port!==""||(j.port=void 0),j.path||(j.path="/"),j}},Pe={scheme:"https",domainHost:ie.domainHost,parse:ie.parse,serialize:ie.serialize};function $e(j){return typeof j.secure=="boolean"?j.secure:String(j.scheme).toLowerCase()==="wss"}var Se={scheme:"ws",domainHost:!0,parse:function(j,F){var A=j;return A.secure=$e(A),A.resourceName=(A.path||"/")+(A.query?"?"+A.query:""),A.path=void 0,A.query=void 0,A},serialize:function(j,F){if(j.port!==($e(j)?443:80)&&j.port!==""||(j.port=void 0),typeof j.secure=="boolean"&&(j.scheme=j.secure?"wss":"ws",j.secure=void 0),j.resourceName){var A=j.resourceName.split("?"),H=d(A,2),ae=H[0],pe=H[1];j.path=ae&&ae!=="/"?ae:void 0,j.query=pe,j.resourceName=void 0}return j.fragment=void 0,j}},X={scheme:"wss",domainHost:Se.domainHost,parse:Se.parse,serialize:Se.serialize},Be={},Ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",C="[0-9A-Fa-f]",U=s(s("%[EFef][0-9A-Fa-f]%"+C+C+"%"+C+C)+"|"+s("%[89A-Fa-f][0-9A-Fa-f]%"+C+C)+"|"+s("%"+C+C)),W=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),le=new RegExp(Ve,"g"),oe=new RegExp(U,"g"),Q=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',W),"g"),ge=new RegExp(n("[^]",Ve,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Ae=ge;function Oe(j){var F=I(j);return F.match(le)?F:j}var ye={scheme:"mailto",parse:function(j,F){var A=j,H=A.to=A.path?A.path.split(","):[];if(A.path=void 0,A.query){for(var ae=!1,pe={},we=A.query.split("&"),Te=0,Ne=we.length;Te<Ne;++Te){var ze=we[Te].split("=");switch(ze[0]){case"to":for(var et=ze[1].split(","),Ee=0,qe=et.length;Ee<qe;++Ee)H.push(et[Ee]);break;case"subject":A.subject=ve(ze[1],F);break;case"body":A.body=ve(ze[1],F);break;default:ae=!0,pe[ve(ze[0],F)]=ve(ze[1],F)}}ae&&(A.headers=pe)}A.query=void 0;for(var Ze=0,ct=H.length;Ze<ct;++Ze){var He=H[Ze].split("@");if(He[0]=ve(He[0]),F.unicodeSupport)He[1]=ve(He[1],F).toLowerCase();else try{He[1]=R(ve(He[1],F).toLowerCase())}catch(ut){A.error=A.error||"Email address's domain name can not be converted to ASCII via punycode: "+ut}H[Ze]=He.join("@")}return A},serialize:function(j,F){var A,H=j,ae=(A=j.to)!=null?A instanceof Array?A:typeof A.length!="number"||A.split||A.setInterval||A.call?[A]:Array.prototype.slice.call(A):[];if(ae){for(var pe=0,we=ae.length;pe<we;++pe){var Te=String(ae[pe]),Ne=Te.lastIndexOf("@"),ze=Te.slice(0,Ne).replace(oe,Oe).replace(oe,a).replace(Q,P),et=Te.slice(Ne+1);try{et=F.iri?T(et):R(ve(et,F).toLowerCase())}catch(ct){H.error=H.error||"Email address's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+ct}ae[pe]=ze+"@"+et}H.path=ae.join(",")}var Ee=j.headers=j.headers||{};j.subject&&(Ee.subject=j.subject),j.body&&(Ee.body=j.body);var qe=[];for(var Ze in Ee)Ee[Ze]!==Be[Ze]&&qe.push(Ze.replace(oe,Oe).replace(oe,a).replace(ge,P)+"="+Ee[Ze].replace(oe,Oe).replace(oe,a).replace(Ae,P));return qe.length&&(H.query=qe.join("&")),H}},Ke=/^([^\:]+)\:(.*)/,Ot={scheme:"urn",parse:function(j,F){var A=j.path&&j.path.match(Ke),H=j;if(A){var ae=F.scheme||H.scheme||"urn",pe=A[1].toLowerCase(),we=A[2],Te=E[ae+":"+(F.nid||pe)];H.nid=pe,H.nss=we,H.path=void 0,Te&&(H=Te.parse(H,F))}else H.error=H.error||"URN can not be parsed.";return H},serialize:function(j,F){var A=j.nid,H=E[(F.scheme||j.scheme||"urn")+":"+(F.nid||A)];H&&(j=H.serialize(j,F));var ae=j;return ae.path=(A||F.nid)+":"+j.nss,ae}},$t=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,_t={scheme:"urn:uuid",parse:function(j,F){var A=j;return A.uuid=A.nss,A.nss=void 0,F.tolerant||A.uuid&&A.uuid.match($t)||(A.error=A.error||"UUID is not valid."),A},serialize:function(j,F){var A=j;return A.nss=(j.uuid||"").toLowerCase(),A}};E[ie.scheme]=ie,E[Pe.scheme]=Pe,E[Se.scheme]=Se,E[X.scheme]=X,E[ye.scheme]=ye,E[Ot.scheme]=Ot,E[_t.scheme]=_t,r.SCHEMES=E,r.pctEncChar=P,r.pctDecChars=I,r.parse=se,r.removeDotSegments=ee,r.serialize=ce,r.resolveComponents=z,r.resolve=function(j,F,A){var H=function(ae,pe){var we={scheme:"null"};if(pe)for(var Te in pe)we[Te]=pe[Te];return we}(0,A);return ce(z(se(j,H),se(F,H),H,!0),H)},r.normalize=function(j,F){return typeof j=="string"?j=ce(se(j,F),F):i(j)==="object"&&(j=se(ce(j,F),F)),j},r.equal=function(j,F,A){return typeof j=="string"?j=ce(se(j,A),A):i(j)==="object"&&(j=ce(j,A)),typeof F=="string"?F=ce(se(F,A),A):i(F)==="object"&&(F=ce(F,A)),j===F},r.escapeComponent=function(j,F){return j&&j.toString().replace(F&&F.iri?c.ESCAPE:l.ESCAPE,P)},r.unescapeComponent=ve,Object.defineProperty(r,"__esModule",{value:!0})})(e)});qc.code='require("ajv/dist/runtime/uri").default';var rg=Object.defineProperty({default:qc},"__esModule",{value:!0}),ng=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0,Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return _n.KeywordCxt}}),Object.defineProperty(e,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});const r=g,n=(T,E)=>new RegExp(T,E);n.code="new RegExp";const s=["removeAdditional","useDefaults","coerceTypes"],i=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function l(T){var E,P,I,M,V,G,K,J,re,se,D,_,L,q,Z,ee,ce,z,ve,ie,Pe,$e,Se,X,Be;const Ve=T.strict,C=(E=T.code)===null||E===void 0?void 0:E.optimize,U=C===!0||C===void 0?1:C||0,W=(I=(P=T.code)===null||P===void 0?void 0:P.regExp)!==null&&I!==void 0?I:n,le=(M=T.uriResolver)!==null&&M!==void 0?M:rg.default;return{strictSchema:(G=(V=T.strictSchema)!==null&&V!==void 0?V:Ve)===null||G===void 0||G,strictNumbers:(J=(K=T.strictNumbers)!==null&&K!==void 0?K:Ve)===null||J===void 0||J,strictTypes:(se=(re=T.strictTypes)!==null&&re!==void 0?re:Ve)!==null&&se!==void 0?se:"log",strictTuples:(_=(D=T.strictTuples)!==null&&D!==void 0?D:Ve)!==null&&_!==void 0?_:"log",strictRequired:(q=(L=T.strictRequired)!==null&&L!==void 0?L:Ve)!==null&&q!==void 0&&q,code:T.code?{...T.code,optimize:U,regExp:W}:{optimize:U,regExp:W},loopRequired:(Z=T.loopRequired)!==null&&Z!==void 0?Z:200,loopEnum:(ee=T.loopEnum)!==null&&ee!==void 0?ee:200,meta:(ce=T.meta)===null||ce===void 0||ce,messages:(z=T.messages)===null||z===void 0||z,inlineRefs:(ve=T.inlineRefs)===null||ve===void 0||ve,schemaId:(ie=T.schemaId)!==null&&ie!==void 0?ie:"$id",addUsedSchema:(Pe=T.addUsedSchema)===null||Pe===void 0||Pe,validateSchema:($e=T.validateSchema)===null||$e===void 0||$e,validateFormats:(Se=T.validateFormats)===null||Se===void 0||Se,unicodeRegExp:(X=T.unicodeRegExp)===null||X===void 0||X,int32range:(Be=T.int32range)===null||Be===void 0||Be,uriResolver:le}}class c{constructor(E={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts={...E,...l(E)};const{es5:P,lines:I}=this.opts.code;this.scope=new r.ValueScope({scope:{},prefixes:i,es5:P,lines:I}),this.logger=function(V){if(V===!1)return b;if(V===void 0)return console;if(V.log&&V.warn&&V.error)return V;throw new Error("logger must implement log, warn and error methods")}(E.logger);const M=E.validateFormats;E.validateFormats=!1,this.RULES=(0,zc.getRules)(),d.call(this,a,E,"NOT SUPPORTED"),d.call(this,o,E,"DEPRECATED","warn"),this._metaOpts=y.call(this),E.formats&&m.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&p.call(this,E.keywords),typeof E.meta=="object"&&this.addMetaSchema(E.meta),u.call(this),E.validateFormats=M}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:E,meta:P,schemaId:I}=this.opts;let M=Wc;I==="id"&&(M={...Wc},M.id=M.$id,delete M.$id),P&&E&&this.addMetaSchema(M,M[I],!1)}defaultMeta(){const{meta:E,schemaId:P}=this.opts;return this.opts.defaultMeta=typeof E=="object"?E[P]||E:void 0}validate(E,P){let I;if(typeof E=="string"){if(I=this.getSchema(E),!I)throw new Error(`no schema with key or ref "${E}"`)}else I=this.compile(E);const M=I(P);return"$async"in I||(this.errors=I.errors),M}compile(E,P){const I=this._addSchema(E,P);return I.validate||this._compileSchemaEnv(I)}compileAsync(E,P){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return M.call(this,E,P);async function M(se,D){await V.call(this,se.$schema);const _=this._addSchema(se,D);return _.validate||G.call(this,_)}async function V(se){se&&!this.getSchema(se)&&await M.call(this,{$ref:se},!0)}async function G(se){try{return this._compileSchemaEnv(se)}catch(D){if(!(D instanceof Ri.default))throw D;return K.call(this,D),await J.call(this,D.missingSchema),G.call(this,se)}}function K({missingSchema:se,missingRef:D}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${D} cannot be resolved`)}async function J(se){const D=await re.call(this,se);this.refs[se]||await V.call(this,D.$schema),this.refs[se]||this.addSchema(D,se,P)}async function re(se){const D=this._loading[se];if(D)return D;try{return await(this._loading[se]=I(se))}finally{delete this._loading[se]}}}addSchema(E,P,I,M=this.opts.validateSchema){if(Array.isArray(E)){for(const G of E)this.addSchema(G,void 0,I,M);return this}let V;if(typeof E=="object"){const{schemaId:G}=this.opts;if(V=E[G],V!==void 0&&typeof V!="string")throw new Error(`schema ${G} must be string`)}return P=(0,lt.normalizeId)(P||V),this._checkUnique(P),this.schemas[P]=this._addSchema(E,I,P,M,!0),this}addMetaSchema(E,P,I=this.opts.validateSchema){return this.addSchema(E,P,!0,I),this}validateSchema(E,P){if(typeof E=="boolean")return!0;let I;if(I=E.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const M=this.validate(I,E);if(!M&&P){const V="schema is invalid: "+this.errorsText();if(this.opts.validateSchema!=="log")throw new Error(V);this.logger.error(V)}return M}getSchema(E){let P;for(;typeof(P=h.call(this,E))=="string";)E=P;if(P===void 0){const{schemaId:I}=this.opts,M=new rr.SchemaEnv({schema:{},schemaId:I});if(P=rr.resolveSchema.call(this,M,E),!P)return;this.refs[E]=P}return P.validate||this._compileSchemaEnv(P)}removeSchema(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(typeof E){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const P=h.call(this,E);return typeof P=="object"&&this._cache.delete(P.schema),delete this.schemas[E],delete this.refs[E],this}case"object":{this._cache.delete(E);let P=E[this.opts.schemaId];return P&&(P=(0,lt.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(E){for(const P of E)this.addKeyword(P);return this}addKeyword(E,P){let I;if(typeof E=="string")I=E,typeof P=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),P.keyword=I);else{if(typeof E!="object"||P!==void 0)throw new Error("invalid addKeywords parameters");if(I=(P=E).keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(O.call(this,I,P),!P)return(0,me.eachItem)(I,V=>$.call(this,V)),this;w.call(this,P);const M={...P,type:(0,Yt.getJSONTypes)(P.type),schemaType:(0,Yt.getJSONTypes)(P.schemaType)};return(0,me.eachItem)(I,M.type.length===0?V=>$.call(this,V,M):V=>M.type.forEach(G=>$.call(this,V,M,G))),this}getKeyword(E){const P=this.RULES.all[E];return typeof P=="object"?P.definition:!!P}removeKeyword(E){const{RULES:P}=this;delete P.keywords[E],delete P.all[E];for(const I of P.rules){const M=I.rules.findIndex(V=>V.keyword===E);M>=0&&I.rules.splice(M,1)}return this}addFormat(E,P){return typeof P=="string"&&(P=new RegExp(P)),this.formats[E]=P,this}errorsText(E=this.errors,{separator:P=", ",dataVar:I="data"}={}){return E&&E.length!==0?E.map(M=>`${I}${M.instancePath} ${M.message}`).reduce((M,V)=>M+P+V):"No errors"}$dataMetaSchema(E,P){const I=this.RULES.all;E=JSON.parse(JSON.stringify(E));for(const M of P){const V=M.split("/").slice(1);let G=E;for(const K of V)G=G[K];for(const K in I){const J=I[K];if(typeof J!="object")continue;const{$data:re}=J.definition,se=G[K];re&&se&&(G[K]=R(se))}}return E}_removeAllSchemas(E,P){for(const I in E){const M=E[I];P&&!P.test(I)||(typeof M=="string"?delete E[I]:M&&!M.meta&&(this._cache.delete(M.schema),delete E[I]))}}_addSchema(E,P,I,M=this.opts.validateSchema,V=this.opts.addUsedSchema){let G;const{schemaId:K}=this.opts;if(typeof E=="object")G=E[K];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof E!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(E);if(J!==void 0)return J;I=(0,lt.normalizeId)(G||I);const re=lt.getSchemaRefs.call(this,E,I);return J=new rr.SchemaEnv({schema:E,schemaId:K,meta:P,baseId:I,localRefs:re}),this._cache.set(J.schema,J),V&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=J),M&&this.validateSchema(E,!0),J}_checkUnique(E){if(this.schemas[E]||this.refs[E])throw new Error(`schema with key or id "${E}" already exists`)}_compileSchemaEnv(E){if(E.meta?this._compileMetaSchema(E):rr.compileSchema.call(this,E),!E.validate)throw new Error("ajv implementation error");return E.validate}_compileMetaSchema(E){const P=this.opts;this.opts=this._metaOpts;try{rr.compileSchema.call(this,E)}finally{this.opts=P}}}function d(T,E,P,I="error"){for(const M in T){const V=M;V in E&&this.logger[I](`${P}: option ${M}. ${T[V]}`)}}function h(T){return T=(0,lt.normalizeId)(T),this.schemas[T]||this.refs[T]}function u(){const T=this.opts.schemas;if(T)if(Array.isArray(T))this.addSchema(T);else for(const E in T)this.addSchema(T[E],E)}function m(){for(const T in this.opts.formats){const E=this.opts.formats[T];E&&this.addFormat(T,E)}}function p(T){if(Array.isArray(T))this.addVocabulary(T);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const E in T){const P=T[E];P.keyword||(P.keyword=E),this.addKeyword(P)}}}function y(){const T={...this.opts};for(const E of s)delete T[E];return T}e.default=c,c.ValidationError=Uc.default,c.MissingRefError=Ri.default;const b={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function O(T,E){const{RULES:P}=this;if((0,me.eachItem)(T,I=>{if(P.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!k.test(I))throw new Error(`Keyword ${I} has invalid name`)}),E&&E.$data&&!("code"in E)&&!("validate"in E))throw new Error('$data keyword must have "code" or "validate" function')}function $(T,E,P){var I;const M=E==null?void 0:E.post;if(P&&M)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:V}=this;let G=M?V.post:V.rules.find(({type:J})=>J===P);if(G||(G={type:P,rules:[]},V.rules.push(G)),V.keywords[T]=!0,!E)return;const K={keyword:T,definition:{...E,type:(0,Yt.getJSONTypes)(E.type),schemaType:(0,Yt.getJSONTypes)(E.schemaType)}};E.before?x.call(this,G,K,E.before):G.rules.push(K),V.all[T]=K,(I=E.implements)===null||I===void 0||I.forEach(J=>this.addKeyword(J))}function x(T,E,P){const I=T.rules.findIndex(M=>M.keyword===P);I>=0?T.rules.splice(I,0,E):(T.rules.push(E),this.logger.warn(`rule ${P} is not defined`))}function w(T){let{metaSchema:E}=T;E!==void 0&&(T.$data&&this.opts.$data&&(E=R(E)),T.validateSchema=this.compile(E,!0))}const B={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(T){return{anyOf:[T,B]}}}),sg=Object.defineProperty({default:{keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},"__esModule",{value:!0}),ig=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;const r={keyword:"$ref",schemaType:"string",code(i){const{gen:a,schema:o,it:l}=i,{baseId:c,schemaEnv:d,validateName:h,opts:u,self:m}=l,{root:p}=d;if((o==="#"||o==="#/")&&c===p.baseId)return function(){if(d===p)return s(i,h,d,d.$async);const b=a.scopeValue("root",{ref:p});return s(i,g._`${b}.validate`,p,p.$async)}();const y=rr.resolveRef.call(m,p,c,o);if(y===void 0)throw new Ri.default(l.opts.uriResolver,c,o);return y instanceof rr.SchemaEnv?function(b){const k=n(i,b);s(i,k,b,b.$async)}(y):function(b){const k=a.scopeValue("schema",u.code.source===!0?{ref:b,code:(0,g.stringify)(b)}:{ref:b}),O=a.name("valid"),$=i.subschema({schema:b,dataTypes:[],schemaPath:g.nil,topSchemaRef:k,errSchemaPath:o},O);i.mergeEvaluated($),i.ok(O)}(y)}};function n(i,a){const{gen:o}=i;return a.validate?o.scopeValue("validate",{ref:a.validate}):g._`${o.scopeValue("wrapper",{ref:a})}.validate`}function s(i,a,o,l){const{gen:c,it:d}=i,{allErrors:h,schemaEnv:u,opts:m}=d,p=m.passContext?te.default.this:g.nil;function y(k){const O=g._`${k}.errors`;c.assign(te.default.vErrors,g._`${te.default.vErrors} === null ? ${O} : ${te.default.vErrors}.concat(${O})`),c.assign(te.default.errors,g._`${te.default.vErrors}.length`)}function b(k){var O;if(!d.opts.unevaluated)return;const $=(O=o==null?void 0:o.validate)===null||O===void 0?void 0:O.evaluated;if(d.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(d.props=me.mergeEvaluated.props(c,$.props,d.props));else{const x=c.var("props",g._`${k}.evaluated.props`);d.props=me.mergeEvaluated.props(c,x,d.props,g.Name)}if(d.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(d.items=me.mergeEvaluated.items(c,$.items,d.items));else{const x=c.var("items",g._`${k}.evaluated.items`);d.items=me.mergeEvaluated.items(c,x,d.items,g.Name)}}l?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const k=c.let("valid");c.try(()=>{c.code(g._`await ${(0,rt.callValidateCode)(i,a,p)}`),b(a),h||c.assign(k,!0)},O=>{c.if(g._`!(${O} instanceof ${d.ValidationError})`,()=>c.throw(O)),y(O),h||c.assign(k,!1)}),i.ok(k)}():i.result((0,rt.callValidateCode)(i,a,p),()=>b(a),()=>y(a))}e.getValidate=n,e.callRef=s,e.default=r}),ag=Object.defineProperty({default:["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",sg.default,ig.default]},"__esModule",{value:!0});const yr=g.operators,ms={maximum:{okStr:"<=",ok:yr.LTE,fail:yr.GT},minimum:{okStr:">=",ok:yr.GTE,fail:yr.LT},exclusiveMaximum:{okStr:"<",ok:yr.LT,fail:yr.GTE},exclusiveMinimum:{okStr:">",ok:yr.GT,fail:yr.LTE}},og={message:({keyword:t,schemaCode:e})=>g.str`must be ${ms[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>g._`{comparison: ${ms[t].okStr}, limit: ${e}}`},lg={keyword:Object.keys(ms),type:"number",schemaType:"number",$data:!0,error:og,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data(g._`${r} ${ms[e].fail} ${n} || isNaN(${r})`)}};var cg=Object.defineProperty({default:lg},"__esModule",{value:!0}),ug=Object.defineProperty({default:{keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>g.str`must be multiple of ${t}`,params:({schemaCode:t})=>g._`{multipleOf: ${t}}`},code(t){const{gen:e,data:r,schemaCode:n,it:s}=t,i=s.opts.multipleOfPrecision,a=e.let("res"),o=i?g._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:g._`${a} !== parseInt(${a})`;t.fail$data(g._`(${n} === 0 || (${a} = ${r}/${n}, ${o}))`)}}},"__esModule",{value:!0});function Hc(t){const e=t.length;let r,n=0,s=0;for(;s<e;)n++,r=t.charCodeAt(s++),r>=55296&&r<=56319&&s<e&&(r=t.charCodeAt(s),(64512&r)==56320&&s++);return n}var dg=Hc;Hc.code='require("ajv/dist/runtime/ucs2length").default';var fg=Object.defineProperty({default:dg},"__esModule",{value:!0}),hg=Object.defineProperty({default:{keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:e})=>g.str`must NOT have ${t==="maxLength"?"more":"fewer"} than ${e} characters`,params:({schemaCode:t})=>g._`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:n,it:s}=t,i=e==="maxLength"?g.operators.GT:g.operators.LT,a=s.opts.unicode===!1?g._`${r}.length`:g._`${(0,me.useFunc)(t.gen,fg.default)}(${r})`;t.fail$data(g._`${a} ${i} ${n}`)}}},"__esModule",{value:!0}),mg=Object.defineProperty({default:{keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>g.str`must match pattern "${t}"`,params:({schemaCode:t})=>g._`{pattern: ${t}}`},code(t){const{data:e,$data:r,schema:n,schemaCode:s,it:i}=t,a=r?g._`(new RegExp(${s}, ${i.opts.unicodeRegExp?"u":""}))`:(0,rt.usePattern)(t,n);t.fail$data(g._`!${a}.test(${e})`)}}},"__esModule",{value:!0}),pg=Object.defineProperty({default:{keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:e})=>g.str`must NOT have ${t==="maxProperties"?"more":"fewer"} than ${e} properties`,params:({schemaCode:t})=>g._`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data(g._`Object.keys(${r}).length ${e==="maxProperties"?g.operators.GT:g.operators.LT} ${n}`)}}},"__esModule",{value:!0}),gg=Object.defineProperty({default:{keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>g.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>g._`{missingProperty: ${t}}`},code(t){const{gen:e,schema:r,schemaCode:n,data:s,$data:i,it:a}=t,{opts:o}=a;if(!i&&r.length===0)return;const l=r.length>=o.loopRequired;if(a.allErrors?function(){if(l||i)t.block$data(g.nil,c);else for(const d of r)(0,rt.checkReportMissingProp)(t,d)}():function(){const d=e.let("missing");if(l||i){const h=e.let("valid",!0);t.block$data(h,()=>function(u,m){t.setParams({missingProperty:u}),e.forOf(u,n,()=>{e.assign(m,(0,rt.propertyInData)(e,s,u,o.ownProperties)),e.if((0,g.not)(m),()=>{t.error(),e.break()})},g.nil)}(d,h)),t.ok(h)}else e.if((0,rt.checkMissingProp)(t,r,d)),(0,rt.reportMissingProp)(t,d),e.else()}(),o.strictRequired){const d=t.parentSchema.properties,{definedProperties:h}=t.it;for(const u of r)(d==null?void 0:d[u])!==void 0||h.has(u)||(0,me.checkStrictMode)(a,`required property "${u}" is not defined at "${a.schemaEnv.baseId+a.errSchemaPath}" (strictRequired)`,a.opts.strictRequired)}function c(){e.forOf("prop",n,d=>{t.setParams({missingProperty:d}),e.if((0,rt.noPropertyInData)(e,s,d,o.ownProperties),()=>t.error())})}}}},"__esModule",{value:!0}),yg=Object.defineProperty({default:{keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:t,schemaCode:e})=>g.str`must NOT have ${t==="maxItems"?"more":"fewer"} than ${e} items`,params:({schemaCode:t})=>g._`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data(g._`${r}.length ${e==="maxItems"?g.operators.GT:g.operators.LT} ${n}`)}}},"__esModule",{value:!0});Li.code='require("ajv/dist/runtime/equal").default';var Bi=Object.defineProperty({default:Li},"__esModule",{value:!0}),vg=Object.defineProperty({default:[cg.default,ug.default,hg.default,mg.default,pg.default,gg.default,yg.default,Object.defineProperty({default:{keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>g.str`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>g._`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:r,$data:n,schema:s,parentSchema:i,schemaCode:a,it:o}=t;if(!n&&!s)return;const l=e.let("valid"),c=i.items?(0,Yt.getSchemaTypes)(i.items):[];function d(u,m){const p=e.name("item"),y=(0,Yt.checkDataTypes)(c,p,o.opts.strictNumbers,Yt.DataType.Wrong),b=e.const("indices",g._`{}`);e.for(g._`;${u}--;`,()=>{e.let(p,g._`${r}[${u}]`),e.if(y,g._`continue`),c.length>1&&e.if(g._`typeof ${p} == "string"`,g._`${p} += "_"`),e.if(g._`typeof ${b}[${p}] == "number"`,()=>{e.assign(m,g._`${b}[${p}]`),t.error(),e.assign(l,!1).break()}).code(g._`${b}[${p}] = ${u}`)})}function h(u,m){const p=(0,me.useFunc)(e,Bi.default),y=e.name("outer");e.label(y).for(g._`;${u}--;`,()=>e.for(g._`${m} = ${u}; ${m}--;`,()=>e.if(g._`${p}(${r}[${u}], ${r}[${m}])`,()=>{t.error(),e.assign(l,!1).break(y)})))}t.block$data(l,function(){const u=e.let("i",g._`${r}.length`),m=e.let("j");t.setParams({i:u,j:m}),e.assign(l,!0),e.if(g._`${u} > 1`,()=>(c.length>0&&!c.some(p=>p==="object"||p==="array")?d:h)(u,m))},g._`${a} === false`),t.ok(l)}}},"__esModule",{value:!0}).default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Object.defineProperty({default:{keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>g._`{allowedValue: ${t}}`},code(t){const{gen:e,data:r,$data:n,schemaCode:s,schema:i}=t;n||i&&typeof i=="object"?t.fail$data(g._`!${(0,me.useFunc)(e,Bi.default)}(${r}, ${s})`):t.fail(g._`${i} !== ${r}`)}}},"__esModule",{value:!0}).default,Object.defineProperty({default:{keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>g._`{allowedValues: ${t}}`},code(t){const{gen:e,data:r,$data:n,schema:s,schemaCode:i,it:a}=t;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let o;const l=()=>o??(o=(0,me.useFunc)(e,Bi.default));let c;if(s.length>=a.opts.loopEnum||n)c=e.let("valid"),t.block$data(c,function(){e.assign(c,!1),e.forOf("v",i,d=>e.if(g._`${l()}(${r}, ${d})`,()=>e.assign(c,!0).break()))});else{if(!Array.isArray(s))throw new Error("ajv implementation error");const d=e.const("vSchema",i);c=(0,g.or)(...s.map((h,u)=>function(m,p){const y=s[p];return typeof y=="object"&&y!==null?g._`${l()}(${r}, ${m}[${p}])`:g._`${r} === ${y}`}(d,u)))}t.pass(c)}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),Gc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;const r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>g.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>g._`{limit: ${s}}`},code(s){const{parentSchema:i,it:a}=s,{items:o}=i;Array.isArray(o)?n(s,o):(0,me.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(s,i){const{gen:a,schema:o,data:l,keyword:c,it:d}=s;d.items=!0;const h=a.const("len",g._`${l}.length`);if(o===!1)s.setParams({len:i.length}),s.pass(g._`${h} <= ${i.length}`);else if(typeof o=="object"&&!(0,me.alwaysValidSchema)(d,o)){const u=a.var("valid",g._`${h} <= ${i.length}`);a.if((0,g.not)(u),()=>function(m){a.forRange("i",i.length,h,p=>{s.subschema({keyword:c,dataProp:p,dataPropType:me.Type.Num},m),d.allErrors||a.if((0,g.not)(m),()=>a.break())})}(u)),s.ok(u)}}e.validateAdditionalItems=n,e.default=r}),Yc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;const r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:i,it:a}=s;if(Array.isArray(i))return n(s,"additionalItems",i);a.items=!0,(0,me.alwaysValidSchema)(a,i)||s.ok((0,rt.validateArray)(s))}};function n(s,i,a=s.schema){const{gen:o,parentSchema:l,data:c,keyword:d,it:h}=s;(function(p){const{opts:y,errSchemaPath:b}=h,k=a.length;y.strictTuples&&(k!==p.minItems||k!==p.maxItems&&p[i]!==!1)&&(0,me.checkStrictMode)(h,`"${d}" is ${k}-tuple, but minItems or maxItems/${i} are not specified or different at path "${b}"`,y.strictTuples)})(l),h.opts.unevaluated&&a.length&&h.items!==!0&&(h.items=me.mergeEvaluated.items(o,a.length,h.items));const u=o.name("valid"),m=o.const("len",g._`${c}.length`);a.forEach((p,y)=>{(0,me.alwaysValidSchema)(h,p)||(o.if(g._`${m} > ${y}`,()=>s.subschema({keyword:d,schemaProp:y,dataProp:y},u)),s.ok(u))})}e.validateTuple=n,e.default=r}),bg=Object.defineProperty({default:{keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Yc.validateTuple)(t,"items")}},"__esModule",{value:!0}),wg=Object.defineProperty({default:{keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>g.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>g._`{limit: ${t}}`},code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:s}=r;n.items=!0,(0,me.alwaysValidSchema)(n,e)||(s?(0,Gc.validateAdditionalItems)(t,s):t.ok((0,rt.validateArray)(t)))}}},"__esModule",{value:!0}),xg=Object.defineProperty({default:{keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?g.str`must contain at least ${t} valid item(s)`:g.str`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?g._`{minContains: ${t}}`:g._`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;let a,o;const{minContains:l,maxContains:c}=n;i.opts.next?(a=l===void 0?1:l,o=c):a=1;const d=e.const("len",g._`${s}.length`);if(t.setParams({min:a,max:o}),o===void 0&&a===0)return void(0,me.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(o!==void 0&&a>o)return(0,me.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,me.alwaysValidSchema)(i,r)){let p=g._`${d} >= ${a}`;return o!==void 0&&(p=g._`${p} && ${d} <= ${o}`),void t.pass(p)}i.items=!0;const h=e.name("valid");function u(){const p=e.name("_valid"),y=e.let("count",0);m(p,()=>e.if(p,()=>function(b){e.code(g._`${b}++`),o===void 0?e.if(g._`${b} >= ${a}`,()=>e.assign(h,!0).break()):(e.if(g._`${b} > ${o}`,()=>e.assign(h,!1).break()),a===1?e.assign(h,!0):e.if(g._`${b} >= ${a}`,()=>e.assign(h,!0)))}(y)))}function m(p,y){e.forRange("i",0,d,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:me.Type.Num,compositeRule:!0},p),y()})}o===void 0&&a===1?m(h,()=>e.if(h,()=>e.break())):a===0?(e.let(h,!0),o!==void 0&&e.if(g._`${s}.length > 0`,u)):(e.let(h,!1),u()),t.result(h,()=>t.reset())}}},"__esModule",{value:!0}),Sg=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0,e.error={message:({params:{property:i,depsCount:a,deps:o}})=>g.str`must have ${a===1?"property":"properties"} ${o} when property ${i} is present`,params:({params:{property:i,depsCount:a,deps:o,missingProperty:l}})=>g._`{property: ${i},
166
166
  missingProperty: ${l},
167
167
  depsCount: ${a},
168
- deps: ${o}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[a,o]=function({schema:l}){const c={},d={};for(const h in l)h!=="__proto__"&&((Array.isArray(l[h])?c:d)[h]=l[h]);return[c,d]}(i);n(i,a),s(i,o)}};function n(i,a=i.schema){const{gen:o,data:l,it:c}=i;if(Object.keys(a).length===0)return;const d=o.let("missing");for(const h in a){const u=a[h];if(u.length===0)continue;const m=(0,rt.propertyInData)(o,l,h,c.opts.ownProperties);i.setParams({property:h,depsCount:u.length,deps:u.join(", ")}),c.allErrors?o.if(m,()=>{for(const p of u)(0,rt.checkReportMissingProp)(i,p)}):(o.if(g._`${m} && (${(0,rt.checkMissingProp)(i,u,d)})`),(0,rt.reportMissingProp)(i,d),o.else())}}function s(i,a=i.schema){const{gen:o,data:l,keyword:c,it:d}=i,h=o.name("valid");for(const u in a)(0,me.alwaysValidSchema)(d,a[u])||(o.if((0,rt.propertyInData)(o,l,u,d.opts.ownProperties),()=>{const m=i.subschema({keyword:c,schemaProp:u},h);i.mergeValidEvaluated(m,h)},()=>o.var(h,!0)),i.ok(h))}e.validatePropertyDeps=n,e.validateSchemaDeps=s,e.default=r}),Eg=Object.defineProperty({default:{keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>g._`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:n,it:s}=t;if((0,me.alwaysValidSchema)(s,r))return;const i=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,g.not)(i),()=>{t.error(!0),s.allErrors||e.break()})}),t.ok(i)}}},"__esModule",{value:!0}),zi=Object.defineProperty({default:{keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>g._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:n,data:s,errsCount:i,it:a}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,me.alwaysValidSchema)(a,r))return;const c=(0,rt.allSchemaProperties)(n.properties),d=(0,rt.allSchemaProperties)(n.patternProperties);function h(p){e.code(g._`delete ${s}[${p}]`)}function u(p){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1)h(p);else{if(r===!1)return t.setParams({additionalProperty:p}),t.error(),void(o||e.break());if(typeof r=="object"&&!(0,me.alwaysValidSchema)(a,r)){const y=e.name("valid");l.removeAdditional==="failing"?(m(p,y,!1),e.if((0,g.not)(y),()=>{t.reset(),h(p)})):(m(p,y),o||e.if((0,g.not)(y),()=>e.break()))}}}function m(p,y,b){const k={keyword:"additionalProperties",dataProp:p,dataPropType:me.Type.Str};b===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,y)}e.forIn("key",s,p=>{c.length||d.length?e.if(function(y){let b;if(c.length>8){const k=(0,me.schemaRefOrVal)(a,n.properties,"properties");b=(0,rt.isOwnProperty)(e,k,y)}else b=c.length?(0,g.or)(...c.map(k=>g._`${y} === ${k}`)):g.nil;return d.length&&(b=(0,g.or)(b,...d.map(k=>g._`${(0,rt.usePattern)(t,k)}.test(${y})`))),(0,g.not)(b)}(p),()=>u(p)):u(p)}),t.ok(g._`${i} === ${te.default.errors}`)}}},"__esModule",{value:!0}),$g=Object.defineProperty({default:{keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&zi.default.code(new _n.KeywordCxt(i,zi.default,"additionalProperties"));const a=(0,rt.allSchemaProperties)(r);for(const h of a)i.definedProperties.add(h);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=me.mergeEvaluated.props(e,(0,me.toHash)(a),i.props));const o=a.filter(h=>!(0,me.alwaysValidSchema)(i,r[h]));if(o.length===0)return;const l=e.name("valid");for(const h of o)c(h)?d(h):(e.if((0,rt.propertyInData)(e,s,h,i.opts.ownProperties)),d(h),i.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(l);function c(h){return i.opts.useDefaults&&!i.compositeRule&&r[h].default!==void 0}function d(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},l)}}}},"__esModule",{value:!0});const Zc=me;var _g=Object.defineProperty({default:{keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:s,it:i}=t,{opts:a}=i,o=(0,rt.allSchemaProperties)(r),l=o.filter(p=>(0,me.alwaysValidSchema)(i,r[p]));if(o.length===0||l.length===o.length&&(!i.opts.unevaluated||i.props===!0))return;const c=a.strictSchema&&!a.allowMatchingProperties&&s.properties,d=e.name("valid");i.props===!0||i.props instanceof g.Name||(i.props=(0,Zc.evaluatedPropsToName)(e,i.props));const{props:h}=i;function u(p){for(const y in c)new RegExp(p).test(y)&&(0,me.checkStrictMode)(i,`property ${y} matches pattern ${p} (use allowMatchingProperties)`)}function m(p){e.forIn("key",n,y=>{e.if(g._`${(0,rt.usePattern)(t,p)}.test(${y})`,()=>{const b=l.includes(p);b||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:y,dataPropType:Zc.Type.Str},d),i.opts.unevaluated&&h!==!0?e.assign(g._`${h}[${y}]`,!0):b||i.allErrors||e.if((0,g.not)(d),()=>e.break())})})}(function(){for(const p of o)c&&u(p),i.allErrors?m(p):(e.var(d,!0),m(p),e.if(d))})()}}},"__esModule",{value:!0}),kg=Object.defineProperty({default:{keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,me.alwaysValidSchema)(n,r))return void t.fail();const s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}}},"__esModule",{value:!0}),Tg=Object.defineProperty({default:{keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rt.validateUnion,error:{message:"must match a schema in anyOf"}}},"__esModule",{value:!0}),jg=Object.defineProperty({default:{keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>g._`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,a=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");t.setParams({passing:o}),e.block(function(){i.forEach((c,d)=>{let h;(0,me.alwaysValidSchema)(s,c)?e.var(l,!0):h=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if(g._`${l} && ${a}`).assign(a,!1).assign(o,g._`[${o}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(o,d),h&&t.mergeEvaluated(h,g.Name)})})}),t.result(a,()=>t.reset(),()=>t.error(!0))}}},"__esModule",{value:!0}),Og=Object.defineProperty({default:{keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=e.name("valid");r.forEach((i,a)=>{if((0,me.alwaysValidSchema)(n,i))return;const o=t.subschema({keyword:"allOf",schemaProp:a},s);t.ok(s),t.mergeEvaluated(o)})}}},"__esModule",{value:!0});function Kc(t,e){const r=t.schema[e];return r!==void 0&&!(0,me.alwaysValidSchema)(t,r)}var Pg=Object.defineProperty({default:{keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>g.str`must match "${t.ifClause}" schema`,params:({params:t})=>g._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,me.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=Kc(n,"then"),i=Kc(n,"else");if(!s&&!i)return;const a=e.let("valid",!0),o=e.name("_valid");if(function(){const c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(c)}(),t.reset(),s&&i){const c=e.let("ifClause");t.setParams({ifClause:c}),e.if(o,l("then",c),l("else",c))}else s?e.if(o,l("then")):e.if((0,g.not)(o),l("else"));function l(c,d){return()=>{const h=t.subschema({keyword:c},o);e.assign(a,o),t.mergeValidEvaluated(h,a),d?e.assign(d,g._`${c}`):t.setParams({ifClause:c})}}t.pass(a,()=>t.error(!0))}}},"__esModule",{value:!0}),Cg=Object.defineProperty({default:{keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,me.checkStrictMode)(r,`"${t}" without "if" is ignored`)}}},"__esModule",{value:!0}),Ng=Object.defineProperty({default:function(t=!1){const e=[kg.default,Tg.default,jg.default,Og.default,Pg.default,Cg.default,Eg.default,zi.default,Sg.default,$g.default,_g.default];return t?e.push(bg.default,wg.default):e.push(Gc.default,Yc.default),e.push(xg.default),e}},"__esModule",{value:!0}),Ig=Object.defineProperty({default:[Object.defineProperty({default:{keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>g.str`must match format "${t}"`,params:({schemaCode:t})=>g._`{format: ${t}}`},code(t,e){const{gen:r,data:n,$data:s,schema:i,schemaCode:a,it:o}=t,{opts:l,errSchemaPath:c,schemaEnv:d,self:h}=o;l.validateFormats&&(s?function(){const u=r.scopeValue("formats",{ref:h.formats,code:l.code.formats}),m=r.const("fDef",g._`${u}[${a}]`),p=r.let("fType"),y=r.let("format");r.if(g._`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(p,g._`${m}.type || "string"`).assign(y,g._`${m}.validate`),()=>r.assign(p,g._`"string"`).assign(y,m)),t.fail$data((0,g.or)(l.strictSchema===!1?g.nil:g._`${a} && !${y}`,function(){const b=d.$async?g._`(${m}.async ? await ${y}(${n}) : ${y}(${n}))`:g._`${y}(${n})`,k=g._`(typeof ${y} == "function" ? ${b} : ${y}.test(${n}))`;return g._`${y} && ${y} !== true && ${p} === ${e} && !${k}`}()))}():function(){const u=h.formats[i];if(!u)return void function(){if(l.strictSchema!==!1)throw new Error(b());function b(){return`unknown format "${i}" ignored in schema at path "${c}"`}h.logger.warn(b())}();if(u===!0)return;const[m,p,y]=function(b){const k=b instanceof RegExp?(0,g.regexpCode)(b):l.code.formats?g._`${l.code.formats}${(0,g.getProperty)(i)}`:void 0,O=r.scopeValue("formats",{key:i,ref:b,code:k});return typeof b!="object"||b instanceof RegExp?["string",b,O]:[b.type||"string",b.validate,g._`${O}.validate`]}(u);m===e&&t.pass(function(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!d.$async)throw new Error("async format in sync schema");return g._`await ${y}(${n})`}return typeof p=="function"?g._`${y}(${n})`:g._`${y}.test(${n})`}())}())}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),Jc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});const Dg=[ag.default,vg.default,(0,Ng.default)(),Ig.default,Jc.metadataVocabulary,Jc.contentVocabulary];var Ag=Object.defineProperty({default:Dg},"__esModule",{value:!0}),Ui=Xe(function(t,e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=e.DiscrError||(e.DiscrError={})).Tag="tag",r.Mapping="mapping"}),Fg=Object.defineProperty({default:{keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===Ui.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>g._`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:n,parentSchema:s,it:i}=t,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),c=e.const("tag",g._`${r}${(0,g.getProperty)(o)}`);function d(h){const u=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:h},u);return t.mergeEvaluated(m,g.Name),u}e.if(g._`typeof ${c} == "string"`,()=>function(){const h=function(){var u;const m={},p=b(s);let y=!0;for(let $=0;$<a.length;$++){let x=a[$];x!=null&&x.$ref&&!(0,me.schemaHasRulesButRef)(x,i.self.RULES)&&(x=rr.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,x==null?void 0:x.$ref),x instanceof rr.SchemaEnv&&(x=x.schema));const w=(u=x==null?void 0:x.properties)===null||u===void 0?void 0:u[o];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);y=y&&(p||b(x)),k(w,$)}if(!y)throw new Error(`discriminator: "${o}" must be required`);return m;function b({required:$}){return Array.isArray($)&&$.includes(o)}function k($,x){if($.const)O($.const,x);else{if(!$.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const w of $.enum)O(w,x)}}function O($,x){if(typeof $!="string"||$ in m)throw new Error(`discriminator: "${o}" values must be unique strings`);m[$]=x}}();e.if(!1);for(const u in h)e.elseIf(g._`${c} === ${u}`),e.assign(l,d(h[u]));e.else(),t.error(!1,{discrError:Ui.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}(),()=>t.error(!1,{discrError:Ui.DiscrError.Tag,tag:c,tagName:o})),t.ok(l)}}},"__esModule",{value:!0}),Xc={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},fe=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=["/properties"],n="http://json-schema.org/draft-07/schema";class s extends ng.default{_addVocabularies(){super._addVocabularies(),Ag.default.forEach(a=>this.addVocabulary(a)),this.opts.discriminator&&this.addKeyword(Fg.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const a=this.opts.$data?this.$dataMetaSchema(Xc,r):Xc;this.addMetaSchema(a,n,!1),this.refs["http://json-schema.org/schema"]=n}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(n)?n:void 0)}}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return _n.KeywordCxt}}),Object.defineProperty(e,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}})}),Mg=Rc(fe),Vg=Rc(Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r="errorMessage",n=new fe.Name("emUsed"),s={required:"missingProperty",dependencies:"property",dependentRequired:"property"},i=/\$\{[^}]+\}/,a=/\$\{([^}]+)\}/g,o=/^""\s*\+\s*|\s*\+\s*""$/g;function l(d){return{keyword:r,schemaType:["string","object"],post:!0,code(h){const{gen:u,data:m,schema:p,schemaValue:y,it:b}=h;if(b.createErrors===!1)return;const k=p,O=g.strConcat(te.default.instancePath,b.errorPath);function $(R,T){return g.and(fe._`${R}.keyword !== ${r}`,fe._`!${R}.${n}`,fe._`${R}.instancePath === ${O}`,fe._`${R}.keyword in ${T}`,fe._`${R}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,fe._`/^\\/[^\\/]*$/.test(${R}.schemaPath.slice(${b.errSchemaPath.length}))`)}function x(R,T){const E=[];for(const P in R){const I=T[P];i.test(I)&&E.push([P,B(I)])}return u.object(...E)}function w(R){return i.test(R)?new be._Code(be.safeStringify(R).replace(a,(T,E)=>`" + JSON.stringify(${_n.getData(E,b)}) + "`).replace(o,"")):fe.stringify(R)}function B(R){return fe._`function(){return ${w(R)}}`}u.if(fe._`${te.default.errors} > 0`,()=>{if(typeof k=="object"){const[T,E]=function(P){let I,M;for(const V in P){if(V==="properties"||V==="items")continue;const G=P[V];if(typeof G=="object"){I||(I={});const K=I[V]={};for(const J in G)K[J]=[]}else M||(M={}),M[V]=[]}return[I,M]}(k);E&&function(P){const I=u.const("emErrors",fe.stringify(P)),M=u.const("templates",x(P,p));u.forOf("err",te.default.vErrors,J=>u.if($(J,I),()=>u.code(fe._`${I}[${J}.keyword].push(${J})`).assign(fe._`${J}.${n}`,!0)));const{singleError:V}=d;if(V){const J=u.let("message",fe._`""`),re=u.let("paramsErrors",fe._`[]`);G(se=>{u.if(J,()=>u.code(fe._`${J} += ${typeof V=="string"?V:";"}`)),u.code(fe._`${J} += ${K(se)}`),u.assign(re,fe._`${re}.concat(${I}[${se}])`)}),jt.reportError(h,{message:J,params:fe._`{errors: ${re}}`})}else G(J=>jt.reportError(h,{message:K(J),params:fe._`{errors: ${I}[${J}]}`}));function G(J){u.forIn("key",I,re=>u.if(fe._`${I}[${re}].length`,()=>J(re)))}function K(J){return fe._`${J} in ${M} ? ${M}[${J}]() : ${y}[${J}]`}}(E),T&&function(P){const I=u.const("emErrors",fe.stringify(P)),M=[];for(const re in P)M.push([re,x(P[re],p[re])]);const V=u.const("templates",u.object(...M)),G=u.scopeValue("obj",{ref:s,code:fe.stringify(s)}),K=u.let("emPropParams"),J=u.let("emParamsErrors");u.forOf("err",te.default.vErrors,re=>u.if($(re,I),()=>{u.assign(K,fe._`${G}[${re}.keyword]`),u.assign(J,fe._`${I}[${re}.keyword][${re}.params[${K}]]`),u.if(J,()=>u.code(fe._`${J}.push(${re})`).assign(fe._`${re}.${n}`,!0))})),u.forIn("key",I,re=>u.forIn("keyProp",fe._`${I}[${re}]`,se=>{u.assign(J,fe._`${I}[${re}][${se}]`),u.if(fe._`${J}.length`,()=>{const D=u.const("tmpl",fe._`${V}[${re}] && ${V}[${re}][${se}]`);jt.reportError(h,{message:fe._`${D} ? ${D}() : ${y}[${re}][${se}]`,params:fe._`{errors: ${J}}`})})}))}(T),function(P){const{props:I,items:M}=P;if(!I&&!M)return;const V=fe._`typeof ${m} == "object"`,G=fe._`Array.isArray(${m})`,K=u.let("emErrors");let J,re;const se=u.let("templates");function D(_,L){u.assign(K,fe.stringify(_)),u.assign(se,x(_,L))}I&&M?(J=u.let("emChildKwd"),u.if(V),u.if(G,()=>{D(M,p.items),u.assign(J,fe.str`items`)},()=>{D(I,p.properties),u.assign(J,fe.str`properties`)}),re=fe._`[${J}]`):M?(u.if(G),D(M,p.items),re=fe._`.items`):I&&(u.if(g.and(V,g.not(G))),D(I,p.properties),re=fe._`.properties`),u.forOf("err",te.default.vErrors,_=>function(L,q,Z){u.if(g.and(fe._`${L}.keyword !== ${r}`,fe._`!${L}.${n}`,fe._`${L}.instancePath.indexOf(${O}) === 0`),()=>{const ee=u.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:fe._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ce=u.const("emMatches",fe._`${ee}.exec(${L}.instancePath.slice(${O}.length))`),z=u.const("emChild",fe._`${ce} && ${ce}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);u.if(fe._`${z} !== undefined && ${z} in ${q}`,()=>Z(z))})}(_,K,L=>u.code(fe._`${K}[${L}].push(${_})`).assign(fe._`${_}.${n}`,!0))),u.forIn("key",K,_=>u.if(fe._`${K}[${_}].length`,()=>{jt.reportError(h,{message:fe._`${_} in ${se} ? ${se}[${_}]() : ${y}${re}[${_}]`,params:fe._`{errors: ${K}[${_}]}`}),u.assign(fe._`${te.default.vErrors}[${te.default.errors}-1].instancePath`,fe._`${O} + "/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),u.endIf()}(function({properties:P,items:I}){const M={};if(P){M.props={};for(const V in P)M.props[V]=[]}if(I){M.items={};for(let V=0;V<I.length;V++)M.items[V]=[]}return M}(k))}const R=typeof k=="string"?k:k._;R&&function(T){const E=u.const("emErrs",fe._`[]`);u.forOf("err",te.default.vErrors,P=>u.if(function(I){return g.and(fe._`${I}.keyword !== ${r}`,fe._`!${I}.${n}`,g.or(fe._`${I}.instancePath === ${O}`,g.and(fe._`${I}.instancePath.indexOf(${O}) === 0`,fe._`${I}.instancePath[${O}.length] === "/"`)),fe._`${I}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,fe._`${I}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(P),()=>u.code(fe._`${E}.push(${P})`).assign(fe._`${P}.${n}`,!0))),u.if(fe._`${E}.length`,()=>jt.reportError(h,{message:w(T),params:fe._`{errors: ${E}}`}))}(R),d.keepErrors||function(){const T=u.const("emErrs",fe._`[]`);u.forOf("err",te.default.vErrors,E=>u.if(fe._`!${E}.${n}`,()=>u.code(fe._`${T}.push(${E})`))),u.assign(te.default.vErrors,T).assign(te.default.errors,fe._`${T}.length`)}()})},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const c=(d,h={})=>{if(!d.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(d.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return d.addKeyword(l(h))};e.default=c,t.exports=c,t.exports.default=c})),Lg=function(t,e){return t.forEach(function(r){r.keyword==="required"&&(r.instancePath+="/"+r.params.missingProperty)}),t.reduce(function(r,n){var s=n.instancePath.substring(1).replace(/\//g,".");if(r[s]||(r[s]={message:n.message,type:n.keyword}),e){var i=r[s].types,a=i&&i[n.keyword];r[s]=xc(s,e,r,n.keyword,a?[].concat(a,n.message||""):n.message)}return r},{})},Rg=function(t,e,r){return r===void 0&&(r={}),function(n,s,i){try{var a,o=new Mg(Lc({allErrors:!0,validateSchema:!0},e));Vg(o);var l=o.compile(Object.assign({$async:((a=r)==null?void 0:a.mode)==="async"},t));return l(n)?(i.shouldUseNativeValidation&&Vc({},i),Promise.resolve({values:n,errors:{}})):Promise.resolve({values:{},errors:Kp(Lg(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)})}catch(c){return Promise.reject(c)}}};function Bg(t){const{schema:e,defaultValue:r,disableBody:n,disablePadding:s}=t,i=Bp({defaultValues:r??{},resolver:e?Rg(e,{strict:!1,addFormats:!0}):void 0}),[a]=pt(),{handleSubmit:o,setError:l}=i,[c,d]=S.useState(""),h=Mt("md"),[u]=S.useContext(Hr),m=t.isVertical?!1:u.formLayout==="horizontal",y=(t.singleColumn?!1:u.formColumns==="multiple")?1600:m?960:800;let b=f.jsx(Op,{...i,children:f.jsxs(v.Form,{onSubmit:o(async k=>{d("");try{await t.onSubmit(k,d,l)}catch(O){d(O instanceof Error?O.message:"Unknown error")}}),isHorizontal:m,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:t.disableScrolling?void 0:"hidden",gap:0},children:[t.disableScrolling?f.jsx("div",{style:{maxWidth:y,padding:s?void 0:24},children:f.jsx(Wi,{isVertical:t.isVertical,singleColumn:t.singleColumn,children:t.children})}):f.jsx(Nn,{style:{height:"100%",flexGrow:1},children:f.jsx("div",{style:{maxWidth:y,padding:s?void 0:24},children:f.jsx(Wi,{isVertical:t.isVertical,singleColumn:t.singleColumn,children:t.children})})}),c&&f.jsx(v.Alert,{variant:"danger",title:c??"",isInline:!0,style:{paddingLeft:h&&t.onCancel?190:void 0}}),t.onCancel?f.jsx("div",{className:"dark-2 border-top",style:{padding:s?void 0:24},children:f.jsxs(v.ActionGroup,{style:{marginTop:0},children:[f.jsx(qi,{children:t.submitText}),t.onCancel&&f.jsx(Qc,{onCancel:t.onCancel,children:t.cancelText??a.cancelText})]})}):f.jsx(qi,{style:{marginTop:48},children:t.submitText})]})});return n||(b=f.jsx(Qs,{children:b})),b}function Wi(t){const[e]=S.useContext(Hr),r=t.isVertical?!1:e.formLayout==="horizontal",n=t.singleColumn?!1:e.formColumns==="multiple",s=12,i=n?r?12:6:12,a=n?6:12,o=n?6:12,l=n?4:12;return f.jsx(f.Fragment,{children:f.jsx(v.Grid,{hasGutter:!0,span:12,sm:s,md:i,lg:a,xl:o,xl2:l,children:t.children})})}function qi(t){const{isSubmitting:e,errors:r}=yc(),n=r&&Object.keys(r).length>0;return f.jsx(v.Tooltip,{content:"Please fix errors",trigger:n?void 0:"manual",children:f.jsx(v.Button,{type:"submit",isDisabled:e,isLoading:e,isDanger:n,variant:n?"secondary":void 0,style:t.style,children:t.children})})}function Qc(t){return f.jsx(v.Button,{type:"button",variant:"link",onClick:t.onCancel,children:t.children})}const Uy="";function zg(t){return f.jsx(vo,{children:f.jsx(Gl,{children:f.jsx(oa,{children:f.jsx(ic,{children:f.jsx(Wm,{callback:t.navigate,children:t.children})})})})})}function Ug(t){const e=Hl();return t.breadcrumbs?f.jsx(v.Breadcrumb,{style:t.style,children:t.breadcrumbs.map(r=>r.label?f.jsx(v.BreadcrumbItem,{id:r.id,component:r.component,isActive:r.to===void 0,children:r.to?f.jsx("a",{href:r.to,onClick:n=>{n.preventDefault(),e(r.to)},children:r.label}):r.label},r.id??r.label):null)}):f.jsx(S.Fragment,{})}function Wg(t){const{navigation:e,breadcrumbs:r,title:n,description:s,controls:i,headerActions:a,footer:o}=t,l=Mt("lg"),c=Mt("xl"),d=Mt("md"),[h]=pt();return f.jsxs(f.Fragment,{children:[e&&f.jsx(v.PageSection,{variant:v.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:f.jsx(v.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:f.jsx(v.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:e})})}),f.jsx(v.PageSection,{variant:v.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:c?16:12,paddingBottom:c?16:12},children:f.jsxs(v.Stack,{hasGutter:!0,children:[f.jsxs(v.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[f.jsxs(v.FlexItem,{grow:{default:"grow"},children:[r&&f.jsx(Ug,{breadcrumbs:r,style:{paddingBottom:l?6:4}}),n?t.titleHelp?f.jsx(v.Popover,{headerContent:t.titleHelpTitle,bodyContent:f.jsxs(v.Stack,{hasGutter:!0,children:[typeof t.titleHelp=="string"?f.jsx(v.StackItem,{children:t.titleHelp}):t.titleHelp.map((u,m)=>f.jsx(v.StackItem,{children:u},m)),t.titleDocLink&&f.jsx(v.StackItem,{children:f.jsx(v.Button,{icon:f.jsx(Me.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(t.titleDocLink,"_blank"),isInline:!0,children:h.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:f.jsxs(v.Title,{headingLevel:"h1",children:[n,f.jsx(v.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:f.jsx(Me.OutlinedQuestionCircleIcon,{})})]})}):f.jsx(v.Title,{headingLevel:"h1",children:n}):f.jsx(v.Title,{headingLevel:"h1",children:f.jsx(v.Skeleton,{width:"160px"})}),d&&s&&f.jsx(v.Text,{component:"p",style:{paddingTop:c?4:2,opacity:.8},children:typeof s=="string"?f.jsx(v.Truncate,{content:s}):f.jsx(v.Stack,{children:s.map(u=>f.jsx(v.StackItem,{children:u},u))})})]}),n&&(a||i)&&f.jsxs(v.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[i&&f.jsx(v.FlexItem,{grow:{default:"grow"},children:i}),a&&f.jsx(v.FlexItem,{children:a})]})]}),o]})})]})}function qg(t){const[e]=pt();return f.jsx(po,{message:e.errorText,children:f.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:t.children})})}function eu(t){const{loading:e}=t,[r,n]=S.useState(0),s=S.useCallback((l,c)=>n(c),[n]),i=S.Children.toArray(t.children),a=i.map((l,c)=>{if(S.isValidElement(l)&&l.type===Hi){const d=l.props.label;return f.jsx(v.Tab,{title:d||f.jsx(v.Skeleton,{width:"60px"}),eventKey:c},d??c)}return l}),o=i[r];return e?f.jsx(eu,{children:f.jsx(Hi,{children:f.jsx(v.PageSection,{variant:"light",children:f.jsx(v.Skeleton,{})})})}):f.jsxs(f.Fragment,{children:[f.jsx(v.PageSection,{type:v.PageSectionTypes.tabs,className:"border-bottom",children:f.jsxs(v.Flex,{spaceItems:{default:"spaceItemsNone"},children:[t.preComponents&&f.jsxs(f.Fragment,{children:[f.jsx(v.FlexItem,{children:t.preComponents}),f.jsx(v.Divider,{orientation:{default:"vertical"},component:"div"})]}),f.jsx(v.FlexItem,{grow:{default:"grow"},children:f.jsx(v.Tabs,{activeKey:r,onSelect:s,inset:t.preComponents?void 0:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm",["2xl"]:"insetSm"},hasBorderBottom:!1,children:a})}),t.postComponents&&f.jsxs(f.Fragment,{children:[f.jsx(v.Divider,{orientation:{default:"vertical"}}),f.jsx(v.FlexItem,{style:{paddingRight:16},children:t.postComponents})]})]})}),o]})}function Hi(t){return f.jsx(f.Fragment,{children:t.children})}function Hg(t){const{activeKey:e,setActiveKey:r}=t,n=S.useCallback((s,i)=>r(i),[r]);return f.jsx(v.PageSection,{type:v.PageSectionTypes.tabs,style:{flexGrow:1},children:f.jsx(v.Tabs,{activeKey:e,onSelect:n,inset:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm",["2xl"]:"insetSm"},children:t.children})})}/*!
168
+ deps: ${o}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[a,o]=function({schema:l}){const c={},d={};for(const h in l)h!=="__proto__"&&((Array.isArray(l[h])?c:d)[h]=l[h]);return[c,d]}(i);n(i,a),s(i,o)}};function n(i,a=i.schema){const{gen:o,data:l,it:c}=i;if(Object.keys(a).length===0)return;const d=o.let("missing");for(const h in a){const u=a[h];if(u.length===0)continue;const m=(0,rt.propertyInData)(o,l,h,c.opts.ownProperties);i.setParams({property:h,depsCount:u.length,deps:u.join(", ")}),c.allErrors?o.if(m,()=>{for(const p of u)(0,rt.checkReportMissingProp)(i,p)}):(o.if(g._`${m} && (${(0,rt.checkMissingProp)(i,u,d)})`),(0,rt.reportMissingProp)(i,d),o.else())}}function s(i,a=i.schema){const{gen:o,data:l,keyword:c,it:d}=i,h=o.name("valid");for(const u in a)(0,me.alwaysValidSchema)(d,a[u])||(o.if((0,rt.propertyInData)(o,l,u,d.opts.ownProperties),()=>{const m=i.subschema({keyword:c,schemaProp:u},h);i.mergeValidEvaluated(m,h)},()=>o.var(h,!0)),i.ok(h))}e.validatePropertyDeps=n,e.validateSchemaDeps=s,e.default=r}),Eg=Object.defineProperty({default:{keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>g._`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:n,it:s}=t;if((0,me.alwaysValidSchema)(s,r))return;const i=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,g.not)(i),()=>{t.error(!0),s.allErrors||e.break()})}),t.ok(i)}}},"__esModule",{value:!0}),zi=Object.defineProperty({default:{keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>g._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:n,data:s,errsCount:i,it:a}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,me.alwaysValidSchema)(a,r))return;const c=(0,rt.allSchemaProperties)(n.properties),d=(0,rt.allSchemaProperties)(n.patternProperties);function h(p){e.code(g._`delete ${s}[${p}]`)}function u(p){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1)h(p);else{if(r===!1)return t.setParams({additionalProperty:p}),t.error(),void(o||e.break());if(typeof r=="object"&&!(0,me.alwaysValidSchema)(a,r)){const y=e.name("valid");l.removeAdditional==="failing"?(m(p,y,!1),e.if((0,g.not)(y),()=>{t.reset(),h(p)})):(m(p,y),o||e.if((0,g.not)(y),()=>e.break()))}}}function m(p,y,b){const k={keyword:"additionalProperties",dataProp:p,dataPropType:me.Type.Str};b===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,y)}e.forIn("key",s,p=>{c.length||d.length?e.if(function(y){let b;if(c.length>8){const k=(0,me.schemaRefOrVal)(a,n.properties,"properties");b=(0,rt.isOwnProperty)(e,k,y)}else b=c.length?(0,g.or)(...c.map(k=>g._`${y} === ${k}`)):g.nil;return d.length&&(b=(0,g.or)(b,...d.map(k=>g._`${(0,rt.usePattern)(t,k)}.test(${y})`))),(0,g.not)(b)}(p),()=>u(p)):u(p)}),t.ok(g._`${i} === ${te.default.errors}`)}}},"__esModule",{value:!0}),$g=Object.defineProperty({default:{keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&zi.default.code(new _n.KeywordCxt(i,zi.default,"additionalProperties"));const a=(0,rt.allSchemaProperties)(r);for(const h of a)i.definedProperties.add(h);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=me.mergeEvaluated.props(e,(0,me.toHash)(a),i.props));const o=a.filter(h=>!(0,me.alwaysValidSchema)(i,r[h]));if(o.length===0)return;const l=e.name("valid");for(const h of o)c(h)?d(h):(e.if((0,rt.propertyInData)(e,s,h,i.opts.ownProperties)),d(h),i.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(l);function c(h){return i.opts.useDefaults&&!i.compositeRule&&r[h].default!==void 0}function d(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},l)}}}},"__esModule",{value:!0});const Zc=me;var _g=Object.defineProperty({default:{keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:s,it:i}=t,{opts:a}=i,o=(0,rt.allSchemaProperties)(r),l=o.filter(p=>(0,me.alwaysValidSchema)(i,r[p]));if(o.length===0||l.length===o.length&&(!i.opts.unevaluated||i.props===!0))return;const c=a.strictSchema&&!a.allowMatchingProperties&&s.properties,d=e.name("valid");i.props===!0||i.props instanceof g.Name||(i.props=(0,Zc.evaluatedPropsToName)(e,i.props));const{props:h}=i;function u(p){for(const y in c)new RegExp(p).test(y)&&(0,me.checkStrictMode)(i,`property ${y} matches pattern ${p} (use allowMatchingProperties)`)}function m(p){e.forIn("key",n,y=>{e.if(g._`${(0,rt.usePattern)(t,p)}.test(${y})`,()=>{const b=l.includes(p);b||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:y,dataPropType:Zc.Type.Str},d),i.opts.unevaluated&&h!==!0?e.assign(g._`${h}[${y}]`,!0):b||i.allErrors||e.if((0,g.not)(d),()=>e.break())})})}(function(){for(const p of o)c&&u(p),i.allErrors?m(p):(e.var(d,!0),m(p),e.if(d))})()}}},"__esModule",{value:!0}),kg=Object.defineProperty({default:{keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,me.alwaysValidSchema)(n,r))return void t.fail();const s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}}},"__esModule",{value:!0}),Tg=Object.defineProperty({default:{keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rt.validateUnion,error:{message:"must match a schema in anyOf"}}},"__esModule",{value:!0}),jg=Object.defineProperty({default:{keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>g._`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,a=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");t.setParams({passing:o}),e.block(function(){i.forEach((c,d)=>{let h;(0,me.alwaysValidSchema)(s,c)?e.var(l,!0):h=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if(g._`${l} && ${a}`).assign(a,!1).assign(o,g._`[${o}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(o,d),h&&t.mergeEvaluated(h,g.Name)})})}),t.result(a,()=>t.reset(),()=>t.error(!0))}}},"__esModule",{value:!0}),Og=Object.defineProperty({default:{keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=e.name("valid");r.forEach((i,a)=>{if((0,me.alwaysValidSchema)(n,i))return;const o=t.subschema({keyword:"allOf",schemaProp:a},s);t.ok(s),t.mergeEvaluated(o)})}}},"__esModule",{value:!0});function Kc(t,e){const r=t.schema[e];return r!==void 0&&!(0,me.alwaysValidSchema)(t,r)}var Pg=Object.defineProperty({default:{keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>g.str`must match "${t.ifClause}" schema`,params:({params:t})=>g._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,me.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=Kc(n,"then"),i=Kc(n,"else");if(!s&&!i)return;const a=e.let("valid",!0),o=e.name("_valid");if(function(){const c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(c)}(),t.reset(),s&&i){const c=e.let("ifClause");t.setParams({ifClause:c}),e.if(o,l("then",c),l("else",c))}else s?e.if(o,l("then")):e.if((0,g.not)(o),l("else"));function l(c,d){return()=>{const h=t.subschema({keyword:c},o);e.assign(a,o),t.mergeValidEvaluated(h,a),d?e.assign(d,g._`${c}`):t.setParams({ifClause:c})}}t.pass(a,()=>t.error(!0))}}},"__esModule",{value:!0}),Cg=Object.defineProperty({default:{keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,me.checkStrictMode)(r,`"${t}" without "if" is ignored`)}}},"__esModule",{value:!0}),Ng=Object.defineProperty({default:function(t=!1){const e=[kg.default,Tg.default,jg.default,Og.default,Pg.default,Cg.default,Eg.default,zi.default,Sg.default,$g.default,_g.default];return t?e.push(bg.default,wg.default):e.push(Gc.default,Yc.default),e.push(xg.default),e}},"__esModule",{value:!0}),Ig=Object.defineProperty({default:[Object.defineProperty({default:{keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>g.str`must match format "${t}"`,params:({schemaCode:t})=>g._`{format: ${t}}`},code(t,e){const{gen:r,data:n,$data:s,schema:i,schemaCode:a,it:o}=t,{opts:l,errSchemaPath:c,schemaEnv:d,self:h}=o;l.validateFormats&&(s?function(){const u=r.scopeValue("formats",{ref:h.formats,code:l.code.formats}),m=r.const("fDef",g._`${u}[${a}]`),p=r.let("fType"),y=r.let("format");r.if(g._`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(p,g._`${m}.type || "string"`).assign(y,g._`${m}.validate`),()=>r.assign(p,g._`"string"`).assign(y,m)),t.fail$data((0,g.or)(l.strictSchema===!1?g.nil:g._`${a} && !${y}`,function(){const b=d.$async?g._`(${m}.async ? await ${y}(${n}) : ${y}(${n}))`:g._`${y}(${n})`,k=g._`(typeof ${y} == "function" ? ${b} : ${y}.test(${n}))`;return g._`${y} && ${y} !== true && ${p} === ${e} && !${k}`}()))}():function(){const u=h.formats[i];if(!u)return void function(){if(l.strictSchema!==!1)throw new Error(b());function b(){return`unknown format "${i}" ignored in schema at path "${c}"`}h.logger.warn(b())}();if(u===!0)return;const[m,p,y]=function(b){const k=b instanceof RegExp?(0,g.regexpCode)(b):l.code.formats?g._`${l.code.formats}${(0,g.getProperty)(i)}`:void 0,O=r.scopeValue("formats",{key:i,ref:b,code:k});return typeof b!="object"||b instanceof RegExp?["string",b,O]:[b.type||"string",b.validate,g._`${O}.validate`]}(u);m===e&&t.pass(function(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!d.$async)throw new Error("async format in sync schema");return g._`await ${y}(${n})`}return typeof p=="function"?g._`${y}(${n})`:g._`${y}.test(${n})`}())}())}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),Jc=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});const Dg=[ag.default,vg.default,(0,Ng.default)(),Ig.default,Jc.metadataVocabulary,Jc.contentVocabulary];var Ag=Object.defineProperty({default:Dg},"__esModule",{value:!0}),Ui=Xe(function(t,e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=e.DiscrError||(e.DiscrError={})).Tag="tag",r.Mapping="mapping"}),Fg=Object.defineProperty({default:{keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===Ui.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>g._`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:n,parentSchema:s,it:i}=t,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),c=e.const("tag",g._`${r}${(0,g.getProperty)(o)}`);function d(h){const u=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:h},u);return t.mergeEvaluated(m,g.Name),u}e.if(g._`typeof ${c} == "string"`,()=>function(){const h=function(){var u;const m={},p=b(s);let y=!0;for(let $=0;$<a.length;$++){let x=a[$];x!=null&&x.$ref&&!(0,me.schemaHasRulesButRef)(x,i.self.RULES)&&(x=rr.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,x==null?void 0:x.$ref),x instanceof rr.SchemaEnv&&(x=x.schema));const w=(u=x==null?void 0:x.properties)===null||u===void 0?void 0:u[o];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);y=y&&(p||b(x)),k(w,$)}if(!y)throw new Error(`discriminator: "${o}" must be required`);return m;function b({required:$}){return Array.isArray($)&&$.includes(o)}function k($,x){if($.const)O($.const,x);else{if(!$.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const w of $.enum)O(w,x)}}function O($,x){if(typeof $!="string"||$ in m)throw new Error(`discriminator: "${o}" values must be unique strings`);m[$]=x}}();e.if(!1);for(const u in h)e.elseIf(g._`${c} === ${u}`),e.assign(l,d(h[u]));e.else(),t.error(!1,{discrError:Ui.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}(),()=>t.error(!1,{discrError:Ui.DiscrError.Tag,tag:c,tagName:o})),t.ok(l)}}},"__esModule",{value:!0}),Xc={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},fe=Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=["/properties"],n="http://json-schema.org/draft-07/schema";class s extends ng.default{_addVocabularies(){super._addVocabularies(),Ag.default.forEach(a=>this.addVocabulary(a)),this.opts.discriminator&&this.addKeyword(Fg.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const a=this.opts.$data?this.$dataMetaSchema(Xc,r):Xc;this.addMetaSchema(a,n,!1),this.refs["http://json-schema.org/schema"]=n}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(n)?n:void 0)}}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return _n.KeywordCxt}}),Object.defineProperty(e,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}})}),Mg=Rc(fe),Vg=Rc(Xe(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r="errorMessage",n=new fe.Name("emUsed"),s={required:"missingProperty",dependencies:"property",dependentRequired:"property"},i=/\$\{[^}]+\}/,a=/\$\{([^}]+)\}/g,o=/^""\s*\+\s*|\s*\+\s*""$/g;function l(d){return{keyword:r,schemaType:["string","object"],post:!0,code(h){const{gen:u,data:m,schema:p,schemaValue:y,it:b}=h;if(b.createErrors===!1)return;const k=p,O=g.strConcat(te.default.instancePath,b.errorPath);function $(R,T){return g.and(fe._`${R}.keyword !== ${r}`,fe._`!${R}.${n}`,fe._`${R}.instancePath === ${O}`,fe._`${R}.keyword in ${T}`,fe._`${R}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,fe._`/^\\/[^\\/]*$/.test(${R}.schemaPath.slice(${b.errSchemaPath.length}))`)}function x(R,T){const E=[];for(const P in R){const I=T[P];i.test(I)&&E.push([P,B(I)])}return u.object(...E)}function w(R){return i.test(R)?new be._Code(be.safeStringify(R).replace(a,(T,E)=>`" + JSON.stringify(${_n.getData(E,b)}) + "`).replace(o,"")):fe.stringify(R)}function B(R){return fe._`function(){return ${w(R)}}`}u.if(fe._`${te.default.errors} > 0`,()=>{if(typeof k=="object"){const[T,E]=function(P){let I,M;for(const V in P){if(V==="properties"||V==="items")continue;const G=P[V];if(typeof G=="object"){I||(I={});const K=I[V]={};for(const J in G)K[J]=[]}else M||(M={}),M[V]=[]}return[I,M]}(k);E&&function(P){const I=u.const("emErrors",fe.stringify(P)),M=u.const("templates",x(P,p));u.forOf("err",te.default.vErrors,J=>u.if($(J,I),()=>u.code(fe._`${I}[${J}.keyword].push(${J})`).assign(fe._`${J}.${n}`,!0)));const{singleError:V}=d;if(V){const J=u.let("message",fe._`""`),re=u.let("paramsErrors",fe._`[]`);G(se=>{u.if(J,()=>u.code(fe._`${J} += ${typeof V=="string"?V:";"}`)),u.code(fe._`${J} += ${K(se)}`),u.assign(re,fe._`${re}.concat(${I}[${se}])`)}),jt.reportError(h,{message:J,params:fe._`{errors: ${re}}`})}else G(J=>jt.reportError(h,{message:K(J),params:fe._`{errors: ${I}[${J}]}`}));function G(J){u.forIn("key",I,re=>u.if(fe._`${I}[${re}].length`,()=>J(re)))}function K(J){return fe._`${J} in ${M} ? ${M}[${J}]() : ${y}[${J}]`}}(E),T&&function(P){const I=u.const("emErrors",fe.stringify(P)),M=[];for(const re in P)M.push([re,x(P[re],p[re])]);const V=u.const("templates",u.object(...M)),G=u.scopeValue("obj",{ref:s,code:fe.stringify(s)}),K=u.let("emPropParams"),J=u.let("emParamsErrors");u.forOf("err",te.default.vErrors,re=>u.if($(re,I),()=>{u.assign(K,fe._`${G}[${re}.keyword]`),u.assign(J,fe._`${I}[${re}.keyword][${re}.params[${K}]]`),u.if(J,()=>u.code(fe._`${J}.push(${re})`).assign(fe._`${re}.${n}`,!0))})),u.forIn("key",I,re=>u.forIn("keyProp",fe._`${I}[${re}]`,se=>{u.assign(J,fe._`${I}[${re}][${se}]`),u.if(fe._`${J}.length`,()=>{const D=u.const("tmpl",fe._`${V}[${re}] && ${V}[${re}][${se}]`);jt.reportError(h,{message:fe._`${D} ? ${D}() : ${y}[${re}][${se}]`,params:fe._`{errors: ${J}}`})})}))}(T),function(P){const{props:I,items:M}=P;if(!I&&!M)return;const V=fe._`typeof ${m} == "object"`,G=fe._`Array.isArray(${m})`,K=u.let("emErrors");let J,re;const se=u.let("templates");function D(_,L){u.assign(K,fe.stringify(_)),u.assign(se,x(_,L))}I&&M?(J=u.let("emChildKwd"),u.if(V),u.if(G,()=>{D(M,p.items),u.assign(J,fe.str`items`)},()=>{D(I,p.properties),u.assign(J,fe.str`properties`)}),re=fe._`[${J}]`):M?(u.if(G),D(M,p.items),re=fe._`.items`):I&&(u.if(g.and(V,g.not(G))),D(I,p.properties),re=fe._`.properties`),u.forOf("err",te.default.vErrors,_=>function(L,q,Z){u.if(g.and(fe._`${L}.keyword !== ${r}`,fe._`!${L}.${n}`,fe._`${L}.instancePath.indexOf(${O}) === 0`),()=>{const ee=u.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:fe._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ce=u.const("emMatches",fe._`${ee}.exec(${L}.instancePath.slice(${O}.length))`),z=u.const("emChild",fe._`${ce} && ${ce}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);u.if(fe._`${z} !== undefined && ${z} in ${q}`,()=>Z(z))})}(_,K,L=>u.code(fe._`${K}[${L}].push(${_})`).assign(fe._`${_}.${n}`,!0))),u.forIn("key",K,_=>u.if(fe._`${K}[${_}].length`,()=>{jt.reportError(h,{message:fe._`${_} in ${se} ? ${se}[${_}]() : ${y}${re}[${_}]`,params:fe._`{errors: ${K}[${_}]}`}),u.assign(fe._`${te.default.vErrors}[${te.default.errors}-1].instancePath`,fe._`${O} + "/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),u.endIf()}(function({properties:P,items:I}){const M={};if(P){M.props={};for(const V in P)M.props[V]=[]}if(I){M.items={};for(let V=0;V<I.length;V++)M.items[V]=[]}return M}(k))}const R=typeof k=="string"?k:k._;R&&function(T){const E=u.const("emErrs",fe._`[]`);u.forOf("err",te.default.vErrors,P=>u.if(function(I){return g.and(fe._`${I}.keyword !== ${r}`,fe._`!${I}.${n}`,g.or(fe._`${I}.instancePath === ${O}`,g.and(fe._`${I}.instancePath.indexOf(${O}) === 0`,fe._`${I}.instancePath[${O}.length] === "/"`)),fe._`${I}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,fe._`${I}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(P),()=>u.code(fe._`${E}.push(${P})`).assign(fe._`${P}.${n}`,!0))),u.if(fe._`${E}.length`,()=>jt.reportError(h,{message:w(T),params:fe._`{errors: ${E}}`}))}(R),d.keepErrors||function(){const T=u.const("emErrs",fe._`[]`);u.forOf("err",te.default.vErrors,E=>u.if(fe._`!${E}.${n}`,()=>u.code(fe._`${T}.push(${E})`))),u.assign(te.default.vErrors,T).assign(te.default.errors,fe._`${T}.length`)}()})},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const c=(d,h={})=>{if(!d.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(d.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return d.addKeyword(l(h))};e.default=c,t.exports=c,t.exports.default=c})),Lg=function(t,e){return t.forEach(function(r){r.keyword==="required"&&(r.instancePath+="/"+r.params.missingProperty)}),t.reduce(function(r,n){var s=n.instancePath.substring(1).replace(/\//g,".");if(r[s]||(r[s]={message:n.message,type:n.keyword}),e){var i=r[s].types,a=i&&i[n.keyword];r[s]=xc(s,e,r,n.keyword,a?[].concat(a,n.message||""):n.message)}return r},{})},Rg=function(t,e,r){return r===void 0&&(r={}),function(n,s,i){try{var a,o=new Mg(Lc({allErrors:!0,validateSchema:!0},e));Vg(o);var l=o.compile(Object.assign({$async:((a=r)==null?void 0:a.mode)==="async"},t));return l(n)?(i.shouldUseNativeValidation&&Vc({},i),Promise.resolve({values:n,errors:{}})):Promise.resolve({values:{},errors:Kp(Lg(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)})}catch(c){return Promise.reject(c)}}};function Bg(t){const{schema:e,defaultValue:r,disableBody:n,disablePadding:s}=t,i=Bp({defaultValues:r??{},resolver:e?Rg(e,{strict:!1,addFormats:!0}):void 0}),[a]=pt(),{handleSubmit:o,setError:l}=i,[c,d]=S.useState(""),h=Mt("md"),[u]=S.useContext(Hr),m=t.isVertical?!1:u.formLayout==="horizontal",y=(t.singleColumn?!1:u.formColumns==="multiple")?1600:m?960:800;let b=f.jsx(Op,{...i,children:f.jsxs(v.Form,{onSubmit:o(async k=>{d("");try{await t.onSubmit(k,d,l)}catch(O){d(O instanceof Error?O.message:"Unknown error")}}),isHorizontal:m,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:t.disableScrolling?void 0:"hidden",gap:0},children:[t.disableScrolling?f.jsx("div",{style:{maxWidth:y,padding:s?void 0:24},children:f.jsx(Wi,{isVertical:t.isVertical,singleColumn:t.singleColumn,children:t.children})}):f.jsx(Nn,{style:{height:"100%",flexGrow:1},children:f.jsx("div",{style:{maxWidth:y,padding:s?void 0:24},children:f.jsx(Wi,{isVertical:t.isVertical,singleColumn:t.singleColumn,children:t.children})})}),c&&f.jsx(v.Alert,{variant:"danger",title:c??"",isInline:!0,style:{paddingLeft:h&&t.onCancel?190:void 0}}),t.onCancel?f.jsx("div",{className:"dark-2 border-top",style:{padding:s?void 0:24},children:f.jsxs(v.ActionGroup,{style:{marginTop:0},children:[f.jsx(qi,{children:t.submitText}),t.onCancel&&f.jsx(Qc,{onCancel:t.onCancel,children:t.cancelText??a.cancelText})]})}):f.jsx(qi,{style:{marginTop:48},children:t.submitText})]})});return n||(b=f.jsx(Qs,{children:b})),b}function Wi(t){const[e]=S.useContext(Hr),r=t.isVertical?!1:e.formLayout==="horizontal",n=t.singleColumn?!1:e.formColumns==="multiple",s=12,i=n?r?12:6:12,a=n?6:12,o=n?6:12,l=n?4:12;return f.jsx(f.Fragment,{children:f.jsx(v.Grid,{hasGutter:!0,span:12,sm:s,md:i,lg:a,xl:o,xl2:l,children:t.children})})}function qi(t){const{isSubmitting:e,errors:r}=yc(),n=r&&Object.keys(r).length>0;return f.jsx(v.Tooltip,{content:"Please fix errors",trigger:n?void 0:"manual",children:f.jsx(v.Button,{type:"submit",isDisabled:e,isLoading:e,isDanger:n,variant:n?"secondary":void 0,style:t.style,children:t.children})})}function Qc(t){return f.jsx(v.Button,{type:"button",variant:"link",onClick:t.onCancel,children:t.children})}const Uy="";function zg(t){return f.jsx(vo,{children:f.jsx(Gl,{children:f.jsx(oa,{children:f.jsx(ic,{children:f.jsx(Wm,{callback:t.navigate,children:t.children})})})})})}function Ug(t){const e=Hl();return t.breadcrumbs?f.jsx(v.Breadcrumb,{style:t.style,children:t.breadcrumbs.map((r,n)=>r.label?f.jsx(v.BreadcrumbItem,{id:r.id,component:r.component,isActive:r.to===void 0,children:r.to?f.jsx("a",{href:r.to,onClick:s=>{s.preventDefault(),e(r.to)},children:r.label}):r.label},r.id??r.label??n):f.jsx(S.Fragment,{},n))}):f.jsx(S.Fragment,{})}function Wg(t){const{navigation:e,breadcrumbs:r,title:n,description:s,controls:i,headerActions:a,footer:o}=t,l=Mt("lg"),c=Mt("xl"),d=Mt("md"),[h]=pt();return f.jsxs(f.Fragment,{children:[e&&f.jsx(v.PageSection,{variant:v.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:f.jsx(v.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:f.jsx(v.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:e})})}),f.jsx(v.PageSection,{variant:v.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:c?16:12,paddingBottom:c?16:12},children:f.jsxs(v.Stack,{hasGutter:!0,children:[f.jsxs(v.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[f.jsxs(v.FlexItem,{grow:{default:"grow"},children:[r&&f.jsx(Ug,{breadcrumbs:r,style:{paddingBottom:l?6:4}}),n?t.titleHelp?f.jsx(v.Popover,{headerContent:t.titleHelpTitle,bodyContent:f.jsxs(v.Stack,{hasGutter:!0,children:[typeof t.titleHelp=="string"?f.jsx(v.StackItem,{children:t.titleHelp}):t.titleHelp.map((u,m)=>f.jsx(v.StackItem,{children:u},m)),t.titleDocLink&&f.jsx(v.StackItem,{children:f.jsx(v.Button,{icon:f.jsx(Me.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(t.titleDocLink,"_blank"),isInline:!0,children:h.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:f.jsxs(v.Title,{headingLevel:"h1",children:[n,f.jsx(v.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:f.jsx(Me.OutlinedQuestionCircleIcon,{})})]})}):f.jsx(v.Title,{headingLevel:"h1",children:n}):f.jsx(v.Title,{headingLevel:"h1",children:f.jsx(v.Skeleton,{width:"160px"})}),d&&s&&f.jsx(v.Text,{component:"p",style:{paddingTop:c?4:2,opacity:.8},children:typeof s=="string"?f.jsx(v.Truncate,{content:s}):f.jsx(v.Stack,{children:s.map(u=>f.jsx(v.StackItem,{children:u},u))})})]}),n&&(a||i)&&f.jsxs(v.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[i&&f.jsx(v.FlexItem,{grow:{default:"grow"},children:i}),a&&f.jsx(v.FlexItem,{children:a})]})]}),o]})})]})}function qg(t){const[e]=pt();return f.jsx(po,{message:e.errorText,children:f.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:t.children})})}function eu(t){const{loading:e}=t,[r,n]=S.useState(0),s=S.useCallback((l,c)=>n(c),[n]),i=S.Children.toArray(t.children),a=i.map((l,c)=>{if(S.isValidElement(l)&&l.type===Hi){const d=l.props.label;return f.jsx(v.Tab,{title:d||f.jsx(v.Skeleton,{width:"60px"}),eventKey:c},d??c)}return l}),o=i[r];return e?f.jsx(eu,{children:f.jsx(Hi,{children:f.jsx(v.PageSection,{variant:"light",children:f.jsx(v.Skeleton,{})})})}):f.jsxs(f.Fragment,{children:[f.jsx(v.PageSection,{type:v.PageSectionTypes.tabs,className:"border-bottom",children:f.jsxs(v.Flex,{spaceItems:{default:"spaceItemsNone"},children:[t.preComponents&&f.jsxs(f.Fragment,{children:[f.jsx(v.FlexItem,{children:t.preComponents}),f.jsx(v.Divider,{orientation:{default:"vertical"},component:"div"})]}),f.jsx(v.FlexItem,{grow:{default:"grow"},children:f.jsx(v.Tabs,{activeKey:r,onSelect:s,inset:t.preComponents?void 0:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm",["2xl"]:"insetSm"},hasBorderBottom:!1,children:a})}),t.postComponents&&f.jsxs(f.Fragment,{children:[f.jsx(v.Divider,{orientation:{default:"vertical"}}),f.jsx(v.FlexItem,{style:{paddingRight:16},children:t.postComponents})]})]})}),o]})}function Hi(t){return f.jsx(f.Fragment,{children:t.children})}function Hg(t){const{activeKey:e,setActiveKey:r}=t,n=S.useCallback((s,i)=>r(i),[r]);return f.jsx(v.PageSection,{type:v.PageSectionTypes.tabs,style:{flexGrow:1},children:f.jsx(v.Tabs,{activeKey:e,onSelect:n,inset:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm",["2xl"]:"insetSm"},children:t.children})})}/*!
169
169
  * isobject <https://github.com/jonschlinkert/isobject>
170
170
  *
171
171
  * Copyright (c) 2014-2017, Jon Schlinkert.