extended-dynamic-forms 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(ie,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("antd"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","antd","react"],$):(ie=typeof globalThis<"u"?globalThis:ie||self,$(ie.ExtendedDynamicForms={},ie.React.jsxRuntime,ie.antd,ie.React))})(this,function(ie,$,re,j){"use strict";var Nse=Object.defineProperty;var Mse=(ie,$,re)=>$ in ie?Nse(ie,$,{enumerable:!0,configurable:!0,writable:!0,value:re}):ie[$]=re;var pe=(ie,$,re)=>Mse(ie,typeof $!="symbol"?$+"":$,re);function pO(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const at=pO(j);class mO{constructor(t){pe(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.handlers.afterValidation&&await this.handlers.afterValidation(t,r)}}const Ng=j.createContext(null),Mg=({eventHub:e,formData:t,children:r})=>$.jsx(Ng.Provider,{value:{eventHub:e,formData:t},children:r}),kg=()=>{const e=j.useContext(Ng);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},dt=(e,t,r)=>{const{eventHub:n,formData:i}=kg(),a=j.useRef(i);return j.useEffect(()=>{a.current=i},[i]),j.useMemo(()=>({onFocus:s=>n.handleFieldEvent("focus",e,s,t,a.current,r),onBlur:s=>n.handleFieldEvent("blur",e,s,t,a.current,r),onChange:s=>n.handleFieldEvent("change",e,s,t,a.current,r)}),[n,e,r])},zu=e=>typeof e=="object"&&e!==null,Lg=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,idSchema:s,rawErrors:l=[]})=>{const u=dt(s.$id,a),f=S=>async E=>{const A=typeof E=="string"?E:E.target.value,x={...e,[S]:A};t(x),await u.onChange(x)},d=async()=>{await u.onFocus(e)},p=async()=>{await u.onBlur(e)},m=(S,E)=>{var x;const A=(x=a.properties)==null?void 0:x[S];return A&&zu(A)&&A.title||E},y=S=>{var A;const E=(A=a.properties)==null?void 0:A[S];return E&&zu(E)&&E.enum?E.enum.map(x=>({value:String(x),label:String(x)})):[]},_=S=>{var E;return((E=a.required)==null?void 0:E.includes(S))||!1},w=S=>{const E=l==null?void 0:l.find(A=>{var x,N;return A.property===`.${S}`||((x=A.message)==null?void 0:x.includes(S))||((N=A.schemaPath)==null?void 0:N.includes(S))});return E==null?void 0:E.message},v=(S,E)=>{var x,N;const A=(x=a.properties)==null?void 0:x[S];return!A||!zu(A)?null:(N=a.required)!=null&&N.includes(S)&&(!E||E.trim()==="")?`${m(S,S)} is required`:A.minLength&&E&&E.length<A.minLength?`${m(S,S)} must be at least ${A.minLength} characters`:A.pattern&&E&&!new RegExp(A.pattern).test(E)?S==="postcode"?"Postcode must be 4 digits":`${m(S,S)} format is invalid`:A.enum&&E&&!A.enum.includes(E)?`${m(S,S)} must be one of: ${A.enum.join(", ")}`:null},g=S=>{const E=(e==null?void 0:e[S])||"",A=w(S),x=v(S,E);return A||x?"error":""},C=S=>{const E=(e==null?void 0:e[S])||"",A=w(S),x=v(S,E);return A||x};return $.jsxs("div",{children:[a.title&&$.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{style:{display:"block",fontSize:"16px",fontWeight:600,color:"#262626",marginBottom:"4px"},children:[a.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),a.description&&$.jsx("div",{style:{fontSize:"14px",color:"#8c8c8c",marginBottom:"8px"},children:a.description})]}),$.jsx(re.Form.Item,{label:m("streetAddress","Street Address"),required:_("streetAddress"),validateStatus:g("streetAddress"),help:C("streetAddress"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_streetAddress`,value:(e==null?void 0:e.streetAddress)||"",onChange:f("streetAddress"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"123 Main St",status:g("streetAddress")})}),$.jsx(re.Form.Item,{label:m("suburb","Suburb/City"),required:_("suburb"),validateStatus:g("suburb"),help:C("suburb"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_suburb`,value:(e==null?void 0:e.suburb)||"",onChange:f("suburb"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Sydney",status:g("suburb")})}),$.jsxs(re.Row,{gutter:16,children:[$.jsx(re.Col,{span:12,children:$.jsx(re.Form.Item,{label:m("state","State/Territory"),required:_("state"),validateStatus:g("state"),help:C("state"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Select,{id:`${s.$id}_state`,value:(e==null?void 0:e.state)||void 0,onChange:f("state"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Select state",status:g("state"),style:{width:"100%"},options:y("state")})})}),$.jsx(re.Col,{span:12,children:$.jsx(re.Form.Item,{label:m("postcode","Postcode"),required:_("postcode"),validateStatus:g("postcode"),help:C("postcode"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_postcode`,value:(e==null?void 0:e.postcode)||"",onChange:f("postcode"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"2000",status:g("postcode")})})})]}),$.jsx(re.Form.Item,{label:m("country","Country"),required:_("country"),validateStatus:g("country"),help:C("country"),style:{marginBottom:"0"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_country`,value:(e==null?void 0:e.country)||"",onChange:f("country"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Australia",status:g("country")})})]})},jg=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,idSchema:s})=>{const l=dt(s.$id,a),u=d=>{const p=d.replace(/\D/g,""),m=p.length;return m<4?p:m<7?`(${p.slice(0,3)}) ${p.slice(3)}`:`(${p.slice(0,3)}) ${p.slice(3,6)}-${p.slice(6,10)}`},f=async d=>{const p=u(d.target.value);t(p),await l.onChange(p)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:s.$id,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a.title||"Phone Number",r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:s.$id,type:"tel",value:e||"",onChange:f,disabled:n||i,placeholder:"(555) 123-4567",maxLength:14})]})},Bg=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,uiSchema:s,idSchema:l})=>{var _,w;const u=((_=s==null?void 0:s["ui:options"])==null?void 0:_.currency)||"USD",f=((w=s==null?void 0:s["ui:options"])==null?void 0:w.symbol)||"$",d=dt(l.$id,a),p=v=>{const g=parseFloat(v.replace(/[^0-9.-]+/g,""));return isNaN(g)?"":g.toFixed(2)},m=async v=>{const g=v.target.value.replace(/[^0-9.-]+/g,""),C=g?parseFloat(g):void 0;t(C),await d.onChange(C)},y=async v=>{const g=p(v.target.value),C=g?parseFloat(g):void 0;t(C),await d.onBlur(C)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:l.$id,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a.title||"Amount",r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:l.$id,inputMode:"decimal",value:e||"",onChange:m,onBlur:y,disabled:n||i,placeholder:"0.00",prefix:String(f),suffix:String(u)})]})};function ke(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function gO(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),ke(e.additionalItems)}function Ug(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const jn="__additional_property",Cs="additionalProperties",Bn="allOf",gt="anyOf",pr="const",Es="default",Os="dependencies",yO="enum",Ht="__errors",$t="$id",vO="if",Un="items",bO="_$junk_option_schema_id$_",As="$name",Ze="oneOf",Hu="patternProperties",Ve="properties",Ku="readonly",Wg="required",Ts="submitButtonOptions",ot="$ref",Ga="$schema",_O=["discriminator","propertyName"],qg="formContext",$O="layoutGridLookupMap",Gu="__rjsf_additionalProperties",Vg="__rjsf_rootSchema",wO="ui:field",Yu="ui:widget",zr="ui:options",Ju="ui:globalOptions",SO="https://json-schema.org/draft/2019-09/schema",Ps="https://json-schema.org/draft/2020-12/schema";function we(e={},t={}){return Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,n)=>{const i=e[n];return n===Yu&&ke(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===zr&&ke(i)?{...r,...i}:{...r,[n.substring(3)]:i}},{...t})}function Rg(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:n=!0}=we(t);return n===!1?n:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}var zg=typeof global=="object"&&global&&global.Object===Object&&global,CO=typeof self=="object"&&self&&self.Object===Object&&self,Hr=zg||CO||Function("return this")(),mr=Hr.Symbol,Hg=Object.prototype,EO=Hg.hasOwnProperty,OO=Hg.toString,Ya=mr?mr.toStringTag:void 0;function AO(e){var t=EO.call(e,Ya),r=e[Ya];try{e[Ya]=void 0;var n=!0}catch{}var i=OO.call(e);return n&&(t?e[Ya]=r:delete e[Ya]),i}var TO=Object.prototype,PO=TO.toString;function IO(e){return PO.call(e)}var xO="[object Null]",DO="[object Undefined]",Kg=mr?mr.toStringTag:void 0;function dn(e){return e==null?e===void 0?DO:xO:Kg&&Kg in Object(e)?AO(e):IO(e)}function Gg(e,t){return function(r){return e(t(r))}}var Is=Gg(Object.getPrototypeOf,Object);function gr(e){return e!=null&&typeof e=="object"}var FO="[object Object]",NO=Function.prototype,MO=Object.prototype,Yg=NO.toString,kO=MO.hasOwnProperty,LO=Yg.call(Object);function Wn(e){if(!gr(e)||dn(e)!=FO)return!1;var t=Is(e);if(t===null)return!0;var r=kO.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Yg.call(r)==LO}function xs(e){const t={[Ht]:[],addError(r){this[Ht].push(r)}};if(Array.isArray(e))return e.reduce((r,n,i)=>({...r,[i]:xs(n)}),t);if(Wn(e)){const r=e;return Object.keys(r).reduce((n,i)=>({...n,[i]:xs(r[i])}),t)}return t}function jO(){this.__data__=[],this.size=0}function Ja(e,t){return e===t||e!==e&&t!==t}function Ds(e,t){for(var r=e.length;r--;)if(Ja(e[r][0],t))return r;return-1}var BO=Array.prototype,UO=BO.splice;function WO(e){var t=this.__data__,r=Ds(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UO.call(t,r,1),--this.size,!0}function qO(e){var t=this.__data__,r=Ds(t,e);return r<0?void 0:t[r][1]}function VO(e){return Ds(this.__data__,e)>-1}function RO(e,t){var r=this.__data__,n=Ds(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function hn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hn.prototype.clear=jO,hn.prototype.delete=WO,hn.prototype.get=qO,hn.prototype.has=VO,hn.prototype.set=RO;function zO(){this.__data__=new hn,this.size=0}function HO(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function KO(e){return this.__data__.get(e)}function GO(e){return this.__data__.has(e)}function Re(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var YO="[object AsyncFunction]",JO="[object Function]",XO="[object GeneratorFunction]",ZO="[object Proxy]";function Xa(e){if(!Re(e))return!1;var t=dn(e);return t==JO||t==XO||t==YO||t==ZO}var Xu=Hr["__core-js_shared__"],Jg=function(){var e=/[^.]+$/.exec(Xu&&Xu.keys&&Xu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function QO(e){return!!Jg&&Jg in e}var eA=Function.prototype,tA=eA.toString;function si(e){if(e!=null){try{return tA.call(e)}catch{}try{return e+""}catch{}}return""}var rA=/[\\^$.*+?()[\]{}|]/g,nA=/^\[object .+?Constructor\]$/,iA=Function.prototype,aA=Object.prototype,oA=iA.toString,sA=aA.hasOwnProperty,lA=RegExp("^"+oA.call(sA).replace(rA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cA(e){if(!Re(e)||QO(e))return!1;var t=Xa(e)?lA:nA;return t.test(si(e))}function uA(e,t){return e==null?void 0:e[t]}function li(e,t){var r=uA(e,t);return cA(r)?r:void 0}var Za=li(Hr,"Map"),Qa=li(Object,"create");function fA(){this.__data__=Qa?Qa(null):{},this.size=0}function dA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hA="__lodash_hash_undefined__",pA=Object.prototype,mA=pA.hasOwnProperty;function gA(e){var t=this.__data__;if(Qa){var r=t[e];return r===hA?void 0:r}return mA.call(t,e)?t[e]:void 0}var yA=Object.prototype,vA=yA.hasOwnProperty;function bA(e){var t=this.__data__;return Qa?t[e]!==void 0:vA.call(t,e)}var _A="__lodash_hash_undefined__";function $A(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qa&&t===void 0?_A:t,this}function ci(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ci.prototype.clear=fA,ci.prototype.delete=dA,ci.prototype.get=gA,ci.prototype.has=bA,ci.prototype.set=$A;function wA(){this.size=0,this.__data__={hash:new ci,map:new(Za||hn),string:new ci}}function SA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fs(e,t){var r=e.__data__;return SA(t)?r[typeof t=="string"?"string":"hash"]:r.map}function CA(e){var t=Fs(this,e).delete(e);return this.size-=t?1:0,t}function EA(e){return Fs(this,e).get(e)}function OA(e){return Fs(this,e).has(e)}function AA(e,t){var r=Fs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function pn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pn.prototype.clear=wA,pn.prototype.delete=CA,pn.prototype.get=EA,pn.prototype.has=OA,pn.prototype.set=AA;var TA=200;function PA(e,t){var r=this.__data__;if(r instanceof hn){var n=r.__data__;if(!Za||n.length<TA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pn(n)}return r.set(e,t),this.size=r.size,this}function Dr(e){var t=this.__data__=new hn(e);this.size=t.size}Dr.prototype.clear=zO,Dr.prototype.delete=HO,Dr.prototype.get=KO,Dr.prototype.has=GO,Dr.prototype.set=PA;var IA="__lodash_hash_undefined__";function xA(e){return this.__data__.set(e,IA),this}function DA(e){return this.__data__.has(e)}function ui(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new pn;++t<r;)this.add(e[t])}ui.prototype.add=ui.prototype.push=xA,ui.prototype.has=DA;function FA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function eo(e,t){return e.has(t)}var NA=1,MA=2;function Xg(e,t,r,n,i,a){var s=r&NA,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,y=r&MA?new ui:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var _=e[p],w=t[p];if(n)var v=s?n(w,_,p,t,e,a):n(_,w,p,e,t,a);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!FA(t,function(g,C){if(!eo(y,C)&&(_===g||i(_,g,r,n,a)))return y.push(C)})){m=!1;break}}else if(!(_===w||i(_,w,r,n,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var Ns=Hr.Uint8Array;function kA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Zu(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LA=1,jA=2,BA="[object Boolean]",UA="[object Date]",WA="[object Error]",qA="[object Map]",VA="[object Number]",RA="[object RegExp]",zA="[object Set]",HA="[object String]",KA="[object Symbol]",GA="[object ArrayBuffer]",YA="[object DataView]",Zg=mr?mr.prototype:void 0,Qu=Zg?Zg.valueOf:void 0;function JA(e,t,r,n,i,a,s){switch(r){case YA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case GA:return!(e.byteLength!=t.byteLength||!a(new Ns(e),new Ns(t)));case BA:case UA:case VA:return Ja(+e,+t);case WA:return e.name==t.name&&e.message==t.message;case RA:case HA:return e==t+"";case qA:var l=kA;case zA:var u=n&LA;if(l||(l=Zu),e.size!=t.size&&!u)return!1;var f=s.get(e);if(f)return f==t;n|=jA,s.set(e,t);var d=Xg(l(e),l(t),n,i,a,s);return s.delete(e),d;case KA:if(Qu)return Qu.call(e)==Qu.call(t)}return!1}function ef(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Et=Array.isArray;function Qg(e,t,r){var n=t(e);return Et(e)?n:ef(n,r(e))}function XA(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}function ey(){return[]}var ZA=Object.prototype,QA=ZA.propertyIsEnumerable,ty=Object.getOwnPropertySymbols,tf=ty?function(e){return e==null?[]:(e=Object(e),XA(ty(e),function(t){return QA.call(e,t)}))}:ey;function ry(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var eT="[object Arguments]";function ny(e){return gr(e)&&dn(e)==eT}var iy=Object.prototype,tT=iy.hasOwnProperty,rT=iy.propertyIsEnumerable,Vi=ny(function(){return arguments}())?ny:function(e){return gr(e)&&tT.call(e,"callee")&&!rT.call(e,"callee")};function nT(){return!1}var ay=typeof ie=="object"&&ie&&!ie.nodeType&&ie,oy=ay&&typeof module=="object"&&module&&!module.nodeType&&module,iT=oy&&oy.exports===ay,sy=iT?Hr.Buffer:void 0,aT=sy?sy.isBuffer:void 0,fi=aT||nT,oT=9007199254740991,sT=/^(?:0|[1-9]\d*)$/;function Ms(e,t){var r=typeof e;return t=t??oT,!!t&&(r=="number"||r!="symbol"&&sT.test(e))&&e>-1&&e%1==0&&e<t}var lT=9007199254740991;function rf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lT}var cT="[object Arguments]",uT="[object Array]",fT="[object Boolean]",dT="[object Date]",hT="[object Error]",pT="[object Function]",mT="[object Map]",gT="[object Number]",yT="[object Object]",vT="[object RegExp]",bT="[object Set]",_T="[object String]",$T="[object WeakMap]",wT="[object ArrayBuffer]",ST="[object DataView]",CT="[object Float32Array]",ET="[object Float64Array]",OT="[object Int8Array]",AT="[object Int16Array]",TT="[object Int32Array]",PT="[object Uint8Array]",IT="[object Uint8ClampedArray]",xT="[object Uint16Array]",DT="[object Uint32Array]",st={};st[CT]=st[ET]=st[OT]=st[AT]=st[TT]=st[PT]=st[IT]=st[xT]=st[DT]=!0,st[cT]=st[uT]=st[wT]=st[fT]=st[ST]=st[dT]=st[hT]=st[pT]=st[mT]=st[gT]=st[yT]=st[vT]=st[bT]=st[_T]=st[$T]=!1;function FT(e){return gr(e)&&rf(e.length)&&!!st[dn(e)]}function nf(e){return function(t){return e(t)}}var ly=typeof ie=="object"&&ie&&!ie.nodeType&&ie,to=ly&&typeof module=="object"&&module&&!module.nodeType&&module,NT=to&&to.exports===ly,af=NT&&zg.process,Ri=function(){try{var e=to&&to.require&&to.require("util").types;return e||af&&af.binding&&af.binding("util")}catch{}}(),cy=Ri&&Ri.isTypedArray,ro=cy?nf(cy):FT,MT=Object.prototype,kT=MT.hasOwnProperty;function uy(e,t){var r=Et(e),n=!r&&Vi(e),i=!r&&!n&&fi(e),a=!r&&!n&&!i&&ro(e),s=r||n||i||a,l=s?ry(e.length,String):[],u=l.length;for(var f in e)(t||kT.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ms(f,u)))&&l.push(f);return l}var LT=Object.prototype;function ks(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||LT;return e===r}var jT=Gg(Object.keys,Object),BT=Object.prototype,UT=BT.hasOwnProperty;function fy(e){if(!ks(e))return jT(e);var t=[];for(var r in Object(e))UT.call(e,r)&&r!="constructor"&&t.push(r);return t}function di(e){return e!=null&&rf(e.length)&&!Xa(e)}function Fr(e){return di(e)?uy(e):fy(e)}function of(e){return Qg(e,Fr,tf)}var WT=1,qT=Object.prototype,VT=qT.hasOwnProperty;function RT(e,t,r,n,i,a){var s=r&WT,l=of(e),u=l.length,f=of(t),d=f.length;if(u!=d&&!s)return!1;for(var p=u;p--;){var m=l[p];if(!(s?m in t:VT.call(t,m)))return!1}var y=a.get(e),_=a.get(t);if(y&&_)return y==t&&_==e;var w=!0;a.set(e,t),a.set(t,e);for(var v=s;++p<u;){m=l[p];var g=e[m],C=t[m];if(n)var S=s?n(C,g,m,t,e,a):n(g,C,m,e,t,a);if(!(S===void 0?g===C||i(g,C,r,n,a):S)){w=!1;break}v||(v=m=="constructor")}if(w&&!v){var E=e.constructor,A=t.constructor;E!=A&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof A=="function"&&A instanceof A)&&(w=!1)}return a.delete(e),a.delete(t),w}var sf=li(Hr,"DataView"),lf=li(Hr,"Promise"),zi=li(Hr,"Set"),cf=li(Hr,"WeakMap"),dy="[object Map]",zT="[object Object]",hy="[object Promise]",py="[object Set]",my="[object WeakMap]",gy="[object DataView]",HT=si(sf),KT=si(Za),GT=si(lf),YT=si(zi),JT=si(cf),yr=dn;(sf&&yr(new sf(new ArrayBuffer(1)))!=gy||Za&&yr(new Za)!=dy||lf&&yr(lf.resolve())!=hy||zi&&yr(new zi)!=py||cf&&yr(new cf)!=my)&&(yr=function(e){var t=dn(e),r=t==zT?e.constructor:void 0,n=r?si(r):"";if(n)switch(n){case HT:return gy;case KT:return dy;case GT:return hy;case YT:return py;case JT:return my}return t});var XT=1,yy="[object Arguments]",vy="[object Array]",Ls="[object Object]",ZT=Object.prototype,by=ZT.hasOwnProperty;function QT(e,t,r,n,i,a){var s=Et(e),l=Et(t),u=s?vy:yr(e),f=l?vy:yr(t);u=u==yy?Ls:u,f=f==yy?Ls:f;var d=u==Ls,p=f==Ls,m=u==f;if(m&&fi(e)){if(!fi(t))return!1;s=!0,d=!1}if(m&&!d)return a||(a=new Dr),s||ro(e)?Xg(e,t,r,n,i,a):JA(e,t,u,r,n,i,a);if(!(r&XT)){var y=d&&by.call(e,"__wrapped__"),_=p&&by.call(t,"__wrapped__");if(y||_){var w=y?e.value():e,v=_?t.value():t;return a||(a=new Dr),i(w,v,r,n,a)}}return m?(a||(a=new Dr),RT(e,t,r,n,i,a)):!1}function no(e,t,r,n,i){return e===t?!0:e==null||t==null||!gr(e)&&!gr(t)?e!==e&&t!==t:QT(e,t,r,n,no,i)}function eP(e,t,r){r=typeof r=="function"?r:void 0;var n=r?r(e,t):void 0;return n===void 0?no(e,t,void 0,r):!!n}function ht(e,t){return eP(e,t,(r,n)=>{if(typeof r=="function"&&typeof n=="function")return!0})}var tP="[object Symbol]";function io(e){return typeof e=="symbol"||gr(e)&&dn(e)==tP}var rP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nP=/^\w*$/;function uf(e,t){if(Et(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||io(e)?!0:nP.test(e)||!rP.test(e)||t!=null&&e in Object(t)}var iP="Expected a function";function ff(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(iP);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(ff.Cache||pn),r}ff.Cache=pn;var aP=500;function oP(e){var t=ff(e,function(n){return r.size===aP&&r.clear(),n}),r=t.cache;return t}var sP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lP=/\\(\\)?/g,_y=oP(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sP,function(r,n,i,a){t.push(i?a.replace(lP,"$1"):n||r)}),t});function Hi(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var $y=mr?mr.prototype:void 0,wy=$y?$y.toString:void 0;function Sy(e){if(typeof e=="string")return e;if(Et(e))return Hi(e,Sy)+"";if(io(e))return wy?wy.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Cy(e){return e==null?"":Sy(e)}function Ki(e,t){return Et(e)?e:uf(e,t)?[e]:_y(Cy(e))}function hi(e){if(typeof e=="string"||io(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function js(e,t){t=Ki(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hi(t[r++])];return r&&r==n?e:void 0}function de(e,t,r){var n=e==null?void 0:js(e,t);return n===void 0?r:n}var cP=Object.prototype,uP=cP.hasOwnProperty;function fP(e,t){return e!=null&&uP.call(e,t)}function Ey(e,t,r){t=Ki(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=hi(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&rf(i)&&Ms(s,i)&&(Et(e)||Vi(e)))}function We(e,t){return e!=null&&Ey(e,t,fP)}function Oy(e,t){return no(e,t)}var Bs=function(){try{var e=li(Object,"defineProperty");return e({},"",{}),e}catch{}}();function df(e,t,r){t=="__proto__"&&Bs?Bs(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var dP=Object.prototype,hP=dP.hasOwnProperty;function hf(e,t,r){var n=e[t];(!(hP.call(e,t)&&Ja(n,r))||r===void 0&&!(t in e))&&df(e,t,r)}function pf(e,t,r,n){if(!Re(e))return e;t=Ki(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var u=hi(t[i]),f=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var d=l[u];f=n?n(d,u,l):void 0,f===void 0&&(f=Re(d)?d:Ms(t[i+1])?[]:{})}hf(l,u,f),l=l[u]}return e}function Qe(e,t,r){return e==null?e:pf(e,t,r)}function Us(e){return e}function Ay(e){return typeof e=="function"?e:Us}var pP=/\s/;function mP(e){for(var t=e.length;t--&&pP.test(e.charAt(t)););return t}var gP=/^\s+/;function yP(e){return e&&e.slice(0,mP(e)+1).replace(gP,"")}var Ty=NaN,vP=/^[-+]0x[0-9a-f]+$/i,bP=/^0b[01]+$/i,_P=/^0o[0-7]+$/i,$P=parseInt;function wP(e){if(typeof e=="number")return e;if(io(e))return Ty;if(Re(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Re(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yP(e);var r=bP.test(e);return r||_P.test(e)?$P(e.slice(2),r?2:8):vP.test(e)?Ty:+e}var SP=1/0,CP=17976931348623157e292;function EP(e){if(!e)return e===0?e:0;if(e=wP(e),e===SP||e===-1/0){var t=e<0?-1:1;return t*CP}return e===e?e:0}function Py(e){var t=EP(e),r=t%1;return t===t?r?t-r:t:0}var OP=9007199254740991,mf=4294967295,AP=Math.min;function Iy(e,t){if(e=Py(e),e<1||e>OP)return[];var r=mf,n=AP(e,mf);t=Ay(t),e-=mf;for(var i=ry(n,t);++r<e;)t(r);return i}function gf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var xy=Object.create,Dy=function(){function e(){}return function(t){if(!Re(t))return{};if(xy)return xy(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function TP(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),l=s.length;l--;){var u=s[++i];if(r(a[u],u,a)===!1)break}return t}}var Fy=TP();function Ny(e,t){return e&&Fy(e,t,Fr)}var PP=1,IP=2;function xP(e,t,r,n){var i=r.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var l=s[0],u=e[l],f=s[1];if(s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Dr,p;if(!(p===void 0?no(f,u,PP|IP,n,d):p))return!1}}return!0}function My(e){return e===e&&!Re(e)}function DP(e){for(var t=Fr(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,My(i)]}return t}function ky(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function FP(e){var t=DP(e);return t.length==1&&t[0][2]?ky(t[0][0],t[0][1]):function(r){return r===e||xP(r,e,t)}}function NP(e,t){return e!=null&&t in Object(e)}function Ly(e,t){return e!=null&&Ey(e,t,NP)}var MP=1,kP=2;function LP(e,t){return uf(e)&&My(t)?ky(hi(e),t):function(r){var n=de(r,e);return n===void 0&&n===t?Ly(r,e):no(t,n,MP|kP)}}function jP(e){return function(t){return t==null?void 0:t[e]}}function BP(e){return function(t){return js(t,e)}}function UP(e){return uf(e)?jP(hi(e)):BP(e)}function yf(e){return typeof e=="function"?e:e==null?Us:typeof e=="object"?Et(e)?LP(e[0],e[1]):FP(e):UP(e)}function WP(e,t,r){var n=Et(e),i=n||fi(e)||ro(e);if(t=yf(t),r==null){var a=e&&e.constructor;i?r=n?new a:[]:Re(e)?r=Xa(a)?Dy(Is(e)):{}:r={}}return(i?gf:Ny)(e,function(s,l,u){return t(r,s,l,u)}),r}function vf(e,t,r){(r!==void 0&&!Ja(e[t],r)||r===void 0&&!(t in e))&&df(e,t,r)}var jy=typeof ie=="object"&&ie&&!ie.nodeType&&ie,By=jy&&typeof module=="object"&&module&&!module.nodeType&&module,qP=By&&By.exports===jy,Uy=qP?Hr.Buffer:void 0,Wy=Uy?Uy.allocUnsafe:void 0;function qy(e,t){if(t)return e.slice();var r=e.length,n=Wy?Wy(r):new e.constructor(r);return e.copy(n),n}function bf(e){var t=new e.constructor(e.byteLength);return new Ns(t).set(new Ns(e)),t}function Vy(e,t){var r=t?bf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function _f(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Ry(e){return typeof e.constructor=="function"&&!ks(e)?Dy(Is(e)):{}}function ao(e){return gr(e)&&di(e)}function $f(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Gi(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=void 0;u===void 0&&(u=e[l]),i?df(r,l,u):hf(r,l,u)}return r}function VP(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var RP=Object.prototype,zP=RP.hasOwnProperty;function HP(e){if(!Re(e))return VP(e);var t=ks(e),r=[];for(var n in e)n=="constructor"&&(t||!zP.call(e,n))||r.push(n);return r}function oo(e){return di(e)?uy(e,!0):HP(e)}function KP(e){return Gi(e,oo(e))}function GP(e,t,r,n,i,a,s){var l=$f(e,r),u=$f(t,r),f=s.get(u);if(f){vf(e,r,f);return}var d=a?a(l,u,r+"",e,t,s):void 0,p=d===void 0;if(p){var m=Et(u),y=!m&&fi(u),_=!m&&!y&&ro(u);d=u,m||y||_?Et(l)?d=l:ao(l)?d=_f(l):y?(p=!1,d=qy(u,!0)):_?(p=!1,d=Vy(u,!0)):d=[]:Wn(u)||Vi(u)?(d=l,Vi(l)?d=KP(l):(!Re(l)||Xa(l))&&(d=Ry(u))):p=!1}p&&(s.set(u,d),i(d,u,n,a,s),s.delete(u)),vf(e,r,d)}function zy(e,t,r,n,i){e!==t&&Fy(t,function(a,s){if(i||(i=new Dr),Re(a))GP(e,t,s,r,zy,n,i);else{var l=n?n($f(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),vf(e,s,l)}},oo)}function YP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Hy=Math.max;function Ky(e,t,r){return t=Hy(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Hy(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),YP(e,this,l)}}function JP(e){return function(){return e}}var XP=Bs?function(e,t){return Bs(e,"toString",{configurable:!0,enumerable:!1,value:JP(t),writable:!0})}:Us,ZP=800,QP=16,e2=Date.now;function t2(e){var t=0,r=0;return function(){var n=e2(),i=QP-(n-r);if(r=n,i>0){if(++t>=ZP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Gy=t2(XP);function Ws(e,t){return Gy(Ky(e,t,Us),e+"")}function r2(e,t,r){if(!Re(r))return!1;var n=typeof t;return(n=="number"?di(r)&&Ms(t,r.length):n=="string"&&t in r)?Ja(r[t],e):!1}function n2(e){return Ws(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&r2(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,a)}return t})}var i2=n2(function(e,t,r){zy(e,t,r)}),Yy=mr?mr.isConcatSpreadable:void 0;function a2(e){return Et(e)||Vi(e)||!!(Yy&&e&&e[Yy])}function so(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=a2),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?so(l,t-1,r,n,i):ef(i,l):n||(i[i.length]=l)}return i}var o2=1/0;function s2(e){var t=e==null?0:e.length;return t?so(e,o2):[]}function l2(e,t,r,n){for(var i=e.length,a=r+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function c2(e){return e!==e}function u2(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Jy(e,t,r){return t===t?u2(e,t,r):l2(e,c2,r)}function wf(e,t){var r=e==null?0:e.length;return!!r&&Jy(e,t,0)>-1}function Xy(){}var f2=1/0,d2=zi&&1/Zu(new zi([,-0]))[1]==f2?function(e){return new zi(e)}:Xy,h2=200;function Zy(e,t,r){var n=-1,i=wf,a=e.length,s=!0,l=[],u=l;if(a>=h2){var f=d2(e);if(f)return Zu(f);s=!1,i=eo,u=new ui}else u=l;e:for(;++n<a;){var d=e[n],p=d;if(d=d!==0?d:0,s&&p===p){for(var m=u.length;m--;)if(u[m]===p)continue e;l.push(d)}else i(u,p,r)||(u!==l&&u.push(p),l.push(d))}return l}function p2(e){return e&&e.length?Zy(e):[]}var Nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function g2(){this.__data__=[],this.size=0}var y2=g2;function v2(e,t){return e===t||e!==e&&t!==t}var Yi=v2,b2=Yi;function _2(e,t){for(var r=e.length;r--;)if(b2(e[r][0],t))return r;return-1}var qs=_2,$2=qs,w2=Array.prototype,S2=w2.splice;function C2(e){var t=this.__data__,r=$2(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():S2.call(t,r,1),--this.size,!0}var E2=C2,O2=qs;function A2(e){var t=this.__data__,r=O2(t,e);return r<0?void 0:t[r][1]}var T2=A2,P2=qs;function I2(e){return P2(this.__data__,e)>-1}var x2=I2,D2=qs;function F2(e,t){var r=this.__data__,n=D2(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var N2=F2,M2=y2,k2=E2,L2=T2,j2=x2,B2=N2;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ji.prototype.clear=M2,Ji.prototype.delete=k2,Ji.prototype.get=L2,Ji.prototype.has=j2,Ji.prototype.set=B2;var Vs=Ji,U2=Vs;function W2(){this.__data__=new U2,this.size=0}var q2=W2;function V2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var R2=V2;function z2(e){return this.__data__.get(e)}var H2=z2;function K2(e){return this.__data__.has(e)}var G2=K2,Y2=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,Qy=Y2,J2=Qy,X2=typeof self=="object"&&self&&self.Object===Object&&self,Z2=J2||X2||Function("return this")(),Kr=Z2,Q2=Kr,eI=Q2.Symbol,Xi=eI,ev=Xi,tv=Object.prototype,tI=tv.hasOwnProperty,rI=tv.toString,lo=ev?ev.toStringTag:void 0;function nI(e){var t=tI.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=rI.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var iI=nI,aI=Object.prototype,oI=aI.toString;function sI(e){return oI.call(e)}var lI=sI,rv=Xi,cI=iI,uI=lI,fI="[object Null]",dI="[object Undefined]",nv=rv?rv.toStringTag:void 0;function hI(e){return e==null?e===void 0?dI:fI:nv&&nv in Object(e)?cI(e):uI(e)}var pi=hI;function pI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gr=pI,mI=pi,gI=Gr,yI="[object AsyncFunction]",vI="[object Function]",bI="[object GeneratorFunction]",_I="[object Proxy]";function $I(e){if(!gI(e))return!1;var t=mI(e);return t==vI||t==bI||t==yI||t==_I}var Sf=$I,wI=Kr,SI=wI["__core-js_shared__"],CI=SI,Cf=CI,iv=function(){var e=/[^.]+$/.exec(Cf&&Cf.keys&&Cf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function EI(e){return!!iv&&iv in e}var OI=EI,AI=Function.prototype,TI=AI.toString;function PI(e){if(e!=null){try{return TI.call(e)}catch{}try{return e+""}catch{}}return""}var av=PI,II=Sf,xI=OI,DI=Gr,FI=av,NI=/[\\^$.*+?()[\]{}|]/g,MI=/^\[object .+?Constructor\]$/,kI=Function.prototype,LI=Object.prototype,jI=kI.toString,BI=LI.hasOwnProperty,UI=RegExp("^"+jI.call(BI).replace(NI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function WI(e){if(!DI(e)||xI(e))return!1;var t=II(e)?UI:MI;return t.test(FI(e))}var qI=WI;function VI(e,t){return e==null?void 0:e[t]}var RI=VI,zI=qI,HI=RI;function KI(e,t){var r=HI(e,t);return zI(r)?r:void 0}var mi=KI,GI=mi,YI=Kr,JI=GI(YI,"Map"),Ef=JI,XI=mi,ZI=XI(Object,"create"),Rs=ZI,ov=Rs;function QI(){this.__data__=ov?ov(null):{},this.size=0}var ex=QI;function tx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rx=tx,nx=Rs,ix="__lodash_hash_undefined__",ax=Object.prototype,ox=ax.hasOwnProperty;function sx(e){var t=this.__data__;if(nx){var r=t[e];return r===ix?void 0:r}return ox.call(t,e)?t[e]:void 0}var lx=sx,cx=Rs,ux=Object.prototype,fx=ux.hasOwnProperty;function dx(e){var t=this.__data__;return cx?t[e]!==void 0:fx.call(t,e)}var hx=dx,px=Rs,mx="__lodash_hash_undefined__";function gx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=px&&t===void 0?mx:t,this}var yx=gx,vx=ex,bx=rx,_x=lx,$x=hx,wx=yx;function Zi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zi.prototype.clear=vx,Zi.prototype.delete=bx,Zi.prototype.get=_x,Zi.prototype.has=$x,Zi.prototype.set=wx;var Sx=Zi,sv=Sx,Cx=Vs,Ex=Ef;function Ox(){this.size=0,this.__data__={hash:new sv,map:new(Ex||Cx),string:new sv}}var Ax=Ox;function Tx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Px=Tx,Ix=Px;function xx(e,t){var r=e.__data__;return Ix(t)?r[typeof t=="string"?"string":"hash"]:r.map}var zs=xx,Dx=zs;function Fx(e){var t=Dx(this,e).delete(e);return this.size-=t?1:0,t}var Nx=Fx,Mx=zs;function kx(e){return Mx(this,e).get(e)}var Lx=kx,jx=zs;function Bx(e){return jx(this,e).has(e)}var Ux=Bx,Wx=zs;function qx(e,t){var r=Wx(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Vx=qx,Rx=Ax,zx=Nx,Hx=Lx,Kx=Ux,Gx=Vx;function Qi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Qi.prototype.clear=Rx,Qi.prototype.delete=zx,Qi.prototype.get=Hx,Qi.prototype.has=Kx,Qi.prototype.set=Gx;var Of=Qi,Yx=Vs,Jx=Ef,Xx=Of,Zx=200;function Qx(e,t){var r=this.__data__;if(r instanceof Yx){var n=r.__data__;if(!Jx||n.length<Zx-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xx(n)}return r.set(e,t),this.size=r.size,this}var eD=Qx,tD=Vs,rD=q2,nD=R2,iD=H2,aD=G2,oD=eD;function ea(e){var t=this.__data__=new tD(e);this.size=t.size}ea.prototype.clear=rD,ea.prototype.delete=nD,ea.prototype.get=iD,ea.prototype.has=aD,ea.prototype.set=oD;var Hs=ea;function sD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var lv=sD,lD=mi,cD=function(){try{var e=lD(Object,"defineProperty");return e({},"",{}),e}catch{}}(),cv=cD,uv=cv;function uD(e,t,r){t=="__proto__"&&uv?uv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Af=uD,fD=Af,dD=Yi,hD=Object.prototype,pD=hD.hasOwnProperty;function mD(e,t,r){var n=e[t];(!(pD.call(e,t)&&dD(n,r))||r===void 0&&!(t in e))&&fD(e,t,r)}var fv=mD,gD=fv,yD=Af;function vD(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=n?n(r[l],e[l],l,r,e):void 0;u===void 0&&(u=e[l]),i?yD(r,l,u):gD(r,l,u)}return r}var co=vD;function bD(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _D=bD;function $D(e){return e!=null&&typeof e=="object"}var Yr=$D,wD=pi,SD=Yr,CD="[object Arguments]";function ED(e){return SD(e)&&wD(e)==CD}var OD=ED,dv=OD,AD=Yr,hv=Object.prototype,TD=hv.hasOwnProperty,PD=hv.propertyIsEnumerable,ID=dv(function(){return arguments}())?dv:function(e){return AD(e)&&TD.call(e,"callee")&&!PD.call(e,"callee")},Ks=ID,xD=Array.isArray,or=xD,Gs={exports:{}};function DD(){return!1}var FD=DD;Gs.exports,function(e,t){var r=Kr,n=FD,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?r.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||n;e.exports=f}(Gs,Gs.exports);var Ys=Gs.exports,ND=9007199254740991,MD=/^(?:0|[1-9]\d*)$/;function kD(e,t){var r=typeof e;return t=t??ND,!!t&&(r=="number"||r!="symbol"&&MD.test(e))&&e>-1&&e%1==0&&e<t}var Tf=kD,LD=9007199254740991;function jD(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LD}var Pf=jD,BD=pi,UD=Pf,WD=Yr,qD="[object Arguments]",VD="[object Array]",RD="[object Boolean]",zD="[object Date]",HD="[object Error]",KD="[object Function]",GD="[object Map]",YD="[object Number]",JD="[object Object]",XD="[object RegExp]",ZD="[object Set]",QD="[object String]",eF="[object WeakMap]",tF="[object ArrayBuffer]",rF="[object DataView]",nF="[object Float32Array]",iF="[object Float64Array]",aF="[object Int8Array]",oF="[object Int16Array]",sF="[object Int32Array]",lF="[object Uint8Array]",cF="[object Uint8ClampedArray]",uF="[object Uint16Array]",fF="[object Uint32Array]",lt={};lt[nF]=lt[iF]=lt[aF]=lt[oF]=lt[sF]=lt[lF]=lt[cF]=lt[uF]=lt[fF]=!0,lt[qD]=lt[VD]=lt[tF]=lt[RD]=lt[rF]=lt[zD]=lt[HD]=lt[KD]=lt[GD]=lt[YD]=lt[JD]=lt[XD]=lt[ZD]=lt[QD]=lt[eF]=!1;function dF(e){return WD(e)&&UD(e.length)&&!!lt[BD(e)]}var hF=dF;function pF(e){return function(t){return e(t)}}var gi=pF,Js={exports:{}};Js.exports,function(e,t){var r=Qy,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l}(Js,Js.exports);var If=Js.exports,mF=hF,gF=gi,pv=If,mv=pv&&pv.isTypedArray,yF=mv?gF(mv):mF,xf=yF,vF=_D,bF=Ks,_F=or,$F=Ys,wF=Tf,SF=xf,CF=Object.prototype,EF=CF.hasOwnProperty;function OF(e,t){var r=_F(e),n=!r&&bF(e),i=!r&&!n&&$F(e),a=!r&&!n&&!i&&SF(e),s=r||n||i||a,l=s?vF(e.length,String):[],u=l.length;for(var f in e)(t||EF.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||wF(f,u)))&&l.push(f);return l}var gv=OF,AF=Object.prototype;function TF(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AF;return e===r}var Df=TF;function PF(e,t){return function(r){return e(t(r))}}var yv=PF,IF=yv,xF=IF(Object.keys,Object),DF=xF,FF=Df,NF=DF,MF=Object.prototype,kF=MF.hasOwnProperty;function LF(e){if(!FF(e))return NF(e);var t=[];for(var r in Object(e))kF.call(e,r)&&r!="constructor"&&t.push(r);return t}var jF=LF,BF=Sf,UF=Pf;function WF(e){return e!=null&&UF(e.length)&&!BF(e)}var ta=WF,qF=gv,VF=jF,RF=ta;function zF(e){return RF(e)?qF(e):VF(e)}var uo=zF,HF=co,KF=uo;function GF(e,t){return e&&HF(t,KF(t),e)}var YF=GF;function JF(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var XF=JF,ZF=Gr,QF=Df,eN=XF,tN=Object.prototype,rN=tN.hasOwnProperty;function nN(e){if(!ZF(e))return eN(e);var t=QF(e),r=[];for(var n in e)n=="constructor"&&(t||!rN.call(e,n))||r.push(n);return r}var iN=nN,aN=gv,oN=iN,sN=ta;function lN(e){return sN(e)?aN(e,!0):oN(e)}var ra=lN,cN=co,uN=ra;function fN(e,t){return e&&cN(t,uN(t),e)}var dN=fN,Xs={exports:{}};Xs.exports,function(e,t){var r=Kr,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function u(f,d){if(d)return f.slice();var p=f.length,m=l?l(p):new f.constructor(p);return f.copy(m),m}e.exports=u}(Xs,Xs.exports);var vv=Xs.exports;function hN(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Ff=hN;function pN(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var mN=pN;function gN(){return[]}var bv=gN,yN=mN,vN=bv,bN=Object.prototype,_N=bN.propertyIsEnumerable,_v=Object.getOwnPropertySymbols,$N=_v?function(e){return e==null?[]:(e=Object(e),yN(_v(e),function(t){return _N.call(e,t)}))}:vN,Nf=$N,wN=co,SN=Nf;function CN(e,t){return wN(e,SN(e),t)}var EN=CN;function ON(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Mf=ON,AN=yv,TN=AN(Object.getPrototypeOf,Object),kf=TN,PN=Mf,IN=kf,xN=Nf,DN=bv,FN=Object.getOwnPropertySymbols,NN=FN?function(e){for(var t=[];e;)PN(t,xN(e)),e=IN(e);return t}:DN,$v=NN,MN=co,kN=$v;function LN(e,t){return MN(e,kN(e),t)}var jN=LN,BN=Mf,UN=or;function WN(e,t,r){var n=t(e);return UN(e)?n:BN(n,r(e))}var wv=WN,qN=wv,VN=Nf,RN=uo;function zN(e){return qN(e,RN,VN)}var Sv=zN,HN=wv,KN=$v,GN=ra;function YN(e){return HN(e,GN,KN)}var JN=YN,XN=mi,ZN=Kr,QN=XN(ZN,"DataView"),eM=QN,tM=mi,rM=Kr,nM=tM(rM,"Promise"),iM=nM,aM=mi,oM=Kr,sM=aM(oM,"Set"),Cv=sM,lM=mi,cM=Kr,uM=lM(cM,"WeakMap"),fM=uM,Lf=eM,jf=Ef,Bf=iM,Uf=Cv,Wf=fM,Ev=pi,na=av,Ov="[object Map]",dM="[object Object]",Av="[object Promise]",Tv="[object Set]",Pv="[object WeakMap]",Iv="[object DataView]",hM=na(Lf),pM=na(jf),mM=na(Bf),gM=na(Uf),yM=na(Wf),yi=Ev;(Lf&&yi(new Lf(new ArrayBuffer(1)))!=Iv||jf&&yi(new jf)!=Ov||Bf&&yi(Bf.resolve())!=Av||Uf&&yi(new Uf)!=Tv||Wf&&yi(new Wf)!=Pv)&&(yi=function(e){var t=Ev(e),r=t==dM?e.constructor:void 0,n=r?na(r):"";if(n)switch(n){case hM:return Iv;case pM:return Ov;case mM:return Av;case gM:return Tv;case yM:return Pv}return t});var Zs=yi,vM=Object.prototype,bM=vM.hasOwnProperty;function _M(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&bM.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var $M=_M,wM=Kr,SM=wM.Uint8Array,xv=SM,Dv=xv;function CM(e){var t=new e.constructor(e.byteLength);return new Dv(t).set(new Dv(e)),t}var qf=CM,EM=qf;function OM(e,t){var r=t?EM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var AM=OM,TM=/\w*$/;function PM(e){var t=new e.constructor(e.source,TM.exec(e));return t.lastIndex=e.lastIndex,t}var IM=PM,Fv=Xi,Nv=Fv?Fv.prototype:void 0,Mv=Nv?Nv.valueOf:void 0;function xM(e){return Mv?Object(Mv.call(e)):{}}var DM=xM,FM=qf;function NM(e,t){var r=t?FM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var kv=NM,MM=qf,kM=AM,LM=IM,jM=DM,BM=kv,UM="[object Boolean]",WM="[object Date]",qM="[object Map]",VM="[object Number]",RM="[object RegExp]",zM="[object Set]",HM="[object String]",KM="[object Symbol]",GM="[object ArrayBuffer]",YM="[object DataView]",JM="[object Float32Array]",XM="[object Float64Array]",ZM="[object Int8Array]",QM="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",r4="[object Uint8ClampedArray]",n4="[object Uint16Array]",i4="[object Uint32Array]";function a4(e,t,r){var n=e.constructor;switch(t){case GM:return MM(e);case UM:case WM:return new n(+e);case YM:return kM(e,r);case JM:case XM:case ZM:case QM:case e4:case t4:case r4:case n4:case i4:return BM(e,r);case qM:return new n;case VM:case HM:return new n(e);case RM:return LM(e);case zM:return new n;case KM:return jM(e)}}var o4=a4,s4=Gr,Lv=Object.create,l4=function(){function e(){}return function(t){if(!s4(t))return{};if(Lv)return Lv(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),c4=l4,u4=c4,f4=kf,d4=Df;function h4(e){return typeof e.constructor=="function"&&!d4(e)?u4(f4(e)):{}}var jv=h4,p4=Zs,m4=Yr,g4="[object Map]";function y4(e){return m4(e)&&p4(e)==g4}var v4=y4,b4=v4,_4=gi,Bv=If,Uv=Bv&&Bv.isMap,$4=Uv?_4(Uv):b4,w4=$4,S4=Zs,C4=Yr,E4="[object Set]";function O4(e){return C4(e)&&S4(e)==E4}var A4=O4,T4=A4,P4=gi,Wv=If,qv=Wv&&Wv.isSet,I4=qv?P4(qv):T4,x4=I4,D4=Hs,F4=lv,N4=fv,M4=YF,k4=dN,L4=vv,j4=Ff,B4=EN,U4=jN,W4=Sv,q4=JN,V4=Zs,R4=$M,z4=o4,H4=jv,K4=or,G4=Ys,Y4=w4,J4=Gr,X4=x4,Z4=uo,Q4=ra,e3=1,t3=2,r3=4,Vv="[object Arguments]",n3="[object Array]",i3="[object Boolean]",a3="[object Date]",o3="[object Error]",Rv="[object Function]",s3="[object GeneratorFunction]",l3="[object Map]",c3="[object Number]",zv="[object Object]",u3="[object RegExp]",f3="[object Set]",d3="[object String]",h3="[object Symbol]",p3="[object WeakMap]",m3="[object ArrayBuffer]",g3="[object DataView]",y3="[object Float32Array]",v3="[object Float64Array]",b3="[object Int8Array]",_3="[object Int16Array]",$3="[object Int32Array]",w3="[object Uint8Array]",S3="[object Uint8ClampedArray]",C3="[object Uint16Array]",E3="[object Uint32Array]",rt={};rt[Vv]=rt[n3]=rt[m3]=rt[g3]=rt[i3]=rt[a3]=rt[y3]=rt[v3]=rt[b3]=rt[_3]=rt[$3]=rt[l3]=rt[c3]=rt[zv]=rt[u3]=rt[f3]=rt[d3]=rt[h3]=rt[w3]=rt[S3]=rt[C3]=rt[E3]=!0,rt[o3]=rt[Rv]=rt[p3]=!1;function Qs(e,t,r,n,i,a){var s,l=t&e3,u=t&t3,f=t&r3;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!J4(e))return e;var d=K4(e);if(d){if(s=R4(e),!l)return j4(e,s)}else{var p=V4(e),m=p==Rv||p==s3;if(G4(e))return L4(e,l);if(p==zv||p==Vv||m&&!i){if(s=u||m?{}:H4(e),!l)return u?U4(e,k4(s,e)):B4(e,M4(s,e))}else{if(!rt[p])return i?e:{};s=z4(e,p,l)}}a||(a=new D4);var y=a.get(e);if(y)return y;a.set(e,s),X4(e)?e.forEach(function(v){s.add(Qs(v,t,r,v,e,a))}):Y4(e)&&e.forEach(function(v,g){s.set(g,Qs(v,t,r,g,e,a))});var _=f?u?q4:W4:u?Q4:Z4,w=d?void 0:_(e);return F4(w||e,function(v,g){w&&(g=v,v=e[g]),N4(s,g,Qs(v,t,r,g,e,a))}),s}var O3=Qs,A3=O3,T3=1,P3=4;function I3(e){return A3(e,T3|P3)}var x3=I3,D3="__lodash_hash_undefined__";function F3(e){return this.__data__.set(e,D3),this}var N3=F3;function M3(e){return this.__data__.has(e)}var k3=M3,L3=Of,j3=N3,B3=k3;function el(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new L3;++t<r;)this.add(e[t])}el.prototype.add=el.prototype.push=j3,el.prototype.has=B3;var tl=el;function U3(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var W3=U3;function q3(e,t){return e.has(t)}var rl=q3,V3=tl,R3=W3,z3=rl,H3=1,K3=2;function G3(e,t,r,n,i,a){var s=r&H3,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,y=r&K3?new V3:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var _=e[p],w=t[p];if(n)var v=s?n(w,_,p,t,e,a):n(_,w,p,e,t,a);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!R3(t,function(g,C){if(!z3(y,C)&&(_===g||i(_,g,r,n,a)))return y.push(C)})){m=!1;break}}else if(!(_===w||i(_,w,r,n,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var Hv=G3;function Y3(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var J3=Y3;function X3(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Vf=X3,Kv=Xi,Gv=xv,Z3=Yi,Q3=Hv,ek=J3,tk=Vf,rk=1,nk=2,ik="[object Boolean]",ak="[object Date]",ok="[object Error]",sk="[object Map]",lk="[object Number]",ck="[object RegExp]",uk="[object Set]",fk="[object String]",dk="[object Symbol]",hk="[object ArrayBuffer]",pk="[object DataView]",Yv=Kv?Kv.prototype:void 0,Rf=Yv?Yv.valueOf:void 0;function mk(e,t,r,n,i,a,s){switch(r){case pk:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hk:return!(e.byteLength!=t.byteLength||!a(new Gv(e),new Gv(t)));case ik:case ak:case lk:return Z3(+e,+t);case ok:return e.name==t.name&&e.message==t.message;case ck:case fk:return e==t+"";case sk:var l=ek;case uk:var u=n&rk;if(l||(l=tk),e.size!=t.size&&!u)return!1;var f=s.get(e);if(f)return f==t;n|=nk,s.set(e,t);var d=Q3(l(e),l(t),n,i,a,s);return s.delete(e),d;case dk:if(Rf)return Rf.call(e)==Rf.call(t)}return!1}var gk=mk,Jv=Sv,yk=1,vk=Object.prototype,bk=vk.hasOwnProperty;function _k(e,t,r,n,i,a){var s=r&yk,l=Jv(e),u=l.length,f=Jv(t),d=f.length;if(u!=d&&!s)return!1;for(var p=u;p--;){var m=l[p];if(!(s?m in t:bk.call(t,m)))return!1}var y=a.get(e),_=a.get(t);if(y&&_)return y==t&&_==e;var w=!0;a.set(e,t),a.set(t,e);for(var v=s;++p<u;){m=l[p];var g=e[m],C=t[m];if(n)var S=s?n(C,g,m,t,e,a):n(g,C,m,e,t,a);if(!(S===void 0?g===C||i(g,C,r,n,a):S)){w=!1;break}v||(v=m=="constructor")}if(w&&!v){var E=e.constructor,A=t.constructor;E!=A&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof A=="function"&&A instanceof A)&&(w=!1)}return a.delete(e),a.delete(t),w}var $k=_k,zf=Hs,wk=Hv,Sk=gk,Ck=$k,Xv=Zs,Zv=or,Qv=Ys,Ek=xf,Ok=1,eb="[object Arguments]",tb="[object Array]",nl="[object Object]",Ak=Object.prototype,rb=Ak.hasOwnProperty;function Tk(e,t,r,n,i,a){var s=Zv(e),l=Zv(t),u=s?tb:Xv(e),f=l?tb:Xv(t);u=u==eb?nl:u,f=f==eb?nl:f;var d=u==nl,p=f==nl,m=u==f;if(m&&Qv(e)){if(!Qv(t))return!1;s=!0,d=!1}if(m&&!d)return a||(a=new zf),s||Ek(e)?wk(e,t,r,n,i,a):Sk(e,t,u,r,n,i,a);if(!(r&Ok)){var y=d&&rb.call(e,"__wrapped__"),_=p&&rb.call(t,"__wrapped__");if(y||_){var w=y?e.value():e,v=_?t.value():t;return a||(a=new zf),i(w,v,r,n,a)}}return m?(a||(a=new zf),Ck(e,t,r,n,i,a)):!1}var Pk=Tk,Ik=Pk,nb=Yr;function ib(e,t,r,n,i){return e===t?!0:e==null||t==null||!nb(e)&&!nb(t)?e!==e&&t!==t:Ik(e,t,r,n,ib,i)}var Hf=ib,xk=Hf;function Dk(e,t){return xk(e,t)}var ab=Dk,ob=Xi,Fk=Ks,Nk=or,sb=ob?ob.isConcatSpreadable:void 0;function Mk(e){return Nk(e)||Fk(e)||!!(sb&&e&&e[sb])}var kk=Mk,Lk=Mf,jk=kk;function lb(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=jk),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?lb(l,t-1,r,n,i):Lk(i,l):n||(i[i.length]=l)}return i}var Kf=lb;function Bk(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var vi=Bk,Uk=pi,Wk=Yr,qk="[object Symbol]";function Vk(e){return typeof e=="symbol"||Wk(e)&&Uk(e)==qk}var il=Vk,Rk=or,zk=il,Hk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kk=/^\w*$/;function Gk(e,t){if(Rk(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||zk(e)?!0:Kk.test(e)||!Hk.test(e)||t!=null&&e in Object(t)}var Gf=Gk,cb=Of,Yk="Expected a function";function Yf(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Yk);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Yf.Cache||cb),r}Yf.Cache=cb;var Jk=Yf,Xk=Jk,Zk=500;function Qk(e){var t=Xk(e,function(n){return r.size===Zk&&r.clear(),n}),r=t.cache;return t}var e6=Qk,t6=e6,r6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n6=/\\(\\)?/g,i6=t6(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(r6,function(r,n,i,a){t.push(i?a.replace(n6,"$1"):n||r)}),t}),a6=i6,ub=Xi,o6=vi,s6=or,l6=il,fb=ub?ub.prototype:void 0,db=fb?fb.toString:void 0;function hb(e){if(typeof e=="string")return e;if(s6(e))return o6(e,hb)+"";if(l6(e))return db?db.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var c6=hb,u6=c6;function f6(e){return e==null?"":u6(e)}var d6=f6,h6=or,p6=Gf,m6=a6,g6=d6;function y6(e,t){return h6(e)?e:p6(e,t)?[e]:m6(g6(e))}var pb=y6,v6=il;function b6(e){if(typeof e=="string"||v6(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var al=b6,_6=pb,$6=al;function w6(e,t){t=_6(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[$6(t[r++])];return r&&r==n?e:void 0}var Jf=w6,S6=Hs,C6=Hf,E6=1,O6=2;function A6(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var u=l[0],f=e[u],d=l[1];if(s&&l[2]){if(f===void 0&&!(u in e))return!1}else{var p=new S6;if(n)var m=n(f,d,u,e,t,p);if(!(m===void 0?C6(d,f,E6|O6,n,p):m))return!1}}return!0}var T6=A6,P6=Gr;function I6(e){return e===e&&!P6(e)}var mb=I6,x6=mb,D6=uo;function F6(e){for(var t=D6(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,x6(i)]}return t}var N6=F6;function M6(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var gb=M6,k6=T6,L6=N6,j6=gb;function B6(e){var t=L6(e);return t.length==1&&t[0][2]?j6(t[0][0],t[0][1]):function(r){return r===e||k6(r,e,t)}}var U6=B6,W6=Jf;function q6(e,t,r){var n=e==null?void 0:W6(e,t);return n===void 0?r:n}var V6=q6;function R6(e,t){return e!=null&&t in Object(e)}var z6=R6,H6=pb,K6=Ks,G6=or,Y6=Tf,J6=Pf,X6=al;function Z6(e,t,r){t=H6(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=X6(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&J6(i)&&Y6(s,i)&&(G6(e)||K6(e)))}var Q6=Z6,eL=z6,tL=Q6;function rL(e,t){return e!=null&&tL(e,t,eL)}var nL=rL,iL=Hf,aL=V6,oL=nL,sL=Gf,lL=mb,cL=gb,uL=al,fL=1,dL=2;function hL(e,t){return sL(e)&&lL(t)?cL(uL(e),t):function(r){var n=aL(r,e);return n===void 0&&n===t?oL(r,e):iL(t,n,fL|dL)}}var pL=hL;function mL(e){return e}var fo=mL;function gL(e){return function(t){return t==null?void 0:t[e]}}var yL=gL,vL=Jf;function bL(e){return function(t){return vL(t,e)}}var _L=bL,$L=yL,wL=_L,SL=Gf,CL=al;function EL(e){return SL(e)?$L(CL(e)):wL(e)}var OL=EL,AL=U6,TL=pL,PL=fo,IL=or,xL=OL;function DL(e){return typeof e=="function"?e:e==null?PL:typeof e=="object"?IL(e)?TL(e[0],e[1]):AL(e):xL(e)}var FL=DL;function NL(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),l=s.length;l--;){var u=s[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var ML=NL,kL=ML,LL=kL(),yb=LL,jL=yb,BL=uo;function UL(e,t){return e&&jL(e,t,BL)}var WL=UL,qL=ta;function VL(e,t){return function(r,n){if(r==null)return r;if(!qL(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var RL=VL,zL=WL,HL=RL,KL=HL(zL),vb=KL,GL=vb,YL=ta;function JL(e,t){var r=-1,n=YL(e)?Array(e.length):[];return GL(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var XL=JL;function ZL(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var QL=ZL,bb=il;function ej(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=bb(e),s=t!==void 0,l=t===null,u=t===t,f=bb(t);if(!l&&!f&&!a&&e>t||a&&s&&u&&!l&&!f||n&&s&&u||!r&&u||!i)return 1;if(!n&&!a&&!f&&e<t||f&&r&&i&&!n&&!a||l&&r&&i||!s&&i||!u)return-1}return 0}var tj=ej,rj=tj;function nj(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,l=r.length;++n<s;){var u=rj(i[n],a[n]);if(u){if(n>=l)return u;var f=r[n];return u*(f=="desc"?-1:1)}}return e.index-t.index}var ij=nj,Xf=vi,aj=Jf,oj=FL,sj=XL,lj=QL,cj=gi,uj=ij,fj=fo,dj=or;function hj(e,t,r){t.length?t=Xf(t,function(a){return dj(a)?function(s){return aj(s,a.length===1?a[0]:a)}:a}):t=[fj];var n=-1;t=Xf(t,cj(oj));var i=sj(e,function(a,s,l){var u=Xf(t,function(f){return f(a)});return{criteria:u,index:++n,value:a}});return lj(i,function(a,s){return uj(a,s,r)})}var pj=hj;function mj(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var _b=mj,gj=_b,$b=Math.max;function yj(e,t,r){return t=$b(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=$b(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),gj(e,this,l)}}var vj=yj;function bj(e){return function(){return e}}var _j=bj,$j=_j,wb=cv,wj=fo,Sj=wb?function(e,t){return wb(e,"toString",{configurable:!0,enumerable:!1,value:$j(t),writable:!0})}:wj,Cj=Sj,Ej=800,Oj=16,Aj=Date.now;function Tj(e){var t=0,r=0;return function(){var n=Aj(),i=Oj-(n-r);if(r=n,i>0){if(++t>=Ej)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Pj=Tj,Ij=Cj,xj=Pj,Dj=xj(Ij),Fj=Dj,Nj=fo,Mj=vj,kj=Fj;function Lj(e,t){return kj(Mj(e,t,Nj),e+"")}var bi=Lj,jj=Yi,Bj=ta,Uj=Tf,Wj=Gr;function qj(e,t,r){if(!Wj(r))return!1;var n=typeof t;return(n=="number"?Bj(r)&&Uj(t,r.length):n=="string"&&t in r)?jj(r[t],e):!1}var Zf=qj,Vj=Kf,Rj=pj,zj=bi,Sb=Zf,Hj=zj(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Sb(e,t[0],t[1])?t=[]:r>2&&Sb(t[0],t[1],t[2])&&(t=[t[0]]),Rj(e,Vj(t,1),[])}),Cb=Hj;function Kj(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Gj=Kj;function Yj(e){return e!==e}var Jj=Yj;function Xj(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Zj=Xj,Qj=Gj,e5=Jj,t5=Zj;function r5(e,t,r){return t===t?t5(e,t,r):Qj(e,e5,r)}var Eb=r5,n5=Eb;function i5(e,t){var r=e==null?0:e.length;return!!r&&n5(e,t,0)>-1}var Qf=i5;function a5(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var ed=a5;function o5(){}var s5=o5,td=Cv,l5=s5,c5=Vf,u5=1/0,f5=td&&1/c5(new td([,-0]))[1]==u5?function(e){return new td(e)}:l5,d5=f5,h5=tl,p5=Qf,m5=ed,g5=rl,y5=d5,v5=Vf,b5=200;function _5(e,t,r){var n=-1,i=p5,a=e.length,s=!0,l=[],u=l;if(r)s=!1,i=m5;else if(a>=b5){var f=t?null:y5(e);if(f)return v5(f);s=!1,i=g5,u=new h5}else u=t?[]:l;e:for(;++n<a;){var d=e[n],p=t?t(d):d;if(d=r||d!==0?d:0,s&&p===p){for(var m=u.length;m--;)if(u[m]===p)continue e;t&&u.push(p),l.push(d)}else i(u,p,r)||(u!==l&&u.push(p),l.push(d))}return l}var Ob=_5,$5=Ob;function w5(e){return e&&e.length?$5(e):[]}var rd=w5,S5=Ob;function C5(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?S5(e,void 0,t):[]}var nd=C5,E5=bi,O5=Yi,A5=Zf,T5=ra,Ab=Object.prototype,P5=Ab.hasOwnProperty,I5=E5(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&A5(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],s=T5(a),l=-1,u=s.length;++l<u;){var f=s[l],d=e[f];(d===void 0||O5(d,Ab[f])&&!P5.call(e,f))&&(e[f]=a[f])}return e}),x5=I5,D5=tl,F5=Qf,N5=ed,M5=vi,k5=gi,Tb=rl,L5=Math.min;function j5(e,t,r){for(var n=r?N5:F5,i=e[0].length,a=e.length,s=a,l=Array(a),u=1/0,f=[];s--;){var d=e[s];s&&t&&(d=M5(d,k5(t))),u=L5(d.length,u),l[s]=!r&&(t||i>=120&&d.length>=120)?new D5(s&&d):void 0}d=e[0];var p=-1,m=l[0];e:for(;++p<i&&f.length<u;){var y=d[p],_=t?t(y):y;if(y=r||y!==0?y:0,!(m?Tb(m,_):n(f,_,r))){for(s=a;--s;){var w=l[s];if(!(w?Tb(w,_):n(e[s],_,r)))continue e}m&&m.push(_),f.push(y)}}return f}var Pb=j5,B5=ta,U5=Yr;function W5(e){return U5(e)&&B5(e)}var id=W5,q5=id;function V5(e){return q5(e)?e:[]}var Ib=V5;function R5(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var z5=R5,H5=vi,K5=Pb,G5=bi,Y5=Ib,J5=z5,X5=G5(function(e){var t=J5(e),r=H5(e,Y5);return t=typeof t=="function"?t:void 0,t&&r.pop(),r.length&&r[0]===e[0]?K5(r,void 0,t):[]}),xb=X5,Z5=pi,Q5=kf,eB=Yr,tB="[object Object]",rB=Function.prototype,nB=Object.prototype,Db=rB.toString,iB=nB.hasOwnProperty,aB=Db.call(Object);function oB(e){if(!eB(e)||Z5(e)!=tB)return!1;var t=Q5(e);if(t===null)return!0;var r=iB.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Db.call(r)==aB}var ol=oB,sB=pi,lB=Yr,cB="[object Boolean]";function uB(e){return e===!0||e===!1||lB(e)&&sB(e)==cB}var fB=uB,Mr=ab,dB=Cb,ad=rd,Fb=nd,hB=x5,pB=xb,sl=ol,od=fB,Nb=e=>Array.isArray(e)?e:[e],vr=e=>e===void 0,ll=e=>sl(e)||Array.isArray(e)?Object.keys(e):[],ia=(e,t)=>e.hasOwnProperty(t),aa=e=>dB(ad(e)),Mb=e=>vr(e)||Array.isArray(e)&&e.length===0,mB=(e,t,r,n)=>t&&ia(t,r)&&e&&ia(e,r)&&n(e[r],t[r]),sd=(e,t)=>vr(e)&&t===0||vr(t)&&e===0||Mr(e,t),gB=(e,t)=>vr(e)&&t===!1||vr(t)&&e===!1||Mr(e,t),kb=e=>vr(e)||Mr(e,{})||e===!0,cl=e=>vr(e)||Mr(e,{}),Lb=e=>vr(e)||sl(e)||e===!0||e===!1;function jb(e,t){return Mb(e)&&Mb(t)?!0:Mr(aa(e),aa(t))}function yB(e,t){return e=Nb(e),t=Nb(t),Mr(aa(e),aa(t))}function ul(e,t,r,n){var i=ad(ll(e).concat(ll(t)));return cl(e)&&cl(t)?!0:cl(e)&&ll(t).length||cl(t)&&ll(e).length?!1:i.every(function(a){var s=e[a],l=t[a];return Array.isArray(s)&&Array.isArray(l)?Mr(aa(e),aa(t)):Array.isArray(s)&&!Array.isArray(l)||Array.isArray(l)&&!Array.isArray(s)?!1:mB(e,t,a,n)})}function vB(e,t,r,n){return sl(e)&&sl(t)?n(e,t):Array.isArray(e)&&Array.isArray(t)?ul(e,t,r,n):Mr(e,t)}function ld(e,t,r,n){var i=Fb(e,n),a=Fb(t,n),s=pB(i,a,n);return s.length===Math.max(i.length,a.length)}var bB={title:Mr,uniqueItems:gB,minLength:sd,minItems:sd,minProperties:sd,required:jb,enum:jb,type:yB,items:vB,anyOf:ld,allOf:ld,oneOf:ld,properties:ul,patternProperties:ul,dependencies:ul},_B=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],$B=["additionalProperties","additionalItems","contains","propertyNames","not"];function cd(e,t,r){if(r=hB(r,{ignore:[]}),kb(e)&&kb(t))return!0;if(!Lb(e)||!Lb(t))throw new Error("Either of the values are not a JSON schema.");if(e===t)return!0;if(od(e)&&od(t))return e===t;if(e===void 0&&t===!1||t===void 0&&e===!1||vr(e)&&!vr(t)||!vr(e)&&vr(t))return!1;var n=ad(Object.keys(e).concat(Object.keys(t)));if(r.ignore.length&&(n=n.filter(a=>r.ignore.indexOf(a)===-1)),!n.length)return!0;function i(a,s){return cd(a,s,r)}return n.every(function(a){var s=e[a],l=t[a];if($B.indexOf(a)!==-1)return cd(s,l,r);var u=bB[a];if(u||(u=Mr),Mr(s,l))return!0;if(_B.indexOf(a)===-1&&(!ia(e,a)&&ia(t,a)||ia(e,a)&&!ia(t,a)))return s===l;var f=u(s,l,a,i);if(!od(f))throw new Error("Comparer must return true or false");return f})}var ud=cd;function wB(e){return Object.prototype.toString.call(e)==="[object Array]"}var fd=Array.isArray||wB;function SB(e){return(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")&&e.valueOf()===e.valueOf()}var CB=SB,EB=CB;function OB(e){return EB(e)&&e%1===0}var AB=OB,TB=fd,PB=AB;function IB(e){var t;if(!TB(e)||(t=e.length,!t))return!1;for(var r=0;r<t;r++)if(!PB(e[r]))return!1;return!0}var Bb=IB;function xB(e){return typeof e=="function"}var Ub=xB,DB=fd,Wb=Bb,FB=Ub,fl=Math.pow(2,31)-1;function qb(e,t){var r=1,n;if(e===0)return t;if(t===0)return e;for(;e%2===0&&t%2===0;)e=e/2,t=t/2,r=r*2;for(;e%2===0;)e=e/2;for(;t;){for(;t%2===0;)t=t/2;e>t&&(n=t,t=e,e=n),t=t-e}return r*e}function Vb(e,t){var r=0,n;if(e===0)return t;if(t===0)return e;for(;!(e&1)&&!(t&1);)e>>>=1,t>>>=1,r++;for(;!(e&1);)e>>>=1;for(;t;){for(;!(t&1);)t>>>=1;e>t&&(n=t,t=e,e=n),t=t-e}return e<<r}function NB(){var e=arguments.length,t,r,n,i,a,s,l;for(t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];if(Wb(t)){if(e===2)return a=t[0],s=t[1],a<0&&(a=-a),s<0&&(s=-s),a<=fl&&s<=fl?Vb(a,s):qb(a,s);n=t}else if(DB(t[0]))if(e>1){if(n=t[0],r=t[1],!FB(r))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+r+"`.")}else n=t[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=n.length,i<2)return null;if(r){for(a=new Array(i),l=0;l<i;l++)a[l]=r(n[l],l);n=a}if(e<3&&!Wb(n))throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `"+n+"`.");for(l=0;l<i;l++)a=n[l],a<0&&(n[l]=-a);for(a=n[0],l=1;l<i;l++)s=n[l],s<=fl&&a<=fl?a=Vb(a,s):a=qb(a,s);return a}var MB=NB,Rb=MB,kB=fd,zb=Bb,LB=Ub;function jB(){var e=arguments.length,t,r,n,i,a,s,l;for(t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];if(zb(t)){if(e===2)return a=t[0],s=t[1],a<0&&(a=-a),s<0&&(s=-s),a===0||s===0?0:a/Rb(a,s)*s;n=t}else if(kB(t[0]))if(e>1){if(n=t[0],r=t[1],!LB(r))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+r+"`.")}else n=t[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=n.length,i<2)return null;if(r){for(a=new Array(i),l=0;l<i;l++)a[l]=r(n[l],l);n=a}if(e<3&&!zb(n))throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `"+n+"`.");for(l=0;l<i;l++)a=n[l],a<0&&(n[l]=-a);for(a=n[0],l=1;l<i;l++){if(s=n[l],a===0||s===0)return 0;a=a/Rb(a,s)*s}return a}var BB=jB,UB=Af,WB=Yi;function qB(e,t,r){(r!==void 0&&!WB(e[t],r)||r===void 0&&!(t in e))&&UB(e,t,r)}var Hb=qB;function VB(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Kb=VB,RB=co,zB=ra;function HB(e){return RB(e,zB(e))}var KB=HB,Gb=Hb,GB=vv,YB=kv,JB=Ff,XB=jv,Yb=Ks,Jb=or,ZB=id,QB=Ys,eU=Sf,tU=Gr,rU=ol,nU=xf,Xb=Kb,iU=KB;function aU(e,t,r,n,i,a,s){var l=Xb(e,r),u=Xb(t,r),f=s.get(u);if(f){Gb(e,r,f);return}var d=a?a(l,u,r+"",e,t,s):void 0,p=d===void 0;if(p){var m=Jb(u),y=!m&&QB(u),_=!m&&!y&&nU(u);d=u,m||y||_?Jb(l)?d=l:ZB(l)?d=JB(l):y?(p=!1,d=GB(u,!0)):_?(p=!1,d=YB(u,!0)):d=[]:rU(u)||Yb(u)?(d=l,Yb(l)?d=iU(l):(!tU(l)||eU(l))&&(d=XB(u))):p=!1}p&&(s.set(u,d),i(d,u,n,a,s),s.delete(u)),Gb(e,r,d)}var oU=aU,sU=Hs,lU=Hb,cU=yb,uU=oU,fU=Gr,dU=ra,hU=Kb;function Zb(e,t,r,n,i){e!==t&&cU(t,function(a,s){if(i||(i=new sU),fU(a))uU(e,t,s,r,Zb,n,i);else{var l=n?n(hU(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),lU(e,s,l)}},dU)}var Qb=Zb,pU=Qb,e0=Gr;function t0(e,t,r,n,i,a){return e0(e)&&e0(t)&&(a.set(t,e),pU(e,t,void 0,t0,a),a.delete(t)),e}var mU=t0,gU=bi,yU=Zf;function vU(e){return gU(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&yU(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,a)}return t})}var bU=vU,_U=Qb,$U=bU,wU=$U(function(e,t,r,n){_U(e,t,r,n)}),SU=wU,CU=_b,EU=bi,OU=mU,AU=SU,TU=EU(function(e){return e.push(void 0,OU),CU(AU,void 0,e)}),PU=TU,IU=Kf;function xU(e){var t=e==null?0:e.length;return t?IU(e,1):[]}var r0=xU,DU=Kf,FU=1/0;function NU(e){var t=e==null?0:e.length;return t?DU(e,FU):[]}var n0=NU,MU=vi,kU=Pb,LU=bi,jU=Ib,BU=LU(function(e){var t=MU(e,jU);return t.length&&t[0]===e[0]?kU(t):[]}),UU=BU;function WU(e,t,r,n){for(var i=r-1,a=e.length;++i<a;)if(n(e[i],t))return i;return-1}var qU=WU,VU=vi,RU=Eb,zU=qU,HU=gi,KU=Ff,GU=Array.prototype,i0=GU.splice;function YU(e,t,r,n){var i=n?zU:RU,a=-1,s=t.length,l=e;for(e===t&&(t=KU(t)),r&&(l=VU(e,HU(r)));++a<s;)for(var u=0,f=t[a],d=r?r(f):f;(u=i(l,d,u,n))>-1;)l!==e&&i0.call(l,u,1),i0.call(e,u,1);return e}var JU=YU,XU=JU;function ZU(e,t){return e&&e.length&&t&&t.length?XU(e,t):e}var QU=ZU,e9=fo;function t9(e){return typeof e=="function"?e:e9}var r9=t9,n9=lv,i9=vb,a9=r9,o9=or;function s9(e,t){var r=o9(e)?n9:i9;return r(e,a9(t))}var a0=s9,l9=tl,c9=Qf,u9=ed,f9=vi,d9=gi,h9=rl,p9=200;function m9(e,t,r,n){var i=-1,a=c9,s=!0,l=e.length,u=[],f=t.length;if(!l)return u;r&&(t=f9(t,d9(r))),n?(a=u9,s=!1):t.length>=p9&&(a=h9,s=!1,t=new l9(t));e:for(;++i<l;){var d=e[i],p=r==null?d:r(d);if(d=n||d!==0?d:0,s&&p===p){for(var m=f;m--;)if(t[m]===p)continue e;u.push(d)}else a(t,p,n)||u.push(d)}return u}var g9=m9,y9=g9,v9=bi,b9=id,_9=v9(function(e,t){return b9(e)?y9(e,t):[]}),$9=_9;const w9=r0,S9=n0,o0=ol,C9=rd,E9=nd,O9=$9;function A9(e){for(const t in e)s0(e,t)&&D9(e[t])&&delete e[t];return e}const T9=e=>C9(S9(e.map(dd))),P9=(e,t)=>e.map(r=>r&&r[t]),s0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),dd=e=>o0(e)||Array.isArray(e)?Object.keys(e):[],I9=e=>e!==void 0,x9=e=>o0(e)||e===!0||e===!1,D9=e=>!dd(e).length&&e!==!1&&e!==!0;var l0={allUniqueKeys:T9,deleteUndefinedProps:A9,getValues:P9,has:s0,isSchema:x9,keys:dd,notUndefined:I9,uniqWith:E9,withoutArr:(e,...t)=>O9.apply(null,[e].concat(w9(t)))};const F9=ud,N9=a0,{allUniqueKeys:M9,deleteUndefinedProps:k9,getValues:L9,keys:ho,notUndefined:j9,uniqWith:B9,withoutArr:c0}=l0;function U9(e){N9(e,function(t,r){t===!1&&delete e[r]})}function u0(e,t){return M9(e).reduce(function(n,i){const a=L9(e,i),s=B9(a.filter(j9),F9);return n[i]=t(s,i),n},{})}var W9={keywords:["properties","patternProperties","additionalProperties"],resolver(e,t,r,n){n.ignoreAdditionalProperties||(e.forEach(function(a){const s=e.filter(d=>d!==a),l=ho(a.properties),f=ho(a.patternProperties).map(d=>new RegExp(d));s.forEach(function(d){const p=ho(d.properties),m=p.filter(_=>f.some(w=>w.test(_)));c0(p,l,m).forEach(function(_){d.properties[_]=r.properties([d.properties[_],a.additionalProperties],_)})})}),e.forEach(function(a){const s=e.filter(u=>u!==a),l=ho(a.patternProperties);a.additionalProperties===!1&&s.forEach(function(u){const f=ho(u.patternProperties);c0(f,l).forEach(p=>delete u.patternProperties[p])})}));const i={additionalProperties:r.additionalProperties(e.map(a=>a.additionalProperties)),patternProperties:u0(e.map(a=>a.patternProperties),r.patternProperties),properties:u0(e.map(a=>a.properties),r.properties)};return i.additionalProperties===!1&&U9(i.properties),k9(i)}};const q9=ud,V9=a0,{allUniqueKeys:R9,deleteUndefinedProps:z9,has:H9,isSchema:f0,notUndefined:d0,uniqWith:K9}=l0;function G9(e){V9(e,function(t,r){t===!1&&e.splice(r,1)})}function Y9(e,t){return e.map(function(r){if(r)if(Array.isArray(r.items)){const n=r.items[t];if(f0(n))return n;if(H9(r,"additionalItems"))return r.additionalItems}else return r.items})}function J9(e){return e.map(function(t){if(t)return Array.isArray(t.items)?t.additionalItems:t.items})}function X9(e,t,r){return R9(r).reduce(function(i,a){const s=Y9(e,a),l=K9(s.filter(d0),q9);return i[a]=t(l,a),i},[])}var Z9={keywords:["items","additionalItems"],resolver(e,t,r){const n=e.map(l=>l.items),i=n.filter(d0),a={};i.every(f0)?a.items=r.items(n):a.items=X9(e,r.items,n);let s;return i.every(Array.isArray)?s=e.map(l=>l.additionalItems):i.some(Array.isArray)&&(s=J9(e)),s&&(a.additionalItems=r.additionalItems(s)),a.additionalItems===!1&&Array.isArray(a.items)&&G9(a.items),z9(a)}};const h0=x3,dl=ud,Q9=BB,eW=PU,p0=r0,hd=n0,tW=UU,rW=xb,pd=ab,oa=ol,nW=QU,m0=Cb,md=rd,sa=nd,g0=W9,y0=Z9,hl=(e,t)=>e.indexOf(t)!==-1,iW=e=>oa(e)||e===!0||e===!1,aW=e=>e===!1,v0=e=>e===!0,pl=(e,t,r)=>r(e),b0=e=>m0(md(hd(e))),ml=e=>e!==void 0,_0=e=>md(hd(e.map(fW))),la=e=>e[0],oW=e=>b0(e),po=e=>Math.max.apply(Math,e),mo=e=>Math.min.apply(Math,e),sW=e=>e.some(v0),lW=e=>sa(p0(e),pd);function cW(e){return function(t,r){return dl({[e]:t},{[e]:r})}}function $0(e){let{allOf:t=[],...r}=e;return r=oa(e)?r:e,[r,...t.map($0)]}function w0(e,t){return e.map(r=>r&&r[t])}function uW(e,t){return e.map(function(r,n){try{return t(r,n)}catch{return}}).filter(ml)}function fW(e){return oa(e)||Array.isArray(e)?Object.keys(e):[]}function gd(e,t){if(t=t||[],!e.length)return t;const r=e.slice(0).shift(),n=e.slice(1);return t.length?gd(n,p0(t.map(i=>r.map(a=>[a].concat(i))))):gd(n,r.map(i=>i))}function S0(e,t){let r;try{r=e.map(function(n){return JSON.stringify(n,null,2)}).join(`
1
+ (function(ie,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("antd"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","antd","react"],$):(ie=typeof globalThis<"u"?globalThis:ie||self,$(ie.ExtendedDynamicForms={},ie.React.jsxRuntime,ie.antd,ie.React))})(this,function(ie,$,re,B){"use strict";var Lse=Object.defineProperty;var jse=(ie,$,re)=>$ in ie?Lse(ie,$,{enumerable:!0,configurable:!0,writable:!0,value:re}):ie[$]=re;var pe=(ie,$,re)=>jse(ie,typeof $!="symbol"?$+"":$,re);function pO(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const at=pO(B);class mO{constructor(t){pe(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.handlers.afterValidation&&await this.handlers.afterValidation(t,r)}}const Mg=B.createContext(null),kg=({eventHub:e,formData:t,children:r})=>$.jsx(Mg.Provider,{value:{eventHub:e,formData:t},children:r}),Lg=()=>{const e=B.useContext(Mg);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},ht=(e,t,r)=>{const{eventHub:n,formData:i}=Lg(),a=B.useRef(i);return B.useEffect(()=>{a.current=i},[i]),B.useMemo(()=>({onFocus:s=>n.handleFieldEvent("focus",e,s,t,a.current,r),onBlur:s=>n.handleFieldEvent("blur",e,s,t,a.current,r),onChange:s=>n.handleFieldEvent("change",e,s,t,a.current,r)}),[n,e,r])},zu=e=>typeof e=="object"&&e!==null,jg=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,idSchema:s,rawErrors:l=[]})=>{const u=ht(s.$id,a),f=S=>async E=>{const A=typeof E=="string"?E:E.target.value,x={...e,[S]:A};t(x),await u.onChange(x)},d=async()=>{await u.onFocus(e)},p=async()=>{await u.onBlur(e)},m=(S,E)=>{var x;const A=(x=a.properties)==null?void 0:x[S];return A&&zu(A)&&A.title||E},y=S=>{var A;const E=(A=a.properties)==null?void 0:A[S];return E&&zu(E)&&E.enum?E.enum.map(x=>({value:String(x),label:String(x)})):[]},_=S=>{var E;return((E=a.required)==null?void 0:E.includes(S))||!1},w=S=>{const E=l==null?void 0:l.find(A=>{var x,N;return A.property===`.${S}`||((x=A.message)==null?void 0:x.includes(S))||((N=A.schemaPath)==null?void 0:N.includes(S))});return E==null?void 0:E.message},v=(S,E)=>{var x,N;const A=(x=a.properties)==null?void 0:x[S];return!A||!zu(A)?null:(N=a.required)!=null&&N.includes(S)&&(!E||E.trim()==="")?`${m(S,S)} is required`:A.minLength&&E&&E.length<A.minLength?`${m(S,S)} must be at least ${A.minLength} characters`:A.pattern&&E&&!new RegExp(A.pattern).test(E)?S==="postcode"?"Postcode must be 4 digits":`${m(S,S)} format is invalid`:A.enum&&E&&!A.enum.includes(E)?`${m(S,S)} must be one of: ${A.enum.join(", ")}`:null},g=S=>{const E=(e==null?void 0:e[S])||"",A=w(S),x=v(S,E);return A||x?"error":""},C=S=>{const E=(e==null?void 0:e[S])||"",A=w(S),x=v(S,E);return A||x};return $.jsxs("div",{children:[a.title&&$.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{style:{display:"block",fontSize:"16px",fontWeight:600,color:"#262626",marginBottom:"4px"},children:[a.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),a.description&&$.jsx("div",{style:{fontSize:"14px",color:"#8c8c8c",marginBottom:"8px"},children:a.description})]}),$.jsx(re.Form.Item,{label:m("streetAddress","Street Address"),required:_("streetAddress"),validateStatus:g("streetAddress"),help:C("streetAddress"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_streetAddress`,value:(e==null?void 0:e.streetAddress)||"",onChange:f("streetAddress"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"123 Main St",status:g("streetAddress")})}),$.jsx(re.Form.Item,{label:m("suburb","Suburb/City"),required:_("suburb"),validateStatus:g("suburb"),help:C("suburb"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_suburb`,value:(e==null?void 0:e.suburb)||"",onChange:f("suburb"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Sydney",status:g("suburb")})}),$.jsxs(re.Row,{gutter:16,children:[$.jsx(re.Col,{span:12,children:$.jsx(re.Form.Item,{label:m("state","State/Territory"),required:_("state"),validateStatus:g("state"),help:C("state"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Select,{id:`${s.$id}_state`,value:(e==null?void 0:e.state)||void 0,onChange:f("state"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Select state",status:g("state"),style:{width:"100%"},options:y("state")})})}),$.jsx(re.Col,{span:12,children:$.jsx(re.Form.Item,{label:m("postcode","Postcode"),required:_("postcode"),validateStatus:g("postcode"),help:C("postcode"),style:{marginBottom:"16px"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_postcode`,value:(e==null?void 0:e.postcode)||"",onChange:f("postcode"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"2000",status:g("postcode")})})})]}),$.jsx(re.Form.Item,{label:m("country","Country"),required:_("country"),validateStatus:g("country"),help:C("country"),style:{marginBottom:"0"},labelCol:{span:24},wrapperCol:{span:24},children:$.jsx(re.Input,{id:`${s.$id}_country`,value:(e==null?void 0:e.country)||"",onChange:f("country"),onFocus:d,onBlur:p,disabled:n||i,placeholder:"Australia",status:g("country")})})]})},Bg=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,idSchema:s})=>{const l=ht(s.$id,a),u=d=>{const p=d.replace(/\D/g,""),m=p.length;return m<4?p:m<7?`(${p.slice(0,3)}) ${p.slice(3)}`:`(${p.slice(0,3)}) ${p.slice(3,6)}-${p.slice(6,10)}`},f=async d=>{const p=u(d.target.value);t(p),await l.onChange(p)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:s.$id,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a.title||"Phone Number",r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:s.$id,type:"tel",value:e||"",onChange:f,disabled:n||i,placeholder:"(555) 123-4567",maxLength:14})]})},Ug=({formData:e,onChange:t,required:r,disabled:n,readonly:i,schema:a,uiSchema:s,idSchema:l})=>{var _,w;const u=((_=s==null?void 0:s["ui:options"])==null?void 0:_.currency)||"USD",f=((w=s==null?void 0:s["ui:options"])==null?void 0:w.symbol)||"$",d=ht(l.$id,a),p=v=>{const g=parseFloat(v.replace(/[^0-9.-]+/g,""));return isNaN(g)?"":g.toFixed(2)},m=async v=>{const g=v.target.value.replace(/[^0-9.-]+/g,""),C=g?parseFloat(g):void 0;t(C),await d.onChange(C)},y=async v=>{const g=p(v.target.value),C=g?parseFloat(g):void 0;t(C),await d.onBlur(C)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:l.$id,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a.title||"Amount",r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:l.$id,inputMode:"decimal",value:e||"",onChange:m,onBlur:y,disabled:n||i,placeholder:"0.00",prefix:String(f),suffix:String(u)})]})};function ke(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function gO(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),ke(e.additionalItems)}function Wg(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Bn="__additional_property",Es="additionalProperties",Un="allOf",yt="anyOf",pr="const",Os="default",As="dependencies",yO="enum",Ht="__errors",vt="$id",vO="if",zr="items",bO="_$junk_option_schema_id$_",Ts="$name",Qe="oneOf",Hu="patternProperties",Ve="properties",Ku="readonly",qg="required",Ps="submitButtonOptions",ot="$ref",Ga="$schema",_O=["discriminator","propertyName"],Vg="formContext",$O="layoutGridLookupMap",Gu="__rjsf_additionalProperties",Rg="__rjsf_rootSchema",wO="ui:field",Yu="ui:widget",Hr="ui:options",Ju="ui:globalOptions",SO="https://json-schema.org/draft/2019-09/schema",Is="https://json-schema.org/draft/2020-12/schema";function we(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,n)=>{const i=e[n];return n===Yu&&ke(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===Hr&&ke(i)?{...r,...i}:{...r,[n.substring(3)]:i}},{...t}):{...t}}function zg(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:n=!0}=we(t);return n===!1?n:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}var Hg=typeof global=="object"&&global&&global.Object===Object&&global,CO=typeof self=="object"&&self&&self.Object===Object&&self,Kr=Hg||CO||Function("return this")(),mr=Kr.Symbol,Kg=Object.prototype,EO=Kg.hasOwnProperty,OO=Kg.toString,Ya=mr?mr.toStringTag:void 0;function AO(e){var t=EO.call(e,Ya),r=e[Ya];try{e[Ya]=void 0;var n=!0}catch{}var i=OO.call(e);return n&&(t?e[Ya]=r:delete e[Ya]),i}var TO=Object.prototype,PO=TO.toString;function IO(e){return PO.call(e)}var xO="[object Null]",DO="[object Undefined]",Gg=mr?mr.toStringTag:void 0;function hn(e){return e==null?e===void 0?DO:xO:Gg&&Gg in Object(e)?AO(e):IO(e)}function Yg(e,t){return function(r){return e(t(r))}}var xs=Yg(Object.getPrototypeOf,Object);function gr(e){return e!=null&&typeof e=="object"}var FO="[object Object]",NO=Function.prototype,MO=Object.prototype,Jg=NO.toString,kO=MO.hasOwnProperty,LO=Jg.call(Object);function Wn(e){if(!gr(e)||hn(e)!=FO)return!1;var t=xs(e);if(t===null)return!0;var r=kO.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Jg.call(r)==LO}function Ds(e){const t={[Ht]:[],addError(r){this[Ht].push(r)}};if(Array.isArray(e))return e.reduce((r,n,i)=>({...r,[i]:Ds(n)}),t);if(Wn(e)){const r=e;return Object.keys(r).reduce((n,i)=>({...n,[i]:Ds(r[i])}),t)}return t}function jO(){this.__data__=[],this.size=0}function Ja(e,t){return e===t||e!==e&&t!==t}function Fs(e,t){for(var r=e.length;r--;)if(Ja(e[r][0],t))return r;return-1}var BO=Array.prototype,UO=BO.splice;function WO(e){var t=this.__data__,r=Fs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UO.call(t,r,1),--this.size,!0}function qO(e){var t=this.__data__,r=Fs(t,e);return r<0?void 0:t[r][1]}function VO(e){return Fs(this.__data__,e)>-1}function RO(e,t){var r=this.__data__,n=Fs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function pn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pn.prototype.clear=jO,pn.prototype.delete=WO,pn.prototype.get=qO,pn.prototype.has=VO,pn.prototype.set=RO;function zO(){this.__data__=new pn,this.size=0}function HO(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function KO(e){return this.__data__.get(e)}function GO(e){return this.__data__.has(e)}function Re(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var YO="[object AsyncFunction]",JO="[object Function]",XO="[object GeneratorFunction]",ZO="[object Proxy]";function Xa(e){if(!Re(e))return!1;var t=hn(e);return t==JO||t==XO||t==YO||t==ZO}var Xu=Kr["__core-js_shared__"],Xg=function(){var e=/[^.]+$/.exec(Xu&&Xu.keys&&Xu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function QO(e){return!!Xg&&Xg in e}var eA=Function.prototype,tA=eA.toString;function si(e){if(e!=null){try{return tA.call(e)}catch{}try{return e+""}catch{}}return""}var rA=/[\\^$.*+?()[\]{}|]/g,nA=/^\[object .+?Constructor\]$/,iA=Function.prototype,aA=Object.prototype,oA=iA.toString,sA=aA.hasOwnProperty,lA=RegExp("^"+oA.call(sA).replace(rA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cA(e){if(!Re(e)||QO(e))return!1;var t=Xa(e)?lA:nA;return t.test(si(e))}function uA(e,t){return e==null?void 0:e[t]}function li(e,t){var r=uA(e,t);return cA(r)?r:void 0}var Za=li(Kr,"Map"),Qa=li(Object,"create");function fA(){this.__data__=Qa?Qa(null):{},this.size=0}function dA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hA="__lodash_hash_undefined__",pA=Object.prototype,mA=pA.hasOwnProperty;function gA(e){var t=this.__data__;if(Qa){var r=t[e];return r===hA?void 0:r}return mA.call(t,e)?t[e]:void 0}var yA=Object.prototype,vA=yA.hasOwnProperty;function bA(e){var t=this.__data__;return Qa?t[e]!==void 0:vA.call(t,e)}var _A="__lodash_hash_undefined__";function $A(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qa&&t===void 0?_A:t,this}function ci(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ci.prototype.clear=fA,ci.prototype.delete=dA,ci.prototype.get=gA,ci.prototype.has=bA,ci.prototype.set=$A;function wA(){this.size=0,this.__data__={hash:new ci,map:new(Za||pn),string:new ci}}function SA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ns(e,t){var r=e.__data__;return SA(t)?r[typeof t=="string"?"string":"hash"]:r.map}function CA(e){var t=Ns(this,e).delete(e);return this.size-=t?1:0,t}function EA(e){return Ns(this,e).get(e)}function OA(e){return Ns(this,e).has(e)}function AA(e,t){var r=Ns(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function mn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mn.prototype.clear=wA,mn.prototype.delete=CA,mn.prototype.get=EA,mn.prototype.has=OA,mn.prototype.set=AA;var TA=200;function PA(e,t){var r=this.__data__;if(r instanceof pn){var n=r.__data__;if(!Za||n.length<TA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new mn(n)}return r.set(e,t),this.size=r.size,this}function Dr(e){var t=this.__data__=new pn(e);this.size=t.size}Dr.prototype.clear=zO,Dr.prototype.delete=HO,Dr.prototype.get=KO,Dr.prototype.has=GO,Dr.prototype.set=PA;var IA="__lodash_hash_undefined__";function xA(e){return this.__data__.set(e,IA),this}function DA(e){return this.__data__.has(e)}function ui(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new mn;++t<r;)this.add(e[t])}ui.prototype.add=ui.prototype.push=xA,ui.prototype.has=DA;function FA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function eo(e,t){return e.has(t)}var NA=1,MA=2;function Zg(e,t,r,n,i,a){var s=r&NA,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,y=r&MA?new ui:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var _=e[p],w=t[p];if(n)var v=s?n(w,_,p,t,e,a):n(_,w,p,e,t,a);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!FA(t,function(g,C){if(!eo(y,C)&&(_===g||i(_,g,r,n,a)))return y.push(C)})){m=!1;break}}else if(!(_===w||i(_,w,r,n,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var Ms=Kr.Uint8Array;function kA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Zu(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LA=1,jA=2,BA="[object Boolean]",UA="[object Date]",WA="[object Error]",qA="[object Map]",VA="[object Number]",RA="[object RegExp]",zA="[object Set]",HA="[object String]",KA="[object Symbol]",GA="[object ArrayBuffer]",YA="[object DataView]",Qg=mr?mr.prototype:void 0,Qu=Qg?Qg.valueOf:void 0;function JA(e,t,r,n,i,a,s){switch(r){case YA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case GA:return!(e.byteLength!=t.byteLength||!a(new Ms(e),new Ms(t)));case BA:case UA:case VA:return Ja(+e,+t);case WA:return e.name==t.name&&e.message==t.message;case RA:case HA:return e==t+"";case qA:var l=kA;case zA:var u=n&LA;if(l||(l=Zu),e.size!=t.size&&!u)return!1;var f=s.get(e);if(f)return f==t;n|=jA,s.set(e,t);var d=Zg(l(e),l(t),n,i,a,s);return s.delete(e),d;case KA:if(Qu)return Qu.call(e)==Qu.call(t)}return!1}function ef(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Ot=Array.isArray;function ey(e,t,r){var n=t(e);return Ot(e)?n:ef(n,r(e))}function XA(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}function ty(){return[]}var ZA=Object.prototype,QA=ZA.propertyIsEnumerable,ry=Object.getOwnPropertySymbols,tf=ry?function(e){return e==null?[]:(e=Object(e),XA(ry(e),function(t){return QA.call(e,t)}))}:ty;function ny(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var eT="[object Arguments]";function iy(e){return gr(e)&&hn(e)==eT}var ay=Object.prototype,tT=ay.hasOwnProperty,rT=ay.propertyIsEnumerable,Vi=iy(function(){return arguments}())?iy:function(e){return gr(e)&&tT.call(e,"callee")&&!rT.call(e,"callee")};function nT(){return!1}var oy=typeof ie=="object"&&ie&&!ie.nodeType&&ie,sy=oy&&typeof module=="object"&&module&&!module.nodeType&&module,iT=sy&&sy.exports===oy,ly=iT?Kr.Buffer:void 0,aT=ly?ly.isBuffer:void 0,fi=aT||nT,oT=9007199254740991,sT=/^(?:0|[1-9]\d*)$/;function ks(e,t){var r=typeof e;return t=t??oT,!!t&&(r=="number"||r!="symbol"&&sT.test(e))&&e>-1&&e%1==0&&e<t}var lT=9007199254740991;function rf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lT}var cT="[object Arguments]",uT="[object Array]",fT="[object Boolean]",dT="[object Date]",hT="[object Error]",pT="[object Function]",mT="[object Map]",gT="[object Number]",yT="[object Object]",vT="[object RegExp]",bT="[object Set]",_T="[object String]",$T="[object WeakMap]",wT="[object ArrayBuffer]",ST="[object DataView]",CT="[object Float32Array]",ET="[object Float64Array]",OT="[object Int8Array]",AT="[object Int16Array]",TT="[object Int32Array]",PT="[object Uint8Array]",IT="[object Uint8ClampedArray]",xT="[object Uint16Array]",DT="[object Uint32Array]",st={};st[CT]=st[ET]=st[OT]=st[AT]=st[TT]=st[PT]=st[IT]=st[xT]=st[DT]=!0,st[cT]=st[uT]=st[wT]=st[fT]=st[ST]=st[dT]=st[hT]=st[pT]=st[mT]=st[gT]=st[yT]=st[vT]=st[bT]=st[_T]=st[$T]=!1;function FT(e){return gr(e)&&rf(e.length)&&!!st[hn(e)]}function nf(e){return function(t){return e(t)}}var cy=typeof ie=="object"&&ie&&!ie.nodeType&&ie,to=cy&&typeof module=="object"&&module&&!module.nodeType&&module,NT=to&&to.exports===cy,af=NT&&Hg.process,Ri=function(){try{var e=to&&to.require&&to.require("util").types;return e||af&&af.binding&&af.binding("util")}catch{}}(),uy=Ri&&Ri.isTypedArray,ro=uy?nf(uy):FT,MT=Object.prototype,kT=MT.hasOwnProperty;function fy(e,t){var r=Ot(e),n=!r&&Vi(e),i=!r&&!n&&fi(e),a=!r&&!n&&!i&&ro(e),s=r||n||i||a,l=s?ny(e.length,String):[],u=l.length;for(var f in e)(t||kT.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ks(f,u)))&&l.push(f);return l}var LT=Object.prototype;function Ls(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||LT;return e===r}var jT=Yg(Object.keys,Object),BT=Object.prototype,UT=BT.hasOwnProperty;function dy(e){if(!Ls(e))return jT(e);var t=[];for(var r in Object(e))UT.call(e,r)&&r!="constructor"&&t.push(r);return t}function di(e){return e!=null&&rf(e.length)&&!Xa(e)}function Fr(e){return di(e)?fy(e):dy(e)}function of(e){return ey(e,Fr,tf)}var WT=1,qT=Object.prototype,VT=qT.hasOwnProperty;function RT(e,t,r,n,i,a){var s=r&WT,l=of(e),u=l.length,f=of(t),d=f.length;if(u!=d&&!s)return!1;for(var p=u;p--;){var m=l[p];if(!(s?m in t:VT.call(t,m)))return!1}var y=a.get(e),_=a.get(t);if(y&&_)return y==t&&_==e;var w=!0;a.set(e,t),a.set(t,e);for(var v=s;++p<u;){m=l[p];var g=e[m],C=t[m];if(n)var S=s?n(C,g,m,t,e,a):n(g,C,m,e,t,a);if(!(S===void 0?g===C||i(g,C,r,n,a):S)){w=!1;break}v||(v=m=="constructor")}if(w&&!v){var E=e.constructor,A=t.constructor;E!=A&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof A=="function"&&A instanceof A)&&(w=!1)}return a.delete(e),a.delete(t),w}var sf=li(Kr,"DataView"),lf=li(Kr,"Promise"),zi=li(Kr,"Set"),cf=li(Kr,"WeakMap"),hy="[object Map]",zT="[object Object]",py="[object Promise]",my="[object Set]",gy="[object WeakMap]",yy="[object DataView]",HT=si(sf),KT=si(Za),GT=si(lf),YT=si(zi),JT=si(cf),yr=hn;(sf&&yr(new sf(new ArrayBuffer(1)))!=yy||Za&&yr(new Za)!=hy||lf&&yr(lf.resolve())!=py||zi&&yr(new zi)!=my||cf&&yr(new cf)!=gy)&&(yr=function(e){var t=hn(e),r=t==zT?e.constructor:void 0,n=r?si(r):"";if(n)switch(n){case HT:return yy;case KT:return hy;case GT:return py;case YT:return my;case JT:return gy}return t});var XT=1,vy="[object Arguments]",by="[object Array]",js="[object Object]",ZT=Object.prototype,_y=ZT.hasOwnProperty;function QT(e,t,r,n,i,a){var s=Ot(e),l=Ot(t),u=s?by:yr(e),f=l?by:yr(t);u=u==vy?js:u,f=f==vy?js:f;var d=u==js,p=f==js,m=u==f;if(m&&fi(e)){if(!fi(t))return!1;s=!0,d=!1}if(m&&!d)return a||(a=new Dr),s||ro(e)?Zg(e,t,r,n,i,a):JA(e,t,u,r,n,i,a);if(!(r&XT)){var y=d&&_y.call(e,"__wrapped__"),_=p&&_y.call(t,"__wrapped__");if(y||_){var w=y?e.value():e,v=_?t.value():t;return a||(a=new Dr),i(w,v,r,n,a)}}return m?(a||(a=new Dr),RT(e,t,r,n,i,a)):!1}function no(e,t,r,n,i){return e===t?!0:e==null||t==null||!gr(e)&&!gr(t)?e!==e&&t!==t:QT(e,t,r,n,no,i)}function eP(e,t,r){r=typeof r=="function"?r:void 0;var n=r?r(e,t):void 0;return n===void 0?no(e,t,void 0,r):!!n}function pt(e,t){return eP(e,t,(r,n)=>{if(typeof r=="function"&&typeof n=="function")return!0})}var tP="[object Symbol]";function io(e){return typeof e=="symbol"||gr(e)&&hn(e)==tP}var rP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nP=/^\w*$/;function uf(e,t){if(Ot(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||io(e)?!0:nP.test(e)||!rP.test(e)||t!=null&&e in Object(t)}var iP="Expected a function";function ff(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(iP);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(ff.Cache||mn),r}ff.Cache=mn;var aP=500;function oP(e){var t=ff(e,function(n){return r.size===aP&&r.clear(),n}),r=t.cache;return t}var sP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lP=/\\(\\)?/g,$y=oP(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sP,function(r,n,i,a){t.push(i?a.replace(lP,"$1"):n||r)}),t});function Hi(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var wy=mr?mr.prototype:void 0,Sy=wy?wy.toString:void 0;function Cy(e){if(typeof e=="string")return e;if(Ot(e))return Hi(e,Cy)+"";if(io(e))return Sy?Sy.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function df(e){return e==null?"":Cy(e)}function Ki(e,t){return Ot(e)?e:uf(e,t)?[e]:$y(df(e))}function hi(e){if(typeof e=="string"||io(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bs(e,t){t=Ki(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hi(t[r++])];return r&&r==n?e:void 0}function de(e,t,r){var n=e==null?void 0:Bs(e,t);return n===void 0?r:n}var cP=Object.prototype,uP=cP.hasOwnProperty;function fP(e,t){return e!=null&&uP.call(e,t)}function Ey(e,t,r){t=Ki(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=hi(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&rf(i)&&ks(s,i)&&(Ot(e)||Vi(e)))}function Be(e,t){return e!=null&&Ey(e,t,fP)}function Oy(e,t){return no(e,t)}var Us=function(){try{var e=li(Object,"defineProperty");return e({},"",{}),e}catch{}}();function hf(e,t,r){t=="__proto__"&&Us?Us(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var dP=Object.prototype,hP=dP.hasOwnProperty;function pf(e,t,r){var n=e[t];(!(hP.call(e,t)&&Ja(n,r))||r===void 0&&!(t in e))&&hf(e,t,r)}function mf(e,t,r,n){if(!Re(e))return e;t=Ki(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var u=hi(t[i]),f=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var d=l[u];f=n?n(d,u,l):void 0,f===void 0&&(f=Re(d)?d:ks(t[i+1])?[]:{})}pf(l,u,f),l=l[u]}return e}function Xe(e,t,r){return e==null?e:mf(e,t,r)}function Ws(e){return e}function Ay(e){return typeof e=="function"?e:Ws}var pP=/\s/;function mP(e){for(var t=e.length;t--&&pP.test(e.charAt(t)););return t}var gP=/^\s+/;function yP(e){return e&&e.slice(0,mP(e)+1).replace(gP,"")}var Ty=NaN,vP=/^[-+]0x[0-9a-f]+$/i,bP=/^0b[01]+$/i,_P=/^0o[0-7]+$/i,$P=parseInt;function wP(e){if(typeof e=="number")return e;if(io(e))return Ty;if(Re(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Re(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yP(e);var r=bP.test(e);return r||_P.test(e)?$P(e.slice(2),r?2:8):vP.test(e)?Ty:+e}var SP=1/0,CP=17976931348623157e292;function EP(e){if(!e)return e===0?e:0;if(e=wP(e),e===SP||e===-1/0){var t=e<0?-1:1;return t*CP}return e===e?e:0}function Py(e){var t=EP(e),r=t%1;return t===t?r?t-r:t:0}var OP=9007199254740991,gf=4294967295,AP=Math.min;function Iy(e,t){if(e=Py(e),e<1||e>OP)return[];var r=gf,n=AP(e,gf);t=Ay(t),e-=gf;for(var i=ny(n,t);++r<e;)t(r);return i}function yf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var xy=Object.create,Dy=function(){function e(){}return function(t){if(!Re(t))return{};if(xy)return xy(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function TP(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),l=s.length;l--;){var u=s[++i];if(r(a[u],u,a)===!1)break}return t}}var Fy=TP();function Ny(e,t){return e&&Fy(e,t,Fr)}var PP=1,IP=2;function xP(e,t,r,n){var i=r.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var l=s[0],u=e[l],f=s[1];if(s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Dr,p;if(!(p===void 0?no(f,u,PP|IP,n,d):p))return!1}}return!0}function My(e){return e===e&&!Re(e)}function DP(e){for(var t=Fr(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,My(i)]}return t}function ky(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function FP(e){var t=DP(e);return t.length==1&&t[0][2]?ky(t[0][0],t[0][1]):function(r){return r===e||xP(r,e,t)}}function NP(e,t){return e!=null&&t in Object(e)}function Ly(e,t){return e!=null&&Ey(e,t,NP)}var MP=1,kP=2;function LP(e,t){return uf(e)&&My(t)?ky(hi(e),t):function(r){var n=de(r,e);return n===void 0&&n===t?Ly(r,e):no(t,n,MP|kP)}}function jP(e){return function(t){return t==null?void 0:t[e]}}function BP(e){return function(t){return Bs(t,e)}}function UP(e){return uf(e)?jP(hi(e)):BP(e)}function vf(e){return typeof e=="function"?e:e==null?Ws:typeof e=="object"?Ot(e)?LP(e[0],e[1]):FP(e):UP(e)}function WP(e,t,r){var n=Ot(e),i=n||fi(e)||ro(e);if(t=vf(t),r==null){var a=e&&e.constructor;i?r=n?new a:[]:Re(e)?r=Xa(a)?Dy(xs(e)):{}:r={}}return(i?yf:Ny)(e,function(s,l,u){return t(r,s,l,u)}),r}function bf(e,t,r){(r!==void 0&&!Ja(e[t],r)||r===void 0&&!(t in e))&&hf(e,t,r)}var jy=typeof ie=="object"&&ie&&!ie.nodeType&&ie,By=jy&&typeof module=="object"&&module&&!module.nodeType&&module,qP=By&&By.exports===jy,Uy=qP?Kr.Buffer:void 0,Wy=Uy?Uy.allocUnsafe:void 0;function qy(e,t){if(t)return e.slice();var r=e.length,n=Wy?Wy(r):new e.constructor(r);return e.copy(n),n}function _f(e){var t=new e.constructor(e.byteLength);return new Ms(t).set(new Ms(e)),t}function Vy(e,t){var r=t?_f(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function $f(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Ry(e){return typeof e.constructor=="function"&&!Ls(e)?Dy(xs(e)):{}}function ao(e){return gr(e)&&di(e)}function wf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Gi(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=void 0;u===void 0&&(u=e[l]),i?hf(r,l,u):pf(r,l,u)}return r}function VP(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var RP=Object.prototype,zP=RP.hasOwnProperty;function HP(e){if(!Re(e))return VP(e);var t=Ls(e),r=[];for(var n in e)n=="constructor"&&(t||!zP.call(e,n))||r.push(n);return r}function oo(e){return di(e)?fy(e,!0):HP(e)}function KP(e){return Gi(e,oo(e))}function GP(e,t,r,n,i,a,s){var l=wf(e,r),u=wf(t,r),f=s.get(u);if(f){bf(e,r,f);return}var d=a?a(l,u,r+"",e,t,s):void 0,p=d===void 0;if(p){var m=Ot(u),y=!m&&fi(u),_=!m&&!y&&ro(u);d=u,m||y||_?Ot(l)?d=l:ao(l)?d=$f(l):y?(p=!1,d=qy(u,!0)):_?(p=!1,d=Vy(u,!0)):d=[]:Wn(u)||Vi(u)?(d=l,Vi(l)?d=KP(l):(!Re(l)||Xa(l))&&(d=Ry(u))):p=!1}p&&(s.set(u,d),i(d,u,n,a,s),s.delete(u)),bf(e,r,d)}function zy(e,t,r,n,i){e!==t&&Fy(t,function(a,s){if(i||(i=new Dr),Re(a))GP(e,t,s,r,zy,n,i);else{var l=n?n(wf(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),bf(e,s,l)}},oo)}function YP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Hy=Math.max;function Ky(e,t,r){return t=Hy(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Hy(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),YP(e,this,l)}}function JP(e){return function(){return e}}var XP=Us?function(e,t){return Us(e,"toString",{configurable:!0,enumerable:!1,value:JP(t),writable:!0})}:Ws,ZP=800,QP=16,e2=Date.now;function t2(e){var t=0,r=0;return function(){var n=e2(),i=QP-(n-r);if(r=n,i>0){if(++t>=ZP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Gy=t2(XP);function qs(e,t){return Gy(Ky(e,t,Ws),e+"")}function r2(e,t,r){if(!Re(r))return!1;var n=typeof t;return(n=="number"?di(r)&&ks(t,r.length):n=="string"&&t in r)?Ja(r[t],e):!1}function n2(e){return qs(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&r2(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,a)}return t})}var i2=n2(function(e,t,r){zy(e,t,r)}),Yy=mr?mr.isConcatSpreadable:void 0;function a2(e){return Ot(e)||Vi(e)||!!(Yy&&e&&e[Yy])}function so(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=a2),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?so(l,t-1,r,n,i):ef(i,l):n||(i[i.length]=l)}return i}var o2=1/0;function s2(e){var t=e==null?0:e.length;return t?so(e,o2):[]}function l2(e,t,r,n){for(var i=e.length,a=r+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function c2(e){return e!==e}function u2(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Jy(e,t,r){return t===t?u2(e,t,r):l2(e,c2,r)}function Sf(e,t){var r=e==null?0:e.length;return!!r&&Jy(e,t,0)>-1}function Xy(){}var f2=1/0,d2=zi&&1/Zu(new zi([,-0]))[1]==f2?function(e){return new zi(e)}:Xy,h2=200;function Zy(e,t,r){var n=-1,i=Sf,a=e.length,s=!0,l=[],u=l;if(a>=h2){var f=d2(e);if(f)return Zu(f);s=!1,i=eo,u=new ui}else u=l;e:for(;++n<a;){var d=e[n],p=d;if(d=d!==0?d:0,s&&p===p){for(var m=u.length;m--;)if(u[m]===p)continue e;l.push(d)}else i(u,p,r)||(u!==l&&u.push(p),l.push(d))}return l}function p2(e){return e&&e.length?Zy(e):[]}var Nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function g2(){this.__data__=[],this.size=0}var y2=g2;function v2(e,t){return e===t||e!==e&&t!==t}var Yi=v2,b2=Yi;function _2(e,t){for(var r=e.length;r--;)if(b2(e[r][0],t))return r;return-1}var Vs=_2,$2=Vs,w2=Array.prototype,S2=w2.splice;function C2(e){var t=this.__data__,r=$2(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():S2.call(t,r,1),--this.size,!0}var E2=C2,O2=Vs;function A2(e){var t=this.__data__,r=O2(t,e);return r<0?void 0:t[r][1]}var T2=A2,P2=Vs;function I2(e){return P2(this.__data__,e)>-1}var x2=I2,D2=Vs;function F2(e,t){var r=this.__data__,n=D2(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var N2=F2,M2=y2,k2=E2,L2=T2,j2=x2,B2=N2;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ji.prototype.clear=M2,Ji.prototype.delete=k2,Ji.prototype.get=L2,Ji.prototype.has=j2,Ji.prototype.set=B2;var Rs=Ji,U2=Rs;function W2(){this.__data__=new U2,this.size=0}var q2=W2;function V2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var R2=V2;function z2(e){return this.__data__.get(e)}var H2=z2;function K2(e){return this.__data__.has(e)}var G2=K2,Y2=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,Qy=Y2,J2=Qy,X2=typeof self=="object"&&self&&self.Object===Object&&self,Z2=J2||X2||Function("return this")(),Gr=Z2,Q2=Gr,eI=Q2.Symbol,Xi=eI,ev=Xi,tv=Object.prototype,tI=tv.hasOwnProperty,rI=tv.toString,lo=ev?ev.toStringTag:void 0;function nI(e){var t=tI.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=rI.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var iI=nI,aI=Object.prototype,oI=aI.toString;function sI(e){return oI.call(e)}var lI=sI,rv=Xi,cI=iI,uI=lI,fI="[object Null]",dI="[object Undefined]",nv=rv?rv.toStringTag:void 0;function hI(e){return e==null?e===void 0?dI:fI:nv&&nv in Object(e)?cI(e):uI(e)}var pi=hI;function pI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yr=pI,mI=pi,gI=Yr,yI="[object AsyncFunction]",vI="[object Function]",bI="[object GeneratorFunction]",_I="[object Proxy]";function $I(e){if(!gI(e))return!1;var t=mI(e);return t==vI||t==bI||t==yI||t==_I}var Cf=$I,wI=Gr,SI=wI["__core-js_shared__"],CI=SI,Ef=CI,iv=function(){var e=/[^.]+$/.exec(Ef&&Ef.keys&&Ef.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function EI(e){return!!iv&&iv in e}var OI=EI,AI=Function.prototype,TI=AI.toString;function PI(e){if(e!=null){try{return TI.call(e)}catch{}try{return e+""}catch{}}return""}var av=PI,II=Cf,xI=OI,DI=Yr,FI=av,NI=/[\\^$.*+?()[\]{}|]/g,MI=/^\[object .+?Constructor\]$/,kI=Function.prototype,LI=Object.prototype,jI=kI.toString,BI=LI.hasOwnProperty,UI=RegExp("^"+jI.call(BI).replace(NI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function WI(e){if(!DI(e)||xI(e))return!1;var t=II(e)?UI:MI;return t.test(FI(e))}var qI=WI;function VI(e,t){return e==null?void 0:e[t]}var RI=VI,zI=qI,HI=RI;function KI(e,t){var r=HI(e,t);return zI(r)?r:void 0}var mi=KI,GI=mi,YI=Gr,JI=GI(YI,"Map"),Of=JI,XI=mi,ZI=XI(Object,"create"),zs=ZI,ov=zs;function QI(){this.__data__=ov?ov(null):{},this.size=0}var ex=QI;function tx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rx=tx,nx=zs,ix="__lodash_hash_undefined__",ax=Object.prototype,ox=ax.hasOwnProperty;function sx(e){var t=this.__data__;if(nx){var r=t[e];return r===ix?void 0:r}return ox.call(t,e)?t[e]:void 0}var lx=sx,cx=zs,ux=Object.prototype,fx=ux.hasOwnProperty;function dx(e){var t=this.__data__;return cx?t[e]!==void 0:fx.call(t,e)}var hx=dx,px=zs,mx="__lodash_hash_undefined__";function gx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=px&&t===void 0?mx:t,this}var yx=gx,vx=ex,bx=rx,_x=lx,$x=hx,wx=yx;function Zi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zi.prototype.clear=vx,Zi.prototype.delete=bx,Zi.prototype.get=_x,Zi.prototype.has=$x,Zi.prototype.set=wx;var Sx=Zi,sv=Sx,Cx=Rs,Ex=Of;function Ox(){this.size=0,this.__data__={hash:new sv,map:new(Ex||Cx),string:new sv}}var Ax=Ox;function Tx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Px=Tx,Ix=Px;function xx(e,t){var r=e.__data__;return Ix(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Hs=xx,Dx=Hs;function Fx(e){var t=Dx(this,e).delete(e);return this.size-=t?1:0,t}var Nx=Fx,Mx=Hs;function kx(e){return Mx(this,e).get(e)}var Lx=kx,jx=Hs;function Bx(e){return jx(this,e).has(e)}var Ux=Bx,Wx=Hs;function qx(e,t){var r=Wx(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Vx=qx,Rx=Ax,zx=Nx,Hx=Lx,Kx=Ux,Gx=Vx;function Qi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Qi.prototype.clear=Rx,Qi.prototype.delete=zx,Qi.prototype.get=Hx,Qi.prototype.has=Kx,Qi.prototype.set=Gx;var Af=Qi,Yx=Rs,Jx=Of,Xx=Af,Zx=200;function Qx(e,t){var r=this.__data__;if(r instanceof Yx){var n=r.__data__;if(!Jx||n.length<Zx-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xx(n)}return r.set(e,t),this.size=r.size,this}var eD=Qx,tD=Rs,rD=q2,nD=R2,iD=H2,aD=G2,oD=eD;function ea(e){var t=this.__data__=new tD(e);this.size=t.size}ea.prototype.clear=rD,ea.prototype.delete=nD,ea.prototype.get=iD,ea.prototype.has=aD,ea.prototype.set=oD;var Ks=ea;function sD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var lv=sD,lD=mi,cD=function(){try{var e=lD(Object,"defineProperty");return e({},"",{}),e}catch{}}(),cv=cD,uv=cv;function uD(e,t,r){t=="__proto__"&&uv?uv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Tf=uD,fD=Tf,dD=Yi,hD=Object.prototype,pD=hD.hasOwnProperty;function mD(e,t,r){var n=e[t];(!(pD.call(e,t)&&dD(n,r))||r===void 0&&!(t in e))&&fD(e,t,r)}var fv=mD,gD=fv,yD=Tf;function vD(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=n?n(r[l],e[l],l,r,e):void 0;u===void 0&&(u=e[l]),i?yD(r,l,u):gD(r,l,u)}return r}var co=vD;function bD(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _D=bD;function $D(e){return e!=null&&typeof e=="object"}var Jr=$D,wD=pi,SD=Jr,CD="[object Arguments]";function ED(e){return SD(e)&&wD(e)==CD}var OD=ED,dv=OD,AD=Jr,hv=Object.prototype,TD=hv.hasOwnProperty,PD=hv.propertyIsEnumerable,ID=dv(function(){return arguments}())?dv:function(e){return AD(e)&&TD.call(e,"callee")&&!PD.call(e,"callee")},Gs=ID,xD=Array.isArray,sr=xD,Ys={exports:{}};function DD(){return!1}var FD=DD;Ys.exports,function(e,t){var r=Gr,n=FD,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?r.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||n;e.exports=f}(Ys,Ys.exports);var Js=Ys.exports,ND=9007199254740991,MD=/^(?:0|[1-9]\d*)$/;function kD(e,t){var r=typeof e;return t=t??ND,!!t&&(r=="number"||r!="symbol"&&MD.test(e))&&e>-1&&e%1==0&&e<t}var Pf=kD,LD=9007199254740991;function jD(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LD}var If=jD,BD=pi,UD=If,WD=Jr,qD="[object Arguments]",VD="[object Array]",RD="[object Boolean]",zD="[object Date]",HD="[object Error]",KD="[object Function]",GD="[object Map]",YD="[object Number]",JD="[object Object]",XD="[object RegExp]",ZD="[object Set]",QD="[object String]",eF="[object WeakMap]",tF="[object ArrayBuffer]",rF="[object DataView]",nF="[object Float32Array]",iF="[object Float64Array]",aF="[object Int8Array]",oF="[object Int16Array]",sF="[object Int32Array]",lF="[object Uint8Array]",cF="[object Uint8ClampedArray]",uF="[object Uint16Array]",fF="[object Uint32Array]",lt={};lt[nF]=lt[iF]=lt[aF]=lt[oF]=lt[sF]=lt[lF]=lt[cF]=lt[uF]=lt[fF]=!0,lt[qD]=lt[VD]=lt[tF]=lt[RD]=lt[rF]=lt[zD]=lt[HD]=lt[KD]=lt[GD]=lt[YD]=lt[JD]=lt[XD]=lt[ZD]=lt[QD]=lt[eF]=!1;function dF(e){return WD(e)&&UD(e.length)&&!!lt[BD(e)]}var hF=dF;function pF(e){return function(t){return e(t)}}var gi=pF,Xs={exports:{}};Xs.exports,function(e,t){var r=Qy,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l}(Xs,Xs.exports);var xf=Xs.exports,mF=hF,gF=gi,pv=xf,mv=pv&&pv.isTypedArray,yF=mv?gF(mv):mF,Df=yF,vF=_D,bF=Gs,_F=sr,$F=Js,wF=Pf,SF=Df,CF=Object.prototype,EF=CF.hasOwnProperty;function OF(e,t){var r=_F(e),n=!r&&bF(e),i=!r&&!n&&$F(e),a=!r&&!n&&!i&&SF(e),s=r||n||i||a,l=s?vF(e.length,String):[],u=l.length;for(var f in e)(t||EF.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||wF(f,u)))&&l.push(f);return l}var gv=OF,AF=Object.prototype;function TF(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AF;return e===r}var Ff=TF;function PF(e,t){return function(r){return e(t(r))}}var yv=PF,IF=yv,xF=IF(Object.keys,Object),DF=xF,FF=Ff,NF=DF,MF=Object.prototype,kF=MF.hasOwnProperty;function LF(e){if(!FF(e))return NF(e);var t=[];for(var r in Object(e))kF.call(e,r)&&r!="constructor"&&t.push(r);return t}var jF=LF,BF=Cf,UF=If;function WF(e){return e!=null&&UF(e.length)&&!BF(e)}var ta=WF,qF=gv,VF=jF,RF=ta;function zF(e){return RF(e)?qF(e):VF(e)}var uo=zF,HF=co,KF=uo;function GF(e,t){return e&&HF(t,KF(t),e)}var YF=GF;function JF(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var XF=JF,ZF=Yr,QF=Ff,eN=XF,tN=Object.prototype,rN=tN.hasOwnProperty;function nN(e){if(!ZF(e))return eN(e);var t=QF(e),r=[];for(var n in e)n=="constructor"&&(t||!rN.call(e,n))||r.push(n);return r}var iN=nN,aN=gv,oN=iN,sN=ta;function lN(e){return sN(e)?aN(e,!0):oN(e)}var ra=lN,cN=co,uN=ra;function fN(e,t){return e&&cN(t,uN(t),e)}var dN=fN,Zs={exports:{}};Zs.exports,function(e,t){var r=Gr,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function u(f,d){if(d)return f.slice();var p=f.length,m=l?l(p):new f.constructor(p);return f.copy(m),m}e.exports=u}(Zs,Zs.exports);var vv=Zs.exports;function hN(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Nf=hN;function pN(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var mN=pN;function gN(){return[]}var bv=gN,yN=mN,vN=bv,bN=Object.prototype,_N=bN.propertyIsEnumerable,_v=Object.getOwnPropertySymbols,$N=_v?function(e){return e==null?[]:(e=Object(e),yN(_v(e),function(t){return _N.call(e,t)}))}:vN,Mf=$N,wN=co,SN=Mf;function CN(e,t){return wN(e,SN(e),t)}var EN=CN;function ON(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var kf=ON,AN=yv,TN=AN(Object.getPrototypeOf,Object),Lf=TN,PN=kf,IN=Lf,xN=Mf,DN=bv,FN=Object.getOwnPropertySymbols,NN=FN?function(e){for(var t=[];e;)PN(t,xN(e)),e=IN(e);return t}:DN,$v=NN,MN=co,kN=$v;function LN(e,t){return MN(e,kN(e),t)}var jN=LN,BN=kf,UN=sr;function WN(e,t,r){var n=t(e);return UN(e)?n:BN(n,r(e))}var wv=WN,qN=wv,VN=Mf,RN=uo;function zN(e){return qN(e,RN,VN)}var Sv=zN,HN=wv,KN=$v,GN=ra;function YN(e){return HN(e,GN,KN)}var JN=YN,XN=mi,ZN=Gr,QN=XN(ZN,"DataView"),eM=QN,tM=mi,rM=Gr,nM=tM(rM,"Promise"),iM=nM,aM=mi,oM=Gr,sM=aM(oM,"Set"),Cv=sM,lM=mi,cM=Gr,uM=lM(cM,"WeakMap"),fM=uM,jf=eM,Bf=Of,Uf=iM,Wf=Cv,qf=fM,Ev=pi,na=av,Ov="[object Map]",dM="[object Object]",Av="[object Promise]",Tv="[object Set]",Pv="[object WeakMap]",Iv="[object DataView]",hM=na(jf),pM=na(Bf),mM=na(Uf),gM=na(Wf),yM=na(qf),yi=Ev;(jf&&yi(new jf(new ArrayBuffer(1)))!=Iv||Bf&&yi(new Bf)!=Ov||Uf&&yi(Uf.resolve())!=Av||Wf&&yi(new Wf)!=Tv||qf&&yi(new qf)!=Pv)&&(yi=function(e){var t=Ev(e),r=t==dM?e.constructor:void 0,n=r?na(r):"";if(n)switch(n){case hM:return Iv;case pM:return Ov;case mM:return Av;case gM:return Tv;case yM:return Pv}return t});var Qs=yi,vM=Object.prototype,bM=vM.hasOwnProperty;function _M(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&bM.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var $M=_M,wM=Gr,SM=wM.Uint8Array,xv=SM,Dv=xv;function CM(e){var t=new e.constructor(e.byteLength);return new Dv(t).set(new Dv(e)),t}var Vf=CM,EM=Vf;function OM(e,t){var r=t?EM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var AM=OM,TM=/\w*$/;function PM(e){var t=new e.constructor(e.source,TM.exec(e));return t.lastIndex=e.lastIndex,t}var IM=PM,Fv=Xi,Nv=Fv?Fv.prototype:void 0,Mv=Nv?Nv.valueOf:void 0;function xM(e){return Mv?Object(Mv.call(e)):{}}var DM=xM,FM=Vf;function NM(e,t){var r=t?FM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var kv=NM,MM=Vf,kM=AM,LM=IM,jM=DM,BM=kv,UM="[object Boolean]",WM="[object Date]",qM="[object Map]",VM="[object Number]",RM="[object RegExp]",zM="[object Set]",HM="[object String]",KM="[object Symbol]",GM="[object ArrayBuffer]",YM="[object DataView]",JM="[object Float32Array]",XM="[object Float64Array]",ZM="[object Int8Array]",QM="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",r4="[object Uint8ClampedArray]",n4="[object Uint16Array]",i4="[object Uint32Array]";function a4(e,t,r){var n=e.constructor;switch(t){case GM:return MM(e);case UM:case WM:return new n(+e);case YM:return kM(e,r);case JM:case XM:case ZM:case QM:case e4:case t4:case r4:case n4:case i4:return BM(e,r);case qM:return new n;case VM:case HM:return new n(e);case RM:return LM(e);case zM:return new n;case KM:return jM(e)}}var o4=a4,s4=Yr,Lv=Object.create,l4=function(){function e(){}return function(t){if(!s4(t))return{};if(Lv)return Lv(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),c4=l4,u4=c4,f4=Lf,d4=Ff;function h4(e){return typeof e.constructor=="function"&&!d4(e)?u4(f4(e)):{}}var jv=h4,p4=Qs,m4=Jr,g4="[object Map]";function y4(e){return m4(e)&&p4(e)==g4}var v4=y4,b4=v4,_4=gi,Bv=xf,Uv=Bv&&Bv.isMap,$4=Uv?_4(Uv):b4,w4=$4,S4=Qs,C4=Jr,E4="[object Set]";function O4(e){return C4(e)&&S4(e)==E4}var A4=O4,T4=A4,P4=gi,Wv=xf,qv=Wv&&Wv.isSet,I4=qv?P4(qv):T4,x4=I4,D4=Ks,F4=lv,N4=fv,M4=YF,k4=dN,L4=vv,j4=Nf,B4=EN,U4=jN,W4=Sv,q4=JN,V4=Qs,R4=$M,z4=o4,H4=jv,K4=sr,G4=Js,Y4=w4,J4=Yr,X4=x4,Z4=uo,Q4=ra,e3=1,t3=2,r3=4,Vv="[object Arguments]",n3="[object Array]",i3="[object Boolean]",a3="[object Date]",o3="[object Error]",Rv="[object Function]",s3="[object GeneratorFunction]",l3="[object Map]",c3="[object Number]",zv="[object Object]",u3="[object RegExp]",f3="[object Set]",d3="[object String]",h3="[object Symbol]",p3="[object WeakMap]",m3="[object ArrayBuffer]",g3="[object DataView]",y3="[object Float32Array]",v3="[object Float64Array]",b3="[object Int8Array]",_3="[object Int16Array]",$3="[object Int32Array]",w3="[object Uint8Array]",S3="[object Uint8ClampedArray]",C3="[object Uint16Array]",E3="[object Uint32Array]",rt={};rt[Vv]=rt[n3]=rt[m3]=rt[g3]=rt[i3]=rt[a3]=rt[y3]=rt[v3]=rt[b3]=rt[_3]=rt[$3]=rt[l3]=rt[c3]=rt[zv]=rt[u3]=rt[f3]=rt[d3]=rt[h3]=rt[w3]=rt[S3]=rt[C3]=rt[E3]=!0,rt[o3]=rt[Rv]=rt[p3]=!1;function el(e,t,r,n,i,a){var s,l=t&e3,u=t&t3,f=t&r3;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!J4(e))return e;var d=K4(e);if(d){if(s=R4(e),!l)return j4(e,s)}else{var p=V4(e),m=p==Rv||p==s3;if(G4(e))return L4(e,l);if(p==zv||p==Vv||m&&!i){if(s=u||m?{}:H4(e),!l)return u?U4(e,k4(s,e)):B4(e,M4(s,e))}else{if(!rt[p])return i?e:{};s=z4(e,p,l)}}a||(a=new D4);var y=a.get(e);if(y)return y;a.set(e,s),X4(e)?e.forEach(function(v){s.add(el(v,t,r,v,e,a))}):Y4(e)&&e.forEach(function(v,g){s.set(g,el(v,t,r,g,e,a))});var _=f?u?q4:W4:u?Q4:Z4,w=d?void 0:_(e);return F4(w||e,function(v,g){w&&(g=v,v=e[g]),N4(s,g,el(v,t,r,g,e,a))}),s}var O3=el,A3=O3,T3=1,P3=4;function I3(e){return A3(e,T3|P3)}var x3=I3,D3="__lodash_hash_undefined__";function F3(e){return this.__data__.set(e,D3),this}var N3=F3;function M3(e){return this.__data__.has(e)}var k3=M3,L3=Af,j3=N3,B3=k3;function tl(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new L3;++t<r;)this.add(e[t])}tl.prototype.add=tl.prototype.push=j3,tl.prototype.has=B3;var rl=tl;function U3(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var W3=U3;function q3(e,t){return e.has(t)}var nl=q3,V3=rl,R3=W3,z3=nl,H3=1,K3=2;function G3(e,t,r,n,i,a){var s=r&H3,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,y=r&K3?new V3:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var _=e[p],w=t[p];if(n)var v=s?n(w,_,p,t,e,a):n(_,w,p,e,t,a);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!R3(t,function(g,C){if(!z3(y,C)&&(_===g||i(_,g,r,n,a)))return y.push(C)})){m=!1;break}}else if(!(_===w||i(_,w,r,n,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var Hv=G3;function Y3(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var J3=Y3;function X3(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Rf=X3,Kv=Xi,Gv=xv,Z3=Yi,Q3=Hv,ek=J3,tk=Rf,rk=1,nk=2,ik="[object Boolean]",ak="[object Date]",ok="[object Error]",sk="[object Map]",lk="[object Number]",ck="[object RegExp]",uk="[object Set]",fk="[object String]",dk="[object Symbol]",hk="[object ArrayBuffer]",pk="[object DataView]",Yv=Kv?Kv.prototype:void 0,zf=Yv?Yv.valueOf:void 0;function mk(e,t,r,n,i,a,s){switch(r){case pk:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hk:return!(e.byteLength!=t.byteLength||!a(new Gv(e),new Gv(t)));case ik:case ak:case lk:return Z3(+e,+t);case ok:return e.name==t.name&&e.message==t.message;case ck:case fk:return e==t+"";case sk:var l=ek;case uk:var u=n&rk;if(l||(l=tk),e.size!=t.size&&!u)return!1;var f=s.get(e);if(f)return f==t;n|=nk,s.set(e,t);var d=Q3(l(e),l(t),n,i,a,s);return s.delete(e),d;case dk:if(zf)return zf.call(e)==zf.call(t)}return!1}var gk=mk,Jv=Sv,yk=1,vk=Object.prototype,bk=vk.hasOwnProperty;function _k(e,t,r,n,i,a){var s=r&yk,l=Jv(e),u=l.length,f=Jv(t),d=f.length;if(u!=d&&!s)return!1;for(var p=u;p--;){var m=l[p];if(!(s?m in t:bk.call(t,m)))return!1}var y=a.get(e),_=a.get(t);if(y&&_)return y==t&&_==e;var w=!0;a.set(e,t),a.set(t,e);for(var v=s;++p<u;){m=l[p];var g=e[m],C=t[m];if(n)var S=s?n(C,g,m,t,e,a):n(g,C,m,e,t,a);if(!(S===void 0?g===C||i(g,C,r,n,a):S)){w=!1;break}v||(v=m=="constructor")}if(w&&!v){var E=e.constructor,A=t.constructor;E!=A&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof A=="function"&&A instanceof A)&&(w=!1)}return a.delete(e),a.delete(t),w}var $k=_k,Hf=Ks,wk=Hv,Sk=gk,Ck=$k,Xv=Qs,Zv=sr,Qv=Js,Ek=Df,Ok=1,eb="[object Arguments]",tb="[object Array]",il="[object Object]",Ak=Object.prototype,rb=Ak.hasOwnProperty;function Tk(e,t,r,n,i,a){var s=Zv(e),l=Zv(t),u=s?tb:Xv(e),f=l?tb:Xv(t);u=u==eb?il:u,f=f==eb?il:f;var d=u==il,p=f==il,m=u==f;if(m&&Qv(e)){if(!Qv(t))return!1;s=!0,d=!1}if(m&&!d)return a||(a=new Hf),s||Ek(e)?wk(e,t,r,n,i,a):Sk(e,t,u,r,n,i,a);if(!(r&Ok)){var y=d&&rb.call(e,"__wrapped__"),_=p&&rb.call(t,"__wrapped__");if(y||_){var w=y?e.value():e,v=_?t.value():t;return a||(a=new Hf),i(w,v,r,n,a)}}return m?(a||(a=new Hf),Ck(e,t,r,n,i,a)):!1}var Pk=Tk,Ik=Pk,nb=Jr;function ib(e,t,r,n,i){return e===t?!0:e==null||t==null||!nb(e)&&!nb(t)?e!==e&&t!==t:Ik(e,t,r,n,ib,i)}var Kf=ib,xk=Kf;function Dk(e,t){return xk(e,t)}var ab=Dk,ob=Xi,Fk=Gs,Nk=sr,sb=ob?ob.isConcatSpreadable:void 0;function Mk(e){return Nk(e)||Fk(e)||!!(sb&&e&&e[sb])}var kk=Mk,Lk=kf,jk=kk;function lb(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=jk),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?lb(l,t-1,r,n,i):Lk(i,l):n||(i[i.length]=l)}return i}var Gf=lb;function Bk(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var vi=Bk,Uk=pi,Wk=Jr,qk="[object Symbol]";function Vk(e){return typeof e=="symbol"||Wk(e)&&Uk(e)==qk}var al=Vk,Rk=sr,zk=al,Hk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kk=/^\w*$/;function Gk(e,t){if(Rk(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||zk(e)?!0:Kk.test(e)||!Hk.test(e)||t!=null&&e in Object(t)}var Yf=Gk,cb=Af,Yk="Expected a function";function Jf(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Yk);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Jf.Cache||cb),r}Jf.Cache=cb;var Jk=Jf,Xk=Jk,Zk=500;function Qk(e){var t=Xk(e,function(n){return r.size===Zk&&r.clear(),n}),r=t.cache;return t}var e6=Qk,t6=e6,r6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n6=/\\(\\)?/g,i6=t6(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(r6,function(r,n,i,a){t.push(i?a.replace(n6,"$1"):n||r)}),t}),a6=i6,ub=Xi,o6=vi,s6=sr,l6=al,fb=ub?ub.prototype:void 0,db=fb?fb.toString:void 0;function hb(e){if(typeof e=="string")return e;if(s6(e))return o6(e,hb)+"";if(l6(e))return db?db.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var c6=hb,u6=c6;function f6(e){return e==null?"":u6(e)}var d6=f6,h6=sr,p6=Yf,m6=a6,g6=d6;function y6(e,t){return h6(e)?e:p6(e,t)?[e]:m6(g6(e))}var pb=y6,v6=al;function b6(e){if(typeof e=="string"||v6(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var ol=b6,_6=pb,$6=ol;function w6(e,t){t=_6(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[$6(t[r++])];return r&&r==n?e:void 0}var Xf=w6,S6=Ks,C6=Kf,E6=1,O6=2;function A6(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var u=l[0],f=e[u],d=l[1];if(s&&l[2]){if(f===void 0&&!(u in e))return!1}else{var p=new S6;if(n)var m=n(f,d,u,e,t,p);if(!(m===void 0?C6(d,f,E6|O6,n,p):m))return!1}}return!0}var T6=A6,P6=Yr;function I6(e){return e===e&&!P6(e)}var mb=I6,x6=mb,D6=uo;function F6(e){for(var t=D6(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,x6(i)]}return t}var N6=F6;function M6(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var gb=M6,k6=T6,L6=N6,j6=gb;function B6(e){var t=L6(e);return t.length==1&&t[0][2]?j6(t[0][0],t[0][1]):function(r){return r===e||k6(r,e,t)}}var U6=B6,W6=Xf;function q6(e,t,r){var n=e==null?void 0:W6(e,t);return n===void 0?r:n}var V6=q6;function R6(e,t){return e!=null&&t in Object(e)}var z6=R6,H6=pb,K6=Gs,G6=sr,Y6=Pf,J6=If,X6=ol;function Z6(e,t,r){t=H6(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=X6(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&J6(i)&&Y6(s,i)&&(G6(e)||K6(e)))}var Q6=Z6,eL=z6,tL=Q6;function rL(e,t){return e!=null&&tL(e,t,eL)}var nL=rL,iL=Kf,aL=V6,oL=nL,sL=Yf,lL=mb,cL=gb,uL=ol,fL=1,dL=2;function hL(e,t){return sL(e)&&lL(t)?cL(uL(e),t):function(r){var n=aL(r,e);return n===void 0&&n===t?oL(r,e):iL(t,n,fL|dL)}}var pL=hL;function mL(e){return e}var fo=mL;function gL(e){return function(t){return t==null?void 0:t[e]}}var yL=gL,vL=Xf;function bL(e){return function(t){return vL(t,e)}}var _L=bL,$L=yL,wL=_L,SL=Yf,CL=ol;function EL(e){return SL(e)?$L(CL(e)):wL(e)}var OL=EL,AL=U6,TL=pL,PL=fo,IL=sr,xL=OL;function DL(e){return typeof e=="function"?e:e==null?PL:typeof e=="object"?IL(e)?TL(e[0],e[1]):AL(e):xL(e)}var FL=DL;function NL(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),l=s.length;l--;){var u=s[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var ML=NL,kL=ML,LL=kL(),yb=LL,jL=yb,BL=uo;function UL(e,t){return e&&jL(e,t,BL)}var WL=UL,qL=ta;function VL(e,t){return function(r,n){if(r==null)return r;if(!qL(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var RL=VL,zL=WL,HL=RL,KL=HL(zL),vb=KL,GL=vb,YL=ta;function JL(e,t){var r=-1,n=YL(e)?Array(e.length):[];return GL(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var XL=JL;function ZL(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var QL=ZL,bb=al;function ej(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=bb(e),s=t!==void 0,l=t===null,u=t===t,f=bb(t);if(!l&&!f&&!a&&e>t||a&&s&&u&&!l&&!f||n&&s&&u||!r&&u||!i)return 1;if(!n&&!a&&!f&&e<t||f&&r&&i&&!n&&!a||l&&r&&i||!s&&i||!u)return-1}return 0}var tj=ej,rj=tj;function nj(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,l=r.length;++n<s;){var u=rj(i[n],a[n]);if(u){if(n>=l)return u;var f=r[n];return u*(f=="desc"?-1:1)}}return e.index-t.index}var ij=nj,Zf=vi,aj=Xf,oj=FL,sj=XL,lj=QL,cj=gi,uj=ij,fj=fo,dj=sr;function hj(e,t,r){t.length?t=Zf(t,function(a){return dj(a)?function(s){return aj(s,a.length===1?a[0]:a)}:a}):t=[fj];var n=-1;t=Zf(t,cj(oj));var i=sj(e,function(a,s,l){var u=Zf(t,function(f){return f(a)});return{criteria:u,index:++n,value:a}});return lj(i,function(a,s){return uj(a,s,r)})}var pj=hj;function mj(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var _b=mj,gj=_b,$b=Math.max;function yj(e,t,r){return t=$b(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=$b(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),gj(e,this,l)}}var vj=yj;function bj(e){return function(){return e}}var _j=bj,$j=_j,wb=cv,wj=fo,Sj=wb?function(e,t){return wb(e,"toString",{configurable:!0,enumerable:!1,value:$j(t),writable:!0})}:wj,Cj=Sj,Ej=800,Oj=16,Aj=Date.now;function Tj(e){var t=0,r=0;return function(){var n=Aj(),i=Oj-(n-r);if(r=n,i>0){if(++t>=Ej)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Pj=Tj,Ij=Cj,xj=Pj,Dj=xj(Ij),Fj=Dj,Nj=fo,Mj=vj,kj=Fj;function Lj(e,t){return kj(Mj(e,t,Nj),e+"")}var bi=Lj,jj=Yi,Bj=ta,Uj=Pf,Wj=Yr;function qj(e,t,r){if(!Wj(r))return!1;var n=typeof t;return(n=="number"?Bj(r)&&Uj(t,r.length):n=="string"&&t in r)?jj(r[t],e):!1}var Qf=qj,Vj=Gf,Rj=pj,zj=bi,Sb=Qf,Hj=zj(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Sb(e,t[0],t[1])?t=[]:r>2&&Sb(t[0],t[1],t[2])&&(t=[t[0]]),Rj(e,Vj(t,1),[])}),Cb=Hj;function Kj(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Gj=Kj;function Yj(e){return e!==e}var Jj=Yj;function Xj(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Zj=Xj,Qj=Gj,e5=Jj,t5=Zj;function r5(e,t,r){return t===t?t5(e,t,r):Qj(e,e5,r)}var Eb=r5,n5=Eb;function i5(e,t){var r=e==null?0:e.length;return!!r&&n5(e,t,0)>-1}var ed=i5;function a5(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var td=a5;function o5(){}var s5=o5,rd=Cv,l5=s5,c5=Rf,u5=1/0,f5=rd&&1/c5(new rd([,-0]))[1]==u5?function(e){return new rd(e)}:l5,d5=f5,h5=rl,p5=ed,m5=td,g5=nl,y5=d5,v5=Rf,b5=200;function _5(e,t,r){var n=-1,i=p5,a=e.length,s=!0,l=[],u=l;if(r)s=!1,i=m5;else if(a>=b5){var f=t?null:y5(e);if(f)return v5(f);s=!1,i=g5,u=new h5}else u=t?[]:l;e:for(;++n<a;){var d=e[n],p=t?t(d):d;if(d=r||d!==0?d:0,s&&p===p){for(var m=u.length;m--;)if(u[m]===p)continue e;t&&u.push(p),l.push(d)}else i(u,p,r)||(u!==l&&u.push(p),l.push(d))}return l}var Ob=_5,$5=Ob;function w5(e){return e&&e.length?$5(e):[]}var nd=w5,S5=Ob;function C5(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?S5(e,void 0,t):[]}var id=C5,E5=bi,O5=Yi,A5=Qf,T5=ra,Ab=Object.prototype,P5=Ab.hasOwnProperty,I5=E5(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&A5(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],s=T5(a),l=-1,u=s.length;++l<u;){var f=s[l],d=e[f];(d===void 0||O5(d,Ab[f])&&!P5.call(e,f))&&(e[f]=a[f])}return e}),x5=I5,D5=rl,F5=ed,N5=td,M5=vi,k5=gi,Tb=nl,L5=Math.min;function j5(e,t,r){for(var n=r?N5:F5,i=e[0].length,a=e.length,s=a,l=Array(a),u=1/0,f=[];s--;){var d=e[s];s&&t&&(d=M5(d,k5(t))),u=L5(d.length,u),l[s]=!r&&(t||i>=120&&d.length>=120)?new D5(s&&d):void 0}d=e[0];var p=-1,m=l[0];e:for(;++p<i&&f.length<u;){var y=d[p],_=t?t(y):y;if(y=r||y!==0?y:0,!(m?Tb(m,_):n(f,_,r))){for(s=a;--s;){var w=l[s];if(!(w?Tb(w,_):n(e[s],_,r)))continue e}m&&m.push(_),f.push(y)}}return f}var Pb=j5,B5=ta,U5=Jr;function W5(e){return U5(e)&&B5(e)}var ad=W5,q5=ad;function V5(e){return q5(e)?e:[]}var Ib=V5;function R5(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var z5=R5,H5=vi,K5=Pb,G5=bi,Y5=Ib,J5=z5,X5=G5(function(e){var t=J5(e),r=H5(e,Y5);return t=typeof t=="function"?t:void 0,t&&r.pop(),r.length&&r[0]===e[0]?K5(r,void 0,t):[]}),xb=X5,Z5=pi,Q5=Lf,eB=Jr,tB="[object Object]",rB=Function.prototype,nB=Object.prototype,Db=rB.toString,iB=nB.hasOwnProperty,aB=Db.call(Object);function oB(e){if(!eB(e)||Z5(e)!=tB)return!1;var t=Q5(e);if(t===null)return!0;var r=iB.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Db.call(r)==aB}var sl=oB,sB=pi,lB=Jr,cB="[object Boolean]";function uB(e){return e===!0||e===!1||lB(e)&&sB(e)==cB}var fB=uB,Mr=ab,dB=Cb,od=nd,Fb=id,hB=x5,pB=xb,ll=sl,sd=fB,Nb=e=>Array.isArray(e)?e:[e],vr=e=>e===void 0,cl=e=>ll(e)||Array.isArray(e)?Object.keys(e):[],ia=(e,t)=>e.hasOwnProperty(t),aa=e=>dB(od(e)),Mb=e=>vr(e)||Array.isArray(e)&&e.length===0,mB=(e,t,r,n)=>t&&ia(t,r)&&e&&ia(e,r)&&n(e[r],t[r]),ld=(e,t)=>vr(e)&&t===0||vr(t)&&e===0||Mr(e,t),gB=(e,t)=>vr(e)&&t===!1||vr(t)&&e===!1||Mr(e,t),kb=e=>vr(e)||Mr(e,{})||e===!0,ul=e=>vr(e)||Mr(e,{}),Lb=e=>vr(e)||ll(e)||e===!0||e===!1;function jb(e,t){return Mb(e)&&Mb(t)?!0:Mr(aa(e),aa(t))}function yB(e,t){return e=Nb(e),t=Nb(t),Mr(aa(e),aa(t))}function fl(e,t,r,n){var i=od(cl(e).concat(cl(t)));return ul(e)&&ul(t)?!0:ul(e)&&cl(t).length||ul(t)&&cl(e).length?!1:i.every(function(a){var s=e[a],l=t[a];return Array.isArray(s)&&Array.isArray(l)?Mr(aa(e),aa(t)):Array.isArray(s)&&!Array.isArray(l)||Array.isArray(l)&&!Array.isArray(s)?!1:mB(e,t,a,n)})}function vB(e,t,r,n){return ll(e)&&ll(t)?n(e,t):Array.isArray(e)&&Array.isArray(t)?fl(e,t,r,n):Mr(e,t)}function cd(e,t,r,n){var i=Fb(e,n),a=Fb(t,n),s=pB(i,a,n);return s.length===Math.max(i.length,a.length)}var bB={title:Mr,uniqueItems:gB,minLength:ld,minItems:ld,minProperties:ld,required:jb,enum:jb,type:yB,items:vB,anyOf:cd,allOf:cd,oneOf:cd,properties:fl,patternProperties:fl,dependencies:fl},_B=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],$B=["additionalProperties","additionalItems","contains","propertyNames","not"];function ud(e,t,r){if(r=hB(r,{ignore:[]}),kb(e)&&kb(t))return!0;if(!Lb(e)||!Lb(t))throw new Error("Either of the values are not a JSON schema.");if(e===t)return!0;if(sd(e)&&sd(t))return e===t;if(e===void 0&&t===!1||t===void 0&&e===!1||vr(e)&&!vr(t)||!vr(e)&&vr(t))return!1;var n=od(Object.keys(e).concat(Object.keys(t)));if(r.ignore.length&&(n=n.filter(a=>r.ignore.indexOf(a)===-1)),!n.length)return!0;function i(a,s){return ud(a,s,r)}return n.every(function(a){var s=e[a],l=t[a];if($B.indexOf(a)!==-1)return ud(s,l,r);var u=bB[a];if(u||(u=Mr),Mr(s,l))return!0;if(_B.indexOf(a)===-1&&(!ia(e,a)&&ia(t,a)||ia(e,a)&&!ia(t,a)))return s===l;var f=u(s,l,a,i);if(!sd(f))throw new Error("Comparer must return true or false");return f})}var fd=ud;function wB(e){return Object.prototype.toString.call(e)==="[object Array]"}var dd=Array.isArray||wB;function SB(e){return(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")&&e.valueOf()===e.valueOf()}var CB=SB,EB=CB;function OB(e){return EB(e)&&e%1===0}var AB=OB,TB=dd,PB=AB;function IB(e){var t;if(!TB(e)||(t=e.length,!t))return!1;for(var r=0;r<t;r++)if(!PB(e[r]))return!1;return!0}var Bb=IB;function xB(e){return typeof e=="function"}var Ub=xB,DB=dd,Wb=Bb,FB=Ub,dl=Math.pow(2,31)-1;function qb(e,t){var r=1,n;if(e===0)return t;if(t===0)return e;for(;e%2===0&&t%2===0;)e=e/2,t=t/2,r=r*2;for(;e%2===0;)e=e/2;for(;t;){for(;t%2===0;)t=t/2;e>t&&(n=t,t=e,e=n),t=t-e}return r*e}function Vb(e,t){var r=0,n;if(e===0)return t;if(t===0)return e;for(;!(e&1)&&!(t&1);)e>>>=1,t>>>=1,r++;for(;!(e&1);)e>>>=1;for(;t;){for(;!(t&1);)t>>>=1;e>t&&(n=t,t=e,e=n),t=t-e}return e<<r}function NB(){var e=arguments.length,t,r,n,i,a,s,l;for(t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];if(Wb(t)){if(e===2)return a=t[0],s=t[1],a<0&&(a=-a),s<0&&(s=-s),a<=dl&&s<=dl?Vb(a,s):qb(a,s);n=t}else if(DB(t[0]))if(e>1){if(n=t[0],r=t[1],!FB(r))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+r+"`.")}else n=t[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=n.length,i<2)return null;if(r){for(a=new Array(i),l=0;l<i;l++)a[l]=r(n[l],l);n=a}if(e<3&&!Wb(n))throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `"+n+"`.");for(l=0;l<i;l++)a=n[l],a<0&&(n[l]=-a);for(a=n[0],l=1;l<i;l++)s=n[l],s<=dl&&a<=dl?a=Vb(a,s):a=qb(a,s);return a}var MB=NB,Rb=MB,kB=dd,zb=Bb,LB=Ub;function jB(){var e=arguments.length,t,r,n,i,a,s,l;for(t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];if(zb(t)){if(e===2)return a=t[0],s=t[1],a<0&&(a=-a),s<0&&(s=-s),a===0||s===0?0:a/Rb(a,s)*s;n=t}else if(kB(t[0]))if(e>1){if(n=t[0],r=t[1],!LB(r))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+r+"`.")}else n=t[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=n.length,i<2)return null;if(r){for(a=new Array(i),l=0;l<i;l++)a[l]=r(n[l],l);n=a}if(e<3&&!zb(n))throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `"+n+"`.");for(l=0;l<i;l++)a=n[l],a<0&&(n[l]=-a);for(a=n[0],l=1;l<i;l++){if(s=n[l],a===0||s===0)return 0;a=a/Rb(a,s)*s}return a}var BB=jB,UB=Tf,WB=Yi;function qB(e,t,r){(r!==void 0&&!WB(e[t],r)||r===void 0&&!(t in e))&&UB(e,t,r)}var Hb=qB;function VB(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Kb=VB,RB=co,zB=ra;function HB(e){return RB(e,zB(e))}var KB=HB,Gb=Hb,GB=vv,YB=kv,JB=Nf,XB=jv,Yb=Gs,Jb=sr,ZB=ad,QB=Js,eU=Cf,tU=Yr,rU=sl,nU=Df,Xb=Kb,iU=KB;function aU(e,t,r,n,i,a,s){var l=Xb(e,r),u=Xb(t,r),f=s.get(u);if(f){Gb(e,r,f);return}var d=a?a(l,u,r+"",e,t,s):void 0,p=d===void 0;if(p){var m=Jb(u),y=!m&&QB(u),_=!m&&!y&&nU(u);d=u,m||y||_?Jb(l)?d=l:ZB(l)?d=JB(l):y?(p=!1,d=GB(u,!0)):_?(p=!1,d=YB(u,!0)):d=[]:rU(u)||Yb(u)?(d=l,Yb(l)?d=iU(l):(!tU(l)||eU(l))&&(d=XB(u))):p=!1}p&&(s.set(u,d),i(d,u,n,a,s),s.delete(u)),Gb(e,r,d)}var oU=aU,sU=Ks,lU=Hb,cU=yb,uU=oU,fU=Yr,dU=ra,hU=Kb;function Zb(e,t,r,n,i){e!==t&&cU(t,function(a,s){if(i||(i=new sU),fU(a))uU(e,t,s,r,Zb,n,i);else{var l=n?n(hU(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),lU(e,s,l)}},dU)}var Qb=Zb,pU=Qb,e0=Yr;function t0(e,t,r,n,i,a){return e0(e)&&e0(t)&&(a.set(t,e),pU(e,t,void 0,t0,a),a.delete(t)),e}var mU=t0,gU=bi,yU=Qf;function vU(e){return gU(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&yU(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,a)}return t})}var bU=vU,_U=Qb,$U=bU,wU=$U(function(e,t,r,n){_U(e,t,r,n)}),SU=wU,CU=_b,EU=bi,OU=mU,AU=SU,TU=EU(function(e){return e.push(void 0,OU),CU(AU,void 0,e)}),PU=TU,IU=Gf;function xU(e){var t=e==null?0:e.length;return t?IU(e,1):[]}var r0=xU,DU=Gf,FU=1/0;function NU(e){var t=e==null?0:e.length;return t?DU(e,FU):[]}var n0=NU,MU=vi,kU=Pb,LU=bi,jU=Ib,BU=LU(function(e){var t=MU(e,jU);return t.length&&t[0]===e[0]?kU(t):[]}),UU=BU;function WU(e,t,r,n){for(var i=r-1,a=e.length;++i<a;)if(n(e[i],t))return i;return-1}var qU=WU,VU=vi,RU=Eb,zU=qU,HU=gi,KU=Nf,GU=Array.prototype,i0=GU.splice;function YU(e,t,r,n){var i=n?zU:RU,a=-1,s=t.length,l=e;for(e===t&&(t=KU(t)),r&&(l=VU(e,HU(r)));++a<s;)for(var u=0,f=t[a],d=r?r(f):f;(u=i(l,d,u,n))>-1;)l!==e&&i0.call(l,u,1),i0.call(e,u,1);return e}var JU=YU,XU=JU;function ZU(e,t){return e&&e.length&&t&&t.length?XU(e,t):e}var QU=ZU,e9=fo;function t9(e){return typeof e=="function"?e:e9}var r9=t9,n9=lv,i9=vb,a9=r9,o9=sr;function s9(e,t){var r=o9(e)?n9:i9;return r(e,a9(t))}var a0=s9,l9=rl,c9=ed,u9=td,f9=vi,d9=gi,h9=nl,p9=200;function m9(e,t,r,n){var i=-1,a=c9,s=!0,l=e.length,u=[],f=t.length;if(!l)return u;r&&(t=f9(t,d9(r))),n?(a=u9,s=!1):t.length>=p9&&(a=h9,s=!1,t=new l9(t));e:for(;++i<l;){var d=e[i],p=r==null?d:r(d);if(d=n||d!==0?d:0,s&&p===p){for(var m=f;m--;)if(t[m]===p)continue e;u.push(d)}else a(t,p,n)||u.push(d)}return u}var g9=m9,y9=g9,v9=bi,b9=ad,_9=v9(function(e,t){return b9(e)?y9(e,t):[]}),$9=_9;const w9=r0,S9=n0,o0=sl,C9=nd,E9=id,O9=$9;function A9(e){for(const t in e)s0(e,t)&&D9(e[t])&&delete e[t];return e}const T9=e=>C9(S9(e.map(hd))),P9=(e,t)=>e.map(r=>r&&r[t]),s0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hd=e=>o0(e)||Array.isArray(e)?Object.keys(e):[],I9=e=>e!==void 0,x9=e=>o0(e)||e===!0||e===!1,D9=e=>!hd(e).length&&e!==!1&&e!==!0;var l0={allUniqueKeys:T9,deleteUndefinedProps:A9,getValues:P9,has:s0,isSchema:x9,keys:hd,notUndefined:I9,uniqWith:E9,withoutArr:(e,...t)=>O9.apply(null,[e].concat(w9(t)))};const F9=fd,N9=a0,{allUniqueKeys:M9,deleteUndefinedProps:k9,getValues:L9,keys:ho,notUndefined:j9,uniqWith:B9,withoutArr:c0}=l0;function U9(e){N9(e,function(t,r){t===!1&&delete e[r]})}function u0(e,t){return M9(e).reduce(function(n,i){const a=L9(e,i),s=B9(a.filter(j9),F9);return n[i]=t(s,i),n},{})}var W9={keywords:["properties","patternProperties","additionalProperties"],resolver(e,t,r,n){n.ignoreAdditionalProperties||(e.forEach(function(a){const s=e.filter(d=>d!==a),l=ho(a.properties),f=ho(a.patternProperties).map(d=>new RegExp(d));s.forEach(function(d){const p=ho(d.properties),m=p.filter(_=>f.some(w=>w.test(_)));c0(p,l,m).forEach(function(_){d.properties[_]=r.properties([d.properties[_],a.additionalProperties],_)})})}),e.forEach(function(a){const s=e.filter(u=>u!==a),l=ho(a.patternProperties);a.additionalProperties===!1&&s.forEach(function(u){const f=ho(u.patternProperties);c0(f,l).forEach(p=>delete u.patternProperties[p])})}));const i={additionalProperties:r.additionalProperties(e.map(a=>a.additionalProperties)),patternProperties:u0(e.map(a=>a.patternProperties),r.patternProperties),properties:u0(e.map(a=>a.properties),r.properties)};return i.additionalProperties===!1&&U9(i.properties),k9(i)}};const q9=fd,V9=a0,{allUniqueKeys:R9,deleteUndefinedProps:z9,has:H9,isSchema:f0,notUndefined:d0,uniqWith:K9}=l0;function G9(e){V9(e,function(t,r){t===!1&&e.splice(r,1)})}function Y9(e,t){return e.map(function(r){if(r)if(Array.isArray(r.items)){const n=r.items[t];if(f0(n))return n;if(H9(r,"additionalItems"))return r.additionalItems}else return r.items})}function J9(e){return e.map(function(t){if(t)return Array.isArray(t.items)?t.additionalItems:t.items})}function X9(e,t,r){return R9(r).reduce(function(i,a){const s=Y9(e,a),l=K9(s.filter(d0),q9);return i[a]=t(l,a),i},[])}var Z9={keywords:["items","additionalItems"],resolver(e,t,r){const n=e.map(l=>l.items),i=n.filter(d0),a={};i.every(f0)?a.items=r.items(n):a.items=X9(e,r.items,n);let s;return i.every(Array.isArray)?s=e.map(l=>l.additionalItems):i.some(Array.isArray)&&(s=J9(e)),s&&(a.additionalItems=r.additionalItems(s)),a.additionalItems===!1&&Array.isArray(a.items)&&G9(a.items),z9(a)}};const h0=x3,hl=fd,Q9=BB,eW=PU,p0=r0,pd=n0,tW=UU,rW=xb,md=ab,oa=sl,nW=QU,m0=Cb,gd=nd,sa=id,g0=W9,y0=Z9,pl=(e,t)=>e.indexOf(t)!==-1,iW=e=>oa(e)||e===!0||e===!1,aW=e=>e===!1,v0=e=>e===!0,ml=(e,t,r)=>r(e),b0=e=>m0(gd(pd(e))),gl=e=>e!==void 0,_0=e=>gd(pd(e.map(fW))),la=e=>e[0],oW=e=>b0(e),po=e=>Math.max.apply(Math,e),mo=e=>Math.min.apply(Math,e),sW=e=>e.some(v0),lW=e=>sa(p0(e),md);function cW(e){return function(t,r){return hl({[e]:t},{[e]:r})}}function $0(e){let{allOf:t=[],...r}=e;return r=oa(e)?r:e,[r,...t.map($0)]}function w0(e,t){return e.map(r=>r&&r[t])}function uW(e,t){return e.map(function(r,n){try{return t(r,n)}catch{return}}).filter(gl)}function fW(e){return oa(e)||Array.isArray(e)?Object.keys(e):[]}function yd(e,t){if(t=t||[],!e.length)return t;const r=e.slice(0).shift(),n=e.slice(1);return t.length?yd(n,p0(t.map(i=>r.map(a=>[a].concat(i))))):yd(n,r.map(i=>i))}function S0(e,t){let r;try{r=e.map(function(n){return JSON.stringify(n,null,2)}).join(`
2
2
  `)}catch{r=e.join(", ")}throw new Error('Could not resolve values for path:"'+t.join(".")+`". They are probably incompatible. Values:
3
- `+r)}function dW(e,t,r,n,i,a){if(e.length){const s=i.complexResolvers[t];if(!s||!s.resolver)throw new Error("No resolver found for "+t);const l=r.map(p=>e.reduce((m,y)=>(p[y]!==void 0&&(m[y]=p[y]),m),{})),u=sa(l,dl),f=s.keywords.reduce((p,m)=>({...p,[m]:(y,_=[])=>n(y,null,a.concat(m,_))}),{}),d=s.resolver(u,a.concat(t),f,i);return oa(d)||S0(u,a.concat(t)),d}}function hW(e){return{required:e}}const pW=["properties","patternProperties","definitions","dependencies"],mW=["anyOf","oneOf"],gW=["additionalProperties","additionalItems","contains","propertyNames","not","items"],ze={type(e){if(e.some(Array.isArray)){const t=e.map(function(n){return Array.isArray(n)?n:[n]}),r=tW.apply(null,t);if(r.length===1)return r[0];if(r.length>1)return md(r)}},dependencies(e,t,r){return _0(e).reduce(function(i,a){const s=w0(e,a);let l=sa(s.filter(ml),pd);const u=l.filter(Array.isArray);if(u.length){if(u.length===l.length)i[a]=b0(l);else{const f=l.filter(iW),d=u.map(hW);i[a]=r(f.concat(d),a)}return i}return l=sa(l,dl),i[a]=r(l,a),i},{})},oneOf(e,t,r){const n=gd(h0(e)),i=uW(n,r),a=sa(i,dl);if(a.length)return a},not(e){return{anyOf:e}},pattern(e){return e.map(t=>"(?="+t+")").join("")},multipleOf(e){let t=e.slice(0),r=1;for(;t.some(n=>!Number.isInteger(n));)t=t.map(n=>n*10),r=r*10;return Q9(t)/r},enum(e){const t=rW.apply(null,e.concat(pd));if(t.length)return m0(t)}};ze.$id=la,ze.$ref=la,ze.$schema=la,ze.additionalItems=pl,ze.additionalProperties=pl,ze.anyOf=ze.oneOf,ze.contains=pl,ze.default=la,ze.definitions=ze.dependencies,ze.description=la,ze.examples=lW,ze.exclusiveMaximum=mo,ze.exclusiveMinimum=po,ze.items=y0,ze.maximum=mo,ze.maxItems=mo,ze.maxLength=mo,ze.maxProperties=mo,ze.minimum=po,ze.minItems=po,ze.minLength=po,ze.minProperties=po,ze.properties=g0,ze.propertyNames=pl,ze.required=oW,ze.title=la,ze.uniqueItems=sW;const yW={properties:g0,items:y0};function yd(e,t,r){t=eW(t,{ignoreAdditionalProperties:!1,resolvers:ze,complexResolvers:yW,deep:!0});const n=Object.entries(t.complexResolvers);function i(l,u,f){l=h0(l.filter(ml)),f=f||[];const d=oa(u)?u:{};if(!l.length)return;if(l.some(aW))return!1;if(l.every(v0))return!0;l=l.filter(oa);const p=_0(l);if(t.deep&&hl(p,"allOf"))return yd({allOf:l},t);const m=n.map(([y,_])=>p.filter(w=>_.keywords.includes(w)));return m.forEach(y=>nW(p,y)),p.forEach(function(y){const _=w0(l,y),w=sa(_.filter(ml),cW(y));if(w.length===1&&hl(mW,y))d[y]=w[0].map(v=>i([v],v));else if(w.length===1&&!hl(pW,y)&&!hl(gW,y))d[y]=w[0];else{const v=t.resolvers[y]||t.resolvers.defaultResolver;if(!v)throw new Error("No resolver found for key "+y+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const g=(C,S=[])=>i(C,null,f.concat(y,S));d[y]=v(w,f.concat(y),g,t),d[y]===void 0?S0(w,f.concat(y)):d[y]===void 0&&delete d[y]}}),n.reduce((y,[_,w],v)=>({...y,...dW(m[v],_,l,i,t,f)}),d)}const a=hd($0(e));return i(a)}yd.options={resolvers:ze};var vW=yd;const C0=Qt(vW);var ca={},bW=/~/,_W=/~[01]/g;function $W(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function E0(e){return bW.test(e)?e.replace(_W,$W):e}function wW(e,t,r){for(var n,i,a=1,s=t.length;a<s;){if(t[a]==="constructor"||t[a]==="prototype"||t[a]==="__proto__")return e;if(n=E0(t[a++]),i=s>a,typeof e[n]>"u"&&(Array.isArray(e)&&n==="-"&&(n=e.length),i&&(t[a]!==""&&t[a]<1/0||t[a]==="-"?e[n]=[]:e[n]={})),!i)break;e=e[n]}var l=e[n];return r===void 0?delete e[n]:e[n]=r,l}function vd(e){if(typeof e=="string"){if(e=e.split("/"),e[0]==="")return e;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(e)){for(const t of e)if(typeof t!="string"&&typeof t!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function O0(e,t){if(typeof e!="object")throw new Error("Invalid input object.");t=vd(t);var r=t.length;if(r===1)return e;for(var n=1;n<r;){if(e=e[E0(t[n++])],r===n)return e;if(typeof e!="object"||e===null)return}}function A0(e,t,r){if(typeof e!="object")throw new Error("Invalid input object.");if(t=vd(t),t.length===0)throw new Error("Invalid JSON pointer for set.");return wW(e,t,r)}function SW(e){var t=vd(e);return{get:function(r){return O0(r,t)},set:function(r,n){return A0(r,t,n)}}}ca.get=O0,ca.set=A0,ca.compile=SW;function CW(e,t){return e&&Gi(t,Fr(t),e)}function EW(e,t){return e&&Gi(t,oo(t),e)}function OW(e,t){return Gi(e,tf(e),t)}var AW=Object.getOwnPropertySymbols,T0=AW?function(e){for(var t=[];e;)ef(t,tf(e)),e=Is(e);return t}:ey;function TW(e,t){return Gi(e,T0(e),t)}function bd(e){return Qg(e,oo,T0)}var PW=Object.prototype,IW=PW.hasOwnProperty;function xW(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&IW.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function DW(e,t){var r=t?bf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var FW=/\w*$/;function NW(e){var t=new e.constructor(e.source,FW.exec(e));return t.lastIndex=e.lastIndex,t}var P0=mr?mr.prototype:void 0,I0=P0?P0.valueOf:void 0;function MW(e){return I0?Object(I0.call(e)):{}}var kW="[object Boolean]",LW="[object Date]",jW="[object Map]",BW="[object Number]",UW="[object RegExp]",WW="[object Set]",qW="[object String]",VW="[object Symbol]",RW="[object ArrayBuffer]",zW="[object DataView]",HW="[object Float32Array]",KW="[object Float64Array]",GW="[object Int8Array]",YW="[object Int16Array]",JW="[object Int32Array]",XW="[object Uint8Array]",ZW="[object Uint8ClampedArray]",QW="[object Uint16Array]",eq="[object Uint32Array]";function tq(e,t,r){var n=e.constructor;switch(t){case RW:return bf(e);case kW:case LW:return new n(+e);case zW:return DW(e,r);case HW:case KW:case GW:case YW:case JW:case XW:case ZW:case QW:case eq:return Vy(e,r);case jW:return new n;case BW:case qW:return new n(e);case UW:return NW(e);case WW:return new n;case VW:return MW(e)}}var rq="[object Map]";function nq(e){return gr(e)&&yr(e)==rq}var x0=Ri&&Ri.isMap,iq=x0?nf(x0):nq,aq="[object Set]";function oq(e){return gr(e)&&yr(e)==aq}var D0=Ri&&Ri.isSet,sq=D0?nf(D0):oq,lq=1,cq=2,uq=4,F0="[object Arguments]",fq="[object Array]",dq="[object Boolean]",hq="[object Date]",pq="[object Error]",N0="[object Function]",mq="[object GeneratorFunction]",gq="[object Map]",yq="[object Number]",M0="[object Object]",vq="[object RegExp]",bq="[object Set]",_q="[object String]",$q="[object Symbol]",wq="[object WeakMap]",Sq="[object ArrayBuffer]",Cq="[object DataView]",Eq="[object Float32Array]",Oq="[object Float64Array]",Aq="[object Int8Array]",Tq="[object Int16Array]",Pq="[object Int32Array]",Iq="[object Uint8Array]",xq="[object Uint8ClampedArray]",Dq="[object Uint16Array]",Fq="[object Uint32Array]",nt={};nt[F0]=nt[fq]=nt[Sq]=nt[Cq]=nt[dq]=nt[hq]=nt[Eq]=nt[Oq]=nt[Aq]=nt[Tq]=nt[Pq]=nt[gq]=nt[yq]=nt[M0]=nt[vq]=nt[bq]=nt[_q]=nt[$q]=nt[Iq]=nt[xq]=nt[Dq]=nt[Fq]=!0,nt[pq]=nt[N0]=nt[wq]=!1;function go(e,t,r,n,i,a){var s,l=t&lq,u=t&cq,f=t&uq;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!Re(e))return e;var d=Et(e);if(d){if(s=xW(e),!l)return _f(e,s)}else{var p=yr(e),m=p==N0||p==mq;if(fi(e))return qy(e,l);if(p==M0||p==F0||m&&!i){if(s=u||m?{}:Ry(e),!l)return u?TW(e,EW(s,e)):OW(e,CW(s,e))}else{if(!nt[p])return i?e:{};s=tq(e,p,l)}}a||(a=new Dr);var y=a.get(e);if(y)return y;a.set(e,s),sq(e)?e.forEach(function(v){s.add(go(v,t,r,v,e,a))}):iq(e)&&e.forEach(function(v,g){s.set(g,go(v,t,r,g,e,a))});var _=f?u?bd:of:u?oo:Fr,w=d?void 0:_(e);return gf(w||e,function(v,g){w&&(g=v,v=e[g]),hf(s,g,go(v,t,r,g,e,a))}),s}function Nq(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Mq(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}function kq(e,t){return t.length<2?e:js(e,Mq(t,0,-1))}function k0(e,t){return t=Ki(t,e),e=kq(e,t),e==null||delete e[hi(Nq(t))]}function Lq(e){return Wn(e)?void 0:e}function _d(e){var t=e==null?0:e.length;return t?so(e,1):[]}function L0(e){return Gy(Ky(e,void 0,_d),e+"")}var jq=1,Bq=2,Uq=4,yo=L0(function(e,t){var r={};if(e==null)return r;var n=!1;t=Hi(t,function(a){return a=Ki(a,e),n||(n=a.length>1),a}),Gi(e,bd(e),r),n&&(r=go(r,jq|Bq|Uq,Lq));for(var i=t.length;i--;)k0(r,t[i]);return r}),Wq="[object Map]",qq="[object Set]",Vq=Object.prototype,Rq=Vq.hasOwnProperty;function Ut(e){if(e==null)return!0;if(di(e)&&(Et(e)||typeof e=="string"||typeof e.splice=="function"||fi(e)||ro(e)||Vi(e)))return!e.length;var t=yr(e);if(t==Wq||t==qq)return!e.size;if(ks(e))return!fy(e).length;for(var r in e)if(Rq.call(e,r))return!1;return!0}var gl={exports:{}},zq={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:Hq}=zq,Kq=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function j0(e){if(W0(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(Kq)||[],[r]=t;return r?{host:Yq(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function B0(e,t=!1){let r="",n=!0;for(const i of e){if(Hq[i]===void 0)return;i!=="0"&&n===!0&&(n=!1),n||(r+=i)}return t&&r.length===0&&(r="0"),r}function Gq(e){let t=0;const r={error:!1,address:"",zone:""},n=[],i=[];let a=!1,s=!1,l=!1;function u(){if(i.length){if(a===!1){const f=B0(i);if(f!==void 0)n.push(f);else return r.error=!0,!1}i.length=0}return!0}for(let f=0;f<e.length;f++){const d=e[f];if(!(d==="["||d==="]"))if(d===":"){if(s===!0&&(l=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}f-1>=0&&e[f-1]===":"&&(s=!0);continue}else if(d==="%"){if(!u())break;a=!0}else{i.push(d);continue}}return i.length&&(a?r.zone=i.join(""):l?n.push(i.join("")):n.push(B0(i))),r.address=n.join(""),r}function U0(e){if(W0(e,":")<2)return{host:e,isIPV6:!1};const t=Gq(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function Yq(e,t){let r="",n=!0;const i=e.length;for(let a=0;a<i;a++){const s=e[a];s==="0"&&n?(a+1<=i&&e[a+1]===t||a+1===i)&&(r+=s,n=!1):(s===t?n=!0:n=!1,r+=s)}return r}function W0(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const q0=/^\.\.?\//u,V0=/^\/\.(?:\/|$)/u,R0=/^\/\.\.(?:\/|$)/u,Jq=/^\/?(?:.|\n)*?(?=\/|$)/u;function Xq(e){const t=[];for(;e.length;)if(e.match(q0))e=e.replace(q0,"");else if(e.match(V0))e=e.replace(V0,"/");else if(e.match(R0))e=e.replace(R0,"/"),t.pop();else if(e==="."||e==="..")e="";else{const r=e.match(Jq);if(r){const n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function Zq(e,t){const r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function Qq(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);const n=j0(r);if(n.isIPV4)r=n.host;else{const i=U0(n.host);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var eV={recomposeAuthority:Qq,normalizeComponentEncoding:Zq,removeDotSegments:Xq,normalizeIPv4:j0,normalizeIPv6:U0};const tV=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,rV=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function z0(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function H0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function K0(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function nV(e){return e.secure=z0(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function iV(e){if((e.port===(z0(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function aV(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(rV);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const i=`${n}:${t.nid||e.nid}`,a=$d[i];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function oV(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,a=$d[i];a&&(e=a.serialize(e,t));const s=e,l=e.nss;return s.path=`${n||t.nid}:${l}`,t.skipEscape=!0,s}function sV(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!tV.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function lV(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const G0={scheme:"http",domainHost:!0,parse:H0,serialize:K0},cV={scheme:"https",domainHost:G0.domainHost,parse:H0,serialize:K0},yl={scheme:"ws",domainHost:!0,parse:nV,serialize:iV},uV={scheme:"wss",domainHost:yl.domainHost,parse:yl.parse,serialize:yl.serialize},$d={http:G0,https:cV,ws:yl,wss:uV,urn:{scheme:"urn",parse:aV,serialize:oV,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:sV,serialize:lV,skipNormalize:!0}};var fV=$d;const{normalizeIPv6:dV,normalizeIPv4:hV,removeDotSegments:vo,recomposeAuthority:pV,normalizeComponentEncoding:vl}=eV,wd=fV;function mV(e,t){return typeof e=="string"?e=Jr(mn(e,t),t):typeof e=="object"&&(e=mn(Jr(e,t),t)),e}function gV(e,t,r){const n=Object.assign({scheme:"null"},r),i=Y0(mn(e,n),mn(t,n),n,!0);return Jr(i,{...n,skipEscape:!0})}function Y0(e,t,r,n){const i={};return n||(e=mn(Jr(e,r),r),t=mn(Jr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=vo(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=vo(t.path||""),i.query=t.query):(t.path?(t.path.charAt(0)==="/"?i.path=vo(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=vo(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function yV(e,t,r){return typeof e=="string"?(e=unescape(e),e=Jr(vl(mn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Jr(vl(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Jr(vl(mn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Jr(vl(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Jr(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],a=wd[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");const s=pV(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path.charAt(0)!=="/"&&i.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!a||!a.absolutePath)&&(l=vo(l)),s===void 0&&(l=l.replace(/^\/\//u,"/%2F")),i.push(l)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}const vV=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function bV(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||vV[t])return!0;return!1}const _V=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function mn(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=e.indexOf("%")!==-1;let a=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const s=e.match(_V);if(s){if(n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]),n.host){const u=hV(n.host);if(u.isIPV4===!1){const f=dV(u.host);n.host=f.host.toLowerCase(),a=f.isIPV6}else n.host=u.host,a=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const l=wd[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&a===!1&&bV(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!l||l&&!l.skipNormalize)&&(i&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),i&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const Sd={SCHEMES:wd,normalize:mV,resolve:gV,resolveComponents:Y0,equal:yV,serialize:Jr,parse:mn};gl.exports=Sd,gl.exports.default=Sd,gl.exports.fastUri=Sd;var J0=gl.exports;const Cd=Qt(J0);function bl(e,t){if($t in e&&Cd.equal(e[$t],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const n of r)if(Re(n)){const i=bl(n,t);if(i!==void 0)return i}}else if(Re(r)){const n=bl(r,t);if(n!==void 0)return n}}function Ed(e,t){const r=de(e,$t,t);ot in e&&(e={...e,[ot]:Cd.resolve(r,e[ot])});for(const[n,i]of Object.entries(e))Array.isArray(i)?e={...e,[n]:i.map(a=>Re(a)?Ed(a,r):a)}:Re(i)&&(e={...e,[n]:Ed(i,r)});return e}function Od(e,t){const r=t[e];return[yo(t,[e]),r]}function X0(e,t={},r=[],n=de(t,[$t])){const i=e||"";let a;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));n===void 0||$t in t&&t[$t]===n?a=ca.get(t,l):t[Ga]===Ps&&(a=bl(t,n.replace(/\/$/,"")),a!==void 0&&(a=ca.get(a,l)))}else if(t[Ga]===Ps){const l=n?Cd.resolve(n,i):i,[u,...f]=l.replace(/#\/?$/,"").split("#");a=bl(t,u.replace(/\/$/,"")),a!==void 0&&(n=a[$t],Ut(f)||(a=ca.get(a,decodeURIComponent(f.join("#")))))}if(a===void 0)throw new Error(`Could not find a definition for ${e}.`);const s=a[ot];if(s){if(r.includes(s)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...p]=r,m=[...p,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${m}`)}const[l,u]=Od(ot,a),f=X0(u,t,[...r,i],n);return Object.keys(l).length>0?t[Ga]===SO||t[Ga]===Ps?{[Bn]:[l,f]}:{...l,...f}:f}return a}function Z0(e,t={},r=de(t,[$t])){return X0(e,t,[],r)}var $V="[object String]";function br(e){return typeof e=="string"||!Et(e)&&gr(e)&&dn(e)==$V}function Xr(e){let t;const r=de(e,_O);return br(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function bo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var wV=Ws(function(e){return Zy(so(e,1,ao,!0))});function gn(e){let{type:t}=e;return!t&&e.const?bo(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function yn(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((n,i)=>{const a=e?e[i]:{},s=t[i];return e&&i in e&&ke(s)?n[i]=yn(a,s):e&&t&&(gn(e)==="object"||gn(t)==="object")&&i===Wg&&Array.isArray(a)&&Array.isArray(s)?n[i]=wV(a,s):n[i]=s,n},r)}var SV="[object Number]";function Ad(e){return typeof e=="number"||gr(e)&&dn(e)==SV}function Q0(e,t,r){var n;if(e&&r){const i=de(e,r);if(i===void 0)return;for(let a=0;a<t.length;a++){const s=t[a],l=de(s,[Ve,r],{});if(!(l.type==="object"||l.type==="array")&&(l.const===i||!((n=l.enum)===null||n===void 0)&&n.includes(i)))return a}}}function Td(e,t,r,n,i){if(t===void 0)return 0;const a=Q0(t,r,i);if(Ad(a))return a;for(let s=0;s<r.length;s++){const l=r[s];if(i&&We(l,[Ve,i])){const u=de(t,i),f=de(l,[Ve,i],{});if(e.isValid(f,u,n))return s}else if(l[Ve]){const u={anyOf:Object.keys(l[Ve]).map(d=>({required:[d]}))};let f;if(l.anyOf){const{...d}=l;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(u),f=d}else f=Object.assign({},l,u);if(delete f.required,e.isValid(f,t,n))return s}else if(e.isValid(l,t,n))return s}return 0}function Mt(e,t,r={},n,i){return Zr(e,t,r,n,void 0,void 0,i)[0]}function CV(e,t,r,n,i,a,s){const{if:l,then:u,else:f,...d}=t,p=e.isValid(l,a||{},r);let m=[d],y=[];if(n)u&&typeof u!="boolean"&&(y=y.concat(Zr(e,u,r,a,n,i,s))),f&&typeof f!="boolean"&&(y=y.concat(Zr(e,f,r,a,n,i,s)));else{const _=p?u:f;_&&typeof _!="boolean"&&(y=y.concat(Zr(e,_,r,a,n,i,s)))}return y.length&&(m=y.map(_=>yn(d,_))),m.flatMap(_=>Zr(e,_,r,a,n,i,s))}function e_(e){return e.reduce((r,n)=>n.length>1?n.flatMap(i=>Iy(r.length,a=>[...r[a]].concat(i))):(r.forEach(i=>i.push(n[0])),r),[[]])}function t_(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,n)=>(Qe(r,[n],e.patternProperties[n]),r),{})}function EV(e,t,r,n,i,a,s){const l=r_(e,t,r,n,i,a);if(l.length>1||l[0]!==t)return l;if(Os in t)return n_(e,t,r,n,i,a).flatMap(f=>Zr(e,f,r,a,n,i,s));if(Bn in t&&Array.isArray(t.allOf)){const u=t.allOf.map(d=>Zr(e,d,r,a,n,i,s));return e_(u).map(d=>({...t,allOf:d}))}return[t]}function r_(e,t,r,n,i,a,s){const l=_o(t,r,i);return l!==t?Zr(e,l,r,a,n,i,s):[t]}function _o(e,t,r,n){if(!ke(e))return e;let i=e;if(ot in i){const{$ref:a,...s}=i;if(r.includes(a))return i;r.push(a),i={...Z0(a,t,n),...s},$t in i&&(n=i[$t])}if(Ve in i){const a=[],s=WP(i[Ve],(l,u,f)=>{const d=[...r];l[f]=_o(u,t,d,n),a.push(d)},{});i2(r,p2(s2(a))),i={...i,[Ve]:s}}return Un in i&&!Array.isArray(i.items)&&typeof i.items!="boolean"&&(i={...i,items:_o(i.items,t,r,n)}),ht(e,i)?e:i}function OV(e,t,r,n,i){const a={...t,properties:{...t.properties}},s=n&&ke(n)?n:{};return Object.keys(s).forEach(l=>{if(!(l in a.properties)){if(Hu in a){const u=t_(a,l);if(!Ut(u)){a.properties[l]=Mt(e,{[Bn]:Object.values(u)},r,de(s,[l]),i),Qe(a.properties,[l,jn],!0);return}}if(Cs in a&&a.additionalProperties!==!1){let u={};typeof a.additionalProperties!="boolean"?ot in a.additionalProperties?u=Mt(e,{[ot]:de(a.additionalProperties,[ot])},r,s,i):"type"in a.additionalProperties?u={...a.additionalProperties}:gt in a.additionalProperties||Ze in a.additionalProperties?u={type:"object",...a.additionalProperties}:u={type:bo(de(s,[l]))}:u={type:bo(de(s,[l]))},a.properties[l]=u,Qe(a.properties,[l,jn],!0)}else a.properties[l]={type:"null"},Qe(a.properties,[l,jn],!0)}}),a}function Zr(e,t,r,n,i=!1,a=[],s){return ke(t)?EV(e,t,r,i,a,n,s).flatMap(u=>{var f;let d=u;if(vO in d)return CV(e,d,r,i,a,n,s);if(Bn in d){if(i){const{allOf:m,...y}=d;return[...m,y]}try{const m=[],y=[];(f=d.allOf)===null||f===void 0||f.forEach(_=>{typeof _=="object"&&_.contains?m.push(_):y.push(_)}),m.length&&(d={...d,allOf:y}),d=s?s(d):C0(d,{deep:!1,resolvers:{$defs:C0.options.resolvers.definitions}}),m.length&&(d.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
4
- `,m);const{allOf:y,..._}=d;return _}}return Ve in d&&Hu in d&&(d=Object.keys(d.properties).reduce((m,y)=>{const _=t_(m,y);return Ut(_)||(m.properties[y]=Mt(e,{allOf:[m.properties[y],...Object.values(_)]},r,de(n,[y]),s)),m},{...d,properties:{...d.properties}})),Hu in d||Cs in d&&d.additionalProperties!==!1?OV(e,d,r,n,s):d}):[{}]}function AV(e,t,r,n,i){let a;const{oneOf:s,anyOf:l,...u}=t;if(Array.isArray(s)?a=s:Array.isArray(l)&&(a=l),a){const f=i===void 0&&n?{}:i,d=Xr(t);a=a.map(m=>_o(m,r,[]));const p=Td(e,f,a,r,d);if(n)return a.map(m=>yn(u,m));t=yn(u,a[p])}return[t]}function n_(e,t,r,n,i,a,s){const{dependencies:l,...u}=t;return AV(e,u,r,n,a).flatMap(d=>i_(e,l,d,r,n,i,a,s))}function i_(e,t,r,n,i,a,s,l){let u=[r];for(const f in t){if(!i&&de(s,[f])===void 0||r.properties&&!(f in r.properties))continue;const[d,p]=Od(f,t);return Array.isArray(p)?u[0]=TV(r,p):ke(p)&&(u=PV(e,r,n,f,p,i,a,s,l)),u.flatMap(m=>i_(e,d,m,n,i,a,s,l))}return u}function TV(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function PV(e,t,r,n,i,a,s,l,u){return Zr(e,i,r,l,a,s,u).flatMap(d=>{const{oneOf:p,...m}=d;if(t=yn(t,m),p===void 0)return t;const y=p.map(w=>typeof w=="boolean"||!(ot in w)?[w]:r_(e,w,r,a,s,l));return e_(y).flatMap(w=>IV(e,t,r,n,w,a,s,l,u))})}function IV(e,t,r,n,i,a,s,l,u){const f=i.filter(d=>{if(typeof d=="boolean"||!d||!d.properties)return!1;const{[n]:p}=d.properties;if(p){const m={type:"object",properties:{[n]:p}};return e.isValid(m,l,r)||a}return!1});return!a&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(d=>{const p=d,[m]=Od(n,p.properties),y={...p,properties:m};return Zr(e,y,r,l,a,s,u).map(w=>yn(t,w))})}function $o(e,t,r,n,i,a={},s){if(Array.isArray(r[i])){const u=Xr(r)||n,f=r[i].map(p=>Mt(e,p,t,a,s)),d=de(a,u);if(d!==void 0)return f.find(p=>Oy(de(p,[Ve,u,Es],de(p,[Ve,u,pr])),d))}}function a_(e,t,r,n,i){let a=r;if(We(r,ot)&&(a=Mt(e,r,t,void 0,i)),Ut(n))return a;const s=Array.isArray(n)?n:n.split("."),[l,...u]=s;if(l&&We(a,l))return a=de(a,l),a_(e,t,a,u,i)}function _l(e,t,r,n,i,a){const s=a_(e,t,r,n,a);return s===void 0?i:s}const o_={title:"!@#$_UNKNOWN_$#@!"};function xV(e,t,r,n,i={},a){const s=Array.isArray(n)?[...n]:n.split(".");let l=r;const u=s.pop();s.length&&s.forEach(m=>{l=_l(e,t,l,[Ve,m],{},a),We(l,Ze)?l=$o(e,t,l,u,Ze,de(i,m),a):We(l,gt)&&(l=$o(e,t,l,u,gt,de(i,m),a))}),We(l,Ze)?l=$o(e,t,l,u,Ze,i,a):We(l,gt)&&(l=$o(e,t,l,u,gt,i,a));let f=_l(e,t,l,[Ve,u],o_,a);f===o_&&(f=void 0);const d=_l(e,t,l,Wg,[],a);let p;return f&&Array.isArray(d)&&(p=d.includes(u)),{field:f,isRequired:p}}function DV(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}function FV(e,t){return function(r,n){if(r==null)return r;if(!di(r))return e(r,n);for(var i=r.length,a=-1,s=Object(r);++a<i&&n(s[a],a,s)!==!1;);return r}}var s_=FV(Ny);function NV(e,t,r,n,i){return i(e,function(a,s,l){r=n?(n=!1,a):t(r,a,s,l)}),r}function MV(e,t,r){var n=Et(e)?DV:NV,i=arguments.length<3;return n(e,yf(t),r,i,s_)}const kV={type:"object",$id:bO,properties:{__not_really_there__:{type:"number"}}};function Pd(e,t,r,n,i){let a=0;return r&&(Re(r.properties)?a+=MV(r.properties,(s,l,u)=>{const f=de(n,u);if(typeof l=="boolean")return s;if(We(l,ot)){const d=Mt(e,l,t,f,i);return s+Pd(e,t,d,f||{},i)}if((We(l,Ze)||We(l,gt))&&f){const d=We(l,Ze)?Ze:gt,p=Xr(l);return s+wo(e,t,f,de(l,d),-1,p,i)}if(l.type==="object")return Re(f)&&(s+=1),s+Pd(e,t,l,f,i);if(l.type===bo(f)){let d=s+1;return l.default?d+=f===l.default?1:-1:l.const&&(d+=f===l.const?1:-1),d}return s},0):br(r.type)&&r.type===bo(n)&&(a+=1)),a}function wo(e,t,r,n,i=-1,a,s){const l=n.map(m=>_o(m,t,[])),u=Q0(r,n,a);if(Ad(u))return u;const f=l.reduce((m,y,_)=>(Td(e,r,[kV,y],t,a)===1&&m.push(_),m),[]);if(f.length===1)return f[0];f.length||Iy(l.length,m=>f.push(m));const d=new Set,{bestIndex:p}=f.reduce((m,y)=>{const{bestScore:_}=m,w=l[y],v=Pd(e,t,w,r,s);return d.add(v),v>_?{bestIndex:y,bestScore:v}:m},{bestIndex:i,bestScore:0});return d.size===1&&i>=0?i:p}function Id(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>ke(t))}function So(e){return e==null}function Co(e,t,r=!1,n=!1,i=!1){if(Array.isArray(t)){const a=Array.isArray(e)?e:[],s=i?a:t,l=i?t:a,u=s.map((f,d)=>l[d]!==void 0?Co(a[d],t[d],r,n,i):f);return(r||i)&&u.length<l.length&&u.push(...l.slice(u.length)),u}if(ke(t)){const a=Object.assign({},e);return Object.keys(t).reduce((s,l)=>{var u;const f=de(t,l),d=ke(e)&&l in e,p=l in t,m=(u=de(e,l))!==null&&u!==void 0?u:{},y=d&&Object.entries(m).some(([,v])=>ke(v)),_=d&&ke(de(e,l)),w=p&&ke(f);return _&&w&&!y?(s[l]={...de(e,l),...f},s):(s[l]=Co(de(e,l),f,r,n,i&&(d||!p)),s)},a)}return n&&(!So(e)&&So(t)||typeof t=="number"&&isNaN(t))||i&&!So(t)?e:t}function vn(e,t,r=!1){return Object.keys(t).reduce((n,i)=>{const a=e?e[i]:{},s=t[i];if(e&&i in e&&ke(s))n[i]=vn(a,s,r);else if(r&&Array.isArray(a)&&Array.isArray(s)){let l=s;r==="preventDuplicates"&&(l=s.reduce((u,f)=>(a.includes(f)||u.push(f),u),[])),n[i]=a.concat(l)}else n[i]=s;return n},Object.assign({},e))}function l_(e){return Array.isArray(e.enum)&&e.enum.length===1||pr in e}function xd(e,t,r={},n){const i=Mt(e,t,r,void 0,n),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(s=>typeof s!="boolean"&&l_(s)):!1}function Dd(e,t,r,n){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:xd(e,t.items,r,n)}function c_(e){const t=e[pr],r=gn(e);return ke(t)&&br(t==null?void 0:t.$data)&&r!=="object"&&r!=="array"}function LV(e){if(yO in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(pr in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function ua(e,t){if(e.enum){let a;if(t){const{enumNames:s}=we(t);a=s}return e.enum.map((s,l)=>({label:(a==null?void 0:a[l])||String(s),value:s}))}let r,n;e.anyOf?(r=e.anyOf,n=t==null?void 0:t.anyOf):e.oneOf&&(r=e.oneOf,n=t==null?void 0:t.oneOf);let i=Xr(e);if(t){const{optionsSchemaSelector:a=i}=we(t);i=a}return r&&r.map((a,s)=>{const{title:l}=we(n==null?void 0:n[s]),u=a;let f,d=l;if(i){const p=de(u,[Ve,i],{});f=de(p,Es,de(p,pr)),d=d||(p==null?void 0:p.title)||u.title||String(f)}else f=LV(u),d=d||u.title||String(f);return{schema:u,label:d,value:f}})}const jV=["string","number","integer","boolean","null"];var fa;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(fa||(fa={}));function Fd(e,t=fa.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const n=e.items[r];if(typeof n!="boolean")return n}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==fa.Ignore&&ke(e.additionalItems)?e.additionalItems:{}}function u_(e,t,r,n,i,a=[],s={},l=!1){const{emptyObjectFields:u="populateAllDefaults"}=s;if(n===!0||l)e[t]=r;else if(n==="excludeObjectChildren")(!ke(r)||!Ut(r))&&(e[t]=r);else if(u!=="skipDefaults"){const f=i===void 0?a.includes(t):i;ke(r)?u==="skipEmptyDefaults"?Ut(r)||(e[t]=r):(!Ut(r)||a.includes(t))&&(f||u!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||f&&a.includes(t))&&(e[t]=r)}}function qn(e,t,r={}){const{parentDefaults:n,rawFormData:i,rootSchema:a={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:p=!1}=r;let m=ke(i)?i:{};const y=ke(t)?t:{};let _=n,w=null,v=u,g=l;if(y[pr]!==void 0&&(u==null?void 0:u.constAsDefaults)!=="never"&&!c_(y))_=y[pr];else if(ke(_)&&ke(y.default))_=vn(_,y.default);else if(Es in y&&!y[gt]&&!y[Ze]&&!y[ot])_=y.default;else if(ot in y){const E=y[ot];l.includes(E)||(g=l.concat(E),w=Z0(E,a)),w&&!_&&(_=y.default),p&&w&&!ke(i)&&(m=i)}else if(Os in y){const E={...f_(e,y,r,_),...m};w=n_(e,y,a,!1,[],E,f)[0]}else if(Id(y))_=y.items.map((E,A)=>qn(e,E,{rootSchema:a,includeUndefinedValues:s,_recurseList:l,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(n)?n[A]:void 0,rawFormData:m,required:d,shouldMergeDefaultsIntoFormData:p}));else if(Ze in y){const{oneOf:E,...A}=y;if(E.length===0)return;const x=Xr(y),{type:N="null"}=A;!Array.isArray(N)&&jV.includes(N)&&(v==null?void 0:v.constAsDefaults)==="skipOneOf"&&(v={...v,constAsDefaults:"never"}),w=E[wo(e,a,i??y.default,E,0,x,f)],w=yn(A,w)}else if(gt in y){const{anyOf:E,...A}=y;if(E.length===0)return;const x=Xr(y);w=E[wo(e,a,i??y.default,E,0,x,f)],w=yn(A,w)}if(w)return qn(e,w,{rootSchema:a,includeUndefinedValues:s,_recurseList:g,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:f,parentDefaults:_,rawFormData:i??m,required:d,shouldMergeDefaultsIntoFormData:p});_===void 0&&(_=y.default);const C=f_(e,y,r,_);let S=C??_;if(p){const{arrayMinItems:E={}}=u||{},{mergeExtraDefaults:A}=E,x=BV(e,y,a,i,u,f);(!ke(i)||Bn in y)&&(S=Co(S,x,A,!0))}return S}function BV(e,t,r,n,i,a){const s=!l_(t)&&xd(e,t,r,a);let l=n;if(s){const f=ua(t);l=(f==null?void 0:f.some(p=>ht(p.value,n)))?n:void 0}return t[pr]&&(i==null?void 0:i.constAsDefaults)==="always"&&(l=t.const),l}function UV(e,t,{rawFormData:r,rootSchema:n={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:f}={},d){{const p=ke(r)?r:{},m=t,y=(s==null?void 0:s.allOf)==="populateDefaults"&&Bn in m?Mt(e,m,n,p,l):m,_=y[pr],w=Object.keys(y.properties||{}).reduce((v,g)=>{var C;const S=de(y,[Ve,g],{}),E=ke(_)&&_[g]!==void 0,A=(ke(S)&&pr in S||E)&&(s==null?void 0:s.constAsDefaults)!=="never"&&!c_(S),x=qn(e,S,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:de(d,[g]),rawFormData:de(p,[g]),required:(C=y.required)===null||C===void 0?void 0:C.includes(g),shouldMergeDefaultsIntoFormData:f});return u_(v,g,x,i,u,y.required,s,A),v},{});if(y.additionalProperties){const v=ke(y.additionalProperties)?y.additionalProperties:{},g=new Set;ke(d)&&Object.keys(d).filter(S=>!y.properties||!y.properties[S]).forEach(S=>g.add(S));const C=[];Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{g.add(S),C.push(S)}),g.forEach(S=>{var E;const A=qn(e,v,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:de(d,[S]),rawFormData:de(p,[S]),required:(E=y.required)===null||E===void 0?void 0:E.includes(S),shouldMergeDefaultsIntoFormData:f});u_(w,S,A,i,u,C)})}return w}}function WV(e,t,{rawFormData:r,rootSchema:n={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:s=void 0,required:l,shouldMergeDefaultsIntoFormData:u}={},f){var d,p;const m=t,y=(d=a==null?void 0:a.arrayMinItems)!==null&&d!==void 0?d:{},{populate:_,mergeExtraDefaults:w}=y,v=_==="never",g=_==="requiredOnly",C=_==="all"||!v&&!g,S=(p=y==null?void 0:y.computeSkipPopulate)!==null&&p!==void 0?p:()=>!1,A=(a==null?void 0:a.emptyObjectFields)==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((te,ae)=>{const Q=Fd(m,fa.Fallback,ae);return qn(e,Q,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,parentDefaults:te,required:l,shouldMergeDefaultsIntoFormData:u})})),Array.isArray(r)){const te=Fd(m);if(v)f=r;else{const ae=r.map((k,W)=>qn(e,te,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,rawFormData:k,parentDefaults:de(f,[W]),required:l,shouldMergeDefaultsIntoFormData:u}));f=Co(f,ae,(g&&l||C)&&w)}}if((ke(m)&&pr in m&&(a==null?void 0:a.constAsDefaults)!=="never")===!1){if(v)return f??A;if(g&&!l)return f||void 0}const N=Array.isArray(f)?f.length:0;if(!m.minItems||Dd(e,m,n,s)||S(e,m,n)||m.minItems<=N)return f||A;const Z=f||[],G=Fd(m,fa.Invert),H=G.default,ee=new Array(m.minItems-N).fill(qn(e,G,{parentDefaults:H,rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,required:l,shouldMergeDefaultsIntoFormData:u}));return Z.concat(ee)}function f_(e,t,r={},n){switch(gn(t)){case"object":return UV(e,t,r,n);case"array":return WV(e,t,r,n)}}function d_(e,t,r,n,i=!1,a,s){if(!ke(t))throw new Error("Invalid schema: "+t);const l=Mt(e,t,n,r,s),u=qn(e,l,{rootSchema:n,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,rawFormData:r,shouldMergeDefaultsIntoFormData:!0});if(l.type!=="object"&&ke(l.default))return{...u,...r};if(ke(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:f}=a||{};return Co(u,r,!0,f==="useDefaultIfFormDataUndefined",!0)}return u}function h_(e={}){return"widget"in we(e)&&we(e).widget!=="hidden"}function p_(e,t,r={},n,i){if(r[Yu]==="files")return!0;if(t.items){const a=Mt(e,t.items,n,void 0,i);return a.type==="string"&&a.format==="data-url"}return!1}function qV(e,t,r={},n,i,a){const s=we(r,i),{label:l=!0}=s;let u=!!l;const f=gn(t);return f==="array"&&(u=Dd(e,t,n,a)||p_(e,t,r,n,a)||h_(r)),f==="object"&&(u=!1),f==="boolean"&&!r[Yu]&&(u=!1),r[wO]&&(u=!1),u}const da=Symbol("no Value");function Nd(e,t,r,n,i={},a){let s;if(We(r,Ve)){const l={};if(We(n,Ve)){const d=de(n,Ve,{});Object.keys(d).forEach(p=>{We(i,p)&&(l[p]=void 0)})}const u=Object.keys(de(r,Ve,{})),f={};u.forEach(d=>{const p=de(i,d);let m=de(n,[Ve,d],{}),y=de(r,[Ve,d],{});We(m,ot)&&(m=Mt(e,m,t,p,a)),We(y,ot)&&(y=Mt(e,y,t,p,a));const _=de(m,"type"),w=de(y,"type");if(!_||_===w)if(We(l,d)&&delete l[d],w==="object"||w==="array"&&Array.isArray(p)){const v=Nd(e,t,y,m,p,a);(v!==void 0||w==="array")&&(f[d]=v)}else{const v=de(y,"default",da),g=de(m,"default",da);v!==da&&v!==p&&(g===p?l[d]=v:de(y,"readOnly")===!0&&(l[d]=void 0));const C=de(y,"const",da),S=de(m,"const",da);C!==da&&C!==p&&(l[d]=S===p?C:void 0)}}),s={...typeof i=="string"||Array.isArray(i)?void 0:i,...l,...f}}else if(de(n,"type")==="array"&&de(r,"type")==="array"&&Array.isArray(i)){let l=de(n,"items"),u=de(r,"items");if(typeof l=="object"&&typeof u=="object"&&!Array.isArray(l)&&!Array.isArray(u)){We(l,ot)&&(l=Mt(e,l,t,i,a)),We(u,ot)&&(u=Mt(e,u,t,i,a));const f=de(l,"type"),d=de(u,"type");if(!f||f===d){const p=de(r,"maxItems",-1);d==="object"?s=i.reduce((m,y)=>{const _=Nd(e,t,u,l,y,a);return _!==void 0&&(p<0||m.length<p)&&m.push(_),m},[]):s=p>0&&i.length>p?i.slice(0,p):i}}else typeof l=="boolean"&&typeof u=="boolean"&&l===u&&(s=i)}return s}function $l(e,t,r,n,i,a,s,l=[],u){const d={$id:i||r};if(typeof t=="object"){if(ot in t||Os in t||Bn in t){const p=Mt(e,t,a,s,u);if(l.findIndex(y=>ht(y,p))===-1)return $l(e,p,r,n,i,a,s,l.concat(p),u)}if(Un in t&&!de(t,[Un,ot]))return $l(e,de(t,Un),r,n,i,a,s,l,u);if(gn(t)==="object"&&Ve in t)for(const p in t.properties){const m=t[Ve][p],y=d[$t]+n+p;d[p]=$l(e,m,r,n,y,a,de(s,[p]),l,u)}}return d}function VV(e,t,r,n,i,a="root",s="_",l){return $l(e,t,a,s,r,n,i,void 0,l)}function _i(e,t,r,n,i,a=[],s){if(ot in t||Os in t||Bn in t){const u=Mt(e,t,n,i,s);if(a.findIndex(d=>ht(d,u))===-1)return _i(e,u,r,n,i,a.concat(u),s)}let l={[As]:r.replace(/^\./,"")};if(Ze in t||gt in t){const u=Ze in t?t.oneOf:t.anyOf,f=Xr(t),d=wo(e,n,i,u,0,f,s),p=u[d];l={...l,..._i(e,p,r,n,i,a,s)}}if(Cs in t&&t[Cs]!==!1&&Qe(l,Gu,!0),Un in t&&Array.isArray(i)){const{items:u,additionalItems:f}=t;Array.isArray(u)?i.forEach((d,p)=>{u[p]?l[p]=_i(e,u[p],`${r}.${p}`,n,d,a,s):f?l[p]=_i(e,f,`${r}.${p}`,n,d,a,s):console.warn(`Unable to generate path schema for "${r}.${p}". No schema defined for it`)}):i.forEach((d,p)=>{l[p]=_i(e,u,`${r}.${p}`,n,d,a,s)})}else if(Ve in t)for(const u in t.properties){const f=de(t,[Ve,u],{});l[u]=_i(e,f,`${r}.${u}`,n,de(i,[u]),a,s)}return l}function RV(e,t,r="",n,i,a){return _i(e,t,r,n,i,void 0,a)}class zV{constructor(t,r,n,i){r[Ga]===Ps?this.rootSchema=Ed(r,de(r,$t,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,n={},i){return!t||!r?!1:this.validator!==t||!ht(this.rootSchema,r)||!ht(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,r,n){return xV(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,n,i){return $o(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,n=!1){return d_(this.validator,t,r,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(t,r,n){return qV(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,n,i){return wo(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,n){return Td(this.validator,t,r,this.rootSchema,n)}getFromSchema(t,r,n){return _l(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}isFilesArray(t,r){return p_(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return Dd(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return xd(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,r){return Mt(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(t,r,n){return Nd(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}toIdSchema(t,r,n,i="root",a="_"){return VV(this.validator,t,r,this.rootSchema,n,i,a,this.experimental_customMergeAllOf)}toPathSchema(t,r,n){return RV(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}}function HV(e,t,r={},n){return new zV(e,t,r,n)}function KV(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const n=e.slice(5).split(";base64,");if(n.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,a]=n,[s,...l]=i.split(";"),u=s||"",f=decodeURI(((t=l.map(d=>d.split("=")).find(([d])=>d==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const d=atob(a),p=new Array(d.length);for(let y=0;y<d.length;y++)p[y]=d.charCodeAt(y);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:f}}catch(d){throw new Error("File is invalid: "+d.message)}}function Vn(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function Md(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return Md(t,e).reverse();const r=[];for(let n=e;n<=t;n++)r.push({value:n,label:Vn(n,2)});return r}function m_(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const a=r[i];if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1}return!0}function GV(e,t){let r=e;if(Array.isArray(t)){const n=r.split(/(%\d)/);t.forEach((i,a)=>{const s=n.findIndex(l=>l===`%${a+1}`);s>=0&&(n[s]=i)}),r=n.join("")}return r}function YV(e,t){return GV(e,t)}function Ot(e,t=[],r){if(Array.isArray(e))return e.map(a=>Ot(a,t)).filter(a=>a!==r);const n=e===""||e===null?-1:Number(e),i=t[n];return i?i.value:r}function JV(e,t,r=[]){const n=Ot(e,r);return Array.isArray(t)?t.filter(i=>!ht(i,n)):ht(n,t)?void 0:t}function kd(e,t){return Array.isArray(t)?t.some(r=>ht(r,e)):ht(t,e)}function wl(e,t=[],r=!1){const n=t.map((i,a)=>kd(i.value,e)?String(a):void 0).filter(i=>typeof i<"u");return r?n:n[0]}function XV(e,t,r=[]){const n=Ot(e,r);if(!So(n)){const i=r.findIndex(l=>n===l.value),a=r.map(({value:l})=>l);return t.slice(0,i).concat(n,t.slice(i)).sort((l,u)=>+(a.indexOf(l)>a.indexOf(u)))}return t}var ZV=1,QV=4;function Sl(e){return go(e,ZV|QV)}function eR(e,t,r,n){return n=typeof n=="function"?n:void 0,e==null?e:pf(e,t,r,n)}class tR{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let n=Array.isArray(t)&&t.length>0||typeof t=="string"?de(this.errorSchema,t):this.errorSchema;return!n&&t&&(n={},eR(this.errorSchema,t,n,Object)),n}resetAllErrors(t){return this.errorSchema=t?Sl(t):{},this}addErrors(t,r){const n=this.getOrCreateErrorBlock(r);let i=de(n,Ht);return Array.isArray(i)||(i=[],n[Ht]=i),Array.isArray(t)?Qe(n,Ht,[...new Set([...i,...t])]):Qe(n,Ht,[...new Set([...i,t])]),this}setErrors(t,r){const n=this.getOrCreateErrorBlock(r),i=Array.isArray(t)?[...new Set([...t])]:[t];return Qe(n,Ht,i),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Qe(r,Ht,[]),this}}function g_(e,t,r=[1900,new Date().getFullYear()+2],n="YMD"){const{day:i,month:a,year:s,hour:l,minute:u,second:f}=e,d={type:"day",range:[1,31],value:i},p={type:"month",range:[1,12],value:a},m={type:"year",range:r,value:s},y=[];switch(n){case"MDY":y.push(p,d,m);break;case"DMY":y.push(d,p,m);break;case"YMD":default:y.push(m,p,d)}return t&&y.push({type:"hour",range:[0,23],value:l},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:f}),y}function y_(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function v_(e,t,r={},n=!0){const i={type:t||"text",...y_(e)};return r.inputType?i.type=r.inputType:t||(e.type==="number"?(i.type="number",n&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),r.autocomplete&&(i.autoComplete=r.autocomplete),r.accept&&(i.accept=r.accept),i}const b_={props:{disabled:!1},submitText:"Submit",norender:!1};function Ld(e={}){const t=we(e);if(t&&t[Ts]){const r=t[Ts];return{...b_,...r}}return b_}function Se(e,t,r={}){const{templates:n}=t;if(e==="ButtonTemplates")return n[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(n,r[e])){const i=r[e];return n[i]}return r[e]||n[e]}const rR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let __=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=rR[r[e]&63];return t};function $_(){if(typeof process>"u"||de(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,__()),e.get(r)}})}var jd={exports:{}},Ke={};/**
3
+ `+r)}function dW(e,t,r,n,i,a){if(e.length){const s=i.complexResolvers[t];if(!s||!s.resolver)throw new Error("No resolver found for "+t);const l=r.map(p=>e.reduce((m,y)=>(p[y]!==void 0&&(m[y]=p[y]),m),{})),u=sa(l,hl),f=s.keywords.reduce((p,m)=>({...p,[m]:(y,_=[])=>n(y,null,a.concat(m,_))}),{}),d=s.resolver(u,a.concat(t),f,i);return oa(d)||S0(u,a.concat(t)),d}}function hW(e){return{required:e}}const pW=["properties","patternProperties","definitions","dependencies"],mW=["anyOf","oneOf"],gW=["additionalProperties","additionalItems","contains","propertyNames","not","items"],ze={type(e){if(e.some(Array.isArray)){const t=e.map(function(n){return Array.isArray(n)?n:[n]}),r=tW.apply(null,t);if(r.length===1)return r[0];if(r.length>1)return gd(r)}},dependencies(e,t,r){return _0(e).reduce(function(i,a){const s=w0(e,a);let l=sa(s.filter(gl),md);const u=l.filter(Array.isArray);if(u.length){if(u.length===l.length)i[a]=b0(l);else{const f=l.filter(iW),d=u.map(hW);i[a]=r(f.concat(d),a)}return i}return l=sa(l,hl),i[a]=r(l,a),i},{})},oneOf(e,t,r){const n=yd(h0(e)),i=uW(n,r),a=sa(i,hl);if(a.length)return a},not(e){return{anyOf:e}},pattern(e){return e.map(t=>"(?="+t+")").join("")},multipleOf(e){let t=e.slice(0),r=1;for(;t.some(n=>!Number.isInteger(n));)t=t.map(n=>n*10),r=r*10;return Q9(t)/r},enum(e){const t=rW.apply(null,e.concat(md));if(t.length)return m0(t)}};ze.$id=la,ze.$ref=la,ze.$schema=la,ze.additionalItems=ml,ze.additionalProperties=ml,ze.anyOf=ze.oneOf,ze.contains=ml,ze.default=la,ze.definitions=ze.dependencies,ze.description=la,ze.examples=lW,ze.exclusiveMaximum=mo,ze.exclusiveMinimum=po,ze.items=y0,ze.maximum=mo,ze.maxItems=mo,ze.maxLength=mo,ze.maxProperties=mo,ze.minimum=po,ze.minItems=po,ze.minLength=po,ze.minProperties=po,ze.properties=g0,ze.propertyNames=ml,ze.required=oW,ze.title=la,ze.uniqueItems=sW;const yW={properties:g0,items:y0};function vd(e,t,r){t=eW(t,{ignoreAdditionalProperties:!1,resolvers:ze,complexResolvers:yW,deep:!0});const n=Object.entries(t.complexResolvers);function i(l,u,f){l=h0(l.filter(gl)),f=f||[];const d=oa(u)?u:{};if(!l.length)return;if(l.some(aW))return!1;if(l.every(v0))return!0;l=l.filter(oa);const p=_0(l);if(t.deep&&pl(p,"allOf"))return vd({allOf:l},t);const m=n.map(([y,_])=>p.filter(w=>_.keywords.includes(w)));return m.forEach(y=>nW(p,y)),p.forEach(function(y){const _=w0(l,y),w=sa(_.filter(gl),cW(y));if(w.length===1&&pl(mW,y))d[y]=w[0].map(v=>i([v],v));else if(w.length===1&&!pl(pW,y)&&!pl(gW,y))d[y]=w[0];else{const v=t.resolvers[y]||t.resolvers.defaultResolver;if(!v)throw new Error("No resolver found for key "+y+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const g=(C,S=[])=>i(C,null,f.concat(y,S));d[y]=v(w,f.concat(y),g,t),d[y]===void 0?S0(w,f.concat(y)):d[y]===void 0&&delete d[y]}}),n.reduce((y,[_,w],v)=>({...y,...dW(m[v],_,l,i,t,f)}),d)}const a=pd($0(e));return i(a)}vd.options={resolvers:ze};var vW=vd;const C0=Qt(vW);var ca={},bW=/~/,_W=/~[01]/g;function $W(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function E0(e){return bW.test(e)?e.replace(_W,$W):e}function wW(e,t,r){for(var n,i,a=1,s=t.length;a<s;){if(t[a]==="constructor"||t[a]==="prototype"||t[a]==="__proto__")return e;if(n=E0(t[a++]),i=s>a,typeof e[n]>"u"&&(Array.isArray(e)&&n==="-"&&(n=e.length),i&&(t[a]!==""&&t[a]<1/0||t[a]==="-"?e[n]=[]:e[n]={})),!i)break;e=e[n]}var l=e[n];return r===void 0?delete e[n]:e[n]=r,l}function bd(e){if(typeof e=="string"){if(e=e.split("/"),e[0]==="")return e;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(e)){for(const t of e)if(typeof t!="string"&&typeof t!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function O0(e,t){if(typeof e!="object")throw new Error("Invalid input object.");t=bd(t);var r=t.length;if(r===1)return e;for(var n=1;n<r;){if(e=e[E0(t[n++])],r===n)return e;if(typeof e!="object"||e===null)return}}function A0(e,t,r){if(typeof e!="object")throw new Error("Invalid input object.");if(t=bd(t),t.length===0)throw new Error("Invalid JSON pointer for set.");return wW(e,t,r)}function SW(e){var t=bd(e);return{get:function(r){return O0(r,t)},set:function(r,n){return A0(r,t,n)}}}ca.get=O0,ca.set=A0,ca.compile=SW;function CW(e,t){return e&&Gi(t,Fr(t),e)}function EW(e,t){return e&&Gi(t,oo(t),e)}function OW(e,t){return Gi(e,tf(e),t)}var AW=Object.getOwnPropertySymbols,T0=AW?function(e){for(var t=[];e;)ef(t,tf(e)),e=xs(e);return t}:ty;function TW(e,t){return Gi(e,T0(e),t)}function _d(e){return ey(e,oo,T0)}var PW=Object.prototype,IW=PW.hasOwnProperty;function xW(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&IW.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function DW(e,t){var r=t?_f(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var FW=/\w*$/;function NW(e){var t=new e.constructor(e.source,FW.exec(e));return t.lastIndex=e.lastIndex,t}var P0=mr?mr.prototype:void 0,I0=P0?P0.valueOf:void 0;function MW(e){return I0?Object(I0.call(e)):{}}var kW="[object Boolean]",LW="[object Date]",jW="[object Map]",BW="[object Number]",UW="[object RegExp]",WW="[object Set]",qW="[object String]",VW="[object Symbol]",RW="[object ArrayBuffer]",zW="[object DataView]",HW="[object Float32Array]",KW="[object Float64Array]",GW="[object Int8Array]",YW="[object Int16Array]",JW="[object Int32Array]",XW="[object Uint8Array]",ZW="[object Uint8ClampedArray]",QW="[object Uint16Array]",eq="[object Uint32Array]";function tq(e,t,r){var n=e.constructor;switch(t){case RW:return _f(e);case kW:case LW:return new n(+e);case zW:return DW(e,r);case HW:case KW:case GW:case YW:case JW:case XW:case ZW:case QW:case eq:return Vy(e,r);case jW:return new n;case BW:case qW:return new n(e);case UW:return NW(e);case WW:return new n;case VW:return MW(e)}}var rq="[object Map]";function nq(e){return gr(e)&&yr(e)==rq}var x0=Ri&&Ri.isMap,iq=x0?nf(x0):nq,aq="[object Set]";function oq(e){return gr(e)&&yr(e)==aq}var D0=Ri&&Ri.isSet,sq=D0?nf(D0):oq,lq=1,cq=2,uq=4,F0="[object Arguments]",fq="[object Array]",dq="[object Boolean]",hq="[object Date]",pq="[object Error]",N0="[object Function]",mq="[object GeneratorFunction]",gq="[object Map]",yq="[object Number]",M0="[object Object]",vq="[object RegExp]",bq="[object Set]",_q="[object String]",$q="[object Symbol]",wq="[object WeakMap]",Sq="[object ArrayBuffer]",Cq="[object DataView]",Eq="[object Float32Array]",Oq="[object Float64Array]",Aq="[object Int8Array]",Tq="[object Int16Array]",Pq="[object Int32Array]",Iq="[object Uint8Array]",xq="[object Uint8ClampedArray]",Dq="[object Uint16Array]",Fq="[object Uint32Array]",nt={};nt[F0]=nt[fq]=nt[Sq]=nt[Cq]=nt[dq]=nt[hq]=nt[Eq]=nt[Oq]=nt[Aq]=nt[Tq]=nt[Pq]=nt[gq]=nt[yq]=nt[M0]=nt[vq]=nt[bq]=nt[_q]=nt[$q]=nt[Iq]=nt[xq]=nt[Dq]=nt[Fq]=!0,nt[pq]=nt[N0]=nt[wq]=!1;function go(e,t,r,n,i,a){var s,l=t&lq,u=t&cq,f=t&uq;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!Re(e))return e;var d=Ot(e);if(d){if(s=xW(e),!l)return $f(e,s)}else{var p=yr(e),m=p==N0||p==mq;if(fi(e))return qy(e,l);if(p==M0||p==F0||m&&!i){if(s=u||m?{}:Ry(e),!l)return u?TW(e,EW(s,e)):OW(e,CW(s,e))}else{if(!nt[p])return i?e:{};s=tq(e,p,l)}}a||(a=new Dr);var y=a.get(e);if(y)return y;a.set(e,s),sq(e)?e.forEach(function(v){s.add(go(v,t,r,v,e,a))}):iq(e)&&e.forEach(function(v,g){s.set(g,go(v,t,r,g,e,a))});var _=f?u?_d:of:u?oo:Fr,w=d?void 0:_(e);return yf(w||e,function(v,g){w&&(g=v,v=e[g]),pf(s,g,go(v,t,r,g,e,a))}),s}function k0(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Nq(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}function Mq(e,t){return t.length<2?e:Bs(e,Nq(t,0,-1))}function L0(e,t){return t=Ki(t,e),e=Mq(e,t),e==null||delete e[hi(k0(t))]}function kq(e){return Wn(e)?void 0:e}function $d(e){var t=e==null?0:e.length;return t?so(e,1):[]}function j0(e){return Gy(Ky(e,void 0,$d),e+"")}var Lq=1,jq=2,Bq=4,yo=j0(function(e,t){var r={};if(e==null)return r;var n=!1;t=Hi(t,function(a){return a=Ki(a,e),n||(n=a.length>1),a}),Gi(e,_d(e),r),n&&(r=go(r,Lq|jq|Bq,kq));for(var i=t.length;i--;)L0(r,t[i]);return r}),Uq="[object Map]",Wq="[object Set]",qq=Object.prototype,Vq=qq.hasOwnProperty;function Ut(e){if(e==null)return!0;if(di(e)&&(Ot(e)||typeof e=="string"||typeof e.splice=="function"||fi(e)||ro(e)||Vi(e)))return!e.length;var t=yr(e);if(t==Uq||t==Wq)return!e.size;if(Ls(e))return!dy(e).length;for(var r in e)if(Vq.call(e,r))return!1;return!0}var yl={exports:{}},Rq={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:zq}=Rq,Hq=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function B0(e){if(q0(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(Hq)||[],[r]=t;return r?{host:Gq(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function U0(e,t=!1){let r="",n=!0;for(const i of e){if(zq[i]===void 0)return;i!=="0"&&n===!0&&(n=!1),n||(r+=i)}return t&&r.length===0&&(r="0"),r}function Kq(e){let t=0;const r={error:!1,address:"",zone:""},n=[],i=[];let a=!1,s=!1,l=!1;function u(){if(i.length){if(a===!1){const f=U0(i);if(f!==void 0)n.push(f);else return r.error=!0,!1}i.length=0}return!0}for(let f=0;f<e.length;f++){const d=e[f];if(!(d==="["||d==="]"))if(d===":"){if(s===!0&&(l=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}f-1>=0&&e[f-1]===":"&&(s=!0);continue}else if(d==="%"){if(!u())break;a=!0}else{i.push(d);continue}}return i.length&&(a?r.zone=i.join(""):l?n.push(i.join("")):n.push(U0(i))),r.address=n.join(""),r}function W0(e){if(q0(e,":")<2)return{host:e,isIPV6:!1};const t=Kq(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function Gq(e,t){let r="",n=!0;const i=e.length;for(let a=0;a<i;a++){const s=e[a];s==="0"&&n?(a+1<=i&&e[a+1]===t||a+1===i)&&(r+=s,n=!1):(s===t?n=!0:n=!1,r+=s)}return r}function q0(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const V0=/^\.\.?\//u,R0=/^\/\.(?:\/|$)/u,z0=/^\/\.\.(?:\/|$)/u,Yq=/^\/?(?:.|\n)*?(?=\/|$)/u;function Jq(e){const t=[];for(;e.length;)if(e.match(V0))e=e.replace(V0,"");else if(e.match(R0))e=e.replace(R0,"/");else if(e.match(z0))e=e.replace(z0,"/"),t.pop();else if(e==="."||e==="..")e="";else{const r=e.match(Yq);if(r){const n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function Xq(e,t){const r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function Zq(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);const n=B0(r);if(n.isIPV4)r=n.host;else{const i=W0(n.host);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var Qq={recomposeAuthority:Zq,normalizeComponentEncoding:Xq,removeDotSegments:Jq,normalizeIPv4:B0,normalizeIPv6:W0};const eV=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,tV=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function H0(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function K0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function G0(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function rV(e){return e.secure=H0(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function nV(e){if((e.port===(H0(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function iV(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(tV);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const i=`${n}:${t.nid||e.nid}`,a=wd[i];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function aV(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,a=wd[i];a&&(e=a.serialize(e,t));const s=e,l=e.nss;return s.path=`${n||t.nid}:${l}`,t.skipEscape=!0,s}function oV(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!eV.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function sV(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Y0={scheme:"http",domainHost:!0,parse:K0,serialize:G0},lV={scheme:"https",domainHost:Y0.domainHost,parse:K0,serialize:G0},vl={scheme:"ws",domainHost:!0,parse:rV,serialize:nV},cV={scheme:"wss",domainHost:vl.domainHost,parse:vl.parse,serialize:vl.serialize},wd={http:Y0,https:lV,ws:vl,wss:cV,urn:{scheme:"urn",parse:iV,serialize:aV,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:oV,serialize:sV,skipNormalize:!0}};var uV=wd;const{normalizeIPv6:fV,normalizeIPv4:dV,removeDotSegments:vo,recomposeAuthority:hV,normalizeComponentEncoding:bl}=Qq,Sd=uV;function pV(e,t){return typeof e=="string"?e=Xr(gn(e,t),t):typeof e=="object"&&(e=gn(Xr(e,t),t)),e}function mV(e,t,r){const n=Object.assign({scheme:"null"},r),i=J0(gn(e,n),gn(t,n),n,!0);return Xr(i,{...n,skipEscape:!0})}function J0(e,t,r,n){const i={};return n||(e=gn(Xr(e,r),r),t=gn(Xr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=vo(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=vo(t.path||""),i.query=t.query):(t.path?(t.path.charAt(0)==="/"?i.path=vo(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=vo(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function gV(e,t,r){return typeof e=="string"?(e=unescape(e),e=Xr(bl(gn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Xr(bl(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Xr(bl(gn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Xr(bl(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Xr(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],a=Sd[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");const s=hV(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path.charAt(0)!=="/"&&i.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!a||!a.absolutePath)&&(l=vo(l)),s===void 0&&(l=l.replace(/^\/\//u,"/%2F")),i.push(l)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}const yV=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function vV(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||yV[t])return!0;return!1}const bV=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function gn(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=e.indexOf("%")!==-1;let a=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const s=e.match(bV);if(s){if(n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]),n.host){const u=dV(n.host);if(u.isIPV4===!1){const f=fV(u.host);n.host=f.host.toLowerCase(),a=f.isIPV6}else n.host=u.host,a=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const l=Sd[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&a===!1&&vV(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!l||l&&!l.skipNormalize)&&(i&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),i&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const Cd={SCHEMES:Sd,normalize:pV,resolve:mV,resolveComponents:J0,equal:gV,serialize:Xr,parse:gn};yl.exports=Cd,yl.exports.default=Cd,yl.exports.fastUri=Cd;var X0=yl.exports;const Ed=Qt(X0);function _l(e,t){if(vt in e&&Ed.equal(e[vt],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const n of r)if(Re(n)){const i=_l(n,t);if(i!==void 0)return i}}else if(Re(r)){const n=_l(r,t);if(n!==void 0)return n}}function Od(e,t){const r=de(e,vt,t);ot in e&&(e={...e,[ot]:Ed.resolve(r,e[ot])});for(const[n,i]of Object.entries(e))Array.isArray(i)?e={...e,[n]:i.map(a=>Re(a)?Od(a,r):a)}:Re(i)&&(e={...e,[n]:Od(i,r)});return e}function Ad(e,t){const r=t[e];return[yo(t,[e]),r]}function Z0(e,t={},r=[],n=de(t,[vt])){const i=e||"";let a;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));n===void 0||vt in t&&t[vt]===n?a=ca.get(t,l):t[Ga]===Is&&(a=_l(t,n.replace(/\/$/,"")),a!==void 0&&(a=ca.get(a,l)))}else if(t[Ga]===Is){const l=n?Ed.resolve(n,i):i,[u,...f]=l.replace(/#\/?$/,"").split("#");a=_l(t,u.replace(/\/$/,"")),a!==void 0&&(n=a[vt],Ut(f)||(a=ca.get(a,decodeURIComponent(f.join("#")))))}if(a===void 0)throw new Error(`Could not find a definition for ${e}.`);const s=a[ot];if(s){if(r.includes(s)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...p]=r,m=[...p,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${m}`)}const[l,u]=Ad(ot,a),f=Z0(u,t,[...r,i],n);return Object.keys(l).length>0?t[Ga]===SO||t[Ga]===Is?{[Un]:[l,f]}:{...l,...f}:f}return a}function Q0(e,t={},r=de(t,[vt])){return Z0(e,t,[],r)}var _V="[object String]";function br(e){return typeof e=="string"||!Ot(e)&&gr(e)&&hn(e)==_V}function Zr(e){let t;const r=de(e,_O);return br(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function bo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var $V=qs(function(e){return Zy(so(e,1,ao,!0))});function yn(e){let{type:t}=e;return!t&&e.const?bo(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function vn(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((n,i)=>{const a=e?e[i]:{},s=t[i];return e&&i in e&&ke(s)?n[i]=vn(a,s):e&&t&&(yn(e)==="object"||yn(t)==="object")&&i===qg&&Array.isArray(a)&&Array.isArray(s)?n[i]=$V(a,s):n[i]=s,n},r)}var wV="[object Number]";function Td(e){return typeof e=="number"||gr(e)&&hn(e)==wV}function e_(e,t,r){var n;if(e&&r){const i=de(e,r);if(i===void 0)return;for(let a=0;a<t.length;a++){const s=t[a],l=de(s,[Ve,r],{});if(!(l.type==="object"||l.type==="array")&&(l.const===i||!((n=l.enum)===null||n===void 0)&&n.includes(i)))return a}}}function Pd(e,t,r,n,i){if(t===void 0)return 0;const a=e_(t,r,i);if(Td(a))return a;for(let s=0;s<r.length;s++){const l=r[s];if(i&&Be(l,[Ve,i])){const u=de(t,i),f=de(l,[Ve,i],{});if(e.isValid(f,u,n))return s}else if(l[Ve]){const u={anyOf:Object.keys(l[Ve]).map(d=>({required:[d]}))};let f;if(l.anyOf){const{...d}=l;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(u),f=d}else f=Object.assign({},l,u);if(delete f.required,e.isValid(f,t,n))return s}else if(e.isValid(l,t,n))return s}return 0}function Mt(e,t,r={},n,i){return Qr(e,t,r,n,void 0,void 0,i)[0]}function SV(e,t,r,n,i,a,s){const{if:l,then:u,else:f,...d}=t,p=e.isValid(l,a||{},r);let m=[d],y=[];if(n)u&&typeof u!="boolean"&&(y=y.concat(Qr(e,u,r,a,n,i,s))),f&&typeof f!="boolean"&&(y=y.concat(Qr(e,f,r,a,n,i,s)));else{const _=p?u:f;_&&typeof _!="boolean"&&(y=y.concat(Qr(e,_,r,a,n,i,s)))}return y.length&&(m=y.map(_=>vn(d,_))),m.flatMap(_=>Qr(e,_,r,a,n,i,s))}function t_(e){return e.reduce((r,n)=>n.length>1?n.flatMap(i=>Iy(r.length,a=>[...r[a]].concat(i))):(r.forEach(i=>i.push(n[0])),r),[[]])}function r_(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,n)=>(Xe(r,[n],e.patternProperties[n]),r),{})}function CV(e,t,r,n,i,a,s){const l=n_(e,t,r,n,i,a);if(l.length>1||l[0]!==t)return l;if(As in t)return i_(e,t,r,n,i,a).flatMap(f=>Qr(e,f,r,a,n,i,s));if(Un in t&&Array.isArray(t.allOf)){const u=t.allOf.map(d=>Qr(e,d,r,a,n,i,s));return t_(u).map(d=>({...t,allOf:d}))}return[t]}function n_(e,t,r,n,i,a,s){const l=_o(t,r,i);return l!==t?Qr(e,l,r,a,n,i,s):[t]}function _o(e,t,r,n){if(!ke(e))return e;let i=e;if(ot in i){const{$ref:a,...s}=i;if(r.includes(a))return i;r.push(a),i={...Q0(a,t,n),...s},vt in i&&(n=i[vt])}if(Ve in i){const a=[],s=WP(i[Ve],(l,u,f)=>{const d=[...r];l[f]=_o(u,t,d,n),a.push(d)},{});i2(r,p2(s2(a))),i={...i,[Ve]:s}}return zr in i&&!Array.isArray(i.items)&&typeof i.items!="boolean"&&(i={...i,items:_o(i.items,t,r,n)}),pt(e,i)?e:i}function EV(e,t,r,n,i){const a={...t,properties:{...t.properties}},s=n&&ke(n)?n:{};return Object.keys(s).forEach(l=>{if(!(l in a.properties)){if(Hu in a){const u=r_(a,l);if(!Ut(u)){a.properties[l]=Mt(e,{[Un]:Object.values(u)},r,de(s,[l]),i),Xe(a.properties,[l,Bn],!0);return}}if(Es in a&&a.additionalProperties!==!1){let u={};typeof a.additionalProperties!="boolean"?ot in a.additionalProperties?u=Mt(e,{[ot]:de(a.additionalProperties,[ot])},r,s,i):"type"in a.additionalProperties?u={...a.additionalProperties}:yt in a.additionalProperties||Qe in a.additionalProperties?u={type:"object",...a.additionalProperties}:u={type:bo(de(s,[l]))}:u={type:bo(de(s,[l]))},a.properties[l]=u,Xe(a.properties,[l,Bn],!0)}else a.properties[l]={type:"null"},Xe(a.properties,[l,Bn],!0)}}),a}function Qr(e,t,r,n,i=!1,a=[],s){return ke(t)?CV(e,t,r,i,a,n,s).flatMap(u=>{var f;let d=u;if(vO in d)return SV(e,d,r,i,a,n,s);if(Un in d){if(i){const{allOf:m,...y}=d;return[...m,y]}try{const m=[],y=[];(f=d.allOf)===null||f===void 0||f.forEach(_=>{typeof _=="object"&&_.contains?m.push(_):y.push(_)}),m.length&&(d={...d,allOf:y}),d=s?s(d):C0(d,{deep:!1,resolvers:{$defs:C0.options.resolvers.definitions}}),m.length&&(d.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
4
+ `,m);const{allOf:y,..._}=d;return _}}return Ve in d&&Hu in d&&(d=Object.keys(d.properties).reduce((m,y)=>{const _=r_(m,y);return Ut(_)||(m.properties[y]=Mt(e,{allOf:[m.properties[y],...Object.values(_)]},r,de(n,[y]),s)),m},{...d,properties:{...d.properties}})),Hu in d||Es in d&&d.additionalProperties!==!1?EV(e,d,r,n,s):d}):[{}]}function OV(e,t,r,n,i){let a;const{oneOf:s,anyOf:l,...u}=t;if(Array.isArray(s)?a=s:Array.isArray(l)&&(a=l),a){const f=i===void 0&&n?{}:i,d=Zr(t);a=a.map(m=>_o(m,r,[]));const p=Pd(e,f,a,r,d);if(n)return a.map(m=>vn(u,m));t=vn(u,a[p])}return[t]}function i_(e,t,r,n,i,a,s){const{dependencies:l,...u}=t;return OV(e,u,r,n,a).flatMap(d=>a_(e,l,d,r,n,i,a,s))}function a_(e,t,r,n,i,a,s,l){let u=[r];for(const f in t){if(!i&&de(s,[f])===void 0||r.properties&&!(f in r.properties))continue;const[d,p]=Ad(f,t);return Array.isArray(p)?u[0]=AV(r,p):ke(p)&&(u=TV(e,r,n,f,p,i,a,s,l)),u.flatMap(m=>a_(e,d,m,n,i,a,s,l))}return u}function AV(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function TV(e,t,r,n,i,a,s,l,u){return Qr(e,i,r,l,a,s,u).flatMap(d=>{const{oneOf:p,...m}=d;if(t=vn(t,m),p===void 0)return t;const y=p.map(w=>typeof w=="boolean"||!(ot in w)?[w]:n_(e,w,r,a,s,l));return t_(y).flatMap(w=>PV(e,t,r,n,w,a,s,l,u))})}function PV(e,t,r,n,i,a,s,l,u){const f=i.filter(d=>{if(typeof d=="boolean"||!d||!d.properties)return!1;const{[n]:p}=d.properties;if(p){const m={type:"object",properties:{[n]:p}};return e.isValid(m,l,r)||a}return!1});return!a&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(d=>{const p=d,[m]=Ad(n,p.properties),y={...p,properties:m};return Qr(e,y,r,l,a,s,u).map(w=>vn(t,w))})}function $o(e,t,r,n,i,a={},s){if(Array.isArray(r[i])){const u=Zr(r)||n,f=r[i].map(p=>Mt(e,p,t,a,s)),d=de(a,u);if(d!==void 0)return f.find(p=>Oy(de(p,[Ve,u,Os],de(p,[Ve,u,pr])),d))}}function o_(e,t,r,n,i){let a=r;if(Be(r,ot)&&(a=Mt(e,r,t,void 0,i)),Ut(n))return a;const s=Array.isArray(n)?n:n.split("."),[l,...u]=s;if(l&&Be(a,l))return a=de(a,l),o_(e,t,a,u,i)}function $l(e,t,r,n,i,a){const s=o_(e,t,r,n,a);return s===void 0?i:s}const s_={title:"!@#$_UNKNOWN_$#@!"};function IV(e,t,r,n,i={},a){const s=Array.isArray(n)?[...n]:n.split(".");let l=r;const u=s.pop();s.length&&s.forEach(m=>{l=$l(e,t,l,[Ve,m],{},a),Be(l,Qe)?l=$o(e,t,l,u,Qe,de(i,m),a):Be(l,yt)&&(l=$o(e,t,l,u,yt,de(i,m),a))}),Be(l,Qe)?l=$o(e,t,l,u,Qe,i,a):Be(l,yt)&&(l=$o(e,t,l,u,yt,i,a));let f=$l(e,t,l,[Ve,u],s_,a);f===s_&&(f=void 0);const d=$l(e,t,l,qg,[],a);let p;return f&&Array.isArray(d)&&(p=d.includes(u)),{field:f,isRequired:p}}function xV(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}function DV(e,t){return function(r,n){if(r==null)return r;if(!di(r))return e(r,n);for(var i=r.length,a=-1,s=Object(r);++a<i&&n(s[a],a,s)!==!1;);return r}}var l_=DV(Ny);function FV(e,t,r,n,i){return i(e,function(a,s,l){r=n?(n=!1,a):t(r,a,s,l)}),r}function NV(e,t,r){var n=Ot(e)?xV:FV,i=arguments.length<3;return n(e,vf(t),r,i,l_)}const MV={type:"object",$id:bO,properties:{__not_really_there__:{type:"number"}}};function Id(e,t,r,n,i){let a=0;return r&&(Re(r.properties)?a+=NV(r.properties,(s,l,u)=>{const f=de(n,u);if(typeof l=="boolean")return s;if(Be(l,ot)){const d=Mt(e,l,t,f,i);return s+Id(e,t,d,f||{},i)}if((Be(l,Qe)||Be(l,yt))&&f){const d=Be(l,Qe)?Qe:yt,p=Zr(l);return s+wo(e,t,f,de(l,d),-1,p,i)}if(l.type==="object")return Re(f)&&(s+=1),s+Id(e,t,l,f,i);if(l.type===bo(f)){let d=s+1;return l.default?d+=f===l.default?1:-1:l.const&&(d+=f===l.const?1:-1),d}return s},0):br(r.type)&&r.type===bo(n)&&(a+=1)),a}function wo(e,t,r,n,i=-1,a,s){const l=n.map(m=>_o(m,t,[])),u=e_(r,n,a);if(Td(u))return u;const f=l.reduce((m,y,_)=>(Pd(e,r,[MV,y],t,a)===1&&m.push(_),m),[]);if(f.length===1)return f[0];f.length||Iy(l.length,m=>f.push(m));const d=new Set,{bestIndex:p}=f.reduce((m,y)=>{const{bestScore:_}=m,w=l[y],v=Id(e,t,w,r,s);return d.add(v),v>_?{bestIndex:y,bestScore:v}:m},{bestIndex:i,bestScore:0});return d.size===1&&i>=0?i:p}function xd(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>ke(t))}function So(e){return e==null}function Co(e,t,r=!1,n=!1,i=!1){if(Array.isArray(t)){const a=Array.isArray(e)?e:[],s=i?a:t,l=i?t:a,u=s.map((f,d)=>l[d]!==void 0?Co(a[d],t[d],r,n,i):f);return(r||i)&&u.length<l.length&&u.push(...l.slice(u.length)),u}if(ke(t)){const a=Object.assign({},e);return Object.keys(t).reduce((s,l)=>{var u;const f=de(t,l),d=ke(e)&&l in e,p=l in t,m=(u=de(e,l))!==null&&u!==void 0?u:{},y=d&&Object.entries(m).some(([,v])=>ke(v)),_=d&&ke(de(e,l)),w=p&&ke(f);return _&&w&&!y?(s[l]={...de(e,l),...f},s):(s[l]=Co(de(e,l),f,r,n,i&&(d||!p)),s)},a)}return n&&(!So(e)&&So(t)||typeof t=="number"&&isNaN(t))||i&&!So(t)?e:t}function bn(e,t,r=!1){return Object.keys(t).reduce((n,i)=>{const a=e?e[i]:{},s=t[i];if(e&&i in e&&ke(s))n[i]=bn(a,s,r);else if(r&&Array.isArray(a)&&Array.isArray(s)){let l=s;r==="preventDuplicates"&&(l=s.reduce((u,f)=>(a.includes(f)||u.push(f),u),[])),n[i]=a.concat(l)}else n[i]=s;return n},Object.assign({},e))}function c_(e){return Array.isArray(e.enum)&&e.enum.length===1||pr in e}function Dd(e,t,r={},n){const i=Mt(e,t,r,void 0,n),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(s=>typeof s!="boolean"&&c_(s)):!1}function Fd(e,t,r,n){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:Dd(e,t.items,r,n)}function u_(e){const t=e[pr],r=yn(e);return ke(t)&&br(t==null?void 0:t.$data)&&r!=="object"&&r!=="array"}function kV(e){if(yO in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(pr in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function ua(e,t){if(e.enum){let a;if(t){const{enumNames:s}=we(t);a=s}return e.enum.map((s,l)=>({label:(a==null?void 0:a[l])||String(s),value:s}))}let r,n;e.anyOf?(r=e.anyOf,n=t==null?void 0:t.anyOf):e.oneOf&&(r=e.oneOf,n=t==null?void 0:t.oneOf);let i=Zr(e);if(t){const{optionsSchemaSelector:a=i}=we(t);i=a}return r&&r.map((a,s)=>{const{title:l}=we(n==null?void 0:n[s]),u=a;let f,d=l;if(i){const p=de(u,[Ve,i],{});f=de(p,Os,de(p,pr)),d=d||(p==null?void 0:p.title)||u.title||String(f)}else f=kV(u),d=d||u.title||String(f);return{schema:u,label:d,value:f}})}const LV=["string","number","integer","boolean","null"];var fa;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(fa||(fa={}));function Nd(e,t=fa.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const n=e.items[r];if(typeof n!="boolean")return n}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==fa.Ignore&&ke(e.additionalItems)?e.additionalItems:{}}function f_(e,t,r,n,i,a=[],s={},l=!1){const{emptyObjectFields:u="populateAllDefaults"}=s;if(n===!0||l)e[t]=r;else if(n==="excludeObjectChildren")(!ke(r)||!Ut(r))&&(e[t]=r);else if(u!=="skipDefaults"){const f=i===void 0?a.includes(t):i;ke(r)?u==="skipEmptyDefaults"?Ut(r)||(e[t]=r):(!Ut(r)||a.includes(t))&&(f||u!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||f&&a.includes(t))&&(e[t]=r)}}function qn(e,t,r={}){const{parentDefaults:n,rawFormData:i,rootSchema:a={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:p=!1}=r;let m=ke(i)?i:{};const y=ke(t)?t:{};let _=n,w=null,v=u,g=l;if(y[pr]!==void 0&&(u==null?void 0:u.constAsDefaults)!=="never"&&!u_(y))_=y[pr];else if(ke(_)&&ke(y.default))_=bn(_,y.default);else if(Os in y&&!y[yt]&&!y[Qe]&&!y[ot])_=y.default;else if(ot in y){const E=y[ot];l.includes(E)||(g=l.concat(E),w=Q0(E,a)),w&&!_&&(_=y.default),p&&w&&!ke(i)&&(m=i)}else if(As in y){const E={...d_(e,y,r,_),...m};w=i_(e,y,a,!1,[],E,f)[0]}else if(xd(y))_=y.items.map((E,A)=>qn(e,E,{rootSchema:a,includeUndefinedValues:s,_recurseList:l,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(n)?n[A]:void 0,rawFormData:m,required:d,shouldMergeDefaultsIntoFormData:p}));else if(Qe in y){const{oneOf:E,...A}=y;if(E.length===0)return;const x=Zr(y),{type:N="null"}=A;!Array.isArray(N)&&LV.includes(N)&&(v==null?void 0:v.constAsDefaults)==="skipOneOf"&&(v={...v,constAsDefaults:"never"}),w=E[wo(e,a,i??y.default,E,0,x,f)],w=vn(A,w)}else if(yt in y){const{anyOf:E,...A}=y;if(E.length===0)return;const x=Zr(y);w=E[wo(e,a,i??y.default,E,0,x,f)],w=vn(A,w)}if(w)return qn(e,w,{rootSchema:a,includeUndefinedValues:s,_recurseList:g,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:f,parentDefaults:_,rawFormData:i??m,required:d,shouldMergeDefaultsIntoFormData:p});_===void 0&&(_=y.default);const C=d_(e,y,r,_);let S=C??_;if(p){const{arrayMinItems:E={}}=u||{},{mergeExtraDefaults:A}=E,x=jV(e,y,a,i,u,f);(!ke(i)||Un in y)&&(S=Co(S,x,A,!0))}return S}function jV(e,t,r,n,i,a){const s=!c_(t)&&Dd(e,t,r,a);let l=n;if(s){const f=ua(t);l=(f==null?void 0:f.some(p=>pt(p.value,n)))?n:void 0}return t[pr]&&(i==null?void 0:i.constAsDefaults)==="always"&&(l=t.const),l}function BV(e,t,{rawFormData:r,rootSchema:n={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:f}={},d){{const p=ke(r)?r:{},m=t,y=(s==null?void 0:s.allOf)==="populateDefaults"&&Un in m?Mt(e,m,n,p,l):m,_=y[pr],w=Object.keys(y.properties||{}).reduce((v,g)=>{var C;const S=de(y,[Ve,g],{}),E=ke(_)&&_[g]!==void 0,A=(ke(S)&&pr in S||E)&&(s==null?void 0:s.constAsDefaults)!=="never"&&!u_(S),x=qn(e,S,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:de(d,[g]),rawFormData:de(p,[g]),required:(C=y.required)===null||C===void 0?void 0:C.includes(g),shouldMergeDefaultsIntoFormData:f});return f_(v,g,x,i,u,y.required,s,A),v},{});if(y.additionalProperties){const v=ke(y.additionalProperties)?y.additionalProperties:{},g=new Set;ke(d)&&Object.keys(d).filter(S=>!y.properties||!y.properties[S]).forEach(S=>g.add(S));const C=[];Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{g.add(S),C.push(S)}),g.forEach(S=>{var E;const A=qn(e,v,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:de(d,[S]),rawFormData:de(p,[S]),required:(E=y.required)===null||E===void 0?void 0:E.includes(S),shouldMergeDefaultsIntoFormData:f});f_(w,S,A,i,u,C)})}return w}}function UV(e,t,{rawFormData:r,rootSchema:n={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:s=void 0,required:l,shouldMergeDefaultsIntoFormData:u}={},f){var d,p;const m=t,y=(d=a==null?void 0:a.arrayMinItems)!==null&&d!==void 0?d:{},{populate:_,mergeExtraDefaults:w}=y,v=_==="never",g=_==="requiredOnly",C=_==="all"||!v&&!g,S=(p=y==null?void 0:y.computeSkipPopulate)!==null&&p!==void 0?p:()=>!1,A=(a==null?void 0:a.emptyObjectFields)==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((ee,ae)=>{const Q=Nd(m,fa.Fallback,ae);return qn(e,Q,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,parentDefaults:ee,required:l,shouldMergeDefaultsIntoFormData:u})})),Array.isArray(r)){const ee=Nd(m);if(v)f=r;else{const ae=r.map((k,q)=>qn(e,ee,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,rawFormData:k,parentDefaults:de(f,[q]),required:l,shouldMergeDefaultsIntoFormData:u}));f=Co(f,ae,(g&&l||C)&&w)}}if((ke(m)&&pr in m&&(a==null?void 0:a.constAsDefaults)!=="never")===!1){if(v)return f??A;if(g&&!l)return f||void 0}const N=Array.isArray(f)?f.length:0;if(!m.minItems||Fd(e,m,n,s)||S(e,m,n)||m.minItems<=N)return f||A;const Y=f||[],K=Nd(m,fa.Invert),H=K.default,te=new Array(m.minItems-N).fill(qn(e,K,{parentDefaults:H,rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,required:l,shouldMergeDefaultsIntoFormData:u}));return Y.concat(te)}function d_(e,t,r={},n){switch(yn(t)){case"object":return BV(e,t,r,n);case"array":return UV(e,t,r,n)}}function h_(e,t,r,n,i=!1,a,s){if(!ke(t))throw new Error("Invalid schema: "+t);const l=Mt(e,t,n,r,s),u=qn(e,l,{rootSchema:n,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,rawFormData:r,shouldMergeDefaultsIntoFormData:!0});if(l.type!=="object"&&ke(l.default))return{...u,...r};if(ke(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:f}=a||{};return Co(u,r,!0,f==="useDefaultIfFormDataUndefined",!0)}return u}function p_(e={}){return"widget"in we(e)&&we(e).widget!=="hidden"}function m_(e,t,r={},n,i){if(r[Yu]==="files")return!0;if(t.items){const a=Mt(e,t.items,n,void 0,i);return a.type==="string"&&a.format==="data-url"}return!1}function WV(e,t,r={},n,i,a){const s=we(r,i),{label:l=!0}=s;let u=!!l;const f=yn(t);return f==="array"&&(u=Fd(e,t,n,a)||m_(e,t,r,n,a)||p_(r)),f==="object"&&(u=!1),f==="boolean"&&r&&!r[Yu]&&(u=!1),r&&r[wO]&&(u=!1),u}const da=Symbol("no Value");function Md(e,t,r,n,i={},a){let s;if(Be(r,Ve)){const l={};if(Be(n,Ve)){const d=de(n,Ve,{});Object.keys(d).forEach(p=>{Be(i,p)&&(l[p]=void 0)})}const u=Object.keys(de(r,Ve,{})),f={};u.forEach(d=>{const p=de(i,d);let m=de(n,[Ve,d],{}),y=de(r,[Ve,d],{});Be(m,ot)&&(m=Mt(e,m,t,p,a)),Be(y,ot)&&(y=Mt(e,y,t,p,a));const _=de(m,"type"),w=de(y,"type");if(!_||_===w)if(Be(l,d)&&delete l[d],w==="object"||w==="array"&&Array.isArray(p)){const v=Md(e,t,y,m,p,a);(v!==void 0||w==="array")&&(f[d]=v)}else{const v=de(y,"default",da),g=de(m,"default",da);v!==da&&v!==p&&(g===p?l[d]=v:de(y,"readOnly")===!0&&(l[d]=void 0));const C=de(y,"const",da),S=de(m,"const",da);C!==da&&C!==p&&(l[d]=S===p?C:void 0)}}),s={...typeof i=="string"||Array.isArray(i)?void 0:i,...l,...f}}else if(de(n,"type")==="array"&&de(r,"type")==="array"&&Array.isArray(i)){let l=de(n,"items"),u=de(r,"items");if(typeof l=="object"&&typeof u=="object"&&!Array.isArray(l)&&!Array.isArray(u)){Be(l,ot)&&(l=Mt(e,l,t,i,a)),Be(u,ot)&&(u=Mt(e,u,t,i,a));const f=de(l,"type"),d=de(u,"type");if(!f||f===d){const p=de(r,"maxItems",-1);d==="object"?s=i.reduce((m,y)=>{const _=Md(e,t,u,l,y,a);return _!==void 0&&(p<0||m.length<p)&&m.push(_),m},[]):s=p>0&&i.length>p?i.slice(0,p):i}}else typeof l=="boolean"&&typeof u=="boolean"&&l===u&&(s=i)}return s}function wl(e,t,r,n,i,a,s,l=[],u){const d={$id:i||r};if(typeof t=="object"){if(ot in t||As in t||Un in t){const p=Mt(e,t,a,s,u);if(l.findIndex(y=>pt(y,p))===-1)return wl(e,p,r,n,i,a,s,l.concat(p),u)}if(zr in t&&!de(t,[zr,ot]))return wl(e,de(t,zr),r,n,i,a,s,l,u);if(yn(t)==="object"&&Ve in t)for(const p in t.properties){const m=t[Ve][p],y=d[vt]+n+p;d[p]=wl(e,m,r,n,y,a,de(s,[p]),l,u)}}return d}function qV(e,t,r,n,i,a="root",s="_",l){return wl(e,t,a,s,r,n,i,void 0,l)}function _i(e,t,r,n,i,a=[],s){if(ot in t||As in t||Un in t){const u=Mt(e,t,n,i,s);if(a.findIndex(d=>pt(d,u))===-1)return _i(e,u,r,n,i,a.concat(u),s)}let l={[Ts]:r.replace(/^\./,"")};if(Qe in t||yt in t){const u=Qe in t?t.oneOf:t.anyOf,f=Zr(t),d=wo(e,n,i,u,0,f,s),p=u[d];l={...l,..._i(e,p,r,n,i,a,s)}}if(Es in t&&t[Es]!==!1&&Xe(l,Gu,!0),zr in t&&Array.isArray(i)){const{items:u,additionalItems:f}=t;Array.isArray(u)?i.forEach((d,p)=>{u[p]?l[p]=_i(e,u[p],`${r}.${p}`,n,d,a,s):f?l[p]=_i(e,f,`${r}.${p}`,n,d,a,s):console.warn(`Unable to generate path schema for "${r}.${p}". No schema defined for it`)}):i.forEach((d,p)=>{l[p]=_i(e,u,`${r}.${p}`,n,d,a,s)})}else if(Ve in t)for(const u in t.properties){const f=de(t,[Ve,u],{});l[u]=_i(e,f,`${r}.${u}`,n,de(i,[u]),a,s)}return l}function VV(e,t,r="",n,i,a){return _i(e,t,r,n,i,void 0,a)}class RV{constructor(t,r,n,i){r&&r[Ga]===Is?this.rootSchema=Od(r,de(r,vt,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,n={},i){return!t||!r?!1:this.validator!==t||!pt(this.rootSchema,r)||!pt(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,r,n){return IV(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,n,i){return $o(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,n=!1){return h_(this.validator,t,r,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(t,r,n){return WV(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,n,i){return wo(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,n){return Pd(this.validator,t,r,this.rootSchema,n)}getFromSchema(t,r,n){return $l(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}isFilesArray(t,r){return m_(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return Fd(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return Dd(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,r){return Mt(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(t,r,n){return Md(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}toIdSchema(t,r,n,i="root",a="_"){return qV(this.validator,t,r,this.rootSchema,n,i,a,this.experimental_customMergeAllOf)}toPathSchema(t,r,n){return VV(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}}function zV(e,t,r={},n){return new RV(e,t,r,n)}function HV(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const n=e.slice(5).split(";base64,");if(n.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,a]=n,[s,...l]=i.split(";"),u=s||"",f=decodeURI(((t=l.map(d=>d.split("=")).find(([d])=>d==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const d=atob(a),p=new Array(d.length);for(let y=0;y<d.length;y++)p[y]=d.charCodeAt(y);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:f}}catch(d){throw new Error("File is invalid: "+d.message)}}function Vn(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function kd(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return kd(t,e).reverse();const r=[];for(let n=e;n<=t;n++)r.push({value:n,label:Vn(n,2)});return r}function g_(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const a=r[i];if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1}return!0}function KV(e,t){let r=e;if(Array.isArray(t)){const n=r.split(/(%\d)/);t.forEach((i,a)=>{const s=n.findIndex(l=>l===`%${a+1}`);s>=0&&(n[s]=i)}),r=n.join("")}return r}function GV(e,t){return KV(e,t)}function At(e,t=[],r){if(Array.isArray(e))return e.map(a=>At(a,t)).filter(a=>a!==r);const n=e===""||e===null?-1:Number(e),i=t[n];return i?i.value:r}function YV(e,t,r=[]){const n=At(e,r);return Array.isArray(t)?t.filter(i=>!pt(i,n)):pt(n,t)?void 0:t}function Ld(e,t){return Array.isArray(t)?t.some(r=>pt(r,e)):pt(t,e)}function Sl(e,t=[],r=!1){const n=t.map((i,a)=>Ld(i.value,e)?String(a):void 0).filter(i=>typeof i<"u");return r?n:n[0]}function JV(e,t,r=[]){const n=At(e,r);if(!So(n)){const i=r.findIndex(l=>n===l.value),a=r.map(({value:l})=>l);return t.slice(0,i).concat(n,t.slice(i)).sort((l,u)=>+(a.indexOf(l)>a.indexOf(u)))}return t}var XV=1,ZV=4;function Eo(e){return go(e,XV|ZV)}function QV(e,t,r,n){return n=typeof n=="function"?n:void 0,e==null?e:mf(e,t,r,n)}class eR{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let n=Array.isArray(t)&&t.length>0||typeof t=="string"?de(this.errorSchema,t):this.errorSchema;return!n&&t&&(n={},QV(this.errorSchema,t,n,Object)),n}resetAllErrors(t){return this.errorSchema=t?Eo(t):{},this}addErrors(t,r){const n=this.getOrCreateErrorBlock(r);let i=de(n,Ht);return Array.isArray(i)||(i=[],n[Ht]=i),Array.isArray(t)?Xe(n,Ht,[...new Set([...i,...t])]):Xe(n,Ht,[...new Set([...i,t])]),this}setErrors(t,r){const n=this.getOrCreateErrorBlock(r),i=Array.isArray(t)?[...new Set([...t])]:[t];return Xe(n,Ht,i),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Xe(r,Ht,[]),this}}function y_(e,t,r=[1900,new Date().getFullYear()+2],n="YMD"){const{day:i,month:a,year:s,hour:l,minute:u,second:f}=e,d={type:"day",range:[1,31],value:i},p={type:"month",range:[1,12],value:a},m={type:"year",range:r,value:s},y=[];switch(n){case"MDY":y.push(p,d,m);break;case"DMY":y.push(d,p,m);break;case"YMD":default:y.push(m,p,d)}return t&&y.push({type:"hour",range:[0,23],value:l},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:f}),y}function v_(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function b_(e,t,r={},n=!0){const i={type:t||"text",...v_(e)};return r.inputType?i.type=r.inputType:t||(e.type==="number"?(i.type="number",n&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),r.autocomplete&&(i.autoComplete=r.autocomplete),r.accept&&(i.accept=r.accept),i}const __={props:{disabled:!1},submitText:"Submit",norender:!1};function jd(e={}){const t=we(e);if(t&&t[Ps]){const r=t[Ps];return{...__,...r}}return __}function Se(e,t,r={}){const{templates:n}=t;if(e==="ButtonTemplates")return n[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(n,r[e])){const i=r[e];return n[i]}return r[e]||n[e]}const tR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let rR=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=tR[r[e]&63];return t};function $_(){if(typeof process>"u"||de(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,rR()),e.get(r)}})}var Bd={exports:{}},Ke={};/**
5
5
  * @license React
6
6
  * react-is.production.min.js
7
7
  *
@@ -17,12 +17,12 @@
17
17
  *
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
- */var S_;function iR(){return S_||(S_=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),_=!1,w=!1,v=!1,g=!1,C=!1,S;S=Symbol.for("react.module.reference");function E(me){return!!(typeof me=="string"||typeof me=="function"||me===r||me===i||C||me===n||me===f||me===d||g||me===y||_||w||v||typeof me=="object"&&me!==null&&(me.$$typeof===m||me.$$typeof===p||me.$$typeof===a||me.$$typeof===s||me.$$typeof===u||me.$$typeof===S||me.getModuleId!==void 0))}function A(me){if(typeof me=="object"&&me!==null){var Pt=me.$$typeof;switch(Pt){case e:var Vt=me.type;switch(Vt){case r:case i:case n:case f:case d:return Vt;default:var It=Vt&&Vt.$$typeof;switch(It){case l:case s:case u:case m:case p:case a:return It;default:return Pt}}case t:return Pt}}}var x=s,N=a,Z=e,G=u,H=r,ee=m,te=p,ae=t,Q=i,k=n,W=f,R=d,U=!1,J=!1;function L(me){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(me){return J||(J=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(me){return A(me)===s}function B(me){return A(me)===a}function P(me){return typeof me=="object"&&me!==null&&me.$$typeof===e}function F(me){return A(me)===u}function V(me){return A(me)===r}function X(me){return A(me)===m}function oe(me){return A(me)===p}function ue(me){return A(me)===t}function he(me){return A(me)===i}function be(me){return A(me)===n}function Le(me){return A(me)===f}function ut(me){return A(me)===d}Ge.ContextConsumer=x,Ge.ContextProvider=N,Ge.Element=Z,Ge.ForwardRef=G,Ge.Fragment=H,Ge.Lazy=ee,Ge.Memo=te,Ge.Portal=ae,Ge.Profiler=Q,Ge.StrictMode=k,Ge.Suspense=W,Ge.SuspenseList=R,Ge.isAsyncMode=L,Ge.isConcurrentMode=D,Ge.isContextConsumer=z,Ge.isContextProvider=B,Ge.isElement=P,Ge.isForwardRef=F,Ge.isFragment=V,Ge.isLazy=X,Ge.isMemo=oe,Ge.isPortal=ue,Ge.isProfiler=he,Ge.isStrictMode=be,Ge.isSuspense=Le,Ge.isSuspenseList=ut,Ge.isValidElementType=E,Ge.typeOf=A}()),Ge}process.env.NODE_ENV==="production"?jd.exports=nR():jd.exports=iR();var aR=jd.exports;const C_=Qt(aR),Bd={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function oR(e){let t=de(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:n,...i})=>$.jsx(e,{options:{...r,...n},...i}),Qe(e,"MergedWidget",t)}return t}function Qr(e,t,r={}){const n=gn(e);if(typeof t=="function"||t&&C_.isForwardRef(j.createElement(t))||C_.isMemo(t))return oR(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t}`);if(t in r){const i=r[t];return Qr(e,i,r)}if(typeof n=="string"){if(!(n in Bd))throw new Error(`No widget for type '${n}'`);if(t in Bd[n]){const i=r[Bd[n][t]];return Qr(e,i,r)}}throw new Error(`No widget '${t}' for type '${n}'`)}function sR(e){let t=0;for(let r=0;r<e.length;r+=1){const n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function lR(e){const t=new Set;return JSON.stringify(e,(r,n)=>(t.add(r),n)),JSON.stringify(e,Array.from(t).sort())}function $i(e){return sR(lR(e))}function cR(e){return $i(e)}function uR(e,t,r={}){try{return Qr(e,t,r),!0}catch(n){const i=n;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw n}}function ha(e,t){return`${br(e)?e:e[$t]}__${t}`}function pa(e){return ha(e,"description")}function Ud(e){return ha(e,"error")}function ma(e){return ha(e,"examples")}function E_(e){return ha(e,"help")}function Cl(e){return ha(e,"title")}function At(e,t=!1){const r=t?` ${ma(e)}`:"";return`${Ud(e)} ${pa(e)} ${E_(e)}${r}`}function El(e,t){return`${e}-${t}`}function en(e,t){return ha(e,t)}function O_(e,t,r){return t?r:e}function fR(e){return e?new Date(e).toJSON():void 0}function Wd(e,t,r){const n=[$O];return We(e,qg)&&n.unshift(qg),de(e,[...n,t],r)}function dR(e,t){if(!Array.isArray(t))return e;const r=d=>d.reduce((p,m)=>(p[m]=!0,p),{}),n=d=>d.length>1?`properties '${d.join("', '")}'`:`property '${d[0]}'`,i=r(e),a=t.filter(d=>d==="*"||i[d]),s=r(a),l=e.filter(d=>!s[d]),u=a.indexOf("*");if(u===-1){if(l.length)throw new Error(`uiSchema order list does not contain ${n(l)}`);return a}if(u!==a.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...a];return f.splice(u,1,...l),f}function ga(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Ol(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Ol(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Ol(e.oneOf[0]);if(e.allOf){const t=r=>Ol(r);return e.allOf.some(t)}return!1}function A_(e,t,r,n="customDeep"){if(n==="always")return!0;if(n==="shallow"){const{props:s,state:l}=e;return!m_(s,t)||!m_(l,r)}const{props:i,state:a}=e;return!ht(i,t)||!ht(a,r)}function Al(e,t=!0){const{year:r,month:n,day:i,hour:a=0,minute:s=0,second:l=0}=e,u=Date.UTC(r,n-1,i,a,s,l),f=new Date(u).toJSON();return t?f:f.slice(0,10)}function Tl(e,t=[]){if(!e)return[];let r=[];return Ht in e&&(r=r.concat(e[Ht].map(n=>{const i=`.${t.join(".")}`;return{property:i,message:n,stack:`${i} ${n}`}}))),Object.keys(e).reduce((n,i)=>{if(i!==Ht){const a=e[i];Wn(a)&&(n=n.concat(Tl(a,[...t,i])))}return n},r)}function T_(e){return Et(e)?Hi(e,hi):io(e)?[e]:_f(_y(Cy(e)))}function hR(e){const t=new tR;return e.length&&e.forEach(r=>{const{property:n,message:i}=r,a=n==="."?[]:T_(n);a.length>0&&a[0]===""&&a.splice(0,1),i&&t.addErrors(i,a)}),t.ErrorSchema}function qd(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const n=e[r];return Wn(n)?{...t,[r]:qd(n)}:{...t,[r]:n}}},{})}function pR(e){if(!e)return"";const t=new Date(e),r=Vn(t.getFullYear(),4),n=Vn(t.getMonth()+1,2),i=Vn(t.getDate(),2),a=Vn(t.getHours(),2),s=Vn(t.getMinutes(),2),l=Vn(t.getSeconds(),2),u=Vn(t.getMilliseconds(),3);return`${r}-${n}-${i}T${a}:${s}:${l}.${u}`}function Pl(e,t){if(!t)return e;const{errors:r,errorSchema:n}=e;let i=Tl(t),a=t;return Ut(n)||(a=vn(n,t,!0),i=[...r].concat(i)),{errorSchema:a,errors:i}}function mR(e){for(const t in e){const r=e,n=r[t];t===ot&&typeof n=="string"&&n.startsWith("#")?r[t]=Vg+n:r[t]=Vd(n)}return e}function gR(e){for(let t=0;t<e.length;t++)e[t]=Vd(e[t]);return e}function Vd(e){return Array.isArray(e)?gR([...e]):Re(e)?mR({...e}):e}function P_(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],l=js(e,s);r(l,s)&&pf(a,Ki(s,e),l)}return a}function yR(e,t){if(e==null)return{};var r=Hi(bd(e),function(n){return[n]});return t=yf(t),P_(e,r,function(n,i){return t(n,i[0])})}var vR=200;function bR(e,t,r,n){var i=-1,a=wf,s=!0,l=e.length,u=[],f=t.length;if(!l)return u;t.length>=vR&&(a=eo,s=!1,t=new ui(t));e:for(;++i<l;){var d=e[i],p=d;if(d=d!==0?d:0,s&&p===p){for(var m=f;m--;)if(t[m]===p)continue e;u.push(d)}else a(t,p,n)||u.push(d)}return u}var _R=Ws(function(e,t){return ao(e)?bR(e,so(t,1,ao,!0)):[]});function $R(e,t){const r=Wn(e),n=Wn(t);if(e===t||!r&&!n)return[];if(r&&!n)return Fr(e);if(!r&&n)return Fr(t);{const i=Fr(yR(e,(s,l)=>!ht(s,de(t,l)))),a=_R(Fr(t),Fr(e));return[...i,...a]}}var Be;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(Be||(Be={}));function I_(e,t){var r=Et(e)?gf:s_;return r(e,Ay(t))}var x_=j.createContext({});function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_r.apply(null,arguments)}function wR(e){if(Array.isArray(e))return e}function SR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function D_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CR(e,t){if(e){if(typeof e=="string")return D_(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D_(e,t):void 0}}function ER(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ */var S_;function iR(){return S_||(S_=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),_=!1,w=!1,v=!1,g=!1,C=!1,S;S=Symbol.for("react.module.reference");function E(me){return!!(typeof me=="string"||typeof me=="function"||me===r||me===i||C||me===n||me===f||me===d||g||me===y||_||w||v||typeof me=="object"&&me!==null&&(me.$$typeof===m||me.$$typeof===p||me.$$typeof===a||me.$$typeof===s||me.$$typeof===u||me.$$typeof===S||me.getModuleId!==void 0))}function A(me){if(typeof me=="object"&&me!==null){var It=me.$$typeof;switch(It){case e:var Vt=me.type;switch(Vt){case r:case i:case n:case f:case d:return Vt;default:var Et=Vt&&Vt.$$typeof;switch(Et){case l:case s:case u:case m:case p:case a:return Et;default:return It}}case t:return It}}}var x=s,N=a,Y=e,K=u,H=r,te=m,ee=p,ae=t,Q=i,k=n,q=f,W=d,L=!1,X=!1;function U(me){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(me){return X||(X=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(me){return A(me)===s}function j(me){return A(me)===a}function T(me){return typeof me=="object"&&me!==null&&me.$$typeof===e}function D(me){return A(me)===u}function V(me){return A(me)===r}function Z(me){return A(me)===m}function oe(me){return A(me)===p}function ue(me){return A(me)===t}function he(me){return A(me)===i}function be(me){return A(me)===n}function Le(me){return A(me)===f}function ft(me){return A(me)===d}Ge.ContextConsumer=x,Ge.ContextProvider=N,Ge.Element=Y,Ge.ForwardRef=K,Ge.Fragment=H,Ge.Lazy=te,Ge.Memo=ee,Ge.Portal=ae,Ge.Profiler=Q,Ge.StrictMode=k,Ge.Suspense=q,Ge.SuspenseList=W,Ge.isAsyncMode=U,Ge.isConcurrentMode=F,Ge.isContextConsumer=z,Ge.isContextProvider=j,Ge.isElement=T,Ge.isForwardRef=D,Ge.isFragment=V,Ge.isLazy=Z,Ge.isMemo=oe,Ge.isPortal=ue,Ge.isProfiler=he,Ge.isStrictMode=be,Ge.isSuspense=Le,Ge.isSuspenseList=ft,Ge.isValidElementType=E,Ge.typeOf=A}()),Ge}process.env.NODE_ENV==="production"?Bd.exports=nR():Bd.exports=iR();var aR=Bd.exports;const C_=Qt(aR),Ud={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function oR(e){let t=de(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:n,...i})=>$.jsx(e,{options:{...r,...n},...i}),Xe(e,"MergedWidget",t)}return t}function en(e,t,r={}){const n=yn(e);if(typeof t=="function"||t&&C_.isForwardRef(B.createElement(t))||C_.isMemo(t))return oR(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t}`);if(t in r){const i=r[t];return en(e,i,r)}if(typeof n=="string"){if(!(n in Ud))throw new Error(`No widget for type '${n}'`);if(t in Ud[n]){const i=r[Ud[n][t]];return en(e,i,r)}}throw new Error(`No widget '${t}' for type '${n}'`)}function sR(e){let t=0;for(let r=0;r<e.length;r+=1){const n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function lR(e){const t=new Set;return JSON.stringify(e,(r,n)=>(t.add(r),n)),JSON.stringify(e,Array.from(t).sort())}function $i(e){return sR(lR(e))}function cR(e){return $i(e)}function uR(e,t,r={}){try{return en(e,t,r),!0}catch(n){const i=n;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw n}}function ha(e,t){return`${br(e)?e:e[vt]}__${t}`}function pa(e){return ha(e,"description")}function Wd(e){return ha(e,"error")}function ma(e){return ha(e,"examples")}function E_(e){return ha(e,"help")}function Cl(e){return ha(e,"title")}function Tt(e,t=!1){const r=t?` ${ma(e)}`:"";return`${Wd(e)} ${pa(e)} ${E_(e)}${r}`}function El(e,t){return`${e}-${t}`}function tn(e,t){return ha(e,t)}function O_(e,t,r){return t?r:e}function fR(e){return e?new Date(e).toJSON():void 0}function qd(e,t,r){const n=[$O];return Be(e,Vg)&&n.unshift(Vg),de(e,[...n,t],r)}function dR(e,t){if(!Array.isArray(t))return e;const r=d=>d.reduce((p,m)=>(p[m]=!0,p),{}),n=d=>d.length>1?`properties '${d.join("', '")}'`:`property '${d[0]}'`,i=r(e),a=t.filter(d=>d==="*"||i[d]),s=r(a),l=e.filter(d=>!s[d]),u=a.indexOf("*");if(u===-1){if(l.length)throw new Error(`uiSchema order list does not contain ${n(l)}`);return a}if(u!==a.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...a];return f.splice(u,1,...l),f}function ga(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Ol(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Ol(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Ol(e.oneOf[0]);if(e.allOf){const t=r=>Ol(r);return e.allOf.some(t)}return!1}function A_(e,t,r,n="customDeep"){if(n==="always")return!0;if(n==="shallow"){const{props:s,state:l}=e;return!g_(s,t)||!g_(l,r)}const{props:i,state:a}=e;return!pt(i,t)||!pt(a,r)}function Al(e,t=!0){const{year:r,month:n,day:i,hour:a=0,minute:s=0,second:l=0}=e,u=Date.UTC(r,n-1,i,a,s,l),f=new Date(u).toJSON();return t?f:f.slice(0,10)}function Tl(e,t=[]){if(!e)return[];let r=[];return Ht in e&&(r=r.concat(e[Ht].map(n=>{const i=`.${t.join(".")}`;return{property:i,message:n,stack:`${i} ${n}`}}))),Object.keys(e).reduce((n,i)=>{if(i!==Ht){const a=e[i];Wn(a)&&(n=n.concat(Tl(a,[...t,i])))}return n},r)}function T_(e){return Ot(e)?Hi(e,hi):io(e)?[e]:$f($y(df(e)))}function hR(e){const t=new eR;return e.length&&e.forEach(r=>{const{property:n,message:i}=r,a=n==="."?[]:T_(n);a.length>0&&a[0]===""&&a.splice(0,1),i&&t.addErrors(i,a)}),t.ErrorSchema}function Vd(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const n=e[r];return Wn(n)?{...t,[r]:Vd(n)}:{...t,[r]:n}}},{})}function pR(e){if(!e)return"";const t=new Date(e),r=Vn(t.getFullYear(),4),n=Vn(t.getMonth()+1,2),i=Vn(t.getDate(),2),a=Vn(t.getHours(),2),s=Vn(t.getMinutes(),2),l=Vn(t.getSeconds(),2),u=Vn(t.getMilliseconds(),3);return`${r}-${n}-${i}T${a}:${s}:${l}.${u}`}function Pl(e,t){if(!t)return e;const{errors:r,errorSchema:n}=e;let i=Tl(t),a=t;return Ut(n)||(a=bn(n,t,!0),i=[...r].concat(i)),{errorSchema:a,errors:i}}function mR(e){for(const t in e){const r=e,n=r[t];t===ot&&typeof n=="string"&&n.startsWith("#")?r[t]=Rg+n:r[t]=Rd(n)}return e}function gR(e){for(let t=0;t<e.length;t++)e[t]=Rd(e[t]);return e}function Rd(e){return Array.isArray(e)?gR([...e]):Re(e)?mR({...e}):e}function P_(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],l=Bs(e,s);r(l,s)&&mf(a,Ki(s,e),l)}return a}function yR(e,t){if(e==null)return{};var r=Hi(_d(e),function(n){return[n]});return t=vf(t),P_(e,r,function(n,i){return t(n,i[0])})}var vR=200;function bR(e,t,r,n){var i=-1,a=Sf,s=!0,l=e.length,u=[],f=t.length;if(!l)return u;t.length>=vR&&(a=eo,s=!1,t=new ui(t));e:for(;++i<l;){var d=e[i],p=d;if(d=d!==0?d:0,s&&p===p){for(var m=f;m--;)if(t[m]===p)continue e;u.push(d)}else a(t,p,n)||u.push(d)}return u}var _R=qs(function(e,t){return ao(e)?bR(e,so(t,1,ao,!0)):[]});function $R(e,t){const r=Wn(e),n=Wn(t);if(e===t||!r&&!n)return[];if(r&&!n)return Fr(e);if(!r&&n)return Fr(t);{const i=Fr(yR(e,(s,l)=>!pt(s,de(t,l)))),a=_R(Fr(t),Fr(e));return[...i,...a]}}var Ue;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(Ue||(Ue={}));function I_(e,t){var r=Ot(e)?yf:l_;return r(e,Ay(t))}var x_=B.createContext({});function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_r.apply(null,arguments)}function wR(e){if(Array.isArray(e))return e}function SR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,l=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function D_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CR(e,t){if(e){if(typeof e=="string")return D_(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D_(e,t):void 0}}function ER(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
21
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F_(e,t){return wR(e)||SR(e,t)||CR(e,t)||ER()}function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}function OR(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AR(e){var t=OR(e,"string");return wi(t)=="symbol"?t:t+""}function Kt(e,t,r){return(t=AR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function N_(e,t){if(e==null)return{};var r,n,i=TR(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var M_={exports:{}};/*!
22
22
  Copyright (c) 2018 Jed Watson.
23
23
  Licensed under the MIT License (MIT), see
24
24
  http://jedwatson.github.io/classnames
25
- */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=i(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)t.call(a,l)&&a[l]&&(s=i(s,l));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(M_);var k_=M_.exports;const Il=Qt(k_),Ft=Math.round;function Rd(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const L_=(e,t,r)=>r===0?e:e/100;function Eo(e,t){const r=t||255;return e>r?r:e<0?0:e}class ya{constructor(t){Kt(this,"isValid",!0),Kt(this,"r",0),Kt(this,"g",0),Kt(this,"b",0),Kt(this,"a",1),Kt(this,"_h",void 0),Kt(this,"_s",void 0),Kt(this,"_l",void 0),Kt(this,"_v",void 0),Kt(this,"_max",void 0),Kt(this,"_min",void 0),Kt(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(a){return n.startsWith(a)};const n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof ya)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Eo(t.r),this.g=Eo(t.g),this.b=Eo(t.b),this.a=typeof t.a=="number"?Eo(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,a=l=>(n[l]-this[l])*i+this[l],s={r:Ft(a("r")),g:Ft(a("g")),b:Ft(a("b")),a:Ft(a("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=a=>Ft((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Ft(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Ft(this.getSaturation()*100),n=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Eo(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,a){return parseInt(r[i]+r[a||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const m=Ft(n*255);this.r=m,this.g=m,this.b=m}let a=0,s=0,l=0;const u=t/60,f=(1-Math.abs(2*n-1))*r,d=f*(1-Math.abs(u%2-1));u>=0&&u<1?(a=f,s=d):u>=1&&u<2?(a=d,s=f):u>=2&&u<3?(s=f,l=d):u>=3&&u<4?(s=d,l=f):u>=4&&u<5?(a=d,l=f):u>=5&&u<6&&(a=f,l=d);const p=n-f/2;this.r=Ft((a+p)*255),this.g=Ft((s+p)*255),this.b=Ft((l+p)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const a=Ft(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const s=t/60,l=Math.floor(s),u=s-l,f=Ft(n*(1-r)*255),d=Ft(n*(1-r*u)*255),p=Ft(n*(1-r*(1-u))*255);switch(l){case 0:this.g=p,this.b=f;break;case 1:this.r=d,this.b=f;break;case 2:this.r=f,this.b=p;break;case 3:this.r=f,this.g=d;break;case 4:this.r=p,this.g=f;break;case 5:default:this.g=f,this.b=d;break}}fromHsvString(t){const r=Rd(t,L_);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=Rd(t,L_);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=Rd(t,(n,i)=>i.includes("%")?Ft(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var xl=2,j_=.16,PR=.05,IR=.05,xR=.15,B_=5,U_=4,DR=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function W_(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-xl*t:Math.round(e.h)+xl*t:n=r?Math.round(e.h)+xl*t:Math.round(e.h)-xl*t,n<0?n+=360:n>=360&&(n-=360),n}function q_(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-j_*t:t===U_?n=e.s+j_:n=e.s+PR*t,n>1&&(n=1),r&&t===B_&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function V_(e,t,r){var n;return r?n=e.v+IR*t:n=e.v-xR*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function R_(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new ya(e),i=n.toHsv(),a=B_;a>0;a-=1){var s=new ya({h:W_(i,a,!0),s:q_(i,a,!0),v:V_(i,a,!0)});r.push(s)}r.push(n);for(var l=1;l<=U_;l+=1){var u=new ya({h:W_(i,l),s:q_(i,l),v:V_(i,l)});r.push(u)}return t.theme==="dark"?DR.map(function(f){var d=f.index,p=f.amount;return new ya(t.backgroundColor||"#141414").mix(r[d],p).toHexString()}):r.map(function(f){return f.toHexString()})}var FR={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Dl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Dl.primary=Dl[5];var Fl=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Fl.primary=Fl[5];var Nl=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Nl.primary=Nl[5];var Ml=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ml.primary=Ml[5];var kl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];kl.primary=kl[5];var Ll=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Ll.primary=Ll[5];var jl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];jl.primary=jl[5];var Bl=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Bl.primary=Bl[5];var Oo=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Oo.primary=Oo[5];var Ul=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ul.primary=Ul[5];var Wl=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Wl.primary=Wl[5];var ql=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ql.primary=ql[5];var Ao=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ao.primary=Ao[5];var NR=Ao,MR={red:Dl,volcano:Fl,orange:Nl,gold:Ml,yellow:kl,lime:Ll,green:jl,cyan:Bl,blue:Oo,geekblue:Ul,purple:Wl,magenta:ql,grey:Ao},Vl=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Vl.primary=Vl[5];var Rl=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Rl.primary=Rl[5];var zl=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];zl.primary=zl[5];var Hl=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Hl.primary=Hl[5];var Kl=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Kl.primary=Kl[5];var Gl=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Gl.primary=Gl[5];var Yl=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Yl.primary=Yl[5];var Jl=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Jl.primary=Jl[5];var Xl=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Xl.primary=Xl[5];var Zl=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Zl.primary=Zl[5];var Ql=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Ql.primary=Ql[5];var ec=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];ec.primary=ec[5];var tc=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];tc.primary=tc[5];var kR={red:Vl,volcano:Rl,orange:zl,gold:Hl,yellow:Kl,lime:Gl,green:Yl,cyan:Jl,blue:Xl,geekblue:Zl,purple:Ql,magenta:ec,grey:tc};const LR=Object.freeze(Object.defineProperty({__proto__:null,blue:Oo,blueDark:Xl,cyan:Bl,cyanDark:Jl,geekblue:Ul,geekblueDark:Zl,generate:R_,gold:Ml,goldDark:Hl,gray:NR,green:jl,greenDark:Yl,grey:Ao,greyDark:tc,lime:Ll,limeDark:Gl,magenta:ql,magentaDark:ec,orange:Nl,orangeDark:zl,presetDarkPalettes:kR,presetPalettes:MR,presetPrimaryColors:FR,purple:Wl,purpleDark:Ql,red:Dl,redDark:Vl,volcano:Fl,volcanoDark:Rl,yellow:kl,yellowDark:Kl},Symbol.toStringTag,{value:"Module"}));function z_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function BR(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var H_="data-rc-order",K_="data-rc-priority",UR="rc-util-key",zd=new Map;function G_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):UR}function Hd(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function WR(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Kd(e){return Array.from((zd.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Y_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!jR())return null;var r=t.csp,n=t.prepend,i=t.priority,a=i===void 0?0:i,s=WR(n),l=s==="prependQueue",u=document.createElement("style");u.setAttribute(H_,s),l&&a&&u.setAttribute(K_,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var f=Hd(t),d=f.firstChild;if(n){if(l){var p=(t.styles||Kd(f)).filter(function(m){if(!["prepend","prependQueue"].includes(m.getAttribute(H_)))return!1;var y=Number(m.getAttribute(K_)||0);return a>=y});if(p.length)return f.insertBefore(u,p[p.length-1].nextSibling),u}f.insertBefore(u,d)}else f.appendChild(u);return u}function qR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Hd(t);return(t.styles||Kd(r)).find(function(n){return n.getAttribute(G_(t))===e})}function VR(e,t){var r=zd.get(e);if(!r||!BR(document,r)){var n=Y_("",t),i=n.parentNode;zd.set(e,i),e.removeChild(n)}}function RR(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Hd(r),i=Kd(n),a=tn(tn({},r),{},{styles:i});VR(n,a);var s=qR(t,a);if(s){var l,u;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var f;s.nonce=(f=a.csp)===null||f===void 0?void 0:f.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var d=Y_(e,a);return d.setAttribute(G_(a),t),d}function J_(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function zR(e){return J_(e)instanceof ShadowRoot}function HR(e){return zR(e)?J_(e):null}var Gd={},Yd=[],KR=function(t){Yd.push(t)};function GR(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Yd.reduce(function(n,i){return i(n??"","warning")},t);r&&console.error("Warning: ".concat(r))}}function YR(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Yd.reduce(function(n,i){return i(n??"","note")},t);r&&console.warn("Note: ".concat(r))}}function JR(){Gd={}}function X_(e,t,r){!t&&!Gd[r]&&(e(!1,r),Gd[r]=!0)}function rc(e,t){X_(GR,e,t)}function XR(e,t){X_(YR,e,t)}rc.preMessage=KR,rc.resetWarned=JR,rc.noteOnce=XR;function ZR(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function QR(e,t){rc(e,"[@ant-design/icons] ".concat(t))}function Z_(e){return wi(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(wi(e.icon)==="object"||typeof e.icon=="function")}function Q_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[ZR(r)]=n}return t},{})}function Jd(e,t,r){return r?j.createElement(e.tag,tn(tn({key:t},Q_(e.attrs)),r),(e.children||[]).map(function(n,i){return Jd(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):j.createElement(e.tag,tn({key:t},Q_(e.attrs)),(e.children||[]).map(function(n,i){return Jd(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function e1(e){return R_(e)[0]}function t1(e){return e?Array.isArray(e)?e:[e]:[]}var e8=`
25
+ */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=i(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)t.call(a,l)&&a[l]&&(s=i(s,l));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(M_);var k_=M_.exports;const Il=Qt(k_),Ft=Math.round;function zd(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const L_=(e,t,r)=>r===0?e:e/100;function Oo(e,t){const r=t||255;return e>r?r:e<0?0:e}class ya{constructor(t){Kt(this,"isValid",!0),Kt(this,"r",0),Kt(this,"g",0),Kt(this,"b",0),Kt(this,"a",1),Kt(this,"_h",void 0),Kt(this,"_s",void 0),Kt(this,"_l",void 0),Kt(this,"_v",void 0),Kt(this,"_max",void 0),Kt(this,"_min",void 0),Kt(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(a){return n.startsWith(a)};const n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof ya)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Oo(t.r),this.g=Oo(t.g),this.b=Oo(t.b),this.a=typeof t.a=="number"?Oo(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,a=l=>(n[l]-this[l])*i+this[l],s={r:Ft(a("r")),g:Ft(a("g")),b:Ft(a("b")),a:Ft(a("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=a=>Ft((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Ft(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Ft(this.getSaturation()*100),n=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Oo(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,a){return parseInt(r[i]+r[a||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const m=Ft(n*255);this.r=m,this.g=m,this.b=m}let a=0,s=0,l=0;const u=t/60,f=(1-Math.abs(2*n-1))*r,d=f*(1-Math.abs(u%2-1));u>=0&&u<1?(a=f,s=d):u>=1&&u<2?(a=d,s=f):u>=2&&u<3?(s=f,l=d):u>=3&&u<4?(s=d,l=f):u>=4&&u<5?(a=d,l=f):u>=5&&u<6&&(a=f,l=d);const p=n-f/2;this.r=Ft((a+p)*255),this.g=Ft((s+p)*255),this.b=Ft((l+p)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const a=Ft(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const s=t/60,l=Math.floor(s),u=s-l,f=Ft(n*(1-r)*255),d=Ft(n*(1-r*u)*255),p=Ft(n*(1-r*(1-u))*255);switch(l){case 0:this.g=p,this.b=f;break;case 1:this.r=d,this.b=f;break;case 2:this.r=f,this.b=p;break;case 3:this.r=f,this.g=d;break;case 4:this.r=p,this.g=f;break;case 5:default:this.g=f,this.b=d;break}}fromHsvString(t){const r=zd(t,L_);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=zd(t,L_);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=zd(t,(n,i)=>i.includes("%")?Ft(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var xl=2,j_=.16,PR=.05,IR=.05,xR=.15,B_=5,U_=4,DR=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function W_(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-xl*t:Math.round(e.h)+xl*t:n=r?Math.round(e.h)+xl*t:Math.round(e.h)-xl*t,n<0?n+=360:n>=360&&(n-=360),n}function q_(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-j_*t:t===U_?n=e.s+j_:n=e.s+PR*t,n>1&&(n=1),r&&t===B_&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function V_(e,t,r){var n;return r?n=e.v+IR*t:n=e.v-xR*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function R_(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new ya(e),i=n.toHsv(),a=B_;a>0;a-=1){var s=new ya({h:W_(i,a,!0),s:q_(i,a,!0),v:V_(i,a,!0)});r.push(s)}r.push(n);for(var l=1;l<=U_;l+=1){var u=new ya({h:W_(i,l),s:q_(i,l),v:V_(i,l)});r.push(u)}return t.theme==="dark"?DR.map(function(f){var d=f.index,p=f.amount;return new ya(t.backgroundColor||"#141414").mix(r[d],p).toHexString()}):r.map(function(f){return f.toHexString()})}var FR={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Dl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Dl.primary=Dl[5];var Fl=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Fl.primary=Fl[5];var Nl=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Nl.primary=Nl[5];var Ml=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ml.primary=Ml[5];var kl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];kl.primary=kl[5];var Ll=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Ll.primary=Ll[5];var jl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];jl.primary=jl[5];var Bl=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Bl.primary=Bl[5];var Ao=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ao.primary=Ao[5];var Ul=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ul.primary=Ul[5];var Wl=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Wl.primary=Wl[5];var ql=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ql.primary=ql[5];var To=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];To.primary=To[5];var NR=To,MR={red:Dl,volcano:Fl,orange:Nl,gold:Ml,yellow:kl,lime:Ll,green:jl,cyan:Bl,blue:Ao,geekblue:Ul,purple:Wl,magenta:ql,grey:To},Vl=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Vl.primary=Vl[5];var Rl=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Rl.primary=Rl[5];var zl=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];zl.primary=zl[5];var Hl=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Hl.primary=Hl[5];var Kl=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Kl.primary=Kl[5];var Gl=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Gl.primary=Gl[5];var Yl=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Yl.primary=Yl[5];var Jl=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Jl.primary=Jl[5];var Xl=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Xl.primary=Xl[5];var Zl=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Zl.primary=Zl[5];var Ql=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Ql.primary=Ql[5];var ec=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];ec.primary=ec[5];var tc=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];tc.primary=tc[5];var kR={red:Vl,volcano:Rl,orange:zl,gold:Hl,yellow:Kl,lime:Gl,green:Yl,cyan:Jl,blue:Xl,geekblue:Zl,purple:Ql,magenta:ec,grey:tc};const LR=Object.freeze(Object.defineProperty({__proto__:null,blue:Ao,blueDark:Xl,cyan:Bl,cyanDark:Jl,geekblue:Ul,geekblueDark:Zl,generate:R_,gold:Ml,goldDark:Hl,gray:NR,green:jl,greenDark:Yl,grey:To,greyDark:tc,lime:Ll,limeDark:Gl,magenta:ql,magentaDark:ec,orange:Nl,orangeDark:zl,presetDarkPalettes:kR,presetPalettes:MR,presetPrimaryColors:FR,purple:Wl,purpleDark:Ql,red:Dl,redDark:Vl,volcano:Fl,volcanoDark:Rl,yellow:kl,yellowDark:Kl},Symbol.toStringTag,{value:"Module"}));function z_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function BR(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var H_="data-rc-order",K_="data-rc-priority",UR="rc-util-key",Hd=new Map;function G_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):UR}function Kd(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function WR(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Gd(e){return Array.from((Hd.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Y_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!jR())return null;var r=t.csp,n=t.prepend,i=t.priority,a=i===void 0?0:i,s=WR(n),l=s==="prependQueue",u=document.createElement("style");u.setAttribute(H_,s),l&&a&&u.setAttribute(K_,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var f=Kd(t),d=f.firstChild;if(n){if(l){var p=(t.styles||Gd(f)).filter(function(m){if(!["prepend","prependQueue"].includes(m.getAttribute(H_)))return!1;var y=Number(m.getAttribute(K_)||0);return a>=y});if(p.length)return f.insertBefore(u,p[p.length-1].nextSibling),u}f.insertBefore(u,d)}else f.appendChild(u);return u}function qR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Kd(t);return(t.styles||Gd(r)).find(function(n){return n.getAttribute(G_(t))===e})}function VR(e,t){var r=Hd.get(e);if(!r||!BR(document,r)){var n=Y_("",t),i=n.parentNode;Hd.set(e,i),e.removeChild(n)}}function RR(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Kd(r),i=Gd(n),a=rn(rn({},r),{},{styles:i});VR(n,a);var s=qR(t,a);if(s){var l,u;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var f;s.nonce=(f=a.csp)===null||f===void 0?void 0:f.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var d=Y_(e,a);return d.setAttribute(G_(a),t),d}function J_(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function zR(e){return J_(e)instanceof ShadowRoot}function HR(e){return zR(e)?J_(e):null}var Yd={},Jd=[],KR=function(t){Jd.push(t)};function GR(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Jd.reduce(function(n,i){return i(n??"","warning")},t);r&&console.error("Warning: ".concat(r))}}function YR(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Jd.reduce(function(n,i){return i(n??"","note")},t);r&&console.warn("Note: ".concat(r))}}function JR(){Yd={}}function X_(e,t,r){!t&&!Yd[r]&&(e(!1,r),Yd[r]=!0)}function rc(e,t){X_(GR,e,t)}function XR(e,t){X_(YR,e,t)}rc.preMessage=KR,rc.resetWarned=JR,rc.noteOnce=XR;function ZR(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function QR(e,t){rc(e,"[@ant-design/icons] ".concat(t))}function Z_(e){return wi(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(wi(e.icon)==="object"||typeof e.icon=="function")}function Q_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[ZR(r)]=n}return t},{})}function Xd(e,t,r){return r?B.createElement(e.tag,rn(rn({key:t},Q_(e.attrs)),r),(e.children||[]).map(function(n,i){return Xd(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):B.createElement(e.tag,rn({key:t},Q_(e.attrs)),(e.children||[]).map(function(n,i){return Xd(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function e1(e){return R_(e)[0]}function t1(e){return e?Array.isArray(e)?e:[e]:[]}var e8=`
26
26
  .anticon {
27
27
  display: inline-flex;
28
28
  align-items: center;
@@ -77,59 +77,59 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
77
77
  transform: rotate(360deg);
78
78
  }
79
79
  }
80
- `,t8=function(t){var r=j.useContext(x_),n=r.csp,i=r.prefixCls,a=r.layer,s=e8;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
80
+ `,t8=function(t){var r=B.useContext(x_),n=r.csp,i=r.prefixCls,a=r.layer,s=e8;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
81
81
  `).concat(s,`
82
- }`)),j.useEffect(function(){var l=t.current,u=HR(l);RR(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:u})},[])},r8=["icon","className","onClick","style","primaryColor","secondaryColor"],To={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function n8(e){var t=e.primaryColor,r=e.secondaryColor;To.primaryColor=t,To.secondaryColor=r||e1(t),To.calculated=!!r}function i8(){return tn({},To)}var va=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,s=t.primaryColor,l=t.secondaryColor,u=N_(t,r8),f=at.useRef(),d=To;if(s&&(d={primaryColor:s,secondaryColor:l||e1(s)}),t8(f),QR(Z_(r),"icon should be icon definiton, but got ".concat(r)),!Z_(r))return null;var p=r;return p&&typeof p.icon=="function"&&(p=tn(tn({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),Jd(p.icon,"svg-".concat(p.name),tn(tn({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:f}))};va.displayName="IconReact",va.getTwoToneColors=i8,va.setTwoToneColors=n8;function r1(e){var t=t1(e),r=F_(t,2),n=r[0],i=r[1];return va.setTwoToneColors({primaryColor:n,secondaryColor:i})}function a8(){var e=va.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var o8=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];r1(Oo.primary);var $r=at.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,u=e.twoToneColor,f=N_(e,o8),d=at.useContext(x_),p=d.prefixCls,m=p===void 0?"anticon":p,y=d.rootClassName,_=Il(y,m,Kt(Kt({},"".concat(m,"-").concat(n.name),!!n.name),"".concat(m,"-spin"),!!i||n.name==="loading"),r),w=s;w===void 0&&l&&(w=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,g=t1(u),C=F_(g,2),S=C[0],E=C[1];return at.createElement("span",_r({role:"img","aria-label":n.name},f,{ref:t,tabIndex:w,onClick:l,className:_}),at.createElement(va,{icon:n,primaryColor:S,secondaryColor:E,style:v}))});$r.displayName="AntdIcon",$r.getTwoToneColor=a8,$r.setTwoToneColor=r1;var s8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},l8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:s8}))},Xd=at.forwardRef(l8);process.env.NODE_ENV!=="production"&&(Xd.displayName="CheckOutlined");var c8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},u8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:c8}))},n1=at.forwardRef(u8);process.env.NODE_ENV!=="production"&&(n1.displayName="DeleteOutlined");var f8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},d8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:f8}))},i1=at.forwardRef(d8);process.env.NODE_ENV!=="production"&&(i1.displayName="DownOutlined");var h8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},p8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:h8}))},Zd=at.forwardRef(p8);process.env.NODE_ENV!=="production"&&(Zd.displayName="LeftOutlined");var m8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},g8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:m8}))},a1=at.forwardRef(g8);process.env.NODE_ENV!=="production"&&(a1.displayName="MenuOutlined");var y8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},v8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:y8}))},o1=at.forwardRef(v8);process.env.NODE_ENV!=="production"&&(o1.displayName="PlusOutlined");var b8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},_8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:b8}))},Qd=at.forwardRef(_8);process.env.NODE_ENV!=="production"&&(Qd.displayName="RightOutlined");var $8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},w8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:$8}))},s1=at.forwardRef(w8);process.env.NODE_ENV!=="production"&&(s1.displayName="UpOutlined");var S8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},C8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:S8}))},l1=at.forwardRef(C8);process.env.NODE_ENV!=="production"&&(l1.displayName="UploadOutlined");function c1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=c1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function E8(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=c1(e))&&(n&&(n+=" "),n+=t);return n}const u1=e=>{const{canAdd:t,disabled:r,idSchema:n,uiSchema:i,items:a,onAddClick:s,readonly:l,registry:u,required:f,schema:d,title:p}=e,m=we(i),y=Se("ArrayFieldDescriptionTemplate",u,m),_=Se("ArrayFieldItemTemplate",u,m),w=Se("ArrayFieldTitleTemplate",u,m),v=p||m.title?$.jsxs($.Fragment,{children:[$.jsx(w,{idSchema:n,title:m.title||p,required:f,schema:d,uiSchema:i,registry:u}),(m.description||d.description)&&$.jsx("div",{style:{marginTop:"8px"},children:$.jsx(y,{idSchema:n,description:m.description||d.description,schema:d,uiSchema:i,registry:u})})]}):void 0;return $.jsx("div",{className:E8("rjsf-array-field",m.classNames),children:$.jsx(re.Card,{title:v,style:{borderColor:"#e2e8f0"},children:$.jsxs(re.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[a&&a.map(({key:g,...C})=>$.jsx(_,{...C},g)),t&&$.jsxs(re.Button,{type:"dashed",onClick:s,disabled:r||l,size:"small",block:!0,icon:$.jsx(o1,{}),children:["Add ",p||"Item"]})]})})})},f1=e=>{const{children:t,disabled:r,hasToolbar:n,buttonsProps:i,readonly:a}=e,{hasMoveDown:s,hasMoveUp:l,hasRemove:u,index:f,onDropIndexClick:d,onReorderClick:p}=i,m=n?$.jsxs(re.Space,{size:"small",children:[(l||s)&&$.jsx(a1,{style:{color:"#94a3b8",fontSize:"16px"}}),l&&$.jsx(re.Button,{type:"text",size:"small",disabled:r||a,onClick:p(f,f-1),icon:$.jsx(s1,{}),title:"Move up"}),s&&$.jsx(re.Button,{type:"text",size:"small",disabled:r||a,onClick:p(f,f+1),icon:$.jsx(i1,{}),title:"Move down"}),u&&$.jsx(re.Button,{type:"text",size:"small",danger:!0,disabled:r||a,onClick:d(f),icon:$.jsx(n1,{}),title:"Remove"})]}):null;return $.jsx(re.Card,{style:{borderColor:"#e2e8f0",position:"relative"},extra:m,bodyStyle:{padding:"16px"},children:$.jsx("div",{style:n?{paddingRight:"96px"}:void 0,children:t})})},d1=({currentStep:e,totalSteps:t,progressPercentage:r,className:n,style:i})=>$.jsxs("div",{className:n,style:{...i},children:[$.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",marginBottom:"12px"},children:[$.jsxs("span",{style:{fontWeight:500,color:"#374151"},children:["Step ",e," of ",t]}),$.jsxs("span",{style:{fontWeight:500,color:"#374151"},children:[r,"% Complete"]})]}),$.jsx(re.Progress,{percent:r,showInfo:!1,strokeColor:"#1f2937",trailColor:"#e5e7eb"})]}),h1=({steps:e,currentStep:t,onStepChange:r,className:n,style:i})=>{const a=l=>{r&&!e[l].disabled&&r(l)},s=(l,u,f)=>l?{backgroundColor:"#1f2937",borderColor:"#1f2937",color:"white"}:u&&!l?{backgroundColor:"#f0fdf4",borderColor:"#86efac",color:"#15803d"}:f?{backgroundColor:"#f3f4f6",borderColor:"#f3f4f6",color:"#9ca3af",cursor:"not-allowed"}:{};return $.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",overflowX:"auto",...i},className:n,children:e.map((l,u)=>{const f=u===t,d=l.completed,p=l.disabled,m=l.icon;return $.jsxs(re.Button,{type:f?"primary":"default",size:"small",onClick:()=>a(u),disabled:p,style:{borderRadius:"9999px",display:"flex",alignItems:"center",gap:"8px",...s(f,d||!1,p||!1)},icon:m?$.jsx(m,{className:""}):void 0,children:[$.jsx("span",{style:{fontWeight:500,fontSize:"14px",whiteSpace:"nowrap"},children:l.title}),d&&!f&&$.jsx(re.Badge,{count:$.jsx(Xd,{style:{fontSize:"10px",color:"#15803d"}}),style:{backgroundColor:"#dcfce7",marginLeft:"4px"}})]},l.id)})})},p1=({onPrevious:e,onNext:t,onSubmit:r,canGoNext:n=!0,canGoPrevious:i=!0,isLastStep:a=!1,submitLabel:s="Submit",nextLabel:l="Next",previousLabel:u="Previous",className:f,style:d})=>{const p=()=>{a&&r?r():t&&t()};return $.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",...d},className:f,children:[$.jsx(re.Button,{onClick:e,disabled:!i||!e,icon:$.jsx(Zd,{}),children:u}),$.jsxs(re.Button,{type:a?"primary":"default",onClick:p,disabled:!n,style:a?{backgroundColor:"#52c41a",borderColor:"#52c41a"}:void 0,children:[a?s:l,!a&&$.jsx(Qd,{})]})]})},O8=({title:e,subtitle:t,steps:r,currentStep:n,children:i,onStepChange:a,onPrevious:s,onNext:l,onSubmit:u,canGoNext:f=!0,canGoPrevious:d=!0,isLastStep:p=!1,submitLabel:m="Submit",nextLabel:y="Next",previousLabel:_="Previous",className:w})=>{const v=r.filter(S=>S.completed).length,g=r.length,C=Math.round(v/g*100);return $.jsx("div",{className:w,style:{minHeight:"100vh",backgroundColor:"#f5f5f5",padding:"32px 0"},children:$.jsxs("div",{style:{maxWidth:"896px",margin:"0 auto",padding:"0 16px"},children:[$.jsxs("div",{style:{textAlign:"center",marginBottom:"32px"},children:[$.jsx("h1",{style:{fontSize:"30px",fontWeight:"bold",color:"#1f2937",marginBottom:"8px"},children:e}),t&&$.jsx("p",{style:{fontSize:"16px",color:"#6b7280",marginBottom:"32px"},children:t}),$.jsx("div",{style:{marginBottom:"32px"},children:$.jsx(d1,{currentStep:n+1,totalSteps:g,progressPercentage:C})}),$.jsx("div",{style:{marginBottom:"32px"},children:$.jsx(h1,{steps:r,currentStep:n,onStepChange:a})})]}),$.jsx("div",{style:{backgroundColor:"white",borderRadius:"8px",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",border:"1px solid #e5e7eb",padding:"32px",marginBottom:"32px"},children:i}),$.jsx(p1,{onPrevious:s,onNext:l,onSubmit:u,canGoNext:f,canGoPrevious:d,isLastStep:p,submitLabel:m,nextLabel:y,previousLabel:_})]})})},m1=({title:e,description:t,properties:r,required:n,uiSchema:i,idSchema:a,schema:s,registry:l})=>{const u=we(i),f=Se("TitleFieldTemplate",l,u),d=Se("DescriptionFieldTemplate",l,u),p=e&&e!==s.title,m=u.icon,y=u.columns||1,_=u.sectionClass||"",w=()=>{switch(y){case 2:return"repeat(2, 1fr)";case 3:return"repeat(3, 1fr)";case 4:return"repeat(4, 1fr)";default:return"1fr"}};return $.jsxs("div",{className:_,style:{display:"flex",flexDirection:"column",gap:"24px"},children:[p&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[m&&j.createElement(m,{className:""}),$.jsx(f,{id:a.$id,title:e,required:n,schema:s,uiSchema:i,registry:l})]}),t&&$.jsx(d,{id:a.$id,description:t,schema:s,uiSchema:i,registry:l})]}),$.jsx("div",{style:{display:"grid",gap:"24px",gridTemplateColumns:w()},children:r.map(v=>{const g=v.name==="description"||v.name==="notes"||v.name==="primaryActivity"||v.name==="residentialAddress";return $.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",gridColumn:g?"1 / -1":void 0},children:v.content},v.name)})})]})},g1=({title:e,description:t,properties:r,uiSchema:n,schema:i,sectionTitle:a,sectionDescription:s,sectionIcon:l})=>{const u=we(n),f=a||e,d=s||t,p=u.columns||1;return $.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[f&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[l&&$.jsx(l,{className:""}),$.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:0},children:f})]}),d&&$.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:0},children:d})]}),e&&e!==f&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",borderBottom:"1px solid #e5e7eb",paddingBottom:"16px"},children:[$.jsx("h3",{style:{fontSize:"18px",fontWeight:500,color:"#111827",margin:0},children:e}),t&&$.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:0},children:t})]}),$.jsx("div",{style:{display:"grid",gap:"24px",gridTemplateColumns:p===1?"1fr":p===2?"repeat(2, 1fr)":"repeat(3, 1fr)",gridAutoRows:"min-content"},children:r.map(m=>{var v,g,C,S,E,A;const y=(v=i.properties)==null?void 0:v[m.name],_=y&&typeof y=="object"&&"type"in y&&y.type==="array",w=((g=m.name)==null?void 0:g.includes("address"))||((C=m.name)==null?void 0:C.includes("description"))||((S=m.name)==null?void 0:S.includes("notes"))||((E=m.name)==null?void 0:E.includes("Activity"))||_||((A=n==null?void 0:n[m.name])==null?void 0:A["ui:widget"])==="textarea";return $.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px",gridColumn:w&&p>1?"1 / -1":void 0},children:m.content},m.name)})})]})},y1=({uiSchema:e,...t})=>{const{submitText:r,norender:n,props:i={}}=Ld(e);return n?null:$.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:"16px",borderTop:"1px solid #d9d9d9"},children:$.jsx(re.Button,{type:"primary",htmlType:"submit",size:"large",style:{minWidth:"96px"},...i,...t,children:r||"Submit"})})},v1=({id:e,children:t,displayLabel:r,rawErrors:n=[],errors:i,help:a,description:s,rawDescription:l,classNames:u,style:f,disabled:d,label:p,hidden:m,readonly:y,required:_,schema:w,uiSchema:v,registry:g})=>{var Z;const C=we(v),S=Se("WrapIfAdditionalTemplate",g,C);if(m)return $.jsx("div",{style:{display:"none"},children:t});const E=n.length>0?"error":void 0,x=a&&((Z=a.props)==null?void 0:Z.help)?a:r&&l?s:void 0,N=n.length>0?i:void 0;return $.jsx(S,{classNames:u,style:f,disabled:d,id:e,label:p,onDropPropertyClick:G=>()=>{},onKeyChange:G=>()=>{},readonly:y,required:_,schema:w,uiSchema:v,registry:g,children:$.jsxs(re.Form.Item,{label:r?p:void 0,required:_,validateStatus:E,help:x,labelCol:{span:24},wrapperCol:{span:24},style:{...f},className:`${u||""} vertical-form-item`,children:[t,N]})})},b1={address:Lg,phone:jg,currency:Bg},eh={FieldTemplate:v1,ArrayFieldTemplate:u1,ArrayFieldItemTemplate:f1,WizardObjectFieldTemplate:m1,WizardSectionTemplate:g1,ButtonTemplates:{SubmitButton:y1}},_1=({id:e,value:t,required:r,disabled:n,readonly:i,onChange:a,onBlur:s,onFocus:l,schema:u})=>{const f=dt(e,u),d=async y=>{const _=y.target.value;a(_),await f.onChange(_)},p=async y=>{const _=y.target.value;s&&s(e,_),await f.onBlur(_)},m=async y=>{const _=y.target.value;l&&l(e,_),await f.onFocus(_)};return $.jsx(re.Input,{id:e,type:"color",value:t||"#000000",required:r,disabled:n||i,onChange:d,onBlur:p,onFocus:m,style:{height:"40px",width:"100%",cursor:"pointer"}})},Po=(e={})=>{const{emptyValue:t,size:r,placeholder:n,prefix:i,suffix:a,allowClear:s,bordered:l,variant:u,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,addonBefore:w,addonAfter:v,...g}=e;let C=u;return l!==void 0&&!u&&(C=l?"outlined":"borderless"),{size:r,placeholder:n,prefix:i,suffix:a,allowClear:s,variant:C,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,addonBefore:w,addonAfter:v,...g}},A8=(e={})=>{const{emptyValue:t,rows:r,autoSize:n,size:i,placeholder:a,allowClear:s,bordered:l,variant:u,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,prefix:w,suffix:v,addonBefore:g,addonAfter:C,...S}=e;let E=u;return l!==void 0&&!u&&(E=l?"outlined":"borderless"),{size:i,placeholder:a,allowClear:s,variant:E,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,rows:r,autoSize:n,...S}},$1=(e={})=>{const{emptyValue:t,format:r,picker:n,placeholder:i,placement:a,showTime:s,showNow:l,showToday:u,disabledDate:f,size:d,bordered:p,variant:m,suffixIcon:y,style:_,className:w,status:v,...g}=e;let C=m;p!==void 0&&!m&&(C=p?"outlined":"borderless");const S={format:r,picker:n,placement:a,showTime:s,showNow:l,showToday:u,disabledDate:f,size:d,variant:C,suffixIcon:y,style:_,className:w,status:v,...g};return i&&(S.placeholder=i),S},T8=(e={})=>{const{emptyValue:t,size:r,placeholder:n,prefix:i,min:a,max:s,step:l,precision:u,decimalSeparator:f,formatter:d,parser:p,keyboard:m,controls:y,bordered:_,variant:w,style:v,className:g,status:C,addonBefore:S,addonAfter:E,...A}=e;let x=w;return _!==void 0&&!w&&(x=_?"outlined":"borderless"),{size:r,placeholder:n,prefix:i,min:a,max:s,step:l,precision:u,decimalSeparator:f,formatter:d,parser:p,keyboard:m,controls:y,variant:x,style:v,className:g,status:C,addonBefore:S,addonAfter:E,...A}},rn=e=>(e||[]).length>0,Io=(e,t="")=>(e==null?void 0:e.emptyValue)!==void 0?e.emptyValue:t,th=(e,t,r="")=>e===""||e===null||e===void 0?Io(t,r):e,P8=(e={})=>({min:e.minimum,max:e.maximum,step:e.multipleOf}),nc=(e,t=!1)=>typeof e=="string"?e.toLowerCase()==="true":typeof e=="boolean"?e:t,rh=({id:e,value:t,disabled:r,readonly:n,onChange:i,onBlur:a,onFocus:s,options:l,schema:u,label:f,required:d})=>{const p=u.minimum||0,m=u.maximum||100,y=l.step!==void 0?l.step:u.multipleOf||1,_=dt(e,u),w=l.marks,v=nc(l.dots,!1),g=l.included!==!1,C=nc(l.vertical,!1),S=nc(l.range,!1),E=l.tooltip||{},A=l.trackStyle,x=l.handleStyle,N=l.style,Z=l.onAfterChange,ae={id:e,min:p,max:m,value:t!==void 0?t:S?[p,m]:p,onChange:async k=>{i(k),await _.onChange(k)},onAfterChange:k=>{a&&a(e,k),Z&&Z(k)},onFocus:async()=>{s==null||s(e,t),await _.onFocus(t)},onBlur:async()=>{a==null||a(e,t),await _.onBlur(t)},disabled:r||n,vertical:C,range:S,dots:v,included:g,style:N};y!==null&&(ae.step=y),w!==void 0&&(ae.marks=w),E&&(ae.tooltip=E),A&&(ae.trackStyle=A),x&&(ae.handleStyle=x);const Q=()=>S&&Array.isArray(t)?`${t[0]} - ${t[1]}`:t!==void 0?t:p;return $.jsxs("div",{style:{marginBottom:"16px"},children:[(f||u.title)&&$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[f||u.title,d&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),u.description&&$.jsx("div",{style:{marginBottom:"4px",color:"#666",fontSize:"14px"},children:u.description}),!C&&!l.hideValue&&$.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginBottom:"8px"},children:$.jsx("span",{style:{fontSize:"14px",fontWeight:500,fontVariantNumeric:"tabular-nums"},children:Q()})}),$.jsx(re.Slider,{...ae})]})},w1=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,onFocus:l,onBlur:u,options:f,schema:d})=>{const p=dt(e,d),m=async Z=>{s(Z),await p.onChange(Z)},y=async()=>{l==null||l(e,t),await p.onFocus(t)},_=async()=>{u==null||u(e,t),await p.onBlur(t)},w=Number(f.count||f.max||d.maximum||5),v=nc(f.allowHalf,!1),g=f.allowClear!==!1,C=f.character,S=f.tooltips,E=f.style,A=f.onHoverChange,x={value:t||0,onChange:m,onFocus:y,onBlur:_,disabled:n||i,count:w,allowHalf:v,allowClear:r?!1:g,style:E};C&&(x.character=C),A&&(x.onHoverChange=A);const N=()=>S&&S.length>0?$.jsx(re.Rate,{...x,tooltips:S}):$.jsx(re.Rate,{...x});return $.jsxs("div",{style:{marginBottom:"16px"},children:[(a||d.title)&&$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a||d.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),d.description&&$.jsx("div",{style:{marginBottom:"4px",color:"#666",fontSize:"14px"},children:d.description}),N()]})},ic=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,schema:p,rawErrors:m=[]}=e,y=dt(t,p),_=A=>{const x=A===null?Io(d,void 0):A;l(x),y.onChange(x).catch(console.error)},w=async()=>{u&&u(t,r),await y.onBlur(r)},v=async()=>{f&&f(t,r),await y.onFocus(r)},g=rn(m),C=P8(p),S=T8(d),E={...S,min:S.min??C.min,max:S.max??C.max,step:S.step??C.step};return $.jsx(re.InputNumber,{id:t,value:r??void 0,placeholder:s||E.placeholder,required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,status:g?"error":void 0,style:{width:"100%",...E.style},...E})},ac=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=dt(t,m),_=async S=>{const E=th(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=rn(p),C=Po(d);return $.jsx(re.Input,{id:t,type:"tel",value:r||"",placeholder:s||C.placeholder||"Enter phone number",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},nh=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=dt(t,m),_=async S=>{const E=th(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=rn(p),C=Po(d);return $.jsx(re.Input,{id:t,type:"email",value:r||"",placeholder:s||C.placeholder||"Enter email address",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},ih=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=dt(t,m),_=async S=>{const E=th(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=rn(p),C=Po(d);return $.jsx(re.Input,{id:t,type:"url",value:r||"",placeholder:s||C.placeholder||"Enter URL",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},xo=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=dt(t,m),_=rn(p),w=async S=>{const E=S.target.value===""?Io(d):S.target.value;l(E),await y.onChange(E)},v=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},g=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},C=Po(d);return $.jsx(re.Input,{id:t,value:r||"",placeholder:s||C.placeholder,required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,...C})},S1=Object.freeze(Object.defineProperty({__proto__:null,TextWidget:xo,default:xo},Symbol.toStringTag,{value:"Module"})),{TextArea:I8}=re.Input,Do=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=dt(t,m),_=rn(p),w=async E=>{const A=E.target.value===""?Io(d):E.target.value;l(A),await y.onChange(A)},v=async E=>{const A=E.target.value;u&&u(t,A),await y.onBlur(A)},g=async E=>{const A=E.target.value;f&&f(t,A),await y.onFocus(A)},C=A8(d),S=C.rows||4;return $.jsx(I8,{id:t,value:r||"",placeholder:s||C.placeholder,required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,style:{resize:"vertical",...C.style},...C,rows:S})},C1=Object.freeze(Object.defineProperty({__proto__:null,TextareaWidget:Do,default:Do},Symbol.toStringTag,{value:"Module"})),Fo=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=dt(t,m),_=rn(p),w=async A=>{const x=A.target.value===""?Io(d):A.target.value;l(x),await y.onChange(x)},v=async A=>{const x=A.target.value;u&&u(t,x),await y.onBlur(x)},g=async A=>{const x=A.target.value;f&&f(t,x),await y.onFocus(x)},C=Po(d),{visibilityToggle:S=!0,iconRender:E}=d;return $.jsx(re.Input.Password,{id:t,value:r||"",placeholder:s||C.placeholder||"Enter password",required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,visibilityToggle:S,iconRender:E,...C})},E1=Object.freeze(Object.defineProperty({__proto__:null,PasswordWidget:Fo,default:Fo},Symbol.toStringTag,{value:"Module"})),x8=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,onBlur:l,onFocus:u,options:f,schema:d})=>{const p=f.inputType||"date",m=dt(e,d),y=async v=>{const g=v.target.value;s(g),await m.onChange(g)},_=async v=>{const g=v.target.value;l&&l(e,g),await m.onBlur(g)},w=async v=>{const g=v.target.value;u&&u(e,g),await m.onFocus(g)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a||d.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:e,type:p,value:t||"",required:r,disabled:n||i,onChange:y,onBlur:_,onFocus:w,min:typeof f.minDate=="string"||typeof f.minDate=="number"?f.minDate:void 0,max:typeof f.maxDate=="string"||typeof f.maxDate=="number"?f.maxDate:void 0,style:{width:"100%"}})]})};var O1={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Nr,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",l="minute",u="hour",f="day",d="week",p="month",m="quarter",y="year",_="date",w="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var k=["th","st","nd","rd"],W=Q%100;return"["+Q+(k[(W-20)%10]||k[W]||k[0])+"]"}},S=function(Q,k,W){var R=String(Q);return!R||R.length>=k?Q:""+Array(k+1-R.length).join(W)+Q},E={s:S,z:function(Q){var k=-Q.utcOffset(),W=Math.abs(k),R=Math.floor(W/60),U=W%60;return(k<=0?"+":"-")+S(R,2,"0")+":"+S(U,2,"0")},m:function Q(k,W){if(k.date()<W.date())return-Q(W,k);var R=12*(W.year()-k.year())+(W.month()-k.month()),U=k.clone().add(R,p),J=W-U<0,L=k.clone().add(R+(J?-1:1),p);return+(-(R+(W-U)/(J?U-L:L-U))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M:p,y,w:d,d:f,D:_,h:u,m:l,s,ms:a,Q:m}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},A="en",x={};x[A]=C;var N="$isDayjsObject",Z=function(Q){return Q instanceof te||!(!Q||!Q[N])},G=function Q(k,W,R){var U;if(!k)return A;if(typeof k=="string"){var J=k.toLowerCase();x[J]&&(U=J),W&&(x[J]=W,U=J);var L=k.split("-");if(!U&&L.length>1)return Q(L[0])}else{var D=k.name;x[D]=k,U=D}return!R&&U&&(A=U),U||!R&&A},H=function(Q,k){if(Z(Q))return Q.clone();var W=typeof k=="object"?k:{};return W.date=Q,W.args=arguments,new te(W)},ee=E;ee.l=G,ee.i=Z,ee.w=function(Q,k){return H(Q,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var te=function(){function Q(W){this.$L=G(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[N]=!0}var k=Q.prototype;return k.parse=function(W){this.$d=function(R){var U=R.date,J=R.utc;if(U===null)return new Date(NaN);if(ee.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var L=U.match(v);if(L){var D=L[2]-1||0,z=(L[7]||"0").substring(0,3);return J?new Date(Date.UTC(L[1],D,L[3]||1,L[4]||0,L[5]||0,L[6]||0,z)):new Date(L[1],D,L[3]||1,L[4]||0,L[5]||0,L[6]||0,z)}}return new Date(U)}(W),this.init()},k.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},k.$utils=function(){return ee},k.isValid=function(){return this.$d.toString()!==w},k.isSame=function(W,R){var U=H(W);return this.startOf(R)<=U&&U<=this.endOf(R)},k.isAfter=function(W,R){return H(W)<this.startOf(R)},k.isBefore=function(W,R){return this.endOf(R)<H(W)},k.$g=function(W,R,U){return ee.u(W)?this[R]:this.set(U,W)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(W,R){var U=this,J=!!ee.u(R)||R,L=ee.p(W),D=function(ue,he){var be=ee.w(U.$u?Date.UTC(U.$y,he,ue):new Date(U.$y,he,ue),U);return J?be:be.endOf(f)},z=function(ue,he){return ee.w(U.toDate()[ue].apply(U.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(he)),U)},B=this.$W,P=this.$M,F=this.$D,V="set"+(this.$u?"UTC":"");switch(L){case y:return J?D(1,0):D(31,11);case p:return J?D(1,P):D(0,P+1);case d:var X=this.$locale().weekStart||0,oe=(B<X?B+7:B)-X;return D(J?F-oe:F+(6-oe),P);case f:case _:return z(V+"Hours",0);case u:return z(V+"Minutes",1);case l:return z(V+"Seconds",2);case s:return z(V+"Milliseconds",3);default:return this.clone()}},k.endOf=function(W){return this.startOf(W,!1)},k.$set=function(W,R){var U,J=ee.p(W),L="set"+(this.$u?"UTC":""),D=(U={},U[f]=L+"Date",U[_]=L+"Date",U[p]=L+"Month",U[y]=L+"FullYear",U[u]=L+"Hours",U[l]=L+"Minutes",U[s]=L+"Seconds",U[a]=L+"Milliseconds",U)[J],z=J===f?this.$D+(R-this.$W):R;if(J===p||J===y){var B=this.clone().set(_,1);B.$d[D](z),B.init(),this.$d=B.set(_,Math.min(this.$D,B.daysInMonth())).$d}else D&&this.$d[D](z);return this.init(),this},k.set=function(W,R){return this.clone().$set(W,R)},k.get=function(W){return this[ee.p(W)]()},k.add=function(W,R){var U,J=this;W=Number(W);var L=ee.p(R),D=function(P){var F=H(J);return ee.w(F.date(F.date()+Math.round(P*W)),J)};if(L===p)return this.set(p,this.$M+W);if(L===y)return this.set(y,this.$y+W);if(L===f)return D(1);if(L===d)return D(7);var z=(U={},U[l]=n,U[u]=i,U[s]=r,U)[L]||1,B=this.$d.getTime()+W*z;return ee.w(B,this)},k.subtract=function(W,R){return this.add(-1*W,R)},k.format=function(W){var R=this,U=this.$locale();if(!this.isValid())return U.invalidDate||w;var J=W||"YYYY-MM-DDTHH:mm:ssZ",L=ee.z(this),D=this.$H,z=this.$m,B=this.$M,P=U.weekdays,F=U.months,V=U.meridiem,X=function(he,be,Le,ut){return he&&(he[be]||he(R,J))||Le[be].slice(0,ut)},oe=function(he){return ee.s(D%12||12,he,"0")},ue=V||function(he,be,Le){var ut=he<12?"AM":"PM";return Le?ut.toLowerCase():ut};return J.replace(g,function(he,be){return be||function(Le){switch(Le){case"YY":return String(R.$y).slice(-2);case"YYYY":return ee.s(R.$y,4,"0");case"M":return B+1;case"MM":return ee.s(B+1,2,"0");case"MMM":return X(U.monthsShort,B,F,3);case"MMMM":return X(F,B);case"D":return R.$D;case"DD":return ee.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return X(U.weekdaysMin,R.$W,P,2);case"ddd":return X(U.weekdaysShort,R.$W,P,3);case"dddd":return P[R.$W];case"H":return String(D);case"HH":return ee.s(D,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ue(D,z,!0);case"A":return ue(D,z,!1);case"m":return String(z);case"mm":return ee.s(z,2,"0");case"s":return String(R.$s);case"ss":return ee.s(R.$s,2,"0");case"SSS":return ee.s(R.$ms,3,"0");case"Z":return L}return null}(he)||L.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(W,R,U){var J,L=this,D=ee.p(R),z=H(W),B=(z.utcOffset()-this.utcOffset())*n,P=this-z,F=function(){return ee.m(L,z)};switch(D){case y:J=F()/12;break;case p:J=F();break;case m:J=F()/3;break;case d:J=(P-B)/6048e5;break;case f:J=(P-B)/864e5;break;case u:J=P/i;break;case l:J=P/n;break;case s:J=P/r;break;default:J=P}return U?J:ee.a(J)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return x[this.$L]},k.locale=function(W,R){if(!W)return this.$L;var U=this.clone(),J=G(W,R,!0);return J&&(U.$L=J),U},k.clone=function(){return ee.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},Q}(),ae=te.prototype;return H.prototype=ae,[["$ms",a],["$s",s],["$m",l],["$H",u],["$W",f],["$M",p],["$y",y],["$D",_]].forEach(function(Q){ae[Q[1]]=function(k){return this.$g(k,Q[0],Q[1])}}),H.extend=function(Q,k){return Q.$i||(Q(k,te,H),Q.$i=!0),H},H.locale=G,H.isDayjs=Z,H.unix=function(Q){return H(1e3*Q)},H.en=x[A],H.Ls=x,H.p={},H})})(O1);var D8=O1.exports;const oc=Qt(D8),ah=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=dt(t,p),y=async(C,S)=>{const E=Array.isArray(S)?S[0]:S,A=E===""?f.emptyValue:E;s(A),await m.onChange(A)},_=async()=>{l&&l(t,r),await m.onBlur(r)},w=async()=>{u&&u(t,r),await m.onFocus(r)},v=rn(d);if(a)return $.jsx(re.Input,{id:t,type:"date",value:r||"",required:n,disabled:i,readOnly:a,"aria-invalid":v,status:v?"error":void 0});const g=$1(f);return $.jsx(re.DatePicker,{id:t,value:r?oc(r):void 0,placeholder:g.placeholder||"Select a date",disabled:i,onChange:y,onBlur:_,onFocus:w,status:v?"error":g.status,style:{width:"100%",...g.style},format:g.format||"YYYY-MM-DD",...g})},oh=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=dt(t,p),y=rn(d);if(f.useNativeInput||a){const S=async x=>{const N=x.target.value===""?f.emptyValue:x.target.value;s(N),await m.onChange(N)},E=async x=>{const N=x.target.value;l&&l(t,N),await m.onBlur(N)},A=async x=>{const N=x.target.value;u&&u(t,N),await m.onFocus(N)};return $.jsx(re.Input,{id:t,type:"datetime-local",value:r||"",required:n,disabled:i,readOnly:a,onChange:S,onBlur:E,onFocus:A,"aria-invalid":y,status:y?"error":void 0})}const _=async(S,E)=>{const A=Array.isArray(E)?E[0]:E,x=A===""?f.emptyValue:A;s(x),await m.onChange(x)},w=async()=>{l&&l(t,r),await m.onBlur(r)},v=async()=>{u&&u(t,r),await m.onFocus(r)},g=$1(f),C=g.showTime!==void 0?g.showTime:!0;return $.jsx(re.DatePicker,{id:t,value:r?oc(r):void 0,placeholder:g.placeholder||"Select date and time",disabled:i,onChange:_,onBlur:w,onFocus:v,status:y?"error":g.status,style:{width:"100%",...g.style},format:g.format||"YYYY-MM-DD HH:mm:ss",showTime:C,...g})},A1=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,options:l,schema:u})=>{const f=j.useRef(null),d=l.accept||"*/*",p=l.multiple||!1,m=dt(e,u),y=async v=>{const g=v.target.files;if(!g)return;let C;if(p){const S=Array.from(g).map(E=>({name:E.name,size:E.size,type:E.type,lastModified:E.lastModified}));C=S,s(S)}else{const S=g[0];S&&(C={name:S.name,size:S.size,type:S.type,lastModified:S.lastModified},s(C))}C&&await m.onChange(C)},_=async()=>{f.current&&(f.current.value=""),s(null),await m.onChange(null)},w=v=>v<1024?v+" B":v<1024*1024?(v/1024).toFixed(1)+" KB":(v/(1024*1024)).toFixed(1)+" MB";return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"8px",fontWeight:500},children:[a||u.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx("input",{ref:f,id:e,type:"file",accept:d,multiple:p,required:r,disabled:n||i,onChange:y,style:{cursor:"pointer",width:"100%"}}),t&&$.jsx("div",{style:{marginTop:"8px"},children:p&&Array.isArray(t)?$.jsx(re.Space,{wrap:!0,children:t.map((v,g)=>$.jsx(re.Tag,{closable:!n&&!i,onClose:_,style:{display:"flex",alignItems:"center",gap:"4px"},children:$.jsxs("span",{style:{fontSize:"12px"},children:[v.name," (",w(v.size),")"]})},g))}):t&&typeof t=="object"&&"name"in t?$.jsx(re.Tag,{closable:!n&&!i,onClose:_,style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:$.jsxs("span",{style:{fontSize:"12px"},children:[t.name," (",w(t.size),")"]})}):null})]})},sc=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=dt(t,p),[y,_]=j.useState(!1),w=f.useAntUpload===!0,v=typeof f.accept=="string"?f.accept:"*/*",g=typeof f.maxSize=="number"?f.maxSize:void 0,C=rn(d),S=H=>new Promise((ee,te)=>{const ae=new FileReader;ae.onload=()=>{const Q=ae.result;ee(Q)},ae.onerror=Q=>te(Q),ae.readAsDataURL(H)}),E=async H=>{const ee=H.target.files;if(ee&&ee.length>0){const te=ee[0];if(g&&te.size>g*1024*1024){re.message.error(`File size must be less than ${g}MB`);return}try{_(!0);const ae=await S(te);s(ae),await m.onChange(ae)}catch(ae){console.error("Error converting file to base64:",ae),re.message.error("Failed to process file")}finally{_(!1)}}},A=async({file:H,onSuccess:ee,onError:te})=>{const ae=H;if(g&&ae.size>g*1024*1024){re.message.error(`File size must be less than ${g}MB`),te&&te(new Error("File too large"));return}try{_(!0);const Q=await S(ae);s(Q),await m.onChange(Q),ee&&ee("ok"),re.message.success("File uploaded successfully")}catch(Q){console.error("Error converting file to base64:",Q),re.message.error("Failed to upload file"),te&&te(Q)}finally{_(!1)}},x=async()=>{l&&l(t,r),await m.onBlur(r)},N=async()=>{u&&u(t,r),await m.onFocus(r)},Z=async()=>{s(void 0),await m.onChange(void 0)},G=r?[{uid:"-1",name:"Uploaded File",status:"done",url:r}]:[];return w?$.jsx(re.Upload,{id:t,accept:v,fileList:G,customRequest:A,onRemove:Z,disabled:i||a,maxCount:1,beforeUpload:H=>{var ee;if(v!=="*/*"){const te=v.split(",").map(W=>W.trim()),ae=`.${(ee=H.name.split(".").pop())==null?void 0:ee.toLowerCase()}`,Q=H.type;if(!te.some(W=>W.startsWith(".")?ae===W.toLowerCase():W.includes("*")?Q.startsWith(W.replace("*","")):Q===W))return re.message.error(`File type not allowed. Please upload: ${v}`),!1}return!0},children:$.jsx(re.Button,{icon:$.jsx(l1,{}),loading:y,danger:C,children:r?"Replace File":"Click to Upload"})}):$.jsx(re.Input,{id:t,type:"file",required:n,disabled:i||y,readOnly:a,accept:v,onChange:E,onBlur:x,onFocus:N,"aria-invalid":C,className:"file:mr-4 file:py-1 file:px-2 file:rounded file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",status:C?"error":void 0})};var yt=(e=>(e.DROPDOWN="dropdown",e.RADIO="radio",e.CHECKBOX="checkbox",e))(yt||{});function T1(e){return e.type==="static"}function P1(e){return e.type==="api"}function sh(e){return e.type==="websocket"}function I1(e){return e==="checkbox"}const No={presentationMode:"dropdown",multiple:!1,allowClear:!0,disabled:!1,readonly:!1,size:"middle",search:{enabled:!1,minLength:1,debounceMs:300,caseSensitive:!1,searchFields:["label"]},accessibility:{announceChanges:!0,keyboard:{arrowKeys:!0,typeAhead:!0,homeEnd:!0}}},lh={ttl:3e5,persistent:!1,storageType:"memory"},Mo={type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},x1={maxAttempts:3,baseDelayMs:1e3,maxDelayMs:1e4,backoffMultiplier:2,jitter:!0},pt=class pt{constructor(t={},r={},n){pe(this,"cache");pe(this,"retryConfig");pe(this,"loadingState");pe(this,"errorState");pe(this,"metrics");pe(this,"eventCallbacks");pe(this,"instanceId");pe(this,"isDestroyed",!1);pe(this,"supportsCaching",!0);pe(this,"supportsRealTime",!1);pt.instanceCount++,this.instanceId=`datasource_${pt.instanceCount}_${Date.now()}`,this.cache={...lh,...t},this.retryConfig={...x1,...r},this.eventCallbacks=n,this.loadingState={isLoading:!1,message:"",progress:0},this.errorState={hasError:!1,message:"",recoverable:!0},this.metrics={requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0},pt.instanceCount===1&&this.startCacheCleanup()}async fetchOptions(){var n,i,a,s;if(this.isDestroyed)throw new Error("DataSourceProvider has been destroyed");const t=performance.now(),r=this.getCacheKey();try{if(this.supportsCaching&&r){const u=this.getCachedData(r);if(u)return this.metrics.cacheHitCount++,(i=(n=this.eventCallbacks)==null?void 0:n.onCacheHit)==null||i.call(n,this,r),this.logDebug(`Cache hit for key: ${r}`),u;this.metrics.cacheMissCount++,(s=(a=this.eventCallbacks)==null?void 0:a.onCacheMiss)==null||s.call(a,this,r),this.logDebug(`Cache miss for key: ${r}`)}const l=await this.fetchWithRetry();return this.supportsCaching&&r&&l.length>0&&(this.setCachedData(r,l),this.logDebug(`Cached ${l.length} options with key: ${r}`)),this.updateMetrics(t,!0),l}catch(l){throw this.updateMetrics(t,!1),this.handleError(l instanceof Error?l:new Error(String(l))),l}}getLoadingState(){return{...this.loadingState}}getErrorState(){return{...this.errorState}}getMetrics(){return{...this.metrics}}clearCache(t){var r,n;t?(pt.memoryCache.delete(t),this.logDebug(`Cleared cache for key: ${t}`)):(pt.memoryCache.clear(),this.logDebug("Cleared all cache entries")),(n=(r=this.eventCallbacks)==null?void 0:r.onCacheCleared)==null||n.call(r,this,t||void 0)}clearError(){this.errorState={hasError:!1,message:"",recoverable:!0},this.logDebug("Error state cleared")}resetMetrics(){this.metrics={requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0},this.logDebug("Metrics reset")}hasCachedData(t){const r=t||this.getCacheKey();if(!r)return!1;const n=pt.memoryCache.get(r);return n?Date.now()-n.timestamp>n.ttl?(pt.memoryCache.delete(r),!1):!0:!1}cleanup(){if(this.isDestroyed)return;this.isDestroyed=!0;const t=this.getCacheKey();this.clearCache(t??void 0),this.cleanupResources(),pt.instanceCount--,pt.instanceCount===0&&(this.stopCacheCleanup(),pt.memoryCache.clear()),this.logDebug("DataSourceProvider cleanup completed")}cleanupResources(){}setLoadingState(t,r,n){var i,a;this.loadingState={isLoading:t,message:r||(t?"Loading options...":""),progress:n??(t?void 0:100)},t&&((a=(i=this.eventCallbacks)==null?void 0:i.onLoadingStart)==null||a.call(i,this))}validateAndTransformData(t){if(!Array.isArray(t))throw new Error("Data source must return an array of options");return t.map((r,n)=>{if(!r||typeof r!="object")throw new Error(`Invalid option at index ${n}: must be an object`);if(typeof r.label!="string")throw new Error(`Invalid option at index ${n}: label must be a string`);if(r.value===void 0||r.value===null)throw new Error(`Invalid option at index ${n}: value cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof r.value))throw new Error(`Invalid option at index ${n}: value must be string, number, or boolean`);return{label:r.label,value:r.value,disabled:!!r.disabled,metadata:r.metadata||{}}})}logDebug(t,r){process.env.NODE_ENV==="development"&&console.debug(`[DataSourceProvider:${this.instanceId}] ${t}`,r||"")}logError(t,r){console.error(`[DataSourceProvider:${this.instanceId}] ${t}`,r||"")}async fetchWithRetry(){var r,n;let t=null;for(let i=1;i<=this.retryConfig.maxAttempts;i++)try{this.setLoadingState(!0,`Fetching options (attempt ${i})...`);const a=await this.fetchData(),s=this.validateAndTransformData(a);return this.setLoadingState(!1),this.clearError(),(n=(r=this.eventCallbacks)==null?void 0:r.onLoadingComplete)==null||n.call(r,this,s),s}catch(a){if(t=a instanceof Error?a:new Error(String(a)),this.logError(`Attempt ${i} failed:`,t),i===this.retryConfig.maxAttempts)break;const s=this.retryConfig.baseDelayMs*Math.pow(this.retryConfig.backoffMultiplier,i-1);let l=Math.min(s,this.retryConfig.maxDelayMs);if(this.retryConfig.jitter){const u=l*.25,f=(Math.random()-.5)*2*u;l=Math.max(0,l+f)}this.logDebug(`Retrying in ${Math.round(l)}ms...`),this.setLoadingState(!0,`Retrying in ${Math.round(l/1e3)}s...`,i/this.retryConfig.maxAttempts*100),await new Promise(u=>setTimeout(u,l))}throw this.setLoadingState(!1),t||new Error("Max retry attempts exceeded")}getCachedData(t){const r=pt.memoryCache.get(t);return r?Date.now()-r.timestamp>r.ttl?(pt.memoryCache.delete(t),null):[...r.data]:null}setCachedData(t,r){const n={data:[...r],timestamp:Date.now(),ttl:this.cache.ttl||lh.ttl,key:t};pt.memoryCache.set(t,n)}handleError(t){var r,n;this.errorState={hasError:!0,message:t.message||"An unknown error occurred",code:t.code||"UNKNOWN_ERROR",stack:process.env.NODE_ENV==="development"?t.stack:void 0,recoverable:!0,timestamp:Date.now()},this.metrics.lastErrorTimestamp=Date.now(),(n=(r=this.eventCallbacks)==null?void 0:r.onError)==null||n.call(r,this,t),this.logError("DataSource error:",t)}updateMetrics(t,r){const n=performance.now()-t;this.metrics.requestCount++,this.metrics.lastRequestTimestamp=Date.now(),r?this.metrics.successCount++:this.metrics.errorCount++;const i=this.metrics.requestCount;this.metrics.averageResponseTimeMs=(this.metrics.averageResponseTimeMs*(i-1)+n)/i}startCacheCleanup(){pt.cacheCleanupInterval=setInterval(()=>{this.runCacheCleanup()},3e5)}stopCacheCleanup(){pt.cacheCleanupInterval&&(clearInterval(pt.cacheCleanupInterval),pt.cacheCleanupInterval=void 0)}runCacheCleanup(){const t=Date.now();let r=0;for(const[n,i]of pt.memoryCache.entries())t-i.timestamp>i.ttl&&(pt.memoryCache.delete(n),r++);r>0&&this.logDebug(`Cache cleanup: removed ${r} expired entries`)}};pe(pt,"memoryCache",new Map),pe(pt,"cacheCleanupInterval"),pe(pt,"instanceCount",0);let ba=pt;function D1(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(36)}function F8(e){if(!Array.isArray(e))return["Options must be an array"];const t=[];return e.forEach((r,n)=>{if(!r||typeof r!="object"){t.push(`Option at index ${n} must be an object`);return}const i=r;typeof i.label!="string"&&t.push(`Option at index ${n} must have a string label`),(i.value===void 0||i.value===null)&&t.push(`Option at index ${n} must have a defined value`);const a=["string","number","boolean"];i.value!==void 0&&i.value!==null&&!a.includes(typeof i.value)&&t.push(`Option at index ${n} value must be string, number, or boolean`)}),t.length>0?t:null}class ch extends ba{constructor(r,n={}){const i={ttl:0,persistent:!1,storageType:"memory",...n.cache};super(i,{maxAttempts:1},n.eventCallbacks);pe(this,"validatedOptions");pe(this,"optionGroups",new Map);pe(this,"supportsRealTime",!0);this.validateConfig(r),this.validatedOptions=this.validateAndTransformData(r.options),this.buildOptionGroups(),this.logDebug(`StaticDataSource initialized with ${this.validatedOptions.length} options`)}async fetchData(){return this.validatedOptions.map(r=>({...r,metadata:r.metadata?{...r.metadata}:{}}))}getCacheKey(){return null}searchOptions(r,n){const i=l=>({...l,metadata:l.metadata?{...l.metadata}:{}});if(!n.enabled||!r)return this.validatedOptions.map(i);if(n.minLength&&r.length<n.minLength)return this.validatedOptions.map(i);const a=n.caseSensitive?r:r.toLowerCase(),s=n.searchFields||["label"];return this.validatedOptions.filter(l=>n.customFilter?n.customFilter(l,r):s.some(u=>{var p;let f="";switch(u){case"label":f=l.label;break;case"value":f=String(l.value);break;case"description":f=((p=l.metadata)==null?void 0:p.description)||"";break;default:return!1}return(n.caseSensitive?f:f.toLowerCase()).includes(a)})).map(i)}getGroupedOptions(){const r=new Map;for(const[n,i]of this.optionGroups)r.set(n,i.map(a=>({...a,metadata:a.metadata?{...a.metadata}:{}})));return r}getOptionsByGroup(r){return(this.optionGroups.get(r)||[]).map(i=>({...i,metadata:i.metadata?{...i.metadata}:{}}))}getGroupNames(){return Array.from(this.optionGroups.keys())}updateOptions(r){var i,a;this.logDebug("Updating static options",{oldCount:this.validatedOptions.length,newCount:r.length});const n=this.validateAndTransformData(r);this.validatedOptions.length=0,this.optionGroups.clear(),this.validatedOptions.push(...n),this.buildOptionGroups(),this.clearCache(),this.logDebug(`Updated static options: ${this.validatedOptions.length} options`),(a=(i=this.eventCallbacks)==null?void 0:i.onLoadingComplete)==null||a.call(i,this,this.validatedOptions)}addOptions(r){const n=this.validateAndTransformData(r),i=new Set(this.validatedOptions.map(s=>s.value)),a=n.filter(s=>i.has(s.value));if(a.length>0)throw new Error(`Duplicate option values found: ${a.map(s=>s.value).join(", ")}`);this.validatedOptions.push(...n),this.buildOptionGroups(),this.clearCache(),this.logDebug(`Added ${r.length} new options`)}removeOptions(r){const n=new Set(r),i=this.validatedOptions.length,a=this.validatedOptions.filter(l=>!n.has(l.value));this.validatedOptions.length=0,this.validatedOptions.push(...a),this.buildOptionGroups(),this.clearCache();const s=i-this.validatedOptions.length;return this.logDebug(`Removed ${s} options`),s}getOptionByValue(r){const n=this.validatedOptions.find(i=>i.value===r);return n?{...n,metadata:n.metadata?{...n.metadata}:{}}:null}hasOptionWithValue(r){return this.validatedOptions.some(n=>n.value===r)}getOptionCount(){return this.validatedOptions.length}getMemoryStats(){const r=JSON.stringify(this.validatedOptions).length,n=JSON.stringify(Array.from(this.optionGroups.entries())).length,i=Math.max(1,Math.round((r+n)/1024));return{optionCount:this.validatedOptions.length,groupCount:this.optionGroups.size,estimatedMemoryKB:i}}validateAndTransformData(r){return super.validateAndTransformData(r).map(i=>({...i,metadata:i.metadata?{...i.metadata}:{}}))}cleanupResources(){this.optionGroups.clear(),this.validatedOptions.length=0,this.logDebug("StaticDataSource resources cleaned up")}validateConfig(r){if(!r||typeof r!="object")throw new Error("StaticDataSourceConfig must be an object");if(r.type!=="static")throw new Error('StaticDataSourceConfig type must be "static"');if(!Array.isArray(r.options))throw new Error("StaticDataSourceConfig options must be an array");r.options.length===0&&this.logDebug("Warning: StaticDataSource initialized with empty options array")}buildOptionGroups(){var r;this.optionGroups.clear();for(const n of this.validatedOptions){const i=((r=n.metadata)==null?void 0:r.group)||"ungrouped";this.optionGroups.has(i)||this.optionGroups.set(i,[]),this.optionGroups.get(i).push(n)}this.logDebug(`Built ${this.optionGroups.size} option groups`)}}function N8(e,t){return new ch(e,t)}function M8(e){var t;return!!((t=e.metadata)!=null&&t.group)}function k8(e){const t=[];for(const[r,n]of Object.entries(e))for(const i of n)t.push({...i,metadata:{...i.metadata,group:r}});return t}const L8={delayMs:300,maxWaitMs:1e3,leading:!1,trailing:!0};class j8{constructor(t,r){pe(this,"timeoutId");pe(this,"maxTimeoutId");pe(this,"lastArgs");pe(this,"lastResult");this.func=t,this.config=r}execute(...t){return new Promise((r,n)=>{if(this.lastArgs=t,this.timeoutId&&clearTimeout(this.timeoutId),this.config.leading&&!this.timeoutId)try{const i=this.func(...t);this.lastResult=i,r(i);return}catch(i){n(i);return}this.config.trailing&&(this.timeoutId=setTimeout(async()=>{try{const i=await this.func(...this.lastArgs);this.lastResult=i,r(i)}catch(i){n(i)}finally{this.timeoutId=void 0}},this.config.delayMs)),this.config.maxWaitMs&&!this.maxTimeoutId&&(this.maxTimeoutId=setTimeout(async()=>{this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0);try{const i=await this.func(...this.lastArgs);this.lastResult=i,r(i)}catch(i){n(i)}finally{this.maxTimeoutId=void 0}},this.config.maxWaitMs))})}cancel(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0),this.maxTimeoutId&&(clearTimeout(this.maxTimeoutId),this.maxTimeoutId=void 0)}flush(){if(this.timeoutId&&this.lastArgs){clearTimeout(this.timeoutId),this.timeoutId=void 0,this.maxTimeoutId&&(clearTimeout(this.maxTimeoutId),this.maxTimeoutId=void 0);const t=this.func(...this.lastArgs);return this.lastResult=t,t}return this.lastResult}}class B8{constructor(t={}){pe(this,"config");pe(this,"abortController");this.config={timeout:3e4,defaultHeaders:{"Content-Type":"application/json",Accept:"application/json"},...t}}async request(t){this.abortController=new AbortController;const r={method:"GET",headers:{...this.config.defaultHeaders},timeout:this.config.timeout,signal:this.abortController.signal,...t,url:this.resolveUrl(t.url||"")},n=this.config.requestInterceptor?await this.config.requestInterceptor(r):r,i=this.buildUrlWithParams(n.url,n.params),a={method:n.method,headers:new Headers(n.headers),signal:n.signal};["POST","PUT","PATCH"].includes(n.method)&&n.body&&(a.body=typeof n.body=="string"?n.body:JSON.stringify(n.body));const s=setTimeout(()=>{this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort()},n.timeout),l=new Promise((u,f)=>{setTimeout(()=>{f(new Error(`Request timeout after ${n.timeout}ms`))},n.timeout)});try{const u=await Promise.race([fetch(i,a),l]);clearTimeout(s);const f=this.config.responseInterceptor?await this.config.responseInterceptor(u):u;if(!f.ok){const p=await f.text().catch(()=>"Unknown error");throw new Error(`HTTP ${f.status} ${f.statusText}: ${p}`)}const d=f.headers.get("content-type")||"";return d.includes("application/json")?await f.json():d.includes("text/")?await f.text():await f.blob()}catch(u){throw clearTimeout(s),u instanceof Error?u.name==="AbortError"?new Error("Request was cancelled"):u:new Error("Unknown request error")}}cancel(){this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort()}resolveUrl(t){if(t.startsWith("http://")||t.startsWith("https://"))return t;if(this.config.baseUrl){const r=this.config.baseUrl.endsWith("/")?this.config.baseUrl.slice(0,-1):this.config.baseUrl,n=t.startsWith("/")?t:`/${t}`;return`${r}${n}`}return t}buildUrlWithParams(t,r){if(!r||Object.keys(r).length===0)return t;const n=new URL(t);return Object.entries(r).forEach(([i,a])=>{n.searchParams.set(i,String(a))}),n.toString()}}class U8{static mapResponse(t,r){switch(r.type){case"simple":return this.mapSimpleResponse(t,r.simple);case"nested":return this.mapNestedResponse(t,r.nested);case"custom":if(!r.custom)throw new Error("Custom mapper function is required for custom type");return r.custom(t);default:throw new Error(`Unknown response mapper type: ${r.type}`)}}static mapSimpleResponse(t,r=Mo.simple){const{arrayPath:n="",labelField:i="label",valueField:a="value",disabledField:s="disabled"}=r||{};let l=[];if(n){const u=this.getNestedValue(t,n);if(!Array.isArray(u))throw new Error(`Array not found at path: ${n}`);l=u}else if(Array.isArray(t))l=t;else throw new Error("Response data must be an array or contain an array at specified path");return l.map((u,f)=>{if(!u||typeof u!="object")throw new Error(`Invalid item at index ${f}: must be an object`);const d=u,p=d[i],m=d[a],y=d[s];if(typeof p!="string")throw new Error(`Invalid label at index ${f}: must be a string`);if(m==null)throw new Error(`Invalid value at index ${f}: cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof m))throw new Error(`Invalid value at index ${f}: must be string, number, or boolean`);return{label:p,value:m,disabled:!!y,metadata:{...d,_index:f}}})}static mapNestedResponse(t,r){if(!r)throw new Error("Nested mapper configuration is required");const{arrayPath:n,paths:i}=r,a=this.getNestedValue(t,n);if(!Array.isArray(a))throw new Error(`Array not found at path: ${n}`);return a.map((s,l)=>{if(!s||typeof s!="object")throw new Error(`Invalid item at index ${l}: must be an object`);const u=this.getNestedValue(s,i.label),f=this.getNestedValue(s,i.value),d=i.disabled?this.getNestedValue(s,i.disabled):!1,p=i.description?this.getNestedValue(s,i.description):void 0;if(typeof u!="string")throw new Error(`Invalid label at index ${l}: must be a string`);if(f==null)throw new Error(`Invalid value at index ${l}: cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof f))throw new Error(`Invalid value at index ${l}: must be string, number, or boolean`);return{label:u,value:f,disabled:!!d,metadata:{description:typeof p=="string"?p:void 0,index:l,originalData:s}}})}static getNestedValue(t,r){if(!t||typeof t!="object")return;const n=r.split(".");let i=t;for(const a of n){if(i==null)return;i=i[a]}return i}}class uh extends ba{constructor(r,n={},i,a={}){super(r.cache,n,i);pe(this,"config");pe(this,"httpClient");pe(this,"debouncedFetch");pe(this,"lastRequestUrl");pe(this,"searchParams");pe(this,"supportsRealTime",!0);this.debounceConfig=a,this.config=this.validateAndNormalizeConfig(r),this.httpClient=this.createHttpClient();const s={...L8,...this.debounceConfig};this.debouncedFetch=new j8(()=>this.fetchDataInternal(),s),this.logDebug("ApiDataSource initialized",{url:this.config.url,method:this.config.method,hasAuth:!!this.config.auth,cacheEnabled:this.supportsCaching,debounceMs:s.delayMs})}async fetchData(){const r=this.buildRequestUrl(),n=this.hasSearchParams()||this.lastRequestUrl!==r;return this.lastRequestUrl=r,n&&this.debouncedFetch?(this.logDebug("Using debounced fetch for search request"),await this.debouncedFetch.execute()):(this.logDebug("Using direct fetch for regular request"),await this.fetchDataInternal())}setSearchParams(r){this.searchParams={...r},this.logDebug("Search parameters updated",r)}clearSearchParams(){this.searchParams=void 0,this.logDebug("Search parameters cleared")}cancelPendingRequests(){this.debouncedFetch&&this.debouncedFetch.cancel(),this.httpClient.cancel(),this.logDebug("Pending requests cancelled")}flushPendingRequests(){if(this.debouncedFetch)return this.debouncedFetch.flush()}getCacheKey(){var l;if(!this.supportsCaching||this.cache.ttl!==void 0&&this.cache.ttl<=0)return null;const r=this.buildRequestUrl(),n=this.config.method||"GET",i=((l=this.config.auth)==null?void 0:l.type)||"none",a={url:r,method:n,authType:i,body:this.config.body,searchParams:this.searchParams},s=JSON.stringify(a);return`api_${D1(s)}`}cleanupResources(){this.cancelPendingRequests(),this.debouncedFetch&&(this.debouncedFetch.cancel(),this.debouncedFetch=void 0),this.logDebug("API resources cleaned up")}async fetchDataInternal(){const r=performance.now();try{const n=this.buildRequestConfig();this.logDebug("Making API request",{url:n.url,method:n.method,hasAuth:!!this.config.auth,hasBody:!!n.body,paramsCount:Object.keys(n.params||{}).length});const i=await this.httpClient.request(n),a=U8.mapResponse(i,this.config.responseMapper),s=performance.now()-r;return this.logDebug(`API request completed in ${Math.round(s)}ms`,{optionsCount:a.length,responseTime:s}),a}catch(n){const i=performance.now()-r;throw this.logError(`API request failed after ${Math.round(i)}ms`,n instanceof Error?n:new Error(String(n))),n}}buildRequestConfig(){const r={"Content-Type":"application/json",Accept:"application/json",...this.config.headers},n={url:this.buildRequestUrl(),method:this.config.method||"GET",headers:r,body:this.config.body,params:this.buildRequestParams(),timeout:this.config.timeout||3e4};return this.config.auth&&this.addAuthenticationHeaders(n),n}buildRequestUrl(){return this.config.url}buildRequestParams(){return{...this.config.params,...this.searchParams}}addAuthenticationHeaders(r){if(!this.config.auth||!r.headers)return;const{type:n,credentials:i,headerName:a}=this.config.auth;switch(n){case"bearer":if(typeof i=="string")r.headers.Authorization=`Bearer ${i}`;else throw new Error("Bearer token must be a string");break;case"basic":if(typeof i=="object"&&i.username&&i.password){const s=btoa(`${i.username}:${i.password}`);r.headers.Authorization=`Basic ${s}`}else throw new Error("Basic auth requires username and password");break;case"apiKey":if(typeof i=="string"&&a)r.headers[a]=i;else throw new Error("API key auth requires credentials string and headerName");break;default:throw new Error(`Unsupported authentication type: ${n}`)}}hasSearchParams(){return!!this.searchParams&&Object.keys(this.searchParams).length>0}createHttpClient(){const r={"Content-Type":"application/json",Accept:"application/json"};return new B8({timeout:this.config.timeout||3e4,defaultHeaders:{...r,...this.config.headers}})}validateAndNormalizeConfig(r){if(!r.url)throw new Error("API URL is required");if(!r.responseMapper)throw new Error("Response mapper configuration is required");try{new URL(r.url)}catch{throw new Error("Invalid API URL format")}const n=["GET","POST","PUT","PATCH"];if(r.method&&!n.includes(r.method))throw new Error(`Invalid HTTP method: ${r.method}`);return r.auth&&this.validateAuthConfig(r.auth),this.validateResponseMapper(r.responseMapper),{...r,method:r.method||"GET",headers:r.headers||{},params:r.params||{},timeout:r.timeout||3e4,retries:r.retries||0,responseMapper:r.responseMapper||Mo}}validateAuthConfig(r){if(!["bearer","basic","apiKey"].includes(r.type))throw new Error(`Invalid auth type: ${r.type}`);if(!r.credentials)throw new Error("Auth credentials are required");if(r.type==="basic"){if(typeof r.credentials!="object"||!r.credentials.username||!r.credentials.password)throw new Error("Basic auth requires username and password")}else if(r.type==="apiKey"){if(typeof r.credentials!="string"||!r.headerName)throw new Error("API key auth requires credentials string and headerName")}else if(r.type==="bearer"&&typeof r.credentials!="string")throw new Error("Bearer auth requires credentials string")}validateResponseMapper(r){if(!["simple","nested","custom"].includes(r.type))throw new Error(`Invalid response mapper type: ${r.type}`);if(r.type==="nested"&&!r.nested)throw new Error("Nested mapper configuration is required for nested type");if(r.type==="custom"&&!r.custom)throw new Error("Custom mapper function is required for custom type");if(r.type==="nested"&&r.nested){if(!r.nested.arrayPath)throw new Error("Array path is required for nested mapper");if(!r.nested.paths||!r.nested.paths.label||!r.nested.paths.value)throw new Error("Label and value paths are required for nested mapper")}}}function W8(e,t={}){return new uh(e,t.retryConfig,t.eventCallbacks,t.debounceConfig)}const q8={SIMPLE_ARRAY:{type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},PAGINATED_DATA:{type:"simple",simple:{arrayPath:"data.items",labelField:"label",valueField:"value",disabledField:"disabled"}},REST_RESULTS:{type:"simple",simple:{arrayPath:"results",labelField:"name",valueField:"id",disabledField:"active"}},NESTED_OBJECTS:{type:"nested",nested:{arrayPath:"data.options",paths:{label:"display.name",value:"identifier",disabled:"status.disabled",description:"display.description"}}}},V8={bearer:e=>({type:"bearer",credentials:e}),basic:(e,t)=>({type:"basic",credentials:{username:e,password:t}}),apiKey:(e,t="X-API-Key")=>({type:"apiKey",credentials:e,headerName:t})};var F1=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.FAILED="failed",e))(F1||{});class fh extends ba{constructor(r,n={}){var a,s;const i={ttl:3e5,persistent:!0,storageType:"memory",...n.cache};super(i,{maxAttempts:((a=r.connection)==null?void 0:a.maxReconnectAttempts)||5,baseDelayMs:((s=r.connection)==null?void 0:s.reconnectDelay)||1e3,maxDelayMs:3e4,backoffMultiplier:2,jitter:!0},n.eventCallbacks);pe(this,"config");pe(this,"websocket",null);pe(this,"connectionState","disconnected");pe(this,"reconnectAttempts",0);pe(this,"heartbeatInterval",null);pe(this,"responseTimeout",null);pe(this,"searchTimeout",null);pe(this,"pendingRequests",new Map);pe(this,"currentOptions",[]);pe(this,"currentSearchParams",{});pe(this,"supportsRealTime",!0);this.validateConfig(r),this.config=this.normalizeConfig(r),this.logDebug("WebSocketDataSource initialized",{url:this.config.url})}async fetchData(){const r=this.getCacheKey();if(r&&this.hasCachedData(r)){this.logDebug("Using cached data while establishing WebSocket connection");const a=this.getWebSocketCachedData(r);if(a&&a.length>0)return this.ensureConnection(),a}await this.ensureConnection();const n=this.generateMessageId(),i={type:"search-request",messageId:n,timestamp:Date.now(),data:{searchParams:this.currentSearchParams,requestInitial:!0}};return new Promise((a,s)=>{var f;const l=((f=this.config.connection)==null?void 0:f.responseTimeout)||1e4,u=setTimeout(()=>{this.pendingRequests.delete(n),s(new Error(`Request timeout after ${l}ms`))},l);this.pendingRequests.set(n,{resolve:a,reject:s,timeout:u}),this.sendMessage(i)})}getCacheKey(){const r=this.config.url,n=Object.keys(this.currentSearchParams).length>0?JSON.stringify(this.currentSearchParams):"";return`websocket:${r}:${n}`}setSearchParams(r){var n;this.currentSearchParams={...r},this.clearCache(),(n=this.config.messageHandling)!=null&&n.enableRealtimeSearch&&this.debounceSearch(),this.logDebug("Search parameters updated",r)}clearSearchParams(){this.currentSearchParams={},this.clearCache(),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.logDebug("Search parameters cleared")}getConnectionState(){return this.connectionState}async reconnect(){this.logDebug("Manual reconnection requested"),this.websocket&&(this.websocket.close(),this.websocket=null),this.connectionState="disconnected",this.reconnectAttempts=0,await this.ensureConnection()}sendMessage(r){if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new Error("WebSocket is not connected");const n=JSON.stringify(r);this.websocket.send(n),this.logDebug("Message sent",{type:r.type,messageId:r.messageId})}subscribeToUpdates(r){const n=i=>{r(i)};return this._updateCallback=n,()=>{delete this._updateCallback}}cleanupResources(){this.logDebug("Cleaning up WebSocket resources"),this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null),this.responseTimeout&&(clearTimeout(this.responseTimeout),this.responseTimeout=null),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null);for(const[,r]of this.pendingRequests)clearTimeout(r.timeout),r.reject(new Error("WebSocket connection closed"));this.pendingRequests.clear(),this.websocket&&(this.websocket.close(),this.websocket=null),this.connectionState="disconnected"}validateConfig(r){if(!r||typeof r!="object")throw new Error("WebSocketDataSourceConfig must be an object");if(r.type!=="websocket")throw new Error('WebSocketDataSourceConfig type must be "websocket"');if(!r.url||typeof r.url!="string")throw new Error("WebSocketDataSourceConfig must have a valid URL");try{const n=new URL(r.url);if(!["ws:","wss:"].includes(n.protocol))throw new Error("WebSocket URL must use ws:// or wss:// protocol")}catch(n){throw new Error(`Invalid WebSocket URL format: ${n instanceof Error?n.message:String(n)}`)}if(r.auth){if(!["bearer","query","header"].includes(r.auth.type))throw new Error('WebSocket auth type must be "bearer", "query", or "header"');if(!r.auth.credentials||typeof r.auth.credentials!="string")throw new Error("WebSocket auth credentials must be a non-empty string")}}normalizeConfig(r){return{...r,connection:{connectTimeout:3e4,autoReconnect:!0,maxReconnectAttempts:5,reconnectDelay:1e3,heartbeatInterval:3e4,responseTimeout:1e4,...r.connection},messageHandling:{requestInitialOptions:!0,enableRealtimeSearch:!1,searchDebounceMs:300,...r.messageHandling},responseMapper:r.responseMapper||Mo}}async ensureConnection(){if(this.connectionState!=="connected"){if(this.connectionState==="connecting"||this.connectionState==="reconnecting")return new Promise((r,n)=>{const i=()=>{this.connectionState==="connected"?r():this.connectionState==="failed"?n(new Error("WebSocket connection failed")):setTimeout(i,100)};i()});await this.connect()}}async connect(){return this.connectionState=this.reconnectAttempts>0?"reconnecting":"connecting",new Promise((r,n)=>{var i;try{const a=this.buildConnectionUrl(),s=this.config.protocols;this.logDebug("Connecting to WebSocket",{url:a.replace(/[?&].*$/,"")}),this.websocket=new WebSocket(a,s);const l=setTimeout(()=>{var u;(u=this.websocket)==null||u.close(),this.connectionState="failed",n(new Error("WebSocket connection timeout"))},((i=this.config.connection)==null?void 0:i.connectTimeout)||3e4);this.websocket.onopen=()=>{var u,f;clearTimeout(l),this.connectionState="connected",this.reconnectAttempts=0,this.logDebug("WebSocket connected successfully"),this.authenticateConnection(),(u=this.config.messageHandling)!=null&&u.initialMessage&&this.sendMessage(this.config.messageHandling.initialMessage),(f=this.config.messageHandling)!=null&&f.requestInitialOptions&&this.requestInitialOptions(),this.startHeartbeat(),r()},this.websocket.onmessage=u=>{this.handleMessage(u)},this.websocket.onclose=u=>{clearTimeout(l),this.handleConnectionClose(u)},this.websocket.onerror=u=>{clearTimeout(l),this.handleConnectionError(u),(this.connectionState==="connecting"||this.connectionState==="reconnecting")&&(this.connectionState="failed",n(new Error("WebSocket connection failed")))}}catch(a){this.connectionState="failed",n(a)}})}buildConnectionUrl(){var n;const r=new URL(this.config.url);if(((n=this.config.auth)==null?void 0:n.type)==="query"){const i=this.config.auth.paramName||"token";r.searchParams.set(i,this.config.auth.credentials)}return r.toString()}authenticateConnection(){if(!(!this.config.auth||this.config.auth.type==="query")&&this.config.auth.type==="bearer"){const r={type:"connection-ready",messageId:this.generateMessageId(),timestamp:Date.now(),data:{auth:{type:"bearer",token:this.config.auth.credentials}}};this.sendMessage(r)}}requestInitialOptions(){const n={type:"search-request",messageId:this.generateMessageId(),timestamp:Date.now(),data:{requestInitial:!0,searchParams:{}}};this.sendMessage(n)}handleMessage(r){try{const n=JSON.parse(r.data);switch(this.logDebug("Message received",{type:n.type,messageId:n.messageId}),n.type){case"search-response":this.handleSearchResponse(n);break;case"options-update":this.handleOptionsUpdate(n);break;case"options-add":this.handleOptionsAdd(n);break;case"options-remove":this.handleOptionsRemove(n);break;case"options-patch":this.handleOptionsPatch(n);break;case"error":this.handleErrorMessage(n);break;case"heartbeat":this.handleHeartbeat(n);break;default:this.logDebug("Unknown message type",{type:n.type})}}catch(n){this.logError("Error parsing WebSocket message",n)}}handleSearchResponse(r){if(!r.messageId){this.logError("Search response missing messageId");return}const n=this.pendingRequests.get(r.messageId);if(!n){this.logDebug("No pending request for messageId",{messageId:r.messageId});return}clearTimeout(n.timeout),this.pendingRequests.delete(r.messageId);try{if(r.error){n.reject(new Error(r.error.message));return}const i=this.transformResponseData(r.data);this.currentOptions=i;const a=this.getCacheKey();a&&this.setWebSocketCachedData(a,i),n.resolve(i),this._updateCallback&&this._updateCallback(i)}catch(i){n.reject(i)}}handleOptionsUpdate(r){try{const n=this.transformResponseData(r.data);this.currentOptions=n;const i=this.getCacheKey();i&&this.setWebSocketCachedData(i,n),this._updateCallback&&this._updateCallback(n),this.logDebug("Options updated",{count:n.length})}catch(n){this.logError("Error handling options update",n)}}handleOptionsAdd(r){try{const n=this.transformResponseData(r.data),i=new Set(this.currentOptions.map(l=>l.value)),a=n.filter(l=>!i.has(l.value));this.currentOptions=[...this.currentOptions,...a];const s=this.getCacheKey();s&&this.setWebSocketCachedData(s,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options added",{addedCount:a.length})}catch(n){this.logError("Error handling options add",n)}}handleOptionsRemove(r){var n;try{const i=new Set(((n=r.data)==null?void 0:n.values)||[]),a=this.currentOptions.length;this.currentOptions=this.currentOptions.filter(u=>!i.has(u.value));const s=a-this.currentOptions.length,l=this.getCacheKey();l&&this.setWebSocketCachedData(l,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options removed",{removedCount:s})}catch(i){this.logError("Error handling options remove",i)}}handleOptionsPatch(r){var n;try{const i=((n=r.data)==null?void 0:n.patches)||[];for(const s of i){const l=this.currentOptions.findIndex(u=>u.value===s.value);l!==-1&&(this.currentOptions[l]={...this.currentOptions[l],...s})}const a=this.getCacheKey();a&&this.setWebSocketCachedData(a,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options patched",{patchCount:i.length})}catch(i){this.logError("Error handling options patch",i)}}handleErrorMessage(r){var i;const n=new Error(((i=r.error)==null?void 0:i.message)||"Unknown server error");if(r.messageId){const a=this.pendingRequests.get(r.messageId);if(a){clearTimeout(a.timeout),this.pendingRequests.delete(r.messageId),a.reject(n);return}}this.logError("Server error message",n)}handleHeartbeat(r){var n;if(((n=r.data)==null?void 0:n.type)==="ping"){const i={type:"heartbeat",messageId:this.generateMessageId(),timestamp:Date.now(),data:{type:"pong"}};this.sendMessage(i)}}handleConnectionClose(r){var n;this.logDebug("WebSocket connection closed",{code:r.code,reason:r.reason}),this.connectionState="disconnected",this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null),(n=this.config.connection)!=null&&n.autoReconnect&&r.code!==1e3&&this.scheduleReconnection()}handleConnectionError(r){this.logError("WebSocket connection error",new Error("Connection error")),this.connectionState==="connected"&&(this.connectionState="disconnected")}scheduleReconnection(){var i,a;if(this.reconnectAttempts>=(((i=this.config.connection)==null?void 0:i.maxReconnectAttempts)||5)){this.connectionState="failed",this.logError("Max reconnection attempts exceeded");return}this.reconnectAttempts++,this.connectionState="reconnecting";const r=((a=this.config.connection)==null?void 0:a.reconnectDelay)||1e3,n=Math.min(r*Math.pow(2,this.reconnectAttempts-1),3e4);this.logDebug(`Reconnecting in ${n}ms (attempt ${this.reconnectAttempts})`),setTimeout(()=>{this.connect().catch(s=>{this.logError("Reconnection failed",s),this.scheduleReconnection()})},n)}startHeartbeat(){var n;const r=((n=this.config.connection)==null?void 0:n.heartbeatInterval)||3e4;this.heartbeatInterval=setInterval(()=>{var i;if(((i=this.websocket)==null?void 0:i.readyState)===WebSocket.OPEN){const a={type:"heartbeat",messageId:this.generateMessageId(),timestamp:Date.now(),data:{type:"ping"}};this.sendMessage(a)}},r)}debounceSearch(){var n;this.searchTimeout&&clearTimeout(this.searchTimeout);const r=((n=this.config.messageHandling)==null?void 0:n.searchDebounceMs)||300;this.searchTimeout=setTimeout(()=>{this.connectionState==="connected"&&this.sendSearchRequest()},r)}sendSearchRequest(){const n={type:"search-request",messageId:this.generateMessageId(),timestamp:Date.now(),data:{searchParams:this.currentSearchParams}};this.sendMessage(n)}transformResponseData(r){if(!this.config.responseMapper)return this.validateAndTransformData(r);let n;switch(this.config.responseMapper.type){case"simple":n=this.applySimpleMapper(r,this.config.responseMapper.simple);break;case"nested":n=this.applyNestedMapper(r,this.config.responseMapper.nested);break;case"custom":n=this.config.responseMapper.custom(r);break;default:throw new Error(`Unknown response mapper type: ${this.config.responseMapper.type}`)}return this.validateAndTransformData(n)}applySimpleMapper(r,n){const i=n.arrayPath,a=n.labelField||"label",s=n.valueField||"value",l=n.disabledField||"disabled";let u;if(i){const f=i.split(".");let d=r;for(const p of f)if(d&&typeof d=="object"&&p in d)d=d[p];else throw new Error(`Path "${i}" not found in response data`);u=d}else u=r;if(!Array.isArray(u))throw new Error("Response data is not an array");return u.map((f,d)=>{if(!f||typeof f!="object")throw new Error(`Invalid item at index ${d}: must be an object`);return{label:String(f[a]||""),value:f[s],disabled:!!f[l],metadata:{...f,_index:d}}})}applyNestedMapper(r,n){const{arrayPath:i,paths:a}=n,s=i.split(".");let l=r;for(const u of s)if(l&&typeof l=="object"&&u in l)l=l[u];else throw new Error(`Path "${i}" not found in response data`);if(!Array.isArray(l))throw new Error("Nested response data is not an array");return l.map((u,f)=>{const d=y=>{const _=y.split(".");let w=u;for(const v of _)if(w&&typeof w=="object"&&v in w)w=w[v];else return;return w},p=d(a.value);let m;return typeof p=="string"||typeof p=="number"||typeof p=="boolean"?m=p:m=String(p??""),{label:String(d(a.label??"")),value:m,disabled:a.disabled?!!d(a.disabled):!1,metadata:{description:a.description&&d(a.description)||void 0,_index:f,...u}}})}getWebSocketCachedData(r){try{return super.hasCachedData(r)&&this.currentOptions.length>0?this.currentOptions:null}catch(n){return this.logError("Error retrieving cached data",n),null}}setWebSocketCachedData(r,n){try{this.currentOptions=[...n]}catch(i){this.logError("Error setting cached data",i)}}generateMessageId(){return`ws_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}function R8(e,t){return new fh(e,t)}const z8={bearer:e=>({type:"bearer",credentials:e}),query:(e,t="token")=>({type:"query",credentials:e,paramName:t}),header:(e,t="Authorization")=>({type:"header",credentials:e,paramName:t})},H8={searchRequest:(e={},t)=>({type:"search-request",messageId:t||`search_${Date.now()}`,timestamp:Date.now(),data:{searchParams:e}}),heartbeatPing:e=>({type:"heartbeat",messageId:e||`heartbeat_${Date.now()}`,timestamp:Date.now(),data:{type:"ping"}}),optionsUpdate:(e,t)=>({type:"options-update",messageId:t||`update_${Date.now()}`,timestamp:Date.now(),data:{options:e}})};class Ye extends Error{constructor(t,r,n,i){super(t),this.path=r,this.index=n,this.originalError=i,this.name="ResponseMappingError"}}function lc(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ko(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function N1(e,t){if(!ko(e))throw new Ye(`Invalid option at index ${t}: must be an object`,void 0,t);const{label:r,value:n,disabled:i,metadata:a}=e;if(typeof r!="string")throw new Ye(`Invalid label at index ${t}: must be a string, got ${typeof r}`,"label",t);if(n==null)throw new Ye(`Invalid value at index ${t}: cannot be undefined or null`,"value",t);if(!lc(n))throw new Ye(`Invalid value at index ${t}: must be string, number, or boolean, got ${typeof n}`,"value",t);return{label:r,value:n,disabled:!!i,metadata:ko(a)?a:{}}}function M1(e){if(!Array.isArray(e))throw new Ye("Response must be an array of options");return e.map((t,r)=>N1(t,r))}function _a(e,t){var i;if(!e||typeof e!="object")return;if(!t||t==="")return e;const r=t.split(".");let n=e;for(const a of r){if(n==null)return;const s=a.match(/^(.+)\[(\d+)\]$/);if(s){const[,l,u]=s,f=parseInt(u,10);n=(i=n[l])==null?void 0:i[f]}else n=n[a]}return n}function K8(e,t,r){const n=t.split("."),i={...e};let a=i;for(let s=0;s<n.length-1;s++){const l=n[s];!a[l]||typeof a[l]!="object"?a[l]={}:a[l]=Array.isArray(a[l])?[...a[l]]:{...a[l]},a=a[l]}return a[n[n.length-1]]=r,i}function cc(e,t){if(!t){if(Array.isArray(e))return e;throw new Ye("Response data must be an array when no arrayPath is specified")}const r=_a(e,t);if(!Array.isArray(r))throw new Ye(`Array not found at path: ${t}. Got ${typeof r}`,t);return r}function k1(e,t=Mo.simple){const{arrayPath:r,labelField:n="label",valueField:i="value",disabledField:a="disabled"}=t;return cc(e,r).map((l,u)=>{if(!ko(l))throw new Ye(`Invalid item at index ${u}: must be an object`,void 0,u);const f=l[n],d=l[i],p=a?l[a]:!1;if(typeof f!="string")throw new Ye(`Invalid label at index ${u}: field '${n}' must be a string, got ${typeof f}`,n,u);if(d==null)throw new Ye(`Invalid value at index ${u}: field '${i}' cannot be undefined or null`,i,u);if(!lc(d))throw new Ye(`Invalid value at index ${u}: field '${i}' must be string, number, or boolean, got ${typeof d}`,i,u);return{label:f,value:d,disabled:!!p,metadata:{...l,_index:u}}})}function L1(e,t){if(!t)throw new Ye("Nested mapper configuration is required");const{arrayPath:r,paths:n}=t;if(!n||!n.label||!n.value)throw new Ye("Nested mapper requires paths.label and paths.value to be defined");return cc(e,r).map((a,s)=>{if(!ko(a))throw new Ye(`Invalid item at index ${s}: must be an object`,void 0,s);const l=_a(a,n.label),u=_a(a,n.value),f=n.disabled?_a(a,n.disabled):!1,d=n.description?_a(a,n.description):void 0;if(typeof l!="string")throw new Ye(`Invalid label at index ${s}: path '${n.label}' must resolve to a string, got ${typeof l}`,n.label,s);if(u==null)throw new Ye(`Invalid value at index ${s}: path '${n.value}' cannot be undefined or null`,n.value,s);if(!lc(u))throw new Ye(`Invalid value at index ${s}: path '${n.value}' must resolve to string, number, or boolean, got ${typeof u}`,n.value,s);return{label:l,value:u,disabled:!!f,metadata:{description:typeof d=="string"?d:void 0,_index:s,_originalData:a}}})}function j1(e){return t=>{try{const r=e(t);if(!Array.isArray(r))throw new Ye("Custom mapper must return an array of ChoiceOption");return M1(r)}catch(r){throw r instanceof Ye?r:new Ye("Custom mapper failed",void 0,void 0,r instanceof Error?r:new Error(String(r)))}}}function G8(e,t){try{switch(t.type){case"simple":return k1(e,t.simple);case"nested":if(!t.nested)throw new Ye("Nested mapper configuration is required for nested type");return L1(e,t.nested);case"custom":if(!t.custom)throw new Ye("Custom mapper function is required for custom type");return j1(t.custom)(e);default:throw new Ye(`Unknown response mapper type: ${t.type}`)}}catch(r){throw r instanceof Ye?r:new Ye("Response mapping failed",void 0,void 0,r instanceof Error?r:new Error(String(r)))}}const Y8={SIMPLE_ARRAY:{type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},NAME_ID:{type:"simple",simple:{labelField:"name",valueField:"id",disabledField:"disabled"}},TITLE_KEY:{type:"simple",simple:{labelField:"title",valueField:"key",disabledField:"disabled"}},TEXT_VALUE:{type:"simple",simple:{labelField:"text",valueField:"value",disabledField:"disabled"}},DISPLAY_CODE:{type:"simple",simple:{labelField:"display",valueField:"code",disabledField:"disabled"}}},J8={DATA_ARRAY:{type:"simple",simple:{arrayPath:"data",labelField:"label",valueField:"value",disabledField:"disabled"}},RESULTS_ARRAY:{type:"simple",simple:{arrayPath:"results",labelField:"name",valueField:"id",disabledField:"disabled"}},ITEMS_ARRAY:{type:"simple",simple:{arrayPath:"items",labelField:"label",valueField:"value",disabledField:"disabled"}},NESTED_DATA_ITEMS:{type:"simple",simple:{arrayPath:"data.items",labelField:"label",valueField:"value",disabledField:"disabled"}},RESPONSE_DATA:{type:"simple",simple:{arrayPath:"response.data",labelField:"name",valueField:"id",disabledField:"disabled"}}};function X8(e){const{invertActive:t=!1}=e;return{type:"custom",custom:r=>cc(r,e.arrayPath).map((i,a)=>{if(!ko(i))throw new Ye(`Invalid item at index ${a}: must be an object`,void 0,a);const s=i[e.labelField],l=i[e.valueField],u=i[e.activeField];if(typeof s!="string")throw new Ye(`Invalid label at index ${a}: field '${e.labelField}' must be a string`,e.labelField,a);if(!lc(l))throw new Ye(`Invalid value at index ${a}: field '${e.valueField}' must be string, number, or boolean`,e.valueField,a);const f=!!u;return{label:s,value:l,disabled:t?f:!f,metadata:{...i,_index:a,_active:f}}})}}function Z8(e){return t=>{let r=t;for(let n=0;n<e.length;n++){const i=e[n];try{if(n===0){const a=i(r);if(!Array.isArray(a))throw new Error(`Mapper at index ${n} must return an array of ChoiceOption`);r=a}else{const a=i(r);if(!Array.isArray(a))throw new Error(`Mapper at index ${n} must return an array of ChoiceOption`);r=a}}catch(a){throw new Ye(`Pipeline failed at step ${n+1}`,void 0,n,a instanceof Error?a:new Error(String(a)))}}return M1(r)}}function Q8(e){return e.filter(t=>!t.disabled)}function ez(e,t){return[...e].sort((r,n)=>r.label.localeCompare(n.label,t))}function tz(e){return[...e].sort((t,r)=>typeof t.value=="string"&&typeof r.value=="string"?t.value.localeCompare(r.value):typeof t.value=="number"&&typeof r.value=="number"?t.value-r.value:String(t.value).localeCompare(String(r.value)))}function rz(e,t){return e.map(r=>({...r,metadata:{...r.metadata,group:t(r)}}))}function nz(e,t){return e.map((r,n)=>t(r,n))}class uc{constructor(){pe(this,"DefaultLoadingComponent",({message:t,progress:r})=>j.createElement("div",{className:"edf-choice-widget__loading",role:"status","aria-live":"polite"},[j.createElement("span",{key:"spinner",className:"edf-choice-widget__loading-spinner"}),t&&j.createElement("span",{key:"message",className:"edf-choice-widget__loading-message"},t),r!==void 0&&j.createElement("div",{key:"progress",className:"edf-choice-widget__loading-progress"},j.createElement("div",{className:"edf-choice-widget__loading-progress-bar",style:{width:`${r}%`},role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100}))]));pe(this,"DefaultErrorComponent",({message:t,recoverable:r,id:n})=>j.createElement("div",{className:"edf-choice-widget__error",role:"alert",id:n,"aria-live":"assertive"},[j.createElement("span",{key:"icon",className:"edf-choice-widget__error-icon","aria-hidden":!0},"⚠️"),j.createElement("span",{key:"message",className:"edf-choice-widget__error-message"},t),r&&j.createElement("span",{key:"hint",className:"edf-choice-widget__error-hint"},"Please try again")]));pe(this,"DefaultEmptyComponent",({message:t})=>j.createElement("div",{className:"edf-choice-widget__empty",role:"status"},[j.createElement("span",{key:"icon",className:"edf-choice-widget__empty-icon","aria-hidden":!0},"📭"),j.createElement("span",{key:"message",className:"edf-choice-widget__empty-message"},t||"No options available")]))}getAccessibilityProps(t,r,n){const{id:i,label:a,required:s,readonly:l,disabled:u,schema:f}=t,{error:d,loading:p}=r,m={"aria-label":(n==null?void 0:n.ariaLabel)||a||(f==null?void 0:f.title)||"Select an option","aria-required":s||!1,"aria-readonly":l||!1,"aria-disabled":u||!1,"aria-invalid":d.hasError,"aria-busy":p.isLoading,id:i,role:this.getAriaRole()};if(d.hasError&&d.message&&(m["aria-errormessage"]=`${i}-error`,m["aria-describedby"]=`${i}-error`),n!=null&&n.ariaDescription){const y=m["aria-describedby"];m["aria-describedby"]=y?`${y} ${i}-description`:`${i}-description`}return n!=null&&n.announceChanges&&(m["aria-live"]="polite",m["aria-atomic"]=!0),n!=null&&n.ariaAttributes&&Object.entries(n.ariaAttributes).forEach(([y,_])=>{(y.startsWith("aria-")||y==="role")&&(m[y]=_)}),m}handleKeyboardNavigation(t,r,n,i){var d;const{filteredOptions:a,focusedOptionIndex:s}=n,{keyboard:l}=((d=r.options.choiceConfig)==null?void 0:d.accessibility)||{};if(!(l!=null&&l.arrowKeys)&&!(l!=null&&l.homeEnd)&&!(l!=null&&l.typeAhead))return;const{key:u}=t,f=a.length;switch(u){case"ArrowDown":if(l!=null&&l.arrowKeys){t.preventDefault();const p=(s+1)%f;i.setFocusedIndex(p)}break;case"ArrowUp":if(l!=null&&l.arrowKeys){t.preventDefault();const p=s<=0?f-1:s-1;i.setFocusedIndex(p)}break;case"Home":l!=null&&l.homeEnd&&(t.preventDefault(),i.setFocusedIndex(0));break;case"End":l!=null&&l.homeEnd&&(t.preventDefault(),i.setFocusedIndex(f-1));break;case"Enter":case" ":if(s>=0&&s<f){t.preventDefault();const p=a[s];p.disabled||i.selectOption(p)}break;case"Escape":i.toggleDropdown&&(t.preventDefault(),i.toggleDropdown(!1));break;default:l!=null&&l.typeAhead&&u.length===1&&/\S/.test(u)&&this.handleTypeAhead(u,n,i);break}}handleTypeAhead(t,r,n){const{filteredOptions:i,focusedOptionIndex:a}=r,s=t.toLowerCase(),l=a+1;for(let u=0;u<i.length;u++){const f=(l+u)%i.length,d=i[f];if(d.label.toLowerCase().startsWith(s)&&!d.disabled){n.setFocusedIndex(f);break}}}getLoadingProps(t,r){return{component:r||this.DefaultLoadingComponent,props:t}}getErrorProps(t,r,n){return{component:r||this.DefaultErrorComponent,props:{...t,id:n?`${n}-error`:void 0}}}getEmptyProps(t,r){return{component:r||this.DefaultEmptyComponent,props:{message:t||"No options available"}}}normalizeValue(t,r){return t==null?[]:r?Array.isArray(t)?t.filter(n=>n!=null):[t]:Array.isArray(t)?t.length>0?[t[0]]:[]:[t]}denormalizeValue(t,r){return r?t:t.length>0?t[0]:void 0}getThemeClasses(t,r){return["edf-choice-widget",`edf-choice-widget--${this.presentationMode}`,t.size&&`edf-choice-widget--${t.size}`,t.disabled&&"edf-choice-widget--disabled",t.readonly&&"edf-choice-widget--readonly",t.className,r].filter(Boolean).join(" ")}getThemeStyles(t,r){return{...t.style,...r}}createEventHandlers(t,r,n,i){return{fieldId:t,schema:r,formData:n,fieldPath:i,_hookRequired:!0}}validateSelection(t,r,n){var d,p,m;const{validation:i,multiple:a,minSelections:s,maxSelections:l}=n;if(t.length===0&&((d=i==null?void 0:i.messages)!=null&&d.required))return i.messages.required;if(a){if(s&&t.length<s)return`Please select at least ${s} option${s>1?"s":""}`;if(l&&t.length>l)return`Please select at most ${l} option${l>1?"s":""}`}if(i!=null&&i.validator){const y=i.validator(t,r);if(y)return((p=i.messages)==null?void 0:p.custom)||y}const u=r.map(y=>y.value);return t.filter(y=>!u.includes(y)).length>0?((m=i==null?void 0:i.messages)==null?void 0:m.invalid)||"Invalid selection":null}getAntdSize(t){return t||"middle"}isSelected(t,r){return r.includes(t)}filterOptions(t,r,n){if(!(n!=null&&n.enabled)||!r||r.length<(n.minLength||1))return t;const i=n.caseSensitive?r:r.toLowerCase(),a=n.searchFields||["label"];return t.filter(s=>n.customFilter?n.customFilter(s,r):a.some(l=>{var d;let u;switch(l){case"label":u=s.label;break;case"value":u=String(s.value);break;case"description":u=(d=s.metadata)==null?void 0:d.description;break}return u?(n.caseSensitive?u:u.toLowerCase()).includes(i):!1}))}}var fc={exports:{}};/**
82
+ }`)),B.useEffect(function(){var l=t.current,u=HR(l);RR(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:u})},[])},r8=["icon","className","onClick","style","primaryColor","secondaryColor"],Po={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function n8(e){var t=e.primaryColor,r=e.secondaryColor;Po.primaryColor=t,Po.secondaryColor=r||e1(t),Po.calculated=!!r}function i8(){return rn({},Po)}var va=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,s=t.primaryColor,l=t.secondaryColor,u=N_(t,r8),f=at.useRef(),d=Po;if(s&&(d={primaryColor:s,secondaryColor:l||e1(s)}),t8(f),QR(Z_(r),"icon should be icon definiton, but got ".concat(r)),!Z_(r))return null;var p=r;return p&&typeof p.icon=="function"&&(p=rn(rn({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),Xd(p.icon,"svg-".concat(p.name),rn(rn({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:f}))};va.displayName="IconReact",va.getTwoToneColors=i8,va.setTwoToneColors=n8;function r1(e){var t=t1(e),r=F_(t,2),n=r[0],i=r[1];return va.setTwoToneColors({primaryColor:n,secondaryColor:i})}function a8(){var e=va.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var o8=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];r1(Ao.primary);var $r=at.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,u=e.twoToneColor,f=N_(e,o8),d=at.useContext(x_),p=d.prefixCls,m=p===void 0?"anticon":p,y=d.rootClassName,_=Il(y,m,Kt(Kt({},"".concat(m,"-").concat(n.name),!!n.name),"".concat(m,"-spin"),!!i||n.name==="loading"),r),w=s;w===void 0&&l&&(w=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,g=t1(u),C=F_(g,2),S=C[0],E=C[1];return at.createElement("span",_r({role:"img","aria-label":n.name},f,{ref:t,tabIndex:w,onClick:l,className:_}),at.createElement(va,{icon:n,primaryColor:S,secondaryColor:E,style:v}))});$r.displayName="AntdIcon",$r.getTwoToneColor=a8,$r.setTwoToneColor=r1;var s8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},l8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:s8}))},Zd=at.forwardRef(l8);process.env.NODE_ENV!=="production"&&(Zd.displayName="CheckOutlined");var c8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},u8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:c8}))},n1=at.forwardRef(u8);process.env.NODE_ENV!=="production"&&(n1.displayName="DeleteOutlined");var f8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},d8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:f8}))},i1=at.forwardRef(d8);process.env.NODE_ENV!=="production"&&(i1.displayName="DownOutlined");var h8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},p8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:h8}))},Qd=at.forwardRef(p8);process.env.NODE_ENV!=="production"&&(Qd.displayName="LeftOutlined");var m8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},g8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:m8}))},a1=at.forwardRef(g8);process.env.NODE_ENV!=="production"&&(a1.displayName="MenuOutlined");var y8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},v8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:y8}))},o1=at.forwardRef(v8);process.env.NODE_ENV!=="production"&&(o1.displayName="PlusOutlined");var b8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},_8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:b8}))},eh=at.forwardRef(_8);process.env.NODE_ENV!=="production"&&(eh.displayName="RightOutlined");var $8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},w8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:$8}))},s1=at.forwardRef(w8);process.env.NODE_ENV!=="production"&&(s1.displayName="UpOutlined");var S8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},C8=function(t,r){return at.createElement($r,_r({},t,{ref:r,icon:S8}))},l1=at.forwardRef(C8);process.env.NODE_ENV!=="production"&&(l1.displayName="UploadOutlined");function c1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=c1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function E8(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=c1(e))&&(n&&(n+=" "),n+=t);return n}const u1=e=>{const{canAdd:t,disabled:r,idSchema:n,uiSchema:i,items:a,onAddClick:s,readonly:l,registry:u,required:f,schema:d,title:p}=e,m=we(i),y=Se("ArrayFieldDescriptionTemplate",u,m),_=Se("ArrayFieldItemTemplate",u,m),w=Se("ArrayFieldTitleTemplate",u,m),v=p||m.title?$.jsxs($.Fragment,{children:[$.jsx(w,{idSchema:n,title:m.title||p,required:f,schema:d,uiSchema:i,registry:u}),(m.description||d.description)&&$.jsx("div",{style:{marginTop:"8px"},children:$.jsx(y,{idSchema:n,description:m.description||d.description,schema:d,uiSchema:i,registry:u})})]}):void 0;return $.jsx("div",{className:E8("rjsf-array-field",m.classNames),children:$.jsx(re.Card,{title:v,style:{borderColor:"#e2e8f0"},children:$.jsxs(re.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[a&&a.map(({key:g,...C})=>$.jsx(_,{...C},g)),t&&$.jsxs(re.Button,{type:"dashed",onClick:s,disabled:r||l,size:"small",block:!0,icon:$.jsx(o1,{}),children:["Add ",p||"Item"]})]})})})},f1=e=>{const{children:t,disabled:r,hasToolbar:n,buttonsProps:i,readonly:a}=e,{hasMoveDown:s,hasMoveUp:l,hasRemove:u,index:f,onDropIndexClick:d,onReorderClick:p}=i,m=n?$.jsxs(re.Space,{size:"small",children:[(l||s)&&$.jsx(a1,{style:{color:"#94a3b8",fontSize:"16px"}}),l&&$.jsx(re.Button,{type:"text",size:"small",disabled:r||a,onClick:p(f,f-1),icon:$.jsx(s1,{}),title:"Move up"}),s&&$.jsx(re.Button,{type:"text",size:"small",disabled:r||a,onClick:p(f,f+1),icon:$.jsx(i1,{}),title:"Move down"}),u&&$.jsx(re.Button,{type:"text",size:"small",danger:!0,disabled:r||a,onClick:d(f),icon:$.jsx(n1,{}),title:"Remove"})]}):null;return $.jsx(re.Card,{style:{borderColor:"#e2e8f0",position:"relative"},extra:m,bodyStyle:{padding:"16px"},children:$.jsx("div",{style:n?{paddingRight:"96px"}:void 0,children:t})})},d1=({currentStep:e,totalSteps:t,progressPercentage:r,className:n,style:i})=>$.jsxs("div",{className:n,style:{...i},children:[$.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",marginBottom:"12px"},children:[$.jsxs("span",{style:{fontWeight:500,color:"#374151"},children:["Step ",e," of ",t]}),$.jsxs("span",{style:{fontWeight:500,color:"#374151"},children:[r,"% Complete"]})]}),$.jsx(re.Progress,{percent:r,showInfo:!1,strokeColor:"#1f2937",trailColor:"#e5e7eb"})]}),h1=({steps:e,currentStep:t,onStepChange:r,className:n,style:i})=>{const a=l=>{r&&!e[l].disabled&&r(l)},s=(l,u,f)=>l?{backgroundColor:"#1f2937",borderColor:"#1f2937",color:"white"}:u&&!l?{backgroundColor:"#f0fdf4",borderColor:"#86efac",color:"#15803d"}:f?{backgroundColor:"#f3f4f6",borderColor:"#f3f4f6",color:"#9ca3af",cursor:"not-allowed"}:{};return $.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",overflowX:"auto",...i},className:n,children:e.map((l,u)=>{const f=u===t,d=l.completed,p=l.disabled,m=l.icon;return $.jsxs(re.Button,{type:f?"primary":"default",size:"small",onClick:()=>a(u),disabled:p,style:{borderRadius:"9999px",display:"flex",alignItems:"center",gap:"8px",...s(f,d||!1,p||!1)},icon:m?$.jsx(m,{className:""}):void 0,children:[$.jsx("span",{style:{fontWeight:500,fontSize:"14px",whiteSpace:"nowrap"},children:l.title}),d&&!f&&$.jsx(re.Badge,{count:$.jsx(Zd,{style:{fontSize:"10px",color:"#15803d"}}),style:{backgroundColor:"#dcfce7",marginLeft:"4px"}})]},l.id)})})},p1=({onPrevious:e,onNext:t,onSubmit:r,canGoNext:n=!0,canGoPrevious:i=!0,isLastStep:a=!1,submitLabel:s="Submit",nextLabel:l="Next",previousLabel:u="Previous",className:f,style:d})=>{const p=()=>{a&&r?r():t&&t()};return $.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",...d},className:f,children:[$.jsx(re.Button,{onClick:e,disabled:!i||!e,icon:$.jsx(Qd,{}),children:u}),$.jsxs(re.Button,{type:a?"primary":"default",onClick:p,disabled:!n,style:a?{backgroundColor:"#52c41a",borderColor:"#52c41a"}:void 0,children:[a?s:l,!a&&$.jsx(eh,{})]})]})},O8=({title:e,subtitle:t,steps:r,currentStep:n,children:i,onStepChange:a,onPrevious:s,onNext:l,onSubmit:u,canGoNext:f=!0,canGoPrevious:d=!0,isLastStep:p=!1,submitLabel:m="Submit",nextLabel:y="Next",previousLabel:_="Previous",className:w})=>{const v=r.filter(S=>S.completed).length,g=r.length,C=Math.round(v/g*100);return $.jsx("div",{className:w,style:{minHeight:"100vh",backgroundColor:"#f5f5f5",padding:"32px 0"},children:$.jsxs("div",{style:{maxWidth:"896px",margin:"0 auto",padding:"0 16px"},children:[$.jsxs("div",{style:{textAlign:"center",marginBottom:"32px"},children:[$.jsx("h1",{style:{fontSize:"30px",fontWeight:"bold",color:"#1f2937",marginBottom:"8px"},children:e}),t&&$.jsx("p",{style:{fontSize:"16px",color:"#6b7280",marginBottom:"32px"},children:t}),$.jsx("div",{style:{marginBottom:"32px"},children:$.jsx(d1,{currentStep:n+1,totalSteps:g,progressPercentage:C})}),$.jsx("div",{style:{marginBottom:"32px"},children:$.jsx(h1,{steps:r,currentStep:n,onStepChange:a})})]}),$.jsx("div",{style:{backgroundColor:"white",borderRadius:"8px",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",border:"1px solid #e5e7eb",padding:"32px",marginBottom:"32px"},children:i}),$.jsx(p1,{onPrevious:s,onNext:l,onSubmit:u,canGoNext:f,canGoPrevious:d,isLastStep:p,submitLabel:m,nextLabel:y,previousLabel:_})]})})},m1=({title:e,description:t,properties:r,required:n,uiSchema:i,idSchema:a,schema:s,registry:l})=>{const u=we(i),f=Se("TitleFieldTemplate",l,u),d=Se("DescriptionFieldTemplate",l,u),p=e&&e!==s.title,m=u.icon,y=u.columns||1,_=u.sectionClass||"",w=()=>{switch(y){case 2:return"repeat(2, 1fr)";case 3:return"repeat(3, 1fr)";case 4:return"repeat(4, 1fr)";default:return"1fr"}};return $.jsxs("div",{className:_,style:{display:"flex",flexDirection:"column",gap:"24px"},children:[p&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[m&&B.createElement(m,{className:""}),$.jsx(f,{id:a.$id,title:e,required:n,schema:s,uiSchema:i,registry:l})]}),t&&$.jsx(d,{id:a.$id,description:t,schema:s,uiSchema:i,registry:l})]}),$.jsx("div",{style:{display:"grid",gap:"24px",gridTemplateColumns:w()},children:r.map(v=>{const g=v.name==="description"||v.name==="notes"||v.name==="primaryActivity"||v.name==="residentialAddress";return $.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",gridColumn:g?"1 / -1":void 0},children:v.content},v.name)})})]})},g1=({title:e,description:t,properties:r,uiSchema:n,schema:i,sectionTitle:a,sectionDescription:s,sectionIcon:l})=>{const u=we(n),f=a||e,d=s||t,p=u.columns||1;return $.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[f&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[l&&$.jsx(l,{className:""}),$.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:0},children:f})]}),d&&$.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:0},children:d})]}),e&&e!==f&&$.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",borderBottom:"1px solid #e5e7eb",paddingBottom:"16px"},children:[$.jsx("h3",{style:{fontSize:"18px",fontWeight:500,color:"#111827",margin:0},children:e}),t&&$.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:0},children:t})]}),$.jsx("div",{style:{display:"grid",gap:"24px",gridTemplateColumns:p===1?"1fr":p===2?"repeat(2, 1fr)":"repeat(3, 1fr)",gridAutoRows:"min-content"},children:r.map(m=>{var v,g,C,S,E,A;const y=(v=i.properties)==null?void 0:v[m.name],_=y&&typeof y=="object"&&"type"in y&&y.type==="array",w=((g=m.name)==null?void 0:g.includes("address"))||((C=m.name)==null?void 0:C.includes("description"))||((S=m.name)==null?void 0:S.includes("notes"))||((E=m.name)==null?void 0:E.includes("Activity"))||_||((A=n==null?void 0:n[m.name])==null?void 0:A["ui:widget"])==="textarea";return $.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px",gridColumn:w&&p>1?"1 / -1":void 0},children:m.content},m.name)})})]})},y1=({uiSchema:e,...t})=>{const{submitText:r,norender:n,props:i={}}=jd(e);return n?null:$.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:"16px",borderTop:"1px solid #d9d9d9"},children:$.jsx(re.Button,{type:"primary",htmlType:"submit",size:"large",style:{minWidth:"96px"},...i,...t,children:r||"Submit"})})},v1=({id:e,children:t,displayLabel:r,rawErrors:n=[],errors:i,help:a,description:s,rawDescription:l,classNames:u,style:f,disabled:d,label:p,hidden:m,readonly:y,required:_,schema:w,uiSchema:v,registry:g})=>{var Y;const C=we(v),S=Se("WrapIfAdditionalTemplate",g,C);if(m)return $.jsx("div",{style:{display:"none"},children:t});const E=n.length>0?"error":void 0,x=a&&((Y=a.props)==null?void 0:Y.help)?a:r&&l?s:void 0,N=n.length>0?i:void 0;return $.jsx(S,{classNames:u,style:f,disabled:d,id:e,label:p,onDropPropertyClick:K=>()=>{},onKeyChange:K=>()=>{},readonly:y,required:_,schema:w,uiSchema:v,registry:g,children:$.jsxs(re.Form.Item,{label:r?p:void 0,required:_,validateStatus:E,help:x,labelCol:{span:24},wrapperCol:{span:24},style:{...f},className:`${u||""} vertical-form-item`,children:[t,N]})})},b1={address:jg,phone:Bg,currency:Ug},th={FieldTemplate:v1,ArrayFieldTemplate:u1,ArrayFieldItemTemplate:f1,WizardObjectFieldTemplate:m1,WizardSectionTemplate:g1,ButtonTemplates:{SubmitButton:y1}},_1=({id:e,value:t,required:r,disabled:n,readonly:i,onChange:a,onBlur:s,onFocus:l,schema:u})=>{const f=ht(e,u),d=async y=>{const _=y.target.value;a(_),await f.onChange(_)},p=async y=>{const _=y.target.value;s&&s(e,_),await f.onBlur(_)},m=async y=>{const _=y.target.value;l&&l(e,_),await f.onFocus(_)};return $.jsx(re.Input,{id:e,type:"color",value:t||"#000000",required:r,disabled:n||i,onChange:d,onBlur:p,onFocus:m,style:{height:"40px",width:"100%",cursor:"pointer"}})},Io=(e={})=>{const{emptyValue:t,size:r,placeholder:n,prefix:i,suffix:a,allowClear:s,bordered:l,variant:u,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,addonBefore:w,addonAfter:v,...g}=e;let C=u;return l!==void 0&&!u&&(C=l?"outlined":"borderless"),{size:r,placeholder:n,prefix:i,suffix:a,allowClear:s,variant:C,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,addonBefore:w,addonAfter:v,...g}},A8=(e={})=>{const{emptyValue:t,rows:r,autoSize:n,size:i,placeholder:a,allowClear:s,bordered:l,variant:u,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,prefix:w,suffix:v,addonBefore:g,addonAfter:C,...S}=e;let E=u;return l!==void 0&&!u&&(E=l?"outlined":"borderless"),{size:i,placeholder:a,allowClear:s,variant:E,defaultValue:f,maxLength:d,showCount:p,status:m,style:y,className:_,rows:r,autoSize:n,...S}},$1=(e={})=>{const{emptyValue:t,format:r,picker:n,placeholder:i,placement:a,showTime:s,showNow:l,showToday:u,disabledDate:f,size:d,bordered:p,variant:m,suffixIcon:y,style:_,className:w,status:v,...g}=e;let C=m;p!==void 0&&!m&&(C=p?"outlined":"borderless");const S={format:r,picker:n,placement:a,showTime:s,showNow:l,showToday:u,disabledDate:f,size:d,variant:C,suffixIcon:y,style:_,className:w,status:v,...g};return i&&(S.placeholder=i),S},T8=(e={})=>{const{emptyValue:t,size:r,placeholder:n,prefix:i,min:a,max:s,step:l,precision:u,decimalSeparator:f,formatter:d,parser:p,keyboard:m,controls:y,bordered:_,variant:w,style:v,className:g,status:C,addonBefore:S,addonAfter:E,...A}=e;let x=w;return _!==void 0&&!w&&(x=_?"outlined":"borderless"),{size:r,placeholder:n,prefix:i,min:a,max:s,step:l,precision:u,decimalSeparator:f,formatter:d,parser:p,keyboard:m,controls:y,variant:x,style:v,className:g,status:C,addonBefore:S,addonAfter:E,...A}},nn=e=>(e||[]).length>0,xo=(e,t="")=>(e==null?void 0:e.emptyValue)!==void 0?e.emptyValue:t,rh=(e,t,r="")=>e===""||e===null||e===void 0?xo(t,r):e,P8=(e={})=>({min:e.minimum,max:e.maximum,step:e.multipleOf}),nc=(e,t=!1)=>typeof e=="string"?e.toLowerCase()==="true":typeof e=="boolean"?e:t,nh=({id:e,value:t,disabled:r,readonly:n,onChange:i,onBlur:a,onFocus:s,options:l,schema:u,label:f,required:d})=>{const p=u.minimum||0,m=u.maximum||100,y=l.step!==void 0?l.step:u.multipleOf||1,_=ht(e,u),w=l.marks,v=nc(l.dots,!1),g=l.included!==!1,C=nc(l.vertical,!1),S=nc(l.range,!1),E=l.tooltip||{},A=l.trackStyle,x=l.handleStyle,N=l.style,Y=l.onAfterChange,ae={id:e,min:p,max:m,value:t!==void 0?t:S?[p,m]:p,onChange:async k=>{i(k),await _.onChange(k)},onAfterChange:k=>{a&&a(e,k),Y&&Y(k)},onFocus:async()=>{s==null||s(e,t),await _.onFocus(t)},onBlur:async()=>{a==null||a(e,t),await _.onBlur(t)},disabled:r||n,vertical:C,range:S,dots:v,included:g,style:N};y!==null&&(ae.step=y),w!==void 0&&(ae.marks=w),E&&(ae.tooltip=E),A&&(ae.trackStyle=A),x&&(ae.handleStyle=x);const Q=()=>S&&Array.isArray(t)?`${t[0]} - ${t[1]}`:t!==void 0?t:p;return $.jsxs("div",{style:{marginBottom:"16px"},children:[(f||u.title)&&$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[f||u.title,d&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),u.description&&$.jsx("div",{style:{marginBottom:"4px",color:"#666",fontSize:"14px"},children:u.description}),!C&&!l.hideValue&&$.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginBottom:"8px"},children:$.jsx("span",{style:{fontSize:"14px",fontWeight:500,fontVariantNumeric:"tabular-nums"},children:Q()})}),$.jsx(re.Slider,{...ae})]})},w1=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,onFocus:l,onBlur:u,options:f,schema:d})=>{const p=ht(e,d),m=async Y=>{s(Y),await p.onChange(Y)},y=async()=>{l==null||l(e,t),await p.onFocus(t)},_=async()=>{u==null||u(e,t),await p.onBlur(t)},w=Number(f.count||f.max||d.maximum||5),v=nc(f.allowHalf,!1),g=f.allowClear!==!1,C=f.character,S=f.tooltips,E=f.style,A=f.onHoverChange,x={value:t||0,onChange:m,onFocus:y,onBlur:_,disabled:n||i,count:w,allowHalf:v,allowClear:r?!1:g,style:E};C&&(x.character=C),A&&(x.onHoverChange=A);const N=()=>S&&S.length>0?$.jsx(re.Rate,{...x,tooltips:S}):$.jsx(re.Rate,{...x});return $.jsxs("div",{style:{marginBottom:"16px"},children:[(a||d.title)&&$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a||d.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),d.description&&$.jsx("div",{style:{marginBottom:"4px",color:"#666",fontSize:"14px"},children:d.description}),N()]})},ic=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,schema:p,rawErrors:m=[]}=e,y=ht(t,p),_=A=>{const x=A===null?xo(d,void 0):A;l(x),y.onChange(x).catch(console.error)},w=async()=>{u&&u(t,r),await y.onBlur(r)},v=async()=>{f&&f(t,r),await y.onFocus(r)},g=nn(m),C=P8(p),S=T8(d),E={...S,min:S.min??C.min,max:S.max??C.max,step:S.step??C.step};return $.jsx(re.InputNumber,{id:t,value:r??void 0,placeholder:s||E.placeholder,required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,status:g?"error":void 0,style:{width:"100%",...E.style},...E})},ac=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=ht(t,m),_=async S=>{const E=rh(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=nn(p),C=Io(d);return $.jsx(re.Input,{id:t,type:"tel",value:r||"",placeholder:s||C.placeholder||"Enter phone number",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},ih=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=ht(t,m),_=async S=>{const E=rh(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=nn(p),C=Io(d);return $.jsx(re.Input,{id:t,type:"email",value:r||"",placeholder:s||C.placeholder||"Enter email address",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},ah=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d,rawErrors:p=[],schema:m}=e,y=ht(t,m),_=async S=>{const E=rh(S.target.value,d);l(E),await y.onChange(E)},w=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},v=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},g=nn(p),C=Io(d);return $.jsx(re.Input,{id:t,type:"url",value:r||"",placeholder:s||C.placeholder||"Enter URL",required:n,disabled:i,readOnly:a,onChange:_,onBlur:w,onFocus:v,"aria-invalid":g,status:g?"error":void 0,...C})},Do=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=ht(t,m),_=nn(p),w=async S=>{const E=S.target.value===""?xo(d):S.target.value;l(E),await y.onChange(E)},v=async S=>{const E=S.target.value;u&&u(t,E),await y.onBlur(E)},g=async S=>{const E=S.target.value;f&&f(t,E),await y.onFocus(E)},C=Io(d);return $.jsx(re.Input,{id:t,value:r||"",placeholder:s||C.placeholder,required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,...C})},S1=Object.freeze(Object.defineProperty({__proto__:null,TextWidget:Do,default:Do},Symbol.toStringTag,{value:"Module"})),{TextArea:I8}=re.Input,Fo=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=ht(t,m),_=nn(p),w=async E=>{const A=E.target.value===""?xo(d):E.target.value;l(A),await y.onChange(A)},v=async E=>{const A=E.target.value;u&&u(t,A),await y.onBlur(A)},g=async E=>{const A=E.target.value;f&&f(t,A),await y.onFocus(A)},C=A8(d),S=C.rows||4;return $.jsx(I8,{id:t,value:r||"",placeholder:s||C.placeholder,required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,style:{resize:"vertical",...C.style},...C,rows:S})},C1=Object.freeze(Object.defineProperty({__proto__:null,TextareaWidget:Fo,default:Fo},Symbol.toStringTag,{value:"Module"})),No=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,placeholder:s,onChange:l,onBlur:u,onFocus:f,options:d={},rawErrors:p=[],schema:m}=e,y=ht(t,m),_=nn(p),w=async A=>{const x=A.target.value===""?xo(d):A.target.value;l(x),await y.onChange(x)},v=async A=>{const x=A.target.value;u&&u(t,x),await y.onBlur(x)},g=async A=>{const x=A.target.value;f&&f(t,x),await y.onFocus(x)},C=Io(d),{visibilityToggle:S=!0,iconRender:E}=d;return $.jsx(re.Input.Password,{id:t,value:r||"",placeholder:s||C.placeholder||"Enter password",required:n,disabled:i,readOnly:a,onChange:w,onBlur:v,onFocus:g,status:_?"error":C.status,visibilityToggle:S,iconRender:E,...C})},E1=Object.freeze(Object.defineProperty({__proto__:null,PasswordWidget:No,default:No},Symbol.toStringTag,{value:"Module"})),x8=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,onBlur:l,onFocus:u,options:f,schema:d})=>{const p=f.inputType||"date",m=ht(e,d),y=async v=>{const g=v.target.value;s(g),await m.onChange(g)},_=async v=>{const g=v.target.value;l&&l(e,g),await m.onBlur(g)},w=async v=>{const g=v.target.value;u&&u(e,g),await m.onFocus(g)};return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"4px",fontWeight:500},children:[a||d.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx(re.Input,{id:e,type:p,value:t||"",required:r,disabled:n||i,onChange:y,onBlur:_,onFocus:w,min:typeof f.minDate=="string"||typeof f.minDate=="number"?f.minDate:void 0,max:typeof f.maxDate=="string"||typeof f.maxDate=="number"?f.maxDate:void 0,style:{width:"100%"}})]})};var O1={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Nr,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",l="minute",u="hour",f="day",d="week",p="month",m="quarter",y="year",_="date",w="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var k=["th","st","nd","rd"],q=Q%100;return"["+Q+(k[(q-20)%10]||k[q]||k[0])+"]"}},S=function(Q,k,q){var W=String(Q);return!W||W.length>=k?Q:""+Array(k+1-W.length).join(q)+Q},E={s:S,z:function(Q){var k=-Q.utcOffset(),q=Math.abs(k),W=Math.floor(q/60),L=q%60;return(k<=0?"+":"-")+S(W,2,"0")+":"+S(L,2,"0")},m:function Q(k,q){if(k.date()<q.date())return-Q(q,k);var W=12*(q.year()-k.year())+(q.month()-k.month()),L=k.clone().add(W,p),X=q-L<0,U=k.clone().add(W+(X?-1:1),p);return+(-(W+(q-L)/(X?L-U:U-L))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M:p,y,w:d,d:f,D:_,h:u,m:l,s,ms:a,Q:m}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},A="en",x={};x[A]=C;var N="$isDayjsObject",Y=function(Q){return Q instanceof ee||!(!Q||!Q[N])},K=function Q(k,q,W){var L;if(!k)return A;if(typeof k=="string"){var X=k.toLowerCase();x[X]&&(L=X),q&&(x[X]=q,L=X);var U=k.split("-");if(!L&&U.length>1)return Q(U[0])}else{var F=k.name;x[F]=k,L=F}return!W&&L&&(A=L),L||!W&&A},H=function(Q,k){if(Y(Q))return Q.clone();var q=typeof k=="object"?k:{};return q.date=Q,q.args=arguments,new ee(q)},te=E;te.l=K,te.i=Y,te.w=function(Q,k){return H(Q,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var ee=function(){function Q(q){this.$L=K(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[N]=!0}var k=Q.prototype;return k.parse=function(q){this.$d=function(W){var L=W.date,X=W.utc;if(L===null)return new Date(NaN);if(te.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var U=L.match(v);if(U){var F=U[2]-1||0,z=(U[7]||"0").substring(0,3);return X?new Date(Date.UTC(U[1],F,U[3]||1,U[4]||0,U[5]||0,U[6]||0,z)):new Date(U[1],F,U[3]||1,U[4]||0,U[5]||0,U[6]||0,z)}}return new Date(L)}(q),this.init()},k.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},k.$utils=function(){return te},k.isValid=function(){return this.$d.toString()!==w},k.isSame=function(q,W){var L=H(q);return this.startOf(W)<=L&&L<=this.endOf(W)},k.isAfter=function(q,W){return H(q)<this.startOf(W)},k.isBefore=function(q,W){return this.endOf(W)<H(q)},k.$g=function(q,W,L){return te.u(q)?this[W]:this.set(L,q)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(q,W){var L=this,X=!!te.u(W)||W,U=te.p(q),F=function(ue,he){var be=te.w(L.$u?Date.UTC(L.$y,he,ue):new Date(L.$y,he,ue),L);return X?be:be.endOf(f)},z=function(ue,he){return te.w(L.toDate()[ue].apply(L.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(he)),L)},j=this.$W,T=this.$M,D=this.$D,V="set"+(this.$u?"UTC":"");switch(U){case y:return X?F(1,0):F(31,11);case p:return X?F(1,T):F(0,T+1);case d:var Z=this.$locale().weekStart||0,oe=(j<Z?j+7:j)-Z;return F(X?D-oe:D+(6-oe),T);case f:case _:return z(V+"Hours",0);case u:return z(V+"Minutes",1);case l:return z(V+"Seconds",2);case s:return z(V+"Milliseconds",3);default:return this.clone()}},k.endOf=function(q){return this.startOf(q,!1)},k.$set=function(q,W){var L,X=te.p(q),U="set"+(this.$u?"UTC":""),F=(L={},L[f]=U+"Date",L[_]=U+"Date",L[p]=U+"Month",L[y]=U+"FullYear",L[u]=U+"Hours",L[l]=U+"Minutes",L[s]=U+"Seconds",L[a]=U+"Milliseconds",L)[X],z=X===f?this.$D+(W-this.$W):W;if(X===p||X===y){var j=this.clone().set(_,1);j.$d[F](z),j.init(),this.$d=j.set(_,Math.min(this.$D,j.daysInMonth())).$d}else F&&this.$d[F](z);return this.init(),this},k.set=function(q,W){return this.clone().$set(q,W)},k.get=function(q){return this[te.p(q)]()},k.add=function(q,W){var L,X=this;q=Number(q);var U=te.p(W),F=function(T){var D=H(X);return te.w(D.date(D.date()+Math.round(T*q)),X)};if(U===p)return this.set(p,this.$M+q);if(U===y)return this.set(y,this.$y+q);if(U===f)return F(1);if(U===d)return F(7);var z=(L={},L[l]=n,L[u]=i,L[s]=r,L)[U]||1,j=this.$d.getTime()+q*z;return te.w(j,this)},k.subtract=function(q,W){return this.add(-1*q,W)},k.format=function(q){var W=this,L=this.$locale();if(!this.isValid())return L.invalidDate||w;var X=q||"YYYY-MM-DDTHH:mm:ssZ",U=te.z(this),F=this.$H,z=this.$m,j=this.$M,T=L.weekdays,D=L.months,V=L.meridiem,Z=function(he,be,Le,ft){return he&&(he[be]||he(W,X))||Le[be].slice(0,ft)},oe=function(he){return te.s(F%12||12,he,"0")},ue=V||function(he,be,Le){var ft=he<12?"AM":"PM";return Le?ft.toLowerCase():ft};return X.replace(g,function(he,be){return be||function(Le){switch(Le){case"YY":return String(W.$y).slice(-2);case"YYYY":return te.s(W.$y,4,"0");case"M":return j+1;case"MM":return te.s(j+1,2,"0");case"MMM":return Z(L.monthsShort,j,D,3);case"MMMM":return Z(D,j);case"D":return W.$D;case"DD":return te.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return Z(L.weekdaysMin,W.$W,T,2);case"ddd":return Z(L.weekdaysShort,W.$W,T,3);case"dddd":return T[W.$W];case"H":return String(F);case"HH":return te.s(F,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ue(F,z,!0);case"A":return ue(F,z,!1);case"m":return String(z);case"mm":return te.s(z,2,"0");case"s":return String(W.$s);case"ss":return te.s(W.$s,2,"0");case"SSS":return te.s(W.$ms,3,"0");case"Z":return U}return null}(he)||U.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(q,W,L){var X,U=this,F=te.p(W),z=H(q),j=(z.utcOffset()-this.utcOffset())*n,T=this-z,D=function(){return te.m(U,z)};switch(F){case y:X=D()/12;break;case p:X=D();break;case m:X=D()/3;break;case d:X=(T-j)/6048e5;break;case f:X=(T-j)/864e5;break;case u:X=T/i;break;case l:X=T/n;break;case s:X=T/r;break;default:X=T}return L?X:te.a(X)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return x[this.$L]},k.locale=function(q,W){if(!q)return this.$L;var L=this.clone(),X=K(q,W,!0);return X&&(L.$L=X),L},k.clone=function(){return te.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},Q}(),ae=ee.prototype;return H.prototype=ae,[["$ms",a],["$s",s],["$m",l],["$H",u],["$W",f],["$M",p],["$y",y],["$D",_]].forEach(function(Q){ae[Q[1]]=function(k){return this.$g(k,Q[0],Q[1])}}),H.extend=function(Q,k){return Q.$i||(Q(k,ee,H),Q.$i=!0),H},H.locale=K,H.isDayjs=Y,H.unix=function(Q){return H(1e3*Q)},H.en=x[A],H.Ls=x,H.p={},H})})(O1);var D8=O1.exports;const oc=Qt(D8),oh=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=ht(t,p),y=async(C,S)=>{const E=Array.isArray(S)?S[0]:S,A=E===""?f.emptyValue:E;s(A),await m.onChange(A)},_=async()=>{l&&l(t,r),await m.onBlur(r)},w=async()=>{u&&u(t,r),await m.onFocus(r)},v=nn(d);if(a)return $.jsx(re.Input,{id:t,type:"date",value:r||"",required:n,disabled:i,readOnly:a,"aria-invalid":v,status:v?"error":void 0});const g=$1(f);return $.jsx(re.DatePicker,{id:t,value:r?oc(r):void 0,placeholder:g.placeholder||"Select a date",disabled:i,onChange:y,onBlur:_,onFocus:w,status:v?"error":g.status,style:{width:"100%",...g.style},format:g.format||"YYYY-MM-DD",...g})},sh=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=ht(t,p),y=nn(d);if(f.useNativeInput||a){const S=async x=>{const N=x.target.value===""?f.emptyValue:x.target.value;s(N),await m.onChange(N)},E=async x=>{const N=x.target.value;l&&l(t,N),await m.onBlur(N)},A=async x=>{const N=x.target.value;u&&u(t,N),await m.onFocus(N)};return $.jsx(re.Input,{id:t,type:"datetime-local",value:r||"",required:n,disabled:i,readOnly:a,onChange:S,onBlur:E,onFocus:A,"aria-invalid":y,status:y?"error":void 0})}const _=async(S,E)=>{const A=Array.isArray(E)?E[0]:E,x=A===""?f.emptyValue:A;s(x),await m.onChange(x)},w=async()=>{l&&l(t,r),await m.onBlur(r)},v=async()=>{u&&u(t,r),await m.onFocus(r)},g=$1(f),C=g.showTime!==void 0?g.showTime:!0;return $.jsx(re.DatePicker,{id:t,value:r?oc(r):void 0,placeholder:g.placeholder||"Select date and time",disabled:i,onChange:_,onBlur:w,onFocus:v,status:y?"error":g.status,style:{width:"100%",...g.style},format:g.format||"YYYY-MM-DD HH:mm:ss",showTime:C,...g})},A1=({id:e,value:t,required:r,disabled:n,readonly:i,label:a,onChange:s,options:l,schema:u})=>{const f=B.useRef(null),d=l.accept||"*/*",p=l.multiple||!1,m=ht(e,u),y=async v=>{const g=v.target.files;if(!g)return;let C;if(p){const S=Array.from(g).map(E=>({name:E.name,size:E.size,type:E.type,lastModified:E.lastModified}));C=S,s(S)}else{const S=g[0];S&&(C={name:S.name,size:S.size,type:S.type,lastModified:S.lastModified},s(C))}C&&await m.onChange(C)},_=async()=>{f.current&&(f.current.value=""),s(null),await m.onChange(null)},w=v=>v<1024?v+" B":v<1024*1024?(v/1024).toFixed(1)+" KB":(v/(1024*1024)).toFixed(1)+" MB";return $.jsxs("div",{style:{marginBottom:"16px"},children:[$.jsxs("label",{htmlFor:e,style:{display:"block",marginBottom:"8px",fontWeight:500},children:[a||u.title,r&&$.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}),$.jsx("input",{ref:f,id:e,type:"file",accept:d,multiple:p,required:r,disabled:n||i,onChange:y,style:{cursor:"pointer",width:"100%"}}),t&&$.jsx("div",{style:{marginTop:"8px"},children:p&&Array.isArray(t)?$.jsx(re.Space,{wrap:!0,children:t.map((v,g)=>$.jsx(re.Tag,{closable:!n&&!i,onClose:_,style:{display:"flex",alignItems:"center",gap:"4px"},children:$.jsxs("span",{style:{fontSize:"12px"},children:[v.name," (",w(v.size),")"]})},g))}):t&&typeof t=="object"&&"name"in t?$.jsx(re.Tag,{closable:!n&&!i,onClose:_,style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:$.jsxs("span",{style:{fontSize:"12px"},children:[t.name," (",w(t.size),")"]})}):null})]})},sc=e=>{const{id:t,value:r,required:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d=[],schema:p}=e,m=ht(t,p),[y,_]=B.useState(!1),w=f.useAntUpload===!0,v=typeof f.accept=="string"?f.accept:"*/*",g=typeof f.maxSize=="number"?f.maxSize:void 0,C=nn(d),S=H=>new Promise((te,ee)=>{const ae=new FileReader;ae.onload=()=>{const Q=ae.result;te(Q)},ae.onerror=Q=>ee(Q),ae.readAsDataURL(H)}),E=async H=>{const te=H.target.files;if(te&&te.length>0){const ee=te[0];if(g&&ee.size>g*1024*1024){re.message.error(`File size must be less than ${g}MB`);return}try{_(!0);const ae=await S(ee);s(ae),await m.onChange(ae)}catch(ae){console.error("Error converting file to base64:",ae),re.message.error("Failed to process file")}finally{_(!1)}}},A=async({file:H,onSuccess:te,onError:ee})=>{const ae=H;if(g&&ae.size>g*1024*1024){re.message.error(`File size must be less than ${g}MB`),ee&&ee(new Error("File too large"));return}try{_(!0);const Q=await S(ae);s(Q),await m.onChange(Q),te&&te("ok"),re.message.success("File uploaded successfully")}catch(Q){console.error("Error converting file to base64:",Q),re.message.error("Failed to upload file"),ee&&ee(Q)}finally{_(!1)}},x=async()=>{l&&l(t,r),await m.onBlur(r)},N=async()=>{u&&u(t,r),await m.onFocus(r)},Y=async()=>{s(void 0),await m.onChange(void 0)},K=r?[{uid:"-1",name:"Uploaded File",status:"done",url:r}]:[];return w?$.jsx(re.Upload,{id:t,accept:v,fileList:K,customRequest:A,onRemove:Y,disabled:i||a,maxCount:1,beforeUpload:H=>{var te;if(v!=="*/*"){const ee=v.split(",").map(q=>q.trim()),ae=`.${(te=H.name.split(".").pop())==null?void 0:te.toLowerCase()}`,Q=H.type;if(!ee.some(q=>q.startsWith(".")?ae===q.toLowerCase():q.includes("*")?Q.startsWith(q.replace("*","")):Q===q))return re.message.error(`File type not allowed. Please upload: ${v}`),!1}return!0},children:$.jsx(re.Button,{icon:$.jsx(l1,{}),loading:y,danger:C,children:r?"Replace File":"Click to Upload"})}):$.jsx(re.Input,{id:t,type:"file",required:n,disabled:i||y,readOnly:a,accept:v,onChange:E,onBlur:x,onFocus:N,"aria-invalid":C,className:"file:mr-4 file:py-1 file:px-2 file:rounded file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",status:C?"error":void 0})};var bt=(e=>(e.DROPDOWN="dropdown",e.RADIO="radio",e.CHECKBOX="checkbox",e))(bt||{});function T1(e){return e.type==="static"}function P1(e){return e.type==="api"}function lh(e){return e.type==="websocket"}function I1(e){return e==="checkbox"}const Mo={presentationMode:"dropdown",multiple:!1,allowClear:!0,disabled:!1,readonly:!1,size:"middle",search:{enabled:!1,minLength:1,debounceMs:300,caseSensitive:!1,searchFields:["label"]},accessibility:{announceChanges:!0,keyboard:{arrowKeys:!0,typeAhead:!0,homeEnd:!0}}},ch={ttl:3e5,persistent:!1,storageType:"memory"},ko={type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},x1={maxAttempts:3,baseDelayMs:1e3,maxDelayMs:1e4,backoffMultiplier:2,jitter:!0},mt=class mt{constructor(t={},r={},n){pe(this,"cache");pe(this,"retryConfig");pe(this,"loadingState");pe(this,"errorState");pe(this,"metrics");pe(this,"eventCallbacks");pe(this,"instanceId");pe(this,"isDestroyed",!1);pe(this,"supportsCaching",!0);pe(this,"supportsRealTime",!1);mt.instanceCount++,this.instanceId=`datasource_${mt.instanceCount}_${Date.now()}`,this.cache={...ch,...t},this.retryConfig={...x1,...r},this.eventCallbacks=n,this.loadingState={isLoading:!1,message:"",progress:0},this.errorState={hasError:!1,message:"",recoverable:!0},this.metrics={requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0},mt.instanceCount===1&&this.startCacheCleanup()}async fetchOptions(){var n,i,a,s;if(this.isDestroyed)throw new Error("DataSourceProvider has been destroyed");const t=performance.now(),r=this.getCacheKey();try{if(this.supportsCaching&&r){const u=this.getCachedData(r);if(u)return this.metrics.cacheHitCount++,(i=(n=this.eventCallbacks)==null?void 0:n.onCacheHit)==null||i.call(n,this,r),this.logDebug(`Cache hit for key: ${r}`),u;this.metrics.cacheMissCount++,(s=(a=this.eventCallbacks)==null?void 0:a.onCacheMiss)==null||s.call(a,this,r),this.logDebug(`Cache miss for key: ${r}`)}const l=await this.fetchWithRetry();return this.supportsCaching&&r&&l.length>0&&(this.setCachedData(r,l),this.logDebug(`Cached ${l.length} options with key: ${r}`)),this.updateMetrics(t,!0),l}catch(l){throw this.updateMetrics(t,!1),this.handleError(l instanceof Error?l:new Error(String(l))),l}}getLoadingState(){return{...this.loadingState}}getErrorState(){return{...this.errorState}}getMetrics(){return{...this.metrics}}clearCache(t){var r,n;t?(mt.memoryCache.delete(t),this.logDebug(`Cleared cache for key: ${t}`)):(mt.memoryCache.clear(),this.logDebug("Cleared all cache entries")),(n=(r=this.eventCallbacks)==null?void 0:r.onCacheCleared)==null||n.call(r,this,t||void 0)}clearError(){this.errorState={hasError:!1,message:"",recoverable:!0},this.logDebug("Error state cleared")}resetMetrics(){this.metrics={requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0},this.logDebug("Metrics reset")}hasCachedData(t){const r=t||this.getCacheKey();if(!r)return!1;const n=mt.memoryCache.get(r);return n?Date.now()-n.timestamp>n.ttl?(mt.memoryCache.delete(r),!1):!0:!1}cleanup(){if(this.isDestroyed)return;this.isDestroyed=!0;const t=this.getCacheKey();this.clearCache(t??void 0),this.cleanupResources(),mt.instanceCount--,mt.instanceCount===0&&(this.stopCacheCleanup(),mt.memoryCache.clear()),this.logDebug("DataSourceProvider cleanup completed")}cleanupResources(){}setLoadingState(t,r,n){var i,a;this.loadingState={isLoading:t,message:r||(t?"Loading options...":""),progress:n??(t?void 0:100)},t&&((a=(i=this.eventCallbacks)==null?void 0:i.onLoadingStart)==null||a.call(i,this))}validateAndTransformData(t){if(!Array.isArray(t))throw new Error("Data source must return an array of options");return t.map((r,n)=>{if(!r||typeof r!="object")throw new Error(`Invalid option at index ${n}: must be an object`);if(typeof r.label!="string")throw new Error(`Invalid option at index ${n}: label must be a string`);if(r.value===void 0||r.value===null)throw new Error(`Invalid option at index ${n}: value cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof r.value))throw new Error(`Invalid option at index ${n}: value must be string, number, or boolean`);return{label:r.label,value:r.value,disabled:!!r.disabled,metadata:r.metadata||{}}})}logDebug(t,r){process.env.NODE_ENV==="development"&&console.debug(`[DataSourceProvider:${this.instanceId}] ${t}`,r||"")}logError(t,r){console.error(`[DataSourceProvider:${this.instanceId}] ${t}`,r||"")}async fetchWithRetry(){var r,n;let t=null;for(let i=1;i<=this.retryConfig.maxAttempts;i++)try{this.setLoadingState(!0,`Fetching options (attempt ${i})...`);const a=await this.fetchData(),s=this.validateAndTransformData(a);return this.setLoadingState(!1),this.clearError(),(n=(r=this.eventCallbacks)==null?void 0:r.onLoadingComplete)==null||n.call(r,this,s),s}catch(a){if(t=a instanceof Error?a:new Error(String(a)),this.logError(`Attempt ${i} failed:`,t),i===this.retryConfig.maxAttempts)break;const s=this.retryConfig.baseDelayMs*Math.pow(this.retryConfig.backoffMultiplier,i-1);let l=Math.min(s,this.retryConfig.maxDelayMs);if(this.retryConfig.jitter){const u=l*.25,f=(Math.random()-.5)*2*u;l=Math.max(0,l+f)}this.logDebug(`Retrying in ${Math.round(l)}ms...`),this.setLoadingState(!0,`Retrying in ${Math.round(l/1e3)}s...`,i/this.retryConfig.maxAttempts*100),await new Promise(u=>setTimeout(u,l))}throw this.setLoadingState(!1),t||new Error("Max retry attempts exceeded")}getCachedData(t){const r=mt.memoryCache.get(t);return r?Date.now()-r.timestamp>r.ttl?(mt.memoryCache.delete(t),null):[...r.data]:null}setCachedData(t,r){const n={data:[...r],timestamp:Date.now(),ttl:this.cache.ttl||ch.ttl,key:t};mt.memoryCache.set(t,n)}handleError(t){var r,n;this.errorState={hasError:!0,message:t.message||"An unknown error occurred",code:t.code||"UNKNOWN_ERROR",stack:process.env.NODE_ENV==="development"?t.stack:void 0,recoverable:!0,timestamp:Date.now()},this.metrics.lastErrorTimestamp=Date.now(),(n=(r=this.eventCallbacks)==null?void 0:r.onError)==null||n.call(r,this,t),this.logError("DataSource error:",t)}updateMetrics(t,r){const n=performance.now()-t;this.metrics.requestCount++,this.metrics.lastRequestTimestamp=Date.now(),r?this.metrics.successCount++:this.metrics.errorCount++;const i=this.metrics.requestCount;this.metrics.averageResponseTimeMs=(this.metrics.averageResponseTimeMs*(i-1)+n)/i}startCacheCleanup(){mt.cacheCleanupInterval=setInterval(()=>{this.runCacheCleanup()},3e5)}stopCacheCleanup(){mt.cacheCleanupInterval&&(clearInterval(mt.cacheCleanupInterval),mt.cacheCleanupInterval=void 0)}runCacheCleanup(){const t=Date.now();let r=0;for(const[n,i]of mt.memoryCache.entries())t-i.timestamp>i.ttl&&(mt.memoryCache.delete(n),r++);r>0&&this.logDebug(`Cache cleanup: removed ${r} expired entries`)}};pe(mt,"memoryCache",new Map),pe(mt,"cacheCleanupInterval"),pe(mt,"instanceCount",0);let ba=mt;function D1(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(36)}function F8(e){if(!Array.isArray(e))return["Options must be an array"];const t=[];return e.forEach((r,n)=>{if(!r||typeof r!="object"){t.push(`Option at index ${n} must be an object`);return}const i=r;typeof i.label!="string"&&t.push(`Option at index ${n} must have a string label`),(i.value===void 0||i.value===null)&&t.push(`Option at index ${n} must have a defined value`);const a=["string","number","boolean"];i.value!==void 0&&i.value!==null&&!a.includes(typeof i.value)&&t.push(`Option at index ${n} value must be string, number, or boolean`)}),t.length>0?t:null}class uh extends ba{constructor(r,n={}){const i={ttl:0,persistent:!1,storageType:"memory",...n.cache};super(i,{maxAttempts:1},n.eventCallbacks);pe(this,"validatedOptions");pe(this,"optionGroups",new Map);pe(this,"supportsRealTime",!0);this.validateConfig(r),this.validatedOptions=this.validateAndTransformData(r.options),this.buildOptionGroups(),this.logDebug(`StaticDataSource initialized with ${this.validatedOptions.length} options`)}async fetchData(){return this.validatedOptions.map(r=>({...r,metadata:r.metadata?{...r.metadata}:{}}))}getCacheKey(){return null}searchOptions(r,n){const i=l=>({...l,metadata:l.metadata?{...l.metadata}:{}});if(!n.enabled||!r)return this.validatedOptions.map(i);if(n.minLength&&r.length<n.minLength)return this.validatedOptions.map(i);const a=n.caseSensitive?r:r.toLowerCase(),s=n.searchFields||["label"];return this.validatedOptions.filter(l=>n.customFilter?n.customFilter(l,r):s.some(u=>{var p;let f="";switch(u){case"label":f=l.label;break;case"value":f=String(l.value);break;case"description":f=((p=l.metadata)==null?void 0:p.description)||"";break;default:return!1}return(n.caseSensitive?f:f.toLowerCase()).includes(a)})).map(i)}getGroupedOptions(){const r=new Map;for(const[n,i]of this.optionGroups)r.set(n,i.map(a=>({...a,metadata:a.metadata?{...a.metadata}:{}})));return r}getOptionsByGroup(r){return(this.optionGroups.get(r)||[]).map(i=>({...i,metadata:i.metadata?{...i.metadata}:{}}))}getGroupNames(){return Array.from(this.optionGroups.keys())}updateOptions(r){var i,a;this.logDebug("Updating static options",{oldCount:this.validatedOptions.length,newCount:r.length});const n=this.validateAndTransformData(r);this.validatedOptions.length=0,this.optionGroups.clear(),this.validatedOptions.push(...n),this.buildOptionGroups(),this.clearCache(),this.logDebug(`Updated static options: ${this.validatedOptions.length} options`),(a=(i=this.eventCallbacks)==null?void 0:i.onLoadingComplete)==null||a.call(i,this,this.validatedOptions)}addOptions(r){const n=this.validateAndTransformData(r),i=new Set(this.validatedOptions.map(s=>s.value)),a=n.filter(s=>i.has(s.value));if(a.length>0)throw new Error(`Duplicate option values found: ${a.map(s=>s.value).join(", ")}`);this.validatedOptions.push(...n),this.buildOptionGroups(),this.clearCache(),this.logDebug(`Added ${r.length} new options`)}removeOptions(r){const n=new Set(r),i=this.validatedOptions.length,a=this.validatedOptions.filter(l=>!n.has(l.value));this.validatedOptions.length=0,this.validatedOptions.push(...a),this.buildOptionGroups(),this.clearCache();const s=i-this.validatedOptions.length;return this.logDebug(`Removed ${s} options`),s}getOptionByValue(r){const n=this.validatedOptions.find(i=>i.value===r);return n?{...n,metadata:n.metadata?{...n.metadata}:{}}:null}hasOptionWithValue(r){return this.validatedOptions.some(n=>n.value===r)}getOptionCount(){return this.validatedOptions.length}getMemoryStats(){const r=JSON.stringify(this.validatedOptions).length,n=JSON.stringify(Array.from(this.optionGroups.entries())).length,i=Math.max(1,Math.round((r+n)/1024));return{optionCount:this.validatedOptions.length,groupCount:this.optionGroups.size,estimatedMemoryKB:i}}validateAndTransformData(r){return super.validateAndTransformData(r).map(i=>({...i,metadata:i.metadata?{...i.metadata}:{}}))}cleanupResources(){this.optionGroups.clear(),this.validatedOptions.length=0,this.logDebug("StaticDataSource resources cleaned up")}validateConfig(r){if(!r||typeof r!="object")throw new Error("StaticDataSourceConfig must be an object");if(r.type!=="static")throw new Error('StaticDataSourceConfig type must be "static"');if(!Array.isArray(r.options))throw new Error("StaticDataSourceConfig options must be an array");r.options.length===0&&this.logDebug("Warning: StaticDataSource initialized with empty options array")}buildOptionGroups(){var r;this.optionGroups.clear();for(const n of this.validatedOptions){const i=((r=n.metadata)==null?void 0:r.group)||"ungrouped";this.optionGroups.has(i)||this.optionGroups.set(i,[]),this.optionGroups.get(i).push(n)}this.logDebug(`Built ${this.optionGroups.size} option groups`)}}function N8(e,t){return new uh(e,t)}function M8(e){var t;return!!((t=e.metadata)!=null&&t.group)}function k8(e){const t=[];for(const[r,n]of Object.entries(e))for(const i of n)t.push({...i,metadata:{...i.metadata,group:r}});return t}const L8={delayMs:300,maxWaitMs:1e3,leading:!1,trailing:!0};class j8{constructor(t,r){pe(this,"timeoutId");pe(this,"maxTimeoutId");pe(this,"lastArgs");pe(this,"lastResult");this.func=t,this.config=r}execute(...t){return new Promise((r,n)=>{if(this.lastArgs=t,this.timeoutId&&clearTimeout(this.timeoutId),this.config.leading&&!this.timeoutId)try{const i=this.func(...t);this.lastResult=i,r(i);return}catch(i){n(i);return}this.config.trailing&&(this.timeoutId=setTimeout(async()=>{try{const i=await this.func(...this.lastArgs);this.lastResult=i,r(i)}catch(i){n(i)}finally{this.timeoutId=void 0}},this.config.delayMs)),this.config.maxWaitMs&&!this.maxTimeoutId&&(this.maxTimeoutId=setTimeout(async()=>{this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0);try{const i=await this.func(...this.lastArgs);this.lastResult=i,r(i)}catch(i){n(i)}finally{this.maxTimeoutId=void 0}},this.config.maxWaitMs))})}cancel(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0),this.maxTimeoutId&&(clearTimeout(this.maxTimeoutId),this.maxTimeoutId=void 0)}flush(){if(this.timeoutId&&this.lastArgs){clearTimeout(this.timeoutId),this.timeoutId=void 0,this.maxTimeoutId&&(clearTimeout(this.maxTimeoutId),this.maxTimeoutId=void 0);const t=this.func(...this.lastArgs);return this.lastResult=t,t}return this.lastResult}}class B8{constructor(t={}){pe(this,"config");pe(this,"abortController");this.config={timeout:3e4,defaultHeaders:{"Content-Type":"application/json",Accept:"application/json"},...t}}async request(t){this.abortController=new AbortController;const r={method:"GET",headers:{...this.config.defaultHeaders},timeout:this.config.timeout,signal:this.abortController.signal,...t,url:this.resolveUrl(t.url||"")},n=this.config.requestInterceptor?await this.config.requestInterceptor(r):r,i=this.buildUrlWithParams(n.url,n.params),a={method:n.method,headers:new Headers(n.headers),signal:n.signal};["POST","PUT","PATCH"].includes(n.method)&&n.body&&(a.body=typeof n.body=="string"?n.body:JSON.stringify(n.body));const s=setTimeout(()=>{this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort()},n.timeout),l=new Promise((u,f)=>{setTimeout(()=>{f(new Error(`Request timeout after ${n.timeout}ms`))},n.timeout)});try{const u=await Promise.race([fetch(i,a),l]);clearTimeout(s);const f=this.config.responseInterceptor?await this.config.responseInterceptor(u):u;if(!f.ok){const p=await f.text().catch(()=>"Unknown error");throw new Error(`HTTP ${f.status} ${f.statusText}: ${p}`)}const d=f.headers.get("content-type")||"";if(d.includes("application/json"))return await f.json();if(d.includes("text/")){const p=await f.text();try{const m=p.trim();if(m.startsWith("{")||m.startsWith("["))return JSON.parse(m)}catch{}return p}else return await f.blob()}catch(u){throw clearTimeout(s),u instanceof Error?u.name==="AbortError"?new Error("Request was cancelled"):u:new Error("Unknown request error")}}cancel(){this.abortController&&!this.abortController.signal.aborted&&this.abortController.abort()}resolveUrl(t){if(t.startsWith("http://")||t.startsWith("https://"))return t;if(this.config.baseUrl){const r=this.config.baseUrl.endsWith("/")?this.config.baseUrl.slice(0,-1):this.config.baseUrl,n=t.startsWith("/")?t:`/${t}`;return`${r}${n}`}return t}buildUrlWithParams(t,r){if(!r||Object.keys(r).length===0)return t;const n=new URL(t);return Object.entries(r).forEach(([i,a])=>{n.searchParams.set(i,String(a))}),n.toString()}}class U8{static mapResponse(t,r){switch(r.type){case"simple":return this.mapSimpleResponse(t,r.simple);case"nested":return this.mapNestedResponse(t,r.nested);case"custom":if(!r.custom)throw new Error("Custom mapper function is required for custom type");return r.custom(t);default:throw new Error(`Unknown response mapper type: ${r.type}`)}}static mapSimpleResponse(t,r=ko.simple){const{arrayPath:n="",labelField:i="label",valueField:a="value",disabledField:s="disabled"}=r||{};let l=[];if(n){const u=this.getNestedValue(t,n);if(!Array.isArray(u))throw new Error(`Array not found at path: ${n}`);l=u}else if(Array.isArray(t))l=t;else throw new Error("Response data must be an array or contain an array at specified path");return l.map((u,f)=>{if(!u||typeof u!="object")throw new Error(`Invalid item at index ${f}: must be an object`);const d=u,p=d[i],m=d[a],y=d[s];if(typeof p!="string")throw new Error(`Invalid label at index ${f}: must be a string`);if(m==null)throw new Error(`Invalid value at index ${f}: cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof m))throw new Error(`Invalid value at index ${f}: must be string, number, or boolean`);return{label:p,value:m,disabled:!!y,metadata:{...d,_index:f}}})}static mapNestedResponse(t,r){if(!r)throw new Error("Nested mapper configuration is required");const{arrayPath:n,paths:i}=r,a=this.getNestedValue(t,n);if(!Array.isArray(a))throw new Error(`Array not found at path: ${n}`);return a.map((s,l)=>{if(!s||typeof s!="object")throw new Error(`Invalid item at index ${l}: must be an object`);const u=this.getNestedValue(s,i.label),f=this.getNestedValue(s,i.value),d=i.disabled?this.getNestedValue(s,i.disabled):!1,p=i.description?this.getNestedValue(s,i.description):void 0;if(typeof u!="string")throw new Error(`Invalid label at index ${l}: must be a string`);if(f==null)throw new Error(`Invalid value at index ${l}: cannot be undefined or null`);if(!["string","number","boolean"].includes(typeof f))throw new Error(`Invalid value at index ${l}: must be string, number, or boolean`);return{label:u,value:f,disabled:!!d,metadata:{description:typeof p=="string"?p:void 0,index:l,originalData:s}}})}static getNestedValue(t,r){if(!t||typeof t!="object")return;const n=r.split(".");let i=t;for(const a of n){if(i==null)return;i=i[a]}return i}}class fh extends ba{constructor(r,n={},i,a={}){super(r.cache,n,i);pe(this,"config");pe(this,"httpClient");pe(this,"debouncedFetch");pe(this,"lastRequestUrl");pe(this,"searchParams");pe(this,"supportsRealTime",!0);this.debounceConfig=a,this.config=this.validateAndNormalizeConfig(r),this.httpClient=this.createHttpClient();const s={...L8,...this.debounceConfig};this.debouncedFetch=new j8(()=>this.fetchDataInternal(),s),this.logDebug("ApiDataSource initialized",{url:this.config.url,method:this.config.method,hasAuth:!!this.config.auth,cacheEnabled:this.supportsCaching,debounceMs:s.delayMs})}async fetchData(){const r=this.buildRequestUrl(),n=this.hasSearchParams()||this.lastRequestUrl!==r;return this.lastRequestUrl=r,n&&this.debouncedFetch?(this.logDebug("Using debounced fetch for search request"),await this.debouncedFetch.execute()):(this.logDebug("Using direct fetch for regular request"),await this.fetchDataInternal())}setSearchParams(r){this.searchParams={...r},this.logDebug("Search parameters updated",r)}clearSearchParams(){this.searchParams=void 0,this.logDebug("Search parameters cleared")}cancelPendingRequests(){this.debouncedFetch&&this.debouncedFetch.cancel(),this.httpClient.cancel(),this.logDebug("Pending requests cancelled")}flushPendingRequests(){if(this.debouncedFetch)return this.debouncedFetch.flush()}getCacheKey(){var l;if(!this.supportsCaching||this.cache.ttl!==void 0&&this.cache.ttl<=0)return null;const r=this.buildRequestUrl(),n=this.config.method||"GET",i=((l=this.config.auth)==null?void 0:l.type)||"none",a={url:r,method:n,authType:i,body:this.config.body,searchParams:this.searchParams},s=JSON.stringify(a);return`api_${D1(s)}`}cleanupResources(){this.cancelPendingRequests(),this.debouncedFetch&&(this.debouncedFetch.cancel(),this.debouncedFetch=void 0),this.logDebug("API resources cleaned up")}async fetchDataInternal(){const r=performance.now();try{const n=this.buildRequestConfig();this.logDebug("Making API request",{url:n.url,method:n.method,hasAuth:!!this.config.auth,hasBody:!!n.body,paramsCount:Object.keys(n.params||{}).length});const i=await this.httpClient.request(n),a=U8.mapResponse(i,this.config.responseMapper),s=performance.now()-r;return this.logDebug(`API request completed in ${Math.round(s)}ms`,{optionsCount:a.length,responseTime:s}),a}catch(n){const i=performance.now()-r;throw this.logError(`API request failed after ${Math.round(i)}ms`,n instanceof Error?n:new Error(String(n))),n}}buildRequestConfig(){const r={"Content-Type":"application/json",Accept:"application/json",...this.config.headers},n={url:this.buildRequestUrl(),method:this.config.method||"GET",headers:r,body:this.config.body,params:this.buildRequestParams(),timeout:this.config.timeout||3e4};return this.config.auth&&this.addAuthenticationHeaders(n),n}buildRequestUrl(){return this.config.url}buildRequestParams(){return{...this.config.params,...this.searchParams}}addAuthenticationHeaders(r){if(!this.config.auth||!r.headers)return;const{type:n,credentials:i,headerName:a}=this.config.auth;switch(n){case"bearer":if(typeof i=="string")r.headers.Authorization=`Bearer ${i}`;else throw new Error("Bearer token must be a string");break;case"basic":if(typeof i=="object"&&i.username&&i.password){const s=btoa(`${i.username}:${i.password}`);r.headers.Authorization=`Basic ${s}`}else throw new Error("Basic auth requires username and password");break;case"apiKey":if(typeof i=="string"&&a)r.headers[a]=i;else throw new Error("API key auth requires credentials string and headerName");break;default:throw new Error(`Unsupported authentication type: ${n}`)}}hasSearchParams(){return!!this.searchParams&&Object.keys(this.searchParams).length>0}createHttpClient(){const r={"Content-Type":"application/json",Accept:"application/json"};return new B8({timeout:this.config.timeout||3e4,defaultHeaders:{...r,...this.config.headers}})}validateAndNormalizeConfig(r){if(!r.url)throw new Error("API URL is required");if(!r.responseMapper)throw new Error("Response mapper configuration is required");try{new URL(r.url)}catch{throw new Error("Invalid API URL format")}const n=["GET","POST","PUT","PATCH"];if(r.method&&!n.includes(r.method))throw new Error(`Invalid HTTP method: ${r.method}`);return r.auth&&this.validateAuthConfig(r.auth),this.validateResponseMapper(r.responseMapper),{...r,method:r.method||"GET",headers:r.headers||{},params:r.params||{},timeout:r.timeout||3e4,retries:r.retries||0,responseMapper:r.responseMapper||ko}}validateAuthConfig(r){if(!["bearer","basic","apiKey"].includes(r.type))throw new Error(`Invalid auth type: ${r.type}`);if(!r.credentials)throw new Error("Auth credentials are required");if(r.type==="basic"){if(typeof r.credentials!="object"||!r.credentials.username||!r.credentials.password)throw new Error("Basic auth requires username and password")}else if(r.type==="apiKey"){if(typeof r.credentials!="string"||!r.headerName)throw new Error("API key auth requires credentials string and headerName")}else if(r.type==="bearer"&&typeof r.credentials!="string")throw new Error("Bearer auth requires credentials string")}validateResponseMapper(r){if(!["simple","nested","custom"].includes(r.type))throw new Error(`Invalid response mapper type: ${r.type}`);if(r.type==="nested"&&!r.nested)throw new Error("Nested mapper configuration is required for nested type");if(r.type==="custom"&&!r.custom)throw new Error("Custom mapper function is required for custom type");if(r.type==="nested"&&r.nested){if(!r.nested.arrayPath)throw new Error("Array path is required for nested mapper");if(!r.nested.paths||!r.nested.paths.label||!r.nested.paths.value)throw new Error("Label and value paths are required for nested mapper")}}}function W8(e,t={}){return new fh(e,t.retryConfig,t.eventCallbacks,t.debounceConfig)}const q8={SIMPLE_ARRAY:{type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},PAGINATED_DATA:{type:"simple",simple:{arrayPath:"data.items",labelField:"label",valueField:"value",disabledField:"disabled"}},REST_RESULTS:{type:"simple",simple:{arrayPath:"results",labelField:"name",valueField:"id",disabledField:"active"}},NESTED_OBJECTS:{type:"nested",nested:{arrayPath:"data.options",paths:{label:"display.name",value:"identifier",disabled:"status.disabled",description:"display.description"}}}},V8={bearer:e=>({type:"bearer",credentials:e}),basic:(e,t)=>({type:"basic",credentials:{username:e,password:t}}),apiKey:(e,t="X-API-Key")=>({type:"apiKey",credentials:e,headerName:t})};var F1=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.FAILED="failed",e))(F1||{});class dh extends ba{constructor(r,n={}){var a,s;const i={ttl:3e5,persistent:!0,storageType:"memory",...n.cache};super(i,{maxAttempts:((a=r.connection)==null?void 0:a.maxReconnectAttempts)||5,baseDelayMs:((s=r.connection)==null?void 0:s.reconnectDelay)||1e3,maxDelayMs:3e4,backoffMultiplier:2,jitter:!0},n.eventCallbacks);pe(this,"config");pe(this,"websocket",null);pe(this,"connectionState","disconnected");pe(this,"reconnectAttempts",0);pe(this,"heartbeatInterval",null);pe(this,"responseTimeout",null);pe(this,"searchTimeout",null);pe(this,"pendingRequests",new Map);pe(this,"currentOptions",[]);pe(this,"currentSearchParams",{});pe(this,"supportsRealTime",!0);this.validateConfig(r),this.config=this.normalizeConfig(r),this.logDebug("WebSocketDataSource initialized",{url:this.config.url})}async fetchData(){const r=this.getCacheKey();if(r&&this.hasCachedData(r)){this.logDebug("Using cached data while establishing WebSocket connection");const a=this.getWebSocketCachedData(r);if(a&&a.length>0)return this.ensureConnection(),a}await this.ensureConnection();const n=this.generateMessageId(),i={type:"search-request",messageId:n,timestamp:Date.now(),data:{searchParams:this.currentSearchParams,requestInitial:!0}};return new Promise((a,s)=>{var f;const l=((f=this.config.connection)==null?void 0:f.responseTimeout)||1e4,u=setTimeout(()=>{this.pendingRequests.delete(n),s(new Error(`Request timeout after ${l}ms`))},l);this.pendingRequests.set(n,{resolve:a,reject:s,timeout:u}),this.sendMessage(i)})}getCacheKey(){const r=this.config.url,n=Object.keys(this.currentSearchParams).length>0?JSON.stringify(this.currentSearchParams):"";return`websocket:${r}:${n}`}setSearchParams(r){var n;this.currentSearchParams={...r},this.clearCache(),(n=this.config.messageHandling)!=null&&n.enableRealtimeSearch&&this.debounceSearch(),this.logDebug("Search parameters updated",r)}clearSearchParams(){this.currentSearchParams={},this.clearCache(),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.logDebug("Search parameters cleared")}getConnectionState(){return this.connectionState}async reconnect(){this.logDebug("Manual reconnection requested"),this.websocket&&(this.websocket.close(),this.websocket=null),this.connectionState="disconnected",this.reconnectAttempts=0,await this.ensureConnection()}sendMessage(r){if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new Error("WebSocket is not connected");const n=JSON.stringify(r);this.websocket.send(n),this.logDebug("Message sent",{type:r.type,messageId:r.messageId})}subscribeToUpdates(r){const n=i=>{r(i)};return this._updateCallback=n,()=>{delete this._updateCallback}}cleanupResources(){this.logDebug("Cleaning up WebSocket resources"),this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null),this.responseTimeout&&(clearTimeout(this.responseTimeout),this.responseTimeout=null),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null);for(const[,r]of this.pendingRequests)clearTimeout(r.timeout),r.reject(new Error("WebSocket connection closed"));this.pendingRequests.clear(),this.websocket&&(this.websocket.close(),this.websocket=null),this.connectionState="disconnected"}validateConfig(r){if(!r||typeof r!="object")throw new Error("WebSocketDataSourceConfig must be an object");if(r.type!=="websocket")throw new Error('WebSocketDataSourceConfig type must be "websocket"');if(!r.url||typeof r.url!="string")throw new Error("WebSocketDataSourceConfig must have a valid URL");try{const n=new URL(r.url);if(!["ws:","wss:"].includes(n.protocol))throw new Error("WebSocket URL must use ws:// or wss:// protocol")}catch(n){throw new Error(`Invalid WebSocket URL format: ${n instanceof Error?n.message:String(n)}`)}if(r.auth){if(!["bearer","query","header"].includes(r.auth.type))throw new Error('WebSocket auth type must be "bearer", "query", or "header"');if(!r.auth.credentials||typeof r.auth.credentials!="string")throw new Error("WebSocket auth credentials must be a non-empty string")}}normalizeConfig(r){return{...r,connection:{connectTimeout:3e4,autoReconnect:!0,maxReconnectAttempts:5,reconnectDelay:1e3,heartbeatInterval:3e4,responseTimeout:1e4,...r.connection},messageHandling:{requestInitialOptions:!0,enableRealtimeSearch:!1,searchDebounceMs:300,...r.messageHandling},responseMapper:r.responseMapper||ko}}async ensureConnection(){if(this.connectionState!=="connected"){if(this.connectionState==="connecting"||this.connectionState==="reconnecting")return new Promise((r,n)=>{const i=()=>{this.connectionState==="connected"?r():this.connectionState==="failed"?n(new Error("WebSocket connection failed")):setTimeout(i,100)};i()});await this.connect()}}async connect(){return this.connectionState=this.reconnectAttempts>0?"reconnecting":"connecting",new Promise((r,n)=>{var i;try{const a=this.buildConnectionUrl(),s=this.config.protocols;this.logDebug("Connecting to WebSocket",{url:a.replace(/[?&].*$/,"")}),this.websocket=new WebSocket(a,s);const l=setTimeout(()=>{var u;(u=this.websocket)==null||u.close(),this.connectionState="failed",n(new Error("WebSocket connection timeout"))},((i=this.config.connection)==null?void 0:i.connectTimeout)||3e4);this.websocket.onopen=()=>{var u,f;clearTimeout(l),this.connectionState="connected",this.reconnectAttempts=0,this.logDebug("WebSocket connected successfully"),this.authenticateConnection(),(u=this.config.messageHandling)!=null&&u.initialMessage&&this.sendMessage(this.config.messageHandling.initialMessage),(f=this.config.messageHandling)!=null&&f.requestInitialOptions&&this.requestInitialOptions(),this.startHeartbeat(),r()},this.websocket.onmessage=u=>{this.handleMessage(u)},this.websocket.onclose=u=>{clearTimeout(l),this.handleConnectionClose(u)},this.websocket.onerror=u=>{clearTimeout(l),this.handleConnectionError(u),(this.connectionState==="connecting"||this.connectionState==="reconnecting")&&(this.connectionState="failed",n(new Error("WebSocket connection failed")))}}catch(a){this.connectionState="failed",n(a)}})}buildConnectionUrl(){var n;const r=new URL(this.config.url);if(((n=this.config.auth)==null?void 0:n.type)==="query"){const i=this.config.auth.paramName||"token";r.searchParams.set(i,this.config.auth.credentials)}return r.toString()}authenticateConnection(){if(!(!this.config.auth||this.config.auth.type==="query")&&this.config.auth.type==="bearer"){const r={type:"connection-ready",messageId:this.generateMessageId(),timestamp:Date.now(),data:{auth:{type:"bearer",token:this.config.auth.credentials}}};this.sendMessage(r)}}requestInitialOptions(){const n={type:"search-request",messageId:this.generateMessageId(),timestamp:Date.now(),data:{requestInitial:!0,searchParams:{}}};this.sendMessage(n)}handleMessage(r){try{const n=JSON.parse(r.data);switch(this.logDebug("Message received",{type:n.type,messageId:n.messageId}),n.type){case"search-response":this.handleSearchResponse(n);break;case"options-update":this.handleOptionsUpdate(n);break;case"options-add":this.handleOptionsAdd(n);break;case"options-remove":this.handleOptionsRemove(n);break;case"options-patch":this.handleOptionsPatch(n);break;case"error":this.handleErrorMessage(n);break;case"heartbeat":this.handleHeartbeat(n);break;default:this.logDebug("Unknown message type",{type:n.type})}}catch(n){this.logError("Error parsing WebSocket message",n)}}handleSearchResponse(r){if(!r.messageId){this.logError("Search response missing messageId");return}const n=this.pendingRequests.get(r.messageId);if(!n){this.logDebug("No pending request for messageId",{messageId:r.messageId});return}clearTimeout(n.timeout),this.pendingRequests.delete(r.messageId);try{if(r.error){n.reject(new Error(r.error.message));return}const i=this.transformResponseData(r.data);this.currentOptions=i;const a=this.getCacheKey();a&&this.setWebSocketCachedData(a,i),n.resolve(i),this._updateCallback&&this._updateCallback(i)}catch(i){n.reject(i)}}handleOptionsUpdate(r){try{const n=this.transformResponseData(r.data);this.currentOptions=n;const i=this.getCacheKey();i&&this.setWebSocketCachedData(i,n),this._updateCallback&&this._updateCallback(n),this.logDebug("Options updated",{count:n.length})}catch(n){this.logError("Error handling options update",n)}}handleOptionsAdd(r){try{const n=this.transformResponseData(r.data),i=new Set(this.currentOptions.map(l=>l.value)),a=n.filter(l=>!i.has(l.value));this.currentOptions=[...this.currentOptions,...a];const s=this.getCacheKey();s&&this.setWebSocketCachedData(s,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options added",{addedCount:a.length})}catch(n){this.logError("Error handling options add",n)}}handleOptionsRemove(r){var n;try{const i=new Set(((n=r.data)==null?void 0:n.values)||[]),a=this.currentOptions.length;this.currentOptions=this.currentOptions.filter(u=>!i.has(u.value));const s=a-this.currentOptions.length,l=this.getCacheKey();l&&this.setWebSocketCachedData(l,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options removed",{removedCount:s})}catch(i){this.logError("Error handling options remove",i)}}handleOptionsPatch(r){var n;try{const i=((n=r.data)==null?void 0:n.patches)||[];for(const s of i){const l=this.currentOptions.findIndex(u=>u.value===s.value);l!==-1&&(this.currentOptions[l]={...this.currentOptions[l],...s})}const a=this.getCacheKey();a&&this.setWebSocketCachedData(a,this.currentOptions),this._updateCallback&&this._updateCallback(this.currentOptions),this.logDebug("Options patched",{patchCount:i.length})}catch(i){this.logError("Error handling options patch",i)}}handleErrorMessage(r){var i;const n=new Error(((i=r.error)==null?void 0:i.message)||"Unknown server error");if(r.messageId){const a=this.pendingRequests.get(r.messageId);if(a){clearTimeout(a.timeout),this.pendingRequests.delete(r.messageId),a.reject(n);return}}this.logError("Server error message",n)}handleHeartbeat(r){var n;if(((n=r.data)==null?void 0:n.type)==="ping"){const i={type:"heartbeat",messageId:this.generateMessageId(),timestamp:Date.now(),data:{type:"pong"}};this.sendMessage(i)}}handleConnectionClose(r){var n;this.logDebug("WebSocket connection closed",{code:r.code,reason:r.reason}),this.connectionState="disconnected",this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null),(n=this.config.connection)!=null&&n.autoReconnect&&r.code!==1e3&&this.scheduleReconnection()}handleConnectionError(r){this.logError("WebSocket connection error",new Error("Connection error")),this.connectionState==="connected"&&(this.connectionState="disconnected")}scheduleReconnection(){var i,a;if(this.reconnectAttempts>=(((i=this.config.connection)==null?void 0:i.maxReconnectAttempts)||5)){this.connectionState="failed",this.logError("Max reconnection attempts exceeded");return}this.reconnectAttempts++,this.connectionState="reconnecting";const r=((a=this.config.connection)==null?void 0:a.reconnectDelay)||1e3,n=Math.min(r*Math.pow(2,this.reconnectAttempts-1),3e4);this.logDebug(`Reconnecting in ${n}ms (attempt ${this.reconnectAttempts})`),setTimeout(()=>{this.connect().catch(s=>{this.logError("Reconnection failed",s),this.scheduleReconnection()})},n)}startHeartbeat(){var n;const r=((n=this.config.connection)==null?void 0:n.heartbeatInterval)||3e4;this.heartbeatInterval=setInterval(()=>{var i;if(((i=this.websocket)==null?void 0:i.readyState)===WebSocket.OPEN){const a={type:"heartbeat",messageId:this.generateMessageId(),timestamp:Date.now(),data:{type:"ping"}};this.sendMessage(a)}},r)}debounceSearch(){var n;this.searchTimeout&&clearTimeout(this.searchTimeout);const r=((n=this.config.messageHandling)==null?void 0:n.searchDebounceMs)||300;this.searchTimeout=setTimeout(()=>{this.connectionState==="connected"&&this.sendSearchRequest()},r)}sendSearchRequest(){const n={type:"search-request",messageId:this.generateMessageId(),timestamp:Date.now(),data:{searchParams:this.currentSearchParams}};this.sendMessage(n)}transformResponseData(r){if(!this.config.responseMapper)return this.validateAndTransformData(r);let n;switch(this.config.responseMapper.type){case"simple":n=this.applySimpleMapper(r,this.config.responseMapper.simple);break;case"nested":n=this.applyNestedMapper(r,this.config.responseMapper.nested);break;case"custom":n=this.config.responseMapper.custom(r);break;default:throw new Error(`Unknown response mapper type: ${this.config.responseMapper.type}`)}return this.validateAndTransformData(n)}applySimpleMapper(r,n){const i=n.arrayPath,a=n.labelField||"label",s=n.valueField||"value",l=n.disabledField||"disabled";let u;if(i){const f=i.split(".");let d=r;for(const p of f)if(d&&typeof d=="object"&&p in d)d=d[p];else throw new Error(`Path "${i}" not found in response data`);u=d}else u=r;if(!Array.isArray(u))throw new Error("Response data is not an array");return u.map((f,d)=>{if(!f||typeof f!="object")throw new Error(`Invalid item at index ${d}: must be an object`);return{label:String(f[a]||""),value:f[s],disabled:!!f[l],metadata:{...f,_index:d}}})}applyNestedMapper(r,n){const{arrayPath:i,paths:a}=n,s=i.split(".");let l=r;for(const u of s)if(l&&typeof l=="object"&&u in l)l=l[u];else throw new Error(`Path "${i}" not found in response data`);if(!Array.isArray(l))throw new Error("Nested response data is not an array");return l.map((u,f)=>{const d=y=>{const _=y.split(".");let w=u;for(const v of _)if(w&&typeof w=="object"&&v in w)w=w[v];else return;return w},p=d(a.value);let m;return typeof p=="string"||typeof p=="number"||typeof p=="boolean"?m=p:m=String(p??""),{label:String(d(a.label??"")),value:m,disabled:a.disabled?!!d(a.disabled):!1,metadata:{description:a.description&&d(a.description)||void 0,_index:f,...u}}})}getWebSocketCachedData(r){try{return super.hasCachedData(r)&&this.currentOptions.length>0?this.currentOptions:null}catch(n){return this.logError("Error retrieving cached data",n),null}}setWebSocketCachedData(r,n){try{this.currentOptions=[...n]}catch(i){this.logError("Error setting cached data",i)}}generateMessageId(){return`ws_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}}function R8(e,t){return new dh(e,t)}const z8={bearer:e=>({type:"bearer",credentials:e}),query:(e,t="token")=>({type:"query",credentials:e,paramName:t}),header:(e,t="Authorization")=>({type:"header",credentials:e,paramName:t})},H8={searchRequest:(e={},t)=>({type:"search-request",messageId:t||`search_${Date.now()}`,timestamp:Date.now(),data:{searchParams:e}}),heartbeatPing:e=>({type:"heartbeat",messageId:e||`heartbeat_${Date.now()}`,timestamp:Date.now(),data:{type:"ping"}}),optionsUpdate:(e,t)=>({type:"options-update",messageId:t||`update_${Date.now()}`,timestamp:Date.now(),data:{options:e}})};class Ye extends Error{constructor(t,r,n,i){super(t),this.path=r,this.index=n,this.originalError=i,this.name="ResponseMappingError"}}function lc(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Lo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function N1(e,t){if(!Lo(e))throw new Ye(`Invalid option at index ${t}: must be an object`,void 0,t);const{label:r,value:n,disabled:i,metadata:a}=e;if(typeof r!="string")throw new Ye(`Invalid label at index ${t}: must be a string, got ${typeof r}`,"label",t);if(n==null)throw new Ye(`Invalid value at index ${t}: cannot be undefined or null`,"value",t);if(!lc(n))throw new Ye(`Invalid value at index ${t}: must be string, number, or boolean, got ${typeof n}`,"value",t);return{label:r,value:n,disabled:!!i,metadata:Lo(a)?a:{}}}function M1(e){if(!Array.isArray(e))throw new Ye("Response must be an array of options");return e.map((t,r)=>N1(t,r))}function _a(e,t){var i;if(!e||typeof e!="object")return;if(!t||t==="")return e;const r=t.split(".");let n=e;for(const a of r){if(n==null)return;const s=a.match(/^(.+)\[(\d+)\]$/);if(s){const[,l,u]=s,f=parseInt(u,10);n=(i=n[l])==null?void 0:i[f]}else n=n[a]}return n}function K8(e,t,r){const n=t.split("."),i={...e};let a=i;for(let s=0;s<n.length-1;s++){const l=n[s];!a[l]||typeof a[l]!="object"?a[l]={}:a[l]=Array.isArray(a[l])?[...a[l]]:{...a[l]},a=a[l]}return a[n[n.length-1]]=r,i}function cc(e,t){if(!t){if(Array.isArray(e))return e;throw new Ye("Response data must be an array when no arrayPath is specified")}const r=_a(e,t);if(!Array.isArray(r))throw new Ye(`Array not found at path: ${t}. Got ${typeof r}`,t);return r}function k1(e,t=ko.simple){const{arrayPath:r,labelField:n="label",valueField:i="value",disabledField:a="disabled"}=t;return cc(e,r).map((l,u)=>{if(!Lo(l))throw new Ye(`Invalid item at index ${u}: must be an object`,void 0,u);const f=l[n],d=l[i],p=a?l[a]:!1;if(typeof f!="string")throw new Ye(`Invalid label at index ${u}: field '${n}' must be a string, got ${typeof f}`,n,u);if(d==null)throw new Ye(`Invalid value at index ${u}: field '${i}' cannot be undefined or null`,i,u);if(!lc(d))throw new Ye(`Invalid value at index ${u}: field '${i}' must be string, number, or boolean, got ${typeof d}`,i,u);return{label:f,value:d,disabled:!!p,metadata:{...l,_index:u}}})}function L1(e,t){if(!t)throw new Ye("Nested mapper configuration is required");const{arrayPath:r,paths:n}=t;if(!n||!n.label||!n.value)throw new Ye("Nested mapper requires paths.label and paths.value to be defined");return cc(e,r).map((a,s)=>{if(!Lo(a))throw new Ye(`Invalid item at index ${s}: must be an object`,void 0,s);const l=_a(a,n.label),u=_a(a,n.value),f=n.disabled?_a(a,n.disabled):!1,d=n.description?_a(a,n.description):void 0;if(typeof l!="string")throw new Ye(`Invalid label at index ${s}: path '${n.label}' must resolve to a string, got ${typeof l}`,n.label,s);if(u==null)throw new Ye(`Invalid value at index ${s}: path '${n.value}' cannot be undefined or null`,n.value,s);if(!lc(u))throw new Ye(`Invalid value at index ${s}: path '${n.value}' must resolve to string, number, or boolean, got ${typeof u}`,n.value,s);return{label:l,value:u,disabled:!!f,metadata:{description:typeof d=="string"?d:void 0,_index:s,_originalData:a}}})}function j1(e){return t=>{try{const r=e(t);if(!Array.isArray(r))throw new Ye("Custom mapper must return an array of ChoiceOption");return M1(r)}catch(r){throw r instanceof Ye?r:new Ye("Custom mapper failed",void 0,void 0,r instanceof Error?r:new Error(String(r)))}}}function G8(e,t){try{switch(t.type){case"simple":return k1(e,t.simple);case"nested":if(!t.nested)throw new Ye("Nested mapper configuration is required for nested type");return L1(e,t.nested);case"custom":if(!t.custom)throw new Ye("Custom mapper function is required for custom type");return j1(t.custom)(e);default:throw new Ye(`Unknown response mapper type: ${t.type}`)}}catch(r){throw r instanceof Ye?r:new Ye("Response mapping failed",void 0,void 0,r instanceof Error?r:new Error(String(r)))}}const Y8={SIMPLE_ARRAY:{type:"simple",simple:{labelField:"label",valueField:"value",disabledField:"disabled"}},NAME_ID:{type:"simple",simple:{labelField:"name",valueField:"id",disabledField:"disabled"}},TITLE_KEY:{type:"simple",simple:{labelField:"title",valueField:"key",disabledField:"disabled"}},TEXT_VALUE:{type:"simple",simple:{labelField:"text",valueField:"value",disabledField:"disabled"}},DISPLAY_CODE:{type:"simple",simple:{labelField:"display",valueField:"code",disabledField:"disabled"}}},J8={DATA_ARRAY:{type:"simple",simple:{arrayPath:"data",labelField:"label",valueField:"value",disabledField:"disabled"}},RESULTS_ARRAY:{type:"simple",simple:{arrayPath:"results",labelField:"name",valueField:"id",disabledField:"disabled"}},ITEMS_ARRAY:{type:"simple",simple:{arrayPath:"items",labelField:"label",valueField:"value",disabledField:"disabled"}},NESTED_DATA_ITEMS:{type:"simple",simple:{arrayPath:"data.items",labelField:"label",valueField:"value",disabledField:"disabled"}},RESPONSE_DATA:{type:"simple",simple:{arrayPath:"response.data",labelField:"name",valueField:"id",disabledField:"disabled"}}};function X8(e){const{invertActive:t=!1}=e;return{type:"custom",custom:r=>cc(r,e.arrayPath).map((i,a)=>{if(!Lo(i))throw new Ye(`Invalid item at index ${a}: must be an object`,void 0,a);const s=i[e.labelField],l=i[e.valueField],u=i[e.activeField];if(typeof s!="string")throw new Ye(`Invalid label at index ${a}: field '${e.labelField}' must be a string`,e.labelField,a);if(!lc(l))throw new Ye(`Invalid value at index ${a}: field '${e.valueField}' must be string, number, or boolean`,e.valueField,a);const f=!!u;return{label:s,value:l,disabled:t?f:!f,metadata:{...i,_index:a,_active:f}}})}}function Z8(e){return t=>{let r=t;for(let n=0;n<e.length;n++){const i=e[n];try{if(n===0){const a=i(r);if(!Array.isArray(a))throw new Error(`Mapper at index ${n} must return an array of ChoiceOption`);r=a}else{const a=i(r);if(!Array.isArray(a))throw new Error(`Mapper at index ${n} must return an array of ChoiceOption`);r=a}}catch(a){throw new Ye(`Pipeline failed at step ${n+1}`,void 0,n,a instanceof Error?a:new Error(String(a)))}}return M1(r)}}function Q8(e){return e.filter(t=>!t.disabled)}function ez(e,t){return[...e].sort((r,n)=>r.label.localeCompare(n.label,t))}function tz(e){return[...e].sort((t,r)=>typeof t.value=="string"&&typeof r.value=="string"?t.value.localeCompare(r.value):typeof t.value=="number"&&typeof r.value=="number"?t.value-r.value:String(t.value).localeCompare(String(r.value)))}function rz(e,t){return e.map(r=>({...r,metadata:{...r.metadata,group:t(r)}}))}function nz(e,t){return e.map((r,n)=>t(r,n))}class uc{constructor(){pe(this,"DefaultLoadingComponent",({message:t,progress:r})=>B.createElement("div",{className:"edf-choice-widget__loading",role:"status","aria-live":"polite"},[B.createElement("span",{key:"spinner",className:"edf-choice-widget__loading-spinner"}),t&&B.createElement("span",{key:"message",className:"edf-choice-widget__loading-message"},t),r!==void 0&&B.createElement("div",{key:"progress",className:"edf-choice-widget__loading-progress"},B.createElement("div",{className:"edf-choice-widget__loading-progress-bar",style:{width:`${r}%`},role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100}))]));pe(this,"DefaultErrorComponent",({message:t,recoverable:r,id:n})=>B.createElement("div",{className:"edf-choice-widget__error",role:"alert",id:n,"aria-live":"assertive"},[B.createElement("span",{key:"icon",className:"edf-choice-widget__error-icon","aria-hidden":!0},"⚠️"),B.createElement("span",{key:"message",className:"edf-choice-widget__error-message"},t),r&&B.createElement("span",{key:"hint",className:"edf-choice-widget__error-hint"},"Please try again")]));pe(this,"DefaultEmptyComponent",({message:t})=>B.createElement("div",{className:"edf-choice-widget__empty",role:"status"},[B.createElement("span",{key:"icon",className:"edf-choice-widget__empty-icon","aria-hidden":!0},"📭"),B.createElement("span",{key:"message",className:"edf-choice-widget__empty-message"},t||"No options available")]))}getAccessibilityProps(t,r,n){const{id:i,label:a,required:s,readonly:l,disabled:u,schema:f}=t,{error:d,loading:p}=r,m={"aria-label":(n==null?void 0:n.ariaLabel)||a||(f==null?void 0:f.title)||"Select an option","aria-required":s||!1,"aria-readonly":l||!1,"aria-disabled":u||!1,"aria-invalid":d.hasError,"aria-busy":p.isLoading,id:i,role:this.getAriaRole()};if(d.hasError&&d.message&&(m["aria-errormessage"]=`${i}-error`,m["aria-describedby"]=`${i}-error`),n!=null&&n.ariaDescription){const y=m["aria-describedby"];m["aria-describedby"]=y?`${y} ${i}-description`:`${i}-description`}return n!=null&&n.announceChanges&&(m["aria-live"]="polite",m["aria-atomic"]=!0),n!=null&&n.ariaAttributes&&Object.entries(n.ariaAttributes).forEach(([y,_])=>{(y.startsWith("aria-")||y==="role")&&(m[y]=_)}),m}handleKeyboardNavigation(t,r,n,i){var d;const{filteredOptions:a,focusedOptionIndex:s}=n,{keyboard:l}=((d=r.options.choiceConfig)==null?void 0:d.accessibility)||{};if(!(l!=null&&l.arrowKeys)&&!(l!=null&&l.homeEnd)&&!(l!=null&&l.typeAhead))return;const{key:u}=t,f=a.length;switch(u){case"ArrowDown":if(l!=null&&l.arrowKeys){t.preventDefault();const p=(s+1)%f;i.setFocusedIndex(p)}break;case"ArrowUp":if(l!=null&&l.arrowKeys){t.preventDefault();const p=s<=0?f-1:s-1;i.setFocusedIndex(p)}break;case"Home":l!=null&&l.homeEnd&&(t.preventDefault(),i.setFocusedIndex(0));break;case"End":l!=null&&l.homeEnd&&(t.preventDefault(),i.setFocusedIndex(f-1));break;case"Enter":case" ":if(s>=0&&s<f){t.preventDefault();const p=a[s];p.disabled||i.selectOption(p)}break;case"Escape":i.toggleDropdown&&(t.preventDefault(),i.toggleDropdown(!1));break;default:l!=null&&l.typeAhead&&u.length===1&&/\S/.test(u)&&this.handleTypeAhead(u,n,i);break}}handleTypeAhead(t,r,n){const{filteredOptions:i,focusedOptionIndex:a}=r,s=t.toLowerCase(),l=a+1;for(let u=0;u<i.length;u++){const f=(l+u)%i.length,d=i[f];if(d.label.toLowerCase().startsWith(s)&&!d.disabled){n.setFocusedIndex(f);break}}}getLoadingProps(t,r){return{component:r||this.DefaultLoadingComponent,props:t}}getErrorProps(t,r,n){return{component:r||this.DefaultErrorComponent,props:{...t,id:n?`${n}-error`:void 0}}}getEmptyProps(t,r){return{component:r||this.DefaultEmptyComponent,props:{message:t||"No options available"}}}normalizeValue(t,r){return t==null?[]:r?Array.isArray(t)?t.filter(n=>n!=null):[t]:Array.isArray(t)?t.length>0?[t[0]]:[]:[t]}denormalizeValue(t,r){return r?t:t.length>0?t[0]:void 0}getThemeClasses(t,r){return["edf-choice-widget",`edf-choice-widget--${this.presentationMode}`,t.size&&`edf-choice-widget--${t.size}`,t.disabled&&"edf-choice-widget--disabled",t.readonly&&"edf-choice-widget--readonly",t.className,r].filter(Boolean).join(" ")}getThemeStyles(t,r){return{...t.style,...r}}createEventHandlers(t,r,n,i){return{fieldId:t,schema:r,formData:n,fieldPath:i,_hookRequired:!0}}validateSelection(t,r,n){var d,p,m;const{validation:i,multiple:a,minSelections:s,maxSelections:l}=n;if(t.length===0&&((d=i==null?void 0:i.messages)!=null&&d.required))return i.messages.required;if(a){if(s&&t.length<s)return`Please select at least ${s} option${s>1?"s":""}`;if(l&&t.length>l)return`Please select at most ${l} option${l>1?"s":""}`}if(i!=null&&i.validator){const y=i.validator(t,r);if(y)return((p=i.messages)==null?void 0:p.custom)||y}const u=r.map(y=>y.value);return t.filter(y=>!u.includes(y)).length>0?((m=i==null?void 0:i.messages)==null?void 0:m.invalid)||"Invalid selection":null}getAntdSize(t){return t||"middle"}isSelected(t,r){return r.includes(t)}filterOptions(t,r,n){if(!(n!=null&&n.enabled)||!r||r.length<(n.minLength||1))return t;const i=n.caseSensitive?r:r.toLowerCase(),a=n.searchFields||["label"];return t.filter(s=>n.customFilter?n.customFilter(s,r):a.some(l=>{var d;let u;switch(l){case"label":u=s.label;break;case"value":u=String(s.value);break;case"description":u=(d=s.metadata)==null?void 0:d.description;break}return u?(n.caseSensitive?u:u.toLowerCase()).includes(i):!1}))}}var fc={exports:{}};/**
83
83
  * @license
84
84
  * Lodash <https://lodash.com/>
85
85
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
86
86
  * Released under MIT license <https://lodash.com/license>
87
87
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
88
88
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
89
- */fc.exports,function(e,t){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,m=2,y=4,_=1,w=2,v=1,g=2,C=4,S=8,E=16,A=32,x=64,N=128,Z=256,G=512,H=30,ee="...",te=800,ae=16,Q=1,k=2,W=3,R=1/0,U=9007199254740991,J=17976931348623157e292,L=NaN,D=4294967295,z=D-1,B=D>>>1,P=[["ary",N],["bind",v],["bindKey",g],["curry",S],["curryRight",E],["flip",G],["partial",A],["partialRight",x],["rearg",Z]],F="[object Arguments]",V="[object Array]",X="[object AsyncFunction]",oe="[object Boolean]",ue="[object Date]",he="[object DOMException]",be="[object Error]",Le="[object Function]",ut="[object GeneratorFunction]",me="[object Map]",Pt="[object Number]",Vt="[object Null]",It="[object Object]",sr="[object Promise]",os="[object Proxy]",Cn="[object RegExp]",Yt="[object Set]",En="[object String]",Xn="[object Symbol]",ss="[object Undefined]",On="[object WeakMap]",Fi="[object WeakSet]",An="[object ArrayBuffer]",Tn="[object DataView]",Fa="[object Float32Array]",ls="[object Float64Array]",mm="[object Int8Array]",gm="[object Int16Array]",ym="[object Int32Array]",vm="[object Uint8Array]",bm="[object Uint8ClampedArray]",_m="[object Uint16Array]",$m="[object Uint32Array]",tee=/\b__p \+= '';/g,ree=/\b(__p \+=) '' \+/g,nee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,BS=/&(?:amp|lt|gt|quot|#39);/g,US=/[&<>"']/g,iee=RegExp(BS.source),aee=RegExp(US.source),oee=/<%-([\s\S]+?)%>/g,see=/<%([\s\S]+?)%>/g,WS=/<%=([\s\S]+?)%>/g,lee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cee=/^\w*$/,uee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wm=/[\\^$.*+?()[\]{}|]/g,fee=RegExp(wm.source),Sm=/^\s+/,dee=/\s/,hee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pee=/\{\n\/\* \[wrapped with (.+)\] \*/,mee=/,? & /,gee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yee=/[()=,{}\[\]\/\s]/,vee=/\\(\\)?/g,bee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qS=/\w*$/,_ee=/^[-+]0x[0-9a-f]+$/i,$ee=/^0b[01]+$/i,wee=/^\[object .+?Constructor\]$/,See=/^0o[0-7]+$/i,Cee=/^(?:0|[1-9]\d*)$/,Eee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nu=/($^)/,Oee=/['\n\r\u2028\u2029\\]/g,iu="\\ud800-\\udfff",Aee="\\u0300-\\u036f",Tee="\\ufe20-\\ufe2f",Pee="\\u20d0-\\u20ff",VS=Aee+Tee+Pee,RS="\\u2700-\\u27bf",zS="a-z\\xdf-\\xf6\\xf8-\\xff",Iee="\\xac\\xb1\\xd7\\xf7",xee="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dee="\\u2000-\\u206f",Fee=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",HS="A-Z\\xc0-\\xd6\\xd8-\\xde",KS="\\ufe0e\\ufe0f",GS=Iee+xee+Dee+Fee,Cm="['’]",Nee="["+iu+"]",YS="["+GS+"]",au="["+VS+"]",JS="\\d+",Mee="["+RS+"]",XS="["+zS+"]",ZS="[^"+iu+GS+JS+RS+zS+HS+"]",Em="\\ud83c[\\udffb-\\udfff]",kee="(?:"+au+"|"+Em+")",QS="[^"+iu+"]",Om="(?:\\ud83c[\\udde6-\\uddff]){2}",Am="[\\ud800-\\udbff][\\udc00-\\udfff]",Na="["+HS+"]",eC="\\u200d",tC="(?:"+XS+"|"+ZS+")",Lee="(?:"+Na+"|"+ZS+")",rC="(?:"+Cm+"(?:d|ll|m|re|s|t|ve))?",nC="(?:"+Cm+"(?:D|LL|M|RE|S|T|VE))?",iC=kee+"?",aC="["+KS+"]?",jee="(?:"+eC+"(?:"+[QS,Om,Am].join("|")+")"+aC+iC+")*",Bee="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Uee="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oC=aC+iC+jee,Wee="(?:"+[Mee,Om,Am].join("|")+")"+oC,qee="(?:"+[QS+au+"?",au,Om,Am,Nee].join("|")+")",Vee=RegExp(Cm,"g"),Ree=RegExp(au,"g"),Tm=RegExp(Em+"(?="+Em+")|"+qee+oC,"g"),zee=RegExp([Na+"?"+XS+"+"+rC+"(?="+[YS,Na,"$"].join("|")+")",Lee+"+"+nC+"(?="+[YS,Na+tC,"$"].join("|")+")",Na+"?"+tC+"+"+rC,Na+"+"+nC,Uee,Bee,JS,Wee].join("|"),"g"),Hee=RegExp("["+eC+iu+VS+KS+"]"),Kee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yee=-1,ft={};ft[Fa]=ft[ls]=ft[mm]=ft[gm]=ft[ym]=ft[vm]=ft[bm]=ft[_m]=ft[$m]=!0,ft[F]=ft[V]=ft[An]=ft[oe]=ft[Tn]=ft[ue]=ft[be]=ft[Le]=ft[me]=ft[Pt]=ft[It]=ft[Cn]=ft[Yt]=ft[En]=ft[On]=!1;var it={};it[F]=it[V]=it[An]=it[Tn]=it[oe]=it[ue]=it[Fa]=it[ls]=it[mm]=it[gm]=it[ym]=it[me]=it[Pt]=it[It]=it[Cn]=it[Yt]=it[En]=it[Xn]=it[vm]=it[bm]=it[_m]=it[$m]=!0,it[be]=it[Le]=it[On]=!1;var Jee={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Xee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Zee={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Qee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ete=parseFloat,tte=parseInt,sC=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,rte=typeof self=="object"&&self&&self.Object===Object&&self,jt=sC||rte||Function("return this")(),Pm=t&&!t.nodeType&&t,Ni=Pm&&!0&&e&&!e.nodeType&&e,lC=Ni&&Ni.exports===Pm,Im=lC&&sC.process,Cr=function(){try{var K=Ni&&Ni.require&&Ni.require("util").types;return K||Im&&Im.binding&&Im.binding("util")}catch{}}(),cC=Cr&&Cr.isArrayBuffer,uC=Cr&&Cr.isDate,fC=Cr&&Cr.isMap,dC=Cr&&Cr.isRegExp,hC=Cr&&Cr.isSet,pC=Cr&&Cr.isTypedArray;function lr(K,se,ne){switch(ne.length){case 0:return K.call(se);case 1:return K.call(se,ne[0]);case 2:return K.call(se,ne[0],ne[1]);case 3:return K.call(se,ne[0],ne[1],ne[2])}return K.apply(se,ne)}function nte(K,se,ne,ve){for(var Te=-1,He=K==null?0:K.length;++Te<He;){var xt=K[Te];se(ve,xt,ne(xt),K)}return ve}function Er(K,se){for(var ne=-1,ve=K==null?0:K.length;++ne<ve&&se(K[ne],ne,K)!==!1;);return K}function ite(K,se){for(var ne=K==null?0:K.length;ne--&&se(K[ne],ne,K)!==!1;);return K}function mC(K,se){for(var ne=-1,ve=K==null?0:K.length;++ne<ve;)if(!se(K[ne],ne,K))return!1;return!0}function Zn(K,se){for(var ne=-1,ve=K==null?0:K.length,Te=0,He=[];++ne<ve;){var xt=K[ne];se(xt,ne,K)&&(He[Te++]=xt)}return He}function ou(K,se){var ne=K==null?0:K.length;return!!ne&&Ma(K,se,0)>-1}function xm(K,se,ne){for(var ve=-1,Te=K==null?0:K.length;++ve<Te;)if(ne(se,K[ve]))return!0;return!1}function mt(K,se){for(var ne=-1,ve=K==null?0:K.length,Te=Array(ve);++ne<ve;)Te[ne]=se(K[ne],ne,K);return Te}function Qn(K,se){for(var ne=-1,ve=se.length,Te=K.length;++ne<ve;)K[Te+ne]=se[ne];return K}function Dm(K,se,ne,ve){var Te=-1,He=K==null?0:K.length;for(ve&&He&&(ne=K[++Te]);++Te<He;)ne=se(ne,K[Te],Te,K);return ne}function ate(K,se,ne,ve){var Te=K==null?0:K.length;for(ve&&Te&&(ne=K[--Te]);Te--;)ne=se(ne,K[Te],Te,K);return ne}function Fm(K,se){for(var ne=-1,ve=K==null?0:K.length;++ne<ve;)if(se(K[ne],ne,K))return!0;return!1}var ote=Nm("length");function ste(K){return K.split("")}function lte(K){return K.match(gee)||[]}function gC(K,se,ne){var ve;return ne(K,function(Te,He,xt){if(se(Te,He,xt))return ve=He,!1}),ve}function su(K,se,ne,ve){for(var Te=K.length,He=ne+(ve?1:-1);ve?He--:++He<Te;)if(se(K[He],He,K))return He;return-1}function Ma(K,se,ne){return se===se?_te(K,se,ne):su(K,yC,ne)}function cte(K,se,ne,ve){for(var Te=ne-1,He=K.length;++Te<He;)if(ve(K[Te],se))return Te;return-1}function yC(K){return K!==K}function vC(K,se){var ne=K==null?0:K.length;return ne?km(K,se)/ne:L}function Nm(K){return function(se){return se==null?r:se[K]}}function Mm(K){return function(se){return K==null?r:K[se]}}function bC(K,se,ne,ve,Te){return Te(K,function(He,xt,tt){ne=ve?(ve=!1,He):se(ne,He,xt,tt)}),ne}function ute(K,se){var ne=K.length;for(K.sort(se);ne--;)K[ne]=K[ne].value;return K}function km(K,se){for(var ne,ve=-1,Te=K.length;++ve<Te;){var He=se(K[ve]);He!==r&&(ne=ne===r?He:ne+He)}return ne}function Lm(K,se){for(var ne=-1,ve=Array(K);++ne<K;)ve[ne]=se(ne);return ve}function fte(K,se){return mt(se,function(ne){return[ne,K[ne]]})}function _C(K){return K&&K.slice(0,CC(K)+1).replace(Sm,"")}function cr(K){return function(se){return K(se)}}function jm(K,se){return mt(se,function(ne){return K[ne]})}function cs(K,se){return K.has(se)}function $C(K,se){for(var ne=-1,ve=K.length;++ne<ve&&Ma(se,K[ne],0)>-1;);return ne}function wC(K,se){for(var ne=K.length;ne--&&Ma(se,K[ne],0)>-1;);return ne}function dte(K,se){for(var ne=K.length,ve=0;ne--;)K[ne]===se&&++ve;return ve}var hte=Mm(Jee),pte=Mm(Xee);function mte(K){return"\\"+Qee[K]}function gte(K,se){return K==null?r:K[se]}function ka(K){return Hee.test(K)}function yte(K){return Kee.test(K)}function vte(K){for(var se,ne=[];!(se=K.next()).done;)ne.push(se.value);return ne}function Bm(K){var se=-1,ne=Array(K.size);return K.forEach(function(ve,Te){ne[++se]=[Te,ve]}),ne}function SC(K,se){return function(ne){return K(se(ne))}}function ei(K,se){for(var ne=-1,ve=K.length,Te=0,He=[];++ne<ve;){var xt=K[ne];(xt===se||xt===d)&&(K[ne]=d,He[Te++]=ne)}return He}function lu(K){var se=-1,ne=Array(K.size);return K.forEach(function(ve){ne[++se]=ve}),ne}function bte(K){var se=-1,ne=Array(K.size);return K.forEach(function(ve){ne[++se]=[ve,ve]}),ne}function _te(K,se,ne){for(var ve=ne-1,Te=K.length;++ve<Te;)if(K[ve]===se)return ve;return-1}function $te(K,se,ne){for(var ve=ne+1;ve--;)if(K[ve]===se)return ve;return ve}function La(K){return ka(K)?Ste(K):ote(K)}function Wr(K){return ka(K)?Cte(K):ste(K)}function CC(K){for(var se=K.length;se--&&dee.test(K.charAt(se)););return se}var wte=Mm(Zee);function Ste(K){for(var se=Tm.lastIndex=0;Tm.test(K);)++se;return se}function Cte(K){return K.match(Tm)||[]}function Ete(K){return K.match(zee)||[]}var Ote=function K(se){se=se==null?jt:ja.defaults(jt.Object(),se,ja.pick(jt,Gee));var ne=se.Array,ve=se.Date,Te=se.Error,He=se.Function,xt=se.Math,tt=se.Object,Um=se.RegExp,Ate=se.String,Or=se.TypeError,cu=ne.prototype,Tte=He.prototype,Ba=tt.prototype,uu=se["__core-js_shared__"],fu=Tte.toString,Xe=Ba.hasOwnProperty,Pte=0,EC=function(){var o=/[^.]+$/.exec(uu&&uu.keys&&uu.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),du=Ba.toString,Ite=fu.call(tt),xte=jt._,Dte=Um("^"+fu.call(Xe).replace(wm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hu=lC?se.Buffer:r,ti=se.Symbol,pu=se.Uint8Array,OC=hu?hu.allocUnsafe:r,mu=SC(tt.getPrototypeOf,tt),AC=tt.create,TC=Ba.propertyIsEnumerable,gu=cu.splice,PC=ti?ti.isConcatSpreadable:r,us=ti?ti.iterator:r,Mi=ti?ti.toStringTag:r,yu=function(){try{var o=Ui(tt,"defineProperty");return o({},"",{}),o}catch{}}(),Fte=se.clearTimeout!==jt.clearTimeout&&se.clearTimeout,Nte=ve&&ve.now!==jt.Date.now&&ve.now,Mte=se.setTimeout!==jt.setTimeout&&se.setTimeout,vu=xt.ceil,bu=xt.floor,Wm=tt.getOwnPropertySymbols,kte=hu?hu.isBuffer:r,IC=se.isFinite,Lte=cu.join,jte=SC(tt.keys,tt),Dt=xt.max,Rt=xt.min,Bte=ve.now,Ute=se.parseInt,xC=xt.random,Wte=cu.reverse,qm=Ui(se,"DataView"),fs=Ui(se,"Map"),Vm=Ui(se,"Promise"),Ua=Ui(se,"Set"),ds=Ui(se,"WeakMap"),hs=Ui(tt,"create"),_u=ds&&new ds,Wa={},qte=Wi(qm),Vte=Wi(fs),Rte=Wi(Vm),zte=Wi(Ua),Hte=Wi(ds),$u=ti?ti.prototype:r,ps=$u?$u.valueOf:r,DC=$u?$u.toString:r;function T(o){if(_t(o)&&!Pe(o)&&!(o instanceof Ue)){if(o instanceof Ar)return o;if(Xe.call(o,"__wrapped__"))return FE(o)}return new Ar(o)}var qa=function(){function o(){}return function(c){if(!bt(c))return{};if(AC)return AC(c);o.prototype=c;var h=new o;return o.prototype=r,h}}();function wu(){}function Ar(o,c){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}T.templateSettings={escape:oee,evaluate:see,interpolate:WS,variable:"",imports:{_:T}},T.prototype=wu.prototype,T.prototype.constructor=T,Ar.prototype=qa(wu.prototype),Ar.prototype.constructor=Ar;function Ue(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function Kte(){var o=new Ue(this.__wrapped__);return o.__actions__=rr(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=rr(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=rr(this.__views__),o}function Gte(){if(this.__filtered__){var o=new Ue(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function Yte(){var o=this.__wrapped__.value(),c=this.__dir__,h=Pe(o),b=c<0,O=h?o.length:0,I=sne(0,O,this.__views__),M=I.start,q=I.end,Y=q-M,le=b?q:M-1,ce=this.__iteratees__,fe=ce.length,ge=0,_e=Rt(Y,this.__takeCount__);if(!h||!b&&O==Y&&_e==Y)return rE(o,this.__actions__);var Ee=[];e:for(;Y--&&ge<_e;){le+=c;for(var Fe=-1,Oe=o[le];++Fe<fe;){var je=ce[Fe],qe=je.iteratee,dr=je.type,Zt=qe(Oe);if(dr==k)Oe=Zt;else if(!Zt){if(dr==Q)continue e;break e}}Ee[ge++]=Oe}return Ee}Ue.prototype=qa(wu.prototype),Ue.prototype.constructor=Ue;function ki(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function Jte(){this.__data__=hs?hs(null):{},this.size=0}function Xte(o){var c=this.has(o)&&delete this.__data__[o];return this.size-=c?1:0,c}function Zte(o){var c=this.__data__;if(hs){var h=c[o];return h===u?r:h}return Xe.call(c,o)?c[o]:r}function Qte(o){var c=this.__data__;return hs?c[o]!==r:Xe.call(c,o)}function ere(o,c){var h=this.__data__;return this.size+=this.has(o)?0:1,h[o]=hs&&c===r?u:c,this}ki.prototype.clear=Jte,ki.prototype.delete=Xte,ki.prototype.get=Zte,ki.prototype.has=Qte,ki.prototype.set=ere;function Pn(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function tre(){this.__data__=[],this.size=0}function rre(o){var c=this.__data__,h=Su(c,o);if(h<0)return!1;var b=c.length-1;return h==b?c.pop():gu.call(c,h,1),--this.size,!0}function nre(o){var c=this.__data__,h=Su(c,o);return h<0?r:c[h][1]}function ire(o){return Su(this.__data__,o)>-1}function are(o,c){var h=this.__data__,b=Su(h,o);return b<0?(++this.size,h.push([o,c])):h[b][1]=c,this}Pn.prototype.clear=tre,Pn.prototype.delete=rre,Pn.prototype.get=nre,Pn.prototype.has=ire,Pn.prototype.set=are;function In(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function ore(){this.size=0,this.__data__={hash:new ki,map:new(fs||Pn),string:new ki}}function sre(o){var c=Mu(this,o).delete(o);return this.size-=c?1:0,c}function lre(o){return Mu(this,o).get(o)}function cre(o){return Mu(this,o).has(o)}function ure(o,c){var h=Mu(this,o),b=h.size;return h.set(o,c),this.size+=h.size==b?0:1,this}In.prototype.clear=ore,In.prototype.delete=sre,In.prototype.get=lre,In.prototype.has=cre,In.prototype.set=ure;function Li(o){var c=-1,h=o==null?0:o.length;for(this.__data__=new In;++c<h;)this.add(o[c])}function fre(o){return this.__data__.set(o,u),this}function dre(o){return this.__data__.has(o)}Li.prototype.add=Li.prototype.push=fre,Li.prototype.has=dre;function qr(o){var c=this.__data__=new Pn(o);this.size=c.size}function hre(){this.__data__=new Pn,this.size=0}function pre(o){var c=this.__data__,h=c.delete(o);return this.size=c.size,h}function mre(o){return this.__data__.get(o)}function gre(o){return this.__data__.has(o)}function yre(o,c){var h=this.__data__;if(h instanceof Pn){var b=h.__data__;if(!fs||b.length<i-1)return b.push([o,c]),this.size=++h.size,this;h=this.__data__=new In(b)}return h.set(o,c),this.size=h.size,this}qr.prototype.clear=hre,qr.prototype.delete=pre,qr.prototype.get=mre,qr.prototype.has=gre,qr.prototype.set=yre;function FC(o,c){var h=Pe(o),b=!h&&qi(o),O=!h&&!b&&oi(o),I=!h&&!b&&!O&&Ha(o),M=h||b||O||I,q=M?Lm(o.length,Ate):[],Y=q.length;for(var le in o)(c||Xe.call(o,le))&&!(M&&(le=="length"||O&&(le=="offset"||le=="parent")||I&&(le=="buffer"||le=="byteLength"||le=="byteOffset")||Nn(le,Y)))&&q.push(le);return q}function NC(o){var c=o.length;return c?o[eg(0,c-1)]:r}function vre(o,c){return ku(rr(o),ji(c,0,o.length))}function bre(o){return ku(rr(o))}function Rm(o,c,h){(h!==r&&!Vr(o[c],h)||h===r&&!(c in o))&&xn(o,c,h)}function ms(o,c,h){var b=o[c];(!(Xe.call(o,c)&&Vr(b,h))||h===r&&!(c in o))&&xn(o,c,h)}function Su(o,c){for(var h=o.length;h--;)if(Vr(o[h][0],c))return h;return-1}function _re(o,c,h,b){return ri(o,function(O,I,M){c(b,O,h(O),M)}),b}function MC(o,c){return o&&un(c,Nt(c),o)}function $re(o,c){return o&&un(c,ir(c),o)}function xn(o,c,h){c=="__proto__"&&yu?yu(o,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):o[c]=h}function zm(o,c){for(var h=-1,b=c.length,O=ne(b),I=o==null;++h<b;)O[h]=I?r:Eg(o,c[h]);return O}function ji(o,c,h){return o===o&&(h!==r&&(o=o<=h?o:h),c!==r&&(o=o>=c?o:c)),o}function Tr(o,c,h,b,O,I){var M,q=c&p,Y=c&m,le=c&y;if(h&&(M=O?h(o,b,O,I):h(o)),M!==r)return M;if(!bt(o))return o;var ce=Pe(o);if(ce){if(M=cne(o),!q)return rr(o,M)}else{var fe=zt(o),ge=fe==Le||fe==ut;if(oi(o))return aE(o,q);if(fe==It||fe==F||ge&&!O){if(M=Y||ge?{}:CE(o),!q)return Y?Zre(o,$re(M,o)):Xre(o,MC(M,o))}else{if(!it[fe])return O?o:{};M=une(o,fe,q)}}I||(I=new qr);var _e=I.get(o);if(_e)return _e;I.set(o,M),QE(o)?o.forEach(function(Oe){M.add(Tr(Oe,c,h,Oe,o,I))}):XE(o)&&o.forEach(function(Oe,je){M.set(je,Tr(Oe,c,h,je,o,I))});var Ee=le?Y?fg:ug:Y?ir:Nt,Fe=ce?r:Ee(o);return Er(Fe||o,function(Oe,je){Fe&&(je=Oe,Oe=o[je]),ms(M,je,Tr(Oe,c,h,je,o,I))}),M}function wre(o){var c=Nt(o);return function(h){return kC(h,o,c)}}function kC(o,c,h){var b=h.length;if(o==null)return!b;for(o=tt(o);b--;){var O=h[b],I=c[O],M=o[O];if(M===r&&!(O in o)||!I(M))return!1}return!0}function LC(o,c,h){if(typeof o!="function")throw new Or(s);return ws(function(){o.apply(r,h)},c)}function gs(o,c,h,b){var O=-1,I=ou,M=!0,q=o.length,Y=[],le=c.length;if(!q)return Y;h&&(c=mt(c,cr(h))),b?(I=xm,M=!1):c.length>=i&&(I=cs,M=!1,c=new Li(c));e:for(;++O<q;){var ce=o[O],fe=h==null?ce:h(ce);if(ce=b||ce!==0?ce:0,M&&fe===fe){for(var ge=le;ge--;)if(c[ge]===fe)continue e;Y.push(ce)}else I(c,fe,b)||Y.push(ce)}return Y}var ri=uE(cn),jC=uE(Km,!0);function Sre(o,c){var h=!0;return ri(o,function(b,O,I){return h=!!c(b,O,I),h}),h}function Cu(o,c,h){for(var b=-1,O=o.length;++b<O;){var I=o[b],M=c(I);if(M!=null&&(q===r?M===M&&!fr(M):h(M,q)))var q=M,Y=I}return Y}function Cre(o,c,h,b){var O=o.length;for(h=xe(h),h<0&&(h=-h>O?0:O+h),b=b===r||b>O?O:xe(b),b<0&&(b+=O),b=h>b?0:tO(b);h<b;)o[h++]=c;return o}function BC(o,c){var h=[];return ri(o,function(b,O,I){c(b,O,I)&&h.push(b)}),h}function Bt(o,c,h,b,O){var I=-1,M=o.length;for(h||(h=dne),O||(O=[]);++I<M;){var q=o[I];c>0&&h(q)?c>1?Bt(q,c-1,h,b,O):Qn(O,q):b||(O[O.length]=q)}return O}var Hm=fE(),UC=fE(!0);function cn(o,c){return o&&Hm(o,c,Nt)}function Km(o,c){return o&&UC(o,c,Nt)}function Eu(o,c){return Zn(c,function(h){return Mn(o[h])})}function Bi(o,c){c=ii(c,o);for(var h=0,b=c.length;o!=null&&h<b;)o=o[fn(c[h++])];return h&&h==b?o:r}function WC(o,c,h){var b=c(o);return Pe(o)?b:Qn(b,h(o))}function Jt(o){return o==null?o===r?ss:Vt:Mi&&Mi in tt(o)?one(o):bne(o)}function Gm(o,c){return o>c}function Ere(o,c){return o!=null&&Xe.call(o,c)}function Ore(o,c){return o!=null&&c in tt(o)}function Are(o,c,h){return o>=Rt(c,h)&&o<Dt(c,h)}function Ym(o,c,h){for(var b=h?xm:ou,O=o[0].length,I=o.length,M=I,q=ne(I),Y=1/0,le=[];M--;){var ce=o[M];M&&c&&(ce=mt(ce,cr(c))),Y=Rt(ce.length,Y),q[M]=!h&&(c||O>=120&&ce.length>=120)?new Li(M&&ce):r}ce=o[0];var fe=-1,ge=q[0];e:for(;++fe<O&&le.length<Y;){var _e=ce[fe],Ee=c?c(_e):_e;if(_e=h||_e!==0?_e:0,!(ge?cs(ge,Ee):b(le,Ee,h))){for(M=I;--M;){var Fe=q[M];if(!(Fe?cs(Fe,Ee):b(o[M],Ee,h)))continue e}ge&&ge.push(Ee),le.push(_e)}}return le}function Tre(o,c,h,b){return cn(o,function(O,I,M){c(b,h(O),I,M)}),b}function ys(o,c,h){c=ii(c,o),o=TE(o,c);var b=o==null?o:o[fn(Ir(c))];return b==null?r:lr(b,o,h)}function qC(o){return _t(o)&&Jt(o)==F}function Pre(o){return _t(o)&&Jt(o)==An}function Ire(o){return _t(o)&&Jt(o)==ue}function vs(o,c,h,b,O){return o===c?!0:o==null||c==null||!_t(o)&&!_t(c)?o!==o&&c!==c:xre(o,c,h,b,vs,O)}function xre(o,c,h,b,O,I){var M=Pe(o),q=Pe(c),Y=M?V:zt(o),le=q?V:zt(c);Y=Y==F?It:Y,le=le==F?It:le;var ce=Y==It,fe=le==It,ge=Y==le;if(ge&&oi(o)){if(!oi(c))return!1;M=!0,ce=!1}if(ge&&!ce)return I||(I=new qr),M||Ha(o)?$E(o,c,h,b,O,I):ine(o,c,Y,h,b,O,I);if(!(h&_)){var _e=ce&&Xe.call(o,"__wrapped__"),Ee=fe&&Xe.call(c,"__wrapped__");if(_e||Ee){var Fe=_e?o.value():o,Oe=Ee?c.value():c;return I||(I=new qr),O(Fe,Oe,h,b,I)}}return ge?(I||(I=new qr),ane(o,c,h,b,O,I)):!1}function Dre(o){return _t(o)&&zt(o)==me}function Jm(o,c,h,b){var O=h.length,I=O,M=!b;if(o==null)return!I;for(o=tt(o);O--;){var q=h[O];if(M&&q[2]?q[1]!==o[q[0]]:!(q[0]in o))return!1}for(;++O<I;){q=h[O];var Y=q[0],le=o[Y],ce=q[1];if(M&&q[2]){if(le===r&&!(Y in o))return!1}else{var fe=new qr;if(b)var ge=b(le,ce,Y,o,c,fe);if(!(ge===r?vs(ce,le,_|w,b,fe):ge))return!1}}return!0}function VC(o){if(!bt(o)||pne(o))return!1;var c=Mn(o)?Dte:wee;return c.test(Wi(o))}function Fre(o){return _t(o)&&Jt(o)==Cn}function Nre(o){return _t(o)&&zt(o)==Yt}function Mre(o){return _t(o)&&qu(o.length)&&!!ft[Jt(o)]}function RC(o){return typeof o=="function"?o:o==null?ar:typeof o=="object"?Pe(o)?KC(o[0],o[1]):HC(o):dO(o)}function Xm(o){if(!$s(o))return jte(o);var c=[];for(var h in tt(o))Xe.call(o,h)&&h!="constructor"&&c.push(h);return c}function kre(o){if(!bt(o))return vne(o);var c=$s(o),h=[];for(var b in o)b=="constructor"&&(c||!Xe.call(o,b))||h.push(b);return h}function Zm(o,c){return o<c}function zC(o,c){var h=-1,b=nr(o)?ne(o.length):[];return ri(o,function(O,I,M){b[++h]=c(O,I,M)}),b}function HC(o){var c=hg(o);return c.length==1&&c[0][2]?OE(c[0][0],c[0][1]):function(h){return h===o||Jm(h,o,c)}}function KC(o,c){return mg(o)&&EE(c)?OE(fn(o),c):function(h){var b=Eg(h,o);return b===r&&b===c?Og(h,o):vs(c,b,_|w)}}function Ou(o,c,h,b,O){o!==c&&Hm(c,function(I,M){if(O||(O=new qr),bt(I))Lre(o,c,M,h,Ou,b,O);else{var q=b?b(yg(o,M),I,M+"",o,c,O):r;q===r&&(q=I),Rm(o,M,q)}},ir)}function Lre(o,c,h,b,O,I,M){var q=yg(o,h),Y=yg(c,h),le=M.get(Y);if(le){Rm(o,h,le);return}var ce=I?I(q,Y,h+"",o,c,M):r,fe=ce===r;if(fe){var ge=Pe(Y),_e=!ge&&oi(Y),Ee=!ge&&!_e&&Ha(Y);ce=Y,ge||_e||Ee?Pe(q)?ce=q:St(q)?ce=rr(q):_e?(fe=!1,ce=aE(Y,!0)):Ee?(fe=!1,ce=oE(Y,!0)):ce=[]:Ss(Y)||qi(Y)?(ce=q,qi(q)?ce=rO(q):(!bt(q)||Mn(q))&&(ce=CE(Y))):fe=!1}fe&&(M.set(Y,ce),O(ce,Y,b,I,M),M.delete(Y)),Rm(o,h,ce)}function GC(o,c){var h=o.length;if(h)return c+=c<0?h:0,Nn(c,h)?o[c]:r}function YC(o,c,h){c.length?c=mt(c,function(I){return Pe(I)?function(M){return Bi(M,I.length===1?I[0]:I)}:I}):c=[ar];var b=-1;c=mt(c,cr(Ce()));var O=zC(o,function(I,M,q){var Y=mt(c,function(le){return le(I)});return{criteria:Y,index:++b,value:I}});return ute(O,function(I,M){return Jre(I,M,h)})}function jre(o,c){return JC(o,c,function(h,b){return Og(o,b)})}function JC(o,c,h){for(var b=-1,O=c.length,I={};++b<O;){var M=c[b],q=Bi(o,M);h(q,M)&&bs(I,ii(M,o),q)}return I}function Bre(o){return function(c){return Bi(c,o)}}function Qm(o,c,h,b){var O=b?cte:Ma,I=-1,M=c.length,q=o;for(o===c&&(c=rr(c)),h&&(q=mt(o,cr(h)));++I<M;)for(var Y=0,le=c[I],ce=h?h(le):le;(Y=O(q,ce,Y,b))>-1;)q!==o&&gu.call(q,Y,1),gu.call(o,Y,1);return o}function XC(o,c){for(var h=o?c.length:0,b=h-1;h--;){var O=c[h];if(h==b||O!==I){var I=O;Nn(O)?gu.call(o,O,1):ng(o,O)}}return o}function eg(o,c){return o+bu(xC()*(c-o+1))}function Ure(o,c,h,b){for(var O=-1,I=Dt(vu((c-o)/(h||1)),0),M=ne(I);I--;)M[b?I:++O]=o,o+=h;return M}function tg(o,c){var h="";if(!o||c<1||c>U)return h;do c%2&&(h+=o),c=bu(c/2),c&&(o+=o);while(c);return h}function Ne(o,c){return vg(AE(o,c,ar),o+"")}function Wre(o){return NC(Ka(o))}function qre(o,c){var h=Ka(o);return ku(h,ji(c,0,h.length))}function bs(o,c,h,b){if(!bt(o))return o;c=ii(c,o);for(var O=-1,I=c.length,M=I-1,q=o;q!=null&&++O<I;){var Y=fn(c[O]),le=h;if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return o;if(O!=M){var ce=q[Y];le=b?b(ce,Y,q):r,le===r&&(le=bt(ce)?ce:Nn(c[O+1])?[]:{})}ms(q,Y,le),q=q[Y]}return o}var ZC=_u?function(o,c){return _u.set(o,c),o}:ar,Vre=yu?function(o,c){return yu(o,"toString",{configurable:!0,enumerable:!1,value:Tg(c),writable:!0})}:ar;function Rre(o){return ku(Ka(o))}function Pr(o,c,h){var b=-1,O=o.length;c<0&&(c=-c>O?0:O+c),h=h>O?O:h,h<0&&(h+=O),O=c>h?0:h-c>>>0,c>>>=0;for(var I=ne(O);++b<O;)I[b]=o[b+c];return I}function zre(o,c){var h;return ri(o,function(b,O,I){return h=c(b,O,I),!h}),!!h}function Au(o,c,h){var b=0,O=o==null?b:o.length;if(typeof c=="number"&&c===c&&O<=B){for(;b<O;){var I=b+O>>>1,M=o[I];M!==null&&!fr(M)&&(h?M<=c:M<c)?b=I+1:O=I}return O}return rg(o,c,ar,h)}function rg(o,c,h,b){var O=0,I=o==null?0:o.length;if(I===0)return 0;c=h(c);for(var M=c!==c,q=c===null,Y=fr(c),le=c===r;O<I;){var ce=bu((O+I)/2),fe=h(o[ce]),ge=fe!==r,_e=fe===null,Ee=fe===fe,Fe=fr(fe);if(M)var Oe=b||Ee;else le?Oe=Ee&&(b||ge):q?Oe=Ee&&ge&&(b||!_e):Y?Oe=Ee&&ge&&!_e&&(b||!Fe):_e||Fe?Oe=!1:Oe=b?fe<=c:fe<c;Oe?O=ce+1:I=ce}return Rt(I,z)}function QC(o,c){for(var h=-1,b=o.length,O=0,I=[];++h<b;){var M=o[h],q=c?c(M):M;if(!h||!Vr(q,Y)){var Y=q;I[O++]=M===0?0:M}}return I}function eE(o){return typeof o=="number"?o:fr(o)?L:+o}function ur(o){if(typeof o=="string")return o;if(Pe(o))return mt(o,ur)+"";if(fr(o))return DC?DC.call(o):"";var c=o+"";return c=="0"&&1/o==-1/0?"-0":c}function ni(o,c,h){var b=-1,O=ou,I=o.length,M=!0,q=[],Y=q;if(h)M=!1,O=xm;else if(I>=i){var le=c?null:rne(o);if(le)return lu(le);M=!1,O=cs,Y=new Li}else Y=c?[]:q;e:for(;++b<I;){var ce=o[b],fe=c?c(ce):ce;if(ce=h||ce!==0?ce:0,M&&fe===fe){for(var ge=Y.length;ge--;)if(Y[ge]===fe)continue e;c&&Y.push(fe),q.push(ce)}else O(Y,fe,h)||(Y!==q&&Y.push(fe),q.push(ce))}return q}function ng(o,c){return c=ii(c,o),o=TE(o,c),o==null||delete o[fn(Ir(c))]}function tE(o,c,h,b){return bs(o,c,h(Bi(o,c)),b)}function Tu(o,c,h,b){for(var O=o.length,I=b?O:-1;(b?I--:++I<O)&&c(o[I],I,o););return h?Pr(o,b?0:I,b?I+1:O):Pr(o,b?I+1:0,b?O:I)}function rE(o,c){var h=o;return h instanceof Ue&&(h=h.value()),Dm(c,function(b,O){return O.func.apply(O.thisArg,Qn([b],O.args))},h)}function ig(o,c,h){var b=o.length;if(b<2)return b?ni(o[0]):[];for(var O=-1,I=ne(b);++O<b;)for(var M=o[O],q=-1;++q<b;)q!=O&&(I[O]=gs(I[O]||M,o[q],c,h));return ni(Bt(I,1),c,h)}function nE(o,c,h){for(var b=-1,O=o.length,I=c.length,M={};++b<O;){var q=b<I?c[b]:r;h(M,o[b],q)}return M}function ag(o){return St(o)?o:[]}function og(o){return typeof o=="function"?o:ar}function ii(o,c){return Pe(o)?o:mg(o,c)?[o]:DE(Je(o))}var Hre=Ne;function ai(o,c,h){var b=o.length;return h=h===r?b:h,!c&&h>=b?o:Pr(o,c,h)}var iE=Fte||function(o){return jt.clearTimeout(o)};function aE(o,c){if(c)return o.slice();var h=o.length,b=OC?OC(h):new o.constructor(h);return o.copy(b),b}function sg(o){var c=new o.constructor(o.byteLength);return new pu(c).set(new pu(o)),c}function Kre(o,c){var h=c?sg(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.byteLength)}function Gre(o){var c=new o.constructor(o.source,qS.exec(o));return c.lastIndex=o.lastIndex,c}function Yre(o){return ps?tt(ps.call(o)):{}}function oE(o,c){var h=c?sg(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.length)}function sE(o,c){if(o!==c){var h=o!==r,b=o===null,O=o===o,I=fr(o),M=c!==r,q=c===null,Y=c===c,le=fr(c);if(!q&&!le&&!I&&o>c||I&&M&&Y&&!q&&!le||b&&M&&Y||!h&&Y||!O)return 1;if(!b&&!I&&!le&&o<c||le&&h&&O&&!b&&!I||q&&h&&O||!M&&O||!Y)return-1}return 0}function Jre(o,c,h){for(var b=-1,O=o.criteria,I=c.criteria,M=O.length,q=h.length;++b<M;){var Y=sE(O[b],I[b]);if(Y){if(b>=q)return Y;var le=h[b];return Y*(le=="desc"?-1:1)}}return o.index-c.index}function lE(o,c,h,b){for(var O=-1,I=o.length,M=h.length,q=-1,Y=c.length,le=Dt(I-M,0),ce=ne(Y+le),fe=!b;++q<Y;)ce[q]=c[q];for(;++O<M;)(fe||O<I)&&(ce[h[O]]=o[O]);for(;le--;)ce[q++]=o[O++];return ce}function cE(o,c,h,b){for(var O=-1,I=o.length,M=-1,q=h.length,Y=-1,le=c.length,ce=Dt(I-q,0),fe=ne(ce+le),ge=!b;++O<ce;)fe[O]=o[O];for(var _e=O;++Y<le;)fe[_e+Y]=c[Y];for(;++M<q;)(ge||O<I)&&(fe[_e+h[M]]=o[O++]);return fe}function rr(o,c){var h=-1,b=o.length;for(c||(c=ne(b));++h<b;)c[h]=o[h];return c}function un(o,c,h,b){var O=!h;h||(h={});for(var I=-1,M=c.length;++I<M;){var q=c[I],Y=b?b(h[q],o[q],q,h,o):r;Y===r&&(Y=o[q]),O?xn(h,q,Y):ms(h,q,Y)}return h}function Xre(o,c){return un(o,pg(o),c)}function Zre(o,c){return un(o,wE(o),c)}function Pu(o,c){return function(h,b){var O=Pe(h)?nte:_re,I=c?c():{};return O(h,o,Ce(b,2),I)}}function Va(o){return Ne(function(c,h){var b=-1,O=h.length,I=O>1?h[O-1]:r,M=O>2?h[2]:r;for(I=o.length>3&&typeof I=="function"?(O--,I):r,M&&Xt(h[0],h[1],M)&&(I=O<3?r:I,O=1),c=tt(c);++b<O;){var q=h[b];q&&o(c,q,b,I)}return c})}function uE(o,c){return function(h,b){if(h==null)return h;if(!nr(h))return o(h,b);for(var O=h.length,I=c?O:-1,M=tt(h);(c?I--:++I<O)&&b(M[I],I,M)!==!1;);return h}}function fE(o){return function(c,h,b){for(var O=-1,I=tt(c),M=b(c),q=M.length;q--;){var Y=M[o?q:++O];if(h(I[Y],Y,I)===!1)break}return c}}function Qre(o,c,h){var b=c&v,O=_s(o);function I(){var M=this&&this!==jt&&this instanceof I?O:o;return M.apply(b?h:this,arguments)}return I}function dE(o){return function(c){c=Je(c);var h=ka(c)?Wr(c):r,b=h?h[0]:c.charAt(0),O=h?ai(h,1).join(""):c.slice(1);return b[o]()+O}}function Ra(o){return function(c){return Dm(uO(cO(c).replace(Vee,"")),o,"")}}function _s(o){return function(){var c=arguments;switch(c.length){case 0:return new o;case 1:return new o(c[0]);case 2:return new o(c[0],c[1]);case 3:return new o(c[0],c[1],c[2]);case 4:return new o(c[0],c[1],c[2],c[3]);case 5:return new o(c[0],c[1],c[2],c[3],c[4]);case 6:return new o(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new o(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=qa(o.prototype),b=o.apply(h,c);return bt(b)?b:h}}function ene(o,c,h){var b=_s(o);function O(){for(var I=arguments.length,M=ne(I),q=I,Y=za(O);q--;)M[q]=arguments[q];var le=I<3&&M[0]!==Y&&M[I-1]!==Y?[]:ei(M,Y);if(I-=le.length,I<h)return yE(o,c,Iu,O.placeholder,r,M,le,r,r,h-I);var ce=this&&this!==jt&&this instanceof O?b:o;return lr(ce,this,M)}return O}function hE(o){return function(c,h,b){var O=tt(c);if(!nr(c)){var I=Ce(h,3);c=Nt(c),h=function(q){return I(O[q],q,O)}}var M=o(c,h,b);return M>-1?O[I?c[M]:M]:r}}function pE(o){return Fn(function(c){var h=c.length,b=h,O=Ar.prototype.thru;for(o&&c.reverse();b--;){var I=c[b];if(typeof I!="function")throw new Or(s);if(O&&!M&&Nu(I)=="wrapper")var M=new Ar([],!0)}for(b=M?b:h;++b<h;){I=c[b];var q=Nu(I),Y=q=="wrapper"?dg(I):r;Y&&gg(Y[0])&&Y[1]==(N|S|A|Z)&&!Y[4].length&&Y[9]==1?M=M[Nu(Y[0])].apply(M,Y[3]):M=I.length==1&&gg(I)?M[q]():M.thru(I)}return function(){var le=arguments,ce=le[0];if(M&&le.length==1&&Pe(ce))return M.plant(ce).value();for(var fe=0,ge=h?c[fe].apply(this,le):ce;++fe<h;)ge=c[fe].call(this,ge);return ge}})}function Iu(o,c,h,b,O,I,M,q,Y,le){var ce=c&N,fe=c&v,ge=c&g,_e=c&(S|E),Ee=c&G,Fe=ge?r:_s(o);function Oe(){for(var je=arguments.length,qe=ne(je),dr=je;dr--;)qe[dr]=arguments[dr];if(_e)var Zt=za(Oe),hr=dte(qe,Zt);if(b&&(qe=lE(qe,b,O,_e)),I&&(qe=cE(qe,I,M,_e)),je-=hr,_e&&je<le){var Ct=ei(qe,Zt);return yE(o,c,Iu,Oe.placeholder,h,qe,Ct,q,Y,le-je)}var Rr=fe?h:this,Ln=ge?Rr[o]:o;return je=qe.length,q?qe=_ne(qe,q):Ee&&je>1&&qe.reverse(),ce&&Y<je&&(qe.length=Y),this&&this!==jt&&this instanceof Oe&&(Ln=Fe||_s(Ln)),Ln.apply(Rr,qe)}return Oe}function mE(o,c){return function(h,b){return Tre(h,o,c(b),{})}}function xu(o,c){return function(h,b){var O;if(h===r&&b===r)return c;if(h!==r&&(O=h),b!==r){if(O===r)return b;typeof h=="string"||typeof b=="string"?(h=ur(h),b=ur(b)):(h=eE(h),b=eE(b)),O=o(h,b)}return O}}function lg(o){return Fn(function(c){return c=mt(c,cr(Ce())),Ne(function(h){var b=this;return o(c,function(O){return lr(O,b,h)})})})}function Du(o,c){c=c===r?" ":ur(c);var h=c.length;if(h<2)return h?tg(c,o):c;var b=tg(c,vu(o/La(c)));return ka(c)?ai(Wr(b),0,o).join(""):b.slice(0,o)}function tne(o,c,h,b){var O=c&v,I=_s(o);function M(){for(var q=-1,Y=arguments.length,le=-1,ce=b.length,fe=ne(ce+Y),ge=this&&this!==jt&&this instanceof M?I:o;++le<ce;)fe[le]=b[le];for(;Y--;)fe[le++]=arguments[++q];return lr(ge,O?h:this,fe)}return M}function gE(o){return function(c,h,b){return b&&typeof b!="number"&&Xt(c,h,b)&&(h=b=r),c=kn(c),h===r?(h=c,c=0):h=kn(h),b=b===r?c<h?1:-1:kn(b),Ure(c,h,b,o)}}function Fu(o){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=xr(c),h=xr(h)),o(c,h)}}function yE(o,c,h,b,O,I,M,q,Y,le){var ce=c&S,fe=ce?M:r,ge=ce?r:M,_e=ce?I:r,Ee=ce?r:I;c|=ce?A:x,c&=~(ce?x:A),c&C||(c&=-4);var Fe=[o,c,O,_e,fe,Ee,ge,q,Y,le],Oe=h.apply(r,Fe);return gg(o)&&PE(Oe,Fe),Oe.placeholder=b,IE(Oe,o,c)}function cg(o){var c=xt[o];return function(h,b){if(h=xr(h),b=b==null?0:Rt(xe(b),292),b&&IC(h)){var O=(Je(h)+"e").split("e"),I=c(O[0]+"e"+(+O[1]+b));return O=(Je(I)+"e").split("e"),+(O[0]+"e"+(+O[1]-b))}return c(h)}}var rne=Ua&&1/lu(new Ua([,-0]))[1]==R?function(o){return new Ua(o)}:xg;function vE(o){return function(c){var h=zt(c);return h==me?Bm(c):h==Yt?bte(c):fte(c,o(c))}}function Dn(o,c,h,b,O,I,M,q){var Y=c&g;if(!Y&&typeof o!="function")throw new Or(s);var le=b?b.length:0;if(le||(c&=-97,b=O=r),M=M===r?M:Dt(xe(M),0),q=q===r?q:xe(q),le-=O?O.length:0,c&x){var ce=b,fe=O;b=O=r}var ge=Y?r:dg(o),_e=[o,c,h,b,O,ce,fe,I,M,q];if(ge&&yne(_e,ge),o=_e[0],c=_e[1],h=_e[2],b=_e[3],O=_e[4],q=_e[9]=_e[9]===r?Y?0:o.length:Dt(_e[9]-le,0),!q&&c&(S|E)&&(c&=-25),!c||c==v)var Ee=Qre(o,c,h);else c==S||c==E?Ee=ene(o,c,q):(c==A||c==(v|A))&&!O.length?Ee=tne(o,c,h,b):Ee=Iu.apply(r,_e);var Fe=ge?ZC:PE;return IE(Fe(Ee,_e),o,c)}function bE(o,c,h,b){return o===r||Vr(o,Ba[h])&&!Xe.call(b,h)?c:o}function _E(o,c,h,b,O,I){return bt(o)&&bt(c)&&(I.set(c,o),Ou(o,c,r,_E,I),I.delete(c)),o}function nne(o){return Ss(o)?r:o}function $E(o,c,h,b,O,I){var M=h&_,q=o.length,Y=c.length;if(q!=Y&&!(M&&Y>q))return!1;var le=I.get(o),ce=I.get(c);if(le&&ce)return le==c&&ce==o;var fe=-1,ge=!0,_e=h&w?new Li:r;for(I.set(o,c),I.set(c,o);++fe<q;){var Ee=o[fe],Fe=c[fe];if(b)var Oe=M?b(Fe,Ee,fe,c,o,I):b(Ee,Fe,fe,o,c,I);if(Oe!==r){if(Oe)continue;ge=!1;break}if(_e){if(!Fm(c,function(je,qe){if(!cs(_e,qe)&&(Ee===je||O(Ee,je,h,b,I)))return _e.push(qe)})){ge=!1;break}}else if(!(Ee===Fe||O(Ee,Fe,h,b,I))){ge=!1;break}}return I.delete(o),I.delete(c),ge}function ine(o,c,h,b,O,I,M){switch(h){case Tn:if(o.byteLength!=c.byteLength||o.byteOffset!=c.byteOffset)return!1;o=o.buffer,c=c.buffer;case An:return!(o.byteLength!=c.byteLength||!I(new pu(o),new pu(c)));case oe:case ue:case Pt:return Vr(+o,+c);case be:return o.name==c.name&&o.message==c.message;case Cn:case En:return o==c+"";case me:var q=Bm;case Yt:var Y=b&_;if(q||(q=lu),o.size!=c.size&&!Y)return!1;var le=M.get(o);if(le)return le==c;b|=w,M.set(o,c);var ce=$E(q(o),q(c),b,O,I,M);return M.delete(o),ce;case Xn:if(ps)return ps.call(o)==ps.call(c)}return!1}function ane(o,c,h,b,O,I){var M=h&_,q=ug(o),Y=q.length,le=ug(c),ce=le.length;if(Y!=ce&&!M)return!1;for(var fe=Y;fe--;){var ge=q[fe];if(!(M?ge in c:Xe.call(c,ge)))return!1}var _e=I.get(o),Ee=I.get(c);if(_e&&Ee)return _e==c&&Ee==o;var Fe=!0;I.set(o,c),I.set(c,o);for(var Oe=M;++fe<Y;){ge=q[fe];var je=o[ge],qe=c[ge];if(b)var dr=M?b(qe,je,ge,c,o,I):b(je,qe,ge,o,c,I);if(!(dr===r?je===qe||O(je,qe,h,b,I):dr)){Fe=!1;break}Oe||(Oe=ge=="constructor")}if(Fe&&!Oe){var Zt=o.constructor,hr=c.constructor;Zt!=hr&&"constructor"in o&&"constructor"in c&&!(typeof Zt=="function"&&Zt instanceof Zt&&typeof hr=="function"&&hr instanceof hr)&&(Fe=!1)}return I.delete(o),I.delete(c),Fe}function Fn(o){return vg(AE(o,r,kE),o+"")}function ug(o){return WC(o,Nt,pg)}function fg(o){return WC(o,ir,wE)}var dg=_u?function(o){return _u.get(o)}:xg;function Nu(o){for(var c=o.name+"",h=Wa[c],b=Xe.call(Wa,c)?h.length:0;b--;){var O=h[b],I=O.func;if(I==null||I==o)return O.name}return c}function za(o){var c=Xe.call(T,"placeholder")?T:o;return c.placeholder}function Ce(){var o=T.iteratee||Pg;return o=o===Pg?RC:o,arguments.length?o(arguments[0],arguments[1]):o}function Mu(o,c){var h=o.__data__;return hne(c)?h[typeof c=="string"?"string":"hash"]:h.map}function hg(o){for(var c=Nt(o),h=c.length;h--;){var b=c[h],O=o[b];c[h]=[b,O,EE(O)]}return c}function Ui(o,c){var h=gte(o,c);return VC(h)?h:r}function one(o){var c=Xe.call(o,Mi),h=o[Mi];try{o[Mi]=r;var b=!0}catch{}var O=du.call(o);return b&&(c?o[Mi]=h:delete o[Mi]),O}var pg=Wm?function(o){return o==null?[]:(o=tt(o),Zn(Wm(o),function(c){return TC.call(o,c)}))}:Dg,wE=Wm?function(o){for(var c=[];o;)Qn(c,pg(o)),o=mu(o);return c}:Dg,zt=Jt;(qm&&zt(new qm(new ArrayBuffer(1)))!=Tn||fs&&zt(new fs)!=me||Vm&&zt(Vm.resolve())!=sr||Ua&&zt(new Ua)!=Yt||ds&&zt(new ds)!=On)&&(zt=function(o){var c=Jt(o),h=c==It?o.constructor:r,b=h?Wi(h):"";if(b)switch(b){case qte:return Tn;case Vte:return me;case Rte:return sr;case zte:return Yt;case Hte:return On}return c});function sne(o,c,h){for(var b=-1,O=h.length;++b<O;){var I=h[b],M=I.size;switch(I.type){case"drop":o+=M;break;case"dropRight":c-=M;break;case"take":c=Rt(c,o+M);break;case"takeRight":o=Dt(o,c-M);break}}return{start:o,end:c}}function lne(o){var c=o.match(pee);return c?c[1].split(mee):[]}function SE(o,c,h){c=ii(c,o);for(var b=-1,O=c.length,I=!1;++b<O;){var M=fn(c[b]);if(!(I=o!=null&&h(o,M)))break;o=o[M]}return I||++b!=O?I:(O=o==null?0:o.length,!!O&&qu(O)&&Nn(M,O)&&(Pe(o)||qi(o)))}function cne(o){var c=o.length,h=new o.constructor(c);return c&&typeof o[0]=="string"&&Xe.call(o,"index")&&(h.index=o.index,h.input=o.input),h}function CE(o){return typeof o.constructor=="function"&&!$s(o)?qa(mu(o)):{}}function une(o,c,h){var b=o.constructor;switch(c){case An:return sg(o);case oe:case ue:return new b(+o);case Tn:return Kre(o,h);case Fa:case ls:case mm:case gm:case ym:case vm:case bm:case _m:case $m:return oE(o,h);case me:return new b;case Pt:case En:return new b(o);case Cn:return Gre(o);case Yt:return new b;case Xn:return Yre(o)}}function fne(o,c){var h=c.length;if(!h)return o;var b=h-1;return c[b]=(h>1?"& ":"")+c[b],c=c.join(h>2?", ":" "),o.replace(hee,`{
89
+ */fc.exports,function(e,t){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,m=2,y=4,_=1,w=2,v=1,g=2,C=4,S=8,E=16,A=32,x=64,N=128,Y=256,K=512,H=30,te="...",ee=800,ae=16,Q=1,k=2,q=3,W=1/0,L=9007199254740991,X=17976931348623157e292,U=NaN,F=4294967295,z=F-1,j=F>>>1,T=[["ary",N],["bind",v],["bindKey",g],["curry",S],["curryRight",E],["flip",K],["partial",A],["partialRight",x],["rearg",Y]],D="[object Arguments]",V="[object Array]",Z="[object AsyncFunction]",oe="[object Boolean]",ue="[object Date]",he="[object DOMException]",be="[object Error]",Le="[object Function]",ft="[object GeneratorFunction]",me="[object Map]",It="[object Number]",Vt="[object Null]",Et="[object Object]",rr="[object Promise]",ss="[object Proxy]",En="[object RegExp]",Yt="[object Set]",On="[object String]",Xn="[object Symbol]",ls="[object Undefined]",An="[object WeakMap]",Fi="[object WeakSet]",Tn="[object ArrayBuffer]",Pn="[object DataView]",Fa="[object Float32Array]",cs="[object Float64Array]",gm="[object Int8Array]",ym="[object Int16Array]",vm="[object Int32Array]",bm="[object Uint8Array]",_m="[object Uint8ClampedArray]",$m="[object Uint16Array]",wm="[object Uint32Array]",iee=/\b__p \+= '';/g,aee=/\b(__p \+=) '' \+/g,oee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,BS=/&(?:amp|lt|gt|quot|#39);/g,US=/[&<>"']/g,see=RegExp(BS.source),lee=RegExp(US.source),cee=/<%-([\s\S]+?)%>/g,uee=/<%([\s\S]+?)%>/g,WS=/<%=([\s\S]+?)%>/g,fee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dee=/^\w*$/,hee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sm=/[\\^$.*+?()[\]{}|]/g,pee=RegExp(Sm.source),Cm=/^\s+/,mee=/\s/,gee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yee=/\{\n\/\* \[wrapped with (.+)\] \*/,vee=/,? & /,bee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_ee=/[()=,{}\[\]\/\s]/,$ee=/\\(\\)?/g,wee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qS=/\w*$/,See=/^[-+]0x[0-9a-f]+$/i,Cee=/^0b[01]+$/i,Eee=/^\[object .+?Constructor\]$/,Oee=/^0o[0-7]+$/i,Aee=/^(?:0|[1-9]\d*)$/,Tee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nu=/($^)/,Pee=/['\n\r\u2028\u2029\\]/g,iu="\\ud800-\\udfff",Iee="\\u0300-\\u036f",xee="\\ufe20-\\ufe2f",Dee="\\u20d0-\\u20ff",VS=Iee+xee+Dee,RS="\\u2700-\\u27bf",zS="a-z\\xdf-\\xf6\\xf8-\\xff",Fee="\\xac\\xb1\\xd7\\xf7",Nee="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mee="\\u2000-\\u206f",kee=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",HS="A-Z\\xc0-\\xd6\\xd8-\\xde",KS="\\ufe0e\\ufe0f",GS=Fee+Nee+Mee+kee,Em="['’]",Lee="["+iu+"]",YS="["+GS+"]",au="["+VS+"]",JS="\\d+",jee="["+RS+"]",XS="["+zS+"]",ZS="[^"+iu+GS+JS+RS+zS+HS+"]",Om="\\ud83c[\\udffb-\\udfff]",Bee="(?:"+au+"|"+Om+")",QS="[^"+iu+"]",Am="(?:\\ud83c[\\udde6-\\uddff]){2}",Tm="[\\ud800-\\udbff][\\udc00-\\udfff]",Na="["+HS+"]",eC="\\u200d",tC="(?:"+XS+"|"+ZS+")",Uee="(?:"+Na+"|"+ZS+")",rC="(?:"+Em+"(?:d|ll|m|re|s|t|ve))?",nC="(?:"+Em+"(?:D|LL|M|RE|S|T|VE))?",iC=Bee+"?",aC="["+KS+"]?",Wee="(?:"+eC+"(?:"+[QS,Am,Tm].join("|")+")"+aC+iC+")*",qee="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vee="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oC=aC+iC+Wee,Ree="(?:"+[jee,Am,Tm].join("|")+")"+oC,zee="(?:"+[QS+au+"?",au,Am,Tm,Lee].join("|")+")",Hee=RegExp(Em,"g"),Kee=RegExp(au,"g"),Pm=RegExp(Om+"(?="+Om+")|"+zee+oC,"g"),Gee=RegExp([Na+"?"+XS+"+"+rC+"(?="+[YS,Na,"$"].join("|")+")",Uee+"+"+nC+"(?="+[YS,Na+tC,"$"].join("|")+")",Na+"?"+tC+"+"+rC,Na+"+"+nC,Vee,qee,JS,Ree].join("|"),"g"),Yee=RegExp("["+eC+iu+VS+KS+"]"),Jee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zee=-1,dt={};dt[Fa]=dt[cs]=dt[gm]=dt[ym]=dt[vm]=dt[bm]=dt[_m]=dt[$m]=dt[wm]=!0,dt[D]=dt[V]=dt[Tn]=dt[oe]=dt[Pn]=dt[ue]=dt[be]=dt[Le]=dt[me]=dt[It]=dt[Et]=dt[En]=dt[Yt]=dt[On]=dt[An]=!1;var it={};it[D]=it[V]=it[Tn]=it[Pn]=it[oe]=it[ue]=it[Fa]=it[cs]=it[gm]=it[ym]=it[vm]=it[me]=it[It]=it[Et]=it[En]=it[Yt]=it[On]=it[Xn]=it[bm]=it[_m]=it[$m]=it[wm]=!0,it[be]=it[Le]=it[An]=!1;var Qee={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ete={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tte={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},rte={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nte=parseFloat,ite=parseInt,sC=typeof Nr=="object"&&Nr&&Nr.Object===Object&&Nr,ate=typeof self=="object"&&self&&self.Object===Object&&self,jt=sC||ate||Function("return this")(),Im=t&&!t.nodeType&&t,Ni=Im&&!0&&e&&!e.nodeType&&e,lC=Ni&&Ni.exports===Im,xm=lC&&sC.process,Cr=function(){try{var G=Ni&&Ni.require&&Ni.require("util").types;return G||xm&&xm.binding&&xm.binding("util")}catch{}}(),cC=Cr&&Cr.isArrayBuffer,uC=Cr&&Cr.isDate,fC=Cr&&Cr.isMap,dC=Cr&&Cr.isRegExp,hC=Cr&&Cr.isSet,pC=Cr&&Cr.isTypedArray;function lr(G,se,ne){switch(ne.length){case 0:return G.call(se);case 1:return G.call(se,ne[0]);case 2:return G.call(se,ne[0],ne[1]);case 3:return G.call(se,ne[0],ne[1],ne[2])}return G.apply(se,ne)}function ote(G,se,ne,ve){for(var Te=-1,He=G==null?0:G.length;++Te<He;){var xt=G[Te];se(ve,xt,ne(xt),G)}return ve}function Er(G,se){for(var ne=-1,ve=G==null?0:G.length;++ne<ve&&se(G[ne],ne,G)!==!1;);return G}function ste(G,se){for(var ne=G==null?0:G.length;ne--&&se(G[ne],ne,G)!==!1;);return G}function mC(G,se){for(var ne=-1,ve=G==null?0:G.length;++ne<ve;)if(!se(G[ne],ne,G))return!1;return!0}function Zn(G,se){for(var ne=-1,ve=G==null?0:G.length,Te=0,He=[];++ne<ve;){var xt=G[ne];se(xt,ne,G)&&(He[Te++]=xt)}return He}function ou(G,se){var ne=G==null?0:G.length;return!!ne&&Ma(G,se,0)>-1}function Dm(G,se,ne){for(var ve=-1,Te=G==null?0:G.length;++ve<Te;)if(ne(se,G[ve]))return!0;return!1}function gt(G,se){for(var ne=-1,ve=G==null?0:G.length,Te=Array(ve);++ne<ve;)Te[ne]=se(G[ne],ne,G);return Te}function Qn(G,se){for(var ne=-1,ve=se.length,Te=G.length;++ne<ve;)G[Te+ne]=se[ne];return G}function Fm(G,se,ne,ve){var Te=-1,He=G==null?0:G.length;for(ve&&He&&(ne=G[++Te]);++Te<He;)ne=se(ne,G[Te],Te,G);return ne}function lte(G,se,ne,ve){var Te=G==null?0:G.length;for(ve&&Te&&(ne=G[--Te]);Te--;)ne=se(ne,G[Te],Te,G);return ne}function Nm(G,se){for(var ne=-1,ve=G==null?0:G.length;++ne<ve;)if(se(G[ne],ne,G))return!0;return!1}var cte=Mm("length");function ute(G){return G.split("")}function fte(G){return G.match(bee)||[]}function gC(G,se,ne){var ve;return ne(G,function(Te,He,xt){if(se(Te,He,xt))return ve=He,!1}),ve}function su(G,se,ne,ve){for(var Te=G.length,He=ne+(ve?1:-1);ve?He--:++He<Te;)if(se(G[He],He,G))return He;return-1}function Ma(G,se,ne){return se===se?Ste(G,se,ne):su(G,yC,ne)}function dte(G,se,ne,ve){for(var Te=ne-1,He=G.length;++Te<He;)if(ve(G[Te],se))return Te;return-1}function yC(G){return G!==G}function vC(G,se){var ne=G==null?0:G.length;return ne?Lm(G,se)/ne:U}function Mm(G){return function(se){return se==null?r:se[G]}}function km(G){return function(se){return G==null?r:G[se]}}function bC(G,se,ne,ve,Te){return Te(G,function(He,xt,tt){ne=ve?(ve=!1,He):se(ne,He,xt,tt)}),ne}function hte(G,se){var ne=G.length;for(G.sort(se);ne--;)G[ne]=G[ne].value;return G}function Lm(G,se){for(var ne,ve=-1,Te=G.length;++ve<Te;){var He=se(G[ve]);He!==r&&(ne=ne===r?He:ne+He)}return ne}function jm(G,se){for(var ne=-1,ve=Array(G);++ne<G;)ve[ne]=se(ne);return ve}function pte(G,se){return gt(se,function(ne){return[ne,G[ne]]})}function _C(G){return G&&G.slice(0,CC(G)+1).replace(Cm,"")}function cr(G){return function(se){return G(se)}}function Bm(G,se){return gt(se,function(ne){return G[ne]})}function us(G,se){return G.has(se)}function $C(G,se){for(var ne=-1,ve=G.length;++ne<ve&&Ma(se,G[ne],0)>-1;);return ne}function wC(G,se){for(var ne=G.length;ne--&&Ma(se,G[ne],0)>-1;);return ne}function mte(G,se){for(var ne=G.length,ve=0;ne--;)G[ne]===se&&++ve;return ve}var gte=km(Qee),yte=km(ete);function vte(G){return"\\"+rte[G]}function bte(G,se){return G==null?r:G[se]}function ka(G){return Yee.test(G)}function _te(G){return Jee.test(G)}function $te(G){for(var se,ne=[];!(se=G.next()).done;)ne.push(se.value);return ne}function Um(G){var se=-1,ne=Array(G.size);return G.forEach(function(ve,Te){ne[++se]=[Te,ve]}),ne}function SC(G,se){return function(ne){return G(se(ne))}}function ei(G,se){for(var ne=-1,ve=G.length,Te=0,He=[];++ne<ve;){var xt=G[ne];(xt===se||xt===d)&&(G[ne]=d,He[Te++]=ne)}return He}function lu(G){var se=-1,ne=Array(G.size);return G.forEach(function(ve){ne[++se]=ve}),ne}function wte(G){var se=-1,ne=Array(G.size);return G.forEach(function(ve){ne[++se]=[ve,ve]}),ne}function Ste(G,se,ne){for(var ve=ne-1,Te=G.length;++ve<Te;)if(G[ve]===se)return ve;return-1}function Cte(G,se,ne){for(var ve=ne+1;ve--;)if(G[ve]===se)return ve;return ve}function La(G){return ka(G)?Ote(G):cte(G)}function Wr(G){return ka(G)?Ate(G):ute(G)}function CC(G){for(var se=G.length;se--&&mee.test(G.charAt(se)););return se}var Ete=km(tte);function Ote(G){for(var se=Pm.lastIndex=0;Pm.test(G);)++se;return se}function Ate(G){return G.match(Pm)||[]}function Tte(G){return G.match(Gee)||[]}var Pte=function G(se){se=se==null?jt:ja.defaults(jt.Object(),se,ja.pick(jt,Xee));var ne=se.Array,ve=se.Date,Te=se.Error,He=se.Function,xt=se.Math,tt=se.Object,Wm=se.RegExp,Ite=se.String,Or=se.TypeError,cu=ne.prototype,xte=He.prototype,Ba=tt.prototype,uu=se["__core-js_shared__"],fu=xte.toString,Ze=Ba.hasOwnProperty,Dte=0,EC=function(){var o=/[^.]+$/.exec(uu&&uu.keys&&uu.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),du=Ba.toString,Fte=fu.call(tt),Nte=jt._,Mte=Wm("^"+fu.call(Ze).replace(Sm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hu=lC?se.Buffer:r,ti=se.Symbol,pu=se.Uint8Array,OC=hu?hu.allocUnsafe:r,mu=SC(tt.getPrototypeOf,tt),AC=tt.create,TC=Ba.propertyIsEnumerable,gu=cu.splice,PC=ti?ti.isConcatSpreadable:r,fs=ti?ti.iterator:r,Mi=ti?ti.toStringTag:r,yu=function(){try{var o=Ui(tt,"defineProperty");return o({},"",{}),o}catch{}}(),kte=se.clearTimeout!==jt.clearTimeout&&se.clearTimeout,Lte=ve&&ve.now!==jt.Date.now&&ve.now,jte=se.setTimeout!==jt.setTimeout&&se.setTimeout,vu=xt.ceil,bu=xt.floor,qm=tt.getOwnPropertySymbols,Bte=hu?hu.isBuffer:r,IC=se.isFinite,Ute=cu.join,Wte=SC(tt.keys,tt),Dt=xt.max,Rt=xt.min,qte=ve.now,Vte=se.parseInt,xC=xt.random,Rte=cu.reverse,Vm=Ui(se,"DataView"),ds=Ui(se,"Map"),Rm=Ui(se,"Promise"),Ua=Ui(se,"Set"),hs=Ui(se,"WeakMap"),ps=Ui(tt,"create"),_u=hs&&new hs,Wa={},zte=Wi(Vm),Hte=Wi(ds),Kte=Wi(Rm),Gte=Wi(Ua),Yte=Wi(hs),$u=ti?ti.prototype:r,ms=$u?$u.valueOf:r,DC=$u?$u.toString:r;function P(o){if($t(o)&&!Pe(o)&&!(o instanceof We)){if(o instanceof Ar)return o;if(Ze.call(o,"__wrapped__"))return FE(o)}return new Ar(o)}var qa=function(){function o(){}return function(c){if(!_t(c))return{};if(AC)return AC(c);o.prototype=c;var h=new o;return o.prototype=r,h}}();function wu(){}function Ar(o,c){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}P.templateSettings={escape:cee,evaluate:uee,interpolate:WS,variable:"",imports:{_:P}},P.prototype=wu.prototype,P.prototype.constructor=P,Ar.prototype=qa(wu.prototype),Ar.prototype.constructor=Ar;function We(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function Jte(){var o=new We(this.__wrapped__);return o.__actions__=nr(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=nr(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=nr(this.__views__),o}function Xte(){if(this.__filtered__){var o=new We(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function Zte(){var o=this.__wrapped__.value(),c=this.__dir__,h=Pe(o),b=c<0,O=h?o.length:0,I=une(0,O,this.__views__),M=I.start,R=I.end,J=R-M,le=b?R:M-1,ce=this.__iteratees__,fe=ce.length,ge=0,_e=Rt(J,this.__takeCount__);if(!h||!b&&O==J&&_e==J)return rE(o,this.__actions__);var Ee=[];e:for(;J--&&ge<_e;){le+=c;for(var Fe=-1,Oe=o[le];++Fe<fe;){var je=ce[Fe],qe=je.iteratee,dr=je.type,Zt=qe(Oe);if(dr==k)Oe=Zt;else if(!Zt){if(dr==Q)continue e;break e}}Ee[ge++]=Oe}return Ee}We.prototype=qa(wu.prototype),We.prototype.constructor=We;function ki(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function Qte(){this.__data__=ps?ps(null):{},this.size=0}function ere(o){var c=this.has(o)&&delete this.__data__[o];return this.size-=c?1:0,c}function tre(o){var c=this.__data__;if(ps){var h=c[o];return h===u?r:h}return Ze.call(c,o)?c[o]:r}function rre(o){var c=this.__data__;return ps?c[o]!==r:Ze.call(c,o)}function nre(o,c){var h=this.__data__;return this.size+=this.has(o)?0:1,h[o]=ps&&c===r?u:c,this}ki.prototype.clear=Qte,ki.prototype.delete=ere,ki.prototype.get=tre,ki.prototype.has=rre,ki.prototype.set=nre;function In(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function ire(){this.__data__=[],this.size=0}function are(o){var c=this.__data__,h=Su(c,o);if(h<0)return!1;var b=c.length-1;return h==b?c.pop():gu.call(c,h,1),--this.size,!0}function ore(o){var c=this.__data__,h=Su(c,o);return h<0?r:c[h][1]}function sre(o){return Su(this.__data__,o)>-1}function lre(o,c){var h=this.__data__,b=Su(h,o);return b<0?(++this.size,h.push([o,c])):h[b][1]=c,this}In.prototype.clear=ire,In.prototype.delete=are,In.prototype.get=ore,In.prototype.has=sre,In.prototype.set=lre;function xn(o){var c=-1,h=o==null?0:o.length;for(this.clear();++c<h;){var b=o[c];this.set(b[0],b[1])}}function cre(){this.size=0,this.__data__={hash:new ki,map:new(ds||In),string:new ki}}function ure(o){var c=Mu(this,o).delete(o);return this.size-=c?1:0,c}function fre(o){return Mu(this,o).get(o)}function dre(o){return Mu(this,o).has(o)}function hre(o,c){var h=Mu(this,o),b=h.size;return h.set(o,c),this.size+=h.size==b?0:1,this}xn.prototype.clear=cre,xn.prototype.delete=ure,xn.prototype.get=fre,xn.prototype.has=dre,xn.prototype.set=hre;function Li(o){var c=-1,h=o==null?0:o.length;for(this.__data__=new xn;++c<h;)this.add(o[c])}function pre(o){return this.__data__.set(o,u),this}function mre(o){return this.__data__.has(o)}Li.prototype.add=Li.prototype.push=pre,Li.prototype.has=mre;function qr(o){var c=this.__data__=new In(o);this.size=c.size}function gre(){this.__data__=new In,this.size=0}function yre(o){var c=this.__data__,h=c.delete(o);return this.size=c.size,h}function vre(o){return this.__data__.get(o)}function bre(o){return this.__data__.has(o)}function _re(o,c){var h=this.__data__;if(h instanceof In){var b=h.__data__;if(!ds||b.length<i-1)return b.push([o,c]),this.size=++h.size,this;h=this.__data__=new xn(b)}return h.set(o,c),this.size=h.size,this}qr.prototype.clear=gre,qr.prototype.delete=yre,qr.prototype.get=vre,qr.prototype.has=bre,qr.prototype.set=_re;function FC(o,c){var h=Pe(o),b=!h&&qi(o),O=!h&&!b&&oi(o),I=!h&&!b&&!O&&Ha(o),M=h||b||O||I,R=M?jm(o.length,Ite):[],J=R.length;for(var le in o)(c||Ze.call(o,le))&&!(M&&(le=="length"||O&&(le=="offset"||le=="parent")||I&&(le=="buffer"||le=="byteLength"||le=="byteOffset")||Mn(le,J)))&&R.push(le);return R}function NC(o){var c=o.length;return c?o[tg(0,c-1)]:r}function $re(o,c){return ku(nr(o),ji(c,0,o.length))}function wre(o){return ku(nr(o))}function zm(o,c,h){(h!==r&&!Vr(o[c],h)||h===r&&!(c in o))&&Dn(o,c,h)}function gs(o,c,h){var b=o[c];(!(Ze.call(o,c)&&Vr(b,h))||h===r&&!(c in o))&&Dn(o,c,h)}function Su(o,c){for(var h=o.length;h--;)if(Vr(o[h][0],c))return h;return-1}function Sre(o,c,h,b){return ri(o,function(O,I,M){c(b,O,h(O),M)}),b}function MC(o,c){return o&&fn(c,Nt(c),o)}function Cre(o,c){return o&&fn(c,ar(c),o)}function Dn(o,c,h){c=="__proto__"&&yu?yu(o,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):o[c]=h}function Hm(o,c){for(var h=-1,b=c.length,O=ne(b),I=o==null;++h<b;)O[h]=I?r:Og(o,c[h]);return O}function ji(o,c,h){return o===o&&(h!==r&&(o=o<=h?o:h),c!==r&&(o=o>=c?o:c)),o}function Tr(o,c,h,b,O,I){var M,R=c&p,J=c&m,le=c&y;if(h&&(M=O?h(o,b,O,I):h(o)),M!==r)return M;if(!_t(o))return o;var ce=Pe(o);if(ce){if(M=dne(o),!R)return nr(o,M)}else{var fe=zt(o),ge=fe==Le||fe==ft;if(oi(o))return aE(o,R);if(fe==Et||fe==D||ge&&!O){if(M=J||ge?{}:CE(o),!R)return J?tne(o,Cre(M,o)):ene(o,MC(M,o))}else{if(!it[fe])return O?o:{};M=hne(o,fe,R)}}I||(I=new qr);var _e=I.get(o);if(_e)return _e;I.set(o,M),QE(o)?o.forEach(function(Oe){M.add(Tr(Oe,c,h,Oe,o,I))}):XE(o)&&o.forEach(function(Oe,je){M.set(je,Tr(Oe,c,h,je,o,I))});var Ee=le?J?dg:fg:J?ar:Nt,Fe=ce?r:Ee(o);return Er(Fe||o,function(Oe,je){Fe&&(je=Oe,Oe=o[je]),gs(M,je,Tr(Oe,c,h,je,o,I))}),M}function Ere(o){var c=Nt(o);return function(h){return kC(h,o,c)}}function kC(o,c,h){var b=h.length;if(o==null)return!b;for(o=tt(o);b--;){var O=h[b],I=c[O],M=o[O];if(M===r&&!(O in o)||!I(M))return!1}return!0}function LC(o,c,h){if(typeof o!="function")throw new Or(s);return Ss(function(){o.apply(r,h)},c)}function ys(o,c,h,b){var O=-1,I=ou,M=!0,R=o.length,J=[],le=c.length;if(!R)return J;h&&(c=gt(c,cr(h))),b?(I=Dm,M=!1):c.length>=i&&(I=us,M=!1,c=new Li(c));e:for(;++O<R;){var ce=o[O],fe=h==null?ce:h(ce);if(ce=b||ce!==0?ce:0,M&&fe===fe){for(var ge=le;ge--;)if(c[ge]===fe)continue e;J.push(ce)}else I(c,fe,b)||J.push(ce)}return J}var ri=uE(un),jC=uE(Gm,!0);function Ore(o,c){var h=!0;return ri(o,function(b,O,I){return h=!!c(b,O,I),h}),h}function Cu(o,c,h){for(var b=-1,O=o.length;++b<O;){var I=o[b],M=c(I);if(M!=null&&(R===r?M===M&&!fr(M):h(M,R)))var R=M,J=I}return J}function Are(o,c,h,b){var O=o.length;for(h=xe(h),h<0&&(h=-h>O?0:O+h),b=b===r||b>O?O:xe(b),b<0&&(b+=O),b=h>b?0:tO(b);h<b;)o[h++]=c;return o}function BC(o,c){var h=[];return ri(o,function(b,O,I){c(b,O,I)&&h.push(b)}),h}function Bt(o,c,h,b,O){var I=-1,M=o.length;for(h||(h=mne),O||(O=[]);++I<M;){var R=o[I];c>0&&h(R)?c>1?Bt(R,c-1,h,b,O):Qn(O,R):b||(O[O.length]=R)}return O}var Km=fE(),UC=fE(!0);function un(o,c){return o&&Km(o,c,Nt)}function Gm(o,c){return o&&UC(o,c,Nt)}function Eu(o,c){return Zn(c,function(h){return kn(o[h])})}function Bi(o,c){c=ii(c,o);for(var h=0,b=c.length;o!=null&&h<b;)o=o[dn(c[h++])];return h&&h==b?o:r}function WC(o,c,h){var b=c(o);return Pe(o)?b:Qn(b,h(o))}function Jt(o){return o==null?o===r?ls:Vt:Mi&&Mi in tt(o)?cne(o):wne(o)}function Ym(o,c){return o>c}function Tre(o,c){return o!=null&&Ze.call(o,c)}function Pre(o,c){return o!=null&&c in tt(o)}function Ire(o,c,h){return o>=Rt(c,h)&&o<Dt(c,h)}function Jm(o,c,h){for(var b=h?Dm:ou,O=o[0].length,I=o.length,M=I,R=ne(I),J=1/0,le=[];M--;){var ce=o[M];M&&c&&(ce=gt(ce,cr(c))),J=Rt(ce.length,J),R[M]=!h&&(c||O>=120&&ce.length>=120)?new Li(M&&ce):r}ce=o[0];var fe=-1,ge=R[0];e:for(;++fe<O&&le.length<J;){var _e=ce[fe],Ee=c?c(_e):_e;if(_e=h||_e!==0?_e:0,!(ge?us(ge,Ee):b(le,Ee,h))){for(M=I;--M;){var Fe=R[M];if(!(Fe?us(Fe,Ee):b(o[M],Ee,h)))continue e}ge&&ge.push(Ee),le.push(_e)}}return le}function xre(o,c,h,b){return un(o,function(O,I,M){c(b,h(O),I,M)}),b}function vs(o,c,h){c=ii(c,o),o=TE(o,c);var b=o==null?o:o[dn(Ir(c))];return b==null?r:lr(b,o,h)}function qC(o){return $t(o)&&Jt(o)==D}function Dre(o){return $t(o)&&Jt(o)==Tn}function Fre(o){return $t(o)&&Jt(o)==ue}function bs(o,c,h,b,O){return o===c?!0:o==null||c==null||!$t(o)&&!$t(c)?o!==o&&c!==c:Nre(o,c,h,b,bs,O)}function Nre(o,c,h,b,O,I){var M=Pe(o),R=Pe(c),J=M?V:zt(o),le=R?V:zt(c);J=J==D?Et:J,le=le==D?Et:le;var ce=J==Et,fe=le==Et,ge=J==le;if(ge&&oi(o)){if(!oi(c))return!1;M=!0,ce=!1}if(ge&&!ce)return I||(I=new qr),M||Ha(o)?$E(o,c,h,b,O,I):sne(o,c,J,h,b,O,I);if(!(h&_)){var _e=ce&&Ze.call(o,"__wrapped__"),Ee=fe&&Ze.call(c,"__wrapped__");if(_e||Ee){var Fe=_e?o.value():o,Oe=Ee?c.value():c;return I||(I=new qr),O(Fe,Oe,h,b,I)}}return ge?(I||(I=new qr),lne(o,c,h,b,O,I)):!1}function Mre(o){return $t(o)&&zt(o)==me}function Xm(o,c,h,b){var O=h.length,I=O,M=!b;if(o==null)return!I;for(o=tt(o);O--;){var R=h[O];if(M&&R[2]?R[1]!==o[R[0]]:!(R[0]in o))return!1}for(;++O<I;){R=h[O];var J=R[0],le=o[J],ce=R[1];if(M&&R[2]){if(le===r&&!(J in o))return!1}else{var fe=new qr;if(b)var ge=b(le,ce,J,o,c,fe);if(!(ge===r?bs(ce,le,_|w,b,fe):ge))return!1}}return!0}function VC(o){if(!_t(o)||yne(o))return!1;var c=kn(o)?Mte:Eee;return c.test(Wi(o))}function kre(o){return $t(o)&&Jt(o)==En}function Lre(o){return $t(o)&&zt(o)==Yt}function jre(o){return $t(o)&&qu(o.length)&&!!dt[Jt(o)]}function RC(o){return typeof o=="function"?o:o==null?or:typeof o=="object"?Pe(o)?KC(o[0],o[1]):HC(o):dO(o)}function Zm(o){if(!ws(o))return Wte(o);var c=[];for(var h in tt(o))Ze.call(o,h)&&h!="constructor"&&c.push(h);return c}function Bre(o){if(!_t(o))return $ne(o);var c=ws(o),h=[];for(var b in o)b=="constructor"&&(c||!Ze.call(o,b))||h.push(b);return h}function Qm(o,c){return o<c}function zC(o,c){var h=-1,b=ir(o)?ne(o.length):[];return ri(o,function(O,I,M){b[++h]=c(O,I,M)}),b}function HC(o){var c=pg(o);return c.length==1&&c[0][2]?OE(c[0][0],c[0][1]):function(h){return h===o||Xm(h,o,c)}}function KC(o,c){return gg(o)&&EE(c)?OE(dn(o),c):function(h){var b=Og(h,o);return b===r&&b===c?Ag(h,o):bs(c,b,_|w)}}function Ou(o,c,h,b,O){o!==c&&Km(c,function(I,M){if(O||(O=new qr),_t(I))Ure(o,c,M,h,Ou,b,O);else{var R=b?b(vg(o,M),I,M+"",o,c,O):r;R===r&&(R=I),zm(o,M,R)}},ar)}function Ure(o,c,h,b,O,I,M){var R=vg(o,h),J=vg(c,h),le=M.get(J);if(le){zm(o,h,le);return}var ce=I?I(R,J,h+"",o,c,M):r,fe=ce===r;if(fe){var ge=Pe(J),_e=!ge&&oi(J),Ee=!ge&&!_e&&Ha(J);ce=J,ge||_e||Ee?Pe(R)?ce=R:St(R)?ce=nr(R):_e?(fe=!1,ce=aE(J,!0)):Ee?(fe=!1,ce=oE(J,!0)):ce=[]:Cs(J)||qi(J)?(ce=R,qi(R)?ce=rO(R):(!_t(R)||kn(R))&&(ce=CE(J))):fe=!1}fe&&(M.set(J,ce),O(ce,J,b,I,M),M.delete(J)),zm(o,h,ce)}function GC(o,c){var h=o.length;if(h)return c+=c<0?h:0,Mn(c,h)?o[c]:r}function YC(o,c,h){c.length?c=gt(c,function(I){return Pe(I)?function(M){return Bi(M,I.length===1?I[0]:I)}:I}):c=[or];var b=-1;c=gt(c,cr(Ce()));var O=zC(o,function(I,M,R){var J=gt(c,function(le){return le(I)});return{criteria:J,index:++b,value:I}});return hte(O,function(I,M){return Qre(I,M,h)})}function Wre(o,c){return JC(o,c,function(h,b){return Ag(o,b)})}function JC(o,c,h){for(var b=-1,O=c.length,I={};++b<O;){var M=c[b],R=Bi(o,M);h(R,M)&&_s(I,ii(M,o),R)}return I}function qre(o){return function(c){return Bi(c,o)}}function eg(o,c,h,b){var O=b?dte:Ma,I=-1,M=c.length,R=o;for(o===c&&(c=nr(c)),h&&(R=gt(o,cr(h)));++I<M;)for(var J=0,le=c[I],ce=h?h(le):le;(J=O(R,ce,J,b))>-1;)R!==o&&gu.call(R,J,1),gu.call(o,J,1);return o}function XC(o,c){for(var h=o?c.length:0,b=h-1;h--;){var O=c[h];if(h==b||O!==I){var I=O;Mn(O)?gu.call(o,O,1):ig(o,O)}}return o}function tg(o,c){return o+bu(xC()*(c-o+1))}function Vre(o,c,h,b){for(var O=-1,I=Dt(vu((c-o)/(h||1)),0),M=ne(I);I--;)M[b?I:++O]=o,o+=h;return M}function rg(o,c){var h="";if(!o||c<1||c>L)return h;do c%2&&(h+=o),c=bu(c/2),c&&(o+=o);while(c);return h}function Ne(o,c){return bg(AE(o,c,or),o+"")}function Rre(o){return NC(Ka(o))}function zre(o,c){var h=Ka(o);return ku(h,ji(c,0,h.length))}function _s(o,c,h,b){if(!_t(o))return o;c=ii(c,o);for(var O=-1,I=c.length,M=I-1,R=o;R!=null&&++O<I;){var J=dn(c[O]),le=h;if(J==="__proto__"||J==="constructor"||J==="prototype")return o;if(O!=M){var ce=R[J];le=b?b(ce,J,R):r,le===r&&(le=_t(ce)?ce:Mn(c[O+1])?[]:{})}gs(R,J,le),R=R[J]}return o}var ZC=_u?function(o,c){return _u.set(o,c),o}:or,Hre=yu?function(o,c){return yu(o,"toString",{configurable:!0,enumerable:!1,value:Pg(c),writable:!0})}:or;function Kre(o){return ku(Ka(o))}function Pr(o,c,h){var b=-1,O=o.length;c<0&&(c=-c>O?0:O+c),h=h>O?O:h,h<0&&(h+=O),O=c>h?0:h-c>>>0,c>>>=0;for(var I=ne(O);++b<O;)I[b]=o[b+c];return I}function Gre(o,c){var h;return ri(o,function(b,O,I){return h=c(b,O,I),!h}),!!h}function Au(o,c,h){var b=0,O=o==null?b:o.length;if(typeof c=="number"&&c===c&&O<=j){for(;b<O;){var I=b+O>>>1,M=o[I];M!==null&&!fr(M)&&(h?M<=c:M<c)?b=I+1:O=I}return O}return ng(o,c,or,h)}function ng(o,c,h,b){var O=0,I=o==null?0:o.length;if(I===0)return 0;c=h(c);for(var M=c!==c,R=c===null,J=fr(c),le=c===r;O<I;){var ce=bu((O+I)/2),fe=h(o[ce]),ge=fe!==r,_e=fe===null,Ee=fe===fe,Fe=fr(fe);if(M)var Oe=b||Ee;else le?Oe=Ee&&(b||ge):R?Oe=Ee&&ge&&(b||!_e):J?Oe=Ee&&ge&&!_e&&(b||!Fe):_e||Fe?Oe=!1:Oe=b?fe<=c:fe<c;Oe?O=ce+1:I=ce}return Rt(I,z)}function QC(o,c){for(var h=-1,b=o.length,O=0,I=[];++h<b;){var M=o[h],R=c?c(M):M;if(!h||!Vr(R,J)){var J=R;I[O++]=M===0?0:M}}return I}function eE(o){return typeof o=="number"?o:fr(o)?U:+o}function ur(o){if(typeof o=="string")return o;if(Pe(o))return gt(o,ur)+"";if(fr(o))return DC?DC.call(o):"";var c=o+"";return c=="0"&&1/o==-1/0?"-0":c}function ni(o,c,h){var b=-1,O=ou,I=o.length,M=!0,R=[],J=R;if(h)M=!1,O=Dm;else if(I>=i){var le=c?null:ane(o);if(le)return lu(le);M=!1,O=us,J=new Li}else J=c?[]:R;e:for(;++b<I;){var ce=o[b],fe=c?c(ce):ce;if(ce=h||ce!==0?ce:0,M&&fe===fe){for(var ge=J.length;ge--;)if(J[ge]===fe)continue e;c&&J.push(fe),R.push(ce)}else O(J,fe,h)||(J!==R&&J.push(fe),R.push(ce))}return R}function ig(o,c){return c=ii(c,o),o=TE(o,c),o==null||delete o[dn(Ir(c))]}function tE(o,c,h,b){return _s(o,c,h(Bi(o,c)),b)}function Tu(o,c,h,b){for(var O=o.length,I=b?O:-1;(b?I--:++I<O)&&c(o[I],I,o););return h?Pr(o,b?0:I,b?I+1:O):Pr(o,b?I+1:0,b?O:I)}function rE(o,c){var h=o;return h instanceof We&&(h=h.value()),Fm(c,function(b,O){return O.func.apply(O.thisArg,Qn([b],O.args))},h)}function ag(o,c,h){var b=o.length;if(b<2)return b?ni(o[0]):[];for(var O=-1,I=ne(b);++O<b;)for(var M=o[O],R=-1;++R<b;)R!=O&&(I[O]=ys(I[O]||M,o[R],c,h));return ni(Bt(I,1),c,h)}function nE(o,c,h){for(var b=-1,O=o.length,I=c.length,M={};++b<O;){var R=b<I?c[b]:r;h(M,o[b],R)}return M}function og(o){return St(o)?o:[]}function sg(o){return typeof o=="function"?o:or}function ii(o,c){return Pe(o)?o:gg(o,c)?[o]:DE(Je(o))}var Yre=Ne;function ai(o,c,h){var b=o.length;return h=h===r?b:h,!c&&h>=b?o:Pr(o,c,h)}var iE=kte||function(o){return jt.clearTimeout(o)};function aE(o,c){if(c)return o.slice();var h=o.length,b=OC?OC(h):new o.constructor(h);return o.copy(b),b}function lg(o){var c=new o.constructor(o.byteLength);return new pu(c).set(new pu(o)),c}function Jre(o,c){var h=c?lg(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.byteLength)}function Xre(o){var c=new o.constructor(o.source,qS.exec(o));return c.lastIndex=o.lastIndex,c}function Zre(o){return ms?tt(ms.call(o)):{}}function oE(o,c){var h=c?lg(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.length)}function sE(o,c){if(o!==c){var h=o!==r,b=o===null,O=o===o,I=fr(o),M=c!==r,R=c===null,J=c===c,le=fr(c);if(!R&&!le&&!I&&o>c||I&&M&&J&&!R&&!le||b&&M&&J||!h&&J||!O)return 1;if(!b&&!I&&!le&&o<c||le&&h&&O&&!b&&!I||R&&h&&O||!M&&O||!J)return-1}return 0}function Qre(o,c,h){for(var b=-1,O=o.criteria,I=c.criteria,M=O.length,R=h.length;++b<M;){var J=sE(O[b],I[b]);if(J){if(b>=R)return J;var le=h[b];return J*(le=="desc"?-1:1)}}return o.index-c.index}function lE(o,c,h,b){for(var O=-1,I=o.length,M=h.length,R=-1,J=c.length,le=Dt(I-M,0),ce=ne(J+le),fe=!b;++R<J;)ce[R]=c[R];for(;++O<M;)(fe||O<I)&&(ce[h[O]]=o[O]);for(;le--;)ce[R++]=o[O++];return ce}function cE(o,c,h,b){for(var O=-1,I=o.length,M=-1,R=h.length,J=-1,le=c.length,ce=Dt(I-R,0),fe=ne(ce+le),ge=!b;++O<ce;)fe[O]=o[O];for(var _e=O;++J<le;)fe[_e+J]=c[J];for(;++M<R;)(ge||O<I)&&(fe[_e+h[M]]=o[O++]);return fe}function nr(o,c){var h=-1,b=o.length;for(c||(c=ne(b));++h<b;)c[h]=o[h];return c}function fn(o,c,h,b){var O=!h;h||(h={});for(var I=-1,M=c.length;++I<M;){var R=c[I],J=b?b(h[R],o[R],R,h,o):r;J===r&&(J=o[R]),O?Dn(h,R,J):gs(h,R,J)}return h}function ene(o,c){return fn(o,mg(o),c)}function tne(o,c){return fn(o,wE(o),c)}function Pu(o,c){return function(h,b){var O=Pe(h)?ote:Sre,I=c?c():{};return O(h,o,Ce(b,2),I)}}function Va(o){return Ne(function(c,h){var b=-1,O=h.length,I=O>1?h[O-1]:r,M=O>2?h[2]:r;for(I=o.length>3&&typeof I=="function"?(O--,I):r,M&&Xt(h[0],h[1],M)&&(I=O<3?r:I,O=1),c=tt(c);++b<O;){var R=h[b];R&&o(c,R,b,I)}return c})}function uE(o,c){return function(h,b){if(h==null)return h;if(!ir(h))return o(h,b);for(var O=h.length,I=c?O:-1,M=tt(h);(c?I--:++I<O)&&b(M[I],I,M)!==!1;);return h}}function fE(o){return function(c,h,b){for(var O=-1,I=tt(c),M=b(c),R=M.length;R--;){var J=M[o?R:++O];if(h(I[J],J,I)===!1)break}return c}}function rne(o,c,h){var b=c&v,O=$s(o);function I(){var M=this&&this!==jt&&this instanceof I?O:o;return M.apply(b?h:this,arguments)}return I}function dE(o){return function(c){c=Je(c);var h=ka(c)?Wr(c):r,b=h?h[0]:c.charAt(0),O=h?ai(h,1).join(""):c.slice(1);return b[o]()+O}}function Ra(o){return function(c){return Fm(uO(cO(c).replace(Hee,"")),o,"")}}function $s(o){return function(){var c=arguments;switch(c.length){case 0:return new o;case 1:return new o(c[0]);case 2:return new o(c[0],c[1]);case 3:return new o(c[0],c[1],c[2]);case 4:return new o(c[0],c[1],c[2],c[3]);case 5:return new o(c[0],c[1],c[2],c[3],c[4]);case 6:return new o(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new o(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=qa(o.prototype),b=o.apply(h,c);return _t(b)?b:h}}function nne(o,c,h){var b=$s(o);function O(){for(var I=arguments.length,M=ne(I),R=I,J=za(O);R--;)M[R]=arguments[R];var le=I<3&&M[0]!==J&&M[I-1]!==J?[]:ei(M,J);if(I-=le.length,I<h)return yE(o,c,Iu,O.placeholder,r,M,le,r,r,h-I);var ce=this&&this!==jt&&this instanceof O?b:o;return lr(ce,this,M)}return O}function hE(o){return function(c,h,b){var O=tt(c);if(!ir(c)){var I=Ce(h,3);c=Nt(c),h=function(R){return I(O[R],R,O)}}var M=o(c,h,b);return M>-1?O[I?c[M]:M]:r}}function pE(o){return Nn(function(c){var h=c.length,b=h,O=Ar.prototype.thru;for(o&&c.reverse();b--;){var I=c[b];if(typeof I!="function")throw new Or(s);if(O&&!M&&Nu(I)=="wrapper")var M=new Ar([],!0)}for(b=M?b:h;++b<h;){I=c[b];var R=Nu(I),J=R=="wrapper"?hg(I):r;J&&yg(J[0])&&J[1]==(N|S|A|Y)&&!J[4].length&&J[9]==1?M=M[Nu(J[0])].apply(M,J[3]):M=I.length==1&&yg(I)?M[R]():M.thru(I)}return function(){var le=arguments,ce=le[0];if(M&&le.length==1&&Pe(ce))return M.plant(ce).value();for(var fe=0,ge=h?c[fe].apply(this,le):ce;++fe<h;)ge=c[fe].call(this,ge);return ge}})}function Iu(o,c,h,b,O,I,M,R,J,le){var ce=c&N,fe=c&v,ge=c&g,_e=c&(S|E),Ee=c&K,Fe=ge?r:$s(o);function Oe(){for(var je=arguments.length,qe=ne(je),dr=je;dr--;)qe[dr]=arguments[dr];if(_e)var Zt=za(Oe),hr=mte(qe,Zt);if(b&&(qe=lE(qe,b,O,_e)),I&&(qe=cE(qe,I,M,_e)),je-=hr,_e&&je<le){var Ct=ei(qe,Zt);return yE(o,c,Iu,Oe.placeholder,h,qe,Ct,R,J,le-je)}var Rr=fe?h:this,jn=ge?Rr[o]:o;return je=qe.length,R?qe=Sne(qe,R):Ee&&je>1&&qe.reverse(),ce&&J<je&&(qe.length=J),this&&this!==jt&&this instanceof Oe&&(jn=Fe||$s(jn)),jn.apply(Rr,qe)}return Oe}function mE(o,c){return function(h,b){return xre(h,o,c(b),{})}}function xu(o,c){return function(h,b){var O;if(h===r&&b===r)return c;if(h!==r&&(O=h),b!==r){if(O===r)return b;typeof h=="string"||typeof b=="string"?(h=ur(h),b=ur(b)):(h=eE(h),b=eE(b)),O=o(h,b)}return O}}function cg(o){return Nn(function(c){return c=gt(c,cr(Ce())),Ne(function(h){var b=this;return o(c,function(O){return lr(O,b,h)})})})}function Du(o,c){c=c===r?" ":ur(c);var h=c.length;if(h<2)return h?rg(c,o):c;var b=rg(c,vu(o/La(c)));return ka(c)?ai(Wr(b),0,o).join(""):b.slice(0,o)}function ine(o,c,h,b){var O=c&v,I=$s(o);function M(){for(var R=-1,J=arguments.length,le=-1,ce=b.length,fe=ne(ce+J),ge=this&&this!==jt&&this instanceof M?I:o;++le<ce;)fe[le]=b[le];for(;J--;)fe[le++]=arguments[++R];return lr(ge,O?h:this,fe)}return M}function gE(o){return function(c,h,b){return b&&typeof b!="number"&&Xt(c,h,b)&&(h=b=r),c=Ln(c),h===r?(h=c,c=0):h=Ln(h),b=b===r?c<h?1:-1:Ln(b),Vre(c,h,b,o)}}function Fu(o){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=xr(c),h=xr(h)),o(c,h)}}function yE(o,c,h,b,O,I,M,R,J,le){var ce=c&S,fe=ce?M:r,ge=ce?r:M,_e=ce?I:r,Ee=ce?r:I;c|=ce?A:x,c&=~(ce?x:A),c&C||(c&=-4);var Fe=[o,c,O,_e,fe,Ee,ge,R,J,le],Oe=h.apply(r,Fe);return yg(o)&&PE(Oe,Fe),Oe.placeholder=b,IE(Oe,o,c)}function ug(o){var c=xt[o];return function(h,b){if(h=xr(h),b=b==null?0:Rt(xe(b),292),b&&IC(h)){var O=(Je(h)+"e").split("e"),I=c(O[0]+"e"+(+O[1]+b));return O=(Je(I)+"e").split("e"),+(O[0]+"e"+(+O[1]-b))}return c(h)}}var ane=Ua&&1/lu(new Ua([,-0]))[1]==W?function(o){return new Ua(o)}:Dg;function vE(o){return function(c){var h=zt(c);return h==me?Um(c):h==Yt?wte(c):pte(c,o(c))}}function Fn(o,c,h,b,O,I,M,R){var J=c&g;if(!J&&typeof o!="function")throw new Or(s);var le=b?b.length:0;if(le||(c&=-97,b=O=r),M=M===r?M:Dt(xe(M),0),R=R===r?R:xe(R),le-=O?O.length:0,c&x){var ce=b,fe=O;b=O=r}var ge=J?r:hg(o),_e=[o,c,h,b,O,ce,fe,I,M,R];if(ge&&_ne(_e,ge),o=_e[0],c=_e[1],h=_e[2],b=_e[3],O=_e[4],R=_e[9]=_e[9]===r?J?0:o.length:Dt(_e[9]-le,0),!R&&c&(S|E)&&(c&=-25),!c||c==v)var Ee=rne(o,c,h);else c==S||c==E?Ee=nne(o,c,R):(c==A||c==(v|A))&&!O.length?Ee=ine(o,c,h,b):Ee=Iu.apply(r,_e);var Fe=ge?ZC:PE;return IE(Fe(Ee,_e),o,c)}function bE(o,c,h,b){return o===r||Vr(o,Ba[h])&&!Ze.call(b,h)?c:o}function _E(o,c,h,b,O,I){return _t(o)&&_t(c)&&(I.set(c,o),Ou(o,c,r,_E,I),I.delete(c)),o}function one(o){return Cs(o)?r:o}function $E(o,c,h,b,O,I){var M=h&_,R=o.length,J=c.length;if(R!=J&&!(M&&J>R))return!1;var le=I.get(o),ce=I.get(c);if(le&&ce)return le==c&&ce==o;var fe=-1,ge=!0,_e=h&w?new Li:r;for(I.set(o,c),I.set(c,o);++fe<R;){var Ee=o[fe],Fe=c[fe];if(b)var Oe=M?b(Fe,Ee,fe,c,o,I):b(Ee,Fe,fe,o,c,I);if(Oe!==r){if(Oe)continue;ge=!1;break}if(_e){if(!Nm(c,function(je,qe){if(!us(_e,qe)&&(Ee===je||O(Ee,je,h,b,I)))return _e.push(qe)})){ge=!1;break}}else if(!(Ee===Fe||O(Ee,Fe,h,b,I))){ge=!1;break}}return I.delete(o),I.delete(c),ge}function sne(o,c,h,b,O,I,M){switch(h){case Pn:if(o.byteLength!=c.byteLength||o.byteOffset!=c.byteOffset)return!1;o=o.buffer,c=c.buffer;case Tn:return!(o.byteLength!=c.byteLength||!I(new pu(o),new pu(c)));case oe:case ue:case It:return Vr(+o,+c);case be:return o.name==c.name&&o.message==c.message;case En:case On:return o==c+"";case me:var R=Um;case Yt:var J=b&_;if(R||(R=lu),o.size!=c.size&&!J)return!1;var le=M.get(o);if(le)return le==c;b|=w,M.set(o,c);var ce=$E(R(o),R(c),b,O,I,M);return M.delete(o),ce;case Xn:if(ms)return ms.call(o)==ms.call(c)}return!1}function lne(o,c,h,b,O,I){var M=h&_,R=fg(o),J=R.length,le=fg(c),ce=le.length;if(J!=ce&&!M)return!1;for(var fe=J;fe--;){var ge=R[fe];if(!(M?ge in c:Ze.call(c,ge)))return!1}var _e=I.get(o),Ee=I.get(c);if(_e&&Ee)return _e==c&&Ee==o;var Fe=!0;I.set(o,c),I.set(c,o);for(var Oe=M;++fe<J;){ge=R[fe];var je=o[ge],qe=c[ge];if(b)var dr=M?b(qe,je,ge,c,o,I):b(je,qe,ge,o,c,I);if(!(dr===r?je===qe||O(je,qe,h,b,I):dr)){Fe=!1;break}Oe||(Oe=ge=="constructor")}if(Fe&&!Oe){var Zt=o.constructor,hr=c.constructor;Zt!=hr&&"constructor"in o&&"constructor"in c&&!(typeof Zt=="function"&&Zt instanceof Zt&&typeof hr=="function"&&hr instanceof hr)&&(Fe=!1)}return I.delete(o),I.delete(c),Fe}function Nn(o){return bg(AE(o,r,kE),o+"")}function fg(o){return WC(o,Nt,mg)}function dg(o){return WC(o,ar,wE)}var hg=_u?function(o){return _u.get(o)}:Dg;function Nu(o){for(var c=o.name+"",h=Wa[c],b=Ze.call(Wa,c)?h.length:0;b--;){var O=h[b],I=O.func;if(I==null||I==o)return O.name}return c}function za(o){var c=Ze.call(P,"placeholder")?P:o;return c.placeholder}function Ce(){var o=P.iteratee||Ig;return o=o===Ig?RC:o,arguments.length?o(arguments[0],arguments[1]):o}function Mu(o,c){var h=o.__data__;return gne(c)?h[typeof c=="string"?"string":"hash"]:h.map}function pg(o){for(var c=Nt(o),h=c.length;h--;){var b=c[h],O=o[b];c[h]=[b,O,EE(O)]}return c}function Ui(o,c){var h=bte(o,c);return VC(h)?h:r}function cne(o){var c=Ze.call(o,Mi),h=o[Mi];try{o[Mi]=r;var b=!0}catch{}var O=du.call(o);return b&&(c?o[Mi]=h:delete o[Mi]),O}var mg=qm?function(o){return o==null?[]:(o=tt(o),Zn(qm(o),function(c){return TC.call(o,c)}))}:Fg,wE=qm?function(o){for(var c=[];o;)Qn(c,mg(o)),o=mu(o);return c}:Fg,zt=Jt;(Vm&&zt(new Vm(new ArrayBuffer(1)))!=Pn||ds&&zt(new ds)!=me||Rm&&zt(Rm.resolve())!=rr||Ua&&zt(new Ua)!=Yt||hs&&zt(new hs)!=An)&&(zt=function(o){var c=Jt(o),h=c==Et?o.constructor:r,b=h?Wi(h):"";if(b)switch(b){case zte:return Pn;case Hte:return me;case Kte:return rr;case Gte:return Yt;case Yte:return An}return c});function une(o,c,h){for(var b=-1,O=h.length;++b<O;){var I=h[b],M=I.size;switch(I.type){case"drop":o+=M;break;case"dropRight":c-=M;break;case"take":c=Rt(c,o+M);break;case"takeRight":o=Dt(o,c-M);break}}return{start:o,end:c}}function fne(o){var c=o.match(yee);return c?c[1].split(vee):[]}function SE(o,c,h){c=ii(c,o);for(var b=-1,O=c.length,I=!1;++b<O;){var M=dn(c[b]);if(!(I=o!=null&&h(o,M)))break;o=o[M]}return I||++b!=O?I:(O=o==null?0:o.length,!!O&&qu(O)&&Mn(M,O)&&(Pe(o)||qi(o)))}function dne(o){var c=o.length,h=new o.constructor(c);return c&&typeof o[0]=="string"&&Ze.call(o,"index")&&(h.index=o.index,h.input=o.input),h}function CE(o){return typeof o.constructor=="function"&&!ws(o)?qa(mu(o)):{}}function hne(o,c,h){var b=o.constructor;switch(c){case Tn:return lg(o);case oe:case ue:return new b(+o);case Pn:return Jre(o,h);case Fa:case cs:case gm:case ym:case vm:case bm:case _m:case $m:case wm:return oE(o,h);case me:return new b;case It:case On:return new b(o);case En:return Xre(o);case Yt:return new b;case Xn:return Zre(o)}}function pne(o,c){var h=c.length;if(!h)return o;var b=h-1;return c[b]=(h>1?"& ":"")+c[b],c=c.join(h>2?", ":" "),o.replace(gee,`{
90
90
  /* [wrapped with `+c+`] */
91
- `)}function dne(o){return Pe(o)||qi(o)||!!(PC&&o&&o[PC])}function Nn(o,c){var h=typeof o;return c=c??U,!!c&&(h=="number"||h!="symbol"&&Cee.test(o))&&o>-1&&o%1==0&&o<c}function Xt(o,c,h){if(!bt(h))return!1;var b=typeof c;return(b=="number"?nr(h)&&Nn(c,h.length):b=="string"&&c in h)?Vr(h[c],o):!1}function mg(o,c){if(Pe(o))return!1;var h=typeof o;return h=="number"||h=="symbol"||h=="boolean"||o==null||fr(o)?!0:cee.test(o)||!lee.test(o)||c!=null&&o in tt(c)}function hne(o){var c=typeof o;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?o!=="__proto__":o===null}function gg(o){var c=Nu(o),h=T[c];if(typeof h!="function"||!(c in Ue.prototype))return!1;if(o===h)return!0;var b=dg(h);return!!b&&o===b[0]}function pne(o){return!!EC&&EC in o}var mne=uu?Mn:Fg;function $s(o){var c=o&&o.constructor,h=typeof c=="function"&&c.prototype||Ba;return o===h}function EE(o){return o===o&&!bt(o)}function OE(o,c){return function(h){return h==null?!1:h[o]===c&&(c!==r||o in tt(h))}}function gne(o){var c=Uu(o,function(b){return h.size===f&&h.clear(),b}),h=c.cache;return c}function yne(o,c){var h=o[1],b=c[1],O=h|b,I=O<(v|g|N),M=b==N&&h==S||b==N&&h==Z&&o[7].length<=c[8]||b==(N|Z)&&c[7].length<=c[8]&&h==S;if(!(I||M))return o;b&v&&(o[2]=c[2],O|=h&v?0:C);var q=c[3];if(q){var Y=o[3];o[3]=Y?lE(Y,q,c[4]):q,o[4]=Y?ei(o[3],d):c[4]}return q=c[5],q&&(Y=o[5],o[5]=Y?cE(Y,q,c[6]):q,o[6]=Y?ei(o[5],d):c[6]),q=c[7],q&&(o[7]=q),b&N&&(o[8]=o[8]==null?c[8]:Rt(o[8],c[8])),o[9]==null&&(o[9]=c[9]),o[0]=c[0],o[1]=O,o}function vne(o){var c=[];if(o!=null)for(var h in tt(o))c.push(h);return c}function bne(o){return du.call(o)}function AE(o,c,h){return c=Dt(c===r?o.length-1:c,0),function(){for(var b=arguments,O=-1,I=Dt(b.length-c,0),M=ne(I);++O<I;)M[O]=b[c+O];O=-1;for(var q=ne(c+1);++O<c;)q[O]=b[O];return q[c]=h(M),lr(o,this,q)}}function TE(o,c){return c.length<2?o:Bi(o,Pr(c,0,-1))}function _ne(o,c){for(var h=o.length,b=Rt(c.length,h),O=rr(o);b--;){var I=c[b];o[b]=Nn(I,h)?O[I]:r}return o}function yg(o,c){if(!(c==="constructor"&&typeof o[c]=="function")&&c!="__proto__")return o[c]}var PE=xE(ZC),ws=Mte||function(o,c){return jt.setTimeout(o,c)},vg=xE(Vre);function IE(o,c,h){var b=c+"";return vg(o,fne(b,$ne(lne(b),h)))}function xE(o){var c=0,h=0;return function(){var b=Bte(),O=ae-(b-h);if(h=b,O>0){if(++c>=te)return arguments[0]}else c=0;return o.apply(r,arguments)}}function ku(o,c){var h=-1,b=o.length,O=b-1;for(c=c===r?b:c;++h<c;){var I=eg(h,O),M=o[I];o[I]=o[h],o[h]=M}return o.length=c,o}var DE=gne(function(o){var c=[];return o.charCodeAt(0)===46&&c.push(""),o.replace(uee,function(h,b,O,I){c.push(O?I.replace(vee,"$1"):b||h)}),c});function fn(o){if(typeof o=="string"||fr(o))return o;var c=o+"";return c=="0"&&1/o==-1/0?"-0":c}function Wi(o){if(o!=null){try{return fu.call(o)}catch{}try{return o+""}catch{}}return""}function $ne(o,c){return Er(P,function(h){var b="_."+h[0];c&h[1]&&!ou(o,b)&&o.push(b)}),o.sort()}function FE(o){if(o instanceof Ue)return o.clone();var c=new Ar(o.__wrapped__,o.__chain__);return c.__actions__=rr(o.__actions__),c.__index__=o.__index__,c.__values__=o.__values__,c}function wne(o,c,h){(h?Xt(o,c,h):c===r)?c=1:c=Dt(xe(c),0);var b=o==null?0:o.length;if(!b||c<1)return[];for(var O=0,I=0,M=ne(vu(b/c));O<b;)M[I++]=Pr(o,O,O+=c);return M}function Sne(o){for(var c=-1,h=o==null?0:o.length,b=0,O=[];++c<h;){var I=o[c];I&&(O[b++]=I)}return O}function Cne(){var o=arguments.length;if(!o)return[];for(var c=ne(o-1),h=arguments[0],b=o;b--;)c[b-1]=arguments[b];return Qn(Pe(h)?rr(h):[h],Bt(c,1))}var Ene=Ne(function(o,c){return St(o)?gs(o,Bt(c,1,St,!0)):[]}),One=Ne(function(o,c){var h=Ir(c);return St(h)&&(h=r),St(o)?gs(o,Bt(c,1,St,!0),Ce(h,2)):[]}),Ane=Ne(function(o,c){var h=Ir(c);return St(h)&&(h=r),St(o)?gs(o,Bt(c,1,St,!0),r,h):[]});function Tne(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),Pr(o,c<0?0:c,b)):[]}function Pne(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),c=b-c,Pr(o,0,c<0?0:c)):[]}function Ine(o,c){return o&&o.length?Tu(o,Ce(c,3),!0,!0):[]}function xne(o,c){return o&&o.length?Tu(o,Ce(c,3),!0):[]}function Dne(o,c,h,b){var O=o==null?0:o.length;return O?(h&&typeof h!="number"&&Xt(o,c,h)&&(h=0,b=O),Cre(o,c,h,b)):[]}function NE(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=h==null?0:xe(h);return O<0&&(O=Dt(b+O,0)),su(o,Ce(c,3),O)}function ME(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=b-1;return h!==r&&(O=xe(h),O=h<0?Dt(b+O,0):Rt(O,b-1)),su(o,Ce(c,3),O,!0)}function kE(o){var c=o==null?0:o.length;return c?Bt(o,1):[]}function Fne(o){var c=o==null?0:o.length;return c?Bt(o,R):[]}function Nne(o,c){var h=o==null?0:o.length;return h?(c=c===r?1:xe(c),Bt(o,c)):[]}function Mne(o){for(var c=-1,h=o==null?0:o.length,b={};++c<h;){var O=o[c];b[O[0]]=O[1]}return b}function LE(o){return o&&o.length?o[0]:r}function kne(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=h==null?0:xe(h);return O<0&&(O=Dt(b+O,0)),Ma(o,c,O)}function Lne(o){var c=o==null?0:o.length;return c?Pr(o,0,-1):[]}var jne=Ne(function(o){var c=mt(o,ag);return c.length&&c[0]===o[0]?Ym(c):[]}),Bne=Ne(function(o){var c=Ir(o),h=mt(o,ag);return c===Ir(h)?c=r:h.pop(),h.length&&h[0]===o[0]?Ym(h,Ce(c,2)):[]}),Une=Ne(function(o){var c=Ir(o),h=mt(o,ag);return c=typeof c=="function"?c:r,c&&h.pop(),h.length&&h[0]===o[0]?Ym(h,r,c):[]});function Wne(o,c){return o==null?"":Lte.call(o,c)}function Ir(o){var c=o==null?0:o.length;return c?o[c-1]:r}function qne(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=b;return h!==r&&(O=xe(h),O=O<0?Dt(b+O,0):Rt(O,b-1)),c===c?$te(o,c,O):su(o,yC,O,!0)}function Vne(o,c){return o&&o.length?GC(o,xe(c)):r}var Rne=Ne(jE);function jE(o,c){return o&&o.length&&c&&c.length?Qm(o,c):o}function zne(o,c,h){return o&&o.length&&c&&c.length?Qm(o,c,Ce(h,2)):o}function Hne(o,c,h){return o&&o.length&&c&&c.length?Qm(o,c,r,h):o}var Kne=Fn(function(o,c){var h=o==null?0:o.length,b=zm(o,c);return XC(o,mt(c,function(O){return Nn(O,h)?+O:O}).sort(sE)),b});function Gne(o,c){var h=[];if(!(o&&o.length))return h;var b=-1,O=[],I=o.length;for(c=Ce(c,3);++b<I;){var M=o[b];c(M,b,o)&&(h.push(M),O.push(b))}return XC(o,O),h}function bg(o){return o==null?o:Wte.call(o)}function Yne(o,c,h){var b=o==null?0:o.length;return b?(h&&typeof h!="number"&&Xt(o,c,h)?(c=0,h=b):(c=c==null?0:xe(c),h=h===r?b:xe(h)),Pr(o,c,h)):[]}function Jne(o,c){return Au(o,c)}function Xne(o,c,h){return rg(o,c,Ce(h,2))}function Zne(o,c){var h=o==null?0:o.length;if(h){var b=Au(o,c);if(b<h&&Vr(o[b],c))return b}return-1}function Qne(o,c){return Au(o,c,!0)}function eie(o,c,h){return rg(o,c,Ce(h,2),!0)}function tie(o,c){var h=o==null?0:o.length;if(h){var b=Au(o,c,!0)-1;if(Vr(o[b],c))return b}return-1}function rie(o){return o&&o.length?QC(o):[]}function nie(o,c){return o&&o.length?QC(o,Ce(c,2)):[]}function iie(o){var c=o==null?0:o.length;return c?Pr(o,1,c):[]}function aie(o,c,h){return o&&o.length?(c=h||c===r?1:xe(c),Pr(o,0,c<0?0:c)):[]}function oie(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),c=b-c,Pr(o,c<0?0:c,b)):[]}function sie(o,c){return o&&o.length?Tu(o,Ce(c,3),!1,!0):[]}function lie(o,c){return o&&o.length?Tu(o,Ce(c,3)):[]}var cie=Ne(function(o){return ni(Bt(o,1,St,!0))}),uie=Ne(function(o){var c=Ir(o);return St(c)&&(c=r),ni(Bt(o,1,St,!0),Ce(c,2))}),fie=Ne(function(o){var c=Ir(o);return c=typeof c=="function"?c:r,ni(Bt(o,1,St,!0),r,c)});function die(o){return o&&o.length?ni(o):[]}function hie(o,c){return o&&o.length?ni(o,Ce(c,2)):[]}function pie(o,c){return c=typeof c=="function"?c:r,o&&o.length?ni(o,r,c):[]}function _g(o){if(!(o&&o.length))return[];var c=0;return o=Zn(o,function(h){if(St(h))return c=Dt(h.length,c),!0}),Lm(c,function(h){return mt(o,Nm(h))})}function BE(o,c){if(!(o&&o.length))return[];var h=_g(o);return c==null?h:mt(h,function(b){return lr(c,r,b)})}var mie=Ne(function(o,c){return St(o)?gs(o,c):[]}),gie=Ne(function(o){return ig(Zn(o,St))}),yie=Ne(function(o){var c=Ir(o);return St(c)&&(c=r),ig(Zn(o,St),Ce(c,2))}),vie=Ne(function(o){var c=Ir(o);return c=typeof c=="function"?c:r,ig(Zn(o,St),r,c)}),bie=Ne(_g);function _ie(o,c){return nE(o||[],c||[],ms)}function $ie(o,c){return nE(o||[],c||[],bs)}var wie=Ne(function(o){var c=o.length,h=c>1?o[c-1]:r;return h=typeof h=="function"?(o.pop(),h):r,BE(o,h)});function UE(o){var c=T(o);return c.__chain__=!0,c}function Sie(o,c){return c(o),o}function Lu(o,c){return c(o)}var Cie=Fn(function(o){var c=o.length,h=c?o[0]:0,b=this.__wrapped__,O=function(I){return zm(I,o)};return c>1||this.__actions__.length||!(b instanceof Ue)||!Nn(h)?this.thru(O):(b=b.slice(h,+h+(c?1:0)),b.__actions__.push({func:Lu,args:[O],thisArg:r}),new Ar(b,this.__chain__).thru(function(I){return c&&!I.length&&I.push(r),I}))});function Eie(){return UE(this)}function Oie(){return new Ar(this.value(),this.__chain__)}function Aie(){this.__values__===r&&(this.__values__=eO(this.value()));var o=this.__index__>=this.__values__.length,c=o?r:this.__values__[this.__index__++];return{done:o,value:c}}function Tie(){return this}function Pie(o){for(var c,h=this;h instanceof wu;){var b=FE(h);b.__index__=0,b.__values__=r,c?O.__wrapped__=b:c=b;var O=b;h=h.__wrapped__}return O.__wrapped__=o,c}function Iie(){var o=this.__wrapped__;if(o instanceof Ue){var c=o;return this.__actions__.length&&(c=new Ue(this)),c=c.reverse(),c.__actions__.push({func:Lu,args:[bg],thisArg:r}),new Ar(c,this.__chain__)}return this.thru(bg)}function xie(){return rE(this.__wrapped__,this.__actions__)}var Die=Pu(function(o,c,h){Xe.call(o,h)?++o[h]:xn(o,h,1)});function Fie(o,c,h){var b=Pe(o)?mC:Sre;return h&&Xt(o,c,h)&&(c=r),b(o,Ce(c,3))}function Nie(o,c){var h=Pe(o)?Zn:BC;return h(o,Ce(c,3))}var Mie=hE(NE),kie=hE(ME);function Lie(o,c){return Bt(ju(o,c),1)}function jie(o,c){return Bt(ju(o,c),R)}function Bie(o,c,h){return h=h===r?1:xe(h),Bt(ju(o,c),h)}function WE(o,c){var h=Pe(o)?Er:ri;return h(o,Ce(c,3))}function qE(o,c){var h=Pe(o)?ite:jC;return h(o,Ce(c,3))}var Uie=Pu(function(o,c,h){Xe.call(o,h)?o[h].push(c):xn(o,h,[c])});function Wie(o,c,h,b){o=nr(o)?o:Ka(o),h=h&&!b?xe(h):0;var O=o.length;return h<0&&(h=Dt(O+h,0)),Vu(o)?h<=O&&o.indexOf(c,h)>-1:!!O&&Ma(o,c,h)>-1}var qie=Ne(function(o,c,h){var b=-1,O=typeof c=="function",I=nr(o)?ne(o.length):[];return ri(o,function(M){I[++b]=O?lr(c,M,h):ys(M,c,h)}),I}),Vie=Pu(function(o,c,h){xn(o,h,c)});function ju(o,c){var h=Pe(o)?mt:zC;return h(o,Ce(c,3))}function Rie(o,c,h,b){return o==null?[]:(Pe(c)||(c=c==null?[]:[c]),h=b?r:h,Pe(h)||(h=h==null?[]:[h]),YC(o,c,h))}var zie=Pu(function(o,c,h){o[h?0:1].push(c)},function(){return[[],[]]});function Hie(o,c,h){var b=Pe(o)?Dm:bC,O=arguments.length<3;return b(o,Ce(c,4),h,O,ri)}function Kie(o,c,h){var b=Pe(o)?ate:bC,O=arguments.length<3;return b(o,Ce(c,4),h,O,jC)}function Gie(o,c){var h=Pe(o)?Zn:BC;return h(o,Wu(Ce(c,3)))}function Yie(o){var c=Pe(o)?NC:Wre;return c(o)}function Jie(o,c,h){(h?Xt(o,c,h):c===r)?c=1:c=xe(c);var b=Pe(o)?vre:qre;return b(o,c)}function Xie(o){var c=Pe(o)?bre:Rre;return c(o)}function Zie(o){if(o==null)return 0;if(nr(o))return Vu(o)?La(o):o.length;var c=zt(o);return c==me||c==Yt?o.size:Xm(o).length}function Qie(o,c,h){var b=Pe(o)?Fm:zre;return h&&Xt(o,c,h)&&(c=r),b(o,Ce(c,3))}var eae=Ne(function(o,c){if(o==null)return[];var h=c.length;return h>1&&Xt(o,c[0],c[1])?c=[]:h>2&&Xt(c[0],c[1],c[2])&&(c=[c[0]]),YC(o,Bt(c,1),[])}),Bu=Nte||function(){return jt.Date.now()};function tae(o,c){if(typeof c!="function")throw new Or(s);return o=xe(o),function(){if(--o<1)return c.apply(this,arguments)}}function VE(o,c,h){return c=h?r:c,c=o&&c==null?o.length:c,Dn(o,N,r,r,r,r,c)}function RE(o,c){var h;if(typeof c!="function")throw new Or(s);return o=xe(o),function(){return--o>0&&(h=c.apply(this,arguments)),o<=1&&(c=r),h}}var $g=Ne(function(o,c,h){var b=v;if(h.length){var O=ei(h,za($g));b|=A}return Dn(o,b,c,h,O)}),zE=Ne(function(o,c,h){var b=v|g;if(h.length){var O=ei(h,za(zE));b|=A}return Dn(c,b,o,h,O)});function HE(o,c,h){c=h?r:c;var b=Dn(o,S,r,r,r,r,r,c);return b.placeholder=HE.placeholder,b}function KE(o,c,h){c=h?r:c;var b=Dn(o,E,r,r,r,r,r,c);return b.placeholder=KE.placeholder,b}function GE(o,c,h){var b,O,I,M,q,Y,le=0,ce=!1,fe=!1,ge=!0;if(typeof o!="function")throw new Or(s);c=xr(c)||0,bt(h)&&(ce=!!h.leading,fe="maxWait"in h,I=fe?Dt(xr(h.maxWait)||0,c):I,ge="trailing"in h?!!h.trailing:ge);function _e(Ct){var Rr=b,Ln=O;return b=O=r,le=Ct,M=o.apply(Ln,Rr),M}function Ee(Ct){return le=Ct,q=ws(je,c),ce?_e(Ct):M}function Fe(Ct){var Rr=Ct-Y,Ln=Ct-le,hO=c-Rr;return fe?Rt(hO,I-Ln):hO}function Oe(Ct){var Rr=Ct-Y,Ln=Ct-le;return Y===r||Rr>=c||Rr<0||fe&&Ln>=I}function je(){var Ct=Bu();if(Oe(Ct))return qe(Ct);q=ws(je,Fe(Ct))}function qe(Ct){return q=r,ge&&b?_e(Ct):(b=O=r,M)}function dr(){q!==r&&iE(q),le=0,b=Y=O=q=r}function Zt(){return q===r?M:qe(Bu())}function hr(){var Ct=Bu(),Rr=Oe(Ct);if(b=arguments,O=this,Y=Ct,Rr){if(q===r)return Ee(Y);if(fe)return iE(q),q=ws(je,c),_e(Y)}return q===r&&(q=ws(je,c)),M}return hr.cancel=dr,hr.flush=Zt,hr}var rae=Ne(function(o,c){return LC(o,1,c)}),nae=Ne(function(o,c,h){return LC(o,xr(c)||0,h)});function iae(o){return Dn(o,G)}function Uu(o,c){if(typeof o!="function"||c!=null&&typeof c!="function")throw new Or(s);var h=function(){var b=arguments,O=c?c.apply(this,b):b[0],I=h.cache;if(I.has(O))return I.get(O);var M=o.apply(this,b);return h.cache=I.set(O,M)||I,M};return h.cache=new(Uu.Cache||In),h}Uu.Cache=In;function Wu(o){if(typeof o!="function")throw new Or(s);return function(){var c=arguments;switch(c.length){case 0:return!o.call(this);case 1:return!o.call(this,c[0]);case 2:return!o.call(this,c[0],c[1]);case 3:return!o.call(this,c[0],c[1],c[2])}return!o.apply(this,c)}}function aae(o){return RE(2,o)}var oae=Hre(function(o,c){c=c.length==1&&Pe(c[0])?mt(c[0],cr(Ce())):mt(Bt(c,1),cr(Ce()));var h=c.length;return Ne(function(b){for(var O=-1,I=Rt(b.length,h);++O<I;)b[O]=c[O].call(this,b[O]);return lr(o,this,b)})}),wg=Ne(function(o,c){var h=ei(c,za(wg));return Dn(o,A,r,c,h)}),YE=Ne(function(o,c){var h=ei(c,za(YE));return Dn(o,x,r,c,h)}),sae=Fn(function(o,c){return Dn(o,Z,r,r,r,c)});function lae(o,c){if(typeof o!="function")throw new Or(s);return c=c===r?c:xe(c),Ne(o,c)}function cae(o,c){if(typeof o!="function")throw new Or(s);return c=c==null?0:Dt(xe(c),0),Ne(function(h){var b=h[c],O=ai(h,0,c);return b&&Qn(O,b),lr(o,this,O)})}function uae(o,c,h){var b=!0,O=!0;if(typeof o!="function")throw new Or(s);return bt(h)&&(b="leading"in h?!!h.leading:b,O="trailing"in h?!!h.trailing:O),GE(o,c,{leading:b,maxWait:c,trailing:O})}function fae(o){return VE(o,1)}function dae(o,c){return wg(og(c),o)}function hae(){if(!arguments.length)return[];var o=arguments[0];return Pe(o)?o:[o]}function pae(o){return Tr(o,y)}function mae(o,c){return c=typeof c=="function"?c:r,Tr(o,y,c)}function gae(o){return Tr(o,p|y)}function yae(o,c){return c=typeof c=="function"?c:r,Tr(o,p|y,c)}function vae(o,c){return c==null||kC(o,c,Nt(c))}function Vr(o,c){return o===c||o!==o&&c!==c}var bae=Fu(Gm),_ae=Fu(function(o,c){return o>=c}),qi=qC(function(){return arguments}())?qC:function(o){return _t(o)&&Xe.call(o,"callee")&&!TC.call(o,"callee")},Pe=ne.isArray,$ae=cC?cr(cC):Pre;function nr(o){return o!=null&&qu(o.length)&&!Mn(o)}function St(o){return _t(o)&&nr(o)}function wae(o){return o===!0||o===!1||_t(o)&&Jt(o)==oe}var oi=kte||Fg,Sae=uC?cr(uC):Ire;function Cae(o){return _t(o)&&o.nodeType===1&&!Ss(o)}function Eae(o){if(o==null)return!0;if(nr(o)&&(Pe(o)||typeof o=="string"||typeof o.splice=="function"||oi(o)||Ha(o)||qi(o)))return!o.length;var c=zt(o);if(c==me||c==Yt)return!o.size;if($s(o))return!Xm(o).length;for(var h in o)if(Xe.call(o,h))return!1;return!0}function Oae(o,c){return vs(o,c)}function Aae(o,c,h){h=typeof h=="function"?h:r;var b=h?h(o,c):r;return b===r?vs(o,c,r,h):!!b}function Sg(o){if(!_t(o))return!1;var c=Jt(o);return c==be||c==he||typeof o.message=="string"&&typeof o.name=="string"&&!Ss(o)}function Tae(o){return typeof o=="number"&&IC(o)}function Mn(o){if(!bt(o))return!1;var c=Jt(o);return c==Le||c==ut||c==X||c==os}function JE(o){return typeof o=="number"&&o==xe(o)}function qu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function bt(o){var c=typeof o;return o!=null&&(c=="object"||c=="function")}function _t(o){return o!=null&&typeof o=="object"}var XE=fC?cr(fC):Dre;function Pae(o,c){return o===c||Jm(o,c,hg(c))}function Iae(o,c,h){return h=typeof h=="function"?h:r,Jm(o,c,hg(c),h)}function xae(o){return ZE(o)&&o!=+o}function Dae(o){if(mne(o))throw new Te(a);return VC(o)}function Fae(o){return o===null}function Nae(o){return o==null}function ZE(o){return typeof o=="number"||_t(o)&&Jt(o)==Pt}function Ss(o){if(!_t(o)||Jt(o)!=It)return!1;var c=mu(o);if(c===null)return!0;var h=Xe.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&fu.call(h)==Ite}var Cg=dC?cr(dC):Fre;function Mae(o){return JE(o)&&o>=-9007199254740991&&o<=U}var QE=hC?cr(hC):Nre;function Vu(o){return typeof o=="string"||!Pe(o)&&_t(o)&&Jt(o)==En}function fr(o){return typeof o=="symbol"||_t(o)&&Jt(o)==Xn}var Ha=pC?cr(pC):Mre;function kae(o){return o===r}function Lae(o){return _t(o)&&zt(o)==On}function jae(o){return _t(o)&&Jt(o)==Fi}var Bae=Fu(Zm),Uae=Fu(function(o,c){return o<=c});function eO(o){if(!o)return[];if(nr(o))return Vu(o)?Wr(o):rr(o);if(us&&o[us])return vte(o[us]());var c=zt(o),h=c==me?Bm:c==Yt?lu:Ka;return h(o)}function kn(o){if(!o)return o===0?o:0;if(o=xr(o),o===R||o===-1/0){var c=o<0?-1:1;return c*J}return o===o?o:0}function xe(o){var c=kn(o),h=c%1;return c===c?h?c-h:c:0}function tO(o){return o?ji(xe(o),0,D):0}function xr(o){if(typeof o=="number")return o;if(fr(o))return L;if(bt(o)){var c=typeof o.valueOf=="function"?o.valueOf():o;o=bt(c)?c+"":c}if(typeof o!="string")return o===0?o:+o;o=_C(o);var h=$ee.test(o);return h||See.test(o)?tte(o.slice(2),h?2:8):_ee.test(o)?L:+o}function rO(o){return un(o,ir(o))}function Wae(o){return o?ji(xe(o),-9007199254740991,U):o===0?o:0}function Je(o){return o==null?"":ur(o)}var qae=Va(function(o,c){if($s(c)||nr(c)){un(c,Nt(c),o);return}for(var h in c)Xe.call(c,h)&&ms(o,h,c[h])}),nO=Va(function(o,c){un(c,ir(c),o)}),Ru=Va(function(o,c,h,b){un(c,ir(c),o,b)}),Vae=Va(function(o,c,h,b){un(c,Nt(c),o,b)}),Rae=Fn(zm);function zae(o,c){var h=qa(o);return c==null?h:MC(h,c)}var Hae=Ne(function(o,c){o=tt(o);var h=-1,b=c.length,O=b>2?c[2]:r;for(O&&Xt(c[0],c[1],O)&&(b=1);++h<b;)for(var I=c[h],M=ir(I),q=-1,Y=M.length;++q<Y;){var le=M[q],ce=o[le];(ce===r||Vr(ce,Ba[le])&&!Xe.call(o,le))&&(o[le]=I[le])}return o}),Kae=Ne(function(o){return o.push(r,_E),lr(iO,r,o)});function Gae(o,c){return gC(o,Ce(c,3),cn)}function Yae(o,c){return gC(o,Ce(c,3),Km)}function Jae(o,c){return o==null?o:Hm(o,Ce(c,3),ir)}function Xae(o,c){return o==null?o:UC(o,Ce(c,3),ir)}function Zae(o,c){return o&&cn(o,Ce(c,3))}function Qae(o,c){return o&&Km(o,Ce(c,3))}function eoe(o){return o==null?[]:Eu(o,Nt(o))}function toe(o){return o==null?[]:Eu(o,ir(o))}function Eg(o,c,h){var b=o==null?r:Bi(o,c);return b===r?h:b}function roe(o,c){return o!=null&&SE(o,c,Ere)}function Og(o,c){return o!=null&&SE(o,c,Ore)}var noe=mE(function(o,c,h){c!=null&&typeof c.toString!="function"&&(c=du.call(c)),o[c]=h},Tg(ar)),ioe=mE(function(o,c,h){c!=null&&typeof c.toString!="function"&&(c=du.call(c)),Xe.call(o,c)?o[c].push(h):o[c]=[h]},Ce),aoe=Ne(ys);function Nt(o){return nr(o)?FC(o):Xm(o)}function ir(o){return nr(o)?FC(o,!0):kre(o)}function ooe(o,c){var h={};return c=Ce(c,3),cn(o,function(b,O,I){xn(h,c(b,O,I),b)}),h}function soe(o,c){var h={};return c=Ce(c,3),cn(o,function(b,O,I){xn(h,O,c(b,O,I))}),h}var loe=Va(function(o,c,h){Ou(o,c,h)}),iO=Va(function(o,c,h,b){Ou(o,c,h,b)}),coe=Fn(function(o,c){var h={};if(o==null)return h;var b=!1;c=mt(c,function(I){return I=ii(I,o),b||(b=I.length>1),I}),un(o,fg(o),h),b&&(h=Tr(h,p|m|y,nne));for(var O=c.length;O--;)ng(h,c[O]);return h});function uoe(o,c){return aO(o,Wu(Ce(c)))}var foe=Fn(function(o,c){return o==null?{}:jre(o,c)});function aO(o,c){if(o==null)return{};var h=mt(fg(o),function(b){return[b]});return c=Ce(c),JC(o,h,function(b,O){return c(b,O[0])})}function doe(o,c,h){c=ii(c,o);var b=-1,O=c.length;for(O||(O=1,o=r);++b<O;){var I=o==null?r:o[fn(c[b])];I===r&&(b=O,I=h),o=Mn(I)?I.call(o):I}return o}function hoe(o,c,h){return o==null?o:bs(o,c,h)}function poe(o,c,h,b){return b=typeof b=="function"?b:r,o==null?o:bs(o,c,h,b)}var oO=vE(Nt),sO=vE(ir);function moe(o,c,h){var b=Pe(o),O=b||oi(o)||Ha(o);if(c=Ce(c,4),h==null){var I=o&&o.constructor;O?h=b?new I:[]:bt(o)?h=Mn(I)?qa(mu(o)):{}:h={}}return(O?Er:cn)(o,function(M,q,Y){return c(h,M,q,Y)}),h}function goe(o,c){return o==null?!0:ng(o,c)}function yoe(o,c,h){return o==null?o:tE(o,c,og(h))}function voe(o,c,h,b){return b=typeof b=="function"?b:r,o==null?o:tE(o,c,og(h),b)}function Ka(o){return o==null?[]:jm(o,Nt(o))}function boe(o){return o==null?[]:jm(o,ir(o))}function _oe(o,c,h){return h===r&&(h=c,c=r),h!==r&&(h=xr(h),h=h===h?h:0),c!==r&&(c=xr(c),c=c===c?c:0),ji(xr(o),c,h)}function $oe(o,c,h){return c=kn(c),h===r?(h=c,c=0):h=kn(h),o=xr(o),Are(o,c,h)}function woe(o,c,h){if(h&&typeof h!="boolean"&&Xt(o,c,h)&&(c=h=r),h===r&&(typeof c=="boolean"?(h=c,c=r):typeof o=="boolean"&&(h=o,o=r)),o===r&&c===r?(o=0,c=1):(o=kn(o),c===r?(c=o,o=0):c=kn(c)),o>c){var b=o;o=c,c=b}if(h||o%1||c%1){var O=xC();return Rt(o+O*(c-o+ete("1e-"+((O+"").length-1))),c)}return eg(o,c)}var Soe=Ra(function(o,c,h){return c=c.toLowerCase(),o+(h?lO(c):c)});function lO(o){return Ag(Je(o).toLowerCase())}function cO(o){return o=Je(o),o&&o.replace(Eee,hte).replace(Ree,"")}function Coe(o,c,h){o=Je(o),c=ur(c);var b=o.length;h=h===r?b:ji(xe(h),0,b);var O=h;return h-=c.length,h>=0&&o.slice(h,O)==c}function Eoe(o){return o=Je(o),o&&aee.test(o)?o.replace(US,pte):o}function Ooe(o){return o=Je(o),o&&fee.test(o)?o.replace(wm,"\\$&"):o}var Aoe=Ra(function(o,c,h){return o+(h?"-":"")+c.toLowerCase()}),Toe=Ra(function(o,c,h){return o+(h?" ":"")+c.toLowerCase()}),Poe=dE("toLowerCase");function Ioe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;if(!c||b>=c)return o;var O=(c-b)/2;return Du(bu(O),h)+o+Du(vu(O),h)}function xoe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;return c&&b<c?o+Du(c-b,h):o}function Doe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;return c&&b<c?Du(c-b,h)+o:o}function Foe(o,c,h){return h||c==null?c=0:c&&(c=+c),Ute(Je(o).replace(Sm,""),c||0)}function Noe(o,c,h){return(h?Xt(o,c,h):c===r)?c=1:c=xe(c),tg(Je(o),c)}function Moe(){var o=arguments,c=Je(o[0]);return o.length<3?c:c.replace(o[1],o[2])}var koe=Ra(function(o,c,h){return o+(h?"_":"")+c.toLowerCase()});function Loe(o,c,h){return h&&typeof h!="number"&&Xt(o,c,h)&&(c=h=r),h=h===r?D:h>>>0,h?(o=Je(o),o&&(typeof c=="string"||c!=null&&!Cg(c))&&(c=ur(c),!c&&ka(o))?ai(Wr(o),0,h):o.split(c,h)):[]}var joe=Ra(function(o,c,h){return o+(h?" ":"")+Ag(c)});function Boe(o,c,h){return o=Je(o),h=h==null?0:ji(xe(h),0,o.length),c=ur(c),o.slice(h,h+c.length)==c}function Uoe(o,c,h){var b=T.templateSettings;h&&Xt(o,c,h)&&(c=r),o=Je(o),c=Ru({},c,b,bE);var O=Ru({},c.imports,b.imports,bE),I=Nt(O),M=jm(O,I),q,Y,le=0,ce=c.interpolate||nu,fe="__p += '",ge=Um((c.escape||nu).source+"|"+ce.source+"|"+(ce===WS?bee:nu).source+"|"+(c.evaluate||nu).source+"|$","g"),_e="//# sourceURL="+(Xe.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yee+"]")+`
92
- `;o.replace(ge,function(Oe,je,qe,dr,Zt,hr){return qe||(qe=dr),fe+=o.slice(le,hr).replace(Oee,mte),je&&(q=!0,fe+=`' +
91
+ `)}function mne(o){return Pe(o)||qi(o)||!!(PC&&o&&o[PC])}function Mn(o,c){var h=typeof o;return c=c??L,!!c&&(h=="number"||h!="symbol"&&Aee.test(o))&&o>-1&&o%1==0&&o<c}function Xt(o,c,h){if(!_t(h))return!1;var b=typeof c;return(b=="number"?ir(h)&&Mn(c,h.length):b=="string"&&c in h)?Vr(h[c],o):!1}function gg(o,c){if(Pe(o))return!1;var h=typeof o;return h=="number"||h=="symbol"||h=="boolean"||o==null||fr(o)?!0:dee.test(o)||!fee.test(o)||c!=null&&o in tt(c)}function gne(o){var c=typeof o;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?o!=="__proto__":o===null}function yg(o){var c=Nu(o),h=P[c];if(typeof h!="function"||!(c in We.prototype))return!1;if(o===h)return!0;var b=hg(h);return!!b&&o===b[0]}function yne(o){return!!EC&&EC in o}var vne=uu?kn:Ng;function ws(o){var c=o&&o.constructor,h=typeof c=="function"&&c.prototype||Ba;return o===h}function EE(o){return o===o&&!_t(o)}function OE(o,c){return function(h){return h==null?!1:h[o]===c&&(c!==r||o in tt(h))}}function bne(o){var c=Uu(o,function(b){return h.size===f&&h.clear(),b}),h=c.cache;return c}function _ne(o,c){var h=o[1],b=c[1],O=h|b,I=O<(v|g|N),M=b==N&&h==S||b==N&&h==Y&&o[7].length<=c[8]||b==(N|Y)&&c[7].length<=c[8]&&h==S;if(!(I||M))return o;b&v&&(o[2]=c[2],O|=h&v?0:C);var R=c[3];if(R){var J=o[3];o[3]=J?lE(J,R,c[4]):R,o[4]=J?ei(o[3],d):c[4]}return R=c[5],R&&(J=o[5],o[5]=J?cE(J,R,c[6]):R,o[6]=J?ei(o[5],d):c[6]),R=c[7],R&&(o[7]=R),b&N&&(o[8]=o[8]==null?c[8]:Rt(o[8],c[8])),o[9]==null&&(o[9]=c[9]),o[0]=c[0],o[1]=O,o}function $ne(o){var c=[];if(o!=null)for(var h in tt(o))c.push(h);return c}function wne(o){return du.call(o)}function AE(o,c,h){return c=Dt(c===r?o.length-1:c,0),function(){for(var b=arguments,O=-1,I=Dt(b.length-c,0),M=ne(I);++O<I;)M[O]=b[c+O];O=-1;for(var R=ne(c+1);++O<c;)R[O]=b[O];return R[c]=h(M),lr(o,this,R)}}function TE(o,c){return c.length<2?o:Bi(o,Pr(c,0,-1))}function Sne(o,c){for(var h=o.length,b=Rt(c.length,h),O=nr(o);b--;){var I=c[b];o[b]=Mn(I,h)?O[I]:r}return o}function vg(o,c){if(!(c==="constructor"&&typeof o[c]=="function")&&c!="__proto__")return o[c]}var PE=xE(ZC),Ss=jte||function(o,c){return jt.setTimeout(o,c)},bg=xE(Hre);function IE(o,c,h){var b=c+"";return bg(o,pne(b,Cne(fne(b),h)))}function xE(o){var c=0,h=0;return function(){var b=qte(),O=ae-(b-h);if(h=b,O>0){if(++c>=ee)return arguments[0]}else c=0;return o.apply(r,arguments)}}function ku(o,c){var h=-1,b=o.length,O=b-1;for(c=c===r?b:c;++h<c;){var I=tg(h,O),M=o[I];o[I]=o[h],o[h]=M}return o.length=c,o}var DE=bne(function(o){var c=[];return o.charCodeAt(0)===46&&c.push(""),o.replace(hee,function(h,b,O,I){c.push(O?I.replace($ee,"$1"):b||h)}),c});function dn(o){if(typeof o=="string"||fr(o))return o;var c=o+"";return c=="0"&&1/o==-1/0?"-0":c}function Wi(o){if(o!=null){try{return fu.call(o)}catch{}try{return o+""}catch{}}return""}function Cne(o,c){return Er(T,function(h){var b="_."+h[0];c&h[1]&&!ou(o,b)&&o.push(b)}),o.sort()}function FE(o){if(o instanceof We)return o.clone();var c=new Ar(o.__wrapped__,o.__chain__);return c.__actions__=nr(o.__actions__),c.__index__=o.__index__,c.__values__=o.__values__,c}function Ene(o,c,h){(h?Xt(o,c,h):c===r)?c=1:c=Dt(xe(c),0);var b=o==null?0:o.length;if(!b||c<1)return[];for(var O=0,I=0,M=ne(vu(b/c));O<b;)M[I++]=Pr(o,O,O+=c);return M}function One(o){for(var c=-1,h=o==null?0:o.length,b=0,O=[];++c<h;){var I=o[c];I&&(O[b++]=I)}return O}function Ane(){var o=arguments.length;if(!o)return[];for(var c=ne(o-1),h=arguments[0],b=o;b--;)c[b-1]=arguments[b];return Qn(Pe(h)?nr(h):[h],Bt(c,1))}var Tne=Ne(function(o,c){return St(o)?ys(o,Bt(c,1,St,!0)):[]}),Pne=Ne(function(o,c){var h=Ir(c);return St(h)&&(h=r),St(o)?ys(o,Bt(c,1,St,!0),Ce(h,2)):[]}),Ine=Ne(function(o,c){var h=Ir(c);return St(h)&&(h=r),St(o)?ys(o,Bt(c,1,St,!0),r,h):[]});function xne(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),Pr(o,c<0?0:c,b)):[]}function Dne(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),c=b-c,Pr(o,0,c<0?0:c)):[]}function Fne(o,c){return o&&o.length?Tu(o,Ce(c,3),!0,!0):[]}function Nne(o,c){return o&&o.length?Tu(o,Ce(c,3),!0):[]}function Mne(o,c,h,b){var O=o==null?0:o.length;return O?(h&&typeof h!="number"&&Xt(o,c,h)&&(h=0,b=O),Are(o,c,h,b)):[]}function NE(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=h==null?0:xe(h);return O<0&&(O=Dt(b+O,0)),su(o,Ce(c,3),O)}function ME(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=b-1;return h!==r&&(O=xe(h),O=h<0?Dt(b+O,0):Rt(O,b-1)),su(o,Ce(c,3),O,!0)}function kE(o){var c=o==null?0:o.length;return c?Bt(o,1):[]}function kne(o){var c=o==null?0:o.length;return c?Bt(o,W):[]}function Lne(o,c){var h=o==null?0:o.length;return h?(c=c===r?1:xe(c),Bt(o,c)):[]}function jne(o){for(var c=-1,h=o==null?0:o.length,b={};++c<h;){var O=o[c];b[O[0]]=O[1]}return b}function LE(o){return o&&o.length?o[0]:r}function Bne(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=h==null?0:xe(h);return O<0&&(O=Dt(b+O,0)),Ma(o,c,O)}function Une(o){var c=o==null?0:o.length;return c?Pr(o,0,-1):[]}var Wne=Ne(function(o){var c=gt(o,og);return c.length&&c[0]===o[0]?Jm(c):[]}),qne=Ne(function(o){var c=Ir(o),h=gt(o,og);return c===Ir(h)?c=r:h.pop(),h.length&&h[0]===o[0]?Jm(h,Ce(c,2)):[]}),Vne=Ne(function(o){var c=Ir(o),h=gt(o,og);return c=typeof c=="function"?c:r,c&&h.pop(),h.length&&h[0]===o[0]?Jm(h,r,c):[]});function Rne(o,c){return o==null?"":Ute.call(o,c)}function Ir(o){var c=o==null?0:o.length;return c?o[c-1]:r}function zne(o,c,h){var b=o==null?0:o.length;if(!b)return-1;var O=b;return h!==r&&(O=xe(h),O=O<0?Dt(b+O,0):Rt(O,b-1)),c===c?Cte(o,c,O):su(o,yC,O,!0)}function Hne(o,c){return o&&o.length?GC(o,xe(c)):r}var Kne=Ne(jE);function jE(o,c){return o&&o.length&&c&&c.length?eg(o,c):o}function Gne(o,c,h){return o&&o.length&&c&&c.length?eg(o,c,Ce(h,2)):o}function Yne(o,c,h){return o&&o.length&&c&&c.length?eg(o,c,r,h):o}var Jne=Nn(function(o,c){var h=o==null?0:o.length,b=Hm(o,c);return XC(o,gt(c,function(O){return Mn(O,h)?+O:O}).sort(sE)),b});function Xne(o,c){var h=[];if(!(o&&o.length))return h;var b=-1,O=[],I=o.length;for(c=Ce(c,3);++b<I;){var M=o[b];c(M,b,o)&&(h.push(M),O.push(b))}return XC(o,O),h}function _g(o){return o==null?o:Rte.call(o)}function Zne(o,c,h){var b=o==null?0:o.length;return b?(h&&typeof h!="number"&&Xt(o,c,h)?(c=0,h=b):(c=c==null?0:xe(c),h=h===r?b:xe(h)),Pr(o,c,h)):[]}function Qne(o,c){return Au(o,c)}function eie(o,c,h){return ng(o,c,Ce(h,2))}function tie(o,c){var h=o==null?0:o.length;if(h){var b=Au(o,c);if(b<h&&Vr(o[b],c))return b}return-1}function rie(o,c){return Au(o,c,!0)}function nie(o,c,h){return ng(o,c,Ce(h,2),!0)}function iie(o,c){var h=o==null?0:o.length;if(h){var b=Au(o,c,!0)-1;if(Vr(o[b],c))return b}return-1}function aie(o){return o&&o.length?QC(o):[]}function oie(o,c){return o&&o.length?QC(o,Ce(c,2)):[]}function sie(o){var c=o==null?0:o.length;return c?Pr(o,1,c):[]}function lie(o,c,h){return o&&o.length?(c=h||c===r?1:xe(c),Pr(o,0,c<0?0:c)):[]}function cie(o,c,h){var b=o==null?0:o.length;return b?(c=h||c===r?1:xe(c),c=b-c,Pr(o,c<0?0:c,b)):[]}function uie(o,c){return o&&o.length?Tu(o,Ce(c,3),!1,!0):[]}function fie(o,c){return o&&o.length?Tu(o,Ce(c,3)):[]}var die=Ne(function(o){return ni(Bt(o,1,St,!0))}),hie=Ne(function(o){var c=Ir(o);return St(c)&&(c=r),ni(Bt(o,1,St,!0),Ce(c,2))}),pie=Ne(function(o){var c=Ir(o);return c=typeof c=="function"?c:r,ni(Bt(o,1,St,!0),r,c)});function mie(o){return o&&o.length?ni(o):[]}function gie(o,c){return o&&o.length?ni(o,Ce(c,2)):[]}function yie(o,c){return c=typeof c=="function"?c:r,o&&o.length?ni(o,r,c):[]}function $g(o){if(!(o&&o.length))return[];var c=0;return o=Zn(o,function(h){if(St(h))return c=Dt(h.length,c),!0}),jm(c,function(h){return gt(o,Mm(h))})}function BE(o,c){if(!(o&&o.length))return[];var h=$g(o);return c==null?h:gt(h,function(b){return lr(c,r,b)})}var vie=Ne(function(o,c){return St(o)?ys(o,c):[]}),bie=Ne(function(o){return ag(Zn(o,St))}),_ie=Ne(function(o){var c=Ir(o);return St(c)&&(c=r),ag(Zn(o,St),Ce(c,2))}),$ie=Ne(function(o){var c=Ir(o);return c=typeof c=="function"?c:r,ag(Zn(o,St),r,c)}),wie=Ne($g);function Sie(o,c){return nE(o||[],c||[],gs)}function Cie(o,c){return nE(o||[],c||[],_s)}var Eie=Ne(function(o){var c=o.length,h=c>1?o[c-1]:r;return h=typeof h=="function"?(o.pop(),h):r,BE(o,h)});function UE(o){var c=P(o);return c.__chain__=!0,c}function Oie(o,c){return c(o),o}function Lu(o,c){return c(o)}var Aie=Nn(function(o){var c=o.length,h=c?o[0]:0,b=this.__wrapped__,O=function(I){return Hm(I,o)};return c>1||this.__actions__.length||!(b instanceof We)||!Mn(h)?this.thru(O):(b=b.slice(h,+h+(c?1:0)),b.__actions__.push({func:Lu,args:[O],thisArg:r}),new Ar(b,this.__chain__).thru(function(I){return c&&!I.length&&I.push(r),I}))});function Tie(){return UE(this)}function Pie(){return new Ar(this.value(),this.__chain__)}function Iie(){this.__values__===r&&(this.__values__=eO(this.value()));var o=this.__index__>=this.__values__.length,c=o?r:this.__values__[this.__index__++];return{done:o,value:c}}function xie(){return this}function Die(o){for(var c,h=this;h instanceof wu;){var b=FE(h);b.__index__=0,b.__values__=r,c?O.__wrapped__=b:c=b;var O=b;h=h.__wrapped__}return O.__wrapped__=o,c}function Fie(){var o=this.__wrapped__;if(o instanceof We){var c=o;return this.__actions__.length&&(c=new We(this)),c=c.reverse(),c.__actions__.push({func:Lu,args:[_g],thisArg:r}),new Ar(c,this.__chain__)}return this.thru(_g)}function Nie(){return rE(this.__wrapped__,this.__actions__)}var Mie=Pu(function(o,c,h){Ze.call(o,h)?++o[h]:Dn(o,h,1)});function kie(o,c,h){var b=Pe(o)?mC:Ore;return h&&Xt(o,c,h)&&(c=r),b(o,Ce(c,3))}function Lie(o,c){var h=Pe(o)?Zn:BC;return h(o,Ce(c,3))}var jie=hE(NE),Bie=hE(ME);function Uie(o,c){return Bt(ju(o,c),1)}function Wie(o,c){return Bt(ju(o,c),W)}function qie(o,c,h){return h=h===r?1:xe(h),Bt(ju(o,c),h)}function WE(o,c){var h=Pe(o)?Er:ri;return h(o,Ce(c,3))}function qE(o,c){var h=Pe(o)?ste:jC;return h(o,Ce(c,3))}var Vie=Pu(function(o,c,h){Ze.call(o,h)?o[h].push(c):Dn(o,h,[c])});function Rie(o,c,h,b){o=ir(o)?o:Ka(o),h=h&&!b?xe(h):0;var O=o.length;return h<0&&(h=Dt(O+h,0)),Vu(o)?h<=O&&o.indexOf(c,h)>-1:!!O&&Ma(o,c,h)>-1}var zie=Ne(function(o,c,h){var b=-1,O=typeof c=="function",I=ir(o)?ne(o.length):[];return ri(o,function(M){I[++b]=O?lr(c,M,h):vs(M,c,h)}),I}),Hie=Pu(function(o,c,h){Dn(o,h,c)});function ju(o,c){var h=Pe(o)?gt:zC;return h(o,Ce(c,3))}function Kie(o,c,h,b){return o==null?[]:(Pe(c)||(c=c==null?[]:[c]),h=b?r:h,Pe(h)||(h=h==null?[]:[h]),YC(o,c,h))}var Gie=Pu(function(o,c,h){o[h?0:1].push(c)},function(){return[[],[]]});function Yie(o,c,h){var b=Pe(o)?Fm:bC,O=arguments.length<3;return b(o,Ce(c,4),h,O,ri)}function Jie(o,c,h){var b=Pe(o)?lte:bC,O=arguments.length<3;return b(o,Ce(c,4),h,O,jC)}function Xie(o,c){var h=Pe(o)?Zn:BC;return h(o,Wu(Ce(c,3)))}function Zie(o){var c=Pe(o)?NC:Rre;return c(o)}function Qie(o,c,h){(h?Xt(o,c,h):c===r)?c=1:c=xe(c);var b=Pe(o)?$re:zre;return b(o,c)}function eae(o){var c=Pe(o)?wre:Kre;return c(o)}function tae(o){if(o==null)return 0;if(ir(o))return Vu(o)?La(o):o.length;var c=zt(o);return c==me||c==Yt?o.size:Zm(o).length}function rae(o,c,h){var b=Pe(o)?Nm:Gre;return h&&Xt(o,c,h)&&(c=r),b(o,Ce(c,3))}var nae=Ne(function(o,c){if(o==null)return[];var h=c.length;return h>1&&Xt(o,c[0],c[1])?c=[]:h>2&&Xt(c[0],c[1],c[2])&&(c=[c[0]]),YC(o,Bt(c,1),[])}),Bu=Lte||function(){return jt.Date.now()};function iae(o,c){if(typeof c!="function")throw new Or(s);return o=xe(o),function(){if(--o<1)return c.apply(this,arguments)}}function VE(o,c,h){return c=h?r:c,c=o&&c==null?o.length:c,Fn(o,N,r,r,r,r,c)}function RE(o,c){var h;if(typeof c!="function")throw new Or(s);return o=xe(o),function(){return--o>0&&(h=c.apply(this,arguments)),o<=1&&(c=r),h}}var wg=Ne(function(o,c,h){var b=v;if(h.length){var O=ei(h,za(wg));b|=A}return Fn(o,b,c,h,O)}),zE=Ne(function(o,c,h){var b=v|g;if(h.length){var O=ei(h,za(zE));b|=A}return Fn(c,b,o,h,O)});function HE(o,c,h){c=h?r:c;var b=Fn(o,S,r,r,r,r,r,c);return b.placeholder=HE.placeholder,b}function KE(o,c,h){c=h?r:c;var b=Fn(o,E,r,r,r,r,r,c);return b.placeholder=KE.placeholder,b}function GE(o,c,h){var b,O,I,M,R,J,le=0,ce=!1,fe=!1,ge=!0;if(typeof o!="function")throw new Or(s);c=xr(c)||0,_t(h)&&(ce=!!h.leading,fe="maxWait"in h,I=fe?Dt(xr(h.maxWait)||0,c):I,ge="trailing"in h?!!h.trailing:ge);function _e(Ct){var Rr=b,jn=O;return b=O=r,le=Ct,M=o.apply(jn,Rr),M}function Ee(Ct){return le=Ct,R=Ss(je,c),ce?_e(Ct):M}function Fe(Ct){var Rr=Ct-J,jn=Ct-le,hO=c-Rr;return fe?Rt(hO,I-jn):hO}function Oe(Ct){var Rr=Ct-J,jn=Ct-le;return J===r||Rr>=c||Rr<0||fe&&jn>=I}function je(){var Ct=Bu();if(Oe(Ct))return qe(Ct);R=Ss(je,Fe(Ct))}function qe(Ct){return R=r,ge&&b?_e(Ct):(b=O=r,M)}function dr(){R!==r&&iE(R),le=0,b=J=O=R=r}function Zt(){return R===r?M:qe(Bu())}function hr(){var Ct=Bu(),Rr=Oe(Ct);if(b=arguments,O=this,J=Ct,Rr){if(R===r)return Ee(J);if(fe)return iE(R),R=Ss(je,c),_e(J)}return R===r&&(R=Ss(je,c)),M}return hr.cancel=dr,hr.flush=Zt,hr}var aae=Ne(function(o,c){return LC(o,1,c)}),oae=Ne(function(o,c,h){return LC(o,xr(c)||0,h)});function sae(o){return Fn(o,K)}function Uu(o,c){if(typeof o!="function"||c!=null&&typeof c!="function")throw new Or(s);var h=function(){var b=arguments,O=c?c.apply(this,b):b[0],I=h.cache;if(I.has(O))return I.get(O);var M=o.apply(this,b);return h.cache=I.set(O,M)||I,M};return h.cache=new(Uu.Cache||xn),h}Uu.Cache=xn;function Wu(o){if(typeof o!="function")throw new Or(s);return function(){var c=arguments;switch(c.length){case 0:return!o.call(this);case 1:return!o.call(this,c[0]);case 2:return!o.call(this,c[0],c[1]);case 3:return!o.call(this,c[0],c[1],c[2])}return!o.apply(this,c)}}function lae(o){return RE(2,o)}var cae=Yre(function(o,c){c=c.length==1&&Pe(c[0])?gt(c[0],cr(Ce())):gt(Bt(c,1),cr(Ce()));var h=c.length;return Ne(function(b){for(var O=-1,I=Rt(b.length,h);++O<I;)b[O]=c[O].call(this,b[O]);return lr(o,this,b)})}),Sg=Ne(function(o,c){var h=ei(c,za(Sg));return Fn(o,A,r,c,h)}),YE=Ne(function(o,c){var h=ei(c,za(YE));return Fn(o,x,r,c,h)}),uae=Nn(function(o,c){return Fn(o,Y,r,r,r,c)});function fae(o,c){if(typeof o!="function")throw new Or(s);return c=c===r?c:xe(c),Ne(o,c)}function dae(o,c){if(typeof o!="function")throw new Or(s);return c=c==null?0:Dt(xe(c),0),Ne(function(h){var b=h[c],O=ai(h,0,c);return b&&Qn(O,b),lr(o,this,O)})}function hae(o,c,h){var b=!0,O=!0;if(typeof o!="function")throw new Or(s);return _t(h)&&(b="leading"in h?!!h.leading:b,O="trailing"in h?!!h.trailing:O),GE(o,c,{leading:b,maxWait:c,trailing:O})}function pae(o){return VE(o,1)}function mae(o,c){return Sg(sg(c),o)}function gae(){if(!arguments.length)return[];var o=arguments[0];return Pe(o)?o:[o]}function yae(o){return Tr(o,y)}function vae(o,c){return c=typeof c=="function"?c:r,Tr(o,y,c)}function bae(o){return Tr(o,p|y)}function _ae(o,c){return c=typeof c=="function"?c:r,Tr(o,p|y,c)}function $ae(o,c){return c==null||kC(o,c,Nt(c))}function Vr(o,c){return o===c||o!==o&&c!==c}var wae=Fu(Ym),Sae=Fu(function(o,c){return o>=c}),qi=qC(function(){return arguments}())?qC:function(o){return $t(o)&&Ze.call(o,"callee")&&!TC.call(o,"callee")},Pe=ne.isArray,Cae=cC?cr(cC):Dre;function ir(o){return o!=null&&qu(o.length)&&!kn(o)}function St(o){return $t(o)&&ir(o)}function Eae(o){return o===!0||o===!1||$t(o)&&Jt(o)==oe}var oi=Bte||Ng,Oae=uC?cr(uC):Fre;function Aae(o){return $t(o)&&o.nodeType===1&&!Cs(o)}function Tae(o){if(o==null)return!0;if(ir(o)&&(Pe(o)||typeof o=="string"||typeof o.splice=="function"||oi(o)||Ha(o)||qi(o)))return!o.length;var c=zt(o);if(c==me||c==Yt)return!o.size;if(ws(o))return!Zm(o).length;for(var h in o)if(Ze.call(o,h))return!1;return!0}function Pae(o,c){return bs(o,c)}function Iae(o,c,h){h=typeof h=="function"?h:r;var b=h?h(o,c):r;return b===r?bs(o,c,r,h):!!b}function Cg(o){if(!$t(o))return!1;var c=Jt(o);return c==be||c==he||typeof o.message=="string"&&typeof o.name=="string"&&!Cs(o)}function xae(o){return typeof o=="number"&&IC(o)}function kn(o){if(!_t(o))return!1;var c=Jt(o);return c==Le||c==ft||c==Z||c==ss}function JE(o){return typeof o=="number"&&o==xe(o)}function qu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=L}function _t(o){var c=typeof o;return o!=null&&(c=="object"||c=="function")}function $t(o){return o!=null&&typeof o=="object"}var XE=fC?cr(fC):Mre;function Dae(o,c){return o===c||Xm(o,c,pg(c))}function Fae(o,c,h){return h=typeof h=="function"?h:r,Xm(o,c,pg(c),h)}function Nae(o){return ZE(o)&&o!=+o}function Mae(o){if(vne(o))throw new Te(a);return VC(o)}function kae(o){return o===null}function Lae(o){return o==null}function ZE(o){return typeof o=="number"||$t(o)&&Jt(o)==It}function Cs(o){if(!$t(o)||Jt(o)!=Et)return!1;var c=mu(o);if(c===null)return!0;var h=Ze.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&fu.call(h)==Fte}var Eg=dC?cr(dC):kre;function jae(o){return JE(o)&&o>=-9007199254740991&&o<=L}var QE=hC?cr(hC):Lre;function Vu(o){return typeof o=="string"||!Pe(o)&&$t(o)&&Jt(o)==On}function fr(o){return typeof o=="symbol"||$t(o)&&Jt(o)==Xn}var Ha=pC?cr(pC):jre;function Bae(o){return o===r}function Uae(o){return $t(o)&&zt(o)==An}function Wae(o){return $t(o)&&Jt(o)==Fi}var qae=Fu(Qm),Vae=Fu(function(o,c){return o<=c});function eO(o){if(!o)return[];if(ir(o))return Vu(o)?Wr(o):nr(o);if(fs&&o[fs])return $te(o[fs]());var c=zt(o),h=c==me?Um:c==Yt?lu:Ka;return h(o)}function Ln(o){if(!o)return o===0?o:0;if(o=xr(o),o===W||o===-1/0){var c=o<0?-1:1;return c*X}return o===o?o:0}function xe(o){var c=Ln(o),h=c%1;return c===c?h?c-h:c:0}function tO(o){return o?ji(xe(o),0,F):0}function xr(o){if(typeof o=="number")return o;if(fr(o))return U;if(_t(o)){var c=typeof o.valueOf=="function"?o.valueOf():o;o=_t(c)?c+"":c}if(typeof o!="string")return o===0?o:+o;o=_C(o);var h=Cee.test(o);return h||Oee.test(o)?ite(o.slice(2),h?2:8):See.test(o)?U:+o}function rO(o){return fn(o,ar(o))}function Rae(o){return o?ji(xe(o),-9007199254740991,L):o===0?o:0}function Je(o){return o==null?"":ur(o)}var zae=Va(function(o,c){if(ws(c)||ir(c)){fn(c,Nt(c),o);return}for(var h in c)Ze.call(c,h)&&gs(o,h,c[h])}),nO=Va(function(o,c){fn(c,ar(c),o)}),Ru=Va(function(o,c,h,b){fn(c,ar(c),o,b)}),Hae=Va(function(o,c,h,b){fn(c,Nt(c),o,b)}),Kae=Nn(Hm);function Gae(o,c){var h=qa(o);return c==null?h:MC(h,c)}var Yae=Ne(function(o,c){o=tt(o);var h=-1,b=c.length,O=b>2?c[2]:r;for(O&&Xt(c[0],c[1],O)&&(b=1);++h<b;)for(var I=c[h],M=ar(I),R=-1,J=M.length;++R<J;){var le=M[R],ce=o[le];(ce===r||Vr(ce,Ba[le])&&!Ze.call(o,le))&&(o[le]=I[le])}return o}),Jae=Ne(function(o){return o.push(r,_E),lr(iO,r,o)});function Xae(o,c){return gC(o,Ce(c,3),un)}function Zae(o,c){return gC(o,Ce(c,3),Gm)}function Qae(o,c){return o==null?o:Km(o,Ce(c,3),ar)}function eoe(o,c){return o==null?o:UC(o,Ce(c,3),ar)}function toe(o,c){return o&&un(o,Ce(c,3))}function roe(o,c){return o&&Gm(o,Ce(c,3))}function noe(o){return o==null?[]:Eu(o,Nt(o))}function ioe(o){return o==null?[]:Eu(o,ar(o))}function Og(o,c,h){var b=o==null?r:Bi(o,c);return b===r?h:b}function aoe(o,c){return o!=null&&SE(o,c,Tre)}function Ag(o,c){return o!=null&&SE(o,c,Pre)}var ooe=mE(function(o,c,h){c!=null&&typeof c.toString!="function"&&(c=du.call(c)),o[c]=h},Pg(or)),soe=mE(function(o,c,h){c!=null&&typeof c.toString!="function"&&(c=du.call(c)),Ze.call(o,c)?o[c].push(h):o[c]=[h]},Ce),loe=Ne(vs);function Nt(o){return ir(o)?FC(o):Zm(o)}function ar(o){return ir(o)?FC(o,!0):Bre(o)}function coe(o,c){var h={};return c=Ce(c,3),un(o,function(b,O,I){Dn(h,c(b,O,I),b)}),h}function uoe(o,c){var h={};return c=Ce(c,3),un(o,function(b,O,I){Dn(h,O,c(b,O,I))}),h}var foe=Va(function(o,c,h){Ou(o,c,h)}),iO=Va(function(o,c,h,b){Ou(o,c,h,b)}),doe=Nn(function(o,c){var h={};if(o==null)return h;var b=!1;c=gt(c,function(I){return I=ii(I,o),b||(b=I.length>1),I}),fn(o,dg(o),h),b&&(h=Tr(h,p|m|y,one));for(var O=c.length;O--;)ig(h,c[O]);return h});function hoe(o,c){return aO(o,Wu(Ce(c)))}var poe=Nn(function(o,c){return o==null?{}:Wre(o,c)});function aO(o,c){if(o==null)return{};var h=gt(dg(o),function(b){return[b]});return c=Ce(c),JC(o,h,function(b,O){return c(b,O[0])})}function moe(o,c,h){c=ii(c,o);var b=-1,O=c.length;for(O||(O=1,o=r);++b<O;){var I=o==null?r:o[dn(c[b])];I===r&&(b=O,I=h),o=kn(I)?I.call(o):I}return o}function goe(o,c,h){return o==null?o:_s(o,c,h)}function yoe(o,c,h,b){return b=typeof b=="function"?b:r,o==null?o:_s(o,c,h,b)}var oO=vE(Nt),sO=vE(ar);function voe(o,c,h){var b=Pe(o),O=b||oi(o)||Ha(o);if(c=Ce(c,4),h==null){var I=o&&o.constructor;O?h=b?new I:[]:_t(o)?h=kn(I)?qa(mu(o)):{}:h={}}return(O?Er:un)(o,function(M,R,J){return c(h,M,R,J)}),h}function boe(o,c){return o==null?!0:ig(o,c)}function _oe(o,c,h){return o==null?o:tE(o,c,sg(h))}function $oe(o,c,h,b){return b=typeof b=="function"?b:r,o==null?o:tE(o,c,sg(h),b)}function Ka(o){return o==null?[]:Bm(o,Nt(o))}function woe(o){return o==null?[]:Bm(o,ar(o))}function Soe(o,c,h){return h===r&&(h=c,c=r),h!==r&&(h=xr(h),h=h===h?h:0),c!==r&&(c=xr(c),c=c===c?c:0),ji(xr(o),c,h)}function Coe(o,c,h){return c=Ln(c),h===r?(h=c,c=0):h=Ln(h),o=xr(o),Ire(o,c,h)}function Eoe(o,c,h){if(h&&typeof h!="boolean"&&Xt(o,c,h)&&(c=h=r),h===r&&(typeof c=="boolean"?(h=c,c=r):typeof o=="boolean"&&(h=o,o=r)),o===r&&c===r?(o=0,c=1):(o=Ln(o),c===r?(c=o,o=0):c=Ln(c)),o>c){var b=o;o=c,c=b}if(h||o%1||c%1){var O=xC();return Rt(o+O*(c-o+nte("1e-"+((O+"").length-1))),c)}return tg(o,c)}var Ooe=Ra(function(o,c,h){return c=c.toLowerCase(),o+(h?lO(c):c)});function lO(o){return Tg(Je(o).toLowerCase())}function cO(o){return o=Je(o),o&&o.replace(Tee,gte).replace(Kee,"")}function Aoe(o,c,h){o=Je(o),c=ur(c);var b=o.length;h=h===r?b:ji(xe(h),0,b);var O=h;return h-=c.length,h>=0&&o.slice(h,O)==c}function Toe(o){return o=Je(o),o&&lee.test(o)?o.replace(US,yte):o}function Poe(o){return o=Je(o),o&&pee.test(o)?o.replace(Sm,"\\$&"):o}var Ioe=Ra(function(o,c,h){return o+(h?"-":"")+c.toLowerCase()}),xoe=Ra(function(o,c,h){return o+(h?" ":"")+c.toLowerCase()}),Doe=dE("toLowerCase");function Foe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;if(!c||b>=c)return o;var O=(c-b)/2;return Du(bu(O),h)+o+Du(vu(O),h)}function Noe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;return c&&b<c?o+Du(c-b,h):o}function Moe(o,c,h){o=Je(o),c=xe(c);var b=c?La(o):0;return c&&b<c?Du(c-b,h)+o:o}function koe(o,c,h){return h||c==null?c=0:c&&(c=+c),Vte(Je(o).replace(Cm,""),c||0)}function Loe(o,c,h){return(h?Xt(o,c,h):c===r)?c=1:c=xe(c),rg(Je(o),c)}function joe(){var o=arguments,c=Je(o[0]);return o.length<3?c:c.replace(o[1],o[2])}var Boe=Ra(function(o,c,h){return o+(h?"_":"")+c.toLowerCase()});function Uoe(o,c,h){return h&&typeof h!="number"&&Xt(o,c,h)&&(c=h=r),h=h===r?F:h>>>0,h?(o=Je(o),o&&(typeof c=="string"||c!=null&&!Eg(c))&&(c=ur(c),!c&&ka(o))?ai(Wr(o),0,h):o.split(c,h)):[]}var Woe=Ra(function(o,c,h){return o+(h?" ":"")+Tg(c)});function qoe(o,c,h){return o=Je(o),h=h==null?0:ji(xe(h),0,o.length),c=ur(c),o.slice(h,h+c.length)==c}function Voe(o,c,h){var b=P.templateSettings;h&&Xt(o,c,h)&&(c=r),o=Je(o),c=Ru({},c,b,bE);var O=Ru({},c.imports,b.imports,bE),I=Nt(O),M=Bm(O,I),R,J,le=0,ce=c.interpolate||nu,fe="__p += '",ge=Wm((c.escape||nu).source+"|"+ce.source+"|"+(ce===WS?wee:nu).source+"|"+(c.evaluate||nu).source+"|$","g"),_e="//# sourceURL="+(Ze.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zee+"]")+`
92
+ `;o.replace(ge,function(Oe,je,qe,dr,Zt,hr){return qe||(qe=dr),fe+=o.slice(le,hr).replace(Pee,vte),je&&(R=!0,fe+=`' +
93
93
  __e(`+je+`) +
94
- '`),Zt&&(Y=!0,fe+=`';
94
+ '`),Zt&&(J=!0,fe+=`';
95
95
  `+Zt+`;
96
96
  __p += '`),qe&&(fe+=`' +
97
97
  ((__t = (`+qe+`)) == null ? '' : __t) +
98
98
  '`),le=hr+Oe.length,Oe}),fe+=`';
99
- `;var Ee=Xe.call(c,"variable")&&c.variable;if(!Ee)fe=`with (obj) {
99
+ `;var Ee=Ze.call(c,"variable")&&c.variable;if(!Ee)fe=`with (obj) {
100
100
  `+fe+`
101
101
  }
102
- `;else if(yee.test(Ee))throw new Te(l);fe=(Y?fe.replace(tee,""):fe).replace(ree,"$1").replace(nee,"$1;"),fe="function("+(Ee||"obj")+`) {
102
+ `;else if(_ee.test(Ee))throw new Te(l);fe=(J?fe.replace(iee,""):fe).replace(aee,"$1").replace(oee,"$1;"),fe="function("+(Ee||"obj")+`) {
103
103
  `+(Ee?"":`obj || (obj = {});
104
- `)+"var __t, __p = ''"+(q?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join;
104
+ `)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(J?`, __j = Array.prototype.join;
105
105
  function print() { __p += __j.call(arguments, '') }
106
106
  `:`;
107
107
  `)+fe+`return __p
108
- }`;var Fe=fO(function(){return He(I,_e+"return "+fe).apply(r,M)});if(Fe.source=fe,Sg(Fe))throw Fe;return Fe}function Woe(o){return Je(o).toLowerCase()}function qoe(o){return Je(o).toUpperCase()}function Voe(o,c,h){if(o=Je(o),o&&(h||c===r))return _C(o);if(!o||!(c=ur(c)))return o;var b=Wr(o),O=Wr(c),I=$C(b,O),M=wC(b,O)+1;return ai(b,I,M).join("")}function Roe(o,c,h){if(o=Je(o),o&&(h||c===r))return o.slice(0,CC(o)+1);if(!o||!(c=ur(c)))return o;var b=Wr(o),O=wC(b,Wr(c))+1;return ai(b,0,O).join("")}function zoe(o,c,h){if(o=Je(o),o&&(h||c===r))return o.replace(Sm,"");if(!o||!(c=ur(c)))return o;var b=Wr(o),O=$C(b,Wr(c));return ai(b,O).join("")}function Hoe(o,c){var h=H,b=ee;if(bt(c)){var O="separator"in c?c.separator:O;h="length"in c?xe(c.length):h,b="omission"in c?ur(c.omission):b}o=Je(o);var I=o.length;if(ka(o)){var M=Wr(o);I=M.length}if(h>=I)return o;var q=h-La(b);if(q<1)return b;var Y=M?ai(M,0,q).join(""):o.slice(0,q);if(O===r)return Y+b;if(M&&(q+=Y.length-q),Cg(O)){if(o.slice(q).search(O)){var le,ce=Y;for(O.global||(O=Um(O.source,Je(qS.exec(O))+"g")),O.lastIndex=0;le=O.exec(ce);)var fe=le.index;Y=Y.slice(0,fe===r?q:fe)}}else if(o.indexOf(ur(O),q)!=q){var ge=Y.lastIndexOf(O);ge>-1&&(Y=Y.slice(0,ge))}return Y+b}function Koe(o){return o=Je(o),o&&iee.test(o)?o.replace(BS,wte):o}var Goe=Ra(function(o,c,h){return o+(h?" ":"")+c.toUpperCase()}),Ag=dE("toUpperCase");function uO(o,c,h){return o=Je(o),c=h?r:c,c===r?yte(o)?Ete(o):lte(o):o.match(c)||[]}var fO=Ne(function(o,c){try{return lr(o,r,c)}catch(h){return Sg(h)?h:new Te(h)}}),Yoe=Fn(function(o,c){return Er(c,function(h){h=fn(h),xn(o,h,$g(o[h],o))}),o});function Joe(o){var c=o==null?0:o.length,h=Ce();return o=c?mt(o,function(b){if(typeof b[1]!="function")throw new Or(s);return[h(b[0]),b[1]]}):[],Ne(function(b){for(var O=-1;++O<c;){var I=o[O];if(lr(I[0],this,b))return lr(I[1],this,b)}})}function Xoe(o){return wre(Tr(o,p))}function Tg(o){return function(){return o}}function Zoe(o,c){return o==null||o!==o?c:o}var Qoe=pE(),ese=pE(!0);function ar(o){return o}function Pg(o){return RC(typeof o=="function"?o:Tr(o,p))}function tse(o){return HC(Tr(o,p))}function rse(o,c){return KC(o,Tr(c,p))}var nse=Ne(function(o,c){return function(h){return ys(h,o,c)}}),ise=Ne(function(o,c){return function(h){return ys(o,h,c)}});function Ig(o,c,h){var b=Nt(c),O=Eu(c,b);h==null&&!(bt(c)&&(O.length||!b.length))&&(h=c,c=o,o=this,O=Eu(c,Nt(c)));var I=!(bt(h)&&"chain"in h)||!!h.chain,M=Mn(o);return Er(O,function(q){var Y=c[q];o[q]=Y,M&&(o.prototype[q]=function(){var le=this.__chain__;if(I||le){var ce=o(this.__wrapped__),fe=ce.__actions__=rr(this.__actions__);return fe.push({func:Y,args:arguments,thisArg:o}),ce.__chain__=le,ce}return Y.apply(o,Qn([this.value()],arguments))})}),o}function ase(){return jt._===this&&(jt._=xte),this}function xg(){}function ose(o){return o=xe(o),Ne(function(c){return GC(c,o)})}var sse=lg(mt),lse=lg(mC),cse=lg(Fm);function dO(o){return mg(o)?Nm(fn(o)):Bre(o)}function use(o){return function(c){return o==null?r:Bi(o,c)}}var fse=gE(),dse=gE(!0);function Dg(){return[]}function Fg(){return!1}function hse(){return{}}function pse(){return""}function mse(){return!0}function gse(o,c){if(o=xe(o),o<1||o>U)return[];var h=D,b=Rt(o,D);c=Ce(c),o-=D;for(var O=Lm(b,c);++h<o;)c(h);return O}function yse(o){return Pe(o)?mt(o,fn):fr(o)?[o]:rr(DE(Je(o)))}function vse(o){var c=++Pte;return Je(o)+c}var bse=xu(function(o,c){return o+c},0),_se=cg("ceil"),$se=xu(function(o,c){return o/c},1),wse=cg("floor");function Sse(o){return o&&o.length?Cu(o,ar,Gm):r}function Cse(o,c){return o&&o.length?Cu(o,Ce(c,2),Gm):r}function Ese(o){return vC(o,ar)}function Ose(o,c){return vC(o,Ce(c,2))}function Ase(o){return o&&o.length?Cu(o,ar,Zm):r}function Tse(o,c){return o&&o.length?Cu(o,Ce(c,2),Zm):r}var Pse=xu(function(o,c){return o*c},1),Ise=cg("round"),xse=xu(function(o,c){return o-c},0);function Dse(o){return o&&o.length?km(o,ar):0}function Fse(o,c){return o&&o.length?km(o,Ce(c,2)):0}return T.after=tae,T.ary=VE,T.assign=qae,T.assignIn=nO,T.assignInWith=Ru,T.assignWith=Vae,T.at=Rae,T.before=RE,T.bind=$g,T.bindAll=Yoe,T.bindKey=zE,T.castArray=hae,T.chain=UE,T.chunk=wne,T.compact=Sne,T.concat=Cne,T.cond=Joe,T.conforms=Xoe,T.constant=Tg,T.countBy=Die,T.create=zae,T.curry=HE,T.curryRight=KE,T.debounce=GE,T.defaults=Hae,T.defaultsDeep=Kae,T.defer=rae,T.delay=nae,T.difference=Ene,T.differenceBy=One,T.differenceWith=Ane,T.drop=Tne,T.dropRight=Pne,T.dropRightWhile=Ine,T.dropWhile=xne,T.fill=Dne,T.filter=Nie,T.flatMap=Lie,T.flatMapDeep=jie,T.flatMapDepth=Bie,T.flatten=kE,T.flattenDeep=Fne,T.flattenDepth=Nne,T.flip=iae,T.flow=Qoe,T.flowRight=ese,T.fromPairs=Mne,T.functions=eoe,T.functionsIn=toe,T.groupBy=Uie,T.initial=Lne,T.intersection=jne,T.intersectionBy=Bne,T.intersectionWith=Une,T.invert=noe,T.invertBy=ioe,T.invokeMap=qie,T.iteratee=Pg,T.keyBy=Vie,T.keys=Nt,T.keysIn=ir,T.map=ju,T.mapKeys=ooe,T.mapValues=soe,T.matches=tse,T.matchesProperty=rse,T.memoize=Uu,T.merge=loe,T.mergeWith=iO,T.method=nse,T.methodOf=ise,T.mixin=Ig,T.negate=Wu,T.nthArg=ose,T.omit=coe,T.omitBy=uoe,T.once=aae,T.orderBy=Rie,T.over=sse,T.overArgs=oae,T.overEvery=lse,T.overSome=cse,T.partial=wg,T.partialRight=YE,T.partition=zie,T.pick=foe,T.pickBy=aO,T.property=dO,T.propertyOf=use,T.pull=Rne,T.pullAll=jE,T.pullAllBy=zne,T.pullAllWith=Hne,T.pullAt=Kne,T.range=fse,T.rangeRight=dse,T.rearg=sae,T.reject=Gie,T.remove=Gne,T.rest=lae,T.reverse=bg,T.sampleSize=Jie,T.set=hoe,T.setWith=poe,T.shuffle=Xie,T.slice=Yne,T.sortBy=eae,T.sortedUniq=rie,T.sortedUniqBy=nie,T.split=Loe,T.spread=cae,T.tail=iie,T.take=aie,T.takeRight=oie,T.takeRightWhile=sie,T.takeWhile=lie,T.tap=Sie,T.throttle=uae,T.thru=Lu,T.toArray=eO,T.toPairs=oO,T.toPairsIn=sO,T.toPath=yse,T.toPlainObject=rO,T.transform=moe,T.unary=fae,T.union=cie,T.unionBy=uie,T.unionWith=fie,T.uniq=die,T.uniqBy=hie,T.uniqWith=pie,T.unset=goe,T.unzip=_g,T.unzipWith=BE,T.update=yoe,T.updateWith=voe,T.values=Ka,T.valuesIn=boe,T.without=mie,T.words=uO,T.wrap=dae,T.xor=gie,T.xorBy=yie,T.xorWith=vie,T.zip=bie,T.zipObject=_ie,T.zipObjectDeep=$ie,T.zipWith=wie,T.entries=oO,T.entriesIn=sO,T.extend=nO,T.extendWith=Ru,Ig(T,T),T.add=bse,T.attempt=fO,T.camelCase=Soe,T.capitalize=lO,T.ceil=_se,T.clamp=_oe,T.clone=pae,T.cloneDeep=gae,T.cloneDeepWith=yae,T.cloneWith=mae,T.conformsTo=vae,T.deburr=cO,T.defaultTo=Zoe,T.divide=$se,T.endsWith=Coe,T.eq=Vr,T.escape=Eoe,T.escapeRegExp=Ooe,T.every=Fie,T.find=Mie,T.findIndex=NE,T.findKey=Gae,T.findLast=kie,T.findLastIndex=ME,T.findLastKey=Yae,T.floor=wse,T.forEach=WE,T.forEachRight=qE,T.forIn=Jae,T.forInRight=Xae,T.forOwn=Zae,T.forOwnRight=Qae,T.get=Eg,T.gt=bae,T.gte=_ae,T.has=roe,T.hasIn=Og,T.head=LE,T.identity=ar,T.includes=Wie,T.indexOf=kne,T.inRange=$oe,T.invoke=aoe,T.isArguments=qi,T.isArray=Pe,T.isArrayBuffer=$ae,T.isArrayLike=nr,T.isArrayLikeObject=St,T.isBoolean=wae,T.isBuffer=oi,T.isDate=Sae,T.isElement=Cae,T.isEmpty=Eae,T.isEqual=Oae,T.isEqualWith=Aae,T.isError=Sg,T.isFinite=Tae,T.isFunction=Mn,T.isInteger=JE,T.isLength=qu,T.isMap=XE,T.isMatch=Pae,T.isMatchWith=Iae,T.isNaN=xae,T.isNative=Dae,T.isNil=Nae,T.isNull=Fae,T.isNumber=ZE,T.isObject=bt,T.isObjectLike=_t,T.isPlainObject=Ss,T.isRegExp=Cg,T.isSafeInteger=Mae,T.isSet=QE,T.isString=Vu,T.isSymbol=fr,T.isTypedArray=Ha,T.isUndefined=kae,T.isWeakMap=Lae,T.isWeakSet=jae,T.join=Wne,T.kebabCase=Aoe,T.last=Ir,T.lastIndexOf=qne,T.lowerCase=Toe,T.lowerFirst=Poe,T.lt=Bae,T.lte=Uae,T.max=Sse,T.maxBy=Cse,T.mean=Ese,T.meanBy=Ose,T.min=Ase,T.minBy=Tse,T.stubArray=Dg,T.stubFalse=Fg,T.stubObject=hse,T.stubString=pse,T.stubTrue=mse,T.multiply=Pse,T.nth=Vne,T.noConflict=ase,T.noop=xg,T.now=Bu,T.pad=Ioe,T.padEnd=xoe,T.padStart=Doe,T.parseInt=Foe,T.random=woe,T.reduce=Hie,T.reduceRight=Kie,T.repeat=Noe,T.replace=Moe,T.result=doe,T.round=Ise,T.runInContext=K,T.sample=Yie,T.size=Zie,T.snakeCase=koe,T.some=Qie,T.sortedIndex=Jne,T.sortedIndexBy=Xne,T.sortedIndexOf=Zne,T.sortedLastIndex=Qne,T.sortedLastIndexBy=eie,T.sortedLastIndexOf=tie,T.startCase=joe,T.startsWith=Boe,T.subtract=xse,T.sum=Dse,T.sumBy=Fse,T.template=Uoe,T.times=gse,T.toFinite=kn,T.toInteger=xe,T.toLength=tO,T.toLower=Woe,T.toNumber=xr,T.toSafeInteger=Wae,T.toString=Je,T.toUpper=qoe,T.trim=Voe,T.trimEnd=Roe,T.trimStart=zoe,T.truncate=Hoe,T.unescape=Koe,T.uniqueId=vse,T.upperCase=Goe,T.upperFirst=Ag,T.each=WE,T.eachRight=qE,T.first=LE,Ig(T,function(){var o={};return cn(T,function(c,h){Xe.call(T.prototype,h)||(o[h]=c)}),o}(),{chain:!1}),T.VERSION=n,Er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){T[o].placeholder=T}),Er(["drop","take"],function(o,c){Ue.prototype[o]=function(h){h=h===r?1:Dt(xe(h),0);var b=this.__filtered__&&!c?new Ue(this):this.clone();return b.__filtered__?b.__takeCount__=Rt(h,b.__takeCount__):b.__views__.push({size:Rt(h,D),type:o+(b.__dir__<0?"Right":"")}),b},Ue.prototype[o+"Right"]=function(h){return this.reverse()[o](h).reverse()}}),Er(["filter","map","takeWhile"],function(o,c){var h=c+1,b=h==Q||h==W;Ue.prototype[o]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:Ce(O,3),type:h}),I.__filtered__=I.__filtered__||b,I}}),Er(["head","last"],function(o,c){var h="take"+(c?"Right":"");Ue.prototype[o]=function(){return this[h](1).value()[0]}}),Er(["initial","tail"],function(o,c){var h="drop"+(c?"":"Right");Ue.prototype[o]=function(){return this.__filtered__?new Ue(this):this[h](1)}}),Ue.prototype.compact=function(){return this.filter(ar)},Ue.prototype.find=function(o){return this.filter(o).head()},Ue.prototype.findLast=function(o){return this.reverse().find(o)},Ue.prototype.invokeMap=Ne(function(o,c){return typeof o=="function"?new Ue(this):this.map(function(h){return ys(h,o,c)})}),Ue.prototype.reject=function(o){return this.filter(Wu(Ce(o)))},Ue.prototype.slice=function(o,c){o=xe(o);var h=this;return h.__filtered__&&(o>0||c<0)?new Ue(h):(o<0?h=h.takeRight(-o):o&&(h=h.drop(o)),c!==r&&(c=xe(c),h=c<0?h.dropRight(-c):h.take(c-o)),h)},Ue.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ue.prototype.toArray=function(){return this.take(D)},cn(Ue.prototype,function(o,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),b=/^(?:head|last)$/.test(c),O=T[b?"take"+(c=="last"?"Right":""):c],I=b||/^find/.test(c);O&&(T.prototype[c]=function(){var M=this.__wrapped__,q=b?[1]:arguments,Y=M instanceof Ue,le=q[0],ce=Y||Pe(M),fe=function(je){var qe=O.apply(T,Qn([je],q));return b&&ge?qe[0]:qe};ce&&h&&typeof le=="function"&&le.length!=1&&(Y=ce=!1);var ge=this.__chain__,_e=!!this.__actions__.length,Ee=I&&!ge,Fe=Y&&!_e;if(!I&&ce){M=Fe?M:new Ue(this);var Oe=o.apply(M,q);return Oe.__actions__.push({func:Lu,args:[fe],thisArg:r}),new Ar(Oe,ge)}return Ee&&Fe?o.apply(this,q):(Oe=this.thru(fe),Ee?b?Oe.value()[0]:Oe.value():Oe)})}),Er(["pop","push","shift","sort","splice","unshift"],function(o){var c=cu[o],h=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",b=/^(?:pop|shift)$/.test(o);T.prototype[o]=function(){var O=arguments;if(b&&!this.__chain__){var I=this.value();return c.apply(Pe(I)?I:[],O)}return this[h](function(M){return c.apply(Pe(M)?M:[],O)})}}),cn(Ue.prototype,function(o,c){var h=T[c];if(h){var b=h.name+"";Xe.call(Wa,b)||(Wa[b]=[]),Wa[b].push({name:c,func:h})}}),Wa[Iu(r,g).name]=[{name:"wrapper",func:r}],Ue.prototype.clone=Kte,Ue.prototype.reverse=Gte,Ue.prototype.value=Yte,T.prototype.at=Cie,T.prototype.chain=Eie,T.prototype.commit=Oie,T.prototype.next=Aie,T.prototype.plant=Pie,T.prototype.reverse=Iie,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=xie,T.prototype.first=T.prototype.head,us&&(T.prototype[us]=Tie),T},ja=Ote();Ni?((Ni.exports=ja)._=ja,Pm._=ja):jt._=ja}).call(Nr)}(fc,fc.exports);var iz=fc.exports;const{Option:dh,OptGroup:az}=re.Select;class hh extends uc{constructor(){super(...arguments);pe(this,"presentationMode",yt.DROPDOWN)}render(r,n){return $.jsx(oz,{...r,state:n,presenter:this})}handleSelectionChange(r,n,i){const{multiple:a}=n.options.choiceConfig||{};return r==null?[]:this.normalizeValue(r,!!a)}getDefaultProps(){return{presentationMode:yt.DROPDOWN,multiple:!1,allowClear:!0,placeholder:"Select an option",size:"middle",search:{enabled:!0,minLength:1,debounceMs:300,caseSensitive:!1,searchFields:["label"]},showOptionCount:!0}}validateProps(r){var i;const n=[];return r.presentationMode!==yt.DROPDOWN&&n.push("Presentation mode must be DROPDOWN for DropdownPresenter"),(i=r.search)!=null&&i.enabled&&(r.search.debounceMs&&r.search.debounceMs<0&&n.push("Search debounce delay must be non-negative"),r.search.minLength&&r.search.minLength<0&&n.push("Search minimum length must be non-negative")),r.multiple&&r.minSelections&&r.maxSelections&&r.minSelections>r.maxSelections&&n.push("Minimum selections cannot exceed maximum selections"),n.length>0?n:null}getAriaRole(){return"combobox"}}const oz=({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,state:y,presenter:_,eventHandlers:w})=>{var z,B,P,F,V;const v=dt(e,p),g=a.choiceConfig||_.getDefaultProps(),[C,S]=j.useState(""),[E,A]=j.useState(!1),x=j.useRef(),N=j.useMemo(()=>{var X;return!((X=g.search)!=null&&X.enabled)||!C?y.filteredOptions:_.filterOptions(y.options,C,g.search)},[y.options,y.filteredOptions,C,g.search,_]),Z=j.useMemo(()=>{var X;return iz.debounce(oe=>{A(!1),w!=null&&w.onSearchChange&&w.onSearchChange(oe)},((X=g.search)==null?void 0:X.debounceMs)||300)},[(z=g.search)==null?void 0:z.debounceMs,w]),G=j.useCallback(X=>{S(X),A(!0),Z(X)},[Z]),H=j.useCallback(async X=>{const oe=_.handleSelectionChange(X,{id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,name:e,registry:{}},y),ue=_.denormalizeValue(oe,!!g.multiple);r(ue),await v.onChange(ue),w!=null&&w.onSelectionChange&&w.onSelectionChange(oe,y.options)},[r,v,w,_,g.multiple,y,e,t,n,i,s,l,u,f,d,p,m,a]),ee=j.useCallback(async X=>{await v.onFocus(X),i&&i(e,t),w!=null&&w.onFocus&&w.onFocus(X)},[v,i,e,t,w]),te=j.useCallback(async X=>{await v.onBlur(X),n&&n(e,t),w!=null&&w.onBlur&&w.onBlur(X)},[v,n,e,t,w]),ae=j.useCallback(X=>{X&&(w!=null&&w.onOpen)?w.onOpen():!X&&(w!=null&&w.onClose)&&w.onClose()},[w]),Q=_.getAccessibilityProps({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,name:e,registry:{}},y,g.accessibility),k=_.getLoadingProps(y.loading,g.loadingComponent),W=_.getErrorProps(y.error,g.errorComponent,e),R=_.getEmptyProps(void 0,g.emptyComponent),U={id:e,className:_.getThemeClasses(g,y.error.hasError?"has-error":void 0),style:_.getThemeStyles(g),value:g.multiple?t||[]:t,onChange:H,onFocus:ee,onBlur:te,onOpenChange:ae,disabled:u||f,placeholder:d||g.placeholder,allowClear:g.allowClear,mode:g.multiple?"multiple":void 0,size:_.getAntdSize(g.size),showSearch:(B=g.search)==null?void 0:B.enabled,onSearch:(P=g.search)!=null&&P.enabled?G:void 0,filterOption:!1,loading:y.loading.isLoading||E,notFoundContent:y.loading.isLoading?$.jsx(re.Spin,{size:"small"}):$.jsx(R.component,{...R.props}),maxTagCount:g.multiple?"responsive":void 0,maxTagPlaceholder:g.multiple&&g.showOptionCount?X=>`+${X.length} more`:void 0,virtual:N.length>100,listHeight:256,...Q},J=j.useMemo(()=>{const X=new Map;return N.forEach(oe=>{var he;const ue=(he=oe.metadata)==null?void 0:he.group;X.has(ue)||X.set(ue,[]),X.get(ue).push(oe)}),X},[N]),L=()=>{if(J.size===1&&J.has(void 0))return N.map(ue=>{var he,be,Le,ut;return $.jsxs(dh,{value:ue.value,disabled:ue.disabled,className:(he=ue.metadata)==null?void 0:he.className,title:(be=ue.metadata)==null?void 0:be.description,children:[((Le=ue.metadata)==null?void 0:Le.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:ue.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:ue.label}),((ut=ue.metadata)==null?void 0:ut.description)&&$.jsx("span",{className:"edf-choice-widget__option-description",children:ue.metadata.description})]},String(ue.value))});const X=[],oe=J.get(void 0);return oe&&oe.forEach(ue=>{var he,be,Le;X.push($.jsxs(dh,{value:ue.value,disabled:ue.disabled,className:(he=ue.metadata)==null?void 0:he.className,title:(be=ue.metadata)==null?void 0:be.description,children:[((Le=ue.metadata)==null?void 0:Le.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:ue.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:ue.label})]},String(ue.value)))}),J.forEach((ue,he)=>{he!==void 0&&X.push($.jsx(az,{label:he,children:ue.map(be=>{var Le,ut,me;return $.jsxs(dh,{value:be.value,disabled:be.disabled,className:(Le=be.metadata)==null?void 0:Le.className,title:(ut=be.metadata)==null?void 0:ut.description,children:[((me=be.metadata)==null?void 0:me.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:be.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:be.label})]},String(be.value))})},he))}),X},D=j.useCallback(X=>{var oe,ue;(ue=(oe=g.accessibility)==null?void 0:oe.keyboard)!=null&&ue.typeAhead&&X.key.length===1&&/\S/.test(X.key)},[(V=(F=g.accessibility)==null?void 0:F.keyboard)==null?void 0:V.typeAhead]);return j.useEffect(()=>{const X=x.current;return()=>{X&&clearTimeout(X),Z.cancel()}},[Z]),$.jsxs("div",{className:"edf-choice-widget__wrapper",children:[$.jsx(re.Select,{...U,onKeyDown:D,children:L()}),y.error.hasError&&$.jsx(W.component,{...W.props}),y.loading.isLoading&&y.loading.progress!==void 0&&$.jsx("div",{className:"edf-choice-widget__loading-overlay",children:$.jsx(k.component,{...k.props})})]})};class B1 extends uc{constructor(){super(...arguments);pe(this,"presentationMode",yt.RADIO)}render(r,n){return $.jsx(sz,{...r,state:n,presenter:this})}handleSelectionChange(r){return r==null?[]:this.normalizeValue(r,!1)}getDefaultProps(){return{presentationMode:yt.RADIO,multiple:!1,allowClear:!1,placeholder:"Select an option",size:"middle",style:{display:"block"},accessibility:{keyboard:{arrowKeys:!0,typeAhead:!0,homeEnd:!0},announceChanges:!0}}}validateProps(r){const n=[];return r.presentationMode!==yt.RADIO&&n.push("Presentation mode must be RADIO for RadioPresenter"),r.multiple&&n.push("Radio groups do not support multiple selection. Use checkbox mode for multi-select."),(r.minSelections||r.maxSelections)&&n.push("Selection limits are not applicable to radio groups"),n.length>0?n:null}getAriaRole(){return"radiogroup"}}const sz=({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,state:y,presenter:_,eventHandlers:w})=>{var k,W,R;const v=dt(e,p),g=a.choiceConfig||_.getDefaultProps(),C=((k=g.style)==null?void 0:k.display)==="inline"||((W=g.style)==null?void 0:W.display)==="inline-block"||((R=g.className)==null?void 0:R.includes("horizontal")),S=j.useCallback(async U=>{const J=U.target.value,L=_.handleSelectionChange(J),D=_.denormalizeValue(L,!1);r(D),await v.onChange(D),w!=null&&w.onSelectionChange&&w.onSelectionChange(L,y.options)},[r,v,w,_,y]),E=j.useCallback(async U=>{await v.onFocus(U),i&&i(e,t),w!=null&&w.onFocus&&w.onFocus(U)},[v,i,e,t,w]),A=j.useCallback(async U=>{await v.onBlur(U),n&&n(e,t),w!=null&&w.onBlur&&w.onBlur(U)},[v,n,e,t,w]),x={id:e,name:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,registry:{},rawErrors:[],formData:{}},N=_.getAccessibilityProps(x,y,g.accessibility),Z=_.getErrorProps(y.error,g.errorComponent,e),G=_.getEmptyProps(void 0,g.emptyComponent),H={id:e,className:_.getThemeClasses(g,y.error.hasError?"has-error":void 0),style:_.getThemeStyles(g),value:t,onChange:S,onFocus:E,onBlur:A,disabled:u||f,size:g.size||"middle",...N},ee=j.useMemo(()=>{const U=new Map;return y.filteredOptions.forEach(J=>{var D;const L=(D=J.metadata)==null?void 0:D.group;U.has(L)||U.set(L,[]),U.get(L).push(J)}),U},[y.filteredOptions]),te=U=>{var L,D,z,B,P,F,V,X,oe,ue,he;const J={key:String(U.value),value:U.value,disabled:U.disabled,className:(L=U.metadata)==null?void 0:L.className};return(z=(D=U.metadata)==null?void 0:D.a11y)!=null&&z.ariaLabel&&(J["aria-label"]=U.metadata.a11y.ariaLabel),(P=(B=U.metadata)==null?void 0:B.a11y)!=null&&P.ariaDescription&&(J["aria-describedby"]=`${e}-option-${U.value}-description`),(F=U.metadata)!=null&&F.icon||(V=U.metadata)!=null&&V.description?$.jsx(re.Radio,{value:J.value,disabled:J.disabled,className:J.className,children:$.jsxs("div",{className:"edf-choice-widget__radio-content",children:[$.jsxs("div",{className:"edf-choice-widget__radio-main",children:[((X=U.metadata)==null?void 0:X.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:U.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:U.label})]}),((oe=U.metadata)==null?void 0:oe.description)&&$.jsx("div",{className:"edf-choice-widget__option-description",id:(he=(ue=U.metadata)==null?void 0:ue.a11y)!=null&&he.ariaDescription?`${e}-option-${U.value}-description`:void 0,children:U.metadata.description})]})},J.key):$.jsx(re.Radio,{value:J.value,disabled:J.disabled,className:J.className,children:U.label},J.key)},ae=()=>{const U=[],J=ee.get(void 0);J&&J.length>0&&J.forEach(D=>{U.push(te(D))});let L=!J||J.length===0;return ee.forEach((D,z)=>{z===void 0||D.length===0||(L||U.push($.jsx("div",{className:"edf-choice-widget__radio-divider"},`divider-${z}`)),L=!1,U.push($.jsx("div",{className:"edf-choice-widget__radio-group-label",children:z},`group-${z}`)),D.forEach(B=>{U.push(te(B))}))}),U};if(y.filteredOptions.length===0)return $.jsx("div",{className:"edf-choice-widget__wrapper",children:$.jsx(G.component,{...G.props})});const Q=ee.size>1?ae():y.filteredOptions.map(te);return $.jsxs("div",{className:"edf-choice-widget__wrapper edf-choice-widget__wrapper--radio",children:[$.jsx(re.Radio.Group,{...H,children:C?$.jsx(re.Space,{direction:"horizontal",wrap:!0,children:Q}):$.jsx(re.Space,{direction:"vertical",style:{width:"100%"},children:Q})}),y.error.hasError&&$.jsx(Z.component,{...Z.props})]})};class U1 extends uc{constructor(){super(...arguments);pe(this,"presentationMode",yt.CHECKBOX)}render(r,n){return $.jsx(lz,{...r,state:n,presenter:this})}handleSelectionChange(r,n,i){return Array.isArray(r)?r:[]}getDefaultProps(){return{presentationMode:yt.CHECKBOX,multiple:!0}}validateProps(r){const n=[];return r.presentationMode!==yt.CHECKBOX&&n.push("Presentation mode must be CHECKBOX for CheckboxPresenter"),r.multiple===!1&&n.push("Checkbox presentation mode requires multiple selection to be enabled"),n.length>0?n:null}getAriaRole(){return"group"}}const lz=({id:e,label:t,value:r,onChange:n,onBlur:i,onFocus:a,disabled:s,readonly:l,required:u,options:f,schema:d,formContext:p,state:m,presenter:y,eventHandlers:_})=>{const w=dt(e,d),v=f.choiceConfig||y.getDefaultProps(),g=j.useRef(null),C=j.useRef(new Map),S=j.useCallback(async R=>{const U=y.handleSelectionChange(R,{id:e,name:e,value:r,onChange:n,onBlur:i,onFocus:a,options:f,label:t,required:u,disabled:s,readonly:l,schema:d,formContext:p,eventHandlers:_,rawErrors:[],formData:{},placeholder:void 0,registry:{}},m),J=y.denormalizeValue(U,!0);n(J),await w.onChange(J),_!=null&&_.onSelectionChange&&_.onSelectionChange(U,m.options)},[n,w,_,y,m,e,r,i,a,f,t,u,s,l,d,p]),E=j.useCallback((R,U)=>{if(U)return U;const J=Math.floor(24/R);return{xs:24,sm:Math.min(24,J*2),md:Math.min(24,J*1.5),lg:J,xl:J,xxl:J}},[]),A=j.useCallback((R,U)=>{const J=U.filter(D=>!D.disabled),L=R.filter(D=>J.some(z=>z.value===D)).length;return L>0&&L<J.length},[]),x=j.useCallback((R,U)=>U.filter(L=>!L.disabled).every(L=>R.includes(L.value)),[]),N=j.useCallback(R=>{const{checked:U}=R.target,J=m.options.filter(D=>!D.disabled).map(D=>D.value);let L;if(U){const D=(r||[]).filter(z=>m.options.find(B=>B.value===z&&B.disabled));L=[...new Set([...D,...J])]}else L=(r||[]).filter(D=>m.options.find(z=>z.value===D&&z.disabled));S(L)},[m.options,r,S]),Z=j.useCallback(R=>{const U=m.options.filter(D=>!D.disabled),J=r||[];let L;switch(R){case"selectAll":{const D=J.filter(z=>m.options.find(B=>B.value===z&&B.disabled));L=[...new Set([...D,...U.map(z=>z.value)])];break}case"clearAll":{L=J.filter(D=>m.options.find(z=>z.value===D&&z.disabled));break}case"invert":{const D=new Set(U.map(F=>F.value)),z=new Set(J.filter(F=>D.has(F))),B=U.filter(F=>!z.has(F.value)).map(F=>F.value);L=[...J.filter(F=>m.options.find(V=>V.value===F&&V.disabled)),...B];break}default:L=J}S(L)},[m.options,r,S]),G=j.useCallback(()=>m.options.map(R=>`${e}-checkbox-${R.value}`).join(" "),[m.options,e]),H=j.useCallback(R=>{var L,D;const U=(r||[]).includes(R.value),J=`${e}-checkbox-${R.value}`;return $.jsxs(re.Checkbox,{value:R.value,disabled:R.disabled,checked:U,id:J,ref:z=>{var B;if(z){const P=z.input||((B=z.querySelector)==null?void 0:B.call(z,"input"));P&&C.current.set(String(R.value),P)}else C.current.delete(String(R.value))},"aria-describedby":(L=R.metadata)!=null&&L.description?`${J}-desc`:void 0,className:"edf-choice-widget__checkbox-option",children:[$.jsx("span",{className:"edf-choice-widget__option-label",children:R.label}),((D=R.metadata)==null?void 0:D.description)&&$.jsx("div",{id:`${J}-desc`,className:"edf-choice-widget__option-description",style:{fontSize:"0.875em",color:"rgba(0, 0, 0, 0.45)"},children:R.metadata.description})]},String(R.value))},[r,e]),ee=j.useCallback(()=>{if(!v.showSelectAll||l)return null;const R=r||[],U=A(R,m.options),J=x(R,m.options);return $.jsx("div",{className:"edf-choice-widget__checkbox-select-all",style:{marginBottom:8},children:$.jsx(re.Checkbox,{ref:g,indeterminate:U,checked:J,onChange:N,disabled:s||m.options.every(L=>L.disabled),"aria-label":v.selectAllLabel,"aria-controls":G(),children:v.selectAllLabel})})},[v.showSelectAll,v.selectAllLabel,l,r,m.options,s,A,x,N,G]),te=j.useCallback(()=>{if(!v.enableBulkOperations||l)return null;const R=v.bulkOperationLabels;return $.jsxs(re.Space,{className:"edf-choice-widget__checkbox-bulk-operations",style:{marginBottom:8},children:[$.jsx("button",{type:"button",onClick:()=>Z("selectAll"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":R.selectAll,children:R.selectAll}),$.jsx("button",{type:"button",onClick:()=>Z("clearAll"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":R.clearAll,children:R.clearAll}),$.jsx("button",{type:"button",onClick:()=>Z("invert"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":R.invertSelection,children:R.invertSelection})]})},[v.enableBulkOperations,v.bulkOperationLabels,l,s,Z]),ae=j.useCallback(()=>{const R=v.columns||1,U=E(R,v.responsive);return $.jsx(re.Row,{gutter:[v.spacing||8,v.spacing||8],children:m.options.map(J=>$.jsx(re.Col,{...U,children:H(J)},String(J.value)))})},[m.options,v.columns,v.responsive,v.spacing,E,H]),Q=j.useCallback(()=>{const R=v.layout==="horizontal"?"horizontal":"vertical";return $.jsx(re.Space,{direction:R,size:v.spacing,wrap:!0,children:m.options.map(U=>H(U))})},[m.options,v.layout,v.spacing,H]);j.useEffect(()=>{var V;const R=g.current,U=(R==null?void 0:R.input)||((V=R==null?void 0:R.querySelector)==null?void 0:V.call(R,"input")),J=new Map(C.current),L=X=>{for(let oe=X-1;oe>=0;oe--){const ue=m.options[oe];if(!ue.disabled){const he=J.get(String(ue.value));he==null||he.focus();return}}v.showSelectAll&&U&&U.focus()},D=X=>{for(let oe=X+1;oe<m.options.length;oe++){const ue=m.options[oe];if(!ue.disabled){const he=J.get(String(ue.value));he==null||he.focus();return}}},z=()=>{const X=m.options.find(oe=>!oe.disabled);if(X){const oe=J.get(String(X.value));oe==null||oe.focus()}},B=()=>{const X=[...m.options].reverse().find(oe=>!oe.disabled);if(X){const oe=J.get(String(X.value));oe==null||oe.focus()}},P=X=>{(X.key==="ArrowDown"||X.key==="ArrowRight")&&(X.preventDefault(),z())};v.showSelectAll&&U&&U.addEventListener("keydown",P);const F=new Map;return J.forEach((X,oe)=>{if(!X)return;const ue=he=>{const be=m.options.findIndex(Le=>String(Le.value)===oe);switch(he.key){case"ArrowUp":case"ArrowLeft":he.preventDefault(),L(be);break;case"ArrowDown":case"ArrowRight":he.preventDefault(),D(be);break;case"Home":he.preventDefault(),v.showSelectAll&&U?U.focus():z();break;case"End":he.preventDefault(),B();break}};X.addEventListener("keydown",ue),F.set(X,ue)}),()=>{U&&U.removeEventListener("keydown",P),F.forEach((X,oe)=>{oe&&oe.removeEventListener("keydown",X)})}},[m.options,v.showSelectAll]);const k=y.getAccessibilityProps({id:e,name:e,label:t,required:u,readonly:l,disabled:s,schema:d,value:r,onChange:n,onBlur:i,onFocus:a,options:f,formContext:p,eventHandlers:_,rawErrors:[],formData:{},placeholder:void 0,registry:{}},m,v.accessibility),W={value:r||[],onChange:S,disabled:s,className:y.getThemeClasses(v,"edf-choice-widget__checkbox-group"),style:y.getThemeStyles(v)};return $.jsxs("div",{className:"edf-choice-widget__wrapper edf-choice-widget__wrapper--checkbox",role:"group","aria-labelledby":k["aria-labelledby"],"aria-describedby":k["aria-describedby"],"aria-required":k["aria-required"],"aria-invalid":k["aria-invalid"],"data-readonly":String(l),"data-disabled":String(s),children:[m.error.hasError&&$.jsx("div",{className:"edf-choice-widget__error",role:"alert",id:`${e}-error`,children:m.error.message}),ee(),te(),$.jsx(re.Checkbox.Group,{...W,children:v.layout==="grid"?ae():Q()}),m.loading.isLoading&&$.jsxs("div",{className:"edf-choice-widget__loading",children:[$.jsx(re.Spin,{size:"small"}),m.loading.message&&$.jsx("span",{className:"edf-choice-widget__loading-message",children:m.loading.message})]})]})};function dc(e,t){const[r,n]=j.useState([]),[i,a]=j.useState({isLoading:!1,message:""}),[s,l]=j.useState({hasError:!1,message:"",recoverable:!0}),[u,f]=j.useState({requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0}),[d,p]=j.useState(!1),m=j.useRef(null),y=j.useRef({id:0,isActive:!1}),_=j.useRef(e),w=j.useRef(!0),v=j.useRef(),g=j.useRef(t);j.useEffect(()=>{_.current=e},[e]),j.useEffect(()=>{g.current=t},[t]);const C=j.useCallback(Z=>{var ee;m.current&&(m.current.cleanup(),m.current=null);const G={onLoadingStart:te=>{var ae,Q;w.current&&a(te.getLoadingState()),(Q=(ae=g.current)==null?void 0:ae.onLoadingStart)==null||Q.call(ae,te)},onLoadingComplete:(te,ae)=>{var Q,k;w.current&&(a(te.getLoadingState()),f(te.getMetrics())),(k=(Q=g.current)==null?void 0:Q.onLoadingComplete)==null||k.call(Q,te,ae)},onError:(te,ae)=>{var Q,k;w.current&&(l(te.getErrorState()),f(te.getMetrics())),(k=(Q=g.current)==null?void 0:Q.onError)==null||k.call(Q,te,ae)},onCacheHit:(te,ae)=>{var Q,k;w.current&&(f(te.getMetrics()),p(!1)),(k=(Q=g.current)==null?void 0:Q.onCacheHit)==null||k.call(Q,te,ae)},onCacheMiss:(te,ae)=>{var Q,k;w.current&&f(te.getMetrics()),(k=(Q=g.current)==null?void 0:Q.onCacheMiss)==null||k.call(Q,te,ae)},onCacheCleared:(ee=g.current)==null?void 0:ee.onCacheCleared};let H;if(T1(Z))H=new ch(Z,{eventCallbacks:G});else if(P1(Z))H=new uh(Z,{},G);else if(sh(Z))H=new fh(Z,{eventCallbacks:G});else throw new Error(`Unsupported data source type: ${Z.type}`);return m.current=H,H},[]),S=j.useCallback(async(Z,G=!1)=>{y.current.abortController&&y.current.abortController.abort();const H=++y.current.id,ee=new AbortController;y.current={id:H,abortController:ee,isActive:!0};try{G&&Z.clearCache();const te=await Z.fetchOptions();if(y.current.id!==H||!w.current)throw new Error("Request cancelled");return n(te),l({hasError:!1,message:"",recoverable:!0}),p(!1),te}catch(te){if(y.current.id!==H||!w.current)throw te;const Q={hasError:!0,message:te instanceof Error?te.message:"Failed to fetch options",code:te==null?void 0:te.code,recoverable:!0,timestamp:Date.now()};throw l(Q),te}finally{y.current.id===H&&(y.current.isActive=!1,y.current.abortController=void 0)}},[]),E=j.useCallback(async()=>{if(_.current)try{const Z=C(_.current);await S(Z,!1)}catch(Z){if(Z instanceof Error&&Z.message==="Request cancelled")return;console.error("Failed to initialize data source:",Z)}},[C,S]),A=j.useCallback(async()=>{if(!(!m.current||!w.current))try{await S(m.current,!0)}catch(Z){if(Z instanceof Error&&Z.message==="Request cancelled")return;console.error("Failed to refetch data:",Z)}},[S]),x=j.useCallback(async()=>{if(!(!m.current||!w.current))try{await S(m.current,!1)}catch(Z){if(Z instanceof Error&&Z.message==="Request cancelled")return;console.error("Failed to refresh data:",Z)}},[S]),N=j.useCallback(Z=>{JSON.stringify(Z)!==JSON.stringify(_.current)&&(_.current=Z,y.current.abortController&&y.current.abortController.abort(),n([]),a({isLoading:!0,message:"Updating data source..."}),l({hasError:!1,message:"",recoverable:!0}),E())},[E]);return j.useEffect(()=>{if(!sh(e))return;const G=setInterval(()=>{if(m.current&&u.lastRequestTimestamp){const ee=Date.now()-u.lastRequestTimestamp;p(ee>3e5)}},6e4);return v.current=G,()=>{v.current&&clearInterval(v.current)}},[e,u.lastRequestTimestamp]),j.useEffect(()=>(w.current=!0,E(),()=>{w.current=!1,y.current.abortController&&y.current.abortController.abort(),v.current&&clearInterval(v.current),m.current&&(m.current.cleanup(),m.current=null)}),[E]),j.useMemo(()=>({options:r,loading:i,error:s,refetch:A,refresh:x,updateConfig:N,metrics:u,isStale:d}),[r,i,s,A,x,N,u,d])}function cz(e,t={}){const{maxRetries:r=3,retryDelayMs:n=1e3,onRetry:i}=t,[a,s]=j.useState(0),l=j.useRef(),u=dc(e,{onError:(f,d)=>{if(a<r){const p=a+1;l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(p),i==null||i(p,d),u.refetch()},n*p)}},onLoadingComplete:()=>{s(0),l.current&&clearTimeout(l.current)}});return j.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),u}function uz(e){const[t,r]=j.useState([]),n=e.map(i=>dc(i));return j.useEffect(()=>{r(n)},[n]),t}const fz={[yt.DROPDOWN]:()=>new hh,[yt.RADIO]:()=>new B1,[yt.CHECKBOX]:()=>new U1};function hc(e){const{id:t,schema:r,value:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d}=e,p=j.useMemo(()=>{const k=(f==null?void 0:f.choiceConfig)||{},W=(f==null?void 0:f.enumOptions)||[],R={...No,presentationMode:k.presentationMode||No.presentationMode||yt.DROPDOWN,dataSource:k.dataSource||{type:"static",options:[]},...k,disabled:i||k.disabled,readonly:a||k.readonly};return!R.dataSource&&W.length>0&&(R.dataSource={type:"static",options:W.map(U=>({label:String(U.label),value:U.value}))}),R.dataSource||(R.dataSource={type:"static",options:[]}),R},[f,i,a]),m=j.useMemo(()=>p.multiple!==void 0?p.multiple:!!(p.presentationMode&&I1(p.presentationMode)||(r==null?void 0:r.type)==="array"||r!=null&&r.items),[p.multiple,p.presentationMode,r]),y=dt(t,r),_=j.useCallback((k,W)=>{var J;if(!((J=p.search)!=null&&J.enabled)||!W||W.length<(p.search.minLength||1))return k;const R=p.search.caseSensitive?W:W.toLowerCase(),U=p.search.searchFields||["label"];return k.filter(L=>{var D;return(D=p.search)!=null&&D.customFilter?p.search.customFilter(L,W):U.some(z=>{var F,V;let B;switch(z){case"label":{B=L.label;break}case"value":{B=String(L.value);break}case"description":{B=(F=L.metadata)==null?void 0:F.description;break}default:{B=void 0;break}}return B?((V=p.search)!=null&&V.caseSensitive?B:B.toLowerCase()).includes(R):!1})})},[p.search]),{options:w,loading:v,error:g,metrics:C}=dc(p.dataSource||{type:"static",options:[]},{onLoadingStart:()=>{A(k=>({...k,loading:{isLoading:!0,message:"Loading options..."}}))},onLoadingComplete:(k,W)=>{A(R=>({...R,options:W,filteredOptions:_(W,R.searchTerm),loading:{isLoading:!1}}))},onError:(k,W)=>{A(R=>({...R,error:{hasError:!0,message:W.message,recoverable:!0,timestamp:Date.now()}}))}}),S=j.useMemo(()=>{const k=p.presentationMode||yt.DROPDOWN,W=fz[k];return W?W():(console.error(`Unknown presentation mode: ${k}`),new hh)},[p.presentationMode]),[E,A]=j.useState(()=>{const k=N(n,m);return{options:w,selectedValues:k,loading:v,error:g,searchTerm:"",filteredOptions:w,isOpen:!1,focusedOptionIndex:-1}}),x=j.useRef(E);x.current=E,j.useEffect(()=>{A(k=>({...k,options:w,filteredOptions:_(w,k.searchTerm),loading:v,error:g}))},[w,v,g,_]),j.useEffect(()=>{const k=N(n,m);A(W=>JSON.stringify(W.selectedValues)!==JSON.stringify(k)?{...W,selectedValues:k}:W)},[n,m]),j.useEffect(()=>{d&&d.length>0&&A(k=>({...k,error:{hasError:!0,message:d.join(", "),recoverable:!0,timestamp:Date.now()}}))},[d]);function N(k,W){return k==null||k===""?[]:W?Array.isArray(k)?k.filter(R=>R!=null&&R!==""):[k]:Array.isArray(k)?k.length>0?[k[0]]:[]:[k]}function Z(k,W){return W?k:k.length>0?k[0]:void 0}const G=j.useCallback(async k=>{var U,J;const W=S.handleSelectionChange(k,e,x.current);A(L=>({...L,selectedValues:W}));const R=Z(W,m);s(R),await y.onChange(R),(J=(U=e.eventHandlers)==null?void 0:U.onSelectionChange)==null||J.call(U,W,x.current.options)},[S,e,m,s,y]),H=j.useCallback(k=>{var W,R;A(U=>{const J=_(U.options,k);return{...U,searchTerm:k,filteredOptions:J,focusedOptionIndex:J.length>0?0:-1}}),(R=(W=e.eventHandlers)==null?void 0:W.onSearchChange)==null||R.call(W,k)},[e.eventHandlers,_]),ee=j.useCallback(async k=>{var W,R;u==null||u(t,k.target.value),y.onFocus&&await y.onFocus(t),(R=(W=e.eventHandlers)==null?void 0:W.onFocus)==null||R.call(W,k)},[t,u,y,e.eventHandlers]),te=j.useCallback(async k=>{var W,R,U;if((W=p.validation)!=null&&W.validateOnBlur){const J=S.validateSelection(x.current.selectedValues,x.current.options,p);J&&A(L=>({...L,error:{hasError:!0,message:J,recoverable:!0,timestamp:Date.now()}}))}l==null||l(t,k.target.value),y.onBlur&&await y.onBlur(t),(U=(R=e.eventHandlers)==null?void 0:R.onBlur)==null||U.call(R,k)},[t,p,S,l,y,e.eventHandlers]),ae=j.useMemo(()=>({onFocus:ee,onBlur:te,onChange:G,onSearch:H}),[ee,te,G,H]),Q=j.useMemo(()=>Z(E.selectedValues,m),[E.selectedValues,m]);return{options:E.filteredOptions,presenter:S,state:E,setState:j.useCallback(k=>{A(W=>({...W,...k}))},[]),value:Q,handleChange:G,eventHandlers:ae,isMultiSelect:m,isLoading:E.loading.isLoading,hasError:E.error.hasError,metrics:C}}function dz(e,t){const[r,n]=j.useState(null),i=hc(e),a=j.useCallback(async l=>{try{await i.handleChange(l)}catch(u){const f=u instanceof Error?u:new Error(String(u));n(f),t==null||t(f)}},[i,t]);return j.useMemo(()=>r?{error:r}:{...i,handleChange:a},[i,r,a])}function hz(e,t){const r=j.useRef(Date.now()),n=j.useRef(0),[i,a]=j.useState({initialLoadTime:0,renderCount:0,averageRenderTime:0,lastRenderTime:0});j.useEffect(()=>{n.current++;const l=Date.now()-r.current;a(u=>({initialLoadTime:u.initialLoadTime||l,renderCount:n.current,averageRenderTime:(u.averageRenderTime*(n.current-1)+l)/n.current,lastRenderTime:l})),r.current=Date.now()},[]);const s=hc(e);return j.useEffect(()=>{t&&t(s.metrics)},[s.metrics,t]),{...s,performanceMetrics:i}}class pz extends j.Component{constructor(r){super(r);pe(this,"retryCount",0);pe(this,"maxRetries",3);pe(this,"handleRetry",()=>{var r,n;this.retryCount<this.maxRetries&&(this.retryCount++,console.log(`[ChoiceWidget] Retrying... (${this.retryCount}/${this.maxRetries})`),this.setState({hasError:!1,error:void 0,errorInfo:void 0}),(n=(r=this.props).onRetry)==null||n.call(r))});this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var i,a;console.error("[ChoiceWidget] Error boundary caught error:",r,n),this.setState({error:r,errorInfo:n}),(a=(i=this.props).onError)==null||a.call(i,r,n);try{const s=window.__EXTENDED_FORMS_EVENT_HUB__;s&&s.emitErrorEvent({component:"ChoiceWidget",error:r.message,stack:r.stack,timestamp:Date.now()})}catch(s){console.error("[ChoiceWidget] Failed to report error to event hub:",s)}}render(){if(this.state.hasError){const{fallback:r}=this.props,{error:n}=this.state;return r&&n?$.jsx(r,{error:n,retry:this.handleRetry}):$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Choice Widget Error",description:$.jsxs("div",{children:[$.jsx("p",{children:"An error occurred while rendering the choice widget."}),n&&$.jsxs("details",{style:{marginTop:8,fontSize:"12px",color:"#666"},children:[$.jsx("summary",{children:"Error Details"}),$.jsxs("pre",{style:{marginTop:4,whiteSpace:"pre-wrap"},children:[n.message,process.env.NODE_ENV==="development"&&n.stack&&$.jsxs($.Fragment,{children:[$.jsx("br",{}),$.jsx("br",{}),"Stack trace:",$.jsx("br",{}),n.stack]})]})]}),this.retryCount<this.maxRetries&&$.jsxs("button",{onClick:this.handleRetry,style:{marginTop:8,padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer"},children:["Retry (",this.maxRetries-this.retryCount," attempts left)"]})]}),style:{margin:"8px 0"}})}return this.props.children}}const mz=({error:e,retry:t})=>$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Widget Error",description:$.jsxs("div",{children:[$.jsxs("p",{children:["The choice widget encountered an error: ",e.message]}),$.jsx("button",{onClick:t,style:{marginTop:8,padding:"4px 12px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer"},children:"Try Again"})]})}),W1=e=>{const{id:t,value:r,onChange:n,options:i,schema:a,disabled:s,readonly:l}=e,u=dt(t,a),f=j.useMemo(()=>i!=null&&i.enumOptions?i.enumOptions:a!=null&&a.enum&&(a!=null&&a.enumNames)?a.enum.map((y,_)=>{var w;return{label:((w=a.enumNames)==null?void 0:w[_])||String(y),value:y}}):a!=null&&a.oneOf?a.oneOf.filter(y=>typeof y=="object"&&y!==null).map(y=>({label:y.title||String(y.const),value:y.const})):[],[i==null?void 0:i.enumOptions,a==null?void 0:a.enum,a==null?void 0:a.enumNames,a==null?void 0:a.oneOf]),d=j.useCallback(async y=>{const _=y.target.value;n==null||n(_),await u.onChange(_)},[n,u]),p=j.useCallback(async()=>{await u.onFocus(t)},[u,t]),m=j.useCallback(async()=>{await u.onBlur(r)},[u,r]);return $.jsxs("div",{style:{border:"1px solid #ff4d4f",borderRadius:"4px",padding:"4px"},children:[$.jsx("div",{style:{fontSize:"12px",color:"#ff4d4f",marginBottom:"4px"},children:"Fallback Mode: Basic HTML Select"}),$.jsxs("select",{id:t,value:String(r||""),onChange:d,onFocus:p,onBlur:m,disabled:s||l,style:{width:"100%",padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:l?"#f5f5f5":"#fff"},children:[$.jsx("option",{value:"",children:"Select an option..."}),f.map((y,_)=>$.jsx("option",{value:String(y.value),children:y.label},`${y.value}-${_}`))]})]})},gz=({loading:e,children:t})=>e.isLoading?$.jsxs("div",{style:{position:"relative",minHeight:"32px"},children:[$.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(255, 255, 255, 0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},children:$.jsx(re.Spin,{size:"small",tip:e.message||"Loading options..."})}),$.jsx("div",{style:{opacity:.5},children:t})]}):$.jsx($.Fragment,{children:t}),yz=({error:e,onRetry:t,onClear:r})=>e.hasError?$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Data Error",description:$.jsxs("div",{children:[$.jsx("p",{children:e.message}),$.jsxs("div",{style:{marginTop:8},children:[e.recoverable&&t&&$.jsx("button",{onClick:t,style:{marginRight:8,padding:"2px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer",fontSize:"12px"},children:"Retry"}),r&&$.jsx("button",{onClick:r,style:{padding:"2px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer",fontSize:"12px"},children:"Dismiss"})]})]}),style:{marginBottom:"8px"}}):null,vz=e=>{var E;const{id:t,schema:r,disabled:n,readonly:i,rawErrors:a}=e,{presenter:s,state:l,setState:u,isMultiSelect:f,isLoading:d,hasError:p,metrics:m}=hc(e),y=j.useMemo(()=>{var x;const A=((x=e.options)==null?void 0:x.choiceConfig)||{};return{...No,...A,disabled:n||A.disabled,readonly:i||A.readonly}},[e.options,n,i]),_=j.useCallback(()=>{u({error:{hasError:!1,message:""}}),m&&m.refresh&&m.refresh()},[u,m]),w=j.useCallback(()=>{u({error:{hasError:!1,message:""}})},[u]),v=j.useMemo(()=>Date.now(),[]);j.useEffect(()=>{if(process.env.NODE_ENV==="development"){const A=Date.now()-v;A>200&&console.warn(`[ChoiceWidget] Slow render detected: ${A}ms (target: <200ms)`,{id:t,presentationMode:y.presentationMode})}},[v,t,y.presentationMode]),j.useEffect(()=>{var A;if((A=y.accessibility)!=null&&A.announceChanges&&p){const x=`Error in ${(r==null?void 0:r.title)||"choice widget"}: ${l.error.message}`,N=document.createElement("div");N.setAttribute("aria-live","polite"),N.setAttribute("aria-atomic","true"),N.style.position="absolute",N.style.left="-10000px",N.style.width="1px",N.style.height="1px",N.style.overflow="hidden",document.body.appendChild(N),setTimeout(()=>{N.textContent=x,setTimeout(()=>{document.body.removeChild(N)},1e3)},100)}},[p,l.error.message,r==null?void 0:r.title,(E=y.accessibility)==null?void 0:E.announceChanges]);const g=j.useCallback(()=>{try{if(!s)throw new Error("No presenter available for current configuration");return s.render(e,l)}catch(A){return console.error("[ChoiceWidget] Presenter render error:",A),$.jsx(W1,{...e})}},[s,e,l]),C=j.useMemo(()=>{const A=$.jsx(yz,{error:l.error,onRetry:_,onClear:w}),x=$.jsx(gz,{loading:l.loading,children:g()});return $.jsxs($.Fragment,{children:[A,x]})},[l.error,l.loading,g,_,w]),S=j.useMemo(()=>({...y.style||{},...a&&a.length>0&&{border:"1px solid #ff4d4f",borderRadius:"4px"}}),[y.style,a]);return $.jsx("div",{id:`${t}-wrapper`,className:`choice-widget-wrapper ${y.className||""}`,style:S,"data-testid":`choice-widget-${t}`,"data-presentation-mode":y.presentationMode,"data-multi-select":f,"data-loading":d,"data-error":p,children:C})},Rn=e=>{var a,s,l,u,f;const[t,r]=j.useState(null),n=j.useCallback(()=>{r(null)},[]),i=j.useCallback((d,p)=>{var m,y,_,w,v;console.error("[ChoiceWidget] Error boundary triggered:",{error:d.message,stack:d.stack,componentStack:p.componentStack,props:{id:e.id,presentationMode:(y=(m=e.options)==null?void 0:m.choiceConfig)==null?void 0:y.presentationMode,dataSourceType:(v=(w=(_=e.options)==null?void 0:_.choiceConfig)==null?void 0:w.dataSource)==null?void 0:v.type}})},[e.id,(s=(a=e.options)==null?void 0:a.choiceConfig)==null?void 0:s.presentationMode,(f=(u=(l=e.options)==null?void 0:l.choiceConfig)==null?void 0:u.dataSource)==null?void 0:f.type]);return j.useEffect(()=>{try{if(!e.id)throw new Error("ChoiceWidget requires an id prop");if(!e.onChange)throw new Error("ChoiceWidget requires an onChange prop");r(null)}catch(d){r(d instanceof Error?d:new Error(String(d)))}},[e.id,e.onChange]),t?$.jsx(W1,{...e}):$.jsx(pz,{fallback:mz,onError:i,onRetry:n,children:$.jsx(vz,{...e})})},ph=(e={})=>({...No,...e,dataSource:{type:"static",options:[],...e.dataSource}}),bz=(e,t=!1,r)=>t?yt.CHECKBOX:r!=null&&r.preferRadio?yt.RADIO:r!=null&&r.preferDropdown?yt.DROPDOWN:e<=4?yt.RADIO:yt.DROPDOWN,_z=(e,t={})=>{const r=ph({dataSource:{type:"static",options:e.map(n=>({label:n.label,value:n.value}))}});return t["ui:widget"]==="radio"?r.presentationMode=yt.RADIO:t["ui:widget"]==="checkboxes"&&(r.presentationMode=yt.CHECKBOX,r.multiple=!0),typeof t.placeholder=="string"&&(r.placeholder=t.placeholder),typeof t.disabled=="boolean"&&(r.disabled=t.disabled),r},$z=e=>({widgets:{choice:Rn,ChoiceWidget:Rn,select:Rn,radio:Rn,checkboxes:Rn},uiSchema:{"ui:widget":"choice","ui:options":{choiceConfig:ph(e)}}}),wz={text:()=>Promise.resolve().then(()=>S1).then(e=>e.default),TextWidget:()=>Promise.resolve().then(()=>S1).then(e=>e.default),textarea:()=>Promise.resolve().then(()=>C1).then(e=>e.default),TextareaWidget:()=>Promise.resolve().then(()=>C1).then(e=>e.default),password:()=>Promise.resolve().then(()=>E1).then(e=>e.default),PasswordWidget:()=>Promise.resolve().then(()=>E1).then(e=>e.default)},q1={choice:Rn,color:_1,range:rh,slider:rh,rating:w1,text:xo,TextWidget:xo,textarea:Do,TextareaWidget:Do,password:Fo,PasswordWidget:Fo,UpDownWidget:ic,number:ic,NumberWidget:ic,tel:ac,TelWidget:ac,TelephoneWidget:ac,email:nh,EmailWidget:nh,url:ih,URLWidget:ih,date:ah,DateWidget:ah,"datetime-local":oh,DateTimeWidget:oh,file:A1,FileWidget:sc,fileUpload:sc,FileUploadWidget:sc};class mh{constructor(t,r={},n=[],i){pe(this,"formHandlers");pe(this,"fieldHandlers");pe(this,"webhooks");pe(this,"debounceTimers",new Map);pe(this,"webhookQueue",[]);pe(this,"isProcessingQueue",!1);pe(this,"webhookCallbacks");this.formHandlers=t,this.fieldHandlers=r,this.webhooks=n,this.webhookCallbacks=i}updateWebhooks(t){console.log("📌 FormEventHub.updateWebhooks called with:",t),this.webhooks=t}updateCallbacks(t){this.webhookCallbacks=t}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t);const r=this.createStandardizedPayload({eventType:"submit",formData:t});this.processWebhooks(r)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,r){if(this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,r),t&&Object.keys(t).length>0){const n=this.createStandardizedPayload({eventType:"validationError",errors:this.formatValidationErrors(t),formData:r});this.processWebhooks(n)}}async handleStepChange(t,r,n){const i=this.createStandardizedPayload({eventType:"stepChange",fromStep:t,toStep:r,formData:n});console.log("🔵 handleStepChange called:",{fromStep:t,toStep:r,eventType:"stepChange"}),this.processWebhooks(i)}async handleFieldEvent(t,r,n,i,a,s){const l={eventType:t,fieldId:r,fieldValue:n,schema:i,formData:a,timestamp:Date.now(),fieldPath:s};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(l);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(l);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(l);break}}catch(f){console.error(`Error in field event handler (${t}):`,f)}const u=this.createStandardizedPayload(l);this.processWebhooks(u)}processWebhooks(t){var n,i;if(console.log(`🔍 processWebhooks called for ${t.eventType}. Total webhooks:`,((n=this.webhooks)==null?void 0:n.length)||0),!((i=this.webhooks)!=null&&i.length)){console.log("🔴 No webhooks configured");return}const r=this.webhooks.filter(a=>{var s;return console.log("🔍 Checking webhook events:",a.events,"against event type:",t.eventType),(s=a.events)!=null&&s.length?a.events.includes(t.eventType):!0});console.log(`🟡 Processing ${t.eventType} event, found ${r.length} relevant webhooks`),r.forEach(a=>{a.debounceMs&&(t.fieldId||a.debounceMs>0)?(console.log(`🟠 Debouncing webhook for ${t.eventType} with ${a.debounceMs}ms delay`),this.debounceWebhook(a,t)):(console.log(`🟢 Queueing webhook immediately for ${t.eventType}`),this.queueWebhook(a,t))})}debounceWebhook(t,r){const n=this.generateDebounceKey(t,r);this.debounceTimers.has(n)&&(clearTimeout(this.debounceTimers.get(n)),console.log(`🔶 Cleared existing debounce timer for key: ${n}`));const i=setTimeout(()=>{console.log(`⏰ Debounce timer fired for ${r.eventType}, queueing webhook`),this.queueWebhook(t,r),this.debounceTimers.delete(n)},t.debounceMs);this.debounceTimers.set(n,i),console.log(`⏱️ Set debounce timer for ${t.debounceMs}ms, key: ${n}`)}queueWebhook(t,r){this.webhookQueue.push({config:t,event:r,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(r){const n=t.config.retries||3;t.retryCount<n?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${n} retries:`,r)}}this.isProcessingQueue=!1}}cleanEventForWebhook(t){const{schema:r,uiSchema:n,errorSchema:i,idSchema:a,schemaUtils:s,...l}=t;if(l.fieldValue&&typeof l.fieldValue=="object"){const{schema:u,uiSchema:f,errorSchema:d,idSchema:p,schemaUtils:m,...y}=l.fieldValue;l.fieldValue=y}return l.formData&&typeof l.formData=="object"&&(l.formData=this.deepCleanObject(l.formData,new WeakSet)),l}deepCleanObject(t,r=new WeakSet){if(t===null||typeof t!="object")return t;if(r.has(t))return"[Circular Reference]";if(r.add(t),Array.isArray(t))return t.map(i=>this.deepCleanObject(i,r));const n={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&i!=="schema"&&i!=="uiSchema"&&i!=="errorSchema"&&i!=="idSchema"&&i!=="schemaUtils"&&i!=="registry"&&i!=="rootSchema"&&i!=="validator"&&(n[i]=this.deepCleanObject(t[i],r));return n}async callWebhook(t,r){var n,i,a,s,l,u;try{(i=(n=this.webhookCallbacks)==null?void 0:n.onWebhookStart)==null||i.call(n,t,this.cleanEventForWebhook(r));const f={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(this.cleanEventForWebhook(r))};t.timeout&&(f.signal=AbortSignal.timeout(t.timeout));const d=await fetch(t.url,f);if(!d.ok)throw new Error(`Webhook request failed: ${d.status} ${d.statusText}`);(s=(a=this.webhookCallbacks)==null?void 0:a.onWebhookComplete)==null||s.call(a,t,this.cleanEventForWebhook(r),d)}catch(f){throw(u=(l=this.webhookCallbacks)==null?void 0:l.onWebhookError)==null||u.call(l,t,this.cleanEventForWebhook(r),f),f}}createFieldEventHandlers(t,r,n,i){return{onFocus:a=>this.handleFieldEvent("focus",t,a,r,n,i),onBlur:a=>this.handleFieldEvent("blur",t,a,r,n,i),onChange:a=>this.handleFieldEvent("change",t,a,r,n,i)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}formatValidationErrors(t){const r=[];return Object.keys(t).forEach(n=>{const i=t[n];i.__errors&&i.__errors.forEach((a,s)=>{var l;r.push({property:n,message:a,name:i.name||"validation_error",argument:(l=i.params)==null?void 0:l[s],stack:`${n} ${a}`,schemaPath:`#/properties/${n.replace(/\./g,"/properties/")}`})})}),r}generateDebounceKey(t,r){return r.fieldId?`${t.url}-${r.eventType}-${r.fieldId}`:`${t.url}-${r.eventType}`}createStandardizedPayload(t){const r={eventType:t.eventType,timestamp:t.timestamp||Date.now(),formData:t.formData,source:"extended-dynamic-forms"};switch(t.eventType){case"focus":case"blur":case"change":return{...r,fieldId:t.fieldId,fieldValue:t.fieldValue,fieldPath:t.fieldPath};case"submit":return r;case"stepChange":return{...r,fromStep:t.fromStep,toStep:t.toStep};case"validationError":return{...r,errors:t.errors};default:return{...r,...t}}}}var V1={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Nr,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function r(a){for(var s=[],l=0,u=a.length;l<u;l++)s.indexOf(a[l])===-1&&s.push(a[l]);return s}var n={},i={"==":function(a,s){return a==s},"===":function(a,s){return a===s},"!=":function(a,s){return a!=s},"!==":function(a,s){return a!==s},">":function(a,s){return a>s},">=":function(a,s){return a>=s},"<":function(a,s,l){return l===void 0?a<s:a<s&&s<l},"<=":function(a,s,l){return l===void 0?a<=s:a<=s&&s<=l},"!!":function(a){return n.truthy(a)},"!":function(a){return!n.truthy(a)},"%":function(a,s){return a%s},log:function(a){return console.log(a),a},in:function(a,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,s,l){if(l<0){var u=String(a).substr(s);return u.substr(0,u.length+l)}return String(a).substr(s,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)*parseFloat(s,10)})},"-":function(a,s){return s===void 0?-a:a-s},"/":function(a,s){return a/s},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,s){return a.concat(s)},[])},var:function(a,s){var l=s===void 0?null:s,u=this;if(typeof a>"u"||a===""||a===null)return u;for(var f=String(a).split("."),d=0;d<f.length;d++)if(u==null||(u=u[f[d]],u===void 0))return l;return u},missing:function(){for(var a=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<s.length;l++){var u=s[l],f=n.apply({var:u},this);(f===null||f==="")&&a.push(u)}return a},missing_some:function(a,s){var l=n.apply({missing:s},this);return s.length-l.length>=a?[]:l}};return n.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},n.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},n.get_operator=function(a){return Object.keys(a)[0]},n.get_values=function(a){return a[n.get_operator(a)]},n.apply=function(a,s){if(Array.isArray(a))return a.map(function(v){return n.apply(v,s)});if(!n.is_logic(a))return a;var l=n.get_operator(a),u=a[l],f,d,p,m,y;if(Array.isArray(u)||(u=[u]),l==="if"||l=="?:"){for(f=0;f<u.length-1;f+=2)if(n.truthy(n.apply(u[f],s)))return n.apply(u[f+1],s);return u.length===f+1?n.apply(u[f],s):null}else if(l==="and"){for(f=0;f<u.length;f+=1)if(d=n.apply(u[f],s),!n.truthy(d))return d;return d}else if(l==="or"){for(f=0;f<u.length;f+=1)if(d=n.apply(u[f],s),n.truthy(d))return d;return d}else{if(l==="filter")return m=n.apply(u[0],s),p=u[1],Array.isArray(m)?m.filter(function(v){return n.truthy(n.apply(p,v))}):[];if(l==="map")return m=n.apply(u[0],s),p=u[1],Array.isArray(m)?m.map(function(v){return n.apply(p,v)}):[];if(l==="reduce")return m=n.apply(u[0],s),p=u[1],y=typeof u[2]<"u"?n.apply(u[2],s):null,Array.isArray(m)?m.reduce(function(v,g){return n.apply(p,{current:g,accumulator:v})},y):y;if(l==="all"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!1;for(f=0;f<m.length;f+=1)if(!n.truthy(n.apply(p,m[f])))return!1;return!0}else if(l==="none"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!0;for(f=0;f<m.length;f+=1)if(n.truthy(n.apply(p,m[f])))return!1;return!0}else if(l==="some"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!1;for(f=0;f<m.length;f+=1)if(n.truthy(n.apply(p,m[f])))return!0;return!1}}if(u=u.map(function(v){return n.apply(v,s)}),i.hasOwnProperty(l)&&typeof i[l]=="function")return i[l].apply(s,u);if(l.indexOf(".")>0){var _=String(l).split("."),w=i;for(f=0;f<_.length;f++){if(!w.hasOwnProperty(_[f]))throw new Error("Unrecognized operation "+l+" (failed at "+_.slice(0,f+1).join(".")+")");w=w[_[f]]}return w.apply(s,u)}throw new Error("Unrecognized operation "+l)},n.uses_data=function(a){var s=[];if(n.is_logic(a)){var l=n.get_operator(a),u=a[l];Array.isArray(u)||(u=[u]),l==="var"?s.push(u[0]):u.forEach(function(f){s.push.apply(s,n.uses_data(f))})}return r(s)},n.add_operation=function(a,s){i[a]=s},n.rm_operation=function(a){delete i[a]},n.rule_like=function(a,s){if(s===a||s==="@")return!0;if(s==="number")return typeof a=="number";if(s==="string")return typeof a=="string";if(s==="array")return Array.isArray(a)&&!n.is_logic(a);if(n.is_logic(s)){if(n.is_logic(a)){var l=n.get_operator(s),u=n.get_operator(a);if(l==="@"||l===u)return n.rule_like(n.get_values(a,!1),n.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(a)){if(s.length!==a.length)return!1;for(var f=0;f<s.length;f+=1)if(!n.rule_like(a[f],s[f]))return!1;return!0}else return!1;return!1},n})})(V1);var Sz=V1.exports;const R1=Qt(Sz);function pc(e){return function(r,n,i){return j.useMemo(()=>{let a=n||e.defaultConfig();const s=[...r].sort((u,f)=>{const d=u.order??Number.MAX_SAFE_INTEGER,p=f.order??Number.MAX_SAFE_INTEGER;return d-p}),l=[];for(const u of s)try{let f=!1;typeof u.condition=="function"?f=u.condition(i):f=R1.apply(u.condition,i),f&&l.push(u.effect)}catch(f){process.env.NODE_ENV!=="production"&&console.error(`[ConditionalEngine] Error evaluating rule "${u.name}":`,f)}if(l.length>0)try{a=e.applyEffects(l,a,i)}catch(u){return process.env.NODE_ENV!=="production"&&console.error("[ConditionalEngine] Error applying effects:",u),n||e.defaultConfig()}return a},[r,n,i,e])}}function Cz(e,t){const r=gh(e);for(const n of t)try{switch(n.op){case"add":Ez(r,n.path,n.value);break;case"remove":Oz(r,n.path);break;case"replace":Az(r,n.path,n.value);break;default:console.warn(`Unknown operation: ${n.op}`)}}catch(i){process.env.NODE_ENV!=="production"&&console.error("Error applying patch operation:",n,i)}return r}function gh(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(r=>gh(r));const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=gh(e[r]));return t}function yh(e){return e.replace(/^\//,"").split("/").filter(Boolean)}function Ez(e,t,r){const n=yh(t),i=n.pop();if(!i)throw new Error("Invalid path");let a=e;for(const s of n)s in a||(a[s]={}),a=a[s];i==="-"&&Array.isArray(a)?a.push(r):a[i]=r}function Oz(e,t){const r=yh(t),n=r.pop();if(!n)throw new Error("Invalid path");let i=e;for(const a of r){if(!(a in i))return;i=i[a]}if(Array.isArray(i)){const a=parseInt(n,10);isNaN(a)||i.splice(a,1)}else delete i[n]}function Az(e,t,r){const n=yh(t),i=n.pop();if(!i)throw new Error("Invalid path");let a=e;for(const s of n){if(!(s in a))return;a=a[s]}a[i]=r}const z1={defaultConfig:()=>({}),applyEffects:(e,t,r)=>{const n=e.flat();return Cz(t,n)}},Tz=pc(z1);function Pz(e){return e.op==="require"||e.op==="optional"}function Iz(e){return JSON.parse(JSON.stringify(e))}function xz(e,t){const r=t.split("/").filter(Boolean);let n=e;for(const i of r)if(n&&typeof n=="object")n=n[i];else return;return n}function Dz(e,t,r){const n=t.split("/").filter(Boolean);let i=e;for(let a=0;a<n.length-1;a++){const s=n[a],l=n[a+1];!i[s]&&l==="-"?i[s]=[]:(!i[s]||typeof i[s]!="object")&&(i[s]={}),i=i[s]}if(n.length>0){const a=n[n.length-1];a==="-"&&Array.isArray(i)?i.push(r):i[a]=r}}function Fz(e,t){const r=t.split("/").filter(Boolean);let n=e;for(let i=0;i<r.length-1;i++){const a=r[i];if(!n[a]||typeof n[a]!="object")return;n=n[a]}r.length>0&&delete n[r[r.length-1]]}function Nz(e,t){switch(t.op){case"add":case"replace":Dz(e,t.path,t.value);break;case"remove":Fz(e,t.path);break}}function Mz(e,t){const r=Iz(e);for(const n of t)if(Pz(n)){const i=n.path||"",a=i?xz(r,i):r;if(a&&a.properties&&a.properties[n.field])switch(n.op){case"require":a.required||(a.required=[]),a.required.includes(n.field)||a.required.push(n.field);break;case"optional":a.required&&Array.isArray(a.required)&&(a.required=a.required.filter(s=>s!==n.field));break}}else Nz(r,n);return r}const H1={defaultConfig:()=>({type:"object",properties:{}}),applyEffects:(e,t,r)=>{const n=e.flat();return Mz(t,n)}},kz=pc(H1),K1={defaultConfig:()=>({rules:[]}),applyEffects:(e,t,r)=>{const n=e.filter(i=>{try{return typeof i.isActive=="function"?i.isActive(r):R1.apply(i.isActive,r)}catch(a){return console.error(`Error evaluating validation rule '${i.name}':`,a),!1}});return{rules:[...t.rules,...n]}}};function Lz(e){return(t,r)=>{for(const n of e.rules)try{n.validate(r,t)}catch(i){console.error(`Error in validation rule '${n.name}':`,i)}return r}}const jz=pc(K1);function Bz(e,t){return(r,n,i)=>{const a=t(r,n,i);return vh(e,a)}}function vh(e,t){const r={...e};for(const[n,i]of Object.entries(t))i!==void 0&&(typeof i=="object"&&i!==null&&!Array.isArray(i)&&typeof r[n]=="object"&&r[n]!==null&&!Array.isArray(r[n])?r[n]=vh(r[n],i):r[n]=i);return r}const Uz={hideField:(e,t)=>r=>t(r)?{[e]:{"ui:widget":"hidden"}}:{},requireField:(e,t)=>r=>t(r)?{[e]:{"ui:required":!0}}:{},applyIndexStyles:e=>(t,r)=>{const n=[];return r===0&&n.push("first-item"),r===e-1&&n.push("last-item"),n.length>0?{"ui:classNames":n.join(" ")}:{}}},G1={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const r=t.split(".");let n=e;for(const i of r)if(n&&typeof n=="object"&&i in n)n=n[i];else return;return n},setNestedValue:(e,t,r)=>{const n=t.split("."),i={...e};let a=i;for(let s=0;s<n.length-1;s++){const l=n[s];(!(l in a)||typeof a[l]!="object")&&(a[l]={}),a=a[l]}return a[n[n.length-1]]=r,i},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))n!=null&&n!==""&&(t[r]=G1.removeEmptyValues(n));return t}return e}},Y1={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const r=t.split(".");let n=e;for(const i of r)if(n.type==="object"&&n.properties)n=n.properties[i];else if(n.type==="array"&&n.items)n=n.items;else return;return n},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const r=[];if(e.type==="object"&&e.properties)for(const[n,i]of Object.entries(e.properties)){const a=t?`${t}.${n}`:n;r.push(a),r.push(...Y1.getAllFieldPaths(i,a))}return r}},Wz={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,r)=>!(t!==void 0&&e<t||r!==void 0&&e>r),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"};function J1(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(typeof e!="object"||typeof t!="object")return e===t;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r)if(!n.includes(i)||!J1(e[i],t[i]))return!1;return!0}var bh={exports:{}},X1={},kr={},$a={},Lo={},De={},jo={};(function(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 t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((S,E)=>`${S}${E}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((S,E)=>(E instanceof r&&(S[E.str]=(S[E.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function i(g,...C){const S=[g[0]];let E=0;for(;E<C.length;)l(S,C[E]),S.push(g[++E]);return new n(S)}e._=i;const a=new n("+");function s(g,...C){const S=[y(g[0])];let E=0;for(;E<C.length;)S.push(a),l(S,C[E]),S.push(a,y(g[++E]));return u(S),new n(S)}e.str=s;function l(g,C){C instanceof n?g.push(...C._items):C instanceof r?g.push(C):g.push(p(C))}e.addCodeArg=l;function u(g){let C=1;for(;C<g.length-1;){if(g[C]===a){const S=f(g[C-1],g[C+1]);if(S!==void 0){g.splice(C-1,3,S);continue}g[C++]="+"}C++}}function f(g,C){if(C==='""')return g;if(g==='""')return C;if(typeof g=="string")return C instanceof r||g[g.length-1]!=='"'?void 0:typeof C!="string"?`${g.slice(0,-1)}${C}"`:C[0]==='"'?g.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(g instanceof r))return`"${g}${C.slice(1)}`}function d(g,C){return C.emptyStr()?g:g.emptyStr()?C:s`${g}${C}`}e.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:y(Array.isArray(g)?g.join(","):g)}function m(g){return new n(y(g))}e.stringify=m;function y(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function _(g){return typeof g=="string"&&e.IDENTIFIER.test(g)?new n(`.${g}`):i`[${g}]`}e.getProperty=_;function w(g){if(typeof g=="string"&&e.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}e.getEsmExportName=w;function v(g){return new n(g.toString())}e.regexpCode=v})(jo);var _h={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=jo;class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:f,parent:d}={}){this._names={},this._prefixes=f,this._parent=d}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const d=this._names[f]||this._nameGroup(f);return`${f}${d.index++}`}_nameGroup(f){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=i;class a extends t.Name{constructor(f,d){super(d),this.prefix=f}setValue(f,{property:d,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(d)}[${p}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class l extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?s:t.nil}}get(){return this._scope}name(f){return new a(f,this._newName(f))}value(f,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(f),{prefix:y}=m,_=(p=d.key)!==null&&p!==void 0?p:d.ref;let w=this._values[y];if(w){const C=w.get(_);if(C)return C}else w=this._values[y]=new Map;w.set(_,m);const v=this._scope[y]||(this._scope[y]=[]),g=v.length;return v[g]=d.ref,m.setValue(d,{property:y,itemIndex:g}),m}getValue(f,d){const p=this._values[f];if(p)return p.get(d)}scopeRefs(f,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,d,p){return this._reduceValues(f,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},d,p)}_reduceValues(f,d,p={},m){let y=t.nil;for(const _ in f){const w=f[_];if(!w)continue;const v=p[_]=p[_]||new Map;w.forEach(g=>{if(v.has(g))return;v.set(g,n.Started);let C=d(g);if(C){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${S} ${g} = ${C};${this.opts._n}`}else if(C=m==null?void 0:m(g))y=(0,t._)`${y}${C}${this.opts._n}`;else throw new r(g);v.set(g,n.Completed)})}return y}}e.ValueScope=l})(_h),function(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;const t=jo,r=_h;var n=jo;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=_h;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(P,F){return this}}class s extends a{constructor(P,F,V){super(),this.varKind=P,this.name=F,this.rhs=V}render({es5:P,_n:F}){const V=P?r.varKinds.var:this.varKind,X=this.rhs===void 0?"":` = ${this.rhs}`;return`${V} ${this.name}${X};`+F}optimizeNames(P,F){if(P[this.name.str])return this.rhs&&(this.rhs=Q(this.rhs,P,F)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(P,F,V){super(),this.lhs=P,this.rhs=F,this.sideEffects=V}render({_n:P}){return`${this.lhs} = ${this.rhs};`+P}optimizeNames(P,F){if(!(this.lhs instanceof t.Name&&!P[this.lhs.str]&&!this.sideEffects))return this.rhs=Q(this.rhs,P,F),this}get names(){const P=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ae(P,this.rhs)}}class u extends l{constructor(P,F,V,X){super(P,V,X),this.op=F}render({_n:P}){return`${this.lhs} ${this.op}= ${this.rhs};`+P}}class f extends a{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`${this.label}:`+P}}class d extends a{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`break${this.label?` ${this.label}`:""};`+P}}class p extends a{constructor(P){super(),this.error=P}render({_n:P}){return`throw ${this.error};`+P}get names(){return this.error.names}}class m extends a{constructor(P){super(),this.code=P}render({_n:P}){return`${this.code};`+P}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(P,F){return this.code=Q(this.code,P,F),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends a{constructor(P=[]){super(),this.nodes=P}render(P){return this.nodes.reduce((F,V)=>F+V.render(P),"")}optimizeNodes(){const{nodes:P}=this;let F=P.length;for(;F--;){const V=P[F].optimizeNodes();Array.isArray(V)?P.splice(F,1,...V):V?P[F]=V:P.splice(F,1)}return P.length>0?this:void 0}optimizeNames(P,F){const{nodes:V}=this;let X=V.length;for(;X--;){const oe=V[X];oe.optimizeNames(P,F)||(k(P,oe.names),V.splice(X,1))}return V.length>0?this:void 0}get names(){return this.nodes.reduce((P,F)=>te(P,F.names),{})}}class _ extends y{render(P){return"{"+P._n+super.render(P)+"}"+P._n}}class w extends y{}class v extends _{}v.kind="else";class g extends _{constructor(P,F){super(F),this.condition=P}render(P){let F=`if(${this.condition})`+super.render(P);return this.else&&(F+="else "+this.else.render(P)),F}optimizeNodes(){super.optimizeNodes();const P=this.condition;if(P===!0)return this.nodes;let F=this.else;if(F){const V=F.optimizeNodes();F=this.else=Array.isArray(V)?new v(V):V}if(F)return P===!1?F instanceof g?F:F.nodes:this.nodes.length?this:new g(W(P),F instanceof g?[F]:F.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,F){var V;if(this.else=(V=this.else)===null||V===void 0?void 0:V.optimizeNames(P,F),!!(super.optimizeNames(P,F)||this.else))return this.condition=Q(this.condition,P,F),this}get names(){const P=super.names;return ae(P,this.condition),this.else&&te(P,this.else.names),P}}g.kind="if";class C extends _{}C.kind="for";class S extends C{constructor(P){super(),this.iteration=P}render(P){return`for(${this.iteration})`+super.render(P)}optimizeNames(P,F){if(super.optimizeNames(P,F))return this.iteration=Q(this.iteration,P,F),this}get names(){return te(super.names,this.iteration.names)}}class E extends C{constructor(P,F,V,X){super(),this.varKind=P,this.name=F,this.from=V,this.to=X}render(P){const F=P.es5?r.varKinds.var:this.varKind,{name:V,from:X,to:oe}=this;return`for(${F} ${V}=${X}; ${V}<${oe}; ${V}++)`+super.render(P)}get names(){const P=ae(super.names,this.from);return ae(P,this.to)}}class A extends C{constructor(P,F,V,X){super(),this.loop=P,this.varKind=F,this.name=V,this.iterable=X}render(P){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(P)}optimizeNames(P,F){if(super.optimizeNames(P,F))return this.iterable=Q(this.iterable,P,F),this}get names(){return te(super.names,this.iterable.names)}}class x extends _{constructor(P,F,V){super(),this.name=P,this.args=F,this.async=V}render(P){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(P)}}x.kind="func";class N extends y{render(P){return"return "+super.render(P)}}N.kind="return";class Z extends _{render(P){let F="try"+super.render(P);return this.catch&&(F+=this.catch.render(P)),this.finally&&(F+=this.finally.render(P)),F}optimizeNodes(){var P,F;return super.optimizeNodes(),(P=this.catch)===null||P===void 0||P.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(P,F){var V,X;return super.optimizeNames(P,F),(V=this.catch)===null||V===void 0||V.optimizeNames(P,F),(X=this.finally)===null||X===void 0||X.optimizeNames(P,F),this}get names(){const P=super.names;return this.catch&&te(P,this.catch.names),this.finally&&te(P,this.finally.names),P}}class G extends _{constructor(P){super(),this.error=P}render(P){return`catch(${this.error})`+super.render(P)}}G.kind="catch";class H extends _{render(P){return"finally"+super.render(P)}}H.kind="finally";class ee{constructor(P,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
109
- `:""},this._extScope=P,this._scope=new r.Scope({parent:P}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(P){return this._scope.name(P)}scopeName(P){return this._extScope.name(P)}scopeValue(P,F){const V=this._extScope.value(P,F);return(this._values[V.prefix]||(this._values[V.prefix]=new Set)).add(V),V}getScopeValue(P,F){return this._extScope.getValue(P,F)}scopeRefs(P){return this._extScope.scopeRefs(P,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(P,F,V,X){const oe=this._scope.toName(F);return V!==void 0&&X&&(this._constants[oe.str]=V),this._leafNode(new s(P,oe,V)),oe}const(P,F,V){return this._def(r.varKinds.const,P,F,V)}let(P,F,V){return this._def(r.varKinds.let,P,F,V)}var(P,F,V){return this._def(r.varKinds.var,P,F,V)}assign(P,F,V){return this._leafNode(new l(P,F,V))}add(P,F){return this._leafNode(new u(P,e.operators.ADD,F))}code(P){return typeof P=="function"?P():P!==t.nil&&this._leafNode(new m(P)),this}object(...P){const F=["{"];for(const[V,X]of P)F.length>1&&F.push(","),F.push(V),(V!==X||this.opts.es5)&&(F.push(":"),(0,t.addCodeArg)(F,X));return F.push("}"),new t._Code(F)}if(P,F,V){if(this._blockNode(new g(P)),F&&V)this.code(F).else().code(V).endIf();else if(F)this.code(F).endIf();else if(V)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(P){return this._elseNode(new g(P))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(P,F){return this._blockNode(P),F&&this.code(F).endFor(),this}for(P,F){return this._for(new S(P),F)}forRange(P,F,V,X,oe=this.opts.es5?r.varKinds.var:r.varKinds.let){const ue=this._scope.toName(P);return this._for(new E(oe,ue,F,V),()=>X(ue))}forOf(P,F,V,X=r.varKinds.const){const oe=this._scope.toName(P);if(this.opts.es5){const ue=F instanceof t.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,t._)`${ue}.length`,he=>{this.var(oe,(0,t._)`${ue}[${he}]`),V(oe)})}return this._for(new A("of",X,oe,F),()=>V(oe))}forIn(P,F,V,X=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(P,(0,t._)`Object.keys(${F})`,V);const oe=this._scope.toName(P);return this._for(new A("in",X,oe,F),()=>V(oe))}endFor(){return this._endBlockNode(C)}label(P){return this._leafNode(new f(P))}break(P){return this._leafNode(new d(P))}return(P){const F=new N;if(this._blockNode(F),this.code(P),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(P,F,V){if(!F&&!V)throw new Error('CodeGen: "try" without "catch" and "finally"');const X=new Z;if(this._blockNode(X),this.code(P),F){const oe=this.name("e");this._currNode=X.catch=new G(oe),F(oe)}return V&&(this._currNode=X.finally=new H,this.code(V)),this._endBlockNode(G,H)}throw(P){return this._leafNode(new p(P))}block(P,F){return this._blockStarts.push(this._nodes.length),P&&this.code(P).endBlock(F),this}endBlock(P){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const V=this._nodes.length-F;if(V<0||P!==void 0&&V!==P)throw new Error(`CodeGen: wrong number of nodes: ${V} vs ${P} expected`);return this._nodes.length=F,this}func(P,F=t.nil,V,X){return this._blockNode(new x(P,F,V)),X&&this.code(X).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(P=1){for(;P-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(P){return this._currNode.nodes.push(P),this}_blockNode(P){this._currNode.nodes.push(P),this._nodes.push(P)}_endBlockNode(P,F){const V=this._currNode;if(V instanceof P||F&&V instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${P.kind}/${F.kind}`:P.kind}"`)}_elseNode(P){const F=this._currNode;if(!(F instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=P,this}get _root(){return this._nodes[0]}get _currNode(){const P=this._nodes;return P[P.length-1]}set _currNode(P){const F=this._nodes;F[F.length-1]=P}}e.CodeGen=ee;function te(B,P){for(const F in P)B[F]=(B[F]||0)+(P[F]||0);return B}function ae(B,P){return P instanceof t._CodeOrName?te(B,P.names):B}function Q(B,P,F){if(B instanceof t.Name)return V(B);if(!X(B))return B;return new t._Code(B._items.reduce((oe,ue)=>(ue instanceof t.Name&&(ue=V(ue)),ue instanceof t._Code?oe.push(...ue._items):oe.push(ue),oe),[]));function V(oe){const ue=F[oe.str];return ue===void 0||P[oe.str]!==1?oe:(delete P[oe.str],ue)}function X(oe){return oe instanceof t._Code&&oe._items.some(ue=>ue instanceof t.Name&&P[ue.str]===1&&F[ue.str]!==void 0)}}function k(B,P){for(const F in P)B[F]=(B[F]||0)-(P[F]||0)}function W(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,t._)`!${z(B)}`}e.not=W;const R=D(e.operators.AND);function U(...B){return B.reduce(R)}e.and=U;const J=D(e.operators.OR);function L(...B){return B.reduce(J)}e.or=L;function D(B){return(P,F)=>P===t.nil?F:F===t.nil?P:(0,t._)`${z(P)} ${B} ${z(F)}`}function z(B){return B instanceof t.Name?B:(0,t._)`(${B})`}}(De);var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.checkStrictMode=ye.getErrorPath=ye.Type=ye.useFunc=ye.setEvaluated=ye.evaluatedPropsToName=ye.mergeEvaluated=ye.eachItem=ye.unescapeJsonPointer=ye.escapeJsonPointer=ye.escapeFragment=ye.unescapeFragment=ye.schemaRefOrVal=ye.schemaHasRulesButRef=ye.schemaHasRules=ye.checkUnknownRules=ye.alwaysValidSchema=ye.toHash=void 0;const et=De,qz=jo;function Vz(e){const t={};for(const r of e)t[r]=!0;return t}ye.toHash=Vz;function Rz(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Z1(e,t),!Q1(t,e.self.RULES.all))}ye.alwaysValidSchema=Rz;function Z1(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;const i=n.RULES.keywords;for(const a in t)i[a]||i$(e,`unknown keyword: "${a}"`)}ye.checkUnknownRules=Z1;function Q1(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}ye.schemaHasRules=Q1;function zz(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ye.schemaHasRulesButRef=zz;function Hz({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,et._)`${r}`}return(0,et._)`${e}${t}${(0,et.getProperty)(n)}`}ye.schemaRefOrVal=Hz;function Kz(e){return e$(decodeURIComponent(e))}ye.unescapeFragment=Kz;function Gz(e){return encodeURIComponent($h(e))}ye.escapeFragment=Gz;function $h(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ye.escapeJsonPointer=$h;function e$(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ye.unescapeJsonPointer=e$;function Yz(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}ye.eachItem=Yz;function t$({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,a,s,l)=>{const u=s===void 0?a:s instanceof et.Name?(a instanceof et.Name?e(i,a,s):t(i,a,s),s):a instanceof et.Name?(t(i,s,a),a):r(a,s);return l===et.Name&&!(u instanceof et.Name)?n(i,u):u}}ye.mergeEvaluated={props:t$({mergeNames:(e,t,r)=>e.if((0,et._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,et._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,et._)`${r} || {}`).code((0,et._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,et._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,et._)`${r} || {}`),wh(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:r$}),items:t$({mergeNames:(e,t,r)=>e.if((0,et._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,et._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,et._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,et._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function r$(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,et._)`{}`);return t!==void 0&&wh(e,r,t),r}ye.evaluatedPropsToName=r$;function wh(e,t,r){Object.keys(r).forEach(n=>e.assign((0,et._)`${t}${(0,et.getProperty)(n)}`,!0))}ye.setEvaluated=wh;const n$={};function Jz(e,t){return e.scopeValue("func",{ref:t,code:n$[t.code]||(n$[t.code]=new qz._Code(t.code))})}ye.useFunc=Jz;var Sh;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Sh||(ye.Type=Sh={}));function Xz(e,t,r){if(e instanceof et.Name){const n=t===Sh.Num;return r?n?(0,et._)`"[" + ${e} + "]"`:(0,et._)`"['" + ${e} + "']"`:n?(0,et._)`"/" + ${e}`:(0,et._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,et.getProperty)(e).toString():"/"+$h(e)}ye.getErrorPath=Xz;function i$(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ye.checkStrictMode=i$;var nn={};Object.defineProperty(nn,"__esModule",{value:!0});const Wt=De,Zz={data:new Wt.Name("data"),valCxt:new Wt.Name("valCxt"),instancePath:new Wt.Name("instancePath"),parentData:new Wt.Name("parentData"),parentDataProperty:new Wt.Name("parentDataProperty"),rootData:new Wt.Name("rootData"),dynamicAnchors:new Wt.Name("dynamicAnchors"),vErrors:new Wt.Name("vErrors"),errors:new Wt.Name("errors"),this:new Wt.Name("this"),self:new Wt.Name("self"),scope:new Wt.Name("scope"),json:new Wt.Name("json"),jsonPos:new Wt.Name("jsonPos"),jsonLen:new Wt.Name("jsonLen"),jsonPart:new Wt.Name("jsonPart")};nn.default=Zz,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=De,r=ye,n=nn;e.keywordError={message:({keyword:v})=>(0,t.str)`must pass "${v}" keyword validation`},e.keyword$DataError={message:({keyword:v,schemaType:g})=>g?(0,t.str)`"${v}" keyword must be ${g} ($data)`:(0,t.str)`"${v}" keyword is invalid ($data)`};function i(v,g=e.keywordError,C,S){const{it:E}=v,{gen:A,compositeRule:x,allErrors:N}=E,Z=p(v,g,C);S??(x||N)?u(A,Z):f(E,(0,t._)`[${Z}]`)}e.reportError=i;function a(v,g=e.keywordError,C){const{it:S}=v,{gen:E,compositeRule:A,allErrors:x}=S,N=p(v,g,C);u(E,N),A||x||f(S,n.default.vErrors)}e.reportExtraError=a;function s(v,g){v.assign(n.default.errors,g),v.if((0,t._)`${n.default.vErrors} !== null`,()=>v.if(g,()=>v.assign((0,t._)`${n.default.vErrors}.length`,g),()=>v.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function l({gen:v,keyword:g,schemaValue:C,data:S,errsCount:E,it:A}){if(E===void 0)throw new Error("ajv implementation error");const x=v.name("err");v.forRange("i",E,n.default.errors,N=>{v.const(x,(0,t._)`${n.default.vErrors}[${N}]`),v.if((0,t._)`${x}.instancePath === undefined`,()=>v.assign((0,t._)`${x}.instancePath`,(0,t.strConcat)(n.default.instancePath,A.errorPath))),v.assign((0,t._)`${x}.schemaPath`,(0,t.str)`${A.errSchemaPath}/${g}`),A.opts.verbose&&(v.assign((0,t._)`${x}.schema`,C),v.assign((0,t._)`${x}.data`,S))})}e.extendErrors=l;function u(v,g){const C=v.const("err",g);v.if((0,t._)`${n.default.vErrors} === null`,()=>v.assign(n.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${n.default.vErrors}.push(${C})`),v.code((0,t._)`${n.default.errors}++`)}function f(v,g){const{gen:C,validateName:S,schemaEnv:E}=v;E.$async?C.throw((0,t._)`new ${v.ValidationError}(${g})`):(C.assign((0,t._)`${S}.errors`,g),C.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(v,g,C){const{createErrors:S}=v.it;return S===!1?(0,t._)`{}`:m(v,g,C)}function m(v,g,C={}){const{gen:S,it:E}=v,A=[y(E,C),_(v,C)];return w(v,g,A),S.object(...A)}function y({errorPath:v},{instancePath:g}){const C=g?(0,t.str)`${v}${(0,r.getErrorPath)(g,r.Type.Str)}`:v;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,C)]}function _({keyword:v,it:{errSchemaPath:g}},{schemaPath:C,parentSchema:S}){let E=S?g:(0,t.str)`${g}/${v}`;return C&&(E=(0,t.str)`${E}${(0,r.getErrorPath)(C,r.Type.Str)}`),[d.schemaPath,E]}function w(v,{params:g,message:C},S){const{keyword:E,data:A,schemaValue:x,it:N}=v,{opts:Z,propertyName:G,topSchemaRef:H,schemaPath:ee}=N;S.push([d.keyword,E],[d.params,typeof g=="function"?g(v):g||(0,t._)`{}`]),Z.messages&&S.push([d.message,typeof C=="function"?C(v):C]),Z.verbose&&S.push([d.schema,x],[d.parentSchema,(0,t._)`${H}${ee}`],[n.default.data,A]),G&&S.push([d.propertyName,G])}}(Lo),Object.defineProperty($a,"__esModule",{value:!0}),$a.boolOrEmptySchema=$a.topBoolOrEmptySchema=void 0;const Qz=Lo,e7=De,t7=nn,r7={message:"boolean schema is false"};function n7(e){const{gen:t,schema:r,validateName:n}=e;r===!1?a$(e,!1):typeof r=="object"&&r.$async===!0?t.return(t7.default.data):(t.assign((0,e7._)`${n}.errors`,null),t.return(!0))}$a.topBoolOrEmptySchema=n7;function i7(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),a$(e)):r.var(t,!0)}$a.boolOrEmptySchema=i7;function a$(e,t){const{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Qz.reportError)(i,r7,void 0,t)}var Tt={},Si={};Object.defineProperty(Si,"__esModule",{value:!0}),Si.getRules=Si.isJSONType=void 0;const a7=["string","number","integer","boolean","null","object","array"],o7=new Set(a7);function s7(e){return typeof e=="string"&&o7.has(e)}Si.isJSONType=s7;function l7(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Si.getRules=l7;var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.shouldUseRule=bn.shouldUseGroup=bn.schemaHasRulesForType=void 0;function c7({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&o$(e,n)}bn.schemaHasRulesForType=c7;function o$(e,t){return t.rules.some(r=>s$(e,r))}bn.shouldUseGroup=o$;function s$(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}bn.shouldUseRule=s$,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.reportTypeError=Tt.checkDataTypes=Tt.checkDataType=Tt.coerceAndCheckDataType=Tt.getJSONTypes=Tt.getSchemaTypes=Tt.DataType=void 0;const u7=Si,f7=bn,d7=Lo,Ie=De,l$=ye;var wa;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(wa||(Tt.DataType=wa={}));function h7(e){const t=c$(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Tt.getSchemaTypes=h7;function c$(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(u7.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Tt.getJSONTypes=c$;function p7(e,t){const{gen:r,data:n,opts:i}=e,a=m7(t,i.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,f7.schemaHasRulesForType)(e,t[0]));if(s){const l=Eh(t,n,i.strictNumbers,wa.Wrong);r.if(l,()=>{a.length?g7(e,t,a):Oh(e)})}return s}Tt.coerceAndCheckDataType=p7;const u$=new Set(["string","number","integer","boolean","null"]);function m7(e,t){return t?e.filter(r=>u$.has(r)||t==="array"&&r==="array"):[]}function g7(e,t,r){const{gen:n,data:i,opts:a}=e,s=n.let("dataType",(0,Ie._)`typeof ${i}`),l=n.let("coerced",(0,Ie._)`undefined`);a.coerceTypes==="array"&&n.if((0,Ie._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ie._)`${i}[0]`).assign(s,(0,Ie._)`typeof ${i}`).if(Eh(t,i,a.strictNumbers),()=>n.assign(l,i))),n.if((0,Ie._)`${l} !== undefined`);for(const f of r)(u$.has(f)||f==="array"&&a.coerceTypes==="array")&&u(f);n.else(),Oh(e),n.endIf(),n.if((0,Ie._)`${l} !== undefined`,()=>{n.assign(i,l),y7(e,l)});function u(f){switch(f){case"string":n.elseIf((0,Ie._)`${s} == "number" || ${s} == "boolean"`).assign(l,(0,Ie._)`"" + ${i}`).elseIf((0,Ie._)`${i} === null`).assign(l,(0,Ie._)`""`);return;case"number":n.elseIf((0,Ie._)`${s} == "boolean" || ${i} === null
108
+ }`;var Fe=fO(function(){return He(I,_e+"return "+fe).apply(r,M)});if(Fe.source=fe,Cg(Fe))throw Fe;return Fe}function Roe(o){return Je(o).toLowerCase()}function zoe(o){return Je(o).toUpperCase()}function Hoe(o,c,h){if(o=Je(o),o&&(h||c===r))return _C(o);if(!o||!(c=ur(c)))return o;var b=Wr(o),O=Wr(c),I=$C(b,O),M=wC(b,O)+1;return ai(b,I,M).join("")}function Koe(o,c,h){if(o=Je(o),o&&(h||c===r))return o.slice(0,CC(o)+1);if(!o||!(c=ur(c)))return o;var b=Wr(o),O=wC(b,Wr(c))+1;return ai(b,0,O).join("")}function Goe(o,c,h){if(o=Je(o),o&&(h||c===r))return o.replace(Cm,"");if(!o||!(c=ur(c)))return o;var b=Wr(o),O=$C(b,Wr(c));return ai(b,O).join("")}function Yoe(o,c){var h=H,b=te;if(_t(c)){var O="separator"in c?c.separator:O;h="length"in c?xe(c.length):h,b="omission"in c?ur(c.omission):b}o=Je(o);var I=o.length;if(ka(o)){var M=Wr(o);I=M.length}if(h>=I)return o;var R=h-La(b);if(R<1)return b;var J=M?ai(M,0,R).join(""):o.slice(0,R);if(O===r)return J+b;if(M&&(R+=J.length-R),Eg(O)){if(o.slice(R).search(O)){var le,ce=J;for(O.global||(O=Wm(O.source,Je(qS.exec(O))+"g")),O.lastIndex=0;le=O.exec(ce);)var fe=le.index;J=J.slice(0,fe===r?R:fe)}}else if(o.indexOf(ur(O),R)!=R){var ge=J.lastIndexOf(O);ge>-1&&(J=J.slice(0,ge))}return J+b}function Joe(o){return o=Je(o),o&&see.test(o)?o.replace(BS,Ete):o}var Xoe=Ra(function(o,c,h){return o+(h?" ":"")+c.toUpperCase()}),Tg=dE("toUpperCase");function uO(o,c,h){return o=Je(o),c=h?r:c,c===r?_te(o)?Tte(o):fte(o):o.match(c)||[]}var fO=Ne(function(o,c){try{return lr(o,r,c)}catch(h){return Cg(h)?h:new Te(h)}}),Zoe=Nn(function(o,c){return Er(c,function(h){h=dn(h),Dn(o,h,wg(o[h],o))}),o});function Qoe(o){var c=o==null?0:o.length,h=Ce();return o=c?gt(o,function(b){if(typeof b[1]!="function")throw new Or(s);return[h(b[0]),b[1]]}):[],Ne(function(b){for(var O=-1;++O<c;){var I=o[O];if(lr(I[0],this,b))return lr(I[1],this,b)}})}function ese(o){return Ere(Tr(o,p))}function Pg(o){return function(){return o}}function tse(o,c){return o==null||o!==o?c:o}var rse=pE(),nse=pE(!0);function or(o){return o}function Ig(o){return RC(typeof o=="function"?o:Tr(o,p))}function ise(o){return HC(Tr(o,p))}function ase(o,c){return KC(o,Tr(c,p))}var ose=Ne(function(o,c){return function(h){return vs(h,o,c)}}),sse=Ne(function(o,c){return function(h){return vs(o,h,c)}});function xg(o,c,h){var b=Nt(c),O=Eu(c,b);h==null&&!(_t(c)&&(O.length||!b.length))&&(h=c,c=o,o=this,O=Eu(c,Nt(c)));var I=!(_t(h)&&"chain"in h)||!!h.chain,M=kn(o);return Er(O,function(R){var J=c[R];o[R]=J,M&&(o.prototype[R]=function(){var le=this.__chain__;if(I||le){var ce=o(this.__wrapped__),fe=ce.__actions__=nr(this.__actions__);return fe.push({func:J,args:arguments,thisArg:o}),ce.__chain__=le,ce}return J.apply(o,Qn([this.value()],arguments))})}),o}function lse(){return jt._===this&&(jt._=Nte),this}function Dg(){}function cse(o){return o=xe(o),Ne(function(c){return GC(c,o)})}var use=cg(gt),fse=cg(mC),dse=cg(Nm);function dO(o){return gg(o)?Mm(dn(o)):qre(o)}function hse(o){return function(c){return o==null?r:Bi(o,c)}}var pse=gE(),mse=gE(!0);function Fg(){return[]}function Ng(){return!1}function gse(){return{}}function yse(){return""}function vse(){return!0}function bse(o,c){if(o=xe(o),o<1||o>L)return[];var h=F,b=Rt(o,F);c=Ce(c),o-=F;for(var O=jm(b,c);++h<o;)c(h);return O}function _se(o){return Pe(o)?gt(o,dn):fr(o)?[o]:nr(DE(Je(o)))}function $se(o){var c=++Dte;return Je(o)+c}var wse=xu(function(o,c){return o+c},0),Sse=ug("ceil"),Cse=xu(function(o,c){return o/c},1),Ese=ug("floor");function Ose(o){return o&&o.length?Cu(o,or,Ym):r}function Ase(o,c){return o&&o.length?Cu(o,Ce(c,2),Ym):r}function Tse(o){return vC(o,or)}function Pse(o,c){return vC(o,Ce(c,2))}function Ise(o){return o&&o.length?Cu(o,or,Qm):r}function xse(o,c){return o&&o.length?Cu(o,Ce(c,2),Qm):r}var Dse=xu(function(o,c){return o*c},1),Fse=ug("round"),Nse=xu(function(o,c){return o-c},0);function Mse(o){return o&&o.length?Lm(o,or):0}function kse(o,c){return o&&o.length?Lm(o,Ce(c,2)):0}return P.after=iae,P.ary=VE,P.assign=zae,P.assignIn=nO,P.assignInWith=Ru,P.assignWith=Hae,P.at=Kae,P.before=RE,P.bind=wg,P.bindAll=Zoe,P.bindKey=zE,P.castArray=gae,P.chain=UE,P.chunk=Ene,P.compact=One,P.concat=Ane,P.cond=Qoe,P.conforms=ese,P.constant=Pg,P.countBy=Mie,P.create=Gae,P.curry=HE,P.curryRight=KE,P.debounce=GE,P.defaults=Yae,P.defaultsDeep=Jae,P.defer=aae,P.delay=oae,P.difference=Tne,P.differenceBy=Pne,P.differenceWith=Ine,P.drop=xne,P.dropRight=Dne,P.dropRightWhile=Fne,P.dropWhile=Nne,P.fill=Mne,P.filter=Lie,P.flatMap=Uie,P.flatMapDeep=Wie,P.flatMapDepth=qie,P.flatten=kE,P.flattenDeep=kne,P.flattenDepth=Lne,P.flip=sae,P.flow=rse,P.flowRight=nse,P.fromPairs=jne,P.functions=noe,P.functionsIn=ioe,P.groupBy=Vie,P.initial=Une,P.intersection=Wne,P.intersectionBy=qne,P.intersectionWith=Vne,P.invert=ooe,P.invertBy=soe,P.invokeMap=zie,P.iteratee=Ig,P.keyBy=Hie,P.keys=Nt,P.keysIn=ar,P.map=ju,P.mapKeys=coe,P.mapValues=uoe,P.matches=ise,P.matchesProperty=ase,P.memoize=Uu,P.merge=foe,P.mergeWith=iO,P.method=ose,P.methodOf=sse,P.mixin=xg,P.negate=Wu,P.nthArg=cse,P.omit=doe,P.omitBy=hoe,P.once=lae,P.orderBy=Kie,P.over=use,P.overArgs=cae,P.overEvery=fse,P.overSome=dse,P.partial=Sg,P.partialRight=YE,P.partition=Gie,P.pick=poe,P.pickBy=aO,P.property=dO,P.propertyOf=hse,P.pull=Kne,P.pullAll=jE,P.pullAllBy=Gne,P.pullAllWith=Yne,P.pullAt=Jne,P.range=pse,P.rangeRight=mse,P.rearg=uae,P.reject=Xie,P.remove=Xne,P.rest=fae,P.reverse=_g,P.sampleSize=Qie,P.set=goe,P.setWith=yoe,P.shuffle=eae,P.slice=Zne,P.sortBy=nae,P.sortedUniq=aie,P.sortedUniqBy=oie,P.split=Uoe,P.spread=dae,P.tail=sie,P.take=lie,P.takeRight=cie,P.takeRightWhile=uie,P.takeWhile=fie,P.tap=Oie,P.throttle=hae,P.thru=Lu,P.toArray=eO,P.toPairs=oO,P.toPairsIn=sO,P.toPath=_se,P.toPlainObject=rO,P.transform=voe,P.unary=pae,P.union=die,P.unionBy=hie,P.unionWith=pie,P.uniq=mie,P.uniqBy=gie,P.uniqWith=yie,P.unset=boe,P.unzip=$g,P.unzipWith=BE,P.update=_oe,P.updateWith=$oe,P.values=Ka,P.valuesIn=woe,P.without=vie,P.words=uO,P.wrap=mae,P.xor=bie,P.xorBy=_ie,P.xorWith=$ie,P.zip=wie,P.zipObject=Sie,P.zipObjectDeep=Cie,P.zipWith=Eie,P.entries=oO,P.entriesIn=sO,P.extend=nO,P.extendWith=Ru,xg(P,P),P.add=wse,P.attempt=fO,P.camelCase=Ooe,P.capitalize=lO,P.ceil=Sse,P.clamp=Soe,P.clone=yae,P.cloneDeep=bae,P.cloneDeepWith=_ae,P.cloneWith=vae,P.conformsTo=$ae,P.deburr=cO,P.defaultTo=tse,P.divide=Cse,P.endsWith=Aoe,P.eq=Vr,P.escape=Toe,P.escapeRegExp=Poe,P.every=kie,P.find=jie,P.findIndex=NE,P.findKey=Xae,P.findLast=Bie,P.findLastIndex=ME,P.findLastKey=Zae,P.floor=Ese,P.forEach=WE,P.forEachRight=qE,P.forIn=Qae,P.forInRight=eoe,P.forOwn=toe,P.forOwnRight=roe,P.get=Og,P.gt=wae,P.gte=Sae,P.has=aoe,P.hasIn=Ag,P.head=LE,P.identity=or,P.includes=Rie,P.indexOf=Bne,P.inRange=Coe,P.invoke=loe,P.isArguments=qi,P.isArray=Pe,P.isArrayBuffer=Cae,P.isArrayLike=ir,P.isArrayLikeObject=St,P.isBoolean=Eae,P.isBuffer=oi,P.isDate=Oae,P.isElement=Aae,P.isEmpty=Tae,P.isEqual=Pae,P.isEqualWith=Iae,P.isError=Cg,P.isFinite=xae,P.isFunction=kn,P.isInteger=JE,P.isLength=qu,P.isMap=XE,P.isMatch=Dae,P.isMatchWith=Fae,P.isNaN=Nae,P.isNative=Mae,P.isNil=Lae,P.isNull=kae,P.isNumber=ZE,P.isObject=_t,P.isObjectLike=$t,P.isPlainObject=Cs,P.isRegExp=Eg,P.isSafeInteger=jae,P.isSet=QE,P.isString=Vu,P.isSymbol=fr,P.isTypedArray=Ha,P.isUndefined=Bae,P.isWeakMap=Uae,P.isWeakSet=Wae,P.join=Rne,P.kebabCase=Ioe,P.last=Ir,P.lastIndexOf=zne,P.lowerCase=xoe,P.lowerFirst=Doe,P.lt=qae,P.lte=Vae,P.max=Ose,P.maxBy=Ase,P.mean=Tse,P.meanBy=Pse,P.min=Ise,P.minBy=xse,P.stubArray=Fg,P.stubFalse=Ng,P.stubObject=gse,P.stubString=yse,P.stubTrue=vse,P.multiply=Dse,P.nth=Hne,P.noConflict=lse,P.noop=Dg,P.now=Bu,P.pad=Foe,P.padEnd=Noe,P.padStart=Moe,P.parseInt=koe,P.random=Eoe,P.reduce=Yie,P.reduceRight=Jie,P.repeat=Loe,P.replace=joe,P.result=moe,P.round=Fse,P.runInContext=G,P.sample=Zie,P.size=tae,P.snakeCase=Boe,P.some=rae,P.sortedIndex=Qne,P.sortedIndexBy=eie,P.sortedIndexOf=tie,P.sortedLastIndex=rie,P.sortedLastIndexBy=nie,P.sortedLastIndexOf=iie,P.startCase=Woe,P.startsWith=qoe,P.subtract=Nse,P.sum=Mse,P.sumBy=kse,P.template=Voe,P.times=bse,P.toFinite=Ln,P.toInteger=xe,P.toLength=tO,P.toLower=Roe,P.toNumber=xr,P.toSafeInteger=Rae,P.toString=Je,P.toUpper=zoe,P.trim=Hoe,P.trimEnd=Koe,P.trimStart=Goe,P.truncate=Yoe,P.unescape=Joe,P.uniqueId=$se,P.upperCase=Xoe,P.upperFirst=Tg,P.each=WE,P.eachRight=qE,P.first=LE,xg(P,function(){var o={};return un(P,function(c,h){Ze.call(P.prototype,h)||(o[h]=c)}),o}(),{chain:!1}),P.VERSION=n,Er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){P[o].placeholder=P}),Er(["drop","take"],function(o,c){We.prototype[o]=function(h){h=h===r?1:Dt(xe(h),0);var b=this.__filtered__&&!c?new We(this):this.clone();return b.__filtered__?b.__takeCount__=Rt(h,b.__takeCount__):b.__views__.push({size:Rt(h,F),type:o+(b.__dir__<0?"Right":"")}),b},We.prototype[o+"Right"]=function(h){return this.reverse()[o](h).reverse()}}),Er(["filter","map","takeWhile"],function(o,c){var h=c+1,b=h==Q||h==q;We.prototype[o]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:Ce(O,3),type:h}),I.__filtered__=I.__filtered__||b,I}}),Er(["head","last"],function(o,c){var h="take"+(c?"Right":"");We.prototype[o]=function(){return this[h](1).value()[0]}}),Er(["initial","tail"],function(o,c){var h="drop"+(c?"":"Right");We.prototype[o]=function(){return this.__filtered__?new We(this):this[h](1)}}),We.prototype.compact=function(){return this.filter(or)},We.prototype.find=function(o){return this.filter(o).head()},We.prototype.findLast=function(o){return this.reverse().find(o)},We.prototype.invokeMap=Ne(function(o,c){return typeof o=="function"?new We(this):this.map(function(h){return vs(h,o,c)})}),We.prototype.reject=function(o){return this.filter(Wu(Ce(o)))},We.prototype.slice=function(o,c){o=xe(o);var h=this;return h.__filtered__&&(o>0||c<0)?new We(h):(o<0?h=h.takeRight(-o):o&&(h=h.drop(o)),c!==r&&(c=xe(c),h=c<0?h.dropRight(-c):h.take(c-o)),h)},We.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},We.prototype.toArray=function(){return this.take(F)},un(We.prototype,function(o,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),b=/^(?:head|last)$/.test(c),O=P[b?"take"+(c=="last"?"Right":""):c],I=b||/^find/.test(c);O&&(P.prototype[c]=function(){var M=this.__wrapped__,R=b?[1]:arguments,J=M instanceof We,le=R[0],ce=J||Pe(M),fe=function(je){var qe=O.apply(P,Qn([je],R));return b&&ge?qe[0]:qe};ce&&h&&typeof le=="function"&&le.length!=1&&(J=ce=!1);var ge=this.__chain__,_e=!!this.__actions__.length,Ee=I&&!ge,Fe=J&&!_e;if(!I&&ce){M=Fe?M:new We(this);var Oe=o.apply(M,R);return Oe.__actions__.push({func:Lu,args:[fe],thisArg:r}),new Ar(Oe,ge)}return Ee&&Fe?o.apply(this,R):(Oe=this.thru(fe),Ee?b?Oe.value()[0]:Oe.value():Oe)})}),Er(["pop","push","shift","sort","splice","unshift"],function(o){var c=cu[o],h=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",b=/^(?:pop|shift)$/.test(o);P.prototype[o]=function(){var O=arguments;if(b&&!this.__chain__){var I=this.value();return c.apply(Pe(I)?I:[],O)}return this[h](function(M){return c.apply(Pe(M)?M:[],O)})}}),un(We.prototype,function(o,c){var h=P[c];if(h){var b=h.name+"";Ze.call(Wa,b)||(Wa[b]=[]),Wa[b].push({name:c,func:h})}}),Wa[Iu(r,g).name]=[{name:"wrapper",func:r}],We.prototype.clone=Jte,We.prototype.reverse=Xte,We.prototype.value=Zte,P.prototype.at=Aie,P.prototype.chain=Tie,P.prototype.commit=Pie,P.prototype.next=Iie,P.prototype.plant=Die,P.prototype.reverse=Fie,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=Nie,P.prototype.first=P.prototype.head,fs&&(P.prototype[fs]=xie),P},ja=Pte();Ni?((Ni.exports=ja)._=ja,Im._=ja):jt._=ja}).call(Nr)}(fc,fc.exports);var iz=fc.exports;const{Option:hh,OptGroup:az}=re.Select;class ph extends uc{constructor(){super(...arguments);pe(this,"presentationMode",bt.DROPDOWN)}render(r,n){return $.jsx(oz,{...r,state:n,presenter:this})}handleSelectionChange(r,n,i){const{multiple:a}=n.options.choiceConfig||{};return r==null?[]:this.normalizeValue(r,!!a)}getDefaultProps(){return{presentationMode:bt.DROPDOWN,multiple:!1,allowClear:!0,placeholder:"Select an option",size:"middle",search:{enabled:!0,minLength:1,debounceMs:300,caseSensitive:!1,searchFields:["label"]},showOptionCount:!0}}validateProps(r){var i;const n=[];return r.presentationMode!==bt.DROPDOWN&&n.push("Presentation mode must be DROPDOWN for DropdownPresenter"),(i=r.search)!=null&&i.enabled&&(r.search.debounceMs&&r.search.debounceMs<0&&n.push("Search debounce delay must be non-negative"),r.search.minLength&&r.search.minLength<0&&n.push("Search minimum length must be non-negative")),r.multiple&&r.minSelections&&r.maxSelections&&r.minSelections>r.maxSelections&&n.push("Minimum selections cannot exceed maximum selections"),n.length>0?n:null}getAriaRole(){return"combobox"}}const oz=({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,state:y,presenter:_,eventHandlers:w})=>{var z,j,T,D,V;const v=ht(e,p),g=a.choiceConfig||_.getDefaultProps(),[C,S]=B.useState(""),[E,A]=B.useState(!1),x=B.useRef(),N=B.useMemo(()=>{var Z;return!((Z=g.search)!=null&&Z.enabled)||!C?y.filteredOptions:_.filterOptions(y.options,C,g.search)},[y.options,y.filteredOptions,C,g.search,_]),Y=B.useMemo(()=>{var Z;return iz.debounce(oe=>{A(!1),w!=null&&w.onSearchChange&&w.onSearchChange(oe)},((Z=g.search)==null?void 0:Z.debounceMs)||300)},[(z=g.search)==null?void 0:z.debounceMs,w]),K=B.useCallback(Z=>{S(Z),A(!0),Y(Z)},[Y]),H=B.useCallback(async Z=>{const oe=_.handleSelectionChange(Z,{id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,name:e,registry:{}},y),ue=_.denormalizeValue(oe,!!g.multiple);r(ue),await v.onChange(ue),w!=null&&w.onSelectionChange&&w.onSelectionChange(oe,y.options)},[r,v,w,_,g.multiple,y,e,t,n,i,s,l,u,f,d,p,m,a]),te=B.useCallback(async Z=>{await v.onFocus(Z),i&&i(e,t),w!=null&&w.onFocus&&w.onFocus(Z)},[v,i,e,t,w]),ee=B.useCallback(async Z=>{await v.onBlur(Z),n&&n(e,t),w!=null&&w.onBlur&&w.onBlur(Z)},[v,n,e,t,w]),ae=B.useCallback(Z=>{Z&&(w!=null&&w.onOpen)?w.onOpen():!Z&&(w!=null&&w.onClose)&&w.onClose()},[w]),Q=_.getAccessibilityProps({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,name:e,registry:{}},y,g.accessibility),k=_.getLoadingProps(y.loading,g.loadingComponent),q=_.getErrorProps(y.error,g.errorComponent,e),W=_.getEmptyProps(void 0,g.emptyComponent),L={id:e,className:_.getThemeClasses(g,y.error.hasError?"has-error":void 0),style:_.getThemeStyles(g),value:g.multiple?t||[]:t,onChange:H,onFocus:te,onBlur:ee,onOpenChange:ae,disabled:u||f,placeholder:d||g.placeholder,allowClear:g.allowClear,mode:g.multiple?"multiple":void 0,size:_.getAntdSize(g.size),showSearch:(j=g.search)==null?void 0:j.enabled,onSearch:(T=g.search)!=null&&T.enabled?K:void 0,filterOption:!1,loading:y.loading.isLoading||E,notFoundContent:y.loading.isLoading?$.jsx(re.Spin,{size:"small"}):$.jsx(W.component,{...W.props}),maxTagCount:g.multiple?"responsive":void 0,maxTagPlaceholder:g.multiple&&g.showOptionCount?Z=>`+${Z.length} more`:void 0,virtual:N.length>100,listHeight:256,...Q},X=B.useMemo(()=>{const Z=new Map;return N.forEach(oe=>{var he;const ue=(he=oe.metadata)==null?void 0:he.group;Z.has(ue)||Z.set(ue,[]),Z.get(ue).push(oe)}),Z},[N]),U=()=>{if(X.size===1&&X.has(void 0))return N.map(ue=>{var he,be,Le,ft;return $.jsxs(hh,{value:ue.value,disabled:ue.disabled,className:(he=ue.metadata)==null?void 0:he.className,title:(be=ue.metadata)==null?void 0:be.description,children:[((Le=ue.metadata)==null?void 0:Le.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:ue.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:ue.label}),((ft=ue.metadata)==null?void 0:ft.description)&&$.jsx("span",{className:"edf-choice-widget__option-description",children:ue.metadata.description})]},String(ue.value))});const Z=[],oe=X.get(void 0);return oe&&oe.forEach(ue=>{var he,be,Le;Z.push($.jsxs(hh,{value:ue.value,disabled:ue.disabled,className:(he=ue.metadata)==null?void 0:he.className,title:(be=ue.metadata)==null?void 0:be.description,children:[((Le=ue.metadata)==null?void 0:Le.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:ue.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:ue.label})]},String(ue.value)))}),X.forEach((ue,he)=>{he!==void 0&&Z.push($.jsx(az,{label:he,children:ue.map(be=>{var Le,ft,me;return $.jsxs(hh,{value:be.value,disabled:be.disabled,className:(Le=be.metadata)==null?void 0:Le.className,title:(ft=be.metadata)==null?void 0:ft.description,children:[((me=be.metadata)==null?void 0:me.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:be.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:be.label})]},String(be.value))})},he))}),Z},F=B.useCallback(Z=>{var oe,ue;(ue=(oe=g.accessibility)==null?void 0:oe.keyboard)!=null&&ue.typeAhead&&Z.key.length===1&&/\S/.test(Z.key)},[(V=(D=g.accessibility)==null?void 0:D.keyboard)==null?void 0:V.typeAhead]);return B.useEffect(()=>{const Z=x.current;return()=>{Z&&clearTimeout(Z),Y.cancel()}},[Y]),$.jsxs("div",{className:"edf-choice-widget__wrapper",children:[$.jsx(re.Select,{...L,onKeyDown:F,children:U()}),y.error.hasError&&$.jsx(q.component,{...q.props}),y.loading.isLoading&&y.loading.progress!==void 0&&$.jsx("div",{className:"edf-choice-widget__loading-overlay",children:$.jsx(k.component,{...k.props})})]})};class B1 extends uc{constructor(){super(...arguments);pe(this,"presentationMode",bt.RADIO)}render(r,n){return $.jsx(sz,{...r,state:n,presenter:this})}handleSelectionChange(r){return r==null?[]:this.normalizeValue(r,!1)}getDefaultProps(){return{presentationMode:bt.RADIO,multiple:!1,allowClear:!1,placeholder:"Select an option",size:"middle",style:{display:"block"},accessibility:{keyboard:{arrowKeys:!0,typeAhead:!0,homeEnd:!0},announceChanges:!0}}}validateProps(r){const n=[];return r.presentationMode!==bt.RADIO&&n.push("Presentation mode must be RADIO for RadioPresenter"),r.multiple&&n.push("Radio groups do not support multiple selection. Use checkbox mode for multi-select."),(r.minSelections||r.maxSelections)&&n.push("Selection limits are not applicable to radio groups"),n.length>0?n:null}getAriaRole(){return"radiogroup"}}const sz=({id:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,state:y,presenter:_,eventHandlers:w})=>{var k,q,W;const v=ht(e,p),g=a.choiceConfig||_.getDefaultProps(),C=((k=g.style)==null?void 0:k.display)==="inline"||((q=g.style)==null?void 0:q.display)==="inline-block"||((W=g.className)==null?void 0:W.includes("horizontal")),S=B.useCallback(async L=>{const X=L.target.value,U=_.handleSelectionChange(X),F=_.denormalizeValue(U,!1);r(F),await v.onChange(F),w!=null&&w.onSelectionChange&&w.onSelectionChange(U,y.options)},[r,v,w,_,y]),E=B.useCallback(async L=>{await v.onFocus(L),i&&i(e,t),w!=null&&w.onFocus&&w.onFocus(L)},[v,i,e,t,w]),A=B.useCallback(async L=>{await v.onBlur(L),n&&n(e,t),w!=null&&w.onBlur&&w.onBlur(L)},[v,n,e,t,w]),x={id:e,name:e,value:t,onChange:r,onBlur:n,onFocus:i,options:a,label:s,required:l,disabled:u,readonly:f,placeholder:d,schema:p,formContext:m,eventHandlers:w,registry:{},rawErrors:[],formData:{}},N=_.getAccessibilityProps(x,y,g.accessibility),Y=_.getErrorProps(y.error,g.errorComponent,e),K=_.getEmptyProps(void 0,g.emptyComponent),H={id:e,className:_.getThemeClasses(g,y.error.hasError?"has-error":void 0),style:_.getThemeStyles(g),value:t,onChange:S,onFocus:E,onBlur:A,disabled:u||f,size:g.size||"middle",...N},te=B.useMemo(()=>{const L=new Map;return y.filteredOptions.forEach(X=>{var F;const U=(F=X.metadata)==null?void 0:F.group;L.has(U)||L.set(U,[]),L.get(U).push(X)}),L},[y.filteredOptions]),ee=L=>{var U,F,z,j,T,D,V,Z,oe,ue,he;const X={key:String(L.value),value:L.value,disabled:L.disabled,className:(U=L.metadata)==null?void 0:U.className};return(z=(F=L.metadata)==null?void 0:F.a11y)!=null&&z.ariaLabel&&(X["aria-label"]=L.metadata.a11y.ariaLabel),(T=(j=L.metadata)==null?void 0:j.a11y)!=null&&T.ariaDescription&&(X["aria-describedby"]=`${e}-option-${L.value}-description`),(D=L.metadata)!=null&&D.icon||(V=L.metadata)!=null&&V.description?$.jsx(re.Radio,{value:X.value,disabled:X.disabled,className:X.className,children:$.jsxs("div",{className:"edf-choice-widget__radio-content",children:[$.jsxs("div",{className:"edf-choice-widget__radio-main",children:[((Z=L.metadata)==null?void 0:Z.icon)&&$.jsx("span",{className:"edf-choice-widget__option-icon",children:L.metadata.icon}),$.jsx("span",{className:"edf-choice-widget__option-label",children:L.label})]}),((oe=L.metadata)==null?void 0:oe.description)&&$.jsx("div",{className:"edf-choice-widget__option-description",id:(he=(ue=L.metadata)==null?void 0:ue.a11y)!=null&&he.ariaDescription?`${e}-option-${L.value}-description`:void 0,children:L.metadata.description})]})},X.key):$.jsx(re.Radio,{value:X.value,disabled:X.disabled,className:X.className,children:L.label},X.key)},ae=()=>{const L=[],X=te.get(void 0);X&&X.length>0&&X.forEach(F=>{L.push(ee(F))});let U=!X||X.length===0;return te.forEach((F,z)=>{z===void 0||F.length===0||(U||L.push($.jsx("div",{className:"edf-choice-widget__radio-divider"},`divider-${z}`)),U=!1,L.push($.jsx("div",{className:"edf-choice-widget__radio-group-label",children:z},`group-${z}`)),F.forEach(j=>{L.push(ee(j))}))}),L};if(y.filteredOptions.length===0)return $.jsx("div",{className:"edf-choice-widget__wrapper",children:$.jsx(K.component,{...K.props})});const Q=te.size>1?ae():y.filteredOptions.map(ee);return $.jsxs("div",{className:"edf-choice-widget__wrapper edf-choice-widget__wrapper--radio",children:[$.jsx(re.Radio.Group,{...H,children:C?$.jsx(re.Space,{direction:"horizontal",wrap:!0,children:Q}):$.jsx(re.Space,{direction:"vertical",style:{width:"100%"},children:Q})}),y.error.hasError&&$.jsx(Y.component,{...Y.props})]})};class U1 extends uc{constructor(){super(...arguments);pe(this,"presentationMode",bt.CHECKBOX)}render(r,n){return $.jsx(lz,{...r,state:n,presenter:this})}handleSelectionChange(r,n,i){return Array.isArray(r)?r:[]}getDefaultProps(){return{presentationMode:bt.CHECKBOX,multiple:!0}}validateProps(r){const n=[];return r.presentationMode!==bt.CHECKBOX&&n.push("Presentation mode must be CHECKBOX for CheckboxPresenter"),r.multiple===!1&&n.push("Checkbox presentation mode requires multiple selection to be enabled"),n.length>0?n:null}getAriaRole(){return"group"}}const lz=({id:e,label:t,value:r,onChange:n,onBlur:i,onFocus:a,disabled:s,readonly:l,required:u,options:f,schema:d,formContext:p,state:m,presenter:y,eventHandlers:_})=>{const w=ht(e,d),v=f.choiceConfig||y.getDefaultProps(),g=B.useRef(null),C=B.useRef(new Map),S=B.useCallback(async W=>{const L=y.handleSelectionChange(W,{id:e,name:e,value:r,onChange:n,onBlur:i,onFocus:a,options:f,label:t,required:u,disabled:s,readonly:l,schema:d,formContext:p,eventHandlers:_,rawErrors:[],formData:{},placeholder:void 0,registry:{}},m),X=y.denormalizeValue(L,!0);n(X),await w.onChange(X),_!=null&&_.onSelectionChange&&_.onSelectionChange(L,m.options)},[n,w,_,y,m,e,r,i,a,f,t,u,s,l,d,p]),E=B.useCallback((W,L)=>{if(L)return L;const X=Math.floor(24/W);return{xs:24,sm:Math.min(24,X*2),md:Math.min(24,X*1.5),lg:X,xl:X,xxl:X}},[]),A=B.useCallback((W,L)=>{const X=L.filter(F=>!F.disabled),U=W.filter(F=>X.some(z=>z.value===F)).length;return U>0&&U<X.length},[]),x=B.useCallback((W,L)=>L.filter(U=>!U.disabled).every(U=>W.includes(U.value)),[]),N=B.useCallback(W=>{const{checked:L}=W.target,X=m.options.filter(F=>!F.disabled).map(F=>F.value);let U;if(L){const F=(r||[]).filter(z=>m.options.find(j=>j.value===z&&j.disabled));U=[...new Set([...F,...X])]}else U=(r||[]).filter(F=>m.options.find(z=>z.value===F&&z.disabled));S(U)},[m.options,r,S]),Y=B.useCallback(W=>{const L=m.options.filter(F=>!F.disabled),X=r||[];let U;switch(W){case"selectAll":{const F=X.filter(z=>m.options.find(j=>j.value===z&&j.disabled));U=[...new Set([...F,...L.map(z=>z.value)])];break}case"clearAll":{U=X.filter(F=>m.options.find(z=>z.value===F&&z.disabled));break}case"invert":{const F=new Set(L.map(D=>D.value)),z=new Set(X.filter(D=>F.has(D))),j=L.filter(D=>!z.has(D.value)).map(D=>D.value);U=[...X.filter(D=>m.options.find(V=>V.value===D&&V.disabled)),...j];break}default:U=X}S(U)},[m.options,r,S]),K=B.useCallback(()=>m.options.map(W=>`${e}-checkbox-${W.value}`).join(" "),[m.options,e]),H=B.useCallback(W=>{var F,z;const L=(r||[]).includes(W.value),X=`${e}-checkbox-${W.value}`,U=j=>{const T=j.target.checked,D=Array.isArray(r)?r:[];let V;T?V=D.includes(W.value)?D:[...D,W.value]:V=D.filter(Z=>Z!==W.value),S(V)};return $.jsxs(re.Checkbox,{value:W.value,disabled:W.disabled,checked:L,onChange:U,id:X,ref:j=>{var T;if(j){const D=j.input||((T=j.querySelector)==null?void 0:T.call(j,"input"));D&&C.current.set(String(W.value),D)}else C.current.delete(String(W.value))},"aria-describedby":(F=W.metadata)!=null&&F.description?`${X}-desc`:void 0,className:"edf-choice-widget__checkbox-option",children:[$.jsx("span",{className:"edf-choice-widget__option-label",children:W.label}),((z=W.metadata)==null?void 0:z.description)&&$.jsx("div",{id:`${X}-desc`,className:"edf-choice-widget__option-description",style:{fontSize:"0.875em",color:"rgba(0, 0, 0, 0.45)"},children:W.metadata.description})]},String(W.value))},[r,e]),te=B.useCallback(()=>{if(!v.showSelectAll||l)return null;const W=r||[],L=A(W,m.options),X=x(W,m.options);return $.jsx("div",{className:"edf-choice-widget__checkbox-select-all",style:{marginBottom:8},children:$.jsx(re.Checkbox,{ref:g,indeterminate:L,checked:X,onChange:N,disabled:s||m.options.every(U=>U.disabled),"aria-label":v.selectAllLabel,"aria-controls":K(),children:v.selectAllLabel})})},[v.showSelectAll,v.selectAllLabel,l,r,m.options,s,A,x,N,K]),ee=B.useCallback(()=>{if(!v.enableBulkOperations||l)return null;const W=v.bulkOperationLabels;return $.jsxs(re.Space,{className:"edf-choice-widget__checkbox-bulk-operations",style:{marginBottom:8},children:[$.jsx("button",{type:"button",onClick:()=>Y("selectAll"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":W.selectAll,children:W.selectAll}),$.jsx("button",{type:"button",onClick:()=>Y("clearAll"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":W.clearAll,children:W.clearAll}),$.jsx("button",{type:"button",onClick:()=>Y("invert"),disabled:s,className:"ant-btn ant-btn-sm","aria-label":W.invertSelection,children:W.invertSelection})]})},[v.enableBulkOperations,v.bulkOperationLabels,l,s,Y]),ae=B.useCallback(()=>{const W=v.columns||1,L=E(W,v.responsive);return $.jsx(re.Row,{gutter:[v.spacing||8,v.spacing||8],children:m.options.map(X=>$.jsx(re.Col,{...L,children:H(X)},String(X.value)))})},[m.options,v.columns,v.responsive,v.spacing,E,H]),Q=B.useCallback(()=>{const W=v.layout==="horizontal"?"horizontal":"vertical";return $.jsx(re.Space,{direction:W,size:v.spacing,wrap:!0,children:m.options.map(L=>H(L))})},[m.options,v.layout,v.spacing,H]);B.useEffect(()=>{var V;const W=g.current,L=(W==null?void 0:W.input)||((V=W==null?void 0:W.querySelector)==null?void 0:V.call(W,"input")),X=new Map(C.current),U=Z=>{for(let oe=Z-1;oe>=0;oe--){const ue=m.options[oe];if(!ue.disabled){const he=X.get(String(ue.value));he==null||he.focus();return}}v.showSelectAll&&L&&L.focus()},F=Z=>{for(let oe=Z+1;oe<m.options.length;oe++){const ue=m.options[oe];if(!ue.disabled){const he=X.get(String(ue.value));he==null||he.focus();return}}},z=()=>{const Z=m.options.find(oe=>!oe.disabled);if(Z){const oe=X.get(String(Z.value));oe==null||oe.focus()}},j=()=>{const Z=[...m.options].reverse().find(oe=>!oe.disabled);if(Z){const oe=X.get(String(Z.value));oe==null||oe.focus()}},T=Z=>{(Z.key==="ArrowDown"||Z.key==="ArrowRight")&&(Z.preventDefault(),z())};v.showSelectAll&&L&&L.addEventListener("keydown",T);const D=new Map;return X.forEach((Z,oe)=>{if(!Z)return;const ue=he=>{const be=m.options.findIndex(Le=>String(Le.value)===oe);switch(he.key){case"ArrowUp":case"ArrowLeft":he.preventDefault(),U(be);break;case"ArrowDown":case"ArrowRight":he.preventDefault(),F(be);break;case"Home":he.preventDefault(),v.showSelectAll&&L?L.focus():z();break;case"End":he.preventDefault(),j();break}};Z.addEventListener("keydown",ue),D.set(Z,ue)}),()=>{L&&L.removeEventListener("keydown",T),D.forEach((Z,oe)=>{oe&&oe.removeEventListener("keydown",Z)})}},[m.options,v.showSelectAll]);const k=y.getAccessibilityProps({id:e,name:e,label:t,required:u,readonly:l,disabled:s,schema:d,value:r,onChange:n,onBlur:i,onFocus:a,options:f,formContext:p,eventHandlers:_,rawErrors:[],formData:{},placeholder:void 0,registry:{}},m,v.accessibility),q={value:r||[],disabled:s,className:y.getThemeClasses(v,"edf-choice-widget__checkbox-group"),style:y.getThemeStyles(v)};return $.jsxs("div",{className:"edf-choice-widget__wrapper edf-choice-widget__wrapper--checkbox",role:"group","aria-labelledby":k["aria-labelledby"],"aria-describedby":k["aria-describedby"],"aria-required":k["aria-required"],"aria-invalid":k["aria-invalid"],"data-readonly":String(l),"data-disabled":String(s),children:[m.error.hasError&&$.jsx("div",{className:"edf-choice-widget__error",role:"alert",id:`${e}-error`,children:m.error.message}),te(),ee(),$.jsx(re.Checkbox.Group,{...q,children:v.layout==="grid"?ae():Q()}),m.loading.isLoading&&$.jsxs("div",{className:"edf-choice-widget__loading",children:[$.jsx(re.Spin,{size:"small"}),m.loading.message&&$.jsx("span",{className:"edf-choice-widget__loading-message",children:m.loading.message})]})]})};function dc(e,t){const[r,n]=B.useState([]),[i,a]=B.useState({isLoading:!1,message:""}),[s,l]=B.useState({hasError:!1,message:"",recoverable:!0}),[u,f]=B.useState({requestCount:0,successCount:0,errorCount:0,cacheHitCount:0,cacheMissCount:0,averageResponseTimeMs:0}),[d,p]=B.useState(!1),m=B.useRef(null),y=B.useRef({id:0,isActive:!1}),_=B.useRef(e),w=B.useRef(!0),v=B.useRef(),g=B.useRef(t);B.useEffect(()=>{_.current=e},[e]),B.useEffect(()=>{g.current=t},[t]);const C=B.useCallback(Y=>{var te;m.current&&(m.current.cleanup(),m.current=null);const K={onLoadingStart:ee=>{var ae,Q;w.current&&a(ee.getLoadingState()),(Q=(ae=g.current)==null?void 0:ae.onLoadingStart)==null||Q.call(ae,ee)},onLoadingComplete:(ee,ae)=>{var Q,k;w.current&&(a(ee.getLoadingState()),f(ee.getMetrics())),(k=(Q=g.current)==null?void 0:Q.onLoadingComplete)==null||k.call(Q,ee,ae)},onError:(ee,ae)=>{var Q,k;w.current&&(l(ee.getErrorState()),f(ee.getMetrics())),(k=(Q=g.current)==null?void 0:Q.onError)==null||k.call(Q,ee,ae)},onCacheHit:(ee,ae)=>{var Q,k;w.current&&(f(ee.getMetrics()),p(!1)),(k=(Q=g.current)==null?void 0:Q.onCacheHit)==null||k.call(Q,ee,ae)},onCacheMiss:(ee,ae)=>{var Q,k;w.current&&f(ee.getMetrics()),(k=(Q=g.current)==null?void 0:Q.onCacheMiss)==null||k.call(Q,ee,ae)},onCacheCleared:(te=g.current)==null?void 0:te.onCacheCleared};let H;if(T1(Y))H=new uh(Y,{eventCallbacks:K});else if(P1(Y))H=new fh(Y,{},K);else if(lh(Y))H=new dh(Y,{eventCallbacks:K});else throw new Error(`Unsupported data source type: ${Y.type}`);return m.current=H,H},[]),S=B.useCallback(async(Y,K=!1)=>{y.current.abortController&&y.current.abortController.abort();const H=++y.current.id,te=new AbortController;y.current={id:H,abortController:te,isActive:!0};try{K&&Y.clearCache();const ee=await Y.fetchOptions();if(y.current.id!==H||!w.current)throw new Error("Request cancelled");return n(ee),l({hasError:!1,message:"",recoverable:!0}),p(!1),ee}catch(ee){if(y.current.id!==H||!w.current)throw ee;const Q={hasError:!0,message:ee instanceof Error?ee.message:"Failed to fetch options",code:ee==null?void 0:ee.code,recoverable:!0,timestamp:Date.now()};throw l(Q),ee}finally{y.current.id===H&&(y.current.isActive=!1,y.current.abortController=void 0)}},[]),E=B.useCallback(async()=>{if(_.current)try{const Y=C(_.current);await S(Y,!1)}catch(Y){if(Y instanceof Error&&Y.message==="Request cancelled")return;console.error("Failed to initialize data source:",Y)}},[C,S]),A=B.useCallback(async()=>{if(!(!m.current||!w.current))try{await S(m.current,!0)}catch(Y){if(Y instanceof Error&&Y.message==="Request cancelled")return;console.error("Failed to refetch data:",Y)}},[S]),x=B.useCallback(async()=>{if(!(!m.current||!w.current))try{await S(m.current,!1)}catch(Y){if(Y instanceof Error&&Y.message==="Request cancelled")return;console.error("Failed to refresh data:",Y)}},[S]),N=B.useCallback(Y=>{JSON.stringify(Y)!==JSON.stringify(_.current)&&(_.current=Y,y.current.abortController&&y.current.abortController.abort(),n([]),a({isLoading:!0,message:"Updating data source..."}),l({hasError:!1,message:"",recoverable:!0}),E())},[E]);return B.useEffect(()=>{if(!lh(e))return;const K=setInterval(()=>{if(m.current&&u.lastRequestTimestamp){const te=Date.now()-u.lastRequestTimestamp;p(te>3e5)}},6e4);return v.current=K,()=>{v.current&&clearInterval(v.current)}},[e,u.lastRequestTimestamp]),B.useEffect(()=>(w.current=!0,E(),()=>{w.current=!1,y.current.abortController&&y.current.abortController.abort(),v.current&&clearInterval(v.current),m.current&&(m.current.cleanup(),m.current=null)}),[E]),B.useMemo(()=>({options:r,loading:i,error:s,refetch:A,refresh:x,updateConfig:N,metrics:u,isStale:d}),[r,i,s,A,x,N,u,d])}function cz(e,t={}){const{maxRetries:r=3,retryDelayMs:n=1e3,onRetry:i}=t,[a,s]=B.useState(0),l=B.useRef(),u=dc(e,{onError:(f,d)=>{if(a<r){const p=a+1;l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(p),i==null||i(p,d),u.refetch()},n*p)}},onLoadingComplete:()=>{s(0),l.current&&clearTimeout(l.current)}});return B.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),u}function uz(e){const[t,r]=B.useState([]),n=e.map(i=>dc(i));return B.useEffect(()=>{r(n)},[n]),t}const fz={[bt.DROPDOWN]:()=>new ph,[bt.RADIO]:()=>new B1,[bt.CHECKBOX]:()=>new U1};function hc(e){const{id:t,schema:r,value:n,disabled:i,readonly:a,onChange:s,onBlur:l,onFocus:u,options:f,rawErrors:d}=e,p=B.useMemo(()=>{const k=(f==null?void 0:f.choiceConfig)||{},q=(f==null?void 0:f.enumOptions)||[],W={...Mo,presentationMode:k.presentationMode||Mo.presentationMode||bt.DROPDOWN,dataSource:k.dataSource||{type:"static",options:[]},...k,disabled:i||k.disabled,readonly:a||k.readonly};return!W.dataSource&&q.length>0&&(W.dataSource={type:"static",options:q.map(L=>({label:String(L.label),value:L.value}))}),W.dataSource||(W.dataSource={type:"static",options:[]}),W},[f,i,a]),m=B.useMemo(()=>p.multiple!==void 0?p.multiple:!!(p.presentationMode&&I1(p.presentationMode)||(r==null?void 0:r.type)==="array"||r!=null&&r.items),[p.multiple,p.presentationMode,r]),y=ht(t,r),_=B.useCallback((k,q)=>{var X;if(!((X=p.search)!=null&&X.enabled)||!q||q.length<(p.search.minLength||1))return k;const W=p.search.caseSensitive?q:q.toLowerCase(),L=p.search.searchFields||["label"];return k.filter(U=>{var F;return(F=p.search)!=null&&F.customFilter?p.search.customFilter(U,q):L.some(z=>{var D,V;let j;switch(z){case"label":{j=U.label;break}case"value":{j=String(U.value);break}case"description":{j=(D=U.metadata)==null?void 0:D.description;break}default:{j=void 0;break}}return j?((V=p.search)!=null&&V.caseSensitive?j:j.toLowerCase()).includes(W):!1})})},[p.search]),{options:w,loading:v,error:g,metrics:C}=dc(p.dataSource||{type:"static",options:[]},{onLoadingStart:()=>{A(k=>({...k,loading:{isLoading:!0,message:"Loading options..."}}))},onLoadingComplete:(k,q)=>{A(W=>({...W,options:q,filteredOptions:_(q,W.searchTerm),loading:{isLoading:!1}}))},onError:(k,q)=>{A(W=>({...W,error:{hasError:!0,message:q.message,recoverable:!0,timestamp:Date.now()}}))}}),S=B.useMemo(()=>{const k=p.presentationMode||bt.DROPDOWN,q=fz[k];return q?q():(console.error(`Unknown presentation mode: ${k}`),new ph)},[p.presentationMode]),[E,A]=B.useState(()=>{const k=N(n,m);return{options:w,selectedValues:k,loading:v,error:g,searchTerm:"",filteredOptions:w,isOpen:!1,focusedOptionIndex:-1}}),x=B.useRef(E);x.current=E,B.useEffect(()=>{A(k=>({...k,options:w,filteredOptions:_(w,k.searchTerm),loading:v,error:g}))},[w,v,g,_]),B.useEffect(()=>{const k=N(n,m);A(q=>JSON.stringify(q.selectedValues)!==JSON.stringify(k)?{...q,selectedValues:k}:q)},[n,m]),B.useEffect(()=>{d&&d.length>0&&A(k=>({...k,error:{hasError:!0,message:d.join(", "),recoverable:!0,timestamp:Date.now()}}))},[d]);function N(k,q){return k==null||k===""?[]:q?Array.isArray(k)?k.filter(W=>W!=null&&W!==""):[k]:Array.isArray(k)?k.length>0?[k[0]]:[]:[k]}function Y(k,q){return q?k:k.length>0?k[0]:void 0}const K=B.useCallback(async k=>{var L,X;const q=S.handleSelectionChange(k,e,x.current);A(U=>({...U,selectedValues:q}));const W=Y(q,m);s(W),await y.onChange(W),(X=(L=e.eventHandlers)==null?void 0:L.onSelectionChange)==null||X.call(L,q,x.current.options)},[S,e,m,s,y]),H=B.useCallback(k=>{var q,W;A(L=>{const X=_(L.options,k);return{...L,searchTerm:k,filteredOptions:X,focusedOptionIndex:X.length>0?0:-1}}),(W=(q=e.eventHandlers)==null?void 0:q.onSearchChange)==null||W.call(q,k)},[e.eventHandlers,_]),te=B.useCallback(async k=>{var q,W;u==null||u(t,k.target.value),y.onFocus&&await y.onFocus(t),(W=(q=e.eventHandlers)==null?void 0:q.onFocus)==null||W.call(q,k)},[t,u,y,e.eventHandlers]),ee=B.useCallback(async k=>{var q,W,L;if((q=p.validation)!=null&&q.validateOnBlur){const X=S.validateSelection(x.current.selectedValues,x.current.options,p);X&&A(U=>({...U,error:{hasError:!0,message:X,recoverable:!0,timestamp:Date.now()}}))}l==null||l(t,k.target.value),y.onBlur&&await y.onBlur(t),(L=(W=e.eventHandlers)==null?void 0:W.onBlur)==null||L.call(W,k)},[t,p,S,l,y,e.eventHandlers]),ae=B.useMemo(()=>({onFocus:te,onBlur:ee,onChange:K,onSearch:H}),[te,ee,K,H]),Q=B.useMemo(()=>Y(E.selectedValues,m),[E.selectedValues,m]);return{options:E.filteredOptions,presenter:S,state:E,setState:B.useCallback(k=>{A(q=>({...q,...k}))},[]),value:Q,handleChange:K,eventHandlers:ae,isMultiSelect:m,isLoading:E.loading.isLoading,hasError:E.error.hasError,metrics:C}}function dz(e,t){const[r,n]=B.useState(null),i=hc(e),a=B.useCallback(async l=>{try{await i.handleChange(l)}catch(u){const f=u instanceof Error?u:new Error(String(u));n(f),t==null||t(f)}},[i,t]);return B.useMemo(()=>r?{error:r}:{...i,handleChange:a},[i,r,a])}function hz(e,t){const r=B.useRef(Date.now()),n=B.useRef(0),[i,a]=B.useState({initialLoadTime:0,renderCount:0,averageRenderTime:0,lastRenderTime:0});B.useEffect(()=>{n.current++;const l=Date.now()-r.current;a(u=>({initialLoadTime:u.initialLoadTime||l,renderCount:n.current,averageRenderTime:(u.averageRenderTime*(n.current-1)+l)/n.current,lastRenderTime:l})),r.current=Date.now()},[]);const s=hc(e);return B.useEffect(()=>{t&&t(s.metrics)},[s.metrics,t]),{...s,performanceMetrics:i}}class pz extends B.Component{constructor(r){super(r);pe(this,"retryCount",0);pe(this,"maxRetries",3);pe(this,"handleRetry",()=>{var r,n;this.retryCount<this.maxRetries&&(this.retryCount++,console.log(`[ChoiceWidget] Retrying... (${this.retryCount}/${this.maxRetries})`),this.setState({hasError:!1,error:void 0,errorInfo:void 0}),(n=(r=this.props).onRetry)==null||n.call(r))});this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var i,a;console.error("[ChoiceWidget] Error boundary caught error:",r,n),this.setState({error:r,errorInfo:n}),(a=(i=this.props).onError)==null||a.call(i,r,n);try{const s=window.__EXTENDED_FORMS_EVENT_HUB__;s&&s.emitErrorEvent({component:"ChoiceWidget",error:r.message,stack:r.stack,timestamp:Date.now()})}catch(s){console.error("[ChoiceWidget] Failed to report error to event hub:",s)}}render(){if(this.state.hasError){const{fallback:r}=this.props,{error:n}=this.state;return r&&n?$.jsx(r,{error:n,retry:this.handleRetry}):$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Choice Widget Error",description:$.jsxs("div",{children:[$.jsx("p",{children:"An error occurred while rendering the choice widget."}),n&&$.jsxs("details",{style:{marginTop:8,fontSize:"12px",color:"#666"},children:[$.jsx("summary",{children:"Error Details"}),$.jsxs("pre",{style:{marginTop:4,whiteSpace:"pre-wrap"},children:[n.message,process.env.NODE_ENV==="development"&&n.stack&&$.jsxs($.Fragment,{children:[$.jsx("br",{}),$.jsx("br",{}),"Stack trace:",$.jsx("br",{}),n.stack]})]})]}),this.retryCount<this.maxRetries&&$.jsxs("button",{onClick:this.handleRetry,style:{marginTop:8,padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer"},children:["Retry (",this.maxRetries-this.retryCount," attempts left)"]})]}),style:{margin:"8px 0"}})}return this.props.children}}const mz=({error:e,retry:t})=>$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Widget Error",description:$.jsxs("div",{children:[$.jsxs("p",{children:["The choice widget encountered an error: ",e.message]}),$.jsx("button",{onClick:t,style:{marginTop:8,padding:"4px 12px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer"},children:"Try Again"})]})}),W1=e=>{const{id:t,value:r,onChange:n,options:i,schema:a,disabled:s,readonly:l}=e,u=ht(t,a),f=B.useMemo(()=>i!=null&&i.enumOptions?i.enumOptions:a!=null&&a.enum&&(a!=null&&a.enumNames)?a.enum.map((y,_)=>{var w;return{label:((w=a.enumNames)==null?void 0:w[_])||String(y),value:y}}):a!=null&&a.oneOf?a.oneOf.filter(y=>typeof y=="object"&&y!==null).map(y=>({label:y.title||String(y.const),value:y.const})):[],[i==null?void 0:i.enumOptions,a==null?void 0:a.enum,a==null?void 0:a.enumNames,a==null?void 0:a.oneOf]),d=B.useCallback(async y=>{const _=y.target.value;n==null||n(_),await u.onChange(_)},[n,u]),p=B.useCallback(async()=>{await u.onFocus(t)},[u,t]),m=B.useCallback(async()=>{await u.onBlur(r)},[u,r]);return $.jsxs("div",{style:{border:"1px solid #ff4d4f",borderRadius:"4px",padding:"4px"},children:[$.jsx("div",{style:{fontSize:"12px",color:"#ff4d4f",marginBottom:"4px"},children:"Fallback Mode: Basic HTML Select"}),$.jsxs("select",{id:t,value:String(r||""),onChange:d,onFocus:p,onBlur:m,disabled:s||l,style:{width:"100%",padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:l?"#f5f5f5":"#fff"},children:[$.jsx("option",{value:"",children:"Select an option..."}),f.map((y,_)=>$.jsx("option",{value:String(y.value),children:y.label},`${y.value}-${_}`))]})]})},gz=({loading:e,children:t})=>e.isLoading?$.jsxs("div",{style:{position:"relative",minHeight:"32px"},children:[$.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(255, 255, 255, 0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},children:$.jsx(re.Spin,{size:"small",tip:e.message||"Loading options..."})}),$.jsx("div",{style:{opacity:.5},children:t})]}):$.jsx($.Fragment,{children:t}),yz=({error:e,onRetry:t,onClear:r})=>e.hasError?$.jsx(re.Alert,{type:"error",showIcon:!0,message:"Data Error",description:$.jsxs("div",{children:[$.jsx("p",{children:e.message}),$.jsxs("div",{style:{marginTop:8},children:[e.recoverable&&t&&$.jsx("button",{onClick:t,style:{marginRight:8,padding:"2px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer",fontSize:"12px"},children:"Retry"}),r&&$.jsx("button",{onClick:r,style:{padding:"2px 8px",border:"1px solid #d9d9d9",borderRadius:"4px",background:"#fff",cursor:"pointer",fontSize:"12px"},children:"Dismiss"})]})]}),style:{marginBottom:"8px"}}):null,vz=e=>{var E;const{id:t,schema:r,disabled:n,readonly:i,rawErrors:a}=e,{presenter:s,state:l,setState:u,isMultiSelect:f,isLoading:d,hasError:p,metrics:m}=hc(e),y=B.useMemo(()=>{var x;const A=((x=e.options)==null?void 0:x.choiceConfig)||{};return{...Mo,...A,disabled:n||A.disabled,readonly:i||A.readonly}},[e.options,n,i]),_=B.useCallback(()=>{u({error:{hasError:!1,message:""}}),m&&m.refresh&&m.refresh()},[u,m]),w=B.useCallback(()=>{u({error:{hasError:!1,message:""}})},[u]),v=B.useMemo(()=>Date.now(),[]);B.useEffect(()=>{if(process.env.NODE_ENV==="development"){const A=Date.now()-v;A>200&&console.warn(`[ChoiceWidget] Slow render detected: ${A}ms (target: <200ms)`,{id:t,presentationMode:y.presentationMode})}},[v,t,y.presentationMode]),B.useEffect(()=>{var A;if((A=y.accessibility)!=null&&A.announceChanges&&p){const x=`Error in ${(r==null?void 0:r.title)||"choice widget"}: ${l.error.message}`,N=document.createElement("div");N.setAttribute("aria-live","polite"),N.setAttribute("aria-atomic","true"),N.style.position="absolute",N.style.left="-10000px",N.style.width="1px",N.style.height="1px",N.style.overflow="hidden",document.body.appendChild(N),setTimeout(()=>{N.textContent=x,setTimeout(()=>{document.body.removeChild(N)},1e3)},100)}},[p,l.error.message,r==null?void 0:r.title,(E=y.accessibility)==null?void 0:E.announceChanges]);const g=B.useCallback(()=>{try{if(!s)throw new Error("No presenter available for current configuration");return s.render(e,l)}catch(A){return console.error("[ChoiceWidget] Presenter render error:",A),$.jsx(W1,{...e})}},[s,e,l]),C=B.useMemo(()=>{const A=$.jsx(yz,{error:l.error,onRetry:_,onClear:w}),x=$.jsx(gz,{loading:l.loading,children:g()});return $.jsxs($.Fragment,{children:[A,x]})},[l.error,l.loading,g,_,w]),S=B.useMemo(()=>({...y.style||{},...a&&a.length>0&&{border:"1px solid #ff4d4f",borderRadius:"4px"}}),[y.style,a]);return $.jsx("div",{id:`${t}-wrapper`,className:`choice-widget-wrapper ${y.className||""}`,style:S,"data-testid":`choice-widget-${t}`,"data-presentation-mode":y.presentationMode,"data-multi-select":f,"data-loading":d,"data-error":p,children:C})},Rn=e=>{var a,s,l,u,f;const[t,r]=B.useState(null),n=B.useCallback(()=>{r(null)},[]),i=B.useCallback((d,p)=>{var m,y,_,w,v;console.error("[ChoiceWidget] Error boundary triggered:",{error:d.message,stack:d.stack,componentStack:p.componentStack,props:{id:e.id,presentationMode:(y=(m=e.options)==null?void 0:m.choiceConfig)==null?void 0:y.presentationMode,dataSourceType:(v=(w=(_=e.options)==null?void 0:_.choiceConfig)==null?void 0:w.dataSource)==null?void 0:v.type}})},[e.id,(s=(a=e.options)==null?void 0:a.choiceConfig)==null?void 0:s.presentationMode,(f=(u=(l=e.options)==null?void 0:l.choiceConfig)==null?void 0:u.dataSource)==null?void 0:f.type]);return B.useEffect(()=>{try{if(!e.id)throw new Error("ChoiceWidget requires an id prop");if(!e.onChange)throw new Error("ChoiceWidget requires an onChange prop");r(null)}catch(d){r(d instanceof Error?d:new Error(String(d)))}},[e.id,e.onChange]),t?$.jsx(W1,{...e}):$.jsx(pz,{fallback:mz,onError:i,onRetry:n,children:$.jsx(vz,{...e})})},mh=(e={})=>({...Mo,...e,dataSource:{type:"static",options:[],...e.dataSource}}),bz=(e,t=!1,r)=>t?bt.CHECKBOX:r!=null&&r.preferRadio?bt.RADIO:r!=null&&r.preferDropdown?bt.DROPDOWN:e<=4?bt.RADIO:bt.DROPDOWN,_z=(e,t={})=>{const r=mh({dataSource:{type:"static",options:e.map(n=>({label:n.label,value:n.value}))}});return t["ui:widget"]==="radio"?r.presentationMode=bt.RADIO:t["ui:widget"]==="checkboxes"&&(r.presentationMode=bt.CHECKBOX,r.multiple=!0),typeof t.placeholder=="string"&&(r.placeholder=t.placeholder),typeof t.disabled=="boolean"&&(r.disabled=t.disabled),r},$z=e=>({widgets:{choice:Rn,ChoiceWidget:Rn,select:Rn,radio:Rn,checkboxes:Rn},uiSchema:{"ui:widget":"choice","ui:options":{choiceConfig:mh(e)}}}),wz={text:()=>Promise.resolve().then(()=>S1).then(e=>e.default),TextWidget:()=>Promise.resolve().then(()=>S1).then(e=>e.default),textarea:()=>Promise.resolve().then(()=>C1).then(e=>e.default),TextareaWidget:()=>Promise.resolve().then(()=>C1).then(e=>e.default),password:()=>Promise.resolve().then(()=>E1).then(e=>e.default),PasswordWidget:()=>Promise.resolve().then(()=>E1).then(e=>e.default)},q1={choice:Rn,color:_1,range:nh,slider:nh,rating:w1,text:Do,TextWidget:Do,textarea:Fo,TextareaWidget:Fo,password:No,PasswordWidget:No,UpDownWidget:ic,number:ic,NumberWidget:ic,tel:ac,TelWidget:ac,TelephoneWidget:ac,email:ih,EmailWidget:ih,url:ah,URLWidget:ah,date:oh,DateWidget:oh,"datetime-local":sh,DateTimeWidget:sh,file:A1,FileWidget:sc,fileUpload:sc,FileUploadWidget:sc};class gh{constructor(t,r={},n=[],i){pe(this,"formHandlers");pe(this,"fieldHandlers");pe(this,"webhooks");pe(this,"debounceTimers",new Map);pe(this,"webhookQueue",[]);pe(this,"isProcessingQueue",!1);pe(this,"webhookCallbacks");this.formHandlers=t,this.fieldHandlers=r,this.webhooks=n,this.webhookCallbacks=i}updateWebhooks(t){console.log("📌 FormEventHub.updateWebhooks called with:",t),this.webhooks=t}updateCallbacks(t){this.webhookCallbacks=t}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t);const r=this.createStandardizedPayload({eventType:"submit",formData:t});this.processWebhooks(r)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,r){if(this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,r),t&&Object.keys(t).length>0){const n=this.createStandardizedPayload({eventType:"validationError",errors:this.formatValidationErrors(t),formData:r});this.processWebhooks(n)}}async handleStepChange(t,r,n){const i=this.createStandardizedPayload({eventType:"stepChange",fromStep:t,toStep:r,formData:n});console.log("🔵 handleStepChange called:",{fromStep:t,toStep:r,eventType:"stepChange"}),this.processWebhooks(i)}async handleFieldEvent(t,r,n,i,a,s){const l={eventType:t,fieldId:r,fieldValue:n,schema:i,formData:a,timestamp:Date.now(),fieldPath:s};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(l);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(l);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(l);break}}catch(f){console.error(`Error in field event handler (${t}):`,f)}const u=this.createStandardizedPayload(l);this.processWebhooks(u)}processWebhooks(t){var n,i;if(console.log(`🔍 processWebhooks called for ${t.eventType}. Total webhooks:`,((n=this.webhooks)==null?void 0:n.length)||0),!((i=this.webhooks)!=null&&i.length)){console.log("🔴 No webhooks configured");return}const r=this.webhooks.filter(a=>{var s;return console.log("🔍 Checking webhook events:",a.events,"against event type:",t.eventType),(s=a.events)!=null&&s.length?a.events.includes(t.eventType):!0});console.log(`🟡 Processing ${t.eventType} event, found ${r.length} relevant webhooks`),r.forEach(a=>{a.debounceMs&&(t.fieldId||a.debounceMs>0)?(console.log(`🟠 Debouncing webhook for ${t.eventType} with ${a.debounceMs}ms delay`),this.debounceWebhook(a,t)):(console.log(`🟢 Queueing webhook immediately for ${t.eventType}`),this.queueWebhook(a,t))})}debounceWebhook(t,r){const n=this.generateDebounceKey(t,r);this.debounceTimers.has(n)&&(clearTimeout(this.debounceTimers.get(n)),console.log(`🔶 Cleared existing debounce timer for key: ${n}`));const i=setTimeout(()=>{console.log(`⏰ Debounce timer fired for ${r.eventType}, queueing webhook`),this.queueWebhook(t,r),this.debounceTimers.delete(n)},t.debounceMs);this.debounceTimers.set(n,i),console.log(`⏱️ Set debounce timer for ${t.debounceMs}ms, key: ${n}`)}queueWebhook(t,r){this.webhookQueue.push({config:t,event:r,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(r){const n=t.config.retries||3;t.retryCount<n?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${n} retries:`,r)}}this.isProcessingQueue=!1}}cleanEventForWebhook(t){const{schema:r,uiSchema:n,errorSchema:i,idSchema:a,schemaUtils:s,...l}=t;if(l.fieldValue&&typeof l.fieldValue=="object"){const{schema:u,uiSchema:f,errorSchema:d,idSchema:p,schemaUtils:m,...y}=l.fieldValue;l.fieldValue=y}return l.formData&&typeof l.formData=="object"&&(l.formData=this.deepCleanObject(l.formData,new WeakSet)),l}deepCleanObject(t,r=new WeakSet){if(t===null||typeof t!="object")return t;if(r.has(t))return"[Circular Reference]";if(r.add(t),Array.isArray(t))return t.map(i=>this.deepCleanObject(i,r));const n={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&i!=="schema"&&i!=="uiSchema"&&i!=="errorSchema"&&i!=="idSchema"&&i!=="schemaUtils"&&i!=="registry"&&i!=="rootSchema"&&i!=="validator"&&(n[i]=this.deepCleanObject(t[i],r));return n}async callWebhook(t,r){var n,i,a,s,l,u;try{(i=(n=this.webhookCallbacks)==null?void 0:n.onWebhookStart)==null||i.call(n,t,this.cleanEventForWebhook(r));const f={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(this.cleanEventForWebhook(r))};t.timeout&&(f.signal=AbortSignal.timeout(t.timeout));const d=await fetch(t.url,f);if(!d.ok)throw new Error(`Webhook request failed: ${d.status} ${d.statusText}`);(s=(a=this.webhookCallbacks)==null?void 0:a.onWebhookComplete)==null||s.call(a,t,this.cleanEventForWebhook(r),d)}catch(f){throw(u=(l=this.webhookCallbacks)==null?void 0:l.onWebhookError)==null||u.call(l,t,this.cleanEventForWebhook(r),f),f}}createFieldEventHandlers(t,r,n,i){return{onFocus:a=>this.handleFieldEvent("focus",t,a,r,n,i),onBlur:a=>this.handleFieldEvent("blur",t,a,r,n,i),onChange:a=>this.handleFieldEvent("change",t,a,r,n,i)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}formatValidationErrors(t){const r=[];return Object.keys(t).forEach(n=>{const i=t[n];i.__errors&&i.__errors.forEach((a,s)=>{var l;r.push({property:n,message:a,name:i.name||"validation_error",argument:(l=i.params)==null?void 0:l[s],stack:`${n} ${a}`,schemaPath:`#/properties/${n.replace(/\./g,"/properties/")}`})})}),r}generateDebounceKey(t,r){return r.fieldId?`${t.url}-${r.eventType}-${r.fieldId}`:`${t.url}-${r.eventType}`}createStandardizedPayload(t){const r={eventType:t.eventType,timestamp:t.timestamp||Date.now(),formData:t.formData,source:"extended-dynamic-forms"};switch(t.eventType){case"focus":case"blur":case"change":return{...r,fieldId:t.fieldId,fieldValue:t.fieldValue,fieldPath:t.fieldPath};case"submit":return r;case"stepChange":return{...r,fromStep:t.fromStep,toStep:t.toStep};case"validationError":return{...r,errors:t.errors};default:return{...r,...t}}}}var V1={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Nr,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function r(a){for(var s=[],l=0,u=a.length;l<u;l++)s.indexOf(a[l])===-1&&s.push(a[l]);return s}var n={},i={"==":function(a,s){return a==s},"===":function(a,s){return a===s},"!=":function(a,s){return a!=s},"!==":function(a,s){return a!==s},">":function(a,s){return a>s},">=":function(a,s){return a>=s},"<":function(a,s,l){return l===void 0?a<s:a<s&&s<l},"<=":function(a,s,l){return l===void 0?a<=s:a<=s&&s<=l},"!!":function(a){return n.truthy(a)},"!":function(a){return!n.truthy(a)},"%":function(a,s){return a%s},log:function(a){return console.log(a),a},in:function(a,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,s,l){if(l<0){var u=String(a).substr(s);return u.substr(0,u.length+l)}return String(a).substr(s,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)*parseFloat(s,10)})},"-":function(a,s){return s===void 0?-a:a-s},"/":function(a,s){return a/s},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,s){return a.concat(s)},[])},var:function(a,s){var l=s===void 0?null:s,u=this;if(typeof a>"u"||a===""||a===null)return u;for(var f=String(a).split("."),d=0;d<f.length;d++)if(u==null||(u=u[f[d]],u===void 0))return l;return u},missing:function(){for(var a=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<s.length;l++){var u=s[l],f=n.apply({var:u},this);(f===null||f==="")&&a.push(u)}return a},missing_some:function(a,s){var l=n.apply({missing:s},this);return s.length-l.length>=a?[]:l}};return n.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},n.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},n.get_operator=function(a){return Object.keys(a)[0]},n.get_values=function(a){return a[n.get_operator(a)]},n.apply=function(a,s){if(Array.isArray(a))return a.map(function(v){return n.apply(v,s)});if(!n.is_logic(a))return a;var l=n.get_operator(a),u=a[l],f,d,p,m,y;if(Array.isArray(u)||(u=[u]),l==="if"||l=="?:"){for(f=0;f<u.length-1;f+=2)if(n.truthy(n.apply(u[f],s)))return n.apply(u[f+1],s);return u.length===f+1?n.apply(u[f],s):null}else if(l==="and"){for(f=0;f<u.length;f+=1)if(d=n.apply(u[f],s),!n.truthy(d))return d;return d}else if(l==="or"){for(f=0;f<u.length;f+=1)if(d=n.apply(u[f],s),n.truthy(d))return d;return d}else{if(l==="filter")return m=n.apply(u[0],s),p=u[1],Array.isArray(m)?m.filter(function(v){return n.truthy(n.apply(p,v))}):[];if(l==="map")return m=n.apply(u[0],s),p=u[1],Array.isArray(m)?m.map(function(v){return n.apply(p,v)}):[];if(l==="reduce")return m=n.apply(u[0],s),p=u[1],y=typeof u[2]<"u"?n.apply(u[2],s):null,Array.isArray(m)?m.reduce(function(v,g){return n.apply(p,{current:g,accumulator:v})},y):y;if(l==="all"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!1;for(f=0;f<m.length;f+=1)if(!n.truthy(n.apply(p,m[f])))return!1;return!0}else if(l==="none"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!0;for(f=0;f<m.length;f+=1)if(n.truthy(n.apply(p,m[f])))return!1;return!0}else if(l==="some"){if(m=n.apply(u[0],s),p=u[1],!Array.isArray(m)||!m.length)return!1;for(f=0;f<m.length;f+=1)if(n.truthy(n.apply(p,m[f])))return!0;return!1}}if(u=u.map(function(v){return n.apply(v,s)}),i.hasOwnProperty(l)&&typeof i[l]=="function")return i[l].apply(s,u);if(l.indexOf(".")>0){var _=String(l).split("."),w=i;for(f=0;f<_.length;f++){if(!w.hasOwnProperty(_[f]))throw new Error("Unrecognized operation "+l+" (failed at "+_.slice(0,f+1).join(".")+")");w=w[_[f]]}return w.apply(s,u)}throw new Error("Unrecognized operation "+l)},n.uses_data=function(a){var s=[];if(n.is_logic(a)){var l=n.get_operator(a),u=a[l];Array.isArray(u)||(u=[u]),l==="var"?s.push(u[0]):u.forEach(function(f){s.push.apply(s,n.uses_data(f))})}return r(s)},n.add_operation=function(a,s){i[a]=s},n.rm_operation=function(a){delete i[a]},n.rule_like=function(a,s){if(s===a||s==="@")return!0;if(s==="number")return typeof a=="number";if(s==="string")return typeof a=="string";if(s==="array")return Array.isArray(a)&&!n.is_logic(a);if(n.is_logic(s)){if(n.is_logic(a)){var l=n.get_operator(s),u=n.get_operator(a);if(l==="@"||l===u)return n.rule_like(n.get_values(a,!1),n.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(a)){if(s.length!==a.length)return!1;for(var f=0;f<s.length;f+=1)if(!n.rule_like(a[f],s[f]))return!1;return!0}else return!1;return!1},n})})(V1);var Sz=V1.exports;const R1=Qt(Sz);function pc(e){return function(r,n,i){return B.useMemo(()=>{let a=n||e.defaultConfig();const s=[...r].sort((u,f)=>{const d=u.order??Number.MAX_SAFE_INTEGER,p=f.order??Number.MAX_SAFE_INTEGER;return d-p}),l=[];for(const u of s)try{let f=!1;typeof u.condition=="function"?f=u.condition(i):f=R1.apply(u.condition,i),f&&l.push(u.effect)}catch(f){process.env.NODE_ENV!=="production"&&console.error(`[ConditionalEngine] Error evaluating rule "${u.name}":`,f)}if(l.length>0)try{a=e.applyEffects(l,a,i)}catch(u){return process.env.NODE_ENV!=="production"&&console.error("[ConditionalEngine] Error applying effects:",u),n||e.defaultConfig()}return a},[r,n,i,e])}}function Cz(e,t){const r=yh(e);for(const n of t)try{switch(n.op){case"add":Ez(r,n.path,n.value);break;case"remove":Oz(r,n.path);break;case"replace":Az(r,n.path,n.value);break;default:console.warn(`Unknown operation: ${n.op}`)}}catch(i){process.env.NODE_ENV!=="production"&&console.error("Error applying patch operation:",n,i)}return r}function yh(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(r=>yh(r));const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=yh(e[r]));return t}function vh(e){return e.replace(/^\//,"").split("/").filter(Boolean)}function Ez(e,t,r){const n=vh(t),i=n.pop();if(!i)throw new Error("Invalid path");let a=e;for(const s of n)s in a||(a[s]={}),a=a[s];i==="-"&&Array.isArray(a)?a.push(r):a[i]=r}function Oz(e,t){const r=vh(t),n=r.pop();if(!n)throw new Error("Invalid path");let i=e;for(const a of r){if(!(a in i))return;i=i[a]}if(Array.isArray(i)){const a=parseInt(n,10);isNaN(a)||i.splice(a,1)}else delete i[n]}function Az(e,t,r){const n=vh(t),i=n.pop();if(!i)throw new Error("Invalid path");let a=e;for(const s of n){if(!(s in a))return;a=a[s]}a[i]=r}const z1={defaultConfig:()=>({}),applyEffects:(e,t,r)=>{const n=e.flat();return Cz(t,n)}},Tz=pc(z1);function Pz(e){return e.op==="require"||e.op==="optional"}function Iz(e){return JSON.parse(JSON.stringify(e))}function xz(e,t){const r=t.split("/").filter(Boolean);let n=e;for(const i of r)if(n&&typeof n=="object")n=n[i];else return;return n}function Dz(e,t,r){const n=t.split("/").filter(Boolean);let i=e;for(let a=0;a<n.length-1;a++){const s=n[a],l=n[a+1];!i[s]&&l==="-"?i[s]=[]:(!i[s]||typeof i[s]!="object")&&(i[s]={}),i=i[s]}if(n.length>0){const a=n[n.length-1];a==="-"&&Array.isArray(i)?i.push(r):i[a]=r}}function Fz(e,t){const r=t.split("/").filter(Boolean);let n=e;for(let i=0;i<r.length-1;i++){const a=r[i];if(!n[a]||typeof n[a]!="object")return;n=n[a]}r.length>0&&delete n[r[r.length-1]]}function Nz(e,t){switch(t.op){case"add":case"replace":Dz(e,t.path,t.value);break;case"remove":Fz(e,t.path);break}}function Mz(e,t){const r=Iz(e);for(const n of t)if(Pz(n)){const i=n.path||"",a=i?xz(r,i):r;if(a&&a.properties&&a.properties[n.field])switch(n.op){case"require":a.required||(a.required=[]),a.required.includes(n.field)||a.required.push(n.field);break;case"optional":a.required&&Array.isArray(a.required)&&(a.required=a.required.filter(s=>s!==n.field));break}}else Nz(r,n);return r}const H1={defaultConfig:()=>({type:"object",properties:{}}),applyEffects:(e,t,r)=>{const n=e.flat();return Mz(t,n)}},kz=pc(H1),K1={defaultConfig:()=>({rules:[]}),applyEffects:(e,t,r)=>{const n=e.filter(i=>{try{return typeof i.isActive=="function"?i.isActive(r):R1.apply(i.isActive,r)}catch(a){return console.error(`Error evaluating validation rule '${i.name}':`,a),!1}});return{rules:[...t.rules,...n]}}};function Lz(e){return(t,r)=>{for(const n of e.rules)try{n.validate(r,t)}catch(i){console.error(`Error in validation rule '${n.name}':`,i)}return r}}const jz=pc(K1);function Bz(e,t){return(r,n,i)=>{const a=t(r,n,i);return bh(e,a)}}function bh(e,t){const r={...e};for(const[n,i]of Object.entries(t))i!==void 0&&(typeof i=="object"&&i!==null&&!Array.isArray(i)&&typeof r[n]=="object"&&r[n]!==null&&!Array.isArray(r[n])?r[n]=bh(r[n],i):r[n]=i);return r}const Uz={hideField:(e,t)=>r=>t(r)?{[e]:{"ui:widget":"hidden"}}:{},requireField:(e,t)=>r=>t(r)?{[e]:{"ui:required":!0}}:{},applyIndexStyles:e=>(t,r)=>{const n=[];return r===0&&n.push("first-item"),r===e-1&&n.push("last-item"),n.length>0?{"ui:classNames":n.join(" ")}:{}}},G1={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const r=t.split(".");let n=e;for(const i of r)if(n&&typeof n=="object"&&i in n)n=n[i];else return;return n},setNestedValue:(e,t,r)=>{const n=t.split("."),i={...e};let a=i;for(let s=0;s<n.length-1;s++){const l=n[s];(!(l in a)||typeof a[l]!="object")&&(a[l]={}),a=a[l]}return a[n[n.length-1]]=r,i},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))n!=null&&n!==""&&(t[r]=G1.removeEmptyValues(n));return t}return e}},Y1={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const r=t.split(".");let n=e;for(const i of r)if(n.type==="object"&&n.properties)n=n.properties[i];else if(n.type==="array"&&n.items)n=n.items;else return;return n},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const r=[];if(e.type==="object"&&e.properties)for(const[n,i]of Object.entries(e.properties)){const a=t?`${t}.${n}`:n;r.push(a),r.push(...Y1.getAllFieldPaths(i,a))}return r}},Wz={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,r)=>!(t!==void 0&&e<t||r!==void 0&&e>r),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"};function J1(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(typeof e!="object"||typeof t!="object")return e===t;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r)if(!n.includes(i)||!J1(e[i],t[i]))return!1;return!0}var _h={exports:{}},X1={},kr={},$a={},jo={},De={},Bo={};(function(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 t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((S,E)=>`${S}${E}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((S,E)=>(E instanceof r&&(S[E.str]=(S[E.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function i(g,...C){const S=[g[0]];let E=0;for(;E<C.length;)l(S,C[E]),S.push(g[++E]);return new n(S)}e._=i;const a=new n("+");function s(g,...C){const S=[y(g[0])];let E=0;for(;E<C.length;)S.push(a),l(S,C[E]),S.push(a,y(g[++E]));return u(S),new n(S)}e.str=s;function l(g,C){C instanceof n?g.push(...C._items):C instanceof r?g.push(C):g.push(p(C))}e.addCodeArg=l;function u(g){let C=1;for(;C<g.length-1;){if(g[C]===a){const S=f(g[C-1],g[C+1]);if(S!==void 0){g.splice(C-1,3,S);continue}g[C++]="+"}C++}}function f(g,C){if(C==='""')return g;if(g==='""')return C;if(typeof g=="string")return C instanceof r||g[g.length-1]!=='"'?void 0:typeof C!="string"?`${g.slice(0,-1)}${C}"`:C[0]==='"'?g.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(g instanceof r))return`"${g}${C.slice(1)}`}function d(g,C){return C.emptyStr()?g:g.emptyStr()?C:s`${g}${C}`}e.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:y(Array.isArray(g)?g.join(","):g)}function m(g){return new n(y(g))}e.stringify=m;function y(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function _(g){return typeof g=="string"&&e.IDENTIFIER.test(g)?new n(`.${g}`):i`[${g}]`}e.getProperty=_;function w(g){if(typeof g=="string"&&e.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}e.getEsmExportName=w;function v(g){return new n(g.toString())}e.regexpCode=v})(Bo);var $h={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Bo;class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:f,parent:d}={}){this._names={},this._prefixes=f,this._parent=d}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const d=this._names[f]||this._nameGroup(f);return`${f}${d.index++}`}_nameGroup(f){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=i;class a extends t.Name{constructor(f,d){super(d),this.prefix=f}setValue(f,{property:d,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(d)}[${p}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class l extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?s:t.nil}}get(){return this._scope}name(f){return new a(f,this._newName(f))}value(f,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(f),{prefix:y}=m,_=(p=d.key)!==null&&p!==void 0?p:d.ref;let w=this._values[y];if(w){const C=w.get(_);if(C)return C}else w=this._values[y]=new Map;w.set(_,m);const v=this._scope[y]||(this._scope[y]=[]),g=v.length;return v[g]=d.ref,m.setValue(d,{property:y,itemIndex:g}),m}getValue(f,d){const p=this._values[f];if(p)return p.get(d)}scopeRefs(f,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,d,p){return this._reduceValues(f,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},d,p)}_reduceValues(f,d,p={},m){let y=t.nil;for(const _ in f){const w=f[_];if(!w)continue;const v=p[_]=p[_]||new Map;w.forEach(g=>{if(v.has(g))return;v.set(g,n.Started);let C=d(g);if(C){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${S} ${g} = ${C};${this.opts._n}`}else if(C=m==null?void 0:m(g))y=(0,t._)`${y}${C}${this.opts._n}`;else throw new r(g);v.set(g,n.Completed)})}return y}}e.ValueScope=l})($h),function(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;const t=Bo,r=$h;var n=Bo;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=$h;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(T,D){return this}}class s extends a{constructor(T,D,V){super(),this.varKind=T,this.name=D,this.rhs=V}render({es5:T,_n:D}){const V=T?r.varKinds.var:this.varKind,Z=this.rhs===void 0?"":` = ${this.rhs}`;return`${V} ${this.name}${Z};`+D}optimizeNames(T,D){if(T[this.name.str])return this.rhs&&(this.rhs=Q(this.rhs,T,D)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(T,D,V){super(),this.lhs=T,this.rhs=D,this.sideEffects=V}render({_n:T}){return`${this.lhs} = ${this.rhs};`+T}optimizeNames(T,D){if(!(this.lhs instanceof t.Name&&!T[this.lhs.str]&&!this.sideEffects))return this.rhs=Q(this.rhs,T,D),this}get names(){const T=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ae(T,this.rhs)}}class u extends l{constructor(T,D,V,Z){super(T,V,Z),this.op=D}render({_n:T}){return`${this.lhs} ${this.op}= ${this.rhs};`+T}}class f extends a{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`${this.label}:`+T}}class d extends a{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`break${this.label?` ${this.label}`:""};`+T}}class p extends a{constructor(T){super(),this.error=T}render({_n:T}){return`throw ${this.error};`+T}get names(){return this.error.names}}class m extends a{constructor(T){super(),this.code=T}render({_n:T}){return`${this.code};`+T}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(T,D){return this.code=Q(this.code,T,D),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends a{constructor(T=[]){super(),this.nodes=T}render(T){return this.nodes.reduce((D,V)=>D+V.render(T),"")}optimizeNodes(){const{nodes:T}=this;let D=T.length;for(;D--;){const V=T[D].optimizeNodes();Array.isArray(V)?T.splice(D,1,...V):V?T[D]=V:T.splice(D,1)}return T.length>0?this:void 0}optimizeNames(T,D){const{nodes:V}=this;let Z=V.length;for(;Z--;){const oe=V[Z];oe.optimizeNames(T,D)||(k(T,oe.names),V.splice(Z,1))}return V.length>0?this:void 0}get names(){return this.nodes.reduce((T,D)=>ee(T,D.names),{})}}class _ extends y{render(T){return"{"+T._n+super.render(T)+"}"+T._n}}class w extends y{}class v extends _{}v.kind="else";class g extends _{constructor(T,D){super(D),this.condition=T}render(T){let D=`if(${this.condition})`+super.render(T);return this.else&&(D+="else "+this.else.render(T)),D}optimizeNodes(){super.optimizeNodes();const T=this.condition;if(T===!0)return this.nodes;let D=this.else;if(D){const V=D.optimizeNodes();D=this.else=Array.isArray(V)?new v(V):V}if(D)return T===!1?D instanceof g?D:D.nodes:this.nodes.length?this:new g(q(T),D instanceof g?[D]:D.nodes);if(!(T===!1||!this.nodes.length))return this}optimizeNames(T,D){var V;if(this.else=(V=this.else)===null||V===void 0?void 0:V.optimizeNames(T,D),!!(super.optimizeNames(T,D)||this.else))return this.condition=Q(this.condition,T,D),this}get names(){const T=super.names;return ae(T,this.condition),this.else&&ee(T,this.else.names),T}}g.kind="if";class C extends _{}C.kind="for";class S extends C{constructor(T){super(),this.iteration=T}render(T){return`for(${this.iteration})`+super.render(T)}optimizeNames(T,D){if(super.optimizeNames(T,D))return this.iteration=Q(this.iteration,T,D),this}get names(){return ee(super.names,this.iteration.names)}}class E extends C{constructor(T,D,V,Z){super(),this.varKind=T,this.name=D,this.from=V,this.to=Z}render(T){const D=T.es5?r.varKinds.var:this.varKind,{name:V,from:Z,to:oe}=this;return`for(${D} ${V}=${Z}; ${V}<${oe}; ${V}++)`+super.render(T)}get names(){const T=ae(super.names,this.from);return ae(T,this.to)}}class A extends C{constructor(T,D,V,Z){super(),this.loop=T,this.varKind=D,this.name=V,this.iterable=Z}render(T){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(T)}optimizeNames(T,D){if(super.optimizeNames(T,D))return this.iterable=Q(this.iterable,T,D),this}get names(){return ee(super.names,this.iterable.names)}}class x extends _{constructor(T,D,V){super(),this.name=T,this.args=D,this.async=V}render(T){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(T)}}x.kind="func";class N extends y{render(T){return"return "+super.render(T)}}N.kind="return";class Y extends _{render(T){let D="try"+super.render(T);return this.catch&&(D+=this.catch.render(T)),this.finally&&(D+=this.finally.render(T)),D}optimizeNodes(){var T,D;return super.optimizeNodes(),(T=this.catch)===null||T===void 0||T.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(T,D){var V,Z;return super.optimizeNames(T,D),(V=this.catch)===null||V===void 0||V.optimizeNames(T,D),(Z=this.finally)===null||Z===void 0||Z.optimizeNames(T,D),this}get names(){const T=super.names;return this.catch&&ee(T,this.catch.names),this.finally&&ee(T,this.finally.names),T}}class K extends _{constructor(T){super(),this.error=T}render(T){return`catch(${this.error})`+super.render(T)}}K.kind="catch";class H extends _{render(T){return"finally"+super.render(T)}}H.kind="finally";class te{constructor(T,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
109
+ `:""},this._extScope=T,this._scope=new r.Scope({parent:T}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(T){return this._scope.name(T)}scopeName(T){return this._extScope.name(T)}scopeValue(T,D){const V=this._extScope.value(T,D);return(this._values[V.prefix]||(this._values[V.prefix]=new Set)).add(V),V}getScopeValue(T,D){return this._extScope.getValue(T,D)}scopeRefs(T){return this._extScope.scopeRefs(T,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(T,D,V,Z){const oe=this._scope.toName(D);return V!==void 0&&Z&&(this._constants[oe.str]=V),this._leafNode(new s(T,oe,V)),oe}const(T,D,V){return this._def(r.varKinds.const,T,D,V)}let(T,D,V){return this._def(r.varKinds.let,T,D,V)}var(T,D,V){return this._def(r.varKinds.var,T,D,V)}assign(T,D,V){return this._leafNode(new l(T,D,V))}add(T,D){return this._leafNode(new u(T,e.operators.ADD,D))}code(T){return typeof T=="function"?T():T!==t.nil&&this._leafNode(new m(T)),this}object(...T){const D=["{"];for(const[V,Z]of T)D.length>1&&D.push(","),D.push(V),(V!==Z||this.opts.es5)&&(D.push(":"),(0,t.addCodeArg)(D,Z));return D.push("}"),new t._Code(D)}if(T,D,V){if(this._blockNode(new g(T)),D&&V)this.code(D).else().code(V).endIf();else if(D)this.code(D).endIf();else if(V)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(T){return this._elseNode(new g(T))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(T,D){return this._blockNode(T),D&&this.code(D).endFor(),this}for(T,D){return this._for(new S(T),D)}forRange(T,D,V,Z,oe=this.opts.es5?r.varKinds.var:r.varKinds.let){const ue=this._scope.toName(T);return this._for(new E(oe,ue,D,V),()=>Z(ue))}forOf(T,D,V,Z=r.varKinds.const){const oe=this._scope.toName(T);if(this.opts.es5){const ue=D instanceof t.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,t._)`${ue}.length`,he=>{this.var(oe,(0,t._)`${ue}[${he}]`),V(oe)})}return this._for(new A("of",Z,oe,D),()=>V(oe))}forIn(T,D,V,Z=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(T,(0,t._)`Object.keys(${D})`,V);const oe=this._scope.toName(T);return this._for(new A("in",Z,oe,D),()=>V(oe))}endFor(){return this._endBlockNode(C)}label(T){return this._leafNode(new f(T))}break(T){return this._leafNode(new d(T))}return(T){const D=new N;if(this._blockNode(D),this.code(T),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(T,D,V){if(!D&&!V)throw new Error('CodeGen: "try" without "catch" and "finally"');const Z=new Y;if(this._blockNode(Z),this.code(T),D){const oe=this.name("e");this._currNode=Z.catch=new K(oe),D(oe)}return V&&(this._currNode=Z.finally=new H,this.code(V)),this._endBlockNode(K,H)}throw(T){return this._leafNode(new p(T))}block(T,D){return this._blockStarts.push(this._nodes.length),T&&this.code(T).endBlock(D),this}endBlock(T){const D=this._blockStarts.pop();if(D===void 0)throw new Error("CodeGen: not in self-balancing block");const V=this._nodes.length-D;if(V<0||T!==void 0&&V!==T)throw new Error(`CodeGen: wrong number of nodes: ${V} vs ${T} expected`);return this._nodes.length=D,this}func(T,D=t.nil,V,Z){return this._blockNode(new x(T,D,V)),Z&&this.code(Z).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(T=1){for(;T-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(T){return this._currNode.nodes.push(T),this}_blockNode(T){this._currNode.nodes.push(T),this._nodes.push(T)}_endBlockNode(T,D){const V=this._currNode;if(V instanceof T||D&&V instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${T.kind}/${D.kind}`:T.kind}"`)}_elseNode(T){const D=this._currNode;if(!(D instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=T,this}get _root(){return this._nodes[0]}get _currNode(){const T=this._nodes;return T[T.length-1]}set _currNode(T){const D=this._nodes;D[D.length-1]=T}}e.CodeGen=te;function ee(j,T){for(const D in T)j[D]=(j[D]||0)+(T[D]||0);return j}function ae(j,T){return T instanceof t._CodeOrName?ee(j,T.names):j}function Q(j,T,D){if(j instanceof t.Name)return V(j);if(!Z(j))return j;return new t._Code(j._items.reduce((oe,ue)=>(ue instanceof t.Name&&(ue=V(ue)),ue instanceof t._Code?oe.push(...ue._items):oe.push(ue),oe),[]));function V(oe){const ue=D[oe.str];return ue===void 0||T[oe.str]!==1?oe:(delete T[oe.str],ue)}function Z(oe){return oe instanceof t._Code&&oe._items.some(ue=>ue instanceof t.Name&&T[ue.str]===1&&D[ue.str]!==void 0)}}function k(j,T){for(const D in T)j[D]=(j[D]||0)-(T[D]||0)}function q(j){return typeof j=="boolean"||typeof j=="number"||j===null?!j:(0,t._)`!${z(j)}`}e.not=q;const W=F(e.operators.AND);function L(...j){return j.reduce(W)}e.and=L;const X=F(e.operators.OR);function U(...j){return j.reduce(X)}e.or=U;function F(j){return(T,D)=>T===t.nil?D:D===t.nil?T:(0,t._)`${z(T)} ${j} ${z(D)}`}function z(j){return j instanceof t.Name?j:(0,t._)`(${j})`}}(De);var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.checkStrictMode=ye.getErrorPath=ye.Type=ye.useFunc=ye.setEvaluated=ye.evaluatedPropsToName=ye.mergeEvaluated=ye.eachItem=ye.unescapeJsonPointer=ye.escapeJsonPointer=ye.escapeFragment=ye.unescapeFragment=ye.schemaRefOrVal=ye.schemaHasRulesButRef=ye.schemaHasRules=ye.checkUnknownRules=ye.alwaysValidSchema=ye.toHash=void 0;const et=De,qz=Bo;function Vz(e){const t={};for(const r of e)t[r]=!0;return t}ye.toHash=Vz;function Rz(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Z1(e,t),!Q1(t,e.self.RULES.all))}ye.alwaysValidSchema=Rz;function Z1(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;const i=n.RULES.keywords;for(const a in t)i[a]||i$(e,`unknown keyword: "${a}"`)}ye.checkUnknownRules=Z1;function Q1(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}ye.schemaHasRules=Q1;function zz(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ye.schemaHasRulesButRef=zz;function Hz({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,et._)`${r}`}return(0,et._)`${e}${t}${(0,et.getProperty)(n)}`}ye.schemaRefOrVal=Hz;function Kz(e){return e$(decodeURIComponent(e))}ye.unescapeFragment=Kz;function Gz(e){return encodeURIComponent(wh(e))}ye.escapeFragment=Gz;function wh(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ye.escapeJsonPointer=wh;function e$(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ye.unescapeJsonPointer=e$;function Yz(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}ye.eachItem=Yz;function t$({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,a,s,l)=>{const u=s===void 0?a:s instanceof et.Name?(a instanceof et.Name?e(i,a,s):t(i,a,s),s):a instanceof et.Name?(t(i,s,a),a):r(a,s);return l===et.Name&&!(u instanceof et.Name)?n(i,u):u}}ye.mergeEvaluated={props:t$({mergeNames:(e,t,r)=>e.if((0,et._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,et._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,et._)`${r} || {}`).code((0,et._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,et._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,et._)`${r} || {}`),Sh(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:r$}),items:t$({mergeNames:(e,t,r)=>e.if((0,et._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,et._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,et._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,et._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function r$(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,et._)`{}`);return t!==void 0&&Sh(e,r,t),r}ye.evaluatedPropsToName=r$;function Sh(e,t,r){Object.keys(r).forEach(n=>e.assign((0,et._)`${t}${(0,et.getProperty)(n)}`,!0))}ye.setEvaluated=Sh;const n$={};function Jz(e,t){return e.scopeValue("func",{ref:t,code:n$[t.code]||(n$[t.code]=new qz._Code(t.code))})}ye.useFunc=Jz;var Ch;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ch||(ye.Type=Ch={}));function Xz(e,t,r){if(e instanceof et.Name){const n=t===Ch.Num;return r?n?(0,et._)`"[" + ${e} + "]"`:(0,et._)`"['" + ${e} + "']"`:n?(0,et._)`"/" + ${e}`:(0,et._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,et.getProperty)(e).toString():"/"+wh(e)}ye.getErrorPath=Xz;function i$(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ye.checkStrictMode=i$;var an={};Object.defineProperty(an,"__esModule",{value:!0});const Wt=De,Zz={data:new Wt.Name("data"),valCxt:new Wt.Name("valCxt"),instancePath:new Wt.Name("instancePath"),parentData:new Wt.Name("parentData"),parentDataProperty:new Wt.Name("parentDataProperty"),rootData:new Wt.Name("rootData"),dynamicAnchors:new Wt.Name("dynamicAnchors"),vErrors:new Wt.Name("vErrors"),errors:new Wt.Name("errors"),this:new Wt.Name("this"),self:new Wt.Name("self"),scope:new Wt.Name("scope"),json:new Wt.Name("json"),jsonPos:new Wt.Name("jsonPos"),jsonLen:new Wt.Name("jsonLen"),jsonPart:new Wt.Name("jsonPart")};an.default=Zz,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=De,r=ye,n=an;e.keywordError={message:({keyword:v})=>(0,t.str)`must pass "${v}" keyword validation`},e.keyword$DataError={message:({keyword:v,schemaType:g})=>g?(0,t.str)`"${v}" keyword must be ${g} ($data)`:(0,t.str)`"${v}" keyword is invalid ($data)`};function i(v,g=e.keywordError,C,S){const{it:E}=v,{gen:A,compositeRule:x,allErrors:N}=E,Y=p(v,g,C);S??(x||N)?u(A,Y):f(E,(0,t._)`[${Y}]`)}e.reportError=i;function a(v,g=e.keywordError,C){const{it:S}=v,{gen:E,compositeRule:A,allErrors:x}=S,N=p(v,g,C);u(E,N),A||x||f(S,n.default.vErrors)}e.reportExtraError=a;function s(v,g){v.assign(n.default.errors,g),v.if((0,t._)`${n.default.vErrors} !== null`,()=>v.if(g,()=>v.assign((0,t._)`${n.default.vErrors}.length`,g),()=>v.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function l({gen:v,keyword:g,schemaValue:C,data:S,errsCount:E,it:A}){if(E===void 0)throw new Error("ajv implementation error");const x=v.name("err");v.forRange("i",E,n.default.errors,N=>{v.const(x,(0,t._)`${n.default.vErrors}[${N}]`),v.if((0,t._)`${x}.instancePath === undefined`,()=>v.assign((0,t._)`${x}.instancePath`,(0,t.strConcat)(n.default.instancePath,A.errorPath))),v.assign((0,t._)`${x}.schemaPath`,(0,t.str)`${A.errSchemaPath}/${g}`),A.opts.verbose&&(v.assign((0,t._)`${x}.schema`,C),v.assign((0,t._)`${x}.data`,S))})}e.extendErrors=l;function u(v,g){const C=v.const("err",g);v.if((0,t._)`${n.default.vErrors} === null`,()=>v.assign(n.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${n.default.vErrors}.push(${C})`),v.code((0,t._)`${n.default.errors}++`)}function f(v,g){const{gen:C,validateName:S,schemaEnv:E}=v;E.$async?C.throw((0,t._)`new ${v.ValidationError}(${g})`):(C.assign((0,t._)`${S}.errors`,g),C.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(v,g,C){const{createErrors:S}=v.it;return S===!1?(0,t._)`{}`:m(v,g,C)}function m(v,g,C={}){const{gen:S,it:E}=v,A=[y(E,C),_(v,C)];return w(v,g,A),S.object(...A)}function y({errorPath:v},{instancePath:g}){const C=g?(0,t.str)`${v}${(0,r.getErrorPath)(g,r.Type.Str)}`:v;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,C)]}function _({keyword:v,it:{errSchemaPath:g}},{schemaPath:C,parentSchema:S}){let E=S?g:(0,t.str)`${g}/${v}`;return C&&(E=(0,t.str)`${E}${(0,r.getErrorPath)(C,r.Type.Str)}`),[d.schemaPath,E]}function w(v,{params:g,message:C},S){const{keyword:E,data:A,schemaValue:x,it:N}=v,{opts:Y,propertyName:K,topSchemaRef:H,schemaPath:te}=N;S.push([d.keyword,E],[d.params,typeof g=="function"?g(v):g||(0,t._)`{}`]),Y.messages&&S.push([d.message,typeof C=="function"?C(v):C]),Y.verbose&&S.push([d.schema,x],[d.parentSchema,(0,t._)`${H}${te}`],[n.default.data,A]),K&&S.push([d.propertyName,K])}}(jo),Object.defineProperty($a,"__esModule",{value:!0}),$a.boolOrEmptySchema=$a.topBoolOrEmptySchema=void 0;const Qz=jo,e7=De,t7=an,r7={message:"boolean schema is false"};function n7(e){const{gen:t,schema:r,validateName:n}=e;r===!1?a$(e,!1):typeof r=="object"&&r.$async===!0?t.return(t7.default.data):(t.assign((0,e7._)`${n}.errors`,null),t.return(!0))}$a.topBoolOrEmptySchema=n7;function i7(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),a$(e)):r.var(t,!0)}$a.boolOrEmptySchema=i7;function a$(e,t){const{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Qz.reportError)(i,r7,void 0,t)}var Pt={},Si={};Object.defineProperty(Si,"__esModule",{value:!0}),Si.getRules=Si.isJSONType=void 0;const a7=["string","number","integer","boolean","null","object","array"],o7=new Set(a7);function s7(e){return typeof e=="string"&&o7.has(e)}Si.isJSONType=s7;function l7(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Si.getRules=l7;var _n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.shouldUseRule=_n.shouldUseGroup=_n.schemaHasRulesForType=void 0;function c7({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&o$(e,n)}_n.schemaHasRulesForType=c7;function o$(e,t){return t.rules.some(r=>s$(e,r))}_n.shouldUseGroup=o$;function s$(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}_n.shouldUseRule=s$,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.reportTypeError=Pt.checkDataTypes=Pt.checkDataType=Pt.coerceAndCheckDataType=Pt.getJSONTypes=Pt.getSchemaTypes=Pt.DataType=void 0;const u7=Si,f7=_n,d7=jo,Ie=De,l$=ye;var wa;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(wa||(Pt.DataType=wa={}));function h7(e){const t=c$(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Pt.getSchemaTypes=h7;function c$(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(u7.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Pt.getJSONTypes=c$;function p7(e,t){const{gen:r,data:n,opts:i}=e,a=m7(t,i.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,f7.schemaHasRulesForType)(e,t[0]));if(s){const l=Oh(t,n,i.strictNumbers,wa.Wrong);r.if(l,()=>{a.length?g7(e,t,a):Ah(e)})}return s}Pt.coerceAndCheckDataType=p7;const u$=new Set(["string","number","integer","boolean","null"]);function m7(e,t){return t?e.filter(r=>u$.has(r)||t==="array"&&r==="array"):[]}function g7(e,t,r){const{gen:n,data:i,opts:a}=e,s=n.let("dataType",(0,Ie._)`typeof ${i}`),l=n.let("coerced",(0,Ie._)`undefined`);a.coerceTypes==="array"&&n.if((0,Ie._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ie._)`${i}[0]`).assign(s,(0,Ie._)`typeof ${i}`).if(Oh(t,i,a.strictNumbers),()=>n.assign(l,i))),n.if((0,Ie._)`${l} !== undefined`);for(const f of r)(u$.has(f)||f==="array"&&a.coerceTypes==="array")&&u(f);n.else(),Ah(e),n.endIf(),n.if((0,Ie._)`${l} !== undefined`,()=>{n.assign(i,l),y7(e,l)});function u(f){switch(f){case"string":n.elseIf((0,Ie._)`${s} == "number" || ${s} == "boolean"`).assign(l,(0,Ie._)`"" + ${i}`).elseIf((0,Ie._)`${i} === null`).assign(l,(0,Ie._)`""`);return;case"number":n.elseIf((0,Ie._)`${s} == "boolean" || ${i} === null
110
110
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(l,(0,Ie._)`+${i}`);return;case"integer":n.elseIf((0,Ie._)`${s} === "boolean" || ${i} === null
111
111
  || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,(0,Ie._)`+${i}`);return;case"boolean":n.elseIf((0,Ie._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf((0,Ie._)`${i} === "true" || ${i} === 1`).assign(l,!0);return;case"null":n.elseIf((0,Ie._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(l,null);return;case"array":n.elseIf((0,Ie._)`${s} === "string" || ${s} === "number"
112
- || ${s} === "boolean" || ${i} === null`).assign(l,(0,Ie._)`[${i}]`)}}}function y7({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ie._)`${t} !== undefined`,()=>e.assign((0,Ie._)`${t}[${r}]`,n))}function Ch(e,t,r,n=wa.Correct){const i=n===wa.Correct?Ie.operators.EQ:Ie.operators.NEQ;let a;switch(e){case"null":return(0,Ie._)`${t} ${i} null`;case"array":a=(0,Ie._)`Array.isArray(${t})`;break;case"object":a=(0,Ie._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,Ie._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,Ie._)`typeof ${t} ${i} ${e}`}return n===wa.Correct?a:(0,Ie.not)(a);function s(l=Ie.nil){return(0,Ie.and)((0,Ie._)`typeof ${t} == "number"`,l,r?(0,Ie._)`isFinite(${t})`:Ie.nil)}}Tt.checkDataType=Ch;function Eh(e,t,r,n){if(e.length===1)return Ch(e[0],t,r,n);let i;const a=(0,l$.toHash)(e);if(a.array&&a.object){const s=(0,Ie._)`typeof ${t} != "object"`;i=a.null?s:(0,Ie._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else i=Ie.nil;a.number&&delete a.integer;for(const s in a)i=(0,Ie.and)(i,Ch(s,t,r,n));return i}Tt.checkDataTypes=Eh;const v7={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ie._)`{type: ${e}}`:(0,Ie._)`{type: ${t}}`};function Oh(e){const t=b7(e);(0,d7.reportError)(t,v7)}Tt.reportTypeError=Oh;function b7(e){const{gen:t,data:r,schema:n}=e,i=(0,l$.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}var mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.assignDefaults=void 0;const Sa=De,_7=ye;function $7(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const i in r)f$(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,a)=>f$(e,a,i.default))}mc.assignDefaults=$7;function f$(e,t,r){const{gen:n,compositeRule:i,data:a,opts:s}=e;if(r===void 0)return;const l=(0,Sa._)`${a}${(0,Sa.getProperty)(t)}`;if(i){(0,_7.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,Sa._)`${l} === undefined`;s.useDefaults==="empty"&&(u=(0,Sa._)`${u} || ${l} === null || ${l} === ""`),n.if(u,(0,Sa._)`${l} = ${(0,Sa.stringify)(r)}`)}var an={},Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.validateUnion=Me.validateArray=Me.usePattern=Me.callValidateCode=Me.schemaProperties=Me.allSchemaProperties=Me.noPropertyInData=Me.propertyInData=Me.isOwnProperty=Me.hasPropFunc=Me.reportMissingProp=Me.checkMissingProp=Me.checkReportMissingProp=void 0;const ct=De,Ah=ye,zn=nn,w7=ye;function S7(e,t){const{gen:r,data:n,it:i}=e;r.if(Ph(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ct._)`${t}`},!0),e.error()})}Me.checkReportMissingProp=S7;function C7({gen:e,data:t,it:{opts:r}},n,i){return(0,ct.or)(...n.map(a=>(0,ct.and)(Ph(e,t,a,r.ownProperties),(0,ct._)`${i} = ${a}`)))}Me.checkMissingProp=C7;function E7(e,t){e.setParams({missingProperty:t},!0),e.error()}Me.reportMissingProp=E7;function d$(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Me.hasPropFunc=d$;function Th(e,t,r){return(0,ct._)`${d$(e)}.call(${t}, ${r})`}Me.isOwnProperty=Th;function O7(e,t,r,n){const i=(0,ct._)`${t}${(0,ct.getProperty)(r)} !== undefined`;return n?(0,ct._)`${i} && ${Th(e,t,r)}`:i}Me.propertyInData=O7;function Ph(e,t,r,n){const i=(0,ct._)`${t}${(0,ct.getProperty)(r)} === undefined`;return n?(0,ct.or)(i,(0,ct.not)(Th(e,t,r))):i}Me.noPropertyInData=Ph;function h$(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Me.allSchemaProperties=h$;function A7(e,t){return h$(t).filter(r=>!(0,Ah.alwaysValidSchema)(e,t[r]))}Me.schemaProperties=A7;function T7({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:s},l,u,f){const d=f?(0,ct._)`${e}, ${t}, ${n}${i}`:t,p=[[zn.default.instancePath,(0,ct.strConcat)(zn.default.instancePath,a)],[zn.default.parentData,s.parentData],[zn.default.parentDataProperty,s.parentDataProperty],[zn.default.rootData,zn.default.rootData]];s.opts.dynamicRef&&p.push([zn.default.dynamicAnchors,zn.default.dynamicAnchors]);const m=(0,ct._)`${d}, ${r.object(...p)}`;return u!==ct.nil?(0,ct._)`${l}.call(${u}, ${m})`:(0,ct._)`${l}(${m})`}Me.callValidateCode=T7;const P7=(0,ct._)`new RegExp`;function I7({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,ct._)`${i.code==="new RegExp"?P7:(0,w7.useFunc)(e,i)}(${r}, ${n})`})}Me.usePattern=I7;function x7(e){const{gen:t,data:r,keyword:n,it:i}=e,a=t.name("valid");if(i.allErrors){const l=t.let("valid",!0);return s(()=>t.assign(l,!1)),l}return t.var(a,!0),s(()=>t.break()),a;function s(l){const u=t.const("len",(0,ct._)`${r}.length`);t.forRange("i",0,u,f=>{e.subschema({keyword:n,dataProp:f,dataPropType:Ah.Type.Num},a),t.if((0,ct.not)(a),l)})}}Me.validateArray=x7;function D7(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Ah.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((u,f)=>{const d=e.subschema({keyword:n,schemaProp:f,compositeRule:!0},l);t.assign(s,(0,ct._)`${s} || ${l}`),e.mergeValidEvaluated(d,l)||t.if((0,ct.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Me.validateUnion=D7,Object.defineProperty(an,"__esModule",{value:!0}),an.validateKeywordUsage=an.validSchemaType=an.funcKeywordCode=an.macroKeywordCode=void 0;const Gt=De,Ci=nn,F7=Me,N7=Lo;function M7(e,t){const{gen:r,keyword:n,schema:i,parentSchema:a,it:s}=e,l=t.macro.call(s.self,i,a,s),u=m$(r,n,l);s.opts.validateSchema!==!1&&s.self.validateSchema(l,!0);const f=r.name("valid");e.subschema({schema:l,schemaPath:Gt.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},f),e.pass(f,()=>e.error(!0))}an.macroKeywordCode=M7;function k7(e,t){var r;const{gen:n,keyword:i,schema:a,parentSchema:s,$data:l,it:u}=e;j7(u,t);const f=!l&&t.compile?t.compile.call(u.self,a,s,u):t.validate,d=m$(n,i,f),p=n.let("valid");e.block$data(p,m),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function m(){if(t.errors===!1)w(),t.modifying&&p$(e),v(()=>e.error());else{const g=t.async?y():_();t.modifying&&p$(e),v(()=>L7(e,g))}}function y(){const g=n.let("ruleErrs",null);return n.try(()=>w((0,Gt._)`await `),C=>n.assign(p,!1).if((0,Gt._)`${C} instanceof ${u.ValidationError}`,()=>n.assign(g,(0,Gt._)`${C}.errors`),()=>n.throw(C))),g}function _(){const g=(0,Gt._)`${d}.errors`;return n.assign(g,null),w(Gt.nil),g}function w(g=t.async?(0,Gt._)`await `:Gt.nil){const C=u.opts.passContext?Ci.default.this:Ci.default.self,S=!("compile"in t&&!l||t.schema===!1);n.assign(p,(0,Gt._)`${g}${(0,F7.callValidateCode)(e,d,C,S)}`,t.modifying)}function v(g){var C;n.if((0,Gt.not)((C=t.valid)!==null&&C!==void 0?C:p),g)}}an.funcKeywordCode=k7;function p$(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Gt._)`${n.parentData}[${n.parentDataProperty}]`))}function L7(e,t){const{gen:r}=e;r.if((0,Gt._)`Array.isArray(${t})`,()=>{r.assign(Ci.default.vErrors,(0,Gt._)`${Ci.default.vErrors} === null ? ${t} : ${Ci.default.vErrors}.concat(${t})`).assign(Ci.default.errors,(0,Gt._)`${Ci.default.vErrors}.length`),(0,N7.extendErrors)(e)},()=>e.error())}function j7({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function m$(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Gt.stringify)(r)})}function B7(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}an.validSchemaType=B7;function U7({schema:e,opts:t,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const s=i.dependencies;if(s!=null&&s.some(l=>!Object.prototype.hasOwnProperty.call(e,l)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){const u=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}an.validateKeywordUsage=U7;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.extendSubschemaMode=Hn.extendSubschemaData=Hn.getSubschema=void 0;const on=De,g$=ye;function W7(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const l=e.schema[t];return r===void 0?{schema:l,schemaPath:(0,on._)`${e.schemaPath}${(0,on.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:l[r],schemaPath:(0,on._)`${e.schemaPath}${(0,on.getProperty)(t)}${(0,on.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,g$.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Hn.getSubschema=W7;function q7(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(r!==void 0){const{errorPath:f,dataPathArr:d,opts:p}=t,m=l.let("data",(0,on._)`${t.data}${(0,on.getProperty)(r)}`,!0);u(m),e.errorPath=(0,on.str)`${f}${(0,g$.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,on._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){const f=i instanceof on.Name?i:l.let("data",i,!0);u(f),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function u(f){e.data=f,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,f]}}Hn.extendSubschemaData=q7;function V7(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}Hn.extendSubschemaMode=V7;var kt={},y$=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r},v$={exports:{}},Kn=v$.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};gc(t,n,i,e,"",e)};Kn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Kn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Kn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Kn.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};function gc(e,t,r,n,i,a,s,l,u,f){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,a,s,l,u,f);for(var d in n){var p=n[d];if(Array.isArray(p)){if(d in Kn.arrayKeywords)for(var m=0;m<p.length;m++)gc(e,t,r,p[m],i+"/"+d+"/"+m,a,i,d,n,m)}else if(d in Kn.propsKeywords){if(p&&typeof p=="object")for(var y in p)gc(e,t,r,p[y],i+"/"+d+"/"+R7(y),a,i,d,n,y)}else(d in Kn.keywords||e.allKeys&&!(d in Kn.skipKeywords))&&gc(e,t,r,p,i+"/"+d,a,i,d,n)}r(n,i,a,s,l,u,f)}}function R7(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var z7=v$.exports;Object.defineProperty(kt,"__esModule",{value:!0}),kt.getSchemaRefs=kt.resolveUrl=kt.normalizeId=kt._getFullPath=kt.getFullPath=kt.inlineRef=void 0;const H7=ye,K7=y$,G7=z7,Y7=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function J7(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ih(e):t?b$(e)<=t:!1}kt.inlineRef=J7;const X7=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ih(e){for(const t in e){if(X7.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Ih)||typeof r=="object"&&Ih(r))return!0}return!1}function b$(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Y7.has(r)&&(typeof e[r]=="object"&&(0,H7.eachItem)(e[r],n=>t+=b$(n)),t===1/0))return 1/0}return t}function _$(e,t="",r){r!==!1&&(t=Ca(t));const n=e.parse(t);return $$(e,n)}kt.getFullPath=_$;function $$(e,t){return e.serialize(t).split("#")[0]+"#"}kt._getFullPath=$$;const Z7=/#\/?$/;function Ca(e){return e?e.replace(Z7,""):""}kt.normalizeId=Ca;function Q7(e,t,r){return r=Ca(r),e.resolve(t,r)}kt.resolveUrl=Q7;const eH=/^[a-z_][-a-z0-9._]*$/i;function tH(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=Ca(e[r]||t),a={"":i},s=_$(n,i,!1),l={},u=new Set;return G7(e,{allKeys:!0},(p,m,y,_)=>{if(_===void 0)return;const w=s+m;let v=a[_];typeof p[r]=="string"&&(v=g.call(this,p[r])),C.call(this,p.$anchor),C.call(this,p.$dynamicAnchor),a[m]=v;function g(S){const E=this.opts.uriResolver.resolve;if(S=Ca(v?E(v,S):S),u.has(S))throw d(S);u.add(S);let A=this.refs[S];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?f(p,A.schema,S):S!==Ca(w)&&(S[0]==="#"?(f(p,l[S],S),l[S]=p):this.refs[S]=w),S}function C(S){if(typeof S=="string"){if(!eH.test(S))throw new Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),l;function f(p,m,y){if(m!==void 0&&!K7(p,m))throw d(y)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}kt.getSchemaRefs=tH,Object.defineProperty(kr,"__esModule",{value:!0}),kr.getData=kr.KeywordCxt=kr.validateFunctionCode=void 0;const w$=$a,S$=Tt,xh=bn,yc=Tt,rH=mc,Bo=an,Dh=Hn,$e=De,Ae=nn,nH=kt,_n=ye,Uo=Lo;function iH(e){if(A$(e)&&(T$(e),O$(e))){sH(e);return}C$(e,()=>(0,w$.topBoolOrEmptySchema)(e))}kr.validateFunctionCode=iH;function C$({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},a){i.code.es5?e.func(t,(0,$e._)`${Ae.default.data}, ${Ae.default.valCxt}`,n.$async,()=>{e.code((0,$e._)`"use strict"; ${E$(r,i)}`),oH(e,i),e.code(a)}):e.func(t,(0,$e._)`${Ae.default.data}, ${aH(i)}`,n.$async,()=>e.code(E$(r,i)).code(a))}function aH(e){return(0,$e._)`{${Ae.default.instancePath}="", ${Ae.default.parentData}, ${Ae.default.parentDataProperty}, ${Ae.default.rootData}=${Ae.default.data}${e.dynamicRef?(0,$e._)`, ${Ae.default.dynamicAnchors}={}`:$e.nil}}={}`}function oH(e,t){e.if(Ae.default.valCxt,()=>{e.var(Ae.default.instancePath,(0,$e._)`${Ae.default.valCxt}.${Ae.default.instancePath}`),e.var(Ae.default.parentData,(0,$e._)`${Ae.default.valCxt}.${Ae.default.parentData}`),e.var(Ae.default.parentDataProperty,(0,$e._)`${Ae.default.valCxt}.${Ae.default.parentDataProperty}`),e.var(Ae.default.rootData,(0,$e._)`${Ae.default.valCxt}.${Ae.default.rootData}`),t.dynamicRef&&e.var(Ae.default.dynamicAnchors,(0,$e._)`${Ae.default.valCxt}.${Ae.default.dynamicAnchors}`)},()=>{e.var(Ae.default.instancePath,(0,$e._)`""`),e.var(Ae.default.parentData,(0,$e._)`undefined`),e.var(Ae.default.parentDataProperty,(0,$e._)`undefined`),e.var(Ae.default.rootData,Ae.default.data),t.dynamicRef&&e.var(Ae.default.dynamicAnchors,(0,$e._)`{}`)})}function sH(e){const{schema:t,opts:r,gen:n}=e;C$(e,()=>{r.$comment&&t.$comment&&I$(e),dH(e),n.let(Ae.default.vErrors,null),n.let(Ae.default.errors,0),r.unevaluated&&lH(e),P$(e),mH(e)})}function lH(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,$e._)`${r}.evaluated`),t.if((0,$e._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,$e._)`${e.evaluated}.props`,(0,$e._)`undefined`)),t.if((0,$e._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,$e._)`${e.evaluated}.items`,(0,$e._)`undefined`))}function E$(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,$e._)`/*# sourceURL=${r} */`:$e.nil}function cH(e,t){if(A$(e)&&(T$(e),O$(e))){uH(e,t);return}(0,w$.boolOrEmptySchema)(e,t)}function O$({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function A$(e){return typeof e.schema!="boolean"}function uH(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&I$(e),hH(e),pH(e);const a=n.const("_errs",Ae.default.errors);P$(e,a),n.var(t,(0,$e._)`${a} === ${Ae.default.errors}`)}function T$(e){(0,_n.checkUnknownRules)(e),fH(e)}function P$(e,t){if(e.opts.jtd)return x$(e,[],!1,t);const r=(0,S$.getSchemaTypes)(e.schema),n=(0,S$.coerceAndCheckDataType)(e,r);x$(e,r,!n,t)}function fH(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,_n.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function dH(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,_n.checkStrictMode)(e,"default is ignored in the schema root")}function hH(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,nH.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function pH(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function I$({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const a=r.$comment;if(i.$comment===!0)e.code((0,$e._)`${Ae.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){const s=(0,$e.str)`${n}/$comment`,l=e.scopeValue("root",{ref:t.root});e.code((0,$e._)`${Ae.default.self}.opts.$comment(${a}, ${s}, ${l}.schema)`)}}function mH(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=e;r.$async?t.if((0,$e._)`${Ae.default.errors} === 0`,()=>t.return(Ae.default.data),()=>t.throw((0,$e._)`new ${i}(${Ae.default.vErrors})`)):(t.assign((0,$e._)`${n}.errors`,Ae.default.vErrors),a.unevaluated&&gH(e),t.return((0,$e._)`${Ae.default.errors} === 0`))}function gH({gen:e,evaluated:t,props:r,items:n}){r instanceof $e.Name&&e.assign((0,$e._)`${t}.props`,r),n instanceof $e.Name&&e.assign((0,$e._)`${t}.items`,n)}function x$(e,t,r,n){const{gen:i,schema:a,data:s,allErrors:l,opts:u,self:f}=e,{RULES:d}=f;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,_n.schemaHasRulesButRef)(a,d))){i.block(()=>M$(e,"$ref",d.all.$ref.definition));return}u.jtd||yH(e,t),i.block(()=>{for(const m of d.rules)p(m);p(d.post)});function p(m){(0,xh.shouldUseGroup)(a,m)&&(m.type?(i.if((0,yc.checkDataType)(m.type,s,u.strictNumbers)),D$(e,m),t.length===1&&t[0]===m.type&&r&&(i.else(),(0,yc.reportTypeError)(e)),i.endIf()):D$(e,m),l||i.if((0,$e._)`${Ae.default.errors} === ${n||0}`))}}function D$(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,rH.assignDefaults)(e,t.type),r.block(()=>{for(const a of t.rules)(0,xh.shouldUseRule)(n,a)&&M$(e,a.keyword,a.definition,t.type)})}function yH(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(vH(e,t),e.opts.allowUnionTypes||bH(e,t),_H(e,e.dataTypes))}function vH(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{F$(e.dataTypes,r)||Fh(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),wH(e,t)}}function bH(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Fh(e,"use allowUnionTypes to allow union type keyword")}function _H(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,xh.shouldUseRule)(e.schema,i)){const{type:a}=i.definition;a.length&&!a.some(s=>$H(t,s))&&Fh(e,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function $H(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function F$(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function wH(e,t){const r=[];for(const n of e.dataTypes)F$(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Fh(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,_n.checkStrictMode)(e,t,e.opts.strictTypes)}class N${constructor(t,r,n){if((0,Bo.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,_n.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",k$(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Bo.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ae.default.errors))}result(t,r,n){this.failResult((0,$e.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,$e.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,$e._)`${r} !== undefined && (${(0,$e.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Uo.reportExtraError:Uo.reportError)(this,this.def.error,r)}$dataError(){(0,Uo.reportError)(this,this.def.$dataError||Uo.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Uo.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=$e.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=$e.nil,r=$e.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:a,def:s}=this;n.if((0,$e.or)((0,$e._)`${i} === undefined`,r)),t!==$e.nil&&n.assign(t,!0),(a.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==$e.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,$e.or)(s(),l());function s(){if(n.length){if(!(r instanceof $e.Name))throw new Error("ajv implementation error");const u=Array.isArray(n)?n:[n];return(0,$e._)`${(0,yc.checkDataTypes)(u,r,a.opts.strictNumbers,yc.DataType.Wrong)}`}return $e.nil}function l(){if(i.validateSchema){const u=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,$e._)`!${u}(${r})`}return $e.nil}}subschema(t,r){const n=(0,Dh.getSubschema)(this.it,t);(0,Dh.extendSubschemaData)(n,this.it,t),(0,Dh.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};return cH(i,r),i}mergeEvaluated(t,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=_n.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=_n.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,$e.Name)),!0}}kr.KeywordCxt=N$;function M$(e,t,r,n){const i=new N$(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Bo.funcKeywordCode)(i,r):"macro"in r?(0,Bo.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Bo.funcKeywordCode)(i,r)}const SH=/^\/(?:[^~]|~0|~1)*$/,CH=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k$(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,a;if(e==="")return Ae.default.rootData;if(e[0]==="/"){if(!SH.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=Ae.default.rootData}else{const f=CH.exec(e);if(!f)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+f[1];if(i=f[2],i==="#"){if(d>=t)throw new Error(u("property/index",d));return n[t-d]}if(d>t)throw new Error(u("data",d));if(a=r[t-d],!i)return a}let s=a;const l=i.split("/");for(const f of l)f&&(a=(0,$e._)`${a}${(0,$e.getProperty)((0,_n.unescapeJsonPointer)(f))}`,s=(0,$e._)`${s} && ${a}`);return s;function u(f,d){return`Cannot access ${f} ${d} levels up, current level is ${t}`}}kr.getData=k$;var Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});class EH extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Wo.default=EH;var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});const Nh=kt;class OH extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Nh.resolveUrl)(t,r,n),this.missingSchema=(0,Nh.normalizeId)((0,Nh.getFullPath)(t,this.missingRef))}}Ea.default=OH;var er={};Object.defineProperty(er,"__esModule",{value:!0}),er.resolveSchema=er.getCompilingSchema=er.resolveRef=er.compileSchema=er.SchemaEnv=void 0;const Lr=De,AH=Wo,Ei=nn,jr=kt,L$=ye,TH=kr;class vc{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,jr.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}er.SchemaEnv=vc;function Mh(e){const t=j$.call(this,e);if(t)return t;const r=(0,jr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,s=new Lr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let l;e.$async&&(l=s.scopeValue("Error",{ref:AH.default,code:(0,Lr._)`require("ajv/dist/runtime/validation_error").default`}));const u=s.scopeName("validate");e.validateName=u;const f={gen:s,allErrors:this.opts.allErrors,data:Ei.default.data,parentData:Ei.default.parentData,parentDataProperty:Ei.default.parentDataProperty,dataNames:[Ei.default.data],dataPathArr:[Lr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Lr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:l,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Lr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Lr._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,TH.validateFunctionCode)(f),s.optimize(this.opts.code.optimize);const p=s.toString();d=`${s.scopeRefs(Ei.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const y=new Function(`${Ei.default.self}`,`${Ei.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:y}),y.errors=null,y.schema=e.schema,y.schemaEnv=e,e.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:u,validateCode:p,scopeValues:s._values}),this.opts.unevaluated){const{props:_,items:w}=f;y.evaluated={props:_ instanceof Lr.Name?void 0:_,items:w instanceof Lr.Name?void 0:w,dynamicProps:_ instanceof Lr.Name,dynamicItems:w instanceof Lr.Name},y.source&&(y.source.evaluated=(0,Lr.stringify)(y.evaluated))}return e.validate=y,e}catch(p){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(e)}}er.compileSchema=Mh;function PH(e,t,r){var n;r=(0,jr.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let a=DH.call(this,e,r);if(a===void 0){const s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:l}=this.opts;s&&(a=new vc({schema:s,schemaId:l,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=IH.call(this,a)}er.resolveRef=PH;function IH(e){return(0,jr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Mh.call(this,e)}function j$(e){for(const t of this._compilations)if(xH(t,e))return t}er.getCompilingSchema=j$;function xH(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function DH(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||bc.call(this,e,t)}function bc(e,t){const r=this.opts.uriResolver.parse(t),n=(0,jr._getFullPath)(this.opts.uriResolver,r);let i=(0,jr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return kh.call(this,r,e);const a=(0,jr.normalizeId)(n),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){const l=bc.call(this,e,s);return typeof(l==null?void 0:l.schema)!="object"?void 0:kh.call(this,r,l)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Mh.call(this,s),a===(0,jr.normalizeId)(t)){const{schema:l}=s,{schemaId:u}=this.opts,f=l[u];return f&&(i=(0,jr.resolveUrl)(this.opts.uriResolver,i,f)),new vc({schema:l,schemaId:u,root:e,baseId:i})}return kh.call(this,r,s)}}er.resolveSchema=bc;const FH=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function kh(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const l of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,L$.unescapeFragment)(l)];if(u===void 0)return;r=u;const f=typeof r=="object"&&r[this.opts.schemaId];!FH.has(l)&&f&&(t=(0,jr.resolveUrl)(this.opts.uriResolver,t,f))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,L$.schemaHasRulesButRef)(r,this.RULES)){const l=(0,jr.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=bc.call(this,n,l)}const{schemaId:s}=this.opts;if(a=a||new vc({schema:r,schemaId:s,root:n,baseId:t}),a.schema!==a.root.schema)return a}const NH={$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};var Lh={};Object.defineProperty(Lh,"__esModule",{value:!0});const B$=J0;B$.code='require("ajv/dist/runtime/uri").default',Lh.default=B$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=kr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=De;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Wo,i=Ea,a=Si,s=er,l=De,u=kt,f=Tt,d=ye,p=NH,m=Lh,y=(L,D)=>new RegExp(L,D);y.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={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."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function S(L){var D,z,B,P,F,V,X,oe,ue,he,be,Le,ut,me,Pt,Vt,It,sr,os,Cn,Yt,En,Xn,ss,On;const Fi=L.strict,An=(D=L.code)===null||D===void 0?void 0:D.optimize,Tn=An===!0||An===void 0?1:An||0,Fa=(B=(z=L.code)===null||z===void 0?void 0:z.regExp)!==null&&B!==void 0?B:y,ls=(P=L.uriResolver)!==null&&P!==void 0?P:m.default;return{strictSchema:(V=(F=L.strictSchema)!==null&&F!==void 0?F:Fi)!==null&&V!==void 0?V:!0,strictNumbers:(oe=(X=L.strictNumbers)!==null&&X!==void 0?X:Fi)!==null&&oe!==void 0?oe:!0,strictTypes:(he=(ue=L.strictTypes)!==null&&ue!==void 0?ue:Fi)!==null&&he!==void 0?he:"log",strictTuples:(Le=(be=L.strictTuples)!==null&&be!==void 0?be:Fi)!==null&&Le!==void 0?Le:"log",strictRequired:(me=(ut=L.strictRequired)!==null&&ut!==void 0?ut:Fi)!==null&&me!==void 0?me:!1,code:L.code?{...L.code,optimize:Tn,regExp:Fa}:{optimize:Tn,regExp:Fa},loopRequired:(Pt=L.loopRequired)!==null&&Pt!==void 0?Pt:C,loopEnum:(Vt=L.loopEnum)!==null&&Vt!==void 0?Vt:C,meta:(It=L.meta)!==null&&It!==void 0?It:!0,messages:(sr=L.messages)!==null&&sr!==void 0?sr:!0,inlineRefs:(os=L.inlineRefs)!==null&&os!==void 0?os:!0,schemaId:(Cn=L.schemaId)!==null&&Cn!==void 0?Cn:"$id",addUsedSchema:(Yt=L.addUsedSchema)!==null&&Yt!==void 0?Yt:!0,validateSchema:(En=L.validateSchema)!==null&&En!==void 0?En:!0,validateFormats:(Xn=L.validateFormats)!==null&&Xn!==void 0?Xn:!0,unicodeRegExp:(ss=L.unicodeRegExp)!==null&&ss!==void 0?ss:!0,int32range:(On=L.int32range)!==null&&On!==void 0?On:!0,uriResolver:ls}}class E{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...S(D)};const{es5:z,lines:B}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:w,es5:z,lines:B}),this.logger=te(D.logger);const P=D.validateFormats;D.validateFormats=!1,this.RULES=(0,a.getRules)(),A.call(this,v,D,"NOT SUPPORTED"),A.call(this,g,D,"DEPRECATED","warn"),this._metaOpts=H.call(this),D.formats&&Z.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&G.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),N.call(this),D.validateFormats=P}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:z,schemaId:B}=this.opts;let P=p;B==="id"&&(P={...p},P.id=P.$id,delete P.$id),z&&D&&this.addMetaSchema(P,P[B],!1)}defaultMeta(){const{meta:D,schemaId:z}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[z]||D:void 0}validate(D,z){let B;if(typeof D=="string"){if(B=this.getSchema(D),!B)throw new Error(`no schema with key or ref "${D}"`)}else B=this.compile(D);const P=B(z);return"$async"in B||(this.errors=B.errors),P}compile(D,z){const B=this._addSchema(D,z);return B.validate||this._compileSchemaEnv(B)}compileAsync(D,z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return P.call(this,D,z);async function P(he,be){await F.call(this,he.$schema);const Le=this._addSchema(he,be);return Le.validate||V.call(this,Le)}async function F(he){he&&!this.getSchema(he)&&await P.call(this,{$ref:he},!0)}async function V(he){try{return this._compileSchemaEnv(he)}catch(be){if(!(be instanceof i.default))throw be;return X.call(this,be),await oe.call(this,be.missingSchema),V.call(this,he)}}function X({missingSchema:he,missingRef:be}){if(this.refs[he])throw new Error(`AnySchema ${he} is loaded but ${be} cannot be resolved`)}async function oe(he){const be=await ue.call(this,he);this.refs[he]||await F.call(this,be.$schema),this.refs[he]||this.addSchema(be,he,z)}async function ue(he){const be=this._loading[he];if(be)return be;try{return await(this._loading[he]=B(he))}finally{delete this._loading[he]}}}addSchema(D,z,B,P=this.opts.validateSchema){if(Array.isArray(D)){for(const V of D)this.addSchema(V,void 0,B,P);return this}let F;if(typeof D=="object"){const{schemaId:V}=this.opts;if(F=D[V],F!==void 0&&typeof F!="string")throw new Error(`schema ${V} must be string`)}return z=(0,u.normalizeId)(z||F),this._checkUnique(z),this.schemas[z]=this._addSchema(D,B,z,P,!0),this}addMetaSchema(D,z,B=this.opts.validateSchema){return this.addSchema(D,z,!0,B),this}validateSchema(D,z){if(typeof D=="boolean")return!0;let B;if(B=D.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const P=this.validate(B,D);if(!P&&z){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return P}getSchema(D){let z;for(;typeof(z=x.call(this,D))=="string";)D=z;if(z===void 0){const{schemaId:B}=this.opts,P=new s.SchemaEnv({schema:{},schemaId:B});if(z=s.resolveSchema.call(this,P,D),!z)return;this.refs[D]=z}return z.validate||this._compileSchemaEnv(z)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const z=x.call(this,D);return typeof z=="object"&&this._cache.delete(z.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const z=D;this._cache.delete(z);let B=D[this.opts.schemaId];return B&&(B=(0,u.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const z of D)this.addKeyword(z);return this}addKeyword(D,z){let B;if(typeof D=="string")B=D,typeof z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),z.keyword=B);else if(typeof D=="object"&&z===void 0){if(z=D,B=z.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Q.call(this,B,z),!z)return(0,d.eachItem)(B,F=>k.call(this,F)),this;R.call(this,z);const P={...z,type:(0,f.getJSONTypes)(z.type),schemaType:(0,f.getJSONTypes)(z.schemaType)};return(0,d.eachItem)(B,P.type.length===0?F=>k.call(this,F,P):F=>P.type.forEach(V=>k.call(this,F,P,V))),this}getKeyword(D){const z=this.RULES.all[D];return typeof z=="object"?z.definition:!!z}removeKeyword(D){const{RULES:z}=this;delete z.keywords[D],delete z.all[D];for(const B of z.rules){const P=B.rules.findIndex(F=>F.keyword===D);P>=0&&B.rules.splice(P,1)}return this}addFormat(D,z){return typeof z=="string"&&(z=new RegExp(z)),this.formats[D]=z,this}errorsText(D=this.errors,{separator:z=", ",dataVar:B="data"}={}){return!D||D.length===0?"No errors":D.map(P=>`${B}${P.instancePath} ${P.message}`).reduce((P,F)=>P+z+F)}$dataMetaSchema(D,z){const B=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const P of z){const F=P.split("/").slice(1);let V=D;for(const X of F)V=V[X];for(const X in B){const oe=B[X];if(typeof oe!="object")continue;const{$data:ue}=oe.definition,he=V[X];ue&&he&&(V[X]=J(he))}}return D}_removeAllSchemas(D,z){for(const B in D){const P=D[B];(!z||z.test(B))&&(typeof P=="string"?delete D[B]:P&&!P.meta&&(this._cache.delete(P.schema),delete D[B]))}}_addSchema(D,z,B,P=this.opts.validateSchema,F=this.opts.addUsedSchema){let V;const{schemaId:X}=this.opts;if(typeof D=="object")V=D[X];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let oe=this._cache.get(D);if(oe!==void 0)return oe;B=(0,u.normalizeId)(V||B);const ue=u.getSchemaRefs.call(this,D,B);return oe=new s.SchemaEnv({schema:D,schemaId:X,meta:z,baseId:B,localRefs:ue}),this._cache.set(oe.schema,oe),F&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=oe),P&&this.validateSchema(D,!0),oe}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):s.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const z=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,D)}finally{this.opts=z}}}E.ValidationError=n.default,E.MissingRefError=i.default,e.default=E;function A(L,D,z,B="error"){for(const P in L){const F=P;F in D&&this.logger[B](`${z}: option ${P}. ${L[F]}`)}}function x(L){return L=(0,u.normalizeId)(L),this.schemas[L]||this.refs[L]}function N(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const D in L)this.addSchema(L[D],D)}function Z(){for(const L in this.opts.formats){const D=this.opts.formats[L];D&&this.addFormat(L,D)}}function G(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in L){const z=L[D];z.keyword||(z.keyword=D),this.addKeyword(z)}}function H(){const L={...this.opts};for(const D of _)delete L[D];return L}const ee={log(){},warn(){},error(){}};function te(L){if(L===!1)return ee;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const ae=/^[a-z_$][a-z0-9_$:-]*$/i;function Q(L,D){const{RULES:z}=this;if((0,d.eachItem)(L,B=>{if(z.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!ae.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function k(L,D,z){var B;const P=D==null?void 0:D.post;if(z&&P)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let V=P?F.post:F.rules.find(({type:oe})=>oe===z);if(V||(V={type:z,rules:[]},F.rules.push(V)),F.keywords[L]=!0,!D)return;const X={keyword:L,definition:{...D,type:(0,f.getJSONTypes)(D.type),schemaType:(0,f.getJSONTypes)(D.schemaType)}};D.before?W.call(this,V,X,D.before):V.rules.push(X),F.all[L]=X,(B=D.implements)===null||B===void 0||B.forEach(oe=>this.addKeyword(oe))}function W(L,D,z){const B=L.rules.findIndex(P=>P.keyword===z);B>=0?L.rules.splice(B,0,D):(L.rules.push(D),this.logger.warn(`rule ${z} is not defined`))}function R(L){let{metaSchema:D}=L;D!==void 0&&(L.$data&&this.opts.$data&&(D=J(D)),L.validateSchema=this.compile(D,!0))}const U={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function J(L){return{anyOf:[L,U]}}}(X1);var jh={},Bh={},Uh={};Object.defineProperty(Uh,"__esModule",{value:!0});const MH={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Uh.default=MH;var Oi={};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.callRef=Oi.getValidate=void 0;const kH=Ea,U$=Me,tr=De,Oa=nn,W$=er,_c=ye,LH={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:a,validateName:s,opts:l,self:u}=n,{root:f}=a;if((r==="#"||r==="#/")&&i===f.baseId)return p();const d=W$.resolveRef.call(u,f,i,r);if(d===void 0)throw new kH.default(n.opts.uriResolver,i,r);if(d instanceof W$.SchemaEnv)return m(d);return y(d);function p(){if(a===f)return $c(e,s,a,a.$async);const _=t.scopeValue("root",{ref:f});return $c(e,(0,tr._)`${_}.validate`,f,f.$async)}function m(_){const w=q$(e,_);$c(e,w,_,_.$async)}function y(_){const w=t.scopeValue("schema",l.code.source===!0?{ref:_,code:(0,tr.stringify)(_)}:{ref:_}),v=t.name("valid"),g=e.subschema({schema:_,dataTypes:[],schemaPath:tr.nil,topSchemaRef:w,errSchemaPath:r},v);e.mergeEvaluated(g),e.ok(v)}}};function q$(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,tr._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Oi.getValidate=q$;function $c(e,t,r,n){const{gen:i,it:a}=e,{allErrors:s,schemaEnv:l,opts:u}=a,f=u.passContext?Oa.default.this:tr.nil;n?d():p();function d(){if(!l.$async)throw new Error("async schema referenced by sync schema");const _=i.let("valid");i.try(()=>{i.code((0,tr._)`await ${(0,U$.callValidateCode)(e,t,f)}`),y(t),s||i.assign(_,!0)},w=>{i.if((0,tr._)`!(${w} instanceof ${a.ValidationError})`,()=>i.throw(w)),m(w),s||i.assign(_,!1)}),e.ok(_)}function p(){e.result((0,U$.callValidateCode)(e,t,f),()=>y(t),()=>m(t))}function m(_){const w=(0,tr._)`${_}.errors`;i.assign(Oa.default.vErrors,(0,tr._)`${Oa.default.vErrors} === null ? ${w} : ${Oa.default.vErrors}.concat(${w})`),i.assign(Oa.default.errors,(0,tr._)`${Oa.default.vErrors}.length`)}function y(_){var w;if(!a.opts.unevaluated)return;const v=(w=r==null?void 0:r.validate)===null||w===void 0?void 0:w.evaluated;if(a.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(a.props=_c.mergeEvaluated.props(i,v.props,a.props));else{const g=i.var("props",(0,tr._)`${_}.evaluated.props`);a.props=_c.mergeEvaluated.props(i,g,a.props,tr.Name)}if(a.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(a.items=_c.mergeEvaluated.items(i,v.items,a.items));else{const g=i.var("items",(0,tr._)`${_}.evaluated.items`);a.items=_c.mergeEvaluated.items(i,g,a.items,tr.Name)}}}Oi.callRef=$c,Oi.default=LH,Object.defineProperty(Bh,"__esModule",{value:!0});const jH=Uh,BH=Oi,UH=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",jH.default,BH.default];Bh.default=UH;var Wh={},qh={};Object.defineProperty(qh,"__esModule",{value:!0});const wc=De,Gn=wc.operators,Sc={maximum:{okStr:"<=",ok:Gn.LTE,fail:Gn.GT},minimum:{okStr:">=",ok:Gn.GTE,fail:Gn.LT},exclusiveMaximum:{okStr:"<",ok:Gn.LT,fail:Gn.GTE},exclusiveMinimum:{okStr:">",ok:Gn.GT,fail:Gn.LTE}},WH={message:({keyword:e,schemaCode:t})=>(0,wc.str)`must be ${Sc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wc._)`{comparison: ${Sc[e].okStr}, limit: ${t}}`},qH={keyword:Object.keys(Sc),type:"number",schemaType:"number",$data:!0,error:WH,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,wc._)`${r} ${Sc[t].fail} ${n} || isNaN(${r})`)}};qh.default=qH;var Vh={};Object.defineProperty(Vh,"__esModule",{value:!0});const qo=De,VH={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,qo.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,qo._)`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?(0,qo._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,qo._)`${s} !== parseInt(${s})`;e.fail$data((0,qo._)`(${n} === 0 || (${s} = ${r}/${n}, ${l}))`)}};Vh.default=VH;var Rh={},zh={};Object.defineProperty(zh,"__esModule",{value:!0});function V$(e){const t=e.length;let r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}zh.default=V$,V$.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Rh,"__esModule",{value:!0});const Ai=De,RH=ye,zH=zh,HH={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,Ai.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ai._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,a=t==="maxLength"?Ai.operators.GT:Ai.operators.LT,s=i.opts.unicode===!1?(0,Ai._)`${r}.length`:(0,Ai._)`${(0,RH.useFunc)(e.gen,zH.default)}(${r})`;e.fail$data((0,Ai._)`${s} ${a} ${n}`)}};Rh.default=HH;var Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});const KH=Me,Cc=De,GH={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,Cc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Cc._)`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"",l=r?(0,Cc._)`(new RegExp(${i}, ${s}))`:(0,KH.usePattern)(e,n);e.fail$data((0,Cc._)`!${l}.test(${t})`)}};Hh.default=GH;var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0});const Vo=De,YH={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Vo.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Vo._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Vo.operators.GT:Vo.operators.LT;e.fail$data((0,Vo._)`Object.keys(${r}).length ${i} ${n}`)}};Kh.default=YH;var Gh={};Object.defineProperty(Gh,"__esModule",{value:!0});const Ro=Me,zo=De,JH=ye,XH={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,zo.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,zo._)`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:a,it:s}=e,{opts:l}=s;if(!a&&r.length===0)return;const u=r.length>=l.loopRequired;if(s.allErrors?f():d(),l.strictRequired){const y=e.parentSchema.properties,{definedProperties:_}=e.it;for(const w of r)if((y==null?void 0:y[w])===void 0&&!_.has(w)){const v=s.schemaEnv.baseId+s.errSchemaPath,g=`required property "${w}" is not defined at "${v}" (strictRequired)`;(0,JH.checkStrictMode)(s,g,s.opts.strictRequired)}}function f(){if(u||a)e.block$data(zo.nil,p);else for(const y of r)(0,Ro.checkReportMissingProp)(e,y)}function d(){const y=t.let("missing");if(u||a){const _=t.let("valid",!0);e.block$data(_,()=>m(y,_)),e.ok(_)}else t.if((0,Ro.checkMissingProp)(e,r,y)),(0,Ro.reportMissingProp)(e,y),t.else()}function p(){t.forOf("prop",n,y=>{e.setParams({missingProperty:y}),t.if((0,Ro.noPropertyInData)(t,i,y,l.ownProperties),()=>e.error())})}function m(y,_){e.setParams({missingProperty:y}),t.forOf(y,n,()=>{t.assign(_,(0,Ro.propertyInData)(t,i,y,l.ownProperties)),t.if((0,zo.not)(_),()=>{e.error(),t.break()})},zo.nil)}}};Gh.default=XH;var Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});const Ho=De,ZH={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Ho.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Ho._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Ho.operators.GT:Ho.operators.LT;e.fail$data((0,Ho._)`${r}.length ${i} ${n}`)}};Yh.default=ZH;var Jh={},Ko={};Object.defineProperty(Ko,"__esModule",{value:!0});const R$=y$;R$.code='require("ajv/dist/runtime/equal").default',Ko.default=R$,Object.defineProperty(Jh,"__esModule",{value:!0});const Xh=Tt,Lt=De,QH=ye,eK=Ko,tK={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,Lt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Lt._)`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:a,schemaCode:s,it:l}=e;if(!n&&!i)return;const u=t.let("valid"),f=a.items?(0,Xh.getSchemaTypes)(a.items):[];e.block$data(u,d,(0,Lt._)`${s} === false`),e.ok(u);function d(){const _=t.let("i",(0,Lt._)`${r}.length`),w=t.let("j");e.setParams({i:_,j:w}),t.assign(u,!0),t.if((0,Lt._)`${_} > 1`,()=>(p()?m:y)(_,w))}function p(){return f.length>0&&!f.some(_=>_==="object"||_==="array")}function m(_,w){const v=t.name("item"),g=(0,Xh.checkDataTypes)(f,v,l.opts.strictNumbers,Xh.DataType.Wrong),C=t.const("indices",(0,Lt._)`{}`);t.for((0,Lt._)`;${_}--;`,()=>{t.let(v,(0,Lt._)`${r}[${_}]`),t.if(g,(0,Lt._)`continue`),f.length>1&&t.if((0,Lt._)`typeof ${v} == "string"`,(0,Lt._)`${v} += "_"`),t.if((0,Lt._)`typeof ${C}[${v}] == "number"`,()=>{t.assign(w,(0,Lt._)`${C}[${v}]`),e.error(),t.assign(u,!1).break()}).code((0,Lt._)`${C}[${v}] = ${_}`)})}function y(_,w){const v=(0,QH.useFunc)(t,eK.default),g=t.name("outer");t.label(g).for((0,Lt._)`;${_}--;`,()=>t.for((0,Lt._)`${w} = ${_}; ${w}--;`,()=>t.if((0,Lt._)`${v}(${r}[${_}], ${r}[${w}])`,()=>{e.error(),t.assign(u,!1).break(g)})))}}};Jh.default=tK;var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0});const Qh=De,rK=ye,nK=Ko,iK={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,Qh._)`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:a}=e;n||a&&typeof a=="object"?e.fail$data((0,Qh._)`!${(0,rK.useFunc)(t,nK.default)}(${r}, ${i})`):e.fail((0,Qh._)`${a} !== ${r}`)}};Zh.default=iK;var ep={};Object.defineProperty(ep,"__esModule",{value:!0});const Go=De,aK=ye,oK=Ko,sK={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Go._)`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const l=i.length>=s.opts.loopEnum;let u;const f=()=>u??(u=(0,aK.useFunc)(t,oK.default));let d;if(l||n)d=t.let("valid"),e.block$data(d,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const y=t.const("vSchema",a);d=(0,Go.or)(...i.map((_,w)=>m(y,w)))}e.pass(d);function p(){t.assign(d,!1),t.forOf("v",a,y=>t.if((0,Go._)`${f()}(${r}, ${y})`,()=>t.assign(d,!0).break()))}function m(y,_){const w=i[_];return typeof w=="object"&&w!==null?(0,Go._)`${f()}(${r}, ${y}[${_}])`:(0,Go._)`${r} === ${w}`}}};ep.default=sK,Object.defineProperty(Wh,"__esModule",{value:!0});const lK=qh,cK=Vh,uK=Rh,fK=Hh,dK=Kh,hK=Gh,pK=Yh,mK=Jh,gK=Zh,yK=ep,vK=[lK.default,cK.default,uK.default,fK.default,dK.default,hK.default,pK.default,mK.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},gK.default,yK.default];Wh.default=vK;var tp={},Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.validateAdditionalItems=void 0;const Ti=De,rp=ye,bK={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,Ti.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ti._)`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,rp.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}z$(e,n)}};function z$(e,t){const{gen:r,schema:n,data:i,keyword:a,it:s}=e;s.items=!0;const l=r.const("len",(0,Ti._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Ti._)`${l} <= ${t.length}`);else if(typeof n=="object"&&!(0,rp.alwaysValidSchema)(s,n)){const f=r.var("valid",(0,Ti._)`${l} <= ${t.length}`);r.if((0,Ti.not)(f),()=>u(f)),e.ok(f)}function u(f){r.forRange("i",t.length,l,d=>{e.subschema({keyword:a,dataProp:d,dataPropType:rp.Type.Num},f),s.allErrors||r.if((0,Ti.not)(f),()=>r.break())})}}Aa.validateAdditionalItems=z$,Aa.default=bK;var np={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.validateTuple=void 0;const H$=De,Ec=ye,_K=Me,$K={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return K$(e,"additionalItems",t);r.items=!0,!(0,Ec.alwaysValidSchema)(r,t)&&e.ok((0,_K.validateArray)(e))}};function K$(e,t,r=e.schema){const{gen:n,parentSchema:i,data:a,keyword:s,it:l}=e;d(i),l.opts.unevaluated&&r.length&&l.items!==!0&&(l.items=Ec.mergeEvaluated.items(n,r.length,l.items));const u=n.name("valid"),f=n.const("len",(0,H$._)`${a}.length`);r.forEach((p,m)=>{(0,Ec.alwaysValidSchema)(l,p)||(n.if((0,H$._)`${f} > ${m}`,()=>e.subschema({keyword:s,schemaProp:m,dataProp:m},u)),e.ok(u))});function d(p){const{opts:m,errSchemaPath:y}=l,_=r.length,w=_===p.minItems&&(_===p.maxItems||p[t]===!1);if(m.strictTuples&&!w){const v=`"${s}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${y}"`;(0,Ec.checkStrictMode)(l,v,m.strictTuples)}}}Ta.validateTuple=K$,Ta.default=$K,Object.defineProperty(np,"__esModule",{value:!0});const wK=Ta,SK={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,wK.validateTuple)(e,"items")};np.default=SK;var ip={};Object.defineProperty(ip,"__esModule",{value:!0});const G$=De,CK=ye,EK=Me,OK=Aa,AK={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,G$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,G$._)`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,CK.alwaysValidSchema)(n,t)&&(i?(0,OK.validateAdditionalItems)(e,i):e.ok((0,EK.validateArray)(e)))}};ip.default=AK;var ap={};Object.defineProperty(ap,"__esModule",{value:!0});const wr=De,Oc=ye,TK={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>t===void 0?(0,wr.str)`must contain at least ${e} valid item(s)`:(0,wr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,wr._)`{minContains: ${e}}`:(0,wr._)`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;let s,l;const{minContains:u,maxContains:f}=n;a.opts.next?(s=u===void 0?1:u,l=f):s=1;const d=t.const("len",(0,wr._)`${i}.length`);if(e.setParams({min:s,max:l}),l===void 0&&s===0){(0,Oc.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&s>l){(0,Oc.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Oc.alwaysValidSchema)(a,r)){let w=(0,wr._)`${d} >= ${s}`;l!==void 0&&(w=(0,wr._)`${w} && ${d} <= ${l}`),e.pass(w);return}a.items=!0;const p=t.name("valid");l===void 0&&s===1?y(p,()=>t.if(p,()=>t.break())):s===0?(t.let(p,!0),l!==void 0&&t.if((0,wr._)`${i}.length > 0`,m)):(t.let(p,!1),m()),e.result(p,()=>e.reset());function m(){const w=t.name("_valid"),v=t.let("count",0);y(w,()=>t.if(w,()=>_(v)))}function y(w,v){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:Oc.Type.Num,compositeRule:!0},w),v()})}function _(w){t.code((0,wr._)`${w}++`),l===void 0?t.if((0,wr._)`${w} >= ${s}`,()=>t.assign(p,!0).break()):(t.if((0,wr._)`${w} > ${l}`,()=>t.assign(p,!1).break()),s===1?t.assign(p,!0):t.if((0,wr._)`${w} >= ${s}`,()=>t.assign(p,!0)))}}};ap.default=TK;var Y$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=De,r=ye,n=Me;e.error={message:({params:{property:u,depsCount:f,deps:d}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:f,deps:d,missingProperty:p}})=>(0,t._)`{property: ${u},
112
+ || ${s} === "boolean" || ${i} === null`).assign(l,(0,Ie._)`[${i}]`)}}}function y7({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ie._)`${t} !== undefined`,()=>e.assign((0,Ie._)`${t}[${r}]`,n))}function Eh(e,t,r,n=wa.Correct){const i=n===wa.Correct?Ie.operators.EQ:Ie.operators.NEQ;let a;switch(e){case"null":return(0,Ie._)`${t} ${i} null`;case"array":a=(0,Ie._)`Array.isArray(${t})`;break;case"object":a=(0,Ie._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,Ie._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,Ie._)`typeof ${t} ${i} ${e}`}return n===wa.Correct?a:(0,Ie.not)(a);function s(l=Ie.nil){return(0,Ie.and)((0,Ie._)`typeof ${t} == "number"`,l,r?(0,Ie._)`isFinite(${t})`:Ie.nil)}}Pt.checkDataType=Eh;function Oh(e,t,r,n){if(e.length===1)return Eh(e[0],t,r,n);let i;const a=(0,l$.toHash)(e);if(a.array&&a.object){const s=(0,Ie._)`typeof ${t} != "object"`;i=a.null?s:(0,Ie._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else i=Ie.nil;a.number&&delete a.integer;for(const s in a)i=(0,Ie.and)(i,Eh(s,t,r,n));return i}Pt.checkDataTypes=Oh;const v7={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ie._)`{type: ${e}}`:(0,Ie._)`{type: ${t}}`};function Ah(e){const t=b7(e);(0,d7.reportError)(t,v7)}Pt.reportTypeError=Ah;function b7(e){const{gen:t,data:r,schema:n}=e,i=(0,l$.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}var mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.assignDefaults=void 0;const Sa=De,_7=ye;function $7(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const i in r)f$(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,a)=>f$(e,a,i.default))}mc.assignDefaults=$7;function f$(e,t,r){const{gen:n,compositeRule:i,data:a,opts:s}=e;if(r===void 0)return;const l=(0,Sa._)`${a}${(0,Sa.getProperty)(t)}`;if(i){(0,_7.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,Sa._)`${l} === undefined`;s.useDefaults==="empty"&&(u=(0,Sa._)`${u} || ${l} === null || ${l} === ""`),n.if(u,(0,Sa._)`${l} = ${(0,Sa.stringify)(r)}`)}var on={},Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.validateUnion=Me.validateArray=Me.usePattern=Me.callValidateCode=Me.schemaProperties=Me.allSchemaProperties=Me.noPropertyInData=Me.propertyInData=Me.isOwnProperty=Me.hasPropFunc=Me.reportMissingProp=Me.checkMissingProp=Me.checkReportMissingProp=void 0;const ct=De,Th=ye,zn=an,w7=ye;function S7(e,t){const{gen:r,data:n,it:i}=e;r.if(Ih(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ct._)`${t}`},!0),e.error()})}Me.checkReportMissingProp=S7;function C7({gen:e,data:t,it:{opts:r}},n,i){return(0,ct.or)(...n.map(a=>(0,ct.and)(Ih(e,t,a,r.ownProperties),(0,ct._)`${i} = ${a}`)))}Me.checkMissingProp=C7;function E7(e,t){e.setParams({missingProperty:t},!0),e.error()}Me.reportMissingProp=E7;function d$(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Me.hasPropFunc=d$;function Ph(e,t,r){return(0,ct._)`${d$(e)}.call(${t}, ${r})`}Me.isOwnProperty=Ph;function O7(e,t,r,n){const i=(0,ct._)`${t}${(0,ct.getProperty)(r)} !== undefined`;return n?(0,ct._)`${i} && ${Ph(e,t,r)}`:i}Me.propertyInData=O7;function Ih(e,t,r,n){const i=(0,ct._)`${t}${(0,ct.getProperty)(r)} === undefined`;return n?(0,ct.or)(i,(0,ct.not)(Ph(e,t,r))):i}Me.noPropertyInData=Ih;function h$(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Me.allSchemaProperties=h$;function A7(e,t){return h$(t).filter(r=>!(0,Th.alwaysValidSchema)(e,t[r]))}Me.schemaProperties=A7;function T7({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:s},l,u,f){const d=f?(0,ct._)`${e}, ${t}, ${n}${i}`:t,p=[[zn.default.instancePath,(0,ct.strConcat)(zn.default.instancePath,a)],[zn.default.parentData,s.parentData],[zn.default.parentDataProperty,s.parentDataProperty],[zn.default.rootData,zn.default.rootData]];s.opts.dynamicRef&&p.push([zn.default.dynamicAnchors,zn.default.dynamicAnchors]);const m=(0,ct._)`${d}, ${r.object(...p)}`;return u!==ct.nil?(0,ct._)`${l}.call(${u}, ${m})`:(0,ct._)`${l}(${m})`}Me.callValidateCode=T7;const P7=(0,ct._)`new RegExp`;function I7({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,ct._)`${i.code==="new RegExp"?P7:(0,w7.useFunc)(e,i)}(${r}, ${n})`})}Me.usePattern=I7;function x7(e){const{gen:t,data:r,keyword:n,it:i}=e,a=t.name("valid");if(i.allErrors){const l=t.let("valid",!0);return s(()=>t.assign(l,!1)),l}return t.var(a,!0),s(()=>t.break()),a;function s(l){const u=t.const("len",(0,ct._)`${r}.length`);t.forRange("i",0,u,f=>{e.subschema({keyword:n,dataProp:f,dataPropType:Th.Type.Num},a),t.if((0,ct.not)(a),l)})}}Me.validateArray=x7;function D7(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Th.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((u,f)=>{const d=e.subschema({keyword:n,schemaProp:f,compositeRule:!0},l);t.assign(s,(0,ct._)`${s} || ${l}`),e.mergeValidEvaluated(d,l)||t.if((0,ct.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Me.validateUnion=D7,Object.defineProperty(on,"__esModule",{value:!0}),on.validateKeywordUsage=on.validSchemaType=on.funcKeywordCode=on.macroKeywordCode=void 0;const Gt=De,Ci=an,F7=Me,N7=jo;function M7(e,t){const{gen:r,keyword:n,schema:i,parentSchema:a,it:s}=e,l=t.macro.call(s.self,i,a,s),u=m$(r,n,l);s.opts.validateSchema!==!1&&s.self.validateSchema(l,!0);const f=r.name("valid");e.subschema({schema:l,schemaPath:Gt.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},f),e.pass(f,()=>e.error(!0))}on.macroKeywordCode=M7;function k7(e,t){var r;const{gen:n,keyword:i,schema:a,parentSchema:s,$data:l,it:u}=e;j7(u,t);const f=!l&&t.compile?t.compile.call(u.self,a,s,u):t.validate,d=m$(n,i,f),p=n.let("valid");e.block$data(p,m),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function m(){if(t.errors===!1)w(),t.modifying&&p$(e),v(()=>e.error());else{const g=t.async?y():_();t.modifying&&p$(e),v(()=>L7(e,g))}}function y(){const g=n.let("ruleErrs",null);return n.try(()=>w((0,Gt._)`await `),C=>n.assign(p,!1).if((0,Gt._)`${C} instanceof ${u.ValidationError}`,()=>n.assign(g,(0,Gt._)`${C}.errors`),()=>n.throw(C))),g}function _(){const g=(0,Gt._)`${d}.errors`;return n.assign(g,null),w(Gt.nil),g}function w(g=t.async?(0,Gt._)`await `:Gt.nil){const C=u.opts.passContext?Ci.default.this:Ci.default.self,S=!("compile"in t&&!l||t.schema===!1);n.assign(p,(0,Gt._)`${g}${(0,F7.callValidateCode)(e,d,C,S)}`,t.modifying)}function v(g){var C;n.if((0,Gt.not)((C=t.valid)!==null&&C!==void 0?C:p),g)}}on.funcKeywordCode=k7;function p$(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Gt._)`${n.parentData}[${n.parentDataProperty}]`))}function L7(e,t){const{gen:r}=e;r.if((0,Gt._)`Array.isArray(${t})`,()=>{r.assign(Ci.default.vErrors,(0,Gt._)`${Ci.default.vErrors} === null ? ${t} : ${Ci.default.vErrors}.concat(${t})`).assign(Ci.default.errors,(0,Gt._)`${Ci.default.vErrors}.length`),(0,N7.extendErrors)(e)},()=>e.error())}function j7({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function m$(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Gt.stringify)(r)})}function B7(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}on.validSchemaType=B7;function U7({schema:e,opts:t,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const s=i.dependencies;if(s!=null&&s.some(l=>!Object.prototype.hasOwnProperty.call(e,l)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){const u=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}on.validateKeywordUsage=U7;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.extendSubschemaMode=Hn.extendSubschemaData=Hn.getSubschema=void 0;const sn=De,g$=ye;function W7(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const l=e.schema[t];return r===void 0?{schema:l,schemaPath:(0,sn._)`${e.schemaPath}${(0,sn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:l[r],schemaPath:(0,sn._)`${e.schemaPath}${(0,sn.getProperty)(t)}${(0,sn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,g$.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Hn.getSubschema=W7;function q7(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(r!==void 0){const{errorPath:f,dataPathArr:d,opts:p}=t,m=l.let("data",(0,sn._)`${t.data}${(0,sn.getProperty)(r)}`,!0);u(m),e.errorPath=(0,sn.str)`${f}${(0,g$.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,sn._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){const f=i instanceof sn.Name?i:l.let("data",i,!0);u(f),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function u(f){e.data=f,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,f]}}Hn.extendSubschemaData=q7;function V7(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}Hn.extendSubschemaMode=V7;var kt={},y$=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r},v$={exports:{}},Kn=v$.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};gc(t,n,i,e,"",e)};Kn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Kn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Kn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Kn.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};function gc(e,t,r,n,i,a,s,l,u,f){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,a,s,l,u,f);for(var d in n){var p=n[d];if(Array.isArray(p)){if(d in Kn.arrayKeywords)for(var m=0;m<p.length;m++)gc(e,t,r,p[m],i+"/"+d+"/"+m,a,i,d,n,m)}else if(d in Kn.propsKeywords){if(p&&typeof p=="object")for(var y in p)gc(e,t,r,p[y],i+"/"+d+"/"+R7(y),a,i,d,n,y)}else(d in Kn.keywords||e.allKeys&&!(d in Kn.skipKeywords))&&gc(e,t,r,p,i+"/"+d,a,i,d,n)}r(n,i,a,s,l,u,f)}}function R7(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var z7=v$.exports;Object.defineProperty(kt,"__esModule",{value:!0}),kt.getSchemaRefs=kt.resolveUrl=kt.normalizeId=kt._getFullPath=kt.getFullPath=kt.inlineRef=void 0;const H7=ye,K7=y$,G7=z7,Y7=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function J7(e,t=!0){return typeof e=="boolean"?!0:t===!0?!xh(e):t?b$(e)<=t:!1}kt.inlineRef=J7;const X7=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function xh(e){for(const t in e){if(X7.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(xh)||typeof r=="object"&&xh(r))return!0}return!1}function b$(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Y7.has(r)&&(typeof e[r]=="object"&&(0,H7.eachItem)(e[r],n=>t+=b$(n)),t===1/0))return 1/0}return t}function _$(e,t="",r){r!==!1&&(t=Ca(t));const n=e.parse(t);return $$(e,n)}kt.getFullPath=_$;function $$(e,t){return e.serialize(t).split("#")[0]+"#"}kt._getFullPath=$$;const Z7=/#\/?$/;function Ca(e){return e?e.replace(Z7,""):""}kt.normalizeId=Ca;function Q7(e,t,r){return r=Ca(r),e.resolve(t,r)}kt.resolveUrl=Q7;const eH=/^[a-z_][-a-z0-9._]*$/i;function tH(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=Ca(e[r]||t),a={"":i},s=_$(n,i,!1),l={},u=new Set;return G7(e,{allKeys:!0},(p,m,y,_)=>{if(_===void 0)return;const w=s+m;let v=a[_];typeof p[r]=="string"&&(v=g.call(this,p[r])),C.call(this,p.$anchor),C.call(this,p.$dynamicAnchor),a[m]=v;function g(S){const E=this.opts.uriResolver.resolve;if(S=Ca(v?E(v,S):S),u.has(S))throw d(S);u.add(S);let A=this.refs[S];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?f(p,A.schema,S):S!==Ca(w)&&(S[0]==="#"?(f(p,l[S],S),l[S]=p):this.refs[S]=w),S}function C(S){if(typeof S=="string"){if(!eH.test(S))throw new Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),l;function f(p,m,y){if(m!==void 0&&!K7(p,m))throw d(y)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}kt.getSchemaRefs=tH,Object.defineProperty(kr,"__esModule",{value:!0}),kr.getData=kr.KeywordCxt=kr.validateFunctionCode=void 0;const w$=$a,S$=Pt,Dh=_n,yc=Pt,rH=mc,Uo=on,Fh=Hn,$e=De,Ae=an,nH=kt,$n=ye,Wo=jo;function iH(e){if(A$(e)&&(T$(e),O$(e))){sH(e);return}C$(e,()=>(0,w$.topBoolOrEmptySchema)(e))}kr.validateFunctionCode=iH;function C$({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},a){i.code.es5?e.func(t,(0,$e._)`${Ae.default.data}, ${Ae.default.valCxt}`,n.$async,()=>{e.code((0,$e._)`"use strict"; ${E$(r,i)}`),oH(e,i),e.code(a)}):e.func(t,(0,$e._)`${Ae.default.data}, ${aH(i)}`,n.$async,()=>e.code(E$(r,i)).code(a))}function aH(e){return(0,$e._)`{${Ae.default.instancePath}="", ${Ae.default.parentData}, ${Ae.default.parentDataProperty}, ${Ae.default.rootData}=${Ae.default.data}${e.dynamicRef?(0,$e._)`, ${Ae.default.dynamicAnchors}={}`:$e.nil}}={}`}function oH(e,t){e.if(Ae.default.valCxt,()=>{e.var(Ae.default.instancePath,(0,$e._)`${Ae.default.valCxt}.${Ae.default.instancePath}`),e.var(Ae.default.parentData,(0,$e._)`${Ae.default.valCxt}.${Ae.default.parentData}`),e.var(Ae.default.parentDataProperty,(0,$e._)`${Ae.default.valCxt}.${Ae.default.parentDataProperty}`),e.var(Ae.default.rootData,(0,$e._)`${Ae.default.valCxt}.${Ae.default.rootData}`),t.dynamicRef&&e.var(Ae.default.dynamicAnchors,(0,$e._)`${Ae.default.valCxt}.${Ae.default.dynamicAnchors}`)},()=>{e.var(Ae.default.instancePath,(0,$e._)`""`),e.var(Ae.default.parentData,(0,$e._)`undefined`),e.var(Ae.default.parentDataProperty,(0,$e._)`undefined`),e.var(Ae.default.rootData,Ae.default.data),t.dynamicRef&&e.var(Ae.default.dynamicAnchors,(0,$e._)`{}`)})}function sH(e){const{schema:t,opts:r,gen:n}=e;C$(e,()=>{r.$comment&&t.$comment&&I$(e),dH(e),n.let(Ae.default.vErrors,null),n.let(Ae.default.errors,0),r.unevaluated&&lH(e),P$(e),mH(e)})}function lH(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,$e._)`${r}.evaluated`),t.if((0,$e._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,$e._)`${e.evaluated}.props`,(0,$e._)`undefined`)),t.if((0,$e._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,$e._)`${e.evaluated}.items`,(0,$e._)`undefined`))}function E$(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,$e._)`/*# sourceURL=${r} */`:$e.nil}function cH(e,t){if(A$(e)&&(T$(e),O$(e))){uH(e,t);return}(0,w$.boolOrEmptySchema)(e,t)}function O$({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function A$(e){return typeof e.schema!="boolean"}function uH(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&I$(e),hH(e),pH(e);const a=n.const("_errs",Ae.default.errors);P$(e,a),n.var(t,(0,$e._)`${a} === ${Ae.default.errors}`)}function T$(e){(0,$n.checkUnknownRules)(e),fH(e)}function P$(e,t){if(e.opts.jtd)return x$(e,[],!1,t);const r=(0,S$.getSchemaTypes)(e.schema),n=(0,S$.coerceAndCheckDataType)(e,r);x$(e,r,!n,t)}function fH(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,$n.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function dH(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,$n.checkStrictMode)(e,"default is ignored in the schema root")}function hH(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,nH.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function pH(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function I$({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const a=r.$comment;if(i.$comment===!0)e.code((0,$e._)`${Ae.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){const s=(0,$e.str)`${n}/$comment`,l=e.scopeValue("root",{ref:t.root});e.code((0,$e._)`${Ae.default.self}.opts.$comment(${a}, ${s}, ${l}.schema)`)}}function mH(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=e;r.$async?t.if((0,$e._)`${Ae.default.errors} === 0`,()=>t.return(Ae.default.data),()=>t.throw((0,$e._)`new ${i}(${Ae.default.vErrors})`)):(t.assign((0,$e._)`${n}.errors`,Ae.default.vErrors),a.unevaluated&&gH(e),t.return((0,$e._)`${Ae.default.errors} === 0`))}function gH({gen:e,evaluated:t,props:r,items:n}){r instanceof $e.Name&&e.assign((0,$e._)`${t}.props`,r),n instanceof $e.Name&&e.assign((0,$e._)`${t}.items`,n)}function x$(e,t,r,n){const{gen:i,schema:a,data:s,allErrors:l,opts:u,self:f}=e,{RULES:d}=f;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,$n.schemaHasRulesButRef)(a,d))){i.block(()=>M$(e,"$ref",d.all.$ref.definition));return}u.jtd||yH(e,t),i.block(()=>{for(const m of d.rules)p(m);p(d.post)});function p(m){(0,Dh.shouldUseGroup)(a,m)&&(m.type?(i.if((0,yc.checkDataType)(m.type,s,u.strictNumbers)),D$(e,m),t.length===1&&t[0]===m.type&&r&&(i.else(),(0,yc.reportTypeError)(e)),i.endIf()):D$(e,m),l||i.if((0,$e._)`${Ae.default.errors} === ${n||0}`))}}function D$(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,rH.assignDefaults)(e,t.type),r.block(()=>{for(const a of t.rules)(0,Dh.shouldUseRule)(n,a)&&M$(e,a.keyword,a.definition,t.type)})}function yH(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(vH(e,t),e.opts.allowUnionTypes||bH(e,t),_H(e,e.dataTypes))}function vH(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{F$(e.dataTypes,r)||Nh(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),wH(e,t)}}function bH(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Nh(e,"use allowUnionTypes to allow union type keyword")}function _H(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,Dh.shouldUseRule)(e.schema,i)){const{type:a}=i.definition;a.length&&!a.some(s=>$H(t,s))&&Nh(e,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function $H(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function F$(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function wH(e,t){const r=[];for(const n of e.dataTypes)F$(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Nh(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$n.checkStrictMode)(e,t,e.opts.strictTypes)}class N${constructor(t,r,n){if((0,Uo.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$n.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",k$(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Uo.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ae.default.errors))}result(t,r,n){this.failResult((0,$e.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,$e.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,$e._)`${r} !== undefined && (${(0,$e.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Wo.reportExtraError:Wo.reportError)(this,this.def.error,r)}$dataError(){(0,Wo.reportError)(this,this.def.$dataError||Wo.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Wo.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=$e.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=$e.nil,r=$e.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:a,def:s}=this;n.if((0,$e.or)((0,$e._)`${i} === undefined`,r)),t!==$e.nil&&n.assign(t,!0),(a.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==$e.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,$e.or)(s(),l());function s(){if(n.length){if(!(r instanceof $e.Name))throw new Error("ajv implementation error");const u=Array.isArray(n)?n:[n];return(0,$e._)`${(0,yc.checkDataTypes)(u,r,a.opts.strictNumbers,yc.DataType.Wrong)}`}return $e.nil}function l(){if(i.validateSchema){const u=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,$e._)`!${u}(${r})`}return $e.nil}}subschema(t,r){const n=(0,Fh.getSubschema)(this.it,t);(0,Fh.extendSubschemaData)(n,this.it,t),(0,Fh.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};return cH(i,r),i}mergeEvaluated(t,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=$n.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=$n.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,$e.Name)),!0}}kr.KeywordCxt=N$;function M$(e,t,r,n){const i=new N$(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Uo.funcKeywordCode)(i,r):"macro"in r?(0,Uo.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Uo.funcKeywordCode)(i,r)}const SH=/^\/(?:[^~]|~0|~1)*$/,CH=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k$(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,a;if(e==="")return Ae.default.rootData;if(e[0]==="/"){if(!SH.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=Ae.default.rootData}else{const f=CH.exec(e);if(!f)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+f[1];if(i=f[2],i==="#"){if(d>=t)throw new Error(u("property/index",d));return n[t-d]}if(d>t)throw new Error(u("data",d));if(a=r[t-d],!i)return a}let s=a;const l=i.split("/");for(const f of l)f&&(a=(0,$e._)`${a}${(0,$e.getProperty)((0,$n.unescapeJsonPointer)(f))}`,s=(0,$e._)`${s} && ${a}`);return s;function u(f,d){return`Cannot access ${f} ${d} levels up, current level is ${t}`}}kr.getData=k$;var qo={};Object.defineProperty(qo,"__esModule",{value:!0});class EH extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}qo.default=EH;var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});const Mh=kt;class OH extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Mh.resolveUrl)(t,r,n),this.missingSchema=(0,Mh.normalizeId)((0,Mh.getFullPath)(t,this.missingRef))}}Ea.default=OH;var er={};Object.defineProperty(er,"__esModule",{value:!0}),er.resolveSchema=er.getCompilingSchema=er.resolveRef=er.compileSchema=er.SchemaEnv=void 0;const Lr=De,AH=qo,Ei=an,jr=kt,L$=ye,TH=kr;class vc{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,jr.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}er.SchemaEnv=vc;function kh(e){const t=j$.call(this,e);if(t)return t;const r=(0,jr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,s=new Lr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let l;e.$async&&(l=s.scopeValue("Error",{ref:AH.default,code:(0,Lr._)`require("ajv/dist/runtime/validation_error").default`}));const u=s.scopeName("validate");e.validateName=u;const f={gen:s,allErrors:this.opts.allErrors,data:Ei.default.data,parentData:Ei.default.parentData,parentDataProperty:Ei.default.parentDataProperty,dataNames:[Ei.default.data],dataPathArr:[Lr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Lr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:l,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Lr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Lr._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,TH.validateFunctionCode)(f),s.optimize(this.opts.code.optimize);const p=s.toString();d=`${s.scopeRefs(Ei.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const y=new Function(`${Ei.default.self}`,`${Ei.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:y}),y.errors=null,y.schema=e.schema,y.schemaEnv=e,e.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:u,validateCode:p,scopeValues:s._values}),this.opts.unevaluated){const{props:_,items:w}=f;y.evaluated={props:_ instanceof Lr.Name?void 0:_,items:w instanceof Lr.Name?void 0:w,dynamicProps:_ instanceof Lr.Name,dynamicItems:w instanceof Lr.Name},y.source&&(y.source.evaluated=(0,Lr.stringify)(y.evaluated))}return e.validate=y,e}catch(p){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(e)}}er.compileSchema=kh;function PH(e,t,r){var n;r=(0,jr.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let a=DH.call(this,e,r);if(a===void 0){const s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:l}=this.opts;s&&(a=new vc({schema:s,schemaId:l,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=IH.call(this,a)}er.resolveRef=PH;function IH(e){return(0,jr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:kh.call(this,e)}function j$(e){for(const t of this._compilations)if(xH(t,e))return t}er.getCompilingSchema=j$;function xH(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function DH(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||bc.call(this,e,t)}function bc(e,t){const r=this.opts.uriResolver.parse(t),n=(0,jr._getFullPath)(this.opts.uriResolver,r);let i=(0,jr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Lh.call(this,r,e);const a=(0,jr.normalizeId)(n),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){const l=bc.call(this,e,s);return typeof(l==null?void 0:l.schema)!="object"?void 0:Lh.call(this,r,l)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||kh.call(this,s),a===(0,jr.normalizeId)(t)){const{schema:l}=s,{schemaId:u}=this.opts,f=l[u];return f&&(i=(0,jr.resolveUrl)(this.opts.uriResolver,i,f)),new vc({schema:l,schemaId:u,root:e,baseId:i})}return Lh.call(this,r,s)}}er.resolveSchema=bc;const FH=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Lh(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const l of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,L$.unescapeFragment)(l)];if(u===void 0)return;r=u;const f=typeof r=="object"&&r[this.opts.schemaId];!FH.has(l)&&f&&(t=(0,jr.resolveUrl)(this.opts.uriResolver,t,f))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,L$.schemaHasRulesButRef)(r,this.RULES)){const l=(0,jr.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=bc.call(this,n,l)}const{schemaId:s}=this.opts;if(a=a||new vc({schema:r,schemaId:s,root:n,baseId:t}),a.schema!==a.root.schema)return a}const NH={$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};var jh={};Object.defineProperty(jh,"__esModule",{value:!0});const B$=X0;B$.code='require("ajv/dist/runtime/uri").default',jh.default=B$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=kr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=De;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=qo,i=Ea,a=Si,s=er,l=De,u=kt,f=Pt,d=ye,p=NH,m=jh,y=(U,F)=>new RegExp(U,F);y.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={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."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function S(U){var F,z,j,T,D,V,Z,oe,ue,he,be,Le,ft,me,It,Vt,Et,rr,ss,En,Yt,On,Xn,ls,An;const Fi=U.strict,Tn=(F=U.code)===null||F===void 0?void 0:F.optimize,Pn=Tn===!0||Tn===void 0?1:Tn||0,Fa=(j=(z=U.code)===null||z===void 0?void 0:z.regExp)!==null&&j!==void 0?j:y,cs=(T=U.uriResolver)!==null&&T!==void 0?T:m.default;return{strictSchema:(V=(D=U.strictSchema)!==null&&D!==void 0?D:Fi)!==null&&V!==void 0?V:!0,strictNumbers:(oe=(Z=U.strictNumbers)!==null&&Z!==void 0?Z:Fi)!==null&&oe!==void 0?oe:!0,strictTypes:(he=(ue=U.strictTypes)!==null&&ue!==void 0?ue:Fi)!==null&&he!==void 0?he:"log",strictTuples:(Le=(be=U.strictTuples)!==null&&be!==void 0?be:Fi)!==null&&Le!==void 0?Le:"log",strictRequired:(me=(ft=U.strictRequired)!==null&&ft!==void 0?ft:Fi)!==null&&me!==void 0?me:!1,code:U.code?{...U.code,optimize:Pn,regExp:Fa}:{optimize:Pn,regExp:Fa},loopRequired:(It=U.loopRequired)!==null&&It!==void 0?It:C,loopEnum:(Vt=U.loopEnum)!==null&&Vt!==void 0?Vt:C,meta:(Et=U.meta)!==null&&Et!==void 0?Et:!0,messages:(rr=U.messages)!==null&&rr!==void 0?rr:!0,inlineRefs:(ss=U.inlineRefs)!==null&&ss!==void 0?ss:!0,schemaId:(En=U.schemaId)!==null&&En!==void 0?En:"$id",addUsedSchema:(Yt=U.addUsedSchema)!==null&&Yt!==void 0?Yt:!0,validateSchema:(On=U.validateSchema)!==null&&On!==void 0?On:!0,validateFormats:(Xn=U.validateFormats)!==null&&Xn!==void 0?Xn:!0,unicodeRegExp:(ls=U.unicodeRegExp)!==null&&ls!==void 0?ls:!0,int32range:(An=U.int32range)!==null&&An!==void 0?An:!0,uriResolver:cs}}class E{constructor(F={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,F=this.opts={...F,...S(F)};const{es5:z,lines:j}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:w,es5:z,lines:j}),this.logger=ee(F.logger);const T=F.validateFormats;F.validateFormats=!1,this.RULES=(0,a.getRules)(),A.call(this,v,F,"NOT SUPPORTED"),A.call(this,g,F,"DEPRECATED","warn"),this._metaOpts=H.call(this),F.formats&&Y.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),F.keywords&&K.call(this,F.keywords),typeof F.meta=="object"&&this.addMetaSchema(F.meta),N.call(this),F.validateFormats=T}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:F,meta:z,schemaId:j}=this.opts;let T=p;j==="id"&&(T={...p},T.id=T.$id,delete T.$id),z&&F&&this.addMetaSchema(T,T[j],!1)}defaultMeta(){const{meta:F,schemaId:z}=this.opts;return this.opts.defaultMeta=typeof F=="object"?F[z]||F:void 0}validate(F,z){let j;if(typeof F=="string"){if(j=this.getSchema(F),!j)throw new Error(`no schema with key or ref "${F}"`)}else j=this.compile(F);const T=j(z);return"$async"in j||(this.errors=j.errors),T}compile(F,z){const j=this._addSchema(F,z);return j.validate||this._compileSchemaEnv(j)}compileAsync(F,z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:j}=this.opts;return T.call(this,F,z);async function T(he,be){await D.call(this,he.$schema);const Le=this._addSchema(he,be);return Le.validate||V.call(this,Le)}async function D(he){he&&!this.getSchema(he)&&await T.call(this,{$ref:he},!0)}async function V(he){try{return this._compileSchemaEnv(he)}catch(be){if(!(be instanceof i.default))throw be;return Z.call(this,be),await oe.call(this,be.missingSchema),V.call(this,he)}}function Z({missingSchema:he,missingRef:be}){if(this.refs[he])throw new Error(`AnySchema ${he} is loaded but ${be} cannot be resolved`)}async function oe(he){const be=await ue.call(this,he);this.refs[he]||await D.call(this,be.$schema),this.refs[he]||this.addSchema(be,he,z)}async function ue(he){const be=this._loading[he];if(be)return be;try{return await(this._loading[he]=j(he))}finally{delete this._loading[he]}}}addSchema(F,z,j,T=this.opts.validateSchema){if(Array.isArray(F)){for(const V of F)this.addSchema(V,void 0,j,T);return this}let D;if(typeof F=="object"){const{schemaId:V}=this.opts;if(D=F[V],D!==void 0&&typeof D!="string")throw new Error(`schema ${V} must be string`)}return z=(0,u.normalizeId)(z||D),this._checkUnique(z),this.schemas[z]=this._addSchema(F,j,z,T,!0),this}addMetaSchema(F,z,j=this.opts.validateSchema){return this.addSchema(F,z,!0,j),this}validateSchema(F,z){if(typeof F=="boolean")return!0;let j;if(j=F.$schema,j!==void 0&&typeof j!="string")throw new Error("$schema must be a string");if(j=j||this.opts.defaultMeta||this.defaultMeta(),!j)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const T=this.validate(j,F);if(!T&&z){const D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}return T}getSchema(F){let z;for(;typeof(z=x.call(this,F))=="string";)F=z;if(z===void 0){const{schemaId:j}=this.opts,T=new s.SchemaEnv({schema:{},schemaId:j});if(z=s.resolveSchema.call(this,T,F),!z)return;this.refs[F]=z}return z.validate||this._compileSchemaEnv(z)}removeSchema(F){if(F instanceof RegExp)return this._removeAllSchemas(this.schemas,F),this._removeAllSchemas(this.refs,F),this;switch(typeof F){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const z=x.call(this,F);return typeof z=="object"&&this._cache.delete(z.schema),delete this.schemas[F],delete this.refs[F],this}case"object":{const z=F;this._cache.delete(z);let j=F[this.opts.schemaId];return j&&(j=(0,u.normalizeId)(j),delete this.schemas[j],delete this.refs[j]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(F){for(const z of F)this.addKeyword(z);return this}addKeyword(F,z){let j;if(typeof F=="string")j=F,typeof z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),z.keyword=j);else if(typeof F=="object"&&z===void 0){if(z=F,j=z.keyword,Array.isArray(j)&&!j.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Q.call(this,j,z),!z)return(0,d.eachItem)(j,D=>k.call(this,D)),this;W.call(this,z);const T={...z,type:(0,f.getJSONTypes)(z.type),schemaType:(0,f.getJSONTypes)(z.schemaType)};return(0,d.eachItem)(j,T.type.length===0?D=>k.call(this,D,T):D=>T.type.forEach(V=>k.call(this,D,T,V))),this}getKeyword(F){const z=this.RULES.all[F];return typeof z=="object"?z.definition:!!z}removeKeyword(F){const{RULES:z}=this;delete z.keywords[F],delete z.all[F];for(const j of z.rules){const T=j.rules.findIndex(D=>D.keyword===F);T>=0&&j.rules.splice(T,1)}return this}addFormat(F,z){return typeof z=="string"&&(z=new RegExp(z)),this.formats[F]=z,this}errorsText(F=this.errors,{separator:z=", ",dataVar:j="data"}={}){return!F||F.length===0?"No errors":F.map(T=>`${j}${T.instancePath} ${T.message}`).reduce((T,D)=>T+z+D)}$dataMetaSchema(F,z){const j=this.RULES.all;F=JSON.parse(JSON.stringify(F));for(const T of z){const D=T.split("/").slice(1);let V=F;for(const Z of D)V=V[Z];for(const Z in j){const oe=j[Z];if(typeof oe!="object")continue;const{$data:ue}=oe.definition,he=V[Z];ue&&he&&(V[Z]=X(he))}}return F}_removeAllSchemas(F,z){for(const j in F){const T=F[j];(!z||z.test(j))&&(typeof T=="string"?delete F[j]:T&&!T.meta&&(this._cache.delete(T.schema),delete F[j]))}}_addSchema(F,z,j,T=this.opts.validateSchema,D=this.opts.addUsedSchema){let V;const{schemaId:Z}=this.opts;if(typeof F=="object")V=F[Z];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof F!="boolean")throw new Error("schema must be object or boolean")}let oe=this._cache.get(F);if(oe!==void 0)return oe;j=(0,u.normalizeId)(V||j);const ue=u.getSchemaRefs.call(this,F,j);return oe=new s.SchemaEnv({schema:F,schemaId:Z,meta:z,baseId:j,localRefs:ue}),this._cache.set(oe.schema,oe),D&&!j.startsWith("#")&&(j&&this._checkUnique(j),this.refs[j]=oe),T&&this.validateSchema(F,!0),oe}_checkUnique(F){if(this.schemas[F]||this.refs[F])throw new Error(`schema with key or id "${F}" already exists`)}_compileSchemaEnv(F){if(F.meta?this._compileMetaSchema(F):s.compileSchema.call(this,F),!F.validate)throw new Error("ajv implementation error");return F.validate}_compileMetaSchema(F){const z=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,F)}finally{this.opts=z}}}E.ValidationError=n.default,E.MissingRefError=i.default,e.default=E;function A(U,F,z,j="error"){for(const T in U){const D=T;D in F&&this.logger[j](`${z}: option ${T}. ${U[D]}`)}}function x(U){return U=(0,u.normalizeId)(U),this.schemas[U]||this.refs[U]}function N(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const F in U)this.addSchema(U[F],F)}function Y(){for(const U in this.opts.formats){const F=this.opts.formats[U];F&&this.addFormat(U,F)}}function K(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const F in U){const z=U[F];z.keyword||(z.keyword=F),this.addKeyword(z)}}function H(){const U={...this.opts};for(const F of _)delete U[F];return U}const te={log(){},warn(){},error(){}};function ee(U){if(U===!1)return te;if(U===void 0)return console;if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const ae=/^[a-z_$][a-z0-9_$:-]*$/i;function Q(U,F){const{RULES:z}=this;if((0,d.eachItem)(U,j=>{if(z.keywords[j])throw new Error(`Keyword ${j} is already defined`);if(!ae.test(j))throw new Error(`Keyword ${j} has invalid name`)}),!!F&&F.$data&&!("code"in F||"validate"in F))throw new Error('$data keyword must have "code" or "validate" function')}function k(U,F,z){var j;const T=F==null?void 0:F.post;if(z&&T)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:D}=this;let V=T?D.post:D.rules.find(({type:oe})=>oe===z);if(V||(V={type:z,rules:[]},D.rules.push(V)),D.keywords[U]=!0,!F)return;const Z={keyword:U,definition:{...F,type:(0,f.getJSONTypes)(F.type),schemaType:(0,f.getJSONTypes)(F.schemaType)}};F.before?q.call(this,V,Z,F.before):V.rules.push(Z),D.all[U]=Z,(j=F.implements)===null||j===void 0||j.forEach(oe=>this.addKeyword(oe))}function q(U,F,z){const j=U.rules.findIndex(T=>T.keyword===z);j>=0?U.rules.splice(j,0,F):(U.rules.push(F),this.logger.warn(`rule ${z} is not defined`))}function W(U){let{metaSchema:F}=U;F!==void 0&&(U.$data&&this.opts.$data&&(F=X(F)),U.validateSchema=this.compile(F,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function X(U){return{anyOf:[U,L]}}}(X1);var Bh={},Uh={},Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});const MH={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Wh.default=MH;var Oi={};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.callRef=Oi.getValidate=void 0;const kH=Ea,U$=Me,tr=De,Oa=an,W$=er,_c=ye,LH={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:a,validateName:s,opts:l,self:u}=n,{root:f}=a;if((r==="#"||r==="#/")&&i===f.baseId)return p();const d=W$.resolveRef.call(u,f,i,r);if(d===void 0)throw new kH.default(n.opts.uriResolver,i,r);if(d instanceof W$.SchemaEnv)return m(d);return y(d);function p(){if(a===f)return $c(e,s,a,a.$async);const _=t.scopeValue("root",{ref:f});return $c(e,(0,tr._)`${_}.validate`,f,f.$async)}function m(_){const w=q$(e,_);$c(e,w,_,_.$async)}function y(_){const w=t.scopeValue("schema",l.code.source===!0?{ref:_,code:(0,tr.stringify)(_)}:{ref:_}),v=t.name("valid"),g=e.subschema({schema:_,dataTypes:[],schemaPath:tr.nil,topSchemaRef:w,errSchemaPath:r},v);e.mergeEvaluated(g),e.ok(v)}}};function q$(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,tr._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Oi.getValidate=q$;function $c(e,t,r,n){const{gen:i,it:a}=e,{allErrors:s,schemaEnv:l,opts:u}=a,f=u.passContext?Oa.default.this:tr.nil;n?d():p();function d(){if(!l.$async)throw new Error("async schema referenced by sync schema");const _=i.let("valid");i.try(()=>{i.code((0,tr._)`await ${(0,U$.callValidateCode)(e,t,f)}`),y(t),s||i.assign(_,!0)},w=>{i.if((0,tr._)`!(${w} instanceof ${a.ValidationError})`,()=>i.throw(w)),m(w),s||i.assign(_,!1)}),e.ok(_)}function p(){e.result((0,U$.callValidateCode)(e,t,f),()=>y(t),()=>m(t))}function m(_){const w=(0,tr._)`${_}.errors`;i.assign(Oa.default.vErrors,(0,tr._)`${Oa.default.vErrors} === null ? ${w} : ${Oa.default.vErrors}.concat(${w})`),i.assign(Oa.default.errors,(0,tr._)`${Oa.default.vErrors}.length`)}function y(_){var w;if(!a.opts.unevaluated)return;const v=(w=r==null?void 0:r.validate)===null||w===void 0?void 0:w.evaluated;if(a.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(a.props=_c.mergeEvaluated.props(i,v.props,a.props));else{const g=i.var("props",(0,tr._)`${_}.evaluated.props`);a.props=_c.mergeEvaluated.props(i,g,a.props,tr.Name)}if(a.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(a.items=_c.mergeEvaluated.items(i,v.items,a.items));else{const g=i.var("items",(0,tr._)`${_}.evaluated.items`);a.items=_c.mergeEvaluated.items(i,g,a.items,tr.Name)}}}Oi.callRef=$c,Oi.default=LH,Object.defineProperty(Uh,"__esModule",{value:!0});const jH=Wh,BH=Oi,UH=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",jH.default,BH.default];Uh.default=UH;var qh={},Vh={};Object.defineProperty(Vh,"__esModule",{value:!0});const wc=De,Gn=wc.operators,Sc={maximum:{okStr:"<=",ok:Gn.LTE,fail:Gn.GT},minimum:{okStr:">=",ok:Gn.GTE,fail:Gn.LT},exclusiveMaximum:{okStr:"<",ok:Gn.LT,fail:Gn.GTE},exclusiveMinimum:{okStr:">",ok:Gn.GT,fail:Gn.LTE}},WH={message:({keyword:e,schemaCode:t})=>(0,wc.str)`must be ${Sc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wc._)`{comparison: ${Sc[e].okStr}, limit: ${t}}`},qH={keyword:Object.keys(Sc),type:"number",schemaType:"number",$data:!0,error:WH,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,wc._)`${r} ${Sc[t].fail} ${n} || isNaN(${r})`)}};Vh.default=qH;var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});const Vo=De,VH={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,Vo.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Vo._)`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?(0,Vo._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,Vo._)`${s} !== parseInt(${s})`;e.fail$data((0,Vo._)`(${n} === 0 || (${s} = ${r}/${n}, ${l}))`)}};Rh.default=VH;var zh={},Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});function V$(e){const t=e.length;let r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}Hh.default=V$,V$.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(zh,"__esModule",{value:!0});const Ai=De,RH=ye,zH=Hh,HH={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,Ai.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ai._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,a=t==="maxLength"?Ai.operators.GT:Ai.operators.LT,s=i.opts.unicode===!1?(0,Ai._)`${r}.length`:(0,Ai._)`${(0,RH.useFunc)(e.gen,zH.default)}(${r})`;e.fail$data((0,Ai._)`${s} ${a} ${n}`)}};zh.default=HH;var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0});const KH=Me,Cc=De,GH={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,Cc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Cc._)`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"",l=r?(0,Cc._)`(new RegExp(${i}, ${s}))`:(0,KH.usePattern)(e,n);e.fail$data((0,Cc._)`!${l}.test(${t})`)}};Kh.default=GH;var Gh={};Object.defineProperty(Gh,"__esModule",{value:!0});const Ro=De,YH={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Ro.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ro._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ro.operators.GT:Ro.operators.LT;e.fail$data((0,Ro._)`Object.keys(${r}).length ${i} ${n}`)}};Gh.default=YH;var Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});const zo=Me,Ho=De,JH=ye,XH={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,Ho.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ho._)`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:a,it:s}=e,{opts:l}=s;if(!a&&r.length===0)return;const u=r.length>=l.loopRequired;if(s.allErrors?f():d(),l.strictRequired){const y=e.parentSchema.properties,{definedProperties:_}=e.it;for(const w of r)if((y==null?void 0:y[w])===void 0&&!_.has(w)){const v=s.schemaEnv.baseId+s.errSchemaPath,g=`required property "${w}" is not defined at "${v}" (strictRequired)`;(0,JH.checkStrictMode)(s,g,s.opts.strictRequired)}}function f(){if(u||a)e.block$data(Ho.nil,p);else for(const y of r)(0,zo.checkReportMissingProp)(e,y)}function d(){const y=t.let("missing");if(u||a){const _=t.let("valid",!0);e.block$data(_,()=>m(y,_)),e.ok(_)}else t.if((0,zo.checkMissingProp)(e,r,y)),(0,zo.reportMissingProp)(e,y),t.else()}function p(){t.forOf("prop",n,y=>{e.setParams({missingProperty:y}),t.if((0,zo.noPropertyInData)(t,i,y,l.ownProperties),()=>e.error())})}function m(y,_){e.setParams({missingProperty:y}),t.forOf(y,n,()=>{t.assign(_,(0,zo.propertyInData)(t,i,y,l.ownProperties)),t.if((0,Ho.not)(_),()=>{e.error(),t.break()})},Ho.nil)}}};Yh.default=XH;var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});const Ko=De,ZH={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Ko.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Ko._)`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Ko.operators.GT:Ko.operators.LT;e.fail$data((0,Ko._)`${r}.length ${i} ${n}`)}};Jh.default=ZH;var Xh={},Go={};Object.defineProperty(Go,"__esModule",{value:!0});const R$=y$;R$.code='require("ajv/dist/runtime/equal").default',Go.default=R$,Object.defineProperty(Xh,"__esModule",{value:!0});const Zh=Pt,Lt=De,QH=ye,eK=Go,tK={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,Lt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Lt._)`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:a,schemaCode:s,it:l}=e;if(!n&&!i)return;const u=t.let("valid"),f=a.items?(0,Zh.getSchemaTypes)(a.items):[];e.block$data(u,d,(0,Lt._)`${s} === false`),e.ok(u);function d(){const _=t.let("i",(0,Lt._)`${r}.length`),w=t.let("j");e.setParams({i:_,j:w}),t.assign(u,!0),t.if((0,Lt._)`${_} > 1`,()=>(p()?m:y)(_,w))}function p(){return f.length>0&&!f.some(_=>_==="object"||_==="array")}function m(_,w){const v=t.name("item"),g=(0,Zh.checkDataTypes)(f,v,l.opts.strictNumbers,Zh.DataType.Wrong),C=t.const("indices",(0,Lt._)`{}`);t.for((0,Lt._)`;${_}--;`,()=>{t.let(v,(0,Lt._)`${r}[${_}]`),t.if(g,(0,Lt._)`continue`),f.length>1&&t.if((0,Lt._)`typeof ${v} == "string"`,(0,Lt._)`${v} += "_"`),t.if((0,Lt._)`typeof ${C}[${v}] == "number"`,()=>{t.assign(w,(0,Lt._)`${C}[${v}]`),e.error(),t.assign(u,!1).break()}).code((0,Lt._)`${C}[${v}] = ${_}`)})}function y(_,w){const v=(0,QH.useFunc)(t,eK.default),g=t.name("outer");t.label(g).for((0,Lt._)`;${_}--;`,()=>t.for((0,Lt._)`${w} = ${_}; ${w}--;`,()=>t.if((0,Lt._)`${v}(${r}[${_}], ${r}[${w}])`,()=>{e.error(),t.assign(u,!1).break(g)})))}}};Xh.default=tK;var Qh={};Object.defineProperty(Qh,"__esModule",{value:!0});const ep=De,rK=ye,nK=Go,iK={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,ep._)`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:a}=e;n||a&&typeof a=="object"?e.fail$data((0,ep._)`!${(0,rK.useFunc)(t,nK.default)}(${r}, ${i})`):e.fail((0,ep._)`${a} !== ${r}`)}};Qh.default=iK;var tp={};Object.defineProperty(tp,"__esModule",{value:!0});const Yo=De,aK=ye,oK=Go,sK={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Yo._)`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const l=i.length>=s.opts.loopEnum;let u;const f=()=>u??(u=(0,aK.useFunc)(t,oK.default));let d;if(l||n)d=t.let("valid"),e.block$data(d,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const y=t.const("vSchema",a);d=(0,Yo.or)(...i.map((_,w)=>m(y,w)))}e.pass(d);function p(){t.assign(d,!1),t.forOf("v",a,y=>t.if((0,Yo._)`${f()}(${r}, ${y})`,()=>t.assign(d,!0).break()))}function m(y,_){const w=i[_];return typeof w=="object"&&w!==null?(0,Yo._)`${f()}(${r}, ${y}[${_}])`:(0,Yo._)`${r} === ${w}`}}};tp.default=sK,Object.defineProperty(qh,"__esModule",{value:!0});const lK=Vh,cK=Rh,uK=zh,fK=Kh,dK=Gh,hK=Yh,pK=Jh,mK=Xh,gK=Qh,yK=tp,vK=[lK.default,cK.default,uK.default,fK.default,dK.default,hK.default,pK.default,mK.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},gK.default,yK.default];qh.default=vK;var rp={},Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.validateAdditionalItems=void 0;const Ti=De,np=ye,bK={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,Ti.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ti._)`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,np.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}z$(e,n)}};function z$(e,t){const{gen:r,schema:n,data:i,keyword:a,it:s}=e;s.items=!0;const l=r.const("len",(0,Ti._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Ti._)`${l} <= ${t.length}`);else if(typeof n=="object"&&!(0,np.alwaysValidSchema)(s,n)){const f=r.var("valid",(0,Ti._)`${l} <= ${t.length}`);r.if((0,Ti.not)(f),()=>u(f)),e.ok(f)}function u(f){r.forRange("i",t.length,l,d=>{e.subschema({keyword:a,dataProp:d,dataPropType:np.Type.Num},f),s.allErrors||r.if((0,Ti.not)(f),()=>r.break())})}}Aa.validateAdditionalItems=z$,Aa.default=bK;var ip={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.validateTuple=void 0;const H$=De,Ec=ye,_K=Me,$K={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return K$(e,"additionalItems",t);r.items=!0,!(0,Ec.alwaysValidSchema)(r,t)&&e.ok((0,_K.validateArray)(e))}};function K$(e,t,r=e.schema){const{gen:n,parentSchema:i,data:a,keyword:s,it:l}=e;d(i),l.opts.unevaluated&&r.length&&l.items!==!0&&(l.items=Ec.mergeEvaluated.items(n,r.length,l.items));const u=n.name("valid"),f=n.const("len",(0,H$._)`${a}.length`);r.forEach((p,m)=>{(0,Ec.alwaysValidSchema)(l,p)||(n.if((0,H$._)`${f} > ${m}`,()=>e.subschema({keyword:s,schemaProp:m,dataProp:m},u)),e.ok(u))});function d(p){const{opts:m,errSchemaPath:y}=l,_=r.length,w=_===p.minItems&&(_===p.maxItems||p[t]===!1);if(m.strictTuples&&!w){const v=`"${s}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${y}"`;(0,Ec.checkStrictMode)(l,v,m.strictTuples)}}}Ta.validateTuple=K$,Ta.default=$K,Object.defineProperty(ip,"__esModule",{value:!0});const wK=Ta,SK={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,wK.validateTuple)(e,"items")};ip.default=SK;var ap={};Object.defineProperty(ap,"__esModule",{value:!0});const G$=De,CK=ye,EK=Me,OK=Aa,AK={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,G$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,G$._)`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,CK.alwaysValidSchema)(n,t)&&(i?(0,OK.validateAdditionalItems)(e,i):e.ok((0,EK.validateArray)(e)))}};ap.default=AK;var op={};Object.defineProperty(op,"__esModule",{value:!0});const wr=De,Oc=ye,TK={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>t===void 0?(0,wr.str)`must contain at least ${e} valid item(s)`:(0,wr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,wr._)`{minContains: ${e}}`:(0,wr._)`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;let s,l;const{minContains:u,maxContains:f}=n;a.opts.next?(s=u===void 0?1:u,l=f):s=1;const d=t.const("len",(0,wr._)`${i}.length`);if(e.setParams({min:s,max:l}),l===void 0&&s===0){(0,Oc.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&s>l){(0,Oc.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Oc.alwaysValidSchema)(a,r)){let w=(0,wr._)`${d} >= ${s}`;l!==void 0&&(w=(0,wr._)`${w} && ${d} <= ${l}`),e.pass(w);return}a.items=!0;const p=t.name("valid");l===void 0&&s===1?y(p,()=>t.if(p,()=>t.break())):s===0?(t.let(p,!0),l!==void 0&&t.if((0,wr._)`${i}.length > 0`,m)):(t.let(p,!1),m()),e.result(p,()=>e.reset());function m(){const w=t.name("_valid"),v=t.let("count",0);y(w,()=>t.if(w,()=>_(v)))}function y(w,v){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:Oc.Type.Num,compositeRule:!0},w),v()})}function _(w){t.code((0,wr._)`${w}++`),l===void 0?t.if((0,wr._)`${w} >= ${s}`,()=>t.assign(p,!0).break()):(t.if((0,wr._)`${w} > ${l}`,()=>t.assign(p,!1).break()),s===1?t.assign(p,!0):t.if((0,wr._)`${w} >= ${s}`,()=>t.assign(p,!0)))}}};op.default=TK;var Y$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=De,r=ye,n=Me;e.error={message:({params:{property:u,depsCount:f,deps:d}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:f,deps:d,missingProperty:p}})=>(0,t._)`{property: ${u},
113
113
  missingProperty: ${p},
114
114
  depsCount: ${f},
115
- deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[f,d]=a(u);s(u,f),l(u,d)}};function a({schema:u}){const f={},d={};for(const p in u){if(p==="__proto__")continue;const m=Array.isArray(u[p])?f:d;m[p]=u[p]}return[f,d]}function s(u,f=u.schema){const{gen:d,data:p,it:m}=u;if(Object.keys(f).length===0)return;const y=d.let("missing");for(const _ in f){const w=f[_];if(w.length===0)continue;const v=(0,n.propertyInData)(d,p,_,m.opts.ownProperties);u.setParams({property:_,depsCount:w.length,deps:w.join(", ")}),m.allErrors?d.if(v,()=>{for(const g of w)(0,n.checkReportMissingProp)(u,g)}):(d.if((0,t._)`${v} && (${(0,n.checkMissingProp)(u,w,y)})`),(0,n.reportMissingProp)(u,y),d.else())}}e.validatePropertyDeps=s;function l(u,f=u.schema){const{gen:d,data:p,keyword:m,it:y}=u,_=d.name("valid");for(const w in f)(0,r.alwaysValidSchema)(y,f[w])||(d.if((0,n.propertyInData)(d,p,w,y.opts.ownProperties),()=>{const v=u.subschema({keyword:m,schemaProp:w},_);u.mergeValidEvaluated(v,_)},()=>d.var(_,!0)),u.ok(_))}e.validateSchemaDeps=l,e.default=i})(Y$);var op={};Object.defineProperty(op,"__esModule",{value:!0});const J$=De,PK=ye,IK={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,J$._)`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,PK.alwaysValidSchema)(i,r))return;const a=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,J$.not)(a),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(a)}};op.default=IK;var Ac={};Object.defineProperty(Ac,"__esModule",{value:!0});const Tc=Me,Br=De,xK=nn,Pc=ye,DK={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,Br._)`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:l,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,Pc.alwaysValidSchema)(s,r))return;const f=(0,Tc.allSchemaProperties)(n.properties),d=(0,Tc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Br._)`${a} === ${xK.default.errors}`);function p(){t.forIn("key",i,v=>{!f.length&&!d.length?_(v):t.if(m(v),()=>_(v))})}function m(v){let g;if(f.length>8){const C=(0,Pc.schemaRefOrVal)(s,n.properties,"properties");g=(0,Tc.isOwnProperty)(t,C,v)}else f.length?g=(0,Br.or)(...f.map(C=>(0,Br._)`${v} === ${C}`)):g=Br.nil;return d.length&&(g=(0,Br.or)(g,...d.map(C=>(0,Br._)`${(0,Tc.usePattern)(e,C)}.test(${v})`))),(0,Br.not)(g)}function y(v){t.code((0,Br._)`delete ${i}[${v}]`)}function _(v){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){y(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),l||t.break();return}if(typeof r=="object"&&!(0,Pc.alwaysValidSchema)(s,r)){const g=t.name("valid");u.removeAdditional==="failing"?(w(v,g,!1),t.if((0,Br.not)(g),()=>{e.reset(),y(v)})):(w(v,g),l||t.if((0,Br.not)(g),()=>t.break()))}}function w(v,g,C){const S={keyword:"additionalProperties",dataProp:v,dataPropType:Pc.Type.Str};C===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,g)}}};Ac.default=DK;var sp={};Object.defineProperty(sp,"__esModule",{value:!0});const FK=kr,X$=Me,lp=ye,Z$=Ac,NK={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Z$.default.code(new FK.KeywordCxt(a,Z$.default,"additionalProperties"));const s=(0,X$.allSchemaProperties)(r);for(const p of s)a.definedProperties.add(p);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=lp.mergeEvaluated.props(t,(0,lp.toHash)(s),a.props));const l=s.filter(p=>!(0,lp.alwaysValidSchema)(a,r[p]));if(l.length===0)return;const u=t.name("valid");for(const p of l)f(p)?d(p):(t.if((0,X$.propertyInData)(t,i,p,a.opts.ownProperties)),d(p),a.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(u);function f(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};sp.default=NK;var cp={};Object.defineProperty(cp,"__esModule",{value:!0});const Q$=Me,Ic=De,ew=ye,tw=ye,MK={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:a}=e,{opts:s}=a,l=(0,Q$.allSchemaProperties)(r),u=l.filter(w=>(0,ew.alwaysValidSchema)(a,r[w]));if(l.length===0||u.length===l.length&&(!a.opts.unevaluated||a.props===!0))return;const f=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=t.name("valid");a.props!==!0&&!(a.props instanceof Ic.Name)&&(a.props=(0,tw.evaluatedPropsToName)(t,a.props));const{props:p}=a;m();function m(){for(const w of l)f&&y(w),a.allErrors?_(w):(t.var(d,!0),_(w),t.if(d))}function y(w){for(const v in f)new RegExp(w).test(v)&&(0,ew.checkStrictMode)(a,`property ${v} matches pattern ${w} (use allowMatchingProperties)`)}function _(w){t.forIn("key",n,v=>{t.if((0,Ic._)`${(0,Q$.usePattern)(e,w)}.test(${v})`,()=>{const g=u.includes(w);g||e.subschema({keyword:"patternProperties",schemaProp:w,dataProp:v,dataPropType:tw.Type.Str},d),a.opts.unevaluated&&p!==!0?t.assign((0,Ic._)`${p}[${v}]`,!0):!g&&!a.allErrors&&t.if((0,Ic.not)(d),()=>t.break())})})}}};cp.default=MK;var up={};Object.defineProperty(up,"__esModule",{value:!0});const kK=ye,LK={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,kK.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};up.default=LK;var fp={};Object.defineProperty(fp,"__esModule",{value:!0});const jK={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Me.validateUnion,error:{message:"must match a schema in anyOf"}};fp.default=jK;var dp={};Object.defineProperty(dp,"__esModule",{value:!0});const xc=De,BK=ye,UK={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,xc._)`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const a=r,s=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(f),e.result(s,()=>e.reset(),()=>e.error(!0));function f(){a.forEach((d,p)=>{let m;(0,BK.alwaysValidSchema)(i,d)?t.var(u,!0):m=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&t.if((0,xc._)`${u} && ${s}`).assign(s,!1).assign(l,(0,xc._)`[${l}, ${p}]`).else(),t.if(u,()=>{t.assign(s,!0),t.assign(l,p),m&&e.mergeEvaluated(m,xc.Name)})})}}};dp.default=UK;var hp={};Object.defineProperty(hp,"__esModule",{value:!0});const WK=ye,qK={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((a,s)=>{if((0,WK.alwaysValidSchema)(n,a))return;const l=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(l)})}};hp.default=qK;var pp={};Object.defineProperty(pp,"__esModule",{value:!0});const Dc=De,rw=ye,VK={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,Dc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Dc._)`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,rw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=nw(n,"then"),a=nw(n,"else");if(!i&&!a)return;const s=t.let("valid",!0),l=t.name("_valid");if(u(),e.reset(),i&&a){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(l,f("then",d),f("else",d))}else i?t.if(l,f("then")):t.if((0,Dc.not)(l),f("else"));e.pass(s,()=>e.error(!0));function u(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(d)}function f(d,p){return()=>{const m=e.subschema({keyword:d},l);t.assign(s,l),e.mergeValidEvaluated(m,s),p?t.assign(p,(0,Dc._)`${d}`):e.setParams({ifClause:d})}}}};function nw(e,t){const r=e.schema[t];return r!==void 0&&!(0,rw.alwaysValidSchema)(e,r)}pp.default=VK;var mp={};Object.defineProperty(mp,"__esModule",{value:!0});const RK=ye,zK={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,RK.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};mp.default=zK,Object.defineProperty(tp,"__esModule",{value:!0});const HK=Aa,KK=np,GK=Ta,YK=ip,JK=ap,XK=Y$,ZK=op,QK=Ac,eG=sp,tG=cp,rG=up,nG=fp,iG=dp,aG=hp,oG=pp,sG=mp;function lG(e=!1){const t=[rG.default,nG.default,iG.default,aG.default,oG.default,sG.default,ZK.default,QK.default,XK.default,eG.default,tG.default];return e?t.push(KK.default,YK.default):t.push(HK.default,GK.default),t.push(JK.default),t}tp.default=lG;var gp={},yp={};Object.defineProperty(yp,"__esModule",{value:!0});const wt=De,cG={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,wt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,wt._)`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:u,errSchemaPath:f,schemaEnv:d,self:p}=l;if(!u.validateFormats)return;i?m():y();function m(){const _=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),w=r.const("fDef",(0,wt._)`${_}[${s}]`),v=r.let("fType"),g=r.let("format");r.if((0,wt._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>r.assign(v,(0,wt._)`${w}.type || "string"`).assign(g,(0,wt._)`${w}.validate`),()=>r.assign(v,(0,wt._)`"string"`).assign(g,w)),e.fail$data((0,wt.or)(C(),S()));function C(){return u.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${g}`}function S(){const E=d.$async?(0,wt._)`(${w}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,wt._)`${g}(${n})`,A=(0,wt._)`(typeof ${g} == "function" ? ${E} : ${g}.test(${n}))`;return(0,wt._)`${g} && ${g} !== true && ${v} === ${t} && !${A}`}}function y(){const _=p.formats[a];if(!_){C();return}if(_===!0)return;const[w,v,g]=S(_);w===t&&e.pass(E());function C(){if(u.strictSchema===!1){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${a}" ignored in schema at path "${f}"`}}function S(A){const x=A instanceof RegExp?(0,wt.regexpCode)(A):u.code.formats?(0,wt._)`${u.code.formats}${(0,wt.getProperty)(a)}`:void 0,N=r.scopeValue("formats",{key:a,ref:A,code:x});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,wt._)`${N}.validate`]:["string",A,N]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!d.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${g}(${n})`}return typeof v=="function"?(0,wt._)`${g}(${n})`:(0,wt._)`${g}.test(${n})`}}}};yp.default=cG,Object.defineProperty(gp,"__esModule",{value:!0});const uG=[yp.default];gp.default=uG;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.contentVocabulary=Pa.metadataVocabulary=void 0,Pa.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Pa.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(jh,"__esModule",{value:!0});const fG=Bh,dG=Wh,hG=tp,pG=gp,iw=Pa,mG=[fG.default,dG.default,(0,hG.default)(),pG.default,iw.metadataVocabulary,iw.contentVocabulary];jh.default=mG;var vp={},Fc={};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.DiscrError=void 0;var aw;(function(e){e.Tag="tag",e.Mapping="mapping"})(aw||(Fc.DiscrError=aw={})),Object.defineProperty(vp,"__esModule",{value:!0});const Ia=De,bp=Fc,ow=er,gG=Ea,yG=ye,vG={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===bp.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ia._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:a}=e,{oneOf:s}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),f=t.const("tag",(0,Ia._)`${r}${(0,Ia.getProperty)(l)}`);t.if((0,Ia._)`typeof ${f} == "string"`,()=>d(),()=>e.error(!1,{discrError:bp.DiscrError.Tag,tag:f,tagName:l})),e.ok(u);function d(){const y=m();t.if(!1);for(const _ in y)t.elseIf((0,Ia._)`${f} === ${_}`),t.assign(u,p(y[_]));t.else(),e.error(!1,{discrError:bp.DiscrError.Mapping,tag:f,tagName:l}),t.endIf()}function p(y){const _=t.name("valid"),w=e.subschema({keyword:"oneOf",schemaProp:y},_);return e.mergeEvaluated(w,Ia.Name),_}function m(){var y;const _={},w=g(i);let v=!0;for(let E=0;E<s.length;E++){let A=s[E];if(A!=null&&A.$ref&&!(0,yG.schemaHasRulesButRef)(A,a.self.RULES)){const N=A.$ref;if(A=ow.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,N),A instanceof ow.SchemaEnv&&(A=A.schema),A===void 0)throw new gG.default(a.opts.uriResolver,a.baseId,N)}const x=(y=A==null?void 0:A.properties)===null||y===void 0?void 0:y[l];if(typeof x!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);v=v&&(w||g(A)),C(x,E)}if(!v)throw new Error(`discriminator: "${l}" must be required`);return _;function g({required:E}){return Array.isArray(E)&&E.includes(l)}function C(E,A){if(E.const)S(E.const,A);else if(E.enum)for(const x of E.enum)S(x,A);else throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}function S(E,A){if(typeof E!="string"||E in _)throw new Error(`discriminator: "${l}" values must be unique strings`);_[E]=A}}}};vp.default=vG;const bG={$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};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=X1,n=jh,i=vp,a=bG,s=["/properties"],l="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(_,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var f=kr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=De;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=Wo;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=Ea;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(bh,bh.exports);var sw=bh.exports;const _G=Qt(sw);var _p={exports:{}},lw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(G,H){return{validate:G,compare:H}}e.fullFormats={date:t(a,s),time:t(u,f),"date-time":t(p,m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:g,int32:{type:"number",validate:E},int64:{type:"number",validate:A},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(G){return G%4===0&&(G%100!==0||G%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(G){const H=n.exec(G);if(!H)return!1;const ee=+H[1],te=+H[2],ae=+H[3];return te>=1&&te<=12&&ae>=1&&ae<=(te===2&&r(ee)?29:i[te])}function s(G,H){if(G&&H)return G>H?1:G<H?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(G,H){const ee=l.exec(G);if(!ee)return!1;const te=+ee[1],ae=+ee[2],Q=+ee[3],k=ee[5];return(te<=23&&ae<=59&&Q<=59||te===23&&ae===59&&Q===60)&&(!H||k!=="")}function f(G,H){if(!(G&&H))return;const ee=l.exec(G),te=l.exec(H);if(ee&&te)return G=ee[1]+ee[2]+ee[3]+(ee[4]||""),H=te[1]+te[2]+te[3]+(te[4]||""),G>H?1:G<H?-1:0}const d=/t|\s/i;function p(G){const H=G.split(d);return H.length===2&&a(H[0])&&u(H[1],!0)}function m(G,H){if(!(G&&H))return;const[ee,te]=G.split(d),[ae,Q]=H.split(d),k=s(ee,ae);if(k!==void 0)return k||f(te,Q)}const y=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(G){return y.test(G)&&_.test(G)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(G){return v.lastIndex=0,v.test(G)}const C=-2147483648,S=2**31-1;function E(G){return Number.isInteger(G)&&G<=S&&G>=C}function A(G){return Number.isInteger(G)}function x(){return!0}const N=/[^\\]\\Z/;function Z(G){if(N.test(G))return!1;try{return new RegExp(G),!0}catch{return!1}}})(lw);var cw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=sw,r=De,n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:l,schemaCode:u})=>r.str`should be ${i[l].okStr} ${u}`,params:({keyword:l,schemaCode:u})=>r._`{comparison: ${i[l].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(l){const{gen:u,data:f,schemaCode:d,keyword:p,it:m}=l,{opts:y,self:_}=m;if(!y.validateFormats)return;const w=new t.KeywordCxt(m,_.RULES.all.format.definition,"format");w.$data?v():g();function v(){const S=u.scopeValue("formats",{ref:_.formats,code:y.code.formats}),E=u.const("fmt",r._`${S}[${w.schemaCode}]`);l.fail$data(r.or(r._`typeof ${E} != "object"`,r._`${E} instanceof RegExp`,r._`typeof ${E}.compare != "function"`,C(E)))}function g(){const S=w.schema,E=_.formats[S];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${p}": format "${S}" does not define "compare" function`);const A=u.scopeValue("formats",{key:S,ref:E,code:y.code.formats?r._`${y.code.formats}${r.getProperty(S)}`:void 0});l.fail$data(C(A))}function C(S){return r._`${S}.compare(${f}, ${d}) ${i[p].fail} 0`}},dependencies:["format"]};const s=l=>(l.addKeyword(e.formatLimitDefinition),l);e.default=s})(cw),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=lw,n=cw,i=De,a=new i.Name("fullFormats"),s=new i.Name("fastFormats"),l=(f,d={keywords:!0})=>{if(Array.isArray(d))return u(f,d,r.fullFormats,a),f;const[p,m]=d.mode==="fast"?[r.fastFormats,s]:[r.fullFormats,a],y=d.formats||r.formatNames;return u(f,y,p,m),d.keywords&&n.default(f),f};l.get=(f,d="full")=>{const m=(d==="fast"?r.fastFormats:r.fullFormats)[f];if(!m)throw new Error(`Unknown format "${f}"`);return m};function u(f,d,p,m){var y,_;(y=(_=f.opts.code).formats)!==null&&y!==void 0||(_.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const w of d)f.addFormat(w,p[w])}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}(_p,_p.exports);var $G=_p.exports;const uw=Qt($G),wG={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},SG=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,CG=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function EG(e,t,r={},n,i=_G){const a=new i({...wG,...r});return n?uw(a,n):n!==!1&&uw(a),a.addFormat("data-url",CG),a.addFormat("color",SG),a.addKeyword(jn),a.addKeyword(Gu),Array.isArray(e)&&a.addMetaSchema(e),Re(t)&&Object.keys(t).forEach(s=>{a.addFormat(s,t[s])}),a}function OG(e=[],t){return e.map(r=>{var n;const{instancePath:i,keyword:a,params:s,schemaPath:l,parentSchema:u,...f}=r;let{message:d=""}=f,p=i.replace(/\//g,"."),m=`${p} ${d}`.trim();const y=[...((n=s.deps)===null||n===void 0?void 0:n.split(", "))||[],s.missingProperty,s.property].filter(_=>_);if(y.length>0)y.forEach(_=>{const w=p?`${p}.${_}`:_;let v=we(de(t,`${w.replace(/^\./,"")}`)).title;if(v===void 0){const g=l.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([_]);v=we(de(t,g)).title}if(v)d=d.replace(`'${_}'`,`'${v}'`);else{const g=de(u,[Ve,_,"title"]);g&&(d=d.replace(`'${_}'`,`'${g}'`))}}),m=d;else{const _=we(de(t,`${p.replace(/^\./,"")}`)).title;if(_)m=`'${_}' ${d}`.trim();else{const w=u==null?void 0:u.title;w&&(m=`'${w}' ${d}`.trim())}}return"missingProperty"in s&&(p=p?`${p}.${s.missingProperty}`:s.missingProperty),{name:a,property:p,message:d,params:s,stack:m,schemaPath:l}})}function AG(e,t,r,n,i,a,s){const{validationError:l}=t;let u=OG(t.errors,s);l&&(u=[...u,{stack:l.message}]),typeof a=="function"&&(u=a(u,s));let f=hR(u);if(l&&(f={...f,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:u,errorSchema:f};const d=d_(e,n,r,n,!0),p=i(d,xs(d),s),m=qd(p);return Pl({errors:u,errorSchema:f},m)}class TG{constructor(t,r){const{additionalMetaSchemas:n,customFormats:i,ajvOptionsOverrides:a,ajvFormatOptions:s,AjvClass:l}=t;this.ajv=EG(n,i,a,s,l),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var n,i;let a,s;t[$t]&&(s=this.ajv.getSchema(t[$t]));try{s===void 0&&(s=this.ajv.compile(t)),s(r)}catch(u){a=u}let l;return s&&(typeof this.localizer=="function"&&(((n=s.errors)!==null&&n!==void 0?n:[]).forEach(u=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=u.params)===null||p===void 0)&&p[d]&&(u.params[d]=`'${u.params[d]}'`)}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(d=>`'${d}'`).join(", "))}),this.localizer(s.errors),((i=s.errors)!==null&&i!==void 0?i:[]).forEach(u=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=u.params)===null||p===void 0)&&p[d]&&(u.params[d]=u.params[d].slice(1,-1))}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(d=>d.slice(1,-1)).join(", "))})),l=s.errors||void 0,s.errors=null),{errors:l,validationError:a}}validateFormData(t,r,n,i,a){const s=this.rawValidation(r,t);return AG(this,s,t,r,n,i,a)}handleSchemaUpdate(t){var r,n;const i=(r=t[$t])!==null&&r!==void 0?r:Vg;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):ht(t,(n=this.ajv.getSchema(i))===null||n===void 0?void 0:n.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,r,n){var i;try{this.handleSchemaUpdate(n);const a=Vd(t),s=(i=a[$t])!==null&&i!==void 0?i:cR(a);let l;return l=this.ajv.getSchema(s),l===void 0&&(l=this.ajv.addSchema(a,s).getSchema(s)||this.ajv.compile(a)),l(r)}catch(a){return console.warn("Error encountered compiling schema:",a),!1}}}function PG(e={},t){return new TG(e,t)}const $p=PG();function IG(e,t){return P_(e,t,function(r,n){return Ly(e,n)})}var fw=L0(function(e,t){return e==null?{}:IG(e,t)});function wp(){return __()}function dw(e){return Array.isArray(e)?e.map(t=>({key:wp(),item:t})):[]}function Yo(e){return Array.isArray(e)?e.map(t=>t.item):[]}class xG extends j.Component{constructor(r){super(r);pe(this,"_getNewFormDataRow",()=>{const{schema:r,registry:n}=this.props,{schemaUtils:i}=n;let a=r.items;return Id(r)&&gO(r)&&(a=r.additionalItems),i.getDefaultFormState(a)});pe(this,"onAddClick",r=>{this._handleAddClick(r)});pe(this,"onAddIndexClick",r=>n=>{this._handleAddClick(n,r)});pe(this,"onCopyIndexClick",r=>n=>{n&&n.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const d in a){const p=parseInt(d);p<=r?Qe(l,[p],a[d]):p>r&&Qe(l,[p+1],a[d])}}const u={key:wp(),item:Sl(s[r].item)},f=[...s];r!==void 0?f.splice(r+1,0,u):f.push(u),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Yo(f),l))});pe(this,"onDropIndexClick",r=>n=>{n&&n.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const f in a){const d=parseInt(f);d<r?Qe(l,[d],a[f]):d>r&&Qe(l,[d-1],a[f])}}const u=s.filter((f,d)=>d!==r);this.setState({keyedFormData:u,updatedKeyedFormData:!0},()=>i(Yo(u),l))});pe(this,"onReorderClick",(r,n)=>i=>{i&&(i.preventDefault(),i.currentTarget.blur());const{onChange:a,errorSchema:s}=this.props;let l;if(s){l={};for(const p in s){const m=parseInt(p);m==r?Qe(l,[n],s[r]):m==n?Qe(l,[r],s[n]):Qe(l,[p],s[m])}}const{keyedFormData:u}=this.state;function f(){const p=u.slice();return p.splice(r,1),p.splice(n,0,u[r]),p}const d=f();this.setState({keyedFormData:d},()=>a(Yo(d),l))});pe(this,"onChangeForIndex",r=>(n,i,a)=>{const{formData:s,onChange:l,errorSchema:u}=this.props,d=(Array.isArray(s)?s:[]).map((p,m)=>r===m?typeof n>"u"?null:n:p);l(d,u&&u&&{...u,[r]:i},a)});pe(this,"onSelectChange",r=>{const{onChange:n,idSchema:i}=this.props;n(r,void 0,i&&i.$id)});const{formData:n=[]}=r,i=dw(n);this.state={keyedFormData:i,updatedKeyedFormData:!1}}static getDerivedStateFromProps(r,n){if(n.updatedKeyedFormData)return{updatedKeyedFormData:!1};const i=Array.isArray(r.formData)?r.formData:[],a=n.keyedFormData||[];return{keyedFormData:i.length===a.length?a.map((l,u)=>({key:l.key,item:i[u]})):dw(i)}}get itemTitle(){const{schema:r,registry:n}=this.props,{translateString:i}=n;return de(r,[Un,"title"],de(r,[Un,"description"],i(Be.ArrayItemTitle)))}isItemRequired(r){return Array.isArray(r.type)?!r.type.includes("null"):r.type!=="null"}canAddItem(r){const{schema:n,uiSchema:i,registry:a}=this.props;let{addable:s}=we(i,a.globalUiOptions);return s!==!1&&(n.maxItems!==void 0?s=r.length<n.maxItems:s=!0),s}_handleAddClick(r,n){r&&r.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const d in a){const p=parseInt(d);n===void 0||p<n?Qe(l,[p],a[d]):p>=n&&Qe(l,[p+1],a[d])}}const u={key:wp(),item:this._getNewFormDataRow()},f=[...s];n!==void 0?f.splice(n,0,u):f.push(u),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Yo(f),l))}render(){const{schema:r,uiSchema:n,idSchema:i,registry:a}=this.props,{schemaUtils:s,translateString:l}=a;if(!(Un in r)){const u=we(n),f=Se("UnsupportedFieldTemplate",a,u);return $.jsx(f,{schema:r,idSchema:i,reason:l(Be.MissingItems),registry:a})}return s.isMultiSelect(r)?this.renderMultiSelect():h_(n)?this.renderCustomWidget():Id(r)?this.renderFixedArray():s.isFilesArray(r,n)?this.renderFiles():this.renderNormalArray()}renderNormalArray(){const{schema:r,uiSchema:n={},errorSchema:i,idSchema:a,name:s,title:l,disabled:u=!1,readonly:f=!1,autofocus:d=!1,required:p=!1,registry:m,onBlur:y,onFocus:_,idPrefix:w,idSeparator:v="_",rawErrors:g}=this.props,{keyedFormData:C}=this.state,S=r.title||l||s,{schemaUtils:E,formContext:A}=m,x=we(n),N=Re(r.items)?r.items:{},Z=E.retrieveSchema(N),G=Yo(this.state.keyedFormData),H=this.canAddItem(G),ee={canAdd:H,items:C.map((ae,Q)=>{const{key:k,item:W}=ae,R=W,U=E.retrieveSchema(N,R),J=i?i[Q]:void 0,L=a.$id+v+Q,D=E.toIdSchema(U,L,R,w,v);return this.renderArrayFieldItem({key:k,index:Q,name:s&&`${s}-${Q}`,title:S?`${S}-${Q+1}`:void 0,canAdd:H,canMoveUp:Q>0,canMoveDown:Q<G.length-1,itemSchema:U,itemIdSchema:D,itemErrorSchema:J,itemData:R,itemUiSchema:n.items,autofocus:d&&Q===0,onBlur:y,onFocus:_,rawErrors:g,totalItems:C.length})}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}`,disabled:u,idSchema:a,uiSchema:n,onAddClick:this.onAddClick,readonly:f,required:p,schema:r,title:S,formContext:A,formData:G,rawErrors:g,registry:m},te=Se("ArrayFieldTemplate",m,x);return $.jsx(te,{...ee})}renderCustomWidget(){const{schema:r,idSchema:n,uiSchema:i,disabled:a=!1,readonly:s=!1,autofocus:l=!1,required:u=!1,hideError:f,placeholder:d,onBlur:p,onFocus:m,formData:y=[],registry:_,rawErrors:w,name:v}=this.props,{widgets:g,formContext:C,globalUiOptions:S,schemaUtils:E}=_,{widget:A,title:x,...N}=we(i,S),Z=Qr(r,A,g),G=x??r.title??v,H=E.getDisplayLabel(r,i,S);return $.jsx(Z,{id:n.$id,name:v,multiple:!0,onChange:this.onSelectChange,onBlur:p,onFocus:m,options:N,schema:r,uiSchema:i,registry:_,value:y,disabled:a,readonly:s,hideError:f,required:u,label:G,hideLabel:!H,placeholder:d,formContext:C,autofocus:l,rawErrors:w})}renderMultiSelect(){const{schema:r,idSchema:n,uiSchema:i,formData:a=[],disabled:s=!1,readonly:l=!1,autofocus:u=!1,required:f=!1,placeholder:d,onBlur:p,onFocus:m,registry:y,rawErrors:_,name:w}=this.props,{widgets:v,schemaUtils:g,formContext:C,globalUiOptions:S}=y,E=g.retrieveSchema(r.items,a),A=ua(E,i),{widget:x="select",title:N,...Z}=we(i,S),G=Qr(r,x,v),H=N??r.title??w,ee=g.getDisplayLabel(r,i,S);return $.jsx(G,{id:n.$id,name:w,multiple:!0,onChange:this.onSelectChange,onBlur:p,onFocus:m,options:{...Z,enumOptions:A},schema:r,uiSchema:i,registry:y,value:a,disabled:s,readonly:l,required:f,label:H,hideLabel:!ee,placeholder:d,formContext:C,autofocus:u,rawErrors:_})}renderFiles(){const{schema:r,uiSchema:n,idSchema:i,name:a,disabled:s=!1,readonly:l=!1,autofocus:u=!1,required:f=!1,onBlur:d,onFocus:p,registry:m,formData:y=[],rawErrors:_}=this.props,{widgets:w,formContext:v,globalUiOptions:g,schemaUtils:C}=m,{widget:S="files",title:E,...A}=we(n,g),x=Qr(r,S,w),N=E??r.title??a,Z=C.getDisplayLabel(r,n,g);return $.jsx(x,{options:A,id:i.$id,name:a,multiple:!0,onChange:this.onSelectChange,onBlur:d,onFocus:p,schema:r,uiSchema:n,value:y,disabled:s,readonly:l,required:f,registry:m,formContext:v,autofocus:u,rawErrors:_,label:N,hideLabel:!Z})}renderFixedArray(){const{schema:r,uiSchema:n={},formData:i=[],errorSchema:a,idPrefix:s,idSeparator:l="_",idSchema:u,name:f,title:d,disabled:p=!1,readonly:m=!1,autofocus:y=!1,required:_=!1,registry:w,onBlur:v,onFocus:g,rawErrors:C}=this.props,{keyedFormData:S}=this.state;let{formData:E=[]}=this.props;const A=r.title||d||f,x=we(n),{schemaUtils:N,formContext:Z}=w,H=(Re(r.items)?r.items:[]).map((k,W)=>N.retrieveSchema(k,i[W])),ee=Re(r.additionalItems)?N.retrieveSchema(r.additionalItems,i):null;(!E||E.length<H.length)&&(E=E||[],E=E.concat(new Array(H.length-E.length)));const te=this.canAddItem(E)&&!!ee,ae={canAdd:te,className:"rjsf-field rjsf-field-array rjsf-field-array-fixed-items",disabled:p,idSchema:u,formData:i,items:S.map((k,W)=>{const{key:R,item:U}=k,J=U,L=W>=H.length,D=(L&&Re(r.additionalItems)?N.retrieveSchema(r.additionalItems,J):H[W])||{},z=u.$id+l+W,B=N.toIdSchema(D,z,J,s,l),P=L?n.additionalItems||{}:Array.isArray(n.items)?n.items[W]:n.items||{},F=a?a[W]:void 0;return this.renderArrayFieldItem({key:R,index:W,name:f&&`${f}-${W}`,title:A?`${A}-${W+1}`:void 0,canAdd:te,canRemove:L,canMoveUp:W>=H.length+1,canMoveDown:L&&W<E.length-1,itemSchema:D,itemData:J,itemUiSchema:P,itemIdSchema:B,itemErrorSchema:F,autofocus:y&&W===0,onBlur:v,onFocus:g,rawErrors:C,totalItems:S.length})}),onAddClick:this.onAddClick,readonly:m,required:_,registry:w,schema:r,uiSchema:n,title:A,formContext:Z,errorSchema:a,rawErrors:C},Q=Se("ArrayFieldTemplate",w,x);return $.jsx(Q,{...ae})}renderArrayFieldItem(r){const{key:n,index:i,name:a,canAdd:s,canRemove:l=!0,canMoveUp:u,canMoveDown:f,itemSchema:d,itemData:p,itemUiSchema:m,itemIdSchema:y,itemErrorSchema:_,autofocus:w,onBlur:v,onFocus:g,rawErrors:C,totalItems:S,title:E}=r,{disabled:A,hideError:x,idPrefix:N,idSeparator:Z,readonly:G,uiSchema:H,registry:ee,formContext:te}=this.props,{fields:{ArraySchemaField:ae,SchemaField:Q},globalUiOptions:k}=ee,W=ae||Q,{orderable:R=!0,removable:U=!0,copyable:J=!1}=we(H,k),L={moveUp:R&&u,moveDown:R&&f,copy:J&&s,remove:U&&l,toolbar:!1};return L.toolbar=Object.keys(L).some(D=>L[D]),{children:$.jsx(W,{name:a,title:E,index:i,schema:d,uiSchema:m,formData:p,formContext:te,errorSchema:_,idPrefix:N,idSeparator:Z,idSchema:y,required:this.isItemRequired(d),onChange:this.onChangeForIndex(i),onBlur:v,onFocus:g,registry:ee,disabled:A,readonly:G,hideError:x,autofocus:w,rawErrors:C}),buttonsProps:{idSchema:y,disabled:A,readonly:G,canAdd:s,hasCopy:L.copy,hasMoveUp:L.moveUp,hasMoveDown:L.moveDown,hasRemove:L.remove,index:i,totalItems:S,onAddIndexClick:this.onAddIndexClick,onCopyIndexClick:this.onCopyIndexClick,onDropIndexClick:this.onDropIndexClick,onReorderClick:this.onReorderClick,registry:ee,schema:d,uiSchema:m},className:"rjsf-array-item",disabled:A,hasToolbar:L.toolbar,index:i,totalItems:S,key:n,readonly:G,registry:ee,schema:d,uiSchema:m}}}function DG(e){const{schema:t,name:r,uiSchema:n,idSchema:i,formData:a,registry:s,required:l,disabled:u,readonly:f,hideError:d,autofocus:p,title:m,onChange:y,onFocus:_,onBlur:w,rawErrors:v}=e,{title:g}=t,{widgets:C,formContext:S,translateString:E,globalUiOptions:A}=s,{widget:x="checkbox",title:N,label:Z=!0,enumNames:G,...H}=we(n,A),ee=Qr(t,x,C),te=E(Be.YesLabel),ae=E(Be.NoLabel);let Q;const k=N??g??m??r;if(Array.isArray(t.oneOf))Q=ua({oneOf:t.oneOf.map(W=>{if(Re(W))return{...W,title:W.title||(W.const===!0?te:ae)}}).filter(W=>W)},n);else{const W=t.enum??[!0,!1];!G&&W.length===2&&W.every(R=>typeof R=="boolean")?Q=[{value:W[0],label:W[0]?te:ae},{value:W[1],label:W[1]?te:ae}]:Q=ua({enum:W},n)}return $.jsx(ee,{options:{...H,enumOptions:Q},schema:t,uiSchema:n,id:i.$id,name:r,onChange:y,onFocus:_,onBlur:w,label:k,hideLabel:!Z,value:a,required:l,disabled:u,readonly:f,hideError:d,registry:s,formContext:S,autofocus:p,rawErrors:v})}function FG(e,t){return Hi(t,function(r){return e[r]})}function NG(e){return e==null?[]:FG(e,Fr(e))}var MG=Math.max;function kG(e,t,r,n){e=di(e)?e:NG(e),r=r?Py(r):0;var i=e.length;return r<0&&(r=MG(i+r,0)),br(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Jy(e,t,r)>-1}var LG=Math.min;function jG(e,t,r){for(var n=wf,i=e[0].length,a=e.length,s=a,l=Array(a),u=1/0,f=[];s--;){var d=e[s];u=LG(d.length,u),l[s]=i>=120&&d.length>=120?new ui(s&&d):void 0}d=e[0];var p=-1,m=l[0];e:for(;++p<i&&f.length<u;){var y=d[p],_=y;if(y=y!==0?y:0,!(m?eo(m,_):n(f,_))){for(s=a;--s;){var w=l[s];if(!(w?eo(w,_):n(e[s],_)))continue e}m&&m.push(_),f.push(y)}}return f}function BG(e){return ao(e)?e:[]}var hw=Ws(function(e){var t=Hi(e,BG);return t.length&&t[0]===e[0]?jG(t):[]});function pw(e){return e===void 0}var sn;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(sn||(sn={}));var Jo;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Jo||(Jo={}));const UG=/^\$lookup=(.+)/,Sp="layoutGrid";function mw(e,t){return e??t}const vt=class vt extends j.PureComponent{constructor(r){super(r);pe(this,"onFieldChange",r=>(n,i,a)=>{const{onChange:s,errorSchema:l,formData:u}=this.props,f=Sl(u||{});let d=l;i&&l&&(d=Sl(l),Qe(d,r,i)),Qe(f,r,n),s(f,d,a)})}static computeFieldUiSchema(r,n,i,a,s){const l=de(i,[Ju],{}),u=de(i,r),f={...de(u,[zr],{}),...n,...l},d={...u};Ut(f)||Qe(d,[zr],f),Ut(l)||Qe(d,[Ju],l);let{readonly:p}=we(d);return(s===!0||pw(p)&&a===!0)&&(p=!0,We(f,Ku)?Qe(d,[zr,Ku],!0):Qe(d,`ui:${Ku}`,!0)),{fieldUiSchema:d,uiReadonly:p}}static conditionMatches(r,n,i="$0m3tH1nG Un3xP3cT3d"){const a=_d([n]).sort(),s=_d([i]).sort();switch(r){case Jo.ALL:return Oy(a,s);case Jo.SOME:return hw(a,s).length>0;case Jo.NONE:return hw(a,s).length===0;default:return!1}}static findChildrenAndProps(r,n,i){let a={},s=r[n];if(Wn(s)){const{children:l,className:u,...f}=s;if(s=l,u){const p=u.split(" ").map(m=>Wd(i,m,m)).join(" ");a={...f,className:p}}else a=f}if(!Array.isArray(s))throw new TypeError(`Expected array for "${n}" in ${JSON.stringify(r)}`);return{children:s,gridProps:a}}static getIdSchema(r,n,i,a={},s){const l=de(n,$t);return r.toIdSchema(a,l,i,l,s)}static getSchemaDetailsForField(r,n,i,a,s,l){let u=i,f=s;const d=n.split("."),p=d.pop();let m=r.retrieveSchema(u,a),y=a,_=m.readOnly;d.forEach(g=>{if(We(m,Ve))u=de(m,[Ve,g],{}),f=de(f,g,{});else if(m&&(We(m,Ze)||We(m,gt))){const C=We(m,Ze)?Ze:gt,S=r.findSelectedOptionInXxxOf(m,g,C,y),E=vt.getIdSchema(r,f,a,S,l);u=de(S,[Ve,g],{}),f=de(E,g,{})}else u={};y=de(y,g,{}),m=r.retrieveSchema(u,y),_=mw(m.readOnly,_)});let w,v=!1;if(Ut(m)&&(m=void 0),m&&p){if(m&&(We(m,Ze)||We(m,gt))){const g=We(m,Ze)?Ze:gt;m=r.findSelectedOptionInXxxOf(m,p,g,y);const C=vt.getIdSchema(r,f,a,m,l);f=vn(C,f)}if(v=m!==void 0&&Array.isArray(m.required)&&kG(m.required,p),m=de(m,[Ve,p]),m=m&&r.retrieveSchema(m),f=de(f,p,{}),_=mw(m==null?void 0:m.readOnly,_),m&&(We(m,Ze)||We(m,gt))){const g=We(m,Ze)?Ze:gt,C=Xr(m);w={options:m[g],hasDiscriminator:!!C}}}return{schema:m,isRequired:v,isReadonly:_,optionsInfo:w,idSchema:f}}static getCustomRenderComponent(r,n){let i=r;return br(i)&&(i=Wd(n,i)),Xa(i)?i:null}static computeUIComponentPropsFromGridSchema(r,n){let i,a=null,s={},l;if(br(n)||pw(n))i=n??"";else{const{name:u="",render:f,...d}=n;i=u,s=d,Ut(s)||I_(s,(p,m)=>{if(br(p)){const y=UG.exec(p);if(Array.isArray(y)&&y.length>1){const _=y[1];s[m]=Wd(r,_,_)}}}),a=vt.getCustomRenderComponent(f,r),!u&&a&&(l=$.jsx(a,{...d,"data-testid":vt.TEST_IDS.uiComponent}))}return{name:i,UIComponent:a,uiProps:s,rendered:l}}renderCondition(r){const{formData:n,registry:i}=this.props,{children:a,gridProps:s}=vt.findChildrenAndProps(r,sn.CONDITION,i),{operator:l,field:u="",value:f}=s,d=de(n,u,null);return vt.conditionMatches(l,d,f)?this.renderChildren(a):null}renderCol(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=vt.findChildrenAndProps(r,sn.COLUMN,n),l=we(i),u=Se("GridTemplate",n,l);return $.jsx(u,{column:!0,"data-testid":vt.TEST_IDS.col,...s,children:this.renderChildren(a)})}renderColumns(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=vt.findChildrenAndProps(r,sn.COLUMNS,n),l=we(i),u=Se("GridTemplate",n,l);return a.map(f=>$.jsx(u,{column:!0,"data-testid":vt.TEST_IDS.col,...s,children:this.renderChildren([f])},`column-${$i(f)}`))}renderRow(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=vt.findChildrenAndProps(r,sn.ROW,n),l=we(i),u=Se("GridTemplate",n,l);return $.jsx(u,{...s,"data-testid":vt.TEST_IDS.row,children:this.renderChildren(a)})}renderChildren(r){const{registry:n,schema:i,formData:a}=this.props,{schemaUtils:s}=n,l=s.retrieveSchema(i,a);return r.map(u=>j.createElement(vt,{...this.props,key:`layoutGrid-${$i(u)}`,schema:l,layoutGridSchema:u}))}renderField(r){const{schema:n,uiSchema:i,errorSchema:a,idSchema:s,onBlur:l,onFocus:u,formData:f,readonly:d,registry:p,idSeparator:m,layoutGridSchema:y,..._}=this.props,{fields:w,schemaUtils:v}=p,{SchemaField:g,LayoutMultiSchemaField:C}=w,S=vt.computeUIComponentPropsFromGridSchema(p,r);if(S.rendered)return S.rendered;const{name:E,UIComponent:A,uiProps:x}=S,{schema:N,isRequired:Z,isReadonly:G,optionsInfo:H,idSchema:ee}=vt.getSchemaDetailsForField(v,E,n,f,s,m);if(N){const te=H!=null&&H.hasDiscriminator?C:g,{fieldUiSchema:ae,uiReadonly:Q}=vt.computeFieldUiSchema(E,x,i,G,d);return $.jsx(te,{"data-testid":H!=null&&H.hasDiscriminator?vt.TEST_IDS.layoutMultiSchemaField:vt.TEST_IDS.field,..._,name:E,required:Z,readonly:Q,schema:N,uiSchema:ae,errorSchema:de(a,E),idSchema:ee,idSeparator:m,formData:de(f,E),onChange:this.onFieldChange(E),onBlur:l,onFocus:u,options:H==null?void 0:H.options,registry:p})}return A?$.jsx(A,{"data-testid":vt.TEST_IDS.uiComponent,..._,name:E,required:Z,formData:f,readOnly:!!G||d,errorSchema:a,uiSchema:i,schema:n,idSchema:s,idSeparator:m,onBlur:l,onFocus:u,registry:p,...x}):null}render(){const{uiSchema:r}=this.props;let{layoutGridSchema:n}=this.props;const i=we(r);if(!n&&Sp in i&&Re(i[Sp])&&(n=i[Sp]),Re(n)){if(sn.ROW in n)return this.renderRow(n);if(sn.COLUMN in n)return this.renderCol(n);if(sn.COLUMNS in n)return this.renderColumns(n);if(sn.CONDITION in n)return this.renderCondition(n)}return this.renderField(n)}};pe(vt,"defaultProps",{layoutGridSchema:void 0}),pe(vt,"TEST_IDS",$_());let Cp=vt;function WG(e){const{idSchema:t,title:r,schema:n,uiSchema:i,required:a,registry:s,name:l}=e,u=we(i,s.globalUiOptions),{title:f}=u,{title:d}=n,p=f||r||d||l;if(!p)return null;const m=Se("TitleFieldTemplate",s,u);return $.jsx(m,{id:Cl(t),title:p,required:a,schema:n,uiSchema:i,registry:s})}function Ep(e,t,r){const n="!@#!@$@#$!@$#";return e.map(({schema:a})=>a).find(a=>{const s=de(a,[Ve,t]);return de(s,Es,de(s,pr,n))===r})}function gw(e,t,r,n,i){const a=t.map(u=>r.retrieveSchema(u,i));let s=e;We(e,Ze)?s={...e,[Ze]:a}:We(e,gt)&&(s={...e,[gt]:a});const l=ua(s,n);if(!l)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(s)}`);return l}function qG(e){var me;const{name:t,baseType:r,disabled:n=!1,formData:i,idSchema:a,onBlur:s,onChange:l,options:u,onFocus:f,registry:d,uiSchema:p,schema:m,formContext:y,autofocus:_,readonly:w,required:v,errorSchema:g,hideError:C=!1}=e,{widgets:S,schemaUtils:E,globalUiOptions:A}=d,[x,N]=j.useState(gw(m,u,E,p,i)),Z=de(a,$t),G=Xr(m),H=Se("FieldErrorTemplate",d,u),ee=Se("FieldTemplate",d,u),te=$i(m),ae=$i(u),Q=p?$i(p):"",k=i?$i(i):"";j.useEffect(()=>{N(gw(m,u,E,p,i))},[te,ae,E,Q,k]);const{widget:W=G?"radio":"select",title:R="",placeholder:U="",optionsSchemaSelector:J=G,hideError:L,...D}=we(p);if(!J)throw new Error("No selector field provided for the LayoutMultiSchemaField");const z=de(i,J);let B=de((me=x[0])==null?void 0:me.schema,[Ve,J],{});const P=Ep(x,J,z);B=B!=null&&B.type?B:{...B,type:(P==null?void 0:P.type)||r};const F=Qr(B,W,S),V=L===void 0?C:!!L,X=de(g,[Ht],[]),oe=yo(g,[Ht]),ue=E.getDisplayLabel(m,p,A),he=Pt=>{const Vt=Ep(x,J,Pt),It=Ep(x,J,z);let sr=E.sanitizeDataForNewSchema(Vt,It,i);sr&&Vt&&(sr=E.getDefaultFormState(Vt,sr,"excludeObjectChildren")),sr&&Qe(sr,J,Pt),l(sr,void 0,Z)},be={enumOptions:x,...D},Le=!V&&X.length>0?$.jsx(H,{idSchema:a,schema:m,errors:X,registry:d}):void 0,ut=Pt=>Xy;return $.jsx(ee,{id:Z,schema:m,label:(R||m.title)??"",disabled:n||Array.isArray(x)&&Ut(x),uiSchema:p,formContext:y,required:v,readonly:!!w,registry:d,displayLabel:ue,errors:Le,onChange:l,onDropPropertyClick:ut,onKeyChange:ut,children:$.jsx(F,{id:Z,name:t,schema:m,label:(R||m.title)??"",disabled:n||Array.isArray(x)&&Ut(x),uiSchema:p,formContext:y,autofocus:_,readonly:w,required:v,registry:d,multiple:!1,rawErrors:X,hideError:V,hideLabel:!ue,errorSchema:oe,placeholder:U,onChange:he,onBlur:s,onFocus:f,value:z,options:be})})}class yw extends j.Component{constructor(r){super(r);pe(this,"onOptionChange",r=>{const{selectedOption:n,retrievedOptions:i}=this.state,{formData:a,onChange:s,registry:l}=this.props,{schemaUtils:u}=l,f=r!==void 0?parseInt(r,10):-1;if(f===n)return;const d=f>=0?i[f]:void 0,p=n>=0?i[n]:void 0;let m=u.sanitizeDataForNewSchema(d,p,a);d&&(m=u.getDefaultFormState(d,m,"excludeObjectChildren")),this.setState({selectedOption:f},()=>{s(m,void 0,this.getFieldId())})});const{formData:n,options:i,registry:{schemaUtils:a}}=this.props,s=i.map(l=>a.retrieveSchema(l,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(r,n){const{formData:i,options:a,idSchema:s}=this.props,{selectedOption:l}=this.state;let u=this.state;if(!ht(r.options,a)){const{registry:{schemaUtils:f}}=this.props,d=a.map(p=>f.retrieveSchema(p,i));u={selectedOption:l,retrievedOptions:d}}if(!ht(i,r.formData)&&s.$id===r.idSchema.$id){const{retrievedOptions:f}=u,d=this.getMatchingOption(l,i,f);n&&d!==l&&(u={selectedOption:d,retrievedOptions:f})}u!==this.state&&this.setState(u)}getMatchingOption(r,n,i){const{schema:a,registry:{schemaUtils:s}}=this.props,l=Xr(a);return s.getClosestMatchingOption(n,i,r,l)}getFieldId(){const{idSchema:r,schema:n}=this.props;return`${r.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:r,disabled:n=!1,errorSchema:i={},formContext:a,onBlur:s,onFocus:l,readonly:u,registry:f,schema:d,uiSchema:p}=this.props,{widgets:m,fields:y,translateString:_,globalUiOptions:w,schemaUtils:v}=f,{SchemaField:g}=y,C=Se("MultiSchemaFieldTemplate",f,w),{selectedOption:S,retrievedOptions:E}=this.state,{widget:A="select",placeholder:x,autofocus:N,autocomplete:Z,title:G=d.title,...H}=we(p,w),ee=Qr({type:"number"},A,m),te=de(i,Ht,[]),ae=yo(i,[Ht]),Q=v.getDisplayLabel(d,p,w),k=S>=0&&E[S]||null;let W;if(k){const{required:P}=d;W=P?yn({required:P},k):k}let R=[];Ze in d&&p&&Ze in p?Array.isArray(p[Ze])?R=p[Ze]:console.warn(`uiSchema.oneOf is not an array for "${G||r}"`):gt in d&&p&&gt in p&&(Array.isArray(p[gt])?R=p[gt]:console.warn(`uiSchema.anyOf is not an array for "${G||r}"`));let U=p;S>=0&&R.length>S&&(U=R[S]);const J=G?Be.TitleOptionPrefix:Be.OptionPrefix,L=G?[G]:[],D=E.map((P,F)=>{const{title:V=P.title}=we(R[F]);return{label:V||_(J,L.concat(String(F+1))),value:F}}),z=$.jsx(ee,{id:this.getFieldId(),name:`${r}${d.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:l,disabled:n||Ut(D),multiple:!1,rawErrors:te,errorSchema:ae,value:S>=0?S:void 0,options:{enumOptions:D,...H},registry:f,formContext:a,placeholder:x,autocomplete:Z,autofocus:N,label:G??r,hideLabel:!Q,readonly:u}),B=W&&W.type!=="null"&&$.jsx(g,{...this.props,schema:W,uiSchema:U})||null;return $.jsx(C,{schema:d,registry:f,uiSchema:p,selector:z,optionSchemaField:B})}}const VG=/\.([0-9]*0)*$/,RG=/[0.]0*$/;function zG(e){const{registry:t,onChange:r,formData:n,value:i}=e,[a,s]=j.useState(i),{StringField:l}=t.fields;let u=n;const f=j.useCallback((d,p,m)=>{s(d),`${d}`.charAt(0)==="."&&(d=`0${d}`);const y=typeof d=="string"&&d.match(VG)?Ug(d.replace(RG,"")):Ug(d);r(y,p,m)},[r]);if(typeof a=="string"&&typeof u=="number"){const d=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);a.match(d)&&(u=a)}return $.jsx(l,{...e,formData:u,onChange:f})}function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pi.apply(this,arguments)}const HG=["children","options"],vw=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),bw={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},KG=["style","script","pre"],GG=["src","href","data","formAction","srcDoc","action"],YG=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,JG=/mailto:/i,XG=/\n{2,}$/,_w=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ZG=/^ *> ?/gm,QG=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,eY=/^ {2,}\n/,tY=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,$w=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,ww=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,rY=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,nY=/^(?:\n *)*\n/,iY=/\r\n?/g,aY=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,oY=/^\[\^([^\]]+)]/,sY=/\f/g,lY=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,cY=/^\s*?\[(x|\s)\]/,Sw=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Cw=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ew=/^([^\n]+)\n *(=|-){3,} *\n/,Op=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,uY=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ow=/^<!--[\s\S]*?(?:-->)/,fY=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ap=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,dY=/^\{.*\}$/,hY=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,pY=/^<([^ >]+@[^ >]+)>/,mY=/^<([^ >]+:\/[^ >]+)>/,gY=/-([a-z])?/gi,Aw=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,yY=/^[^\n]+(?: \n|\n{2,})/,vY=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,bY=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,_Y=/^\[([^\]]*)\] ?\[([^\]]*)\]/,$Y=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,wY=/\t/g,SY=/(^ *\||\| *$)/g,CY=/^ *:-+: *$/,EY=/^ *:-+ *$/,OY=/^ *-+: *$/,Nc=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,Mc="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",AY=RegExp(`^([*_])\\1${Nc(1)}${Mc}\\1\\1(?!\\1)`),TY=RegExp(`^([*_])${Nc(0)}${Mc}\\1(?!\\1)`),PY=RegExp(`^(==)${Nc(0)}${Mc}\\1`),IY=RegExp(`^(~~)${Nc(0)}${Mc}\\1`),xY=/^(:[a-zA-Z0-9-_]+:)/,DY=/^\\([^0-9A-Za-z\s])/,FY=/\\([^0-9A-Za-z\s])/g,NY=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,MY=/^\n+/,kY=/^([ \t]*)/,LY=/(?:^|\n)( *)$/,Tp="(?:\\d+\\.)",Pp="(?:[*+-])";function Tw(e){return"( *)("+(e===1?Tp:Pp)+") +"}const Pw=Tw(1),Iw=Tw(2);function xw(e){return RegExp("^"+(e===1?Pw:Iw))}const jY=xw(1),BY=xw(2);function Dw(e){return RegExp("^"+(e===1?Pw:Iw)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Tp:Pp)+" )[^\\n]*)*(\\n|$)","gm")}const UY=Dw(1),WY=Dw(2);function Fw(e){const t=e===1?Tp:Pp;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Nw=Fw(1),Mw=Fw(2);function kw(e,t){const r=t===1,n=r?Nw:Mw,i=r?UY:WY,a=r?jY:BY;return{t:s=>a.test(s),o:xa(function(s,l){const u=LY.exec(l.prevCapture);return u&&(l.list||!l.inline&&!l.simple)?n.exec(s=u[1]+s):null}),i:1,u(s,l,u){const f=r?+s[2]:void 0,d=s[0].replace(XG,`
115
+ deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[f,d]=a(u);s(u,f),l(u,d)}};function a({schema:u}){const f={},d={};for(const p in u){if(p==="__proto__")continue;const m=Array.isArray(u[p])?f:d;m[p]=u[p]}return[f,d]}function s(u,f=u.schema){const{gen:d,data:p,it:m}=u;if(Object.keys(f).length===0)return;const y=d.let("missing");for(const _ in f){const w=f[_];if(w.length===0)continue;const v=(0,n.propertyInData)(d,p,_,m.opts.ownProperties);u.setParams({property:_,depsCount:w.length,deps:w.join(", ")}),m.allErrors?d.if(v,()=>{for(const g of w)(0,n.checkReportMissingProp)(u,g)}):(d.if((0,t._)`${v} && (${(0,n.checkMissingProp)(u,w,y)})`),(0,n.reportMissingProp)(u,y),d.else())}}e.validatePropertyDeps=s;function l(u,f=u.schema){const{gen:d,data:p,keyword:m,it:y}=u,_=d.name("valid");for(const w in f)(0,r.alwaysValidSchema)(y,f[w])||(d.if((0,n.propertyInData)(d,p,w,y.opts.ownProperties),()=>{const v=u.subschema({keyword:m,schemaProp:w},_);u.mergeValidEvaluated(v,_)},()=>d.var(_,!0)),u.ok(_))}e.validateSchemaDeps=l,e.default=i})(Y$);var sp={};Object.defineProperty(sp,"__esModule",{value:!0});const J$=De,PK=ye,IK={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,J$._)`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,PK.alwaysValidSchema)(i,r))return;const a=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,J$.not)(a),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(a)}};sp.default=IK;var Ac={};Object.defineProperty(Ac,"__esModule",{value:!0});const Tc=Me,Br=De,xK=an,Pc=ye,DK={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,Br._)`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:l,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,Pc.alwaysValidSchema)(s,r))return;const f=(0,Tc.allSchemaProperties)(n.properties),d=(0,Tc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Br._)`${a} === ${xK.default.errors}`);function p(){t.forIn("key",i,v=>{!f.length&&!d.length?_(v):t.if(m(v),()=>_(v))})}function m(v){let g;if(f.length>8){const C=(0,Pc.schemaRefOrVal)(s,n.properties,"properties");g=(0,Tc.isOwnProperty)(t,C,v)}else f.length?g=(0,Br.or)(...f.map(C=>(0,Br._)`${v} === ${C}`)):g=Br.nil;return d.length&&(g=(0,Br.or)(g,...d.map(C=>(0,Br._)`${(0,Tc.usePattern)(e,C)}.test(${v})`))),(0,Br.not)(g)}function y(v){t.code((0,Br._)`delete ${i}[${v}]`)}function _(v){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){y(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),l||t.break();return}if(typeof r=="object"&&!(0,Pc.alwaysValidSchema)(s,r)){const g=t.name("valid");u.removeAdditional==="failing"?(w(v,g,!1),t.if((0,Br.not)(g),()=>{e.reset(),y(v)})):(w(v,g),l||t.if((0,Br.not)(g),()=>t.break()))}}function w(v,g,C){const S={keyword:"additionalProperties",dataProp:v,dataPropType:Pc.Type.Str};C===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,g)}}};Ac.default=DK;var lp={};Object.defineProperty(lp,"__esModule",{value:!0});const FK=kr,X$=Me,cp=ye,Z$=Ac,NK={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Z$.default.code(new FK.KeywordCxt(a,Z$.default,"additionalProperties"));const s=(0,X$.allSchemaProperties)(r);for(const p of s)a.definedProperties.add(p);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=cp.mergeEvaluated.props(t,(0,cp.toHash)(s),a.props));const l=s.filter(p=>!(0,cp.alwaysValidSchema)(a,r[p]));if(l.length===0)return;const u=t.name("valid");for(const p of l)f(p)?d(p):(t.if((0,X$.propertyInData)(t,i,p,a.opts.ownProperties)),d(p),a.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(u);function f(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};lp.default=NK;var up={};Object.defineProperty(up,"__esModule",{value:!0});const Q$=Me,Ic=De,ew=ye,tw=ye,MK={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:a}=e,{opts:s}=a,l=(0,Q$.allSchemaProperties)(r),u=l.filter(w=>(0,ew.alwaysValidSchema)(a,r[w]));if(l.length===0||u.length===l.length&&(!a.opts.unevaluated||a.props===!0))return;const f=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=t.name("valid");a.props!==!0&&!(a.props instanceof Ic.Name)&&(a.props=(0,tw.evaluatedPropsToName)(t,a.props));const{props:p}=a;m();function m(){for(const w of l)f&&y(w),a.allErrors?_(w):(t.var(d,!0),_(w),t.if(d))}function y(w){for(const v in f)new RegExp(w).test(v)&&(0,ew.checkStrictMode)(a,`property ${v} matches pattern ${w} (use allowMatchingProperties)`)}function _(w){t.forIn("key",n,v=>{t.if((0,Ic._)`${(0,Q$.usePattern)(e,w)}.test(${v})`,()=>{const g=u.includes(w);g||e.subschema({keyword:"patternProperties",schemaProp:w,dataProp:v,dataPropType:tw.Type.Str},d),a.opts.unevaluated&&p!==!0?t.assign((0,Ic._)`${p}[${v}]`,!0):!g&&!a.allErrors&&t.if((0,Ic.not)(d),()=>t.break())})})}}};up.default=MK;var fp={};Object.defineProperty(fp,"__esModule",{value:!0});const kK=ye,LK={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,kK.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};fp.default=LK;var dp={};Object.defineProperty(dp,"__esModule",{value:!0});const jK={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Me.validateUnion,error:{message:"must match a schema in anyOf"}};dp.default=jK;var hp={};Object.defineProperty(hp,"__esModule",{value:!0});const xc=De,BK=ye,UK={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,xc._)`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const a=r,s=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(f),e.result(s,()=>e.reset(),()=>e.error(!0));function f(){a.forEach((d,p)=>{let m;(0,BK.alwaysValidSchema)(i,d)?t.var(u,!0):m=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&t.if((0,xc._)`${u} && ${s}`).assign(s,!1).assign(l,(0,xc._)`[${l}, ${p}]`).else(),t.if(u,()=>{t.assign(s,!0),t.assign(l,p),m&&e.mergeEvaluated(m,xc.Name)})})}}};hp.default=UK;var pp={};Object.defineProperty(pp,"__esModule",{value:!0});const WK=ye,qK={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((a,s)=>{if((0,WK.alwaysValidSchema)(n,a))return;const l=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(l)})}};pp.default=qK;var mp={};Object.defineProperty(mp,"__esModule",{value:!0});const Dc=De,rw=ye,VK={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,Dc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Dc._)`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,rw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=nw(n,"then"),a=nw(n,"else");if(!i&&!a)return;const s=t.let("valid",!0),l=t.name("_valid");if(u(),e.reset(),i&&a){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(l,f("then",d),f("else",d))}else i?t.if(l,f("then")):t.if((0,Dc.not)(l),f("else"));e.pass(s,()=>e.error(!0));function u(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(d)}function f(d,p){return()=>{const m=e.subschema({keyword:d},l);t.assign(s,l),e.mergeValidEvaluated(m,s),p?t.assign(p,(0,Dc._)`${d}`):e.setParams({ifClause:d})}}}};function nw(e,t){const r=e.schema[t];return r!==void 0&&!(0,rw.alwaysValidSchema)(e,r)}mp.default=VK;var gp={};Object.defineProperty(gp,"__esModule",{value:!0});const RK=ye,zK={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,RK.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};gp.default=zK,Object.defineProperty(rp,"__esModule",{value:!0});const HK=Aa,KK=ip,GK=Ta,YK=ap,JK=op,XK=Y$,ZK=sp,QK=Ac,eG=lp,tG=up,rG=fp,nG=dp,iG=hp,aG=pp,oG=mp,sG=gp;function lG(e=!1){const t=[rG.default,nG.default,iG.default,aG.default,oG.default,sG.default,ZK.default,QK.default,XK.default,eG.default,tG.default];return e?t.push(KK.default,YK.default):t.push(HK.default,GK.default),t.push(JK.default),t}rp.default=lG;var yp={},vp={};Object.defineProperty(vp,"__esModule",{value:!0});const wt=De,cG={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,wt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,wt._)`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:u,errSchemaPath:f,schemaEnv:d,self:p}=l;if(!u.validateFormats)return;i?m():y();function m(){const _=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),w=r.const("fDef",(0,wt._)`${_}[${s}]`),v=r.let("fType"),g=r.let("format");r.if((0,wt._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>r.assign(v,(0,wt._)`${w}.type || "string"`).assign(g,(0,wt._)`${w}.validate`),()=>r.assign(v,(0,wt._)`"string"`).assign(g,w)),e.fail$data((0,wt.or)(C(),S()));function C(){return u.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${g}`}function S(){const E=d.$async?(0,wt._)`(${w}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,wt._)`${g}(${n})`,A=(0,wt._)`(typeof ${g} == "function" ? ${E} : ${g}.test(${n}))`;return(0,wt._)`${g} && ${g} !== true && ${v} === ${t} && !${A}`}}function y(){const _=p.formats[a];if(!_){C();return}if(_===!0)return;const[w,v,g]=S(_);w===t&&e.pass(E());function C(){if(u.strictSchema===!1){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${a}" ignored in schema at path "${f}"`}}function S(A){const x=A instanceof RegExp?(0,wt.regexpCode)(A):u.code.formats?(0,wt._)`${u.code.formats}${(0,wt.getProperty)(a)}`:void 0,N=r.scopeValue("formats",{key:a,ref:A,code:x});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,wt._)`${N}.validate`]:["string",A,N]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!d.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${g}(${n})`}return typeof v=="function"?(0,wt._)`${g}(${n})`:(0,wt._)`${g}.test(${n})`}}}};vp.default=cG,Object.defineProperty(yp,"__esModule",{value:!0});const uG=[vp.default];yp.default=uG;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.contentVocabulary=Pa.metadataVocabulary=void 0,Pa.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Pa.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Bh,"__esModule",{value:!0});const fG=Uh,dG=qh,hG=rp,pG=yp,iw=Pa,mG=[fG.default,dG.default,(0,hG.default)(),pG.default,iw.metadataVocabulary,iw.contentVocabulary];Bh.default=mG;var bp={},Fc={};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.DiscrError=void 0;var aw;(function(e){e.Tag="tag",e.Mapping="mapping"})(aw||(Fc.DiscrError=aw={})),Object.defineProperty(bp,"__esModule",{value:!0});const Ia=De,_p=Fc,ow=er,gG=Ea,yG=ye,vG={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===_p.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ia._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:a}=e,{oneOf:s}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),f=t.const("tag",(0,Ia._)`${r}${(0,Ia.getProperty)(l)}`);t.if((0,Ia._)`typeof ${f} == "string"`,()=>d(),()=>e.error(!1,{discrError:_p.DiscrError.Tag,tag:f,tagName:l})),e.ok(u);function d(){const y=m();t.if(!1);for(const _ in y)t.elseIf((0,Ia._)`${f} === ${_}`),t.assign(u,p(y[_]));t.else(),e.error(!1,{discrError:_p.DiscrError.Mapping,tag:f,tagName:l}),t.endIf()}function p(y){const _=t.name("valid"),w=e.subschema({keyword:"oneOf",schemaProp:y},_);return e.mergeEvaluated(w,Ia.Name),_}function m(){var y;const _={},w=g(i);let v=!0;for(let E=0;E<s.length;E++){let A=s[E];if(A!=null&&A.$ref&&!(0,yG.schemaHasRulesButRef)(A,a.self.RULES)){const N=A.$ref;if(A=ow.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,N),A instanceof ow.SchemaEnv&&(A=A.schema),A===void 0)throw new gG.default(a.opts.uriResolver,a.baseId,N)}const x=(y=A==null?void 0:A.properties)===null||y===void 0?void 0:y[l];if(typeof x!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);v=v&&(w||g(A)),C(x,E)}if(!v)throw new Error(`discriminator: "${l}" must be required`);return _;function g({required:E}){return Array.isArray(E)&&E.includes(l)}function C(E,A){if(E.const)S(E.const,A);else if(E.enum)for(const x of E.enum)S(x,A);else throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}function S(E,A){if(typeof E!="string"||E in _)throw new Error(`discriminator: "${l}" values must be unique strings`);_[E]=A}}}};bp.default=vG;const bG={$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};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=X1,n=Bh,i=bp,a=bG,s=["/properties"],l="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(_,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var f=kr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=De;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=qo;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=Ea;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(_h,_h.exports);var sw=_h.exports;const _G=Qt(sw);var $p={exports:{}},lw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(K,H){return{validate:K,compare:H}}e.fullFormats={date:t(a,s),time:t(u,f),"date-time":t(p,m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Y,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:g,int32:{type:"number",validate:E},int64:{type:"number",validate:A},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(K){return K%4===0&&(K%100!==0||K%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(K){const H=n.exec(K);if(!H)return!1;const te=+H[1],ee=+H[2],ae=+H[3];return ee>=1&&ee<=12&&ae>=1&&ae<=(ee===2&&r(te)?29:i[ee])}function s(K,H){if(K&&H)return K>H?1:K<H?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(K,H){const te=l.exec(K);if(!te)return!1;const ee=+te[1],ae=+te[2],Q=+te[3],k=te[5];return(ee<=23&&ae<=59&&Q<=59||ee===23&&ae===59&&Q===60)&&(!H||k!=="")}function f(K,H){if(!(K&&H))return;const te=l.exec(K),ee=l.exec(H);if(te&&ee)return K=te[1]+te[2]+te[3]+(te[4]||""),H=ee[1]+ee[2]+ee[3]+(ee[4]||""),K>H?1:K<H?-1:0}const d=/t|\s/i;function p(K){const H=K.split(d);return H.length===2&&a(H[0])&&u(H[1],!0)}function m(K,H){if(!(K&&H))return;const[te,ee]=K.split(d),[ae,Q]=H.split(d),k=s(te,ae);if(k!==void 0)return k||f(ee,Q)}const y=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(K){return y.test(K)&&_.test(K)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(K){return v.lastIndex=0,v.test(K)}const C=-2147483648,S=2**31-1;function E(K){return Number.isInteger(K)&&K<=S&&K>=C}function A(K){return Number.isInteger(K)}function x(){return!0}const N=/[^\\]\\Z/;function Y(K){if(N.test(K))return!1;try{return new RegExp(K),!0}catch{return!1}}})(lw);var cw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=sw,r=De,n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:l,schemaCode:u})=>r.str`should be ${i[l].okStr} ${u}`,params:({keyword:l,schemaCode:u})=>r._`{comparison: ${i[l].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(l){const{gen:u,data:f,schemaCode:d,keyword:p,it:m}=l,{opts:y,self:_}=m;if(!y.validateFormats)return;const w=new t.KeywordCxt(m,_.RULES.all.format.definition,"format");w.$data?v():g();function v(){const S=u.scopeValue("formats",{ref:_.formats,code:y.code.formats}),E=u.const("fmt",r._`${S}[${w.schemaCode}]`);l.fail$data(r.or(r._`typeof ${E} != "object"`,r._`${E} instanceof RegExp`,r._`typeof ${E}.compare != "function"`,C(E)))}function g(){const S=w.schema,E=_.formats[S];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${p}": format "${S}" does not define "compare" function`);const A=u.scopeValue("formats",{key:S,ref:E,code:y.code.formats?r._`${y.code.formats}${r.getProperty(S)}`:void 0});l.fail$data(C(A))}function C(S){return r._`${S}.compare(${f}, ${d}) ${i[p].fail} 0`}},dependencies:["format"]};const s=l=>(l.addKeyword(e.formatLimitDefinition),l);e.default=s})(cw),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=lw,n=cw,i=De,a=new i.Name("fullFormats"),s=new i.Name("fastFormats"),l=(f,d={keywords:!0})=>{if(Array.isArray(d))return u(f,d,r.fullFormats,a),f;const[p,m]=d.mode==="fast"?[r.fastFormats,s]:[r.fullFormats,a],y=d.formats||r.formatNames;return u(f,y,p,m),d.keywords&&n.default(f),f};l.get=(f,d="full")=>{const m=(d==="fast"?r.fastFormats:r.fullFormats)[f];if(!m)throw new Error(`Unknown format "${f}"`);return m};function u(f,d,p,m){var y,_;(y=(_=f.opts.code).formats)!==null&&y!==void 0||(_.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const w of d)f.addFormat(w,p[w])}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}($p,$p.exports);var $G=$p.exports;const uw=Qt($G),wG={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},SG=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,CG=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function EG(e,t,r={},n,i=_G){const a=new i({...wG,...r});return n?uw(a,n):n!==!1&&uw(a),a.addFormat("data-url",CG),a.addFormat("color",SG),a.addKeyword(Bn),a.addKeyword(Gu),Array.isArray(e)&&a.addMetaSchema(e),Re(t)&&Object.keys(t).forEach(s=>{a.addFormat(s,t[s])}),a}function OG(e=[],t){return e.map(r=>{var n;const{instancePath:i,keyword:a,params:s,schemaPath:l,parentSchema:u,...f}=r;let{message:d=""}=f,p=i.replace(/\//g,"."),m=`${p} ${d}`.trim(),y="";const _=[...((n=s.deps)===null||n===void 0?void 0:n.split(", "))||[],s.missingProperty,s.property].filter(w=>w);if(_.length>0)_.forEach(w=>{const v=p?`${p}.${w}`:w;let g=we(de(t,`${v.replace(/^\./,"")}`)).title;if(g===void 0){const C=l.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([w]);g=we(de(t,C)).title}if(g)d=d.replace(`'${w}'`,`'${g}'`),y=g;else{const C=de(u,[Ve,w,"title"]);C&&(d=d.replace(`'${w}'`,`'${C}'`),y=C)}}),m=d;else{const w=we(de(t,`${p.replace(/^\./,"")}`)).title;if(w)m=`'${w}' ${d}`.trim(),y=w;else{const v=u==null?void 0:u.title;v&&(m=`'${v}' ${d}`.trim(),y=v)}}return"missingProperty"in s&&(p=p?`${p}.${s.missingProperty}`:s.missingProperty),{name:a,property:p,message:d,params:s,stack:m,schemaPath:l,title:y}})}function AG(e,t,r,n,i,a,s){const{validationError:l}=t;let u=OG(t.errors,s);l&&(u=[...u,{stack:l.message}]),typeof a=="function"&&(u=a(u,s));let f=hR(u);if(l&&(f={...f,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:u,errorSchema:f};const d=h_(e,n,r,n,!0),p=i(d,Ds(d),s),m=Vd(p);return Pl({errors:u,errorSchema:f},m)}class TG{constructor(t,r){const{additionalMetaSchemas:n,customFormats:i,ajvOptionsOverrides:a,ajvFormatOptions:s,AjvClass:l}=t;this.ajv=EG(n,i,a,s,l),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var n,i;let a,s;try{t[vt]&&(s=this.ajv.getSchema(t[vt])),s===void 0&&(s=this.ajv.compile(t)),s(r)}catch(u){a=u}let l;return s&&(typeof this.localizer=="function"&&(((n=s.errors)!==null&&n!==void 0?n:[]).forEach(u=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=u.params)===null||p===void 0)&&p[d]&&(u.params[d]=`'${u.params[d]}'`)}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(d=>`'${d}'`).join(", "))}),this.localizer(s.errors),((i=s.errors)!==null&&i!==void 0?i:[]).forEach(u=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=u.params)===null||p===void 0)&&p[d]&&(u.params[d]=u.params[d].slice(1,-1))}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(d=>d.slice(1,-1)).join(", "))})),l=s.errors||void 0,s.errors=null),{errors:l,validationError:a}}validateFormData(t,r,n,i,a){const s=this.rawValidation(r,t);return AG(this,s,t,r,n,i,a)}handleSchemaUpdate(t){var r,n;const i=(r=t[vt])!==null&&r!==void 0?r:Rg;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):pt(t,(n=this.ajv.getSchema(i))===null||n===void 0?void 0:n.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,r,n){var i;try{this.handleSchemaUpdate(n);const a=Rd(t),s=(i=a[vt])!==null&&i!==void 0?i:cR(a);let l;return l=this.ajv.getSchema(s),l===void 0&&(l=this.ajv.addSchema(a,s).getSchema(s)||this.ajv.compile(a)),l(r)}catch(a){return console.warn("Error encountered compiling schema:",a),!1}}}function PG(e={},t){return new TG(e,t)}const wp=PG();function IG(e,t){return P_(e,t,function(r,n){return Ly(e,n)})}var fw=j0(function(e,t){return e==null?{}:IG(e,t)}),xG=0;function DG(e){var t=++xG;return df(e)+t}function Sp(){return DG("rjsf-array-item-")}function dw(e){return Array.isArray(e)?e.map(t=>({key:Sp(),item:t})):[]}function Jo(e){return Array.isArray(e)?e.map(t=>t.item):[]}class FG extends B.Component{constructor(r){super(r);pe(this,"_getNewFormDataRow",()=>{const{schema:r,registry:n}=this.props,{schemaUtils:i}=n;let a=r.items;return xd(r)&&gO(r)&&(a=r.additionalItems),i.getDefaultFormState(a)});pe(this,"onAddClick",r=>{this._handleAddClick(r)});pe(this,"onAddIndexClick",r=>n=>{this._handleAddClick(n,r)});pe(this,"onCopyIndexClick",r=>n=>{n&&n.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const d in a){const p=parseInt(d);p<=r?Xe(l,[p],a[d]):p>r&&Xe(l,[p+1],a[d])}}const u={key:Sp(),item:Eo(s[r].item)},f=[...s];r!==void 0?f.splice(r+1,0,u):f.push(u),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Jo(f),[],l))});pe(this,"onDropIndexClick",r=>n=>{n&&n.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const f in a){const d=parseInt(f);d<r?Xe(l,[d],a[f]):d>r&&Xe(l,[d-1],a[f])}}const u=s.filter((f,d)=>d!==r);this.setState({keyedFormData:u,updatedKeyedFormData:!0},()=>i(Jo(u),[],l))});pe(this,"onReorderClick",(r,n)=>i=>{i&&(i.preventDefault(),i.currentTarget.blur());const{onChange:a,errorSchema:s}=this.props;let l;if(s){l={};for(const p in s){const m=parseInt(p);m==r?Xe(l,[n],s[r]):m==n?Xe(l,[r],s[n]):Xe(l,[p],s[m])}}const{keyedFormData:u}=this.state;function f(){const p=u.slice();return p.splice(r,1),p.splice(n,0,u[r]),p}const d=f();this.setState({keyedFormData:d},()=>a(Jo(d),[],l))});pe(this,"onChangeForIndex",r=>(n,i,a,s)=>{const{onChange:l}=this.props,u=Array.isArray(i)?i.slice():[];u.unshift(r),l(n===void 0?null:n,u,a,s)});pe(this,"onSelectChange",r=>{const{name:n,onChange:i,idSchema:a}=this.props;i(r,[n],void 0,a&&a.$id)});const{formData:n=[]}=r,i=dw(n);this.state={keyedFormData:i,updatedKeyedFormData:!1}}static getDerivedStateFromProps(r,n){if(n.updatedKeyedFormData)return{updatedKeyedFormData:!1};const i=Array.isArray(r.formData)?r.formData:[],a=n.keyedFormData||[];return{keyedFormData:i.length===a.length?a.map((l,u)=>({key:l.key,item:i[u]})):dw(i)}}get itemTitle(){const{schema:r,registry:n}=this.props,{translateString:i}=n;return de(r,[zr,"title"],de(r,[zr,"description"],i(Ue.ArrayItemTitle)))}isItemRequired(r){return Array.isArray(r.type)?!r.type.includes("null"):r.type!=="null"}canAddItem(r){const{schema:n,uiSchema:i,registry:a}=this.props;let{addable:s}=we(i,a.globalUiOptions);return s!==!1&&(n.maxItems!==void 0?s=r.length<n.maxItems:s=!0),s}_handleAddClick(r,n){r&&r.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:s}=this.state;let l;if(a){l={};for(const d in a){const p=parseInt(d);n===void 0||p<n?Xe(l,[p],a[d]):p>=n&&Xe(l,[p+1],a[d])}}const u={key:Sp(),item:this._getNewFormDataRow()},f=[...s];n!==void 0?f.splice(n,0,u):f.push(u),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Jo(f),[],l))}computeItemUiSchema(r,n,i,a){if(typeof r.items=="function")try{return r.items(n,i,a)}catch(s){console.error(`Error executing dynamic uiSchema.items function for item at index ${i}:`,s);return}else return r.items}render(){const{schema:r,uiSchema:n,idSchema:i,registry:a}=this.props,{schemaUtils:s,translateString:l}=a;if(!(zr in r)){const u=we(n),f=Se("UnsupportedFieldTemplate",a,u);return $.jsx(f,{schema:r,idSchema:i,reason:l(Ue.MissingItems),registry:a})}return s.isMultiSelect(r)?this.renderMultiSelect():p_(n)?this.renderCustomWidget():xd(r)?this.renderFixedArray():s.isFilesArray(r,n)?this.renderFiles():this.renderNormalArray()}renderNormalArray(){const{schema:r,uiSchema:n={},errorSchema:i,idSchema:a,name:s,title:l,disabled:u=!1,readonly:f=!1,autofocus:d=!1,required:p=!1,registry:m,onBlur:y,onFocus:_,idPrefix:w,idSeparator:v="_",rawErrors:g}=this.props,{keyedFormData:C}=this.state,S=r.title||l||s,{schemaUtils:E,formContext:A}=m,x=we(n),N=Re(r.items)?r.items:{},Y=E.retrieveSchema(N),K=Jo(this.state.keyedFormData),H=this.canAddItem(K),te={canAdd:H,items:C.map((ae,Q)=>{const{key:k,item:q}=ae,W=q,L=E.retrieveSchema(N,W),X=i?i[Q]:void 0,U=a.$id+v+Q,F=E.toIdSchema(L,U,W,w,v),z=this.computeItemUiSchema(n,q,Q,A);return this.renderArrayFieldItem({key:k,index:Q,name:s&&`${s}-${Q}`,title:S?`${S}-${Q+1}`:void 0,canAdd:H,canMoveUp:Q>0,canMoveDown:Q<K.length-1,itemSchema:L,itemIdSchema:F,itemErrorSchema:X,itemData:W,itemUiSchema:z,autofocus:d&&Q===0,onBlur:y,onFocus:_,rawErrors:g,totalItems:C.length})}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Y.type}`,disabled:u,idSchema:a,uiSchema:n,onAddClick:this.onAddClick,readonly:f,required:p,schema:r,title:S,formContext:A,formData:K,rawErrors:g,registry:m},ee=Se("ArrayFieldTemplate",m,x);return $.jsx(ee,{...te})}renderCustomWidget(){const{schema:r,idSchema:n,uiSchema:i,disabled:a=!1,readonly:s=!1,autofocus:l=!1,required:u=!1,hideError:f,placeholder:d,onBlur:p,onFocus:m,formData:y=[],registry:_,rawErrors:w,name:v}=this.props,{widgets:g,formContext:C,globalUiOptions:S,schemaUtils:E}=_,{widget:A,title:x,...N}=we(i,S),Y=en(r,A,g),K=x??r.title??v,H=E.getDisplayLabel(r,i,S);return $.jsx(Y,{id:n.$id,name:v,multiple:!0,onChange:this.onSelectChange,onBlur:p,onFocus:m,options:N,schema:r,uiSchema:i,registry:_,value:y,disabled:a,readonly:s,hideError:f,required:u,label:K,hideLabel:!H,placeholder:d,formContext:C,autofocus:l,rawErrors:w})}renderMultiSelect(){const{schema:r,idSchema:n,uiSchema:i,formData:a=[],disabled:s=!1,readonly:l=!1,autofocus:u=!1,required:f=!1,placeholder:d,onBlur:p,onFocus:m,registry:y,rawErrors:_,name:w}=this.props,{widgets:v,schemaUtils:g,formContext:C,globalUiOptions:S}=y,E=g.retrieveSchema(r.items,a),A=ua(E,i),{widget:x="select",title:N,...Y}=we(i,S),K=en(r,x,v),H=N??r.title??w,te=g.getDisplayLabel(r,i,S);return $.jsx(K,{id:n.$id,name:w,multiple:!0,onChange:this.onSelectChange,onBlur:p,onFocus:m,options:{...Y,enumOptions:A},schema:r,uiSchema:i,registry:y,value:a,disabled:s,readonly:l,required:f,label:H,hideLabel:!te,placeholder:d,formContext:C,autofocus:u,rawErrors:_})}renderFiles(){const{schema:r,uiSchema:n,idSchema:i,name:a,disabled:s=!1,readonly:l=!1,autofocus:u=!1,required:f=!1,onBlur:d,onFocus:p,registry:m,formData:y=[],rawErrors:_}=this.props,{widgets:w,formContext:v,globalUiOptions:g,schemaUtils:C}=m,{widget:S="files",title:E,...A}=we(n,g),x=en(r,S,w),N=E??r.title??a,Y=C.getDisplayLabel(r,n,g);return $.jsx(x,{options:A,id:i.$id,name:a,multiple:!0,onChange:this.onSelectChange,onBlur:d,onFocus:p,schema:r,uiSchema:n,value:y,disabled:s,readonly:l,required:f,registry:m,formContext:v,autofocus:u,rawErrors:_,label:N,hideLabel:!Y})}renderFixedArray(){const{schema:r,uiSchema:n={},formData:i=[],errorSchema:a,idPrefix:s,idSeparator:l="_",idSchema:u,name:f,title:d,disabled:p=!1,readonly:m=!1,autofocus:y=!1,required:_=!1,registry:w,onBlur:v,onFocus:g,rawErrors:C}=this.props,{keyedFormData:S}=this.state;let{formData:E=[]}=this.props;const A=r.title||d||f,x=we(n),{schemaUtils:N,formContext:Y}=w,H=(Re(r.items)?r.items:[]).map((k,q)=>N.retrieveSchema(k,i[q])),te=Re(r.additionalItems)?N.retrieveSchema(r.additionalItems,i):null;(!E||E.length<H.length)&&(E=E||[],E=E.concat(new Array(H.length-E.length)));const ee=this.canAddItem(E)&&!!te,ae={canAdd:ee,className:"rjsf-field rjsf-field-array rjsf-field-array-fixed-items",disabled:p,idSchema:u,formData:i,items:S.map((k,q)=>{const{key:W,item:L}=k,X=L,U=q>=H.length,F=(U&&Re(r.additionalItems)?N.retrieveSchema(r.additionalItems,X):H[q])||{},z=u.$id+l+q,j=N.toIdSchema(F,z,X,s,l);let T;U?T=n.additionalItems:Array.isArray(n.items)?T=n.items[q]:T=this.computeItemUiSchema(n,L,q,Y);const D=a?a[q]:void 0;return this.renderArrayFieldItem({key:W,index:q,name:f&&`${f}-${q}`,title:A?`${A}-${q+1}`:void 0,canAdd:ee,canRemove:U,canMoveUp:q>=H.length+1,canMoveDown:U&&q<E.length-1,itemSchema:F,itemData:X,itemUiSchema:T,itemIdSchema:j,itemErrorSchema:D,autofocus:y&&q===0,onBlur:v,onFocus:g,rawErrors:C,totalItems:S.length})}),onAddClick:this.onAddClick,readonly:m,required:_,registry:w,schema:r,uiSchema:n,title:A,formContext:Y,errorSchema:a,rawErrors:C},Q=Se("ArrayFieldTemplate",w,x);return $.jsx(Q,{...ae})}renderArrayFieldItem(r){const{key:n,index:i,name:a,canAdd:s,canRemove:l=!0,canMoveUp:u,canMoveDown:f,itemSchema:d,itemData:p,itemUiSchema:m,itemIdSchema:y,itemErrorSchema:_,autofocus:w,onBlur:v,onFocus:g,rawErrors:C,totalItems:S,title:E}=r,{disabled:A,hideError:x,idPrefix:N,idSeparator:Y,readonly:K,uiSchema:H,registry:te,formContext:ee}=this.props,{fields:{ArraySchemaField:ae,SchemaField:Q},globalUiOptions:k}=te,q=ae||Q,{orderable:W=!0,removable:L=!0,copyable:X=!1}=we(H,k),U={moveUp:W&&u,moveDown:W&&f,copy:X&&s,remove:L&&l,toolbar:!1};return U.toolbar=Object.keys(U).some(F=>U[F]),{children:$.jsx(q,{name:a,title:E,index:i,schema:d,uiSchema:m,formData:p,formContext:ee,errorSchema:_,idPrefix:N,idSeparator:Y,idSchema:y,required:this.isItemRequired(d),onChange:this.onChangeForIndex(i),onBlur:v,onFocus:g,registry:te,disabled:A,readonly:K,hideError:x,autofocus:w,rawErrors:C}),buttonsProps:{idSchema:y,disabled:A,readonly:K,canAdd:s,hasCopy:U.copy,hasMoveUp:U.moveUp,hasMoveDown:U.moveDown,hasRemove:U.remove,index:i,totalItems:S,onAddIndexClick:this.onAddIndexClick,onCopyIndexClick:this.onCopyIndexClick,onDropIndexClick:this.onDropIndexClick,onReorderClick:this.onReorderClick,registry:te,schema:d,uiSchema:m},className:"rjsf-array-item",disabled:A,hasToolbar:U.toolbar,index:i,totalItems:S,key:n,readonly:K,registry:te,schema:d,uiSchema:m}}}function NG(e){const{schema:t,name:r,uiSchema:n,idSchema:i,formData:a,registry:s,required:l,disabled:u,readonly:f,hideError:d,autofocus:p,title:m,onChange:y,onFocus:_,onBlur:w,rawErrors:v}=e,{title:g}=t,{widgets:C,formContext:S,translateString:E,globalUiOptions:A}=s,{widget:x="checkbox",title:N,label:Y=!0,enumNames:K,...H}=we(n,A),te=en(t,x,C),ee=E(Ue.YesLabel),ae=E(Ue.NoLabel);let Q;const k=N??g??m??r;if(Array.isArray(t.oneOf))Q=ua({oneOf:t.oneOf.map(W=>{if(Re(W))return{...W,title:W.title||(W.const===!0?ee:ae)}}).filter(W=>W)},n);else{const W=t.enum??[!0,!1];!K&&W.length===2&&W.every(L=>typeof L=="boolean")?Q=[{value:W[0],label:W[0]?ee:ae},{value:W[1],label:W[1]?ee:ae}]:Q=ua({enum:W},n)}const q=B.useCallback((W,L,X)=>y(W,[],L,X),[y]);return $.jsx(te,{options:{...H,enumOptions:Q},schema:t,uiSchema:n,id:i.$id,name:r,onChange:q,onFocus:_,onBlur:w,label:k,hideLabel:!Y,value:a,required:l,disabled:u,readonly:f,hideError:d,registry:s,formContext:S,autofocus:p,rawErrors:v})}function MG(e,t){return Hi(t,function(r){return e[r]})}function kG(e){return e==null?[]:MG(e,Fr(e))}var LG=Math.max;function jG(e,t,r,n){e=di(e)?e:kG(e),r=r?Py(r):0;var i=e.length;return r<0&&(r=LG(i+r,0)),br(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Jy(e,t,r)>-1}var BG=Math.min;function UG(e,t,r){for(var n=Sf,i=e[0].length,a=e.length,s=a,l=Array(a),u=1/0,f=[];s--;){var d=e[s];u=BG(d.length,u),l[s]=i>=120&&d.length>=120?new ui(s&&d):void 0}d=e[0];var p=-1,m=l[0];e:for(;++p<i&&f.length<u;){var y=d[p],_=y;if(y=y!==0?y:0,!(m?eo(m,_):n(f,_))){for(s=a;--s;){var w=l[s];if(!(w?eo(w,_):n(e[s],_)))continue e}m&&m.push(_),f.push(y)}}return f}function WG(e){return ao(e)?e:[]}var hw=qs(function(e){var t=Hi(e,WG);return t.length&&t[0]===e[0]?UG(t):[]});function pw(e){return e===void 0}var ln;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(ln||(ln={}));var Xo;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Xo||(Xo={}));const qG=/^\$lookup=(.+)/,Cp="layoutGrid";function mw(e,t){return e??t}function VG(e){return/^\d+?$/.test(e)}const ut=class ut extends B.PureComponent{constructor(r){super(r);pe(this,"onFieldChange",r=>(n,i,a,s)=>{const{onChange:l,errorSchema:u}=this.props;let f=u;a&&u&&(f=Eo(u),Xe(f,r,a)),l(n,r.split("."),f,s)})}static computeFieldUiSchema(r,n,i,a,s){const l=de(i,[Ju],{}),u=de(i,r),f={...de(u,[Hr],{}),...n,...l},d={...u};Ut(f)||Xe(d,[Hr],f),Ut(l)||Xe(d,[Ju],l);let{readonly:p}=we(d);return(s===!0||pw(p)&&a===!0)&&(p=!0,Be(f,Ku)?Xe(d,[Hr,Ku],!0):Xe(d,`ui:${Ku}`,!0)),{fieldUiSchema:d,uiReadonly:p}}static conditionMatches(r,n,i="$0m3tH1nG Un3xP3cT3d"){const a=$d([n]).sort(),s=$d([i]).sort();switch(r){case Xo.ALL:return Oy(a,s);case Xo.SOME:return hw(a,s).length>0;case Xo.NONE:return hw(a,s).length===0;default:return!1}}static findChildrenAndProps(r,n,i){let a={},s=r[n];if(Wn(s)){const{children:l,className:u,...f}=s;if(s=l,u){const p=u.split(" ").map(m=>qd(i,m,m)).join(" ");a={...f,className:p}}else a=f}if(!Array.isArray(s))throw new TypeError(`Expected array for "${n}" in ${JSON.stringify(r)}`);return{children:s,gridProps:a}}static getIdSchema(r,n,i,a={},s){const l=de(n,vt);return r.toIdSchema(a,l,i,l,s)}static computeArraySchemasIfPresent(r,n,i,a){let s;if(VG(i)&&r&&(r==null?void 0:r.type)==="array"&&Be(r,zr)){const l=Number(i),u=r[zr];Array.isArray(u)?l>u.length?s=k0(u):s=u[l]:s=u,n={[vt]:`${n[vt]}${a??"_"}${l}`}}return{rawSchema:s,idSchema:n}}static getSchemaDetailsForField(r,n,i,a,s,l){let u=i,f=s;const d=n.split("."),p=d.pop();let m=r.retrieveSchema(u,a),y=a,_=m.readOnly;d.forEach(g=>{if(Be(m,Ve))u=de(m,[Ve,g],{}),f=de(f,g,{});else if(m&&(Be(m,Qe)||Be(m,yt))){const C=Be(m,Qe)?Qe:yt,S=r.findSelectedOptionInXxxOf(m,g,C,y),E=ut.getIdSchema(r,f,a,S,l);u=de(S,[Ve,g],{}),f=de(E,g,{})}else{const C=ut.computeArraySchemasIfPresent(m,f,g,l);u=C.rawSchema??{},f=C.idSchema}y=de(y,g,{}),m=r.retrieveSchema(u,y),_=mw(m.readOnly,_)});let w,v=!1;if(Ut(m)&&(m=void 0),m&&p){if(m&&(Be(m,Qe)||Be(m,yt))){const C=Be(m,Qe)?Qe:yt;m=r.findSelectedOptionInXxxOf(m,p,C,y);const S=ut.getIdSchema(r,f,a,m,l);f=bn(S,f)}v=m!==void 0&&Array.isArray(m.required)&&jG(m.required,p);const g=ut.computeArraySchemasIfPresent(m,f,p,l);if(g.rawSchema?(m=g.rawSchema,f=g.idSchema):(m=de(m,[Ve,p]),m=m&&r.retrieveSchema(m),f=de(f,p,{})),_=mw(m==null?void 0:m.readOnly,_),m&&(Be(m,Qe)||Be(m,yt))){const C=Be(m,Qe)?Qe:yt,S=Zr(m);w={options:m[C],hasDiscriminator:!!S}}}return{schema:m,isRequired:v,isReadonly:_,optionsInfo:w,idSchema:f}}static getCustomRenderComponent(r,n){let i=r;return br(i)&&(i=qd(n,i)),Xa(i)?i:null}static computeUIComponentPropsFromGridSchema(r,n){let i,a=null,s={},l;if(br(n)||pw(n))i=n??"";else{const{name:u="",render:f,...d}=n;i=u,s=d,Ut(s)||I_(s,(p,m)=>{if(br(p)){const y=qG.exec(p);if(Array.isArray(y)&&y.length>1){const _=y[1];s[m]=qd(r,_,_)}}}),a=ut.getCustomRenderComponent(f,r),!u&&a&&(l=$.jsx(a,{...d,"data-testid":ut.TEST_IDS.uiComponent}))}return{name:i,UIComponent:a,uiProps:s,rendered:l}}renderCondition(r){const{formData:n,registry:i}=this.props,{children:a,gridProps:s}=ut.findChildrenAndProps(r,ln.CONDITION,i),{operator:l,field:u="",value:f}=s,d=de(n,u,null);return ut.conditionMatches(l,d,f)?this.renderChildren(a):null}renderCol(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=ut.findChildrenAndProps(r,ln.COLUMN,n),l=we(i),u=Se("GridTemplate",n,l);return $.jsx(u,{column:!0,"data-testid":ut.TEST_IDS.col,...s,children:this.renderChildren(a)})}renderColumns(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=ut.findChildrenAndProps(r,ln.COLUMNS,n),l=we(i),u=Se("GridTemplate",n,l);return a.map(f=>$.jsx(u,{column:!0,"data-testid":ut.TEST_IDS.col,...s,children:this.renderChildren([f])},`column-${$i(f)}`))}renderRow(r){const{registry:n,uiSchema:i}=this.props,{children:a,gridProps:s}=ut.findChildrenAndProps(r,ln.ROW,n),l=we(i),u=Se("GridTemplate",n,l);return $.jsx(u,{...s,"data-testid":ut.TEST_IDS.row,children:this.renderChildren(a)})}renderChildren(r){const{registry:n,schema:i,formData:a}=this.props,{schemaUtils:s}=n,l=s.retrieveSchema(i,a);return r.map(u=>B.createElement(ut,{...this.props,key:`layoutGrid-${$i(u)}`,schema:l,layoutGridSchema:u}))}renderField(r){const{schema:n,uiSchema:i,errorSchema:a,idSchema:s,onBlur:l,onFocus:u,formData:f,readonly:d,registry:p,idSeparator:m,layoutGridSchema:y,..._}=this.props,{fields:w,schemaUtils:v}=p,{SchemaField:g,LayoutMultiSchemaField:C}=w,S=ut.computeUIComponentPropsFromGridSchema(p,r);if(S.rendered)return S.rendered;const{name:E,UIComponent:A,uiProps:x}=S,{schema:N,isRequired:Y,isReadonly:K,optionsInfo:H,idSchema:te}=ut.getSchemaDetailsForField(v,E,n,f,s,m);if(N){const ee=H!=null&&H.hasDiscriminator?C:g,{fieldUiSchema:ae,uiReadonly:Q}=ut.computeFieldUiSchema(E,x,i,K,d);return $.jsx(ee,{"data-testid":H!=null&&H.hasDiscriminator?ut.TEST_IDS.layoutMultiSchemaField:ut.TEST_IDS.field,..._,name:E,required:Y,readonly:Q,schema:N,uiSchema:ae,errorSchema:de(a,E),idSchema:te,idSeparator:m,formData:de(f,E),onChange:this.onFieldChange(E),onBlur:l,onFocus:u,options:H==null?void 0:H.options,registry:p})}return A?$.jsx(A,{"data-testid":ut.TEST_IDS.uiComponent,..._,name:E,required:Y,formData:f,readOnly:!!K||d,errorSchema:a,uiSchema:i,schema:n,idSchema:s,idSeparator:m,onBlur:l,onFocus:u,registry:p,...x}):null}render(){const{uiSchema:r}=this.props;let{layoutGridSchema:n}=this.props;const i=we(r);if(!n&&Cp in i&&Re(i[Cp])&&(n=i[Cp]),Re(n)){if(ln.ROW in n)return this.renderRow(n);if(ln.COLUMN in n)return this.renderCol(n);if(ln.COLUMNS in n)return this.renderColumns(n);if(ln.CONDITION in n)return this.renderCondition(n)}return this.renderField(n)}};pe(ut,"defaultProps",{layoutGridSchema:void 0}),pe(ut,"TEST_IDS",$_());let Ep=ut;function RG(e){const{idSchema:t,title:r,schema:n,uiSchema:i,required:a,registry:s,name:l}=e,u=we(i,s.globalUiOptions),{title:f}=u,{title:d}=n,p=f||r||d||l;if(!p)return null;const m=Se("TitleFieldTemplate",s,u);return $.jsx(m,{id:Cl(t),title:p,required:a,schema:n,uiSchema:i,registry:s})}function Op(e,t,r){const n="!@#!@$@#$!@$#";return e.map(({schema:a})=>a).find(a=>{const s=de(a,[Ve,t]);return de(s,Os,de(s,pr,n))===r})}function gw(e,t,r,n,i){const a=t.map(u=>r.retrieveSchema(u,i));let s=e;Be(e,Qe)?s={...e,[Qe]:a}:Be(e,yt)&&(s={...e,[yt]:a});const l=ua(s,n);if(!l)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(s)}`);return l}function zG(e){var me;const{name:t,baseType:r,disabled:n=!1,formData:i,idSchema:a,onBlur:s,onChange:l,options:u,onFocus:f,registry:d,uiSchema:p,schema:m,formContext:y,autofocus:_,readonly:w,required:v,errorSchema:g,hideError:C=!1}=e,{widgets:S,schemaUtils:E,globalUiOptions:A}=d,[x,N]=B.useState(gw(m,u,E,p,i)),Y=de(a,vt),K=Zr(m),H=Se("FieldErrorTemplate",d,u),te=Se("FieldTemplate",d,u),ee=$i(m),ae=$i(u),Q=p?$i(p):"",k=i?$i(i):"";B.useEffect(()=>{N(gw(m,u,E,p,i))},[ee,ae,E,Q,k]);const{widget:q=K?"radio":"select",title:W="",placeholder:L="",optionsSchemaSelector:X=K,hideError:U,...F}=we(p);if(!X)throw new Error("No selector field provided for the LayoutMultiSchemaField");const z=de(i,X);let j=de((me=x[0])==null?void 0:me.schema,[Ve,X],{});const T=Op(x,X,z);j=j!=null&&j.type?j:{...j,type:(T==null?void 0:T.type)||r};const D=en(j,q,S),V=U===void 0?C:!!U,Z=de(g,[Ht],[]),oe=yo(g,[Ht]),ue=E.getDisplayLabel(m,p,A),he=It=>{const Vt=Op(x,X,It),Et=Op(x,X,z);let rr=E.sanitizeDataForNewSchema(Vt,Et,i);rr&&Vt&&(rr=E.getDefaultFormState(Vt,rr,"excludeObjectChildren")),rr&&Xe(rr,X,It),l(rr,[t],void 0,Y)},be={enumOptions:x,...F},Le=!V&&Z.length>0?$.jsx(H,{idSchema:a,schema:m,errors:Z,registry:d}):void 0,ft=It=>Xy;return $.jsx(te,{id:Y,schema:m,label:(W||m.title)??"",disabled:n||Array.isArray(x)&&Ut(x),uiSchema:p,formContext:y,required:v,readonly:!!w,registry:d,displayLabel:ue,errors:Le,onChange:l,onDropPropertyClick:ft,onKeyChange:ft,children:$.jsx(D,{id:Y,name:t,schema:m,label:(W||m.title)??"",disabled:n||Array.isArray(x)&&Ut(x),uiSchema:p,formContext:y,autofocus:_,readonly:w,required:v,registry:d,multiple:!1,rawErrors:Z,hideError:V,hideLabel:!ue,errorSchema:oe,placeholder:L,onChange:he,onBlur:s,onFocus:f,value:z,options:be})})}class yw extends B.Component{constructor(r){super(r);pe(this,"onOptionChange",r=>{const{selectedOption:n,retrievedOptions:i}=this.state,{formData:a,onChange:s,registry:l}=this.props,{schemaUtils:u}=l,f=r!==void 0?parseInt(r,10):-1;if(f===n)return;const d=f>=0?i[f]:void 0,p=n>=0?i[n]:void 0;let m=u.sanitizeDataForNewSchema(d,p,a);d&&(m=u.getDefaultFormState(d,m,"excludeObjectChildren")),this.setState({selectedOption:f},()=>{s(m,[],void 0,this.getFieldId())})});const{formData:n,options:i,registry:{schemaUtils:a}}=this.props,s=i.map(l=>a.retrieveSchema(l,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(r,n){const{formData:i,options:a,idSchema:s}=this.props,{selectedOption:l}=this.state;let u=this.state;if(!pt(r.options,a)){const{registry:{schemaUtils:f}}=this.props,d=a.map(p=>f.retrieveSchema(p,i));u={selectedOption:l,retrievedOptions:d}}if(!pt(i,r.formData)&&s.$id===r.idSchema.$id){const{retrievedOptions:f}=u,d=this.getMatchingOption(l,i,f);n&&d!==l&&(u={selectedOption:d,retrievedOptions:f})}u!==this.state&&this.setState(u)}getMatchingOption(r,n,i){const{schema:a,registry:{schemaUtils:s}}=this.props,l=Zr(a);return s.getClosestMatchingOption(n,i,r,l)}getFieldId(){const{idSchema:r,schema:n}=this.props;return`${r.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:r,disabled:n=!1,errorSchema:i={},formContext:a,onBlur:s,onFocus:l,readonly:u,registry:f,schema:d,uiSchema:p}=this.props,{widgets:m,fields:y,translateString:_,globalUiOptions:w,schemaUtils:v}=f,{SchemaField:g}=y,C=Se("MultiSchemaFieldTemplate",f,w),{selectedOption:S,retrievedOptions:E}=this.state,{widget:A="select",placeholder:x,autofocus:N,autocomplete:Y,title:K=d.title,...H}=we(p,w),te=en({type:"number"},A,m),ee=de(i,Ht,[]),ae=yo(i,[Ht]),Q=v.getDisplayLabel(d,p,w),k=S>=0&&E[S]||null;let q;if(k){const{required:T}=d;q=T?vn({required:T},k):k}let W=[];Qe in d&&p&&Qe in p?Array.isArray(p[Qe])?W=p[Qe]:console.warn(`uiSchema.oneOf is not an array for "${K||r}"`):yt in d&&p&&yt in p&&(Array.isArray(p[yt])?W=p[yt]:console.warn(`uiSchema.anyOf is not an array for "${K||r}"`));let L=p;S>=0&&W.length>S&&(L=W[S]);const X=K?Ue.TitleOptionPrefix:Ue.OptionPrefix,U=K?[K]:[],F=E.map((T,D)=>{const{title:V=T.title}=we(W[D]);return{label:V||_(X,U.concat(String(D+1))),value:D}}),z=$.jsx(te,{id:this.getFieldId(),name:`${r}${d.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:l,disabled:n||Ut(F),multiple:!1,rawErrors:ee,errorSchema:ae,value:S>=0?S:void 0,options:{enumOptions:F,...H},registry:f,formContext:a,placeholder:x,autocomplete:Y,autofocus:N,label:K??r,hideLabel:!Q,readonly:u}),j=q&&q.type!=="null"&&$.jsx(g,{...this.props,schema:q,uiSchema:L})||null;return $.jsx(C,{schema:d,registry:f,uiSchema:p,selector:z,optionSchemaField:j})}}const HG=/\.([0-9]*0)*$/,KG=/[0.]0*$/;function GG(e){const{registry:t,onChange:r,formData:n,value:i}=e,[a,s]=B.useState(i),{StringField:l}=t.fields;let u=n;const f=B.useCallback((d,p,m,y)=>{s(d),`${d}`.charAt(0)==="."&&(d=`0${d}`);const _=typeof d=="string"&&d.match(HG)?Wg(d.replace(KG,"")):Wg(d);r(_,p,m,y)},[r]);if(typeof a=="string"&&typeof u=="number"){const d=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);a.match(d)&&(u=a)}return $.jsx(l,{...e,formData:u,onChange:f})}function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pi.apply(this,arguments)}const YG=["children","options"],vw=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),bw={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},JG=["style","script","pre"],XG=["src","href","data","formAction","srcDoc","action"],ZG=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,QG=/mailto:/i,eY=/\n{2,}$/,_w=/^(\s*>[\s\S]*?)(?=\n\n|$)/,tY=/^ *> ?/gm,rY=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,nY=/^ {2,}\n/,iY=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,$w=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,ww=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,aY=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,oY=/^(?:\n *)*\n/,sY=/\r\n?/g,lY=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,cY=/^\[\^([^\]]+)]/,uY=/\f/g,fY=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,dY=/^\s*?\[(x|\s)\]/,Sw=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Cw=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ew=/^([^\n]+)\n *(=|-){3,} *\n/,Ap=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,hY=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ow=/^<!--[\s\S]*?(?:-->)/,pY=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Tp=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,mY=/^\{.*\}$/,gY=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,yY=/^<([^ >]+@[^ >]+)>/,vY=/^<([^ >]+:\/[^ >]+)>/,bY=/-([a-z])?/gi,Aw=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,_Y=/^[^\n]+(?: \n|\n{2,})/,$Y=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,wY=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,SY=/^\[([^\]]*)\] ?\[([^\]]*)\]/,CY=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,EY=/\t/g,OY=/(^ *\||\| *$)/g,AY=/^ *:-+: *$/,TY=/^ *:-+ *$/,PY=/^ *-+: *$/,Nc=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,Mc="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",IY=RegExp(`^([*_])\\1${Nc(1)}${Mc}\\1\\1(?!\\1)`),xY=RegExp(`^([*_])${Nc(0)}${Mc}\\1(?!\\1)`),DY=RegExp(`^(==)${Nc(0)}${Mc}\\1`),FY=RegExp(`^(~~)${Nc(0)}${Mc}\\1`),NY=/^(:[a-zA-Z0-9-_]+:)/,MY=/^\\([^0-9A-Za-z\s])/,kY=/\\([^0-9A-Za-z\s])/g,LY=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,jY=/^\n+/,BY=/^([ \t]*)/,UY=/(?:^|\n)( *)$/,Pp="(?:\\d+\\.)",Ip="(?:[*+-])";function Tw(e){return"( *)("+(e===1?Pp:Ip)+") +"}const Pw=Tw(1),Iw=Tw(2);function xw(e){return RegExp("^"+(e===1?Pw:Iw))}const WY=xw(1),qY=xw(2);function Dw(e){return RegExp("^"+(e===1?Pw:Iw)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Pp:Ip)+" )[^\\n]*)*(\\n|$)","gm")}const VY=Dw(1),RY=Dw(2);function Fw(e){const t=e===1?Pp:Ip;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Nw=Fw(1),Mw=Fw(2);function kw(e,t){const r=t===1,n=r?Nw:Mw,i=r?VY:RY,a=r?WY:qY;return{t:s=>a.test(s),o:xa(function(s,l){const u=UY.exec(l.prevCapture);return u&&(l.list||!l.inline&&!l.simple)?n.exec(s=u[1]+s):null}),i:1,u(s,l,u){const f=r?+s[2]:void 0,d=s[0].replace(eY,`
116
116
  `).match(i);let p=!1;return{items:d.map(function(m,y){const _=a.exec(m)[0].length,w=RegExp("^ {1,"+_+"}","gm"),v=m.replace(w,"").replace(a,""),g=y===d.length-1,C=v.indexOf(`
117
117
 
118
- `)!==-1||g&&p;p=C;const S=u.inline,E=u.list;let A;u.list=!0,C?(u.inline=!1,A=Xo(v)+`
118
+ `)!==-1||g&&p;p=C;const S=u.inline,E=u.list;let A;u.list=!0,C?(u.inline=!1,A=Zo(v)+`
119
119
 
120
- `):(u.inline=!0,A=Xo(v));const x=l(A,u);return u.inline=S,u.list=E,x}),ordered:r,start:f}},l:(s,l,u)=>e(s.ordered?"ol":"ul",{key:u.key,start:s.type==="20"?s.start:void 0},s.items.map(function(f,d){return e("li",{key:d},l(f,u))}))}}const qY=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),VY=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Xo(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function kc(e,t){return e.startsWith(t)}function RY(e,t,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(kc(e,r[n]))return!0;return!1}return r(e,t)}function Zo(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function zY(e){return OY.test(e)?"right":CY.test(e)?"center":EY.test(e)?"left":null}function Lw(e,t,r,n){const i=r.inTable;r.inTable=!0;let a=[[]],s="";function l(){if(!s)return;const u=a[a.length-1];u.push.apply(u,t(s,r)),s=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,f,d)=>{u.trim()==="|"&&(l(),n)?f!==0&&f!==d.length-1&&a.push([]):s+=u}),l(),r.inTable=i,a}function HY(e,t,r){r.inline=!0;const n=e[2]?e[2].replace(SY,"").split("|").map(zY):[],i=e[3]?function(s,l,u){return s.trim().split(`
121
- `).map(function(f){return Lw(f,l,u,!0)})}(e[3],t,r):[],a=Lw(e[1],t,r,!!i.length);return r.inline=!1,i.length?{align:n,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function jw(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function xa(e){return e.inline=1,e}function Yn(e){return xa(function(t,r){return r.inline?e.exec(t):null})}function Jn(e){return xa(function(t,r){return r.inline||r.simple?e.exec(t):null})}function $n(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function Lc(e){return xa(function(t){return e.exec(t)})}const KY=/(javascript|vbscript|data(?!:image)):/i;function GY(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(KY.test(t))return null}catch{return null}return e}function ln(e){return e&&e.replace(FY,"$1")}function jc(e,t,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(t,r);return r.inline=n,r.simple=i,a}function YY(e,t,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(t,r);return r.inline=n,r.simple=i,a}function JY(e,t,r){const n=r.inline||!1;r.inline=!1;const i=e(t,r);return r.inline=n,i}const Ip=(e,t,r)=>({children:jc(t,e[2],r)});function xp(){return{}}function Dp(){return null}function XY(...e){return e.filter(Boolean).join(" ")}function Fp(e,t,r){let n=e;const i=t.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}function ZY(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Pi({},bw,t.namedCodesToUnicode):bw;const r=t.slugify||Zo,n=t.sanitizer||GY,i=t.createElement||at.createElement,a=[_w,$w,ww,t.enforceAtxHeadings?Cw:Sw,Ew,Aw,Nw,Mw],s=[...a,yY,Op,Ow,Ap];function l(g,C,...S){const E=Fp(t.overrides,g+".props",{});return i(function(A,x){const N=Fp(x,A);return N?typeof N=="function"||typeof N=="object"&&"render"in N?N:Fp(x,A+".component",A):A}(g,t.overrides),Pi({},C,E,{className:XY(C==null?void 0:C.className,E.className)||void 0}),...S)}function u(g){g=g.replace(lY,"");let C=!1;t.forceInline?C=!0:t.forceBlock||(C=$Y.test(g)===!1);const S=_(y(C?g:Xo(g).replace(MY,"")+`
120
+ `):(u.inline=!0,A=Zo(v));const x=l(A,u);return u.inline=S,u.list=E,x}),ordered:r,start:f}},l:(s,l,u)=>e(s.ordered?"ol":"ul",{key:u.key,start:s.type==="20"?s.start:void 0},s.items.map(function(f,d){return e("li",{key:d},l(f,u))}))}}const zY=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),HY=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Zo(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function kc(e,t){return e.startsWith(t)}function KY(e,t,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(kc(e,r[n]))return!0;return!1}return r(e,t)}function Qo(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function GY(e){return PY.test(e)?"right":AY.test(e)?"center":TY.test(e)?"left":null}function Lw(e,t,r,n){const i=r.inTable;r.inTable=!0;let a=[[]],s="";function l(){if(!s)return;const u=a[a.length-1];u.push.apply(u,t(s,r)),s=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,f,d)=>{u.trim()==="|"&&(l(),n)?f!==0&&f!==d.length-1&&a.push([]):s+=u}),l(),r.inTable=i,a}function YY(e,t,r){r.inline=!0;const n=e[2]?e[2].replace(OY,"").split("|").map(GY):[],i=e[3]?function(s,l,u){return s.trim().split(`
121
+ `).map(function(f){return Lw(f,l,u,!0)})}(e[3],t,r):[],a=Lw(e[1],t,r,!!i.length);return r.inline=!1,i.length?{align:n,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function jw(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function xa(e){return e.inline=1,e}function Yn(e){return xa(function(t,r){return r.inline?e.exec(t):null})}function Jn(e){return xa(function(t,r){return r.inline||r.simple?e.exec(t):null})}function wn(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function Lc(e){return xa(function(t){return e.exec(t)})}const JY=/(javascript|vbscript|data(?!:image)):/i;function XY(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(JY.test(t))return null}catch{return null}return e}function cn(e){return e&&e.replace(kY,"$1")}function jc(e,t,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(t,r);return r.inline=n,r.simple=i,a}function ZY(e,t,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(t,r);return r.inline=n,r.simple=i,a}function QY(e,t,r){const n=r.inline||!1;r.inline=!1;const i=e(t,r);return r.inline=n,i}const xp=(e,t,r)=>({children:jc(t,e[2],r)});function Dp(){return{}}function Fp(){return null}function eJ(...e){return e.filter(Boolean).join(" ")}function Np(e,t,r){let n=e;const i=t.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}function tJ(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Pi({},bw,t.namedCodesToUnicode):bw;const r=t.slugify||Qo,n=t.sanitizer||XY,i=t.createElement||at.createElement,a=[_w,$w,ww,t.enforceAtxHeadings?Cw:Sw,Ew,Aw,Nw,Mw],s=[...a,_Y,Ap,Ow,Tp];function l(g,C,...S){const E=Np(t.overrides,g+".props",{});return i(function(A,x){const N=Np(x,A);return N?typeof N=="function"||typeof N=="object"&&"render"in N?N:Np(x,A+".component",A):A}(g,t.overrides),Pi({},C,E,{className:eJ(C==null?void 0:C.className,E.className)||void 0}),...S)}function u(g){g=g.replace(fY,"");let C=!1;t.forceInline?C=!0:t.forceBlock||(C=CY.test(g)===!1);const S=_(y(C?g:Zo(g).replace(jY,"")+`
122
122
 
123
- `,{inline:C}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(t.wrapper===null)return S;const E=t.wrapper||(C?"span":"div");let A;if(S.length>1||t.forceWrapper)A=S;else{if(S.length===1)return A=S[0],typeof A=="string"?l("span",{key:"outer"},A):A;A=null}return i(E,{key:"outer"},A)}function f(g,C){if(!C||!C.trim())return null;const S=C.match(YG);return S?S.reduce(function(E,A){const x=A.indexOf("=");if(x!==-1){const N=function(ee){return ee.indexOf("-")!==-1&&ee.match(fY)===null&&(ee=ee.replace(gY,function(te,ae){return ae.toUpperCase()})),ee}(A.slice(0,x)).trim(),Z=function(ee){const te=ee[0];return(te==='"'||te==="'")&&ee.length>=2&&ee[ee.length-1]===te?ee.slice(1,-1):ee}(A.slice(x+1).trim()),G=vw[N]||N;if(G==="ref")return E;const H=E[G]=function(ee,te,ae,Q){return te==="style"?function(k){const W=[];let R="",U=!1,J=!1,L="";if(!k)return W;for(let z=0;z<k.length;z++){const B=k[z];if(B!=='"'&&B!=="'"||U||(J?B===L&&(J=!1,L=""):(J=!0,L=B)),B==="("&&R.endsWith("url")?U=!0:B===")"&&U&&(U=!1),B!==";"||J||U)R+=B;else{const P=R.trim();if(P){const F=P.indexOf(":");if(F>0){const V=P.slice(0,F).trim(),X=P.slice(F+1).trim();W.push([V,X])}}R=""}}const D=R.trim();if(D){const z=D.indexOf(":");if(z>0){const B=D.slice(0,z).trim(),P=D.slice(z+1).trim();W.push([B,P])}}return W}(ae).reduce(function(k,[W,R]){return k[W.replace(/(-[a-z])/g,U=>U[1].toUpperCase())]=Q(R,ee,W),k},{}):GG.indexOf(te)!==-1?Q(ln(ae),ee,te):(ae.match(dY)&&(ae=ln(ae.slice(1,ae.length-1))),ae==="true"||ae!=="false"&&ae)}(g,N,Z,n);typeof H=="string"&&(Op.test(H)||Ap.test(H))&&(E[G]=u(H.trim()))}else A!=="style"&&(E[vw[A]||A]=!0);return E},{}):null}const d=[],p={},m={0:{t:[">"],o:$n(_w),i:1,u(g,C,S){const[,E,A]=g[0].replace(ZG,"").match(QG);return{alert:E,children:C(A,S)}},l(g,C,S){const E={key:S.key};return g.alert&&(E.className="markdown-alert-"+r(g.alert.toLowerCase(),Zo),g.children.unshift({attrs:{},children:[{type:"27",text:g.alert}],noInnerParse:!0,type:"11",tag:"header"})),l("blockquote",E,C(g.children,S))}},1:{o:Lc(eY),i:1,u:xp,l:(g,C,S)=>l("br",{key:S.key})},2:{t:g=>{const C=g[0];return C==="-"||C==="*"||C==="_"},o:$n(tY),i:1,u:xp,l:(g,C,S)=>l("hr",{key:S.key})},3:{t:[" "],o:$n(ww),i:0,u:g=>({lang:void 0,text:ln(Xo(g[0].replace(/^ {4}/gm,"")))}),l:(g,C,S)=>l("pre",{key:S.key},l("code",Pi({},g.attrs,{className:g.lang?"lang-"+g.lang:""}),g.text))},4:{t:["```","~~~"],o:$n($w),i:0,u:g=>({attrs:f("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:"3"})},5:{t:["`"],o:Jn(rY),i:3,u:g=>({text:ln(g[2])}),l:(g,C,S)=>l("code",{key:S.key},g.text)},6:{t:["[^"],o:$n(aY),i:0,u:g=>(d.push({footnote:g[2],identifier:g[1]}),{}),l:Dp},7:{t:["[^"],o:Yn(oY),i:1,u:g=>({target:"#"+r(g[1],Zo),text:g[1]}),l:(g,C,S)=>l("a",{key:S.key,href:n(g.target,"a","href")},l("sup",{key:S.key},g.text))},8:{t:["[ ]","[x]"],o:Yn(cY),i:1,u:g=>({completed:g[1].toLowerCase()==="x"}),l:(g,C,S)=>l("input",{checked:g.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:$n(t.enforceAtxHeadings?Cw:Sw),i:1,u:(g,C,S)=>({children:jc(C,g[2],S),id:r(g[2],Zo),level:g[1].length}),l:(g,C,S)=>l("h"+g.level,{id:g.id,key:S.key},C(g.children,S))},10:{o:$n(Ew),i:0,u:(g,C,S)=>({children:jc(C,g[1],S),level:g[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Lc(Op),i:1,u(g,C,S){const[,E]=g[3].match(kY),A=RegExp("^"+E,"gm"),x=g[3].replace(A,""),N=(Z=x,s.some(ae=>ae.test(Z))?JY:jc);var Z;const G=g[1].toLowerCase(),H=KG.indexOf(G)!==-1,ee=(H?G:g[1]).trim(),te={attrs:f(ee,g[2]),noInnerParse:H,tag:ee};if(S.inAnchor=S.inAnchor||G==="a",H)te.text=g[3];else{const ae=S.inHTML;S.inHTML=!0,te.children=N(C,x,S),S.inHTML=ae}return S.inAnchor=!1,te},l:(g,C,S)=>l(g.tag,Pi({key:S.key},g.attrs),g.text||(g.children?C(g.children,S):""))},13:{t:["<"],o:Lc(Ap),i:1,u(g){const C=g[1].trim();return{attrs:f(C,g[2]||""),tag:C}},l:(g,C,S)=>l(g.tag,Pi({},g.attrs,{key:S.key}))},12:{t:["<!--"],o:Lc(Ow),i:1,u:()=>({}),l:Dp},14:{t:["!["],o:Jn(VY),i:1,u:g=>({alt:ln(g[1]),target:ln(g[2]),title:ln(g[3])}),l:(g,C,S)=>l("img",{key:S.key,alt:g.alt||void 0,title:g.title||void 0,src:n(g.target,"img","src")})},15:{t:["["],o:Yn(qY),i:3,u:(g,C,S)=>({children:YY(C,g[1],S),target:ln(g[2]),title:ln(g[3])}),l:(g,C,S)=>l("a",{key:S.key,href:n(g.target,"a","href"),title:g.title},C(g.children,S))},16:{t:["<"],o:Yn(mY),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],type:"15"})},17:{t:(g,C)=>!C.inAnchor&&!t.disableAutoLink&&(kc(g,"http://")||kc(g,"https://")),o:Yn(hY),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],title:void 0,type:"15"})},18:{t:["<"],o:Yn(pY),i:0,u(g){let C=g[1],S=g[1];return JG.test(S)||(S="mailto:"+S),{children:[{text:C.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:kw(l,1),33:kw(l,2),19:{o:$n(nY),i:3,u:xp,l:()=>`
123
+ `,{inline:C}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(t.wrapper===null)return S;const E=t.wrapper||(C?"span":"div");let A;if(S.length>1||t.forceWrapper)A=S;else{if(S.length===1)return A=S[0],typeof A=="string"?l("span",{key:"outer"},A):A;A=null}return i(E,{key:"outer"},A)}function f(g,C){if(!C||!C.trim())return null;const S=C.match(ZG);return S?S.reduce(function(E,A){const x=A.indexOf("=");if(x!==-1){const N=function(te){return te.indexOf("-")!==-1&&te.match(pY)===null&&(te=te.replace(bY,function(ee,ae){return ae.toUpperCase()})),te}(A.slice(0,x)).trim(),Y=function(te){const ee=te[0];return(ee==='"'||ee==="'")&&te.length>=2&&te[te.length-1]===ee?te.slice(1,-1):te}(A.slice(x+1).trim()),K=vw[N]||N;if(K==="ref")return E;const H=E[K]=function(te,ee,ae,Q){return ee==="style"?function(k){const q=[];let W="",L=!1,X=!1,U="";if(!k)return q;for(let z=0;z<k.length;z++){const j=k[z];if(j!=='"'&&j!=="'"||L||(X?j===U&&(X=!1,U=""):(X=!0,U=j)),j==="("&&W.endsWith("url")?L=!0:j===")"&&L&&(L=!1),j!==";"||X||L)W+=j;else{const T=W.trim();if(T){const D=T.indexOf(":");if(D>0){const V=T.slice(0,D).trim(),Z=T.slice(D+1).trim();q.push([V,Z])}}W=""}}const F=W.trim();if(F){const z=F.indexOf(":");if(z>0){const j=F.slice(0,z).trim(),T=F.slice(z+1).trim();q.push([j,T])}}return q}(ae).reduce(function(k,[q,W]){return k[q.replace(/(-[a-z])/g,L=>L[1].toUpperCase())]=Q(W,te,q),k},{}):XG.indexOf(ee)!==-1?Q(cn(ae),te,ee):(ae.match(mY)&&(ae=cn(ae.slice(1,ae.length-1))),ae==="true"||ae!=="false"&&ae)}(g,N,Y,n);typeof H=="string"&&(Ap.test(H)||Tp.test(H))&&(E[K]=u(H.trim()))}else A!=="style"&&(E[vw[A]||A]=!0);return E},{}):null}const d=[],p={},m={0:{t:[">"],o:wn(_w),i:1,u(g,C,S){const[,E,A]=g[0].replace(tY,"").match(rY);return{alert:E,children:C(A,S)}},l(g,C,S){const E={key:S.key};return g.alert&&(E.className="markdown-alert-"+r(g.alert.toLowerCase(),Qo),g.children.unshift({attrs:{},children:[{type:"27",text:g.alert}],noInnerParse:!0,type:"11",tag:"header"})),l("blockquote",E,C(g.children,S))}},1:{o:Lc(nY),i:1,u:Dp,l:(g,C,S)=>l("br",{key:S.key})},2:{t:g=>{const C=g[0];return C==="-"||C==="*"||C==="_"},o:wn(iY),i:1,u:Dp,l:(g,C,S)=>l("hr",{key:S.key})},3:{t:[" "],o:wn(ww),i:0,u:g=>({lang:void 0,text:cn(Zo(g[0].replace(/^ {4}/gm,"")))}),l:(g,C,S)=>l("pre",{key:S.key},l("code",Pi({},g.attrs,{className:g.lang?"lang-"+g.lang:""}),g.text))},4:{t:["```","~~~"],o:wn($w),i:0,u:g=>({attrs:f("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:"3"})},5:{t:["`"],o:Jn(aY),i:3,u:g=>({text:cn(g[2])}),l:(g,C,S)=>l("code",{key:S.key},g.text)},6:{t:["[^"],o:wn(lY),i:0,u:g=>(d.push({footnote:g[2],identifier:g[1]}),{}),l:Fp},7:{t:["[^"],o:Yn(cY),i:1,u:g=>({target:"#"+r(g[1],Qo),text:g[1]}),l:(g,C,S)=>l("a",{key:S.key,href:n(g.target,"a","href")},l("sup",{key:S.key},g.text))},8:{t:["[ ]","[x]"],o:Yn(dY),i:1,u:g=>({completed:g[1].toLowerCase()==="x"}),l:(g,C,S)=>l("input",{checked:g.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:wn(t.enforceAtxHeadings?Cw:Sw),i:1,u:(g,C,S)=>({children:jc(C,g[2],S),id:r(g[2],Qo),level:g[1].length}),l:(g,C,S)=>l("h"+g.level,{id:g.id,key:S.key},C(g.children,S))},10:{o:wn(Ew),i:0,u:(g,C,S)=>({children:jc(C,g[1],S),level:g[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Lc(Ap),i:1,u(g,C,S){const[,E]=g[3].match(BY),A=RegExp("^"+E,"gm"),x=g[3].replace(A,""),N=(Y=x,s.some(ae=>ae.test(Y))?QY:jc);var Y;const K=g[1].toLowerCase(),H=JG.indexOf(K)!==-1,te=(H?K:g[1]).trim(),ee={attrs:f(te,g[2]),noInnerParse:H,tag:te};if(S.inAnchor=S.inAnchor||K==="a",H)ee.text=g[3];else{const ae=S.inHTML;S.inHTML=!0,ee.children=N(C,x,S),S.inHTML=ae}return S.inAnchor=!1,ee},l:(g,C,S)=>l(g.tag,Pi({key:S.key},g.attrs),g.text||(g.children?C(g.children,S):""))},13:{t:["<"],o:Lc(Tp),i:1,u(g){const C=g[1].trim();return{attrs:f(C,g[2]||""),tag:C}},l:(g,C,S)=>l(g.tag,Pi({},g.attrs,{key:S.key}))},12:{t:["<!--"],o:Lc(Ow),i:1,u:()=>({}),l:Fp},14:{t:["!["],o:Jn(HY),i:1,u:g=>({alt:cn(g[1]),target:cn(g[2]),title:cn(g[3])}),l:(g,C,S)=>l("img",{key:S.key,alt:g.alt||void 0,title:g.title||void 0,src:n(g.target,"img","src")})},15:{t:["["],o:Yn(zY),i:3,u:(g,C,S)=>({children:ZY(C,g[1],S),target:cn(g[2]),title:cn(g[3])}),l:(g,C,S)=>l("a",{key:S.key,href:n(g.target,"a","href"),title:g.title},C(g.children,S))},16:{t:["<"],o:Yn(vY),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],type:"15"})},17:{t:(g,C)=>!C.inAnchor&&!t.disableAutoLink&&(kc(g,"http://")||kc(g,"https://")),o:Yn(gY),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],title:void 0,type:"15"})},18:{t:["<"],o:Yn(yY),i:0,u(g){let C=g[1],S=g[1];return QG.test(S)||(S="mailto:"+S),{children:[{text:C.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:kw(l,1),33:kw(l,2),19:{o:wn(oY),i:3,u:Dp,l:()=>`
124
124
  `},21:{o:xa(function(g,C){if(C.inline||C.simple||C.inHTML&&g.indexOf(`
125
125
 
126
126
  `)===-1&&C.prevCapture.indexOf(`
127
127
 
128
128
  `)===-1)return null;let S="";g.split(`
129
129
  `).every(A=>(A+=`
130
- `,!a.some(x=>x.test(A))&&(S+=A,!!A.trim())));const E=Xo(S);return E===""?null:[S,,E]}),i:3,u:Ip,l:(g,C,S)=>l("p",{key:S.key},C(g.children,S))},22:{t:["["],o:Yn(vY),i:0,u:g=>(p[g[1]]={target:g[2],title:g[4]},{}),l:Dp},23:{t:["!["],o:Jn(bY),i:0,u:g=>({alt:g[1]?ln(g[1]):void 0,ref:g[2]}),l:(g,C,S)=>p[g.ref]?l("img",{key:S.key,alt:g.alt,src:n(p[g.ref].target,"img","src"),title:p[g.ref].title}):null},24:{t:g=>g[0]==="["&&g.indexOf("](")===-1,o:Yn(_Y),i:0,u:(g,C,S)=>({children:C(g[1],S),fallbackChildren:g[0],ref:g[2]}),l:(g,C,S)=>p[g.ref]?l("a",{key:S.key,href:n(p[g.ref].target,"a","href"),title:p[g.ref].title},C(g.children,S)):l("span",{key:S.key},g.fallbackChildren)},25:{t:["|"],o:$n(Aw),i:1,u:HY,l(g,C,S){const E=g;return l("table",{key:S.key},l("thead",null,l("tr",null,E.header.map(function(A,x){return l("th",{key:x,style:jw(E,x)},C(A,S))}))),l("tbody",null,E.cells.map(function(A,x){return l("tr",{key:x},A.map(function(N,Z){return l("td",{key:Z,style:jw(E,Z)},C(N,S))}))})))}},27:{o:xa(function(g,C){let S;return kc(g,":")&&(S=xY.exec(g)),S||NY.exec(g)}),i:4,u(g){const C=g[0];return{text:C.indexOf("&")===-1?C:C.replace(uY,(S,E)=>t.namedCodesToUnicode[E]||S)}},l:g=>g.text},28:{t:["**","__"],o:Jn(AY),i:2,u:(g,C,S)=>({children:C(g[2],S)}),l:(g,C,S)=>l("strong",{key:S.key},C(g.children,S))},29:{t:g=>{const C=g[0];return(C==="*"||C==="_")&&g[1]!==C},o:Jn(TY),i:3,u:(g,C,S)=>({children:C(g[2],S)}),l:(g,C,S)=>l("em",{key:S.key},C(g.children,S))},30:{t:["\\"],o:Jn(DY),i:1,u:g=>({text:g[1],type:"27"})},31:{t:["=="],o:Jn(PY),i:3,u:Ip,l:(g,C,S)=>l("mark",{key:S.key},C(g.children,S))},32:{t:["~~"],o:Jn(IY),i:3,u:Ip,l:(g,C,S)=>l("del",{key:S.key},C(g.children,S))}};t.disableParsingRawHTML===!0&&(delete m[11],delete m[13]);const y=function(g){var C=Object.keys(g);function S(E,A){var x=[];if(A.prevCapture=A.prevCapture||"",E.trim())for(;E;)for(var N=0;N<C.length;){var Z=C[N],G=g[Z];if(!G.t||RY(E,A,G.t)){var H=G.o(E,A);if(H&&H[0]){E=E.substring(H[0].length);var ee=G.u(H,S,A);A.prevCapture+=H[0],ee.type||(ee.type=Z),x.push(ee);break}N++}else N++}return A.prevCapture="",x}return C.sort(function(E,A){return g[E].i-g[A].i||(E<A?-1:1)}),function(E,A){return S(function(x){return x.replace(iY,`
131
- `).replace(sY,"").replace(wY," ")}(E),A)}}(m),_=(w=function(g,C){return function(S,E,A){const x=g[S.type].l;return C?C(()=>x(S,E,A),S,E,A):x(S,E,A)}}(m,t.renderRule),function g(C,S={}){if(Array.isArray(C)){const E=S.key,A=[];let x=!1;for(let N=0;N<C.length;N++){S.key=N;const Z=g(C[N],S),G=typeof Z=="string";G&&x?A[A.length-1]+=Z:Z!==null&&A.push(Z),x=G}return S.key=E,A}return w(C,g,S)});var w;const v=u(e);return d.length?l("div",null,v,l("footer",{key:"footer"},d.map(function(g){return l("div",{id:r(g.identifier,Zo),key:g.identifier},g.identifier,_(y(g.footnote,{inline:!0})))}))):v}const Bc=e=>{let{children:t="",options:r}=e,n=function(i,a){if(i==null)return{};var s,l,u={},f=Object.keys(i);for(l=0;l<f.length;l++)a.indexOf(s=f[l])>=0||(u[s]=i[s]);return u}(e,HG);return at.cloneElement(ZY(t,r),n)};function QY(e,t){return e==null?!0:k0(e,t)}class eJ extends j.Component{constructor(){super(...arguments);pe(this,"state",{wasPropertyKeyModified:!1,additionalProperties:{}});pe(this,"onPropertyChange",(r,n=!1)=>(i,a,s)=>{const{formData:l,onChange:u,errorSchema:f}=this.props;i===void 0&&n&&(i="");const d={...l,[r]:i};u(d,f&&f&&{...f,[r]:a},s)});pe(this,"onDropPropertyClick",r=>n=>{n.preventDefault();const{onChange:i,formData:a}=this.props,s={...a};QY(s,r),i(s)});pe(this,"getAvailableKey",(r,n)=>{const{uiSchema:i,registry:a}=this.props,{duplicateKeySuffixSeparator:s="-"}=we(i,a.globalUiOptions);let l=0,u=r;for(;We(n,u);)u=`${r}${s}${++l}`;return u});pe(this,"onKeyChange",r=>(n,i)=>{if(r===n)return;const{formData:a,onChange:s,errorSchema:l}=this.props;n=this.getAvailableKey(n,a);const u={...a},f={[r]:n},d=Object.keys(u).map(m=>({[f[m]||m]:u[m]})),p=Object.assign({},...d);this.setState({wasPropertyKeyModified:!0}),s(p,l&&l&&{...l,[n]:i})});pe(this,"handleAddClick",r=>()=>{if(!(r.additionalProperties||r.patternProperties))return;const{formData:n,onChange:i,registry:a}=this.props,s={...n},l=this.getAvailableKey("newKey",s);if(r.patternProperties)Qe(s,l,null);else{let u,f,d;if(Re(r.additionalProperties)){u=r.additionalProperties.type,f=r.additionalProperties.const,d=r.additionalProperties.default;let m=r.additionalProperties;if(ot in m){const{schemaUtils:y}=a;m=y.retrieveSchema({$ref:m[ot]},n),u=m.type,f=m.const,d=m.default}!u&&(gt in m||Ze in m)&&(u="object")}const p=f??d??this.getDefaultValue(u);Qe(s,l,p)}i(s)})}isRequired(r){const{schema:n}=this.props;return Array.isArray(n.required)&&n.required.indexOf(r)!==-1}getDefaultValue(r){const{registry:{translateString:n}}=this.props;switch(r){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return n(Be.NewStringDefault)}}render(){const{schema:r,uiSchema:n={},formData:i,errorSchema:a,idSchema:s,name:l,required:u=!1,disabled:f,readonly:d,hideError:p,idPrefix:m,idSeparator:y,onBlur:_,onFocus:w,registry:v,title:g}=this.props,{fields:C,formContext:S,schemaUtils:E,translateString:A,globalUiOptions:x}=v,{SchemaField:N}=C,Z=E.retrieveSchema(r,i),G=we(n,x),{properties:H={}}=Z,ee=G.title??Z.title??g??l,te=G.description??Z.description;let ae;try{const W=Object.keys(H);ae=dR(W,G.order)}catch(W){return $.jsxs("div",{children:[$.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:$.jsx(Bc,{options:{disableParsingRawHTML:!0},children:A(Be.InvalidObjectField,[l||"root",W.message])})}),$.jsx("pre",{children:JSON.stringify(Z)})]})}const Q=Se("ObjectFieldTemplate",v,G),k={title:G.label===!1?"":ee,description:G.label===!1?void 0:te,properties:ae.map(W=>{const R=We(Z,[Ve,W,jn]),U=R?n.additionalProperties:n[W],J=we(U).widget==="hidden",L=de(s,[W],{});return{content:$.jsx(N,{name:W,required:this.isRequired(W),schema:de(Z,[Ve,W],{}),uiSchema:U,errorSchema:de(a,W),idSchema:L,idPrefix:m,idSeparator:y,formData:de(i,W),formContext:S,wasPropertyKeyModified:this.state.wasPropertyKeyModified,onKeyChange:this.onKeyChange(W),onChange:this.onPropertyChange(W,R),onBlur:_,onFocus:w,registry:v,disabled:f,readonly:d,hideError:p,onDropPropertyClick:this.onDropPropertyClick},W),name:W,readonly:d,disabled:f,required:u,hidden:J}}),readonly:d,disabled:f,required:u,idSchema:s,uiSchema:n,errorSchema:a,schema:Z,formData:i,formContext:S,registry:v};return $.jsx(Q,{...k,onAddClick:this.handleAddClick})}}const tJ={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function rJ(e,t,r,n){const i=t.field,{fields:a,translateString:s}=n;if(typeof i=="function")return i;if(typeof i=="string"&&i in a)return a[i];const l=gn(e),u=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=tJ[u];return f&&f in a&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in a?a[d]:()=>{const p=Se("UnsupportedFieldTemplate",n,t);return $.jsx(p,{schema:e,idSchema:r,reason:s(Be.UnknownFieldType,[String(e.type)]),registry:n})}}function nJ(e){const{schema:t,idSchema:r,uiSchema:n,formData:i,errorSchema:a,idPrefix:s,idSeparator:l,name:u,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,registry:y,wasPropertyKeyModified:_=!1}=e,{formContext:w,schemaUtils:v,globalUiOptions:g}=y,C=we(n,g),S=Se("FieldTemplate",y,C),E=Se("DescriptionFieldTemplate",y,C),A=Se("FieldHelpTemplate",y,C),x=Se("FieldErrorTemplate",y,C),N=v.retrieveSchema(t,i),Z=r[$t],G=vn(v.toIdSchema(N,Z,i,s,l),r),H=j.useCallback((me,Pt,Vt)=>f(me,Pt,Vt||Z),[Z,f]),ee=rJ(N,C,G,y),te=!!(C.disabled??e.disabled),ae=!!(C.readonly??(e.readonly||e.schema.readOnly||N.readOnly)),Q=C.hideError,k=Q===void 0?e.hideError:!!Q,W=!!(C.autofocus??e.autofocus);if(Object.keys(N).length===0)return null;const R=v.getDisplayLabel(N,n,g),{__errors:U,...J}=a||{},L=yo(n,["ui:classNames","classNames","ui:style"]);zr in L&&(L[zr]=yo(L[zr],["classNames","style"]));const D=$.jsx(ee,{...e,onChange:H,idSchema:G,schema:N,uiSchema:L,disabled:te,readonly:ae,hideError:k,autofocus:W,errorSchema:J,formContext:w,rawErrors:U}),z=G[$t];let B;_?B=u:B=jn in N?u:C.title||e.schema.title||N.title||e.title||u;const P=C.description||e.schema.description||N.description||"",F=C.help,V=C.widget==="hidden",X=["rjsf-field",`rjsf-field-${gn(N)}`];!k&&U&&U.length>0&&X.push("rjsf-field-error"),C.classNames&&X.push(C.classNames);const oe=$.jsx(A,{help:F,idSchema:G,schema:N,uiSchema:n,hasErrors:!k&&U&&U.length>0,registry:y}),ue=k||(N.anyOf||N.oneOf)&&!v.isSelect(N)?void 0:$.jsx(x,{errors:U,errorSchema:a,idSchema:G,schema:N,uiSchema:n,registry:y}),he={description:$.jsx(E,{id:pa(z),description:P,schema:N,uiSchema:n,registry:y}),rawDescription:P,help:oe,rawHelp:typeof F=="string"?F:void 0,errors:ue,rawErrors:k?void 0:U,id:z,label:B,hidden:V,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,disabled:te,readonly:ae,hideError:k,displayLabel:R,classNames:X.join(" ").trim(),style:C.style,formContext:w,formData:i,schema:N,uiSchema:n,registry:y},be=y.fields.AnyOfField,Le=y.fields.OneOfField,ut=(n==null?void 0:n["ui:field"])&&(n==null?void 0:n["ui:fieldReplacesAnyOrOneOf"])===!0;return $.jsx(S,{...he,children:$.jsxs($.Fragment,{children:[D,N.anyOf&&!ut&&!v.isSelect(N)&&$.jsx(be,{name:u,disabled:te,readonly:ae,hideError:k,errorSchema:a,formData:i,formContext:w,idPrefix:s,idSchema:G,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.anyOf.map(me=>v.retrieveSchema(Re(me)?me:{},i)),registry:y,required:m,schema:N,uiSchema:n}),N.oneOf&&!ut&&!v.isSelect(N)&&$.jsx(Le,{name:u,disabled:te,readonly:ae,hideError:k,errorSchema:a,formData:i,formContext:w,idPrefix:s,idSchema:G,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.oneOf.map(me=>v.retrieveSchema(Re(me)?me:{},i)),registry:y,required:m,schema:N,uiSchema:n})]})})}class iJ extends j.Component{shouldComponentUpdate(t){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props.registry;return A_(this,t,this.state,r)}render(){return $.jsx(nJ,{...this.props})}}function aJ(e){const{schema:t,name:r,uiSchema:n,idSchema:i,formData:a,required:s,disabled:l=!1,readonly:u=!1,autofocus:f=!1,onChange:d,onBlur:p,onFocus:m,registry:y,rawErrors:_,hideError:w}=e,{title:v,format:g}=t,{widgets:C,formContext:S,schemaUtils:E,globalUiOptions:A}=y,x=E.isSelect(t)?ua(t,n):void 0;let N=x?"select":"text";g&&uR(t,g,C)&&(N=g);const{widget:Z=N,placeholder:G="",title:H,...ee}=we(n),te=E.getDisplayLabel(t,n,A),ae=H??v??r,Q=Qr(t,Z,C);return $.jsx(Q,{options:{...ee,enumOptions:x},schema:t,uiSchema:n,id:i.$id,name:r,label:ae,hideLabel:!te,hideError:w,value:a,onChange:d,onBlur:p,onFocus:m,required:s,disabled:l,readonly:u,formContext:S,autofocus:f,registry:y,placeholder:G,rawErrors:_})}function oJ(e){const{formData:t,onChange:r}=e;return j.useEffect(()=>{t===void 0&&r(null)},[t,r]),null}function sJ(){return{AnyOfField:yw,ArrayField:xG,BooleanField:DG,LayoutGridField:Cp,LayoutHeaderField:WG,LayoutMultiSchemaField:qG,NumberField:zG,ObjectField:eJ,OneOfField:yw,SchemaField:iJ,StringField:aJ,NullField:oJ}}function lJ(e){const{idSchema:t,description:r,registry:n,schema:i,uiSchema:a}=e,s=we(a,n.globalUiOptions),{label:l=!0}=s;if(!r||!l)return null;const u=Se("DescriptionFieldTemplate",n,s);return $.jsx(u,{id:pa(t),description:r,schema:i,uiSchema:a,registry:n})}function cJ(e){const{children:t,className:r,buttonsProps:n,hasToolbar:i,registry:a,uiSchema:s}=e,l=we(s),u=Se("ArrayFieldItemButtonsTemplate",a,l),f={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};return $.jsxs("div",{className:r,children:[$.jsx("div",{className:i?"col-xs-9":"col-xs-12",children:t}),i&&$.jsx("div",{className:"col-xs-3 array-item-toolbox",children:$.jsx("div",{className:"btn-group",style:{display:"flex",justifyContent:"space-around"},children:$.jsx(u,{...n,style:f})})})]})}function uJ(e){const{disabled:t,hasCopy:r,hasMoveDown:n,hasMoveUp:i,hasRemove:a,idSchema:s,index:l,onCopyIndexClick:u,onDropIndexClick:f,onReorderClick:d,readonly:p,registry:m,uiSchema:y}=e,{CopyButton:_,MoveDownButton:w,MoveUpButton:v,RemoveButton:g}=m.templates.ButtonTemplates,C=j.useMemo(()=>u(l),[l,u]),S=j.useMemo(()=>f(l),[l,f]),E=j.useMemo(()=>d(l,l-1),[l,d]),A=j.useMemo(()=>d(l,l+1),[l,d]);return $.jsxs($.Fragment,{children:[(i||n)&&$.jsx(v,{id:en(s,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!i,onClick:E,uiSchema:y,registry:m}),(i||n)&&$.jsx(w,{id:en(s,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!n,onClick:A,uiSchema:y,registry:m}),r&&$.jsx(_,{id:en(s,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:C,uiSchema:y,registry:m}),a&&$.jsx(g,{id:en(s,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:S,uiSchema:y,registry:m})]})}function fJ(e){const{canAdd:t,className:r,disabled:n,idSchema:i,uiSchema:a,items:s,onAddClick:l,readonly:u,registry:f,required:d,schema:p,title:m}=e,y=we(a),_=Se("ArrayFieldDescriptionTemplate",f,y),w=Se("ArrayFieldItemTemplate",f,y),v=Se("ArrayFieldTitleTemplate",f,y),{ButtonTemplates:{AddButton:g}}=f.templates;return $.jsxs("fieldset",{className:r,id:i.$id,children:[$.jsx(v,{idSchema:i,title:y.title||m,required:d,schema:p,uiSchema:a,registry:f}),$.jsx(_,{idSchema:i,description:y.description||p.description,schema:p,uiSchema:a,registry:f}),$.jsx("div",{className:"row array-item-list",children:s&&s.map(({key:C,...S})=>$.jsx(w,{...S},C))}),t&&$.jsx(g,{id:en(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:n||u,uiSchema:a,registry:f})]})}function dJ(e){const{idSchema:t,title:r,schema:n,uiSchema:i,required:a,registry:s}=e,l=we(i,s.globalUiOptions),{label:u=!0}=l;if(!r||!u)return null;const f=Se("TitleFieldTemplate",s,l);return $.jsx(f,{id:Cl(t),title:r,required:a,schema:n,uiSchema:i,registry:s})}function hJ(e){const{id:t,name:r,value:n,readonly:i,disabled:a,autofocus:s,onBlur:l,onFocus:u,onChange:f,onChangeOverride:d,options:p,schema:m,uiSchema:y,formContext:_,registry:w,rawErrors:v,type:g,hideLabel:C,hideError:S,...E}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const A={...E,...v_(m,g,p)};let x;A.type==="number"||A.type==="integer"?x=n||n===0?n:"":x=n??"";const N=j.useCallback(({target:{value:H}})=>f(H===""?p.emptyValue:H),[f,p]),Z=j.useCallback(({target:H})=>l(t,H&&H.value),[l,t]),G=j.useCallback(({target:H})=>u(t,H&&H.value),[u,t]);return $.jsxs($.Fragment,{children:[$.jsx("input",{id:t,name:t,className:"form-control",readOnly:i,disabled:a,autoFocus:s,value:x,...A,list:m.examples?ma(t):void 0,onChange:d||N,onBlur:Z,onFocus:G,"aria-describedby":At(t,!!m.examples)}),Array.isArray(m.examples)&&$.jsx("datalist",{id:ma(t),children:m.examples.concat(m.default&&!m.examples.includes(m.default)?[m.default]:[]).map(H=>$.jsx("option",{value:H},H))},`datalist_${t}`)]})}function pJ({uiSchema:e}){const{submitText:t,norender:r,props:n={}}=Ld(e);return r?null:$.jsx("div",{children:$.jsx("button",{type:"submit",...n,className:`btn btn-info ${n.className||""}`,children:t})})}function Qo(e){const{iconType:t="default",icon:r,className:n,uiSchema:i,registry:a,...s}=e;return $.jsx("button",{type:"button",className:`btn btn-${t} ${n}`,...s,children:$.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function mJ(e){const{registry:{translateString:t}}=e;return $.jsx(Qo,{title:t(Be.CopyButton),...e,icon:"copy"})}function gJ(e){const{registry:{translateString:t}}=e;return $.jsx(Qo,{title:t(Be.MoveDownButton),...e,icon:"arrow-down"})}function yJ(e){const{registry:{translateString:t}}=e;return $.jsx(Qo,{title:t(Be.MoveUpButton),...e,icon:"arrow-up"})}function vJ(e){const{registry:{translateString:t}}=e;return $.jsx(Qo,{title:t(Be.RemoveButton),...e,iconType:"danger",icon:"remove"})}function bJ({className:e,onClick:t,disabled:r,registry:n}){const{translateString:i}=n;return $.jsx("div",{className:"row",children:$.jsx("p",{className:`col-xs-3 col-xs-offset-9 text-right ${e}`,children:$.jsx(Qo,{iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(Be.AddButton),onClick:t,disabled:r,registry:n})})})}function _J(){return{SubmitButton:pJ,AddButton:bJ,CopyButton:mJ,MoveDownButton:gJ,MoveUpButton:yJ,RemoveButton:vJ}}const Bw=$_();function Np({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:n}=t;return we(r,n).enableMarkdownInDescription&&typeof e=="string"?$.jsx(Bc,{options:{disableParsingRawHTML:!0},"data-testid":Bw.markdown,children:e}):e}Np.TEST_IDS=Bw;function $J(e){const{id:t,description:r,registry:n,uiSchema:i}=e;return r?$.jsx("div",{id:t,className:"field-description",children:$.jsx(Np,{description:r,registry:n,uiSchema:i})}):null}function wJ({errors:e,registry:t}){const{translateString:r}=t;return $.jsxs("div",{className:"panel panel-danger errors",children:[$.jsx("div",{className:"panel-heading",children:$.jsx("h3",{className:"panel-title",children:r(Be.ErrorsLabel)})}),$.jsx("ul",{className:"list-group",children:e.map((n,i)=>$.jsx("li",{className:"list-group-item text-danger",children:n.stack},i))})]})}const SJ="*";function Uw(e){const{label:t,required:r,id:n}=e;return t?$.jsxs("label",{className:"control-label",htmlFor:n,children:[t,r&&$.jsx("span",{className:"required",children:SJ})]}):null}function CJ(e){const{id:t,label:r,children:n,errors:i,help:a,description:s,hidden:l,required:u,displayLabel:f,registry:d,uiSchema:p}=e,m=we(p),y=Se("WrapIfAdditionalTemplate",d,m);return l?$.jsx("div",{className:"hidden",children:n}):$.jsxs(y,{...e,children:[f&&$.jsx(Uw,{label:r,required:u,id:t}),f&&s?s:null,n,i,a]})}function EJ(e){const{errors:t=[],idSchema:r}=e;if(t.length===0)return null;const n=Ud(r);return $.jsx("div",{children:$.jsx("ul",{id:n,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,a)=>$.jsx("li",{className:"text-danger",children:i},a))})})}function OJ(e){const{idSchema:t,help:r}=e;if(!r)return null;const n=E_(t);return typeof r=="string"?$.jsx("p",{id:n,className:"help-block",children:r}):$.jsx("div",{id:n,className:"help-block",children:r})}function AJ(e){const{children:t,column:r,className:n,...i}=e;return $.jsx("div",{className:n,...i,children:t})}function TJ(e){const{selector:t,optionSchemaField:r}=e;return $.jsxs("div",{className:"panel panel-default panel-body",children:[$.jsx("div",{className:"form-group",children:t}),r]})}function PJ(e){const{description:t,disabled:r,formData:n,idSchema:i,onAddClick:a,properties:s,readonly:l,registry:u,required:f,schema:d,title:p,uiSchema:m}=e,y=we(m),_=Se("TitleFieldTemplate",u,y),w=Se("DescriptionFieldTemplate",u,y),{ButtonTemplates:{AddButton:v}}=u.templates;return $.jsxs("fieldset",{id:i.$id,children:[p&&$.jsx(_,{id:Cl(i),title:p,required:f,schema:d,uiSchema:m,registry:u}),t&&$.jsx(w,{id:pa(i),description:t,schema:d,uiSchema:m,registry:u}),s.map(g=>g.content),Rg(d,m,n)&&$.jsx(v,{id:en(i,"add"),className:"rjsf-object-property-expand",onClick:a(d),disabled:r||l,uiSchema:m,registry:u})]})}const IJ="*";function xJ(e){const{id:t,title:r,required:n}=e;return $.jsxs("legend",{id:t,children:[r,n&&$.jsx("span",{className:"required",children:IJ})]})}function DJ(e){const{schema:t,idSchema:r,reason:n,registry:i}=e,{translateString:a}=i;let s=Be.UnsupportedField;const l=[];return r&&r.$id&&(s=Be.UnsupportedFieldWithId,l.push(r.$id)),n&&(s=s===Be.UnsupportedField?Be.UnsupportedFieldWithReason:Be.UnsupportedFieldWithIdAndReason,l.push(n)),$.jsxs("div",{className:"unsupported-field",children:[$.jsx("p",{children:$.jsx(Bc,{options:{disableParsingRawHTML:!0},children:a(s,l)})}),t&&$.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function FJ(e){const{id:t,classNames:r,style:n,disabled:i,label:a,onKeyChange:s,onDropPropertyClick:l,readonly:u,required:f,schema:d,hideError:p,rawErrors:m,children:y,uiSchema:_,registry:w}=e,{templates:v,translateString:g}=w,{RemoveButton:C}=v.ButtonTemplates,S=g(Be.KeyLabel,[a]),E=jn in d,A=["form-group",r];!p&&m&&m.length>0&&A.push("has-error has-danger");const x=A.join(" ").trim();return E?$.jsx("div",{className:x,style:n,children:$.jsxs("div",{className:"row",children:[$.jsx("div",{className:"col-xs-5 form-additional",children:$.jsxs("div",{className:"form-group",children:[$.jsx(Uw,{label:S,required:f,id:`${t}-key`}),$.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:({target:N})=>s(N&&N.value),defaultValue:a})]})}),$.jsx("div",{className:"form-additional form-group col-xs-5",children:y}),$.jsx("div",{className:"col-xs-2",children:$.jsx(C,{id:en(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l(a),uiSchema:_,registry:w})})]})}):$.jsx("div",{className:x,style:n,children:y})}function NJ(){return{ArrayFieldDescriptionTemplate:lJ,ArrayFieldItemTemplate:cJ,ArrayFieldItemButtonsTemplate:uJ,ArrayFieldTemplate:fJ,ArrayFieldTitleTemplate:dJ,ButtonTemplates:_J(),BaseInputTemplate:hJ,DescriptionFieldTemplate:$J,ErrorListTemplate:wJ,FieldTemplate:CJ,FieldErrorTemplate:EJ,FieldHelpTemplate:OJ,GridTemplate:AJ,MultiSchemaFieldTemplate:TJ,ObjectFieldTemplate:PJ,TitleFieldTemplate:xJ,UnsupportedFieldTemplate:DJ,WrapIfAdditionalTemplate:FJ}}function MJ(e){return Object.values(e).every(t=>t!==-1)}function kJ({type:e,range:t,value:r,select:n,rootId:i,name:a,disabled:s,readonly:l,autofocus:u,registry:f,onBlur:d,onFocus:p}){const m=i+"_"+e,{SelectWidget:y}=f.widgets;return $.jsx(y,{schema:{type:"integer"},id:m,name:a,className:"form-control",options:{enumOptions:Md(t[0],t[1])},placeholder:e,value:r,disabled:s,readonly:l,autofocus:u,onChange:_=>n(e,_),onBlur:d,onFocus:p,registry:f,label:"","aria-describedby":At(i)})}function LJ({time:e=!1,disabled:t=!1,readonly:r=!1,autofocus:n=!1,options:i,id:a,name:s,registry:l,onBlur:u,onFocus:f,onChange:d,value:p}){const{translateString:m}=l,[y,_]=j.useState(p),[w,v]=j.useReducer((E,A)=>({...E,...A}),ga(p,e));j.useEffect(()=>{const E=Al(w,e);MJ(w)&&E!==p?d(E):y!==p&&(_(p),v(ga(p,e)))},[e,p,d,w,y]);const g=j.useCallback((E,A)=>{v({[E]:A})},[]),C=j.useCallback(E=>{if(E.preventDefault(),t||r)return;const A=ga(new Date().toJSON(),e);d(Al(A,e))},[t,r,e]),S=j.useCallback(E=>{E.preventDefault(),!(t||r)&&d(void 0)},[t,r,d]);return $.jsxs("ul",{className:"list-inline",children:[g_(w,e,i.yearsRange,i.format).map((E,A)=>$.jsx("li",{className:"list-inline-item",children:$.jsx(kJ,{rootId:a,name:s,select:g,...E,disabled:t,readonly:r,registry:l,onBlur:u,onFocus:f,autofocus:n&&A===0})},A)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&$.jsx("li",{className:"list-inline-item",children:$.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:C,children:m(Be.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&$.jsx("li",{className:"list-inline-item",children:$.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:S,children:m(Be.ClearLabel)})})]})}function jJ({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return $.jsx(r,{time:e,...t})}function BJ({schema:e,uiSchema:t,options:r,id:n,value:i,disabled:a,readonly:s,label:l,hideLabel:u,autofocus:f=!1,onBlur:d,onFocus:p,onChange:m,registry:y}){const _=Se("DescriptionFieldTemplate",y,r),w=Ol(e),v=j.useCallback(E=>m(E.target.checked),[m]),g=j.useCallback(E=>d(n,E.target.checked),[d,n]),C=j.useCallback(E=>p(n,E.target.checked),[p,n]),S=r.description??e.description;return $.jsxs("div",{className:`checkbox ${a||s?"disabled":""}`,children:[!u&&S&&$.jsx(_,{id:pa(n),description:S,schema:e,uiSchema:t,registry:y}),$.jsxs("label",{children:[$.jsx("input",{type:"checkbox",id:n,name:n,checked:typeof i>"u"?!1:i,required:w,disabled:a||s,autoFocus:f,onChange:v,onBlur:g,onFocus:C,"aria-describedby":At(n)}),O_($.jsx("span",{children:l}),u)]})]})}function UJ({id:e,disabled:t,options:{inline:r=!1,enumOptions:n,enumDisabled:i,emptyValue:a},value:s,autofocus:l=!1,readonly:u,onChange:f,onBlur:d,onFocus:p}){const m=Array.isArray(s)?s:[s],y=j.useCallback(({target:w})=>d(e,Ot(w&&w.value,n,a)),[d,e]),_=j.useCallback(({target:w})=>p(e,Ot(w&&w.value,n,a)),[p,e]);return $.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(n)&&n.map((w,v)=>{const g=kd(w.value,m),C=Array.isArray(i)&&i.indexOf(w.value)!==-1,S=t||C||u?"disabled":"",E=x=>{x.target.checked?f(XV(v,m,n)):f(JV(v,m,n))},A=$.jsxs("span",{children:[$.jsx("input",{type:"checkbox",id:El(e,v),name:e,checked:g,value:String(v),disabled:t||C||u,autoFocus:l&&v===0,onChange:E,onBlur:y,onFocus:_,"aria-describedby":At(e)}),$.jsx("span",{children:w.label})]});return r?$.jsx("label",{className:`checkbox-inline ${S}`,children:A},v):$.jsx("div",{className:`checkbox ${S}`,children:$.jsx("label",{children:A})},v)})})}function WJ(e){const{disabled:t,readonly:r,options:n,registry:i}=e,a=Se("BaseInputTemplate",i,n);return $.jsx(a,{type:"color",...e,disabled:t||r})}function qJ(e){const{onChange:t,options:r,registry:n}=e,i=Se("BaseInputTemplate",n,r),a=j.useCallback(s=>t(s||void 0),[t]);return $.jsx(i,{type:"date",...e,onChange:a})}function VJ(e){const{onChange:t,value:r,options:n,registry:i}=e,a=Se("BaseInputTemplate",i,n);return $.jsx(a,{type:"datetime-local",...e,value:pR(r),onChange:s=>t(fR(s))})}function RJ(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"email",...e})}function zJ(e,t){return e===null?null:e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function HJ(e){const{name:t,size:r,type:n}=e;return new Promise((i,a)=>{const s=new window.FileReader;s.onerror=a,s.onload=l=>{var u;typeof((u=l.target)==null?void 0:u.result)=="string"?i({dataURL:zJ(l.target.result,t),name:t,size:r,type:n}):i({dataURL:null,name:t,size:r,type:n})},s.readAsDataURL(e)})}function KJ(e){return Promise.all(Array.from(e).map(HJ))}function GJ({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:n,type:i,name:a}=e;return n?["image/jpeg","image/png"].includes(i)?$.jsx("img",{src:n,style:{maxWidth:"100%"},className:"file-preview"}):$.jsxs($.Fragment,{children:[" ",$.jsx("a",{download:`preview-${a}`,href:n,className:"file-download",children:r(Be.PreviewLabel)})]}):null}function YJ({filesInfo:e,registry:t,preview:r,onRemove:n,options:i}){if(e.length===0)return null;const{translateString:a}=t,{RemoveButton:s}=Se("ButtonTemplates",t,i);return $.jsx("ul",{className:"file-info",children:e.map((l,u)=>{const{name:f,size:d,type:p}=l,m=()=>n(u);return $.jsxs("li",{children:[$.jsx(Bc,{children:a(Be.FilesInfo,[f,p,String(d)])}),r&&$.jsx(GJ,{fileInfo:l,registry:t}),$.jsx(s,{onClick:m,registry:t})]},u)})})}function JJ(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:n,name:i}=KV(r);return[...t,{dataURL:r,name:i,size:n.size,type:n.type}]}catch{return t}},[])}function XJ(e){const{disabled:t,readonly:r,required:n,multiple:i,onChange:a,value:s,options:l,registry:u}=e,f=Se("BaseInputTemplate",u,l),d=j.useCallback(y=>{y.target.files&&KJ(y.target.files).then(_=>{const w=_.map(v=>v.dataURL);a(i?s.concat(w):w[0])})},[i,s,a]),p=j.useMemo(()=>JJ(Array.isArray(s)?s:[s]),[s]),m=j.useCallback(y=>{if(i){const _=s.filter((w,v)=>v!==y);a(_)}else a(void 0)},[i,s,a]);return $.jsxs("div",{children:[$.jsx(f,{...e,disabled:t||r,type:"file",required:s?!1:n,onChangeOverride:d,value:"",accept:l.accept?String(l.accept):void 0}),$.jsx(YJ,{filesInfo:p,onRemove:m,registry:u,preview:l.filePreview,options:l})]})}function ZJ({id:e,value:t}){return $.jsx("input",{type:"hidden",id:e,name:e,value:typeof t>"u"?"":t})}function QJ(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"password",...e})}function eX({options:e,value:t,required:r,disabled:n,readonly:i,autofocus:a=!1,onBlur:s,onFocus:l,onChange:u,id:f}){const{enumOptions:d,enumDisabled:p,inline:m,emptyValue:y}=e,_=j.useCallback(({target:v})=>s(f,Ot(v&&v.value,d,y)),[s,d,y,f]),w=j.useCallback(({target:v})=>l(f,Ot(v&&v.value,d,y)),[l,d,y,f]);return $.jsx("div",{className:"field-radio-group",id:f,role:"radiogroup",children:Array.isArray(d)&&d.map((v,g)=>{const C=kd(v.value,t),S=Array.isArray(p)&&p.indexOf(v.value)!==-1,E=n||S||i?"disabled":"",A=()=>u(v.value),x=$.jsxs("span",{children:[$.jsx("input",{type:"radio",id:El(f,g),checked:C,name:f,required:r,value:String(g),disabled:n||S||i,autoFocus:a&&g===0,onChange:A,onBlur:_,onFocus:w,"aria-describedby":At(f)}),$.jsx("span",{children:v.label})]});return m?$.jsx("label",{className:`radio-inline ${E}`,children:x},g):$.jsx("div",{className:`radio ${E}`,children:$.jsx("label",{children:x})},g)})})}function tX(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return $.jsxs("div",{className:"field-range-wrapper",children:[$.jsx(r,{type:"range",...e}),$.jsx("span",{className:"range-view",children:t})]})}function rX({id:e,value:t,required:r,disabled:n,readonly:i,autofocus:a,onChange:s,onFocus:l,onBlur:u,schema:f,options:d}){const{stars:p=5,shape:m="star"}=d,y=f.maximum?Math.min(f.maximum,5):Math.min(Math.max(p,1),5),_=f.minimum||0,w=j.useCallback(S=>{!n&&!i&&s(S)},[s,n,i]),v=j.useCallback(S=>{if(l){const E=Number(S.target.dataset.value);l(e,E)}},[l,e]),g=j.useCallback(S=>{if(u){const E=Number(S.target.dataset.value);u(e,E)}},[u,e]),C=S=>m==="heart"?S?"♥":"♡":S?"★":"☆";return $.jsx($.Fragment,{children:$.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:n||i?"default":"pointer"},children:[[...Array(y)].map((S,E)=>{const A=_+E,x=A<=t;return $.jsx("span",{onClick:()=>w(A),onFocus:v,onBlur:g,"data-value":A,tabIndex:n||i?-1:0,role:"radio","aria-checked":A===t,"aria-label":`${A} ${m==="heart"?"heart":"star"}${A===1?"":"s"}`,style:{color:x?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:C(x)},E)}),$.jsx("input",{type:"hidden",id:e,name:e,value:t||"",required:r,disabled:n||i,"aria-hidden":"true"})]})})}function Mp(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function nX({schema:e,id:t,options:r,value:n,required:i,disabled:a,readonly:s,multiple:l=!1,autofocus:u=!1,onChange:f,onBlur:d,onFocus:p,placeholder:m}){const{enumOptions:y,enumDisabled:_,emptyValue:w}=r,v=l?[]:"",g=j.useCallback(x=>{const N=Mp(x,l);return p(t,Ot(N,y,w))},[p,t,l,y,w]),C=j.useCallback(x=>{const N=Mp(x,l);return d(t,Ot(N,y,w))},[d,t,l,y,w]),S=j.useCallback(x=>{const N=Mp(x,l);return f(Ot(N,y,w))},[f,l,y,w]),E=wl(n,y,l),A=!l&&e.default===void 0;return $.jsxs("select",{id:t,name:t,multiple:l,role:"combobox",className:"form-control",value:typeof E>"u"?v:E,required:i,disabled:a||s,autoFocus:u,onBlur:C,onFocus:g,onChange:S,"aria-describedby":At(t),children:[A&&$.jsx("option",{value:"",children:m}),Array.isArray(y)&&y.map(({value:x,label:N},Z)=>{const G=_&&_.indexOf(x)!==-1;return $.jsx("option",{value:String(Z),disabled:G,children:N},Z)})]})}function Ww({id:e,options:t={},placeholder:r,value:n,required:i,disabled:a,readonly:s,autofocus:l=!1,onChange:u,onBlur:f,onFocus:d}){const p=j.useCallback(({target:{value:_}})=>u(_===""?t.emptyValue:_),[u,t.emptyValue]),m=j.useCallback(({target:_})=>f(e,_&&_.value),[f,e]),y=j.useCallback(({target:_})=>d(e,_&&_.value),[e,d]);return $.jsx("textarea",{id:e,name:e,className:"form-control",value:n||"",placeholder:r,required:i,disabled:a,readOnly:s,autoFocus:l,rows:t.rows,onBlur:m,onFocus:y,onChange:p,"aria-describedby":At(e)})}Ww.defaultProps={autofocus:!1,options:{}};function iX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{...e})}function aX(e){const{onChange:t,options:r,registry:n}=e,i=Se("BaseInputTemplate",n,r),a=j.useCallback(s=>t(s?`${s}:00`:void 0),[t]);return $.jsx(i,{type:"time",...e,onChange:a})}function oX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"url",...e})}function sX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"number",...e})}function lX(){return{AltDateWidget:LJ,AltDateTimeWidget:jJ,CheckboxWidget:BJ,CheckboxesWidget:UJ,ColorWidget:WJ,DateWidget:qJ,DateTimeWidget:VJ,EmailWidget:RJ,FileWidget:XJ,HiddenWidget:ZJ,PasswordWidget:QJ,RadioWidget:eX,RangeWidget:tX,RatingWidget:rX,SelectWidget:nX,TextWidget:iX,TextareaWidget:Ww,TimeWidget:aX,UpDownWidget:sX,URLWidget:oX}}function cX(){return{fields:sJ(),templates:NJ(),widgets:lX(),rootSchema:{},formContext:{},translateString:YV}}let uX=class extends j.Component{constructor(r){super(r);pe(this,"formElement");pe(this,"getUsedFormData",(r,n)=>{if(n.length===0&&typeof r!="object")return r;const i=fw(r,n);return Array.isArray(r)?Object.keys(i).map(a=>i[a]):i});pe(this,"getFieldNames",(r,n)=>{const i=(a,s=[],l=[[]])=>(Object.keys(a).forEach(u=>{if(typeof a[u]=="object"){const f=l.map(d=>[...d,u]);a[u][Gu]&&a[u][As]!==""?s.push(a[u][As]):i(a[u],s,f)}else u===As&&a[u]!==""&&l.forEach(f=>{const d=de(n,f);(typeof d!="object"||Ut(d)||Array.isArray(d)&&d.every(p=>typeof p!="object"))&&s.push(f)})}),s);return i(r)});pe(this,"omitExtraData",r=>{const{schema:n,schemaUtils:i}=this.state,a=i.retrieveSchema(n,r),s=i.toPathSchema(a,"",r),l=this.getFieldNames(s,r);return this.getUsedFormData(r,l)});pe(this,"onChange",(r,n,i)=>{const{extraErrors:a,omitExtraData:s,liveOmit:l,noValidate:u,liveValidate:f,onChange:d}=this.props,{schemaUtils:p,schema:m}=this.state;let y=this.state.retrievedSchema;if(ke(r)||Array.isArray(r)){const g=this.getStateFromProps(this.props,r);r=g.formData,y=g.retrievedSchema}const _=!u&&f;let w={formData:r,schema:m},v=r;if(s===!0&&l===!0&&(v=this.omitExtraData(r),w={formData:v}),_){const g=this.validate(v,m,p,y);let C=g.errors,S=g.errorSchema;const E=C,A=S;if(a){const x=Pl(g,a);S=x.errorSchema,C=x.errors}if(n){const x=this.filterErrorsBasedOnSchema(n,y,v);S=vn(S,x,"preventDuplicates")}w={formData:v,errors:C,errorSchema:S,schemaValidationErrors:E,schemaValidationErrorSchema:A}}else if(!u&&n){const g=a?vn(n,a,"preventDuplicates"):n;w={formData:v,errorSchema:g,errors:Tl(g)}}this.setState(w,()=>d&&d({...this.state,...w},i))});pe(this,"reset",()=>{const{onChange:r}=this.props,a={formData:this.getStateFromProps(this.props,void 0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{}};this.setState(a,()=>r&&r({...this.state,...a}))});pe(this,"onBlur",(r,n)=>{const{onBlur:i}=this.props;i&&i(r,n)});pe(this,"onFocus",(r,n)=>{const{onFocus:i}=this.props;i&&i(r,n)});pe(this,"onSubmit",r=>{if(r.preventDefault(),r.target!==r.currentTarget)return;r.persist();const{omitExtraData:n,extraErrors:i,noValidate:a,onSubmit:s}=this.props;let{formData:l}=this.state;if(n===!0&&(l=this.omitExtraData(l)),a||this.validateFormWithFormData(l)){const u=i||{},f=i?Tl(i):[];this.setState({formData:l,errors:f,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s({...this.state,formData:l,status:"submitted"},r)})}});pe(this,"submit",()=>{if(this.formElement.current){const r=new CustomEvent("submit",{cancelable:!0});r.preventDefault(),this.formElement.current.dispatchEvent(r),this.formElement.current.requestSubmit()}});pe(this,"validateFormWithFormData",r=>{const{extraErrors:n,extraErrorsBlockSubmit:i,focusOnFirstError:a,onError:s}=this.props,{errors:l}=this.state,u=this.validate(r);let f=u.errors,d=u.errorSchema;const p=f,m=d,y=f.length>0||n&&i;if(y){if(n){const _=Pl(u,n);d=_.errorSchema,f=_.errors}a&&(typeof a=="function"?a(f[0]):this.focusOnError(f[0])),this.setState({errors:f,errorSchema:d,schemaValidationErrors:p,schemaValidationErrorSchema:m},()=>{s?s(f):console.error("Form validation failed",f)})}else l.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!y});if(!r.validator)throw new Error("A validator is required for Form functionality to work");this.state=this.getStateFromProps(r,r.formData),this.props.onChange&&!ht(this.state.formData,this.props.formData)&&this.props.onChange(this.state),this.formElement=j.createRef()}getSnapshotBeforeUpdate(r,n){if(!ht(this.props,r)){const i=$R(this.props.formData,r.formData),a=!ht(r.schema,this.props.schema),s=i.length>0||!ht(r.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,a||s?void 0:this.state.retrievedSchema,a,i),u=!ht(l,n);return{nextState:l,shouldUpdate:u}}return{shouldUpdate:!1}}componentDidUpdate(r,n,i){if(i.shouldUpdate){const{nextState:a}=i;!ht(a.formData,this.props.formData)&&!ht(a.formData,n.formData)&&this.props.onChange&&this.props.onChange(a),this.setState(a)}}getStateFromProps(r,n,i,a=!1,s=[]){var ee;const l=this.state||{},u="schema"in r?r.schema:this.props.schema,f="validator"in r?r.validator:this.props.validator,d=("uiSchema"in r?r.uiSchema:this.props.uiSchema)||{},p=typeof n<"u",m="liveValidate"in r?r.liveValidate:this.props.liveValidate,y=p&&!r.noValidate&&m,_="experimental_defaultFormStateBehavior"in r?r.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in r?r.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let v=l.schemaUtils;(!v||v.doesSchemaUtilsDiffer(f,u,_,w))&&(v=HV(f,u,_,w));const g=v.getRootSchema(),C=v.getDefaultFormState(g,n),S=this.updateRetrievedSchema(i??v.retrieveSchema(g,C)),E=()=>r.noValidate||a?{errors:[],errorSchema:{}}:r.liveValidate?{errors:l.errors||[],errorSchema:l.errorSchema||{}}:{errors:l.schemaValidationErrors||[],errorSchema:l.schemaValidationErrorSchema||{}};let A,x,N=l.schemaValidationErrors,Z=l.schemaValidationErrorSchema;if(y){const te=this.validate(C,g,v,S);A=te.errors,i===void 0?x=te.errorSchema:x=vn((ee=this.state)==null?void 0:ee.errorSchema,te.errorSchema,"preventDuplicates"),N=A,Z=x}else{const te=E();if(A=te.errors,x=te.errorSchema,s.length>0){const ae=s.reduce((Q,k)=>(Q[k]=void 0,Q),{});x=Z=vn(te.errorSchema,ae,"preventDuplicates")}}if(r.extraErrors){const te=Pl({errorSchema:x,errors:A},r.extraErrors);x=te.errorSchema,A=te.errors}const G=v.toIdSchema(S,d["ui:rootFieldId"],C,r.idPrefix,r.idSeparator);return{schemaUtils:v,schema:g,uiSchema:d,idSchema:G,formData:C,edit:p,errors:A,errorSchema:x,schemaValidationErrors:N,schemaValidationErrorSchema:Z,retrievedSchema:S}}shouldComponentUpdate(r,n){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return A_(this,r,n,i)}getPreviousCustomValidateErrors(){const{customValidate:r,uiSchema:n}=this.props,i=this.state.formData;let a={};if(typeof r=="function"){const s=r(i,xs(i),n);a=qd(s)}return a}validate(r,n=this.state.schema,i,a){const s=i||this.state.schemaUtils,{customValidate:l,transformErrors:u,uiSchema:f}=this.props,d=a??s.retrieveSchema(n,r);return s.getValidator().validateFormData(r,d,l,u,f)}renderErrors(r){const{errors:n,errorSchema:i,schema:a,uiSchema:s}=this.state,{formContext:l}=this.props,u=we(s),f=Se("ErrorListTemplate",r,u);return n&&n.length?$.jsx(f,{errors:n,errorSchema:i||{},schema:a,uiSchema:s,formContext:l,registry:r}):null}filterErrorsBasedOnSchema(r,n,i){const{retrievedSchema:a,schemaUtils:s}=this.state,l=n??a,u=s.toPathSchema(l,"",i),f=this.getFieldNames(u,i),d=fw(r,f);(n==null?void 0:n.type)!=="object"&&(n==null?void 0:n.type)!=="array"&&(d.__errors=r.__errors);const p=this.getPreviousCustomValidateErrors(),m=(_=[],w)=>_.length===0?_:_.filter(v=>!w.includes(v)),y=(_,w={})=>(I_(_,(v,g)=>{const C=w[g];So(v)||Array.isArray(v)&&v.length===0?delete _[g]:ke(v)&&ke(C)&&Array.isArray(C==null?void 0:C.__errors)?_[g]=m(v.__errors,C.__errors):typeof v=="object"&&!Array.isArray(v.__errors)&&y(v,w[g])}),_);return y(d,p)}updateRetrievedSchema(r){var i;return ht(r,(i=this.state)==null?void 0:i.retrievedSchema)?this.state.retrievedSchema:r}getRegistry(){var m;const{translateString:r,uiSchema:n={},experimental_componentUpdateStrategy:i="customDeep"}=this.props,{schema:a,schemaUtils:s}=this.state,{fields:l,templates:u,widgets:f,formContext:d,translateString:p}=cX();return{fields:{...l,...this.props.fields},templates:{...u,...this.props.templates,ButtonTemplates:{...u.ButtonTemplates,...(m=this.props.templates)==null?void 0:m.ButtonTemplates}},widgets:{...f,...this.props.widgets},rootSchema:a,formContext:this.props.formContext||d,schemaUtils:s,translateString:r||p,globalUiOptions:n[Ju],experimental_componentUpdateStrategy:i}}focusOnError(r){const{idPrefix:n="root",idSeparator:i="_"}=this.props,{property:a}=r,s=T_(a);s[0]===""?s[0]=n:s.unshift(n);const l=s.join(i);let u=this.formElement.current.elements[l];u||(u=this.formElement.current.querySelector(`input[id^="${l}"`)),u&&u.length&&(u=u[0]),u&&u.focus()}validateForm(){const{omitExtraData:r}=this.props;let{formData:n}=this.state;return r===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:r,id:n,idPrefix:i,idSeparator:a,className:s="",tagName:l,name:u,method:f,target:d,action:p,autoComplete:m,enctype:y,acceptCharset:_,noHtml5Validate:w=!1,disabled:v,readonly:g,formContext:C,showErrorList:S="top",_internalFormWrapper:E}=this.props,{schema:A,uiSchema:x,formData:N,errorSchema:Z,idSchema:G}=this.state,H=this.getRegistry(),{SchemaField:ee}=H.fields,{SubmitButton:te}=H.templates.ButtonTemplates,ae=E?l:void 0,Q=E||l||"form";let{[Ts]:k={}}=we(x);v&&(k={...k,props:{...k.props,disabled:!0}});const W={[zr]:{[Ts]:k}};return $.jsxs(Q,{className:s||"rjsf",id:n,name:u,method:f,target:d,action:p,autoComplete:m,encType:y,acceptCharset:_,noValidate:w,onSubmit:this.onSubmit,as:ae,ref:this.formElement,children:[S==="top"&&this.renderErrors(H),$.jsx(ee,{name:"",schema:A,uiSchema:x,errorSchema:Z,idSchema:G,idPrefix:i,idSeparator:a,formContext:C,formData:N,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:H,disabled:v,readonly:g}),r||$.jsx(te,{uiSchema:W,registry:H}),S==="bottom"&&this.renderErrors(H)]})}};function fX(e){return j.forwardRef(({fields:t,widgets:r,templates:n,...i},a)=>{var s;return t={...e==null?void 0:e.fields,...t},r={...e==null?void 0:e.widgets,...r},n={...e==null?void 0:e.templates,...n,ButtonTemplates:{...(s=e==null?void 0:e.templates)==null?void 0:s.ButtonTemplates,...n==null?void 0:n.ButtonTemplates}},$.jsx(uX,{...e,...i,fields:t,widgets:r,templates:n,ref:a})})}const dX={width:"100%"},hX={width:"calc(100% / 4)"};function pX(e){const{children:t,buttonsProps:r,hasToolbar:n,index:i,registry:a,uiSchema:s}=e,l=we(s),u=Se("ArrayFieldItemButtonsTemplate",a,l),{rowGutter:f=24,toolbarAlign:d="top"}=a.formContext;return $.jsxs(re.Row,{align:d,gutter:f,children:[$.jsx(re.Col,{flex:"1",children:t}),n&&$.jsx(re.Col,{flex:"192px",children:$.jsx(re.Space.Compact,{style:dX,children:$.jsx(u,{...r,style:hX})})})]},`rjsf-array-item-${i}`)}const mX={paddingBottom:"8px"};function gX(e){const{canAdd:t,className:r,disabled:n,formContext:i,idSchema:a,items:s,onAddClick:l,readonly:u,registry:f,required:d,schema:p,title:m,uiSchema:y}=e,_=we(y),w=Se("ArrayFieldDescriptionTemplate",f,_),v=Se("ArrayFieldItemTemplate",f,_),g=Se("ArrayFieldTitleTemplate",f,_),{ButtonTemplates:{AddButton:C}}=f.templates,{labelAlign:S="right",rowGutter:E=24}=i,{getPrefixCls:A}=j.useContext(re.ConfigProvider.ConfigContext),N=`${A("form")}-item-label`,Z=Il(N,S==="left"&&`${N}-left`);return $.jsx("fieldset",{className:r,id:a.$id,children:$.jsxs(re.Row,{gutter:E,children:[(_.title||m)&&$.jsx(re.Col,{className:Z,span:24,children:$.jsx(g,{idSchema:a,required:d,title:_.title||m,schema:p,uiSchema:y,registry:f})}),(_.description||p.description)&&$.jsx(re.Col,{span:24,style:mX,children:$.jsx(w,{description:_.description||p.description,idSchema:a,schema:p,uiSchema:y,registry:f})}),$.jsx(re.Col,{className:"row array-item-list",span:24,children:s&&s.map(({key:G,...H})=>$.jsx(v,{...H},G))}),t&&$.jsx(re.Col,{span:24,children:$.jsx(re.Row,{gutter:E,justify:"end",children:$.jsx(re.Col,{flex:"192px",children:$.jsx(C,{id:en(a,"add"),className:"rjsf-array-item-add",disabled:n||u,onClick:l,uiSchema:y,registry:f})})})})]})})}const qw={width:"100%"};function yX(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onChangeOverride:s,onFocus:l,options:u,placeholder:f,readonly:d,schema:p,value:m,type:y}=e,_=v_(p,y,u,!1),{readonlyAsDisabled:w=!0}=r,v=A=>a(A),g=s||(({target:A})=>a(A.value===""?u.emptyValue:A.value)),C=({target:A})=>i(n,A&&A.value),S=({target:A})=>l(n,A&&A.value),E=_.type==="number"||_.type==="integer"?$.jsx(re.InputNumber,{disabled:t||w&&d,id:n,name:n,onBlur:d?void 0:C,onChange:d?void 0:v,onFocus:d?void 0:S,placeholder:f,style:qw,list:p.examples?ma(n):void 0,..._,value:m,"aria-describedby":At(n,!!p.examples)}):$.jsx(re.Input,{disabled:t||w&&d,id:n,name:n,onBlur:d?void 0:C,onChange:d?void 0:g,onFocus:d?void 0:S,placeholder:f,style:qw,list:p.examples?ma(n):void 0,..._,value:m,"aria-describedby":At(n,!!p.examples)});return $.jsxs($.Fragment,{children:[E,Array.isArray(p.examples)&&$.jsx("datalist",{id:ma(n),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(A=>$.jsx("option",{value:A},A))})]})}function vX(e){const{id:t,description:r,registry:n,uiSchema:i}=e;return r?$.jsx("span",{id:t,children:$.jsx(Np,{description:r,registry:n,uiSchema:i})}):null}var kp={exports:{}},Uc={},Vw={exports:{}},Rw={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Rw);var Wc=Rw.exports;(function(e){var t=Wc.default;function r(n,i){if(typeof WeakMap=="function")var a=new WeakMap,s=new WeakMap;return(e.exports=r=function(u,f){if(!f&&u&&u.__esModule)return u;var d,p,m={__proto__:null,default:u};if(u===null||t(u)!="object"&&typeof u!="function")return m;if(d=f?s:a){if(d.has(u))return d.get(u);d.set(u,m)}for(var y in u)y!=="default"&&{}.hasOwnProperty.call(u,y)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(u,y))&&(p.get||p.set)?d(m,y,p):m[y]=u[y]);return m},e.exports.__esModule=!0,e.exports.default=e.exports)(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Vw);var wn=Vw.exports,zw={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zw);var Ur=zw.exports,Hw={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hw);var Ii=Hw.exports,Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});var bX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};Lp.default=bX;var Sn={},Kw={exports:{}},Gw={exports:{}};(function(e){function t(r){if(Array.isArray(r))return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Gw);var _X=Gw.exports,Yw={exports:{}};(function(e){function t(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,s,l,u,f=[],d=!0,p=!1;try{if(l=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(a=l.call(i)).done)&&(f.push(a.value),f.length!==n);d=!0);}catch(m){p=!0,s=m}finally{try{if(!d&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(p)throw s}}return f}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Yw);var $X=Yw.exports,Jw={exports:{}},Xw={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Xw);var wX=Xw.exports;(function(e){var t=wX;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Jw);var SX=Jw.exports,Zw={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Zw);var CX=Zw.exports;(function(e){var t=_X,r=$X,n=SX,i=CX;function a(s,l){return t(s)||r(s,l)||n(s,l)||i()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(Kw);var Qw=Kw.exports,eS={exports:{}},tS={exports:{}},rS={exports:{}};(function(e){var t=Wc.default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(rS);var EX=rS.exports;(function(e){var t=Wc.default,r=EX;function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(tS);var OX=tS.exports;(function(e){var t=OX;function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(eS);var nS=eS.exports,iS={exports:{}},aS={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(n.indexOf(a)!==-1)continue;i[a]=r[a]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(aS);var AX=aS.exports;(function(e){var t=AX;function r(n,i){if(n==null)return{};var a,s,l=t(n,i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)a=u[s],i.indexOf(a)===-1&&{}.propertyIsEnumerable.call(n,a)&&(l[a]=n[a])}return l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(iS);var oS=iS.exports;const sS=m2(LR);var es={};Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var TX=j,PX=(0,TX.createContext)({});es.default=PX;var ts={},lS={exports:{}};(function(e){var t=nS;function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(lS);var jp=lS.exports,qt={},Da={},Bp={};Object.defineProperty(Bp,"__esModule",{value:!0}),Bp.default=IX;function IX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Up={};Object.defineProperty(Up,"__esModule",{value:!0}),Up.default=xX;function xX(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var Wp=Ur.default;Object.defineProperty(Da,"__esModule",{value:!0}),Da.clearContainerCache=jX,Da.injectCSS=Vp,Da.removeCSS=kX,Da.updateCSS=BX;var cS=Wp(jp),DX=Wp(Bp),FX=Wp(Up),uS="data-rc-order",fS="data-rc-priority",NX="rc-util-key",qc=new Map;function dS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):NX}function Vc(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function MX(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function qp(e){return Array.from((qc.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Vp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,DX.default)())return null;var r=t.csp,n=t.prepend,i=t.priority,a=i===void 0?0:i,s=MX(n),l=s==="prependQueue",u=document.createElement("style");u.setAttribute(uS,s),l&&a&&u.setAttribute(fS,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var f=Vc(t),d=f.firstChild;if(n){if(l){var p=(t.styles||qp(f)).filter(function(m){if(!["prepend","prependQueue"].includes(m.getAttribute(uS)))return!1;var y=Number(m.getAttribute(fS)||0);return a>=y});if(p.length)return f.insertBefore(u,p[p.length-1].nextSibling),u}f.insertBefore(u,d)}else f.appendChild(u);return u}function hS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Vc(t);return(t.styles||qp(r)).find(function(n){return n.getAttribute(dS(t))===e})}function kX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=hS(e,t);if(r){var n=Vc(t);n.removeChild(r)}}function LX(e,t){var r=qc.get(e);if(!r||!(0,FX.default)(document,r)){var n=Vp("",t),i=n.parentNode;qc.set(e,i),e.removeChild(n)}}function jX(){qc.clear()}function BX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Vc(r),i=qp(n),a=(0,cS.default)((0,cS.default)({},r),{},{styles:i});LX(n,a);var s=hS(t,a);if(s){var l,u;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var f;s.nonce=(f=a.csp)===null||f===void 0?void 0:f.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var d=Vp(e,a);return d.setAttribute(dS(a),t),d}var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.getShadowRoot=UX,Rc.inShadow=mS;function pS(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function mS(e){return pS(e)instanceof ShadowRoot}function UX(e){return mS(e)?pS(e):null}var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.call=Hp,Sr.default=void 0,Sr.note=yS,Sr.noteOnce=bS,Sr.preMessage=void 0,Sr.resetWarned=vS,Sr.warning=gS,Sr.warningOnce=rs;var Rp={},zp=[],WX=Sr.preMessage=function(t){zp.push(t)};function gS(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=zp.reduce(function(n,i){return i(n??"","warning")},t);r&&console.error("Warning: ".concat(r))}}function yS(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=zp.reduce(function(n,i){return i(n??"","note")},t);r&&console.warn("Note: ".concat(r))}}function vS(){Rp={}}function Hp(e,t,r){!t&&!Rp[r]&&(e(!1,r),Rp[r]=!0)}function rs(e,t){Hp(gS,e,t)}function bS(e,t){Hp(yS,e,t)}rs.preMessage=WX,rs.resetWarned=vS,rs.noteOnce=bS,Sr.default=rs;var qX=wn.default,zc=Ur.default;Object.defineProperty(qt,"__esModule",{value:!0}),qt.generate=Yp,qt.getSecondaryColor=XX,qt.iconStyles=void 0,qt.isIconDefinition=JX,qt.normalizeAttrs=Gp,qt.normalizeTwoToneColors=ZX,qt.useInsertStyles=qt.svgBaseProps=void 0,qt.warning=YX;var Kp=zc(jp),_S=zc(Wc),VX=sS,RX=Da,zX=Rc,HX=zc(Sr),Hc=qX(j),KX=zc(es);function GX(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function YX(e,t){(0,HX.default)(e,"[@ant-design/icons] ".concat(t))}function JX(e){return(0,_S.default)(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&((0,_S.default)(e.icon)==="object"||typeof e.icon=="function")}function Gp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[GX(r)]=n}return t},{})}function Yp(e,t,r){return r?Hc.default.createElement(e.tag,(0,Kp.default)((0,Kp.default)({key:t},Gp(e.attrs)),r),(e.children||[]).map(function(n,i){return Yp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Hc.default.createElement(e.tag,(0,Kp.default)({key:t},Gp(e.attrs)),(e.children||[]).map(function(n,i){return Yp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function XX(e){return(0,VX.generate)(e)[0]}function ZX(e){return e?Array.isArray(e)?e:[e]:[]}qt.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};var QX=qt.iconStyles=`
130
+ `,!a.some(x=>x.test(A))&&(S+=A,!!A.trim())));const E=Zo(S);return E===""?null:[S,,E]}),i:3,u:xp,l:(g,C,S)=>l("p",{key:S.key},C(g.children,S))},22:{t:["["],o:Yn($Y),i:0,u:g=>(p[g[1]]={target:g[2],title:g[4]},{}),l:Fp},23:{t:["!["],o:Jn(wY),i:0,u:g=>({alt:g[1]?cn(g[1]):void 0,ref:g[2]}),l:(g,C,S)=>p[g.ref]?l("img",{key:S.key,alt:g.alt,src:n(p[g.ref].target,"img","src"),title:p[g.ref].title}):null},24:{t:g=>g[0]==="["&&g.indexOf("](")===-1,o:Yn(SY),i:0,u:(g,C,S)=>({children:C(g[1],S),fallbackChildren:g[0],ref:g[2]}),l:(g,C,S)=>p[g.ref]?l("a",{key:S.key,href:n(p[g.ref].target,"a","href"),title:p[g.ref].title},C(g.children,S)):l("span",{key:S.key},g.fallbackChildren)},25:{t:["|"],o:wn(Aw),i:1,u:YY,l(g,C,S){const E=g;return l("table",{key:S.key},l("thead",null,l("tr",null,E.header.map(function(A,x){return l("th",{key:x,style:jw(E,x)},C(A,S))}))),l("tbody",null,E.cells.map(function(A,x){return l("tr",{key:x},A.map(function(N,Y){return l("td",{key:Y,style:jw(E,Y)},C(N,S))}))})))}},27:{o:xa(function(g,C){let S;return kc(g,":")&&(S=NY.exec(g)),S||LY.exec(g)}),i:4,u(g){const C=g[0];return{text:C.indexOf("&")===-1?C:C.replace(hY,(S,E)=>t.namedCodesToUnicode[E]||S)}},l:g=>g.text},28:{t:["**","__"],o:Jn(IY),i:2,u:(g,C,S)=>({children:C(g[2],S)}),l:(g,C,S)=>l("strong",{key:S.key},C(g.children,S))},29:{t:g=>{const C=g[0];return(C==="*"||C==="_")&&g[1]!==C},o:Jn(xY),i:3,u:(g,C,S)=>({children:C(g[2],S)}),l:(g,C,S)=>l("em",{key:S.key},C(g.children,S))},30:{t:["\\"],o:Jn(MY),i:1,u:g=>({text:g[1],type:"27"})},31:{t:["=="],o:Jn(DY),i:3,u:xp,l:(g,C,S)=>l("mark",{key:S.key},C(g.children,S))},32:{t:["~~"],o:Jn(FY),i:3,u:xp,l:(g,C,S)=>l("del",{key:S.key},C(g.children,S))}};t.disableParsingRawHTML===!0&&(delete m[11],delete m[13]);const y=function(g){var C=Object.keys(g);function S(E,A){var x=[];if(A.prevCapture=A.prevCapture||"",E.trim())for(;E;)for(var N=0;N<C.length;){var Y=C[N],K=g[Y];if(!K.t||KY(E,A,K.t)){var H=K.o(E,A);if(H&&H[0]){E=E.substring(H[0].length);var te=K.u(H,S,A);A.prevCapture+=H[0],te.type||(te.type=Y),x.push(te);break}N++}else N++}return A.prevCapture="",x}return C.sort(function(E,A){return g[E].i-g[A].i||(E<A?-1:1)}),function(E,A){return S(function(x){return x.replace(sY,`
131
+ `).replace(uY,"").replace(EY," ")}(E),A)}}(m),_=(w=function(g,C){return function(S,E,A){const x=g[S.type].l;return C?C(()=>x(S,E,A),S,E,A):x(S,E,A)}}(m,t.renderRule),function g(C,S={}){if(Array.isArray(C)){const E=S.key,A=[];let x=!1;for(let N=0;N<C.length;N++){S.key=N;const Y=g(C[N],S),K=typeof Y=="string";K&&x?A[A.length-1]+=Y:Y!==null&&A.push(Y),x=K}return S.key=E,A}return w(C,g,S)});var w;const v=u(e);return d.length?l("div",null,v,l("footer",{key:"footer"},d.map(function(g){return l("div",{id:r(g.identifier,Qo),key:g.identifier},g.identifier,_(y(g.footnote,{inline:!0})))}))):v}const Bc=e=>{let{children:t="",options:r}=e,n=function(i,a){if(i==null)return{};var s,l,u={},f=Object.keys(i);for(l=0;l<f.length;l++)a.indexOf(s=f[l])>=0||(u[s]=i[s]);return u}(e,YG);return at.cloneElement(tJ(t,r),n)};function rJ(e,t){return e==null?!0:L0(e,t)}class nJ extends B.Component{constructor(){super(...arguments);pe(this,"state",{wasPropertyKeyModified:!1,additionalProperties:{}});pe(this,"onPropertyChange",(r,n=!1)=>(i,a,s,l)=>{const{onChange:u}=this.props;i===void 0&&n&&(i="");const f=Array.isArray(a)?a.slice():[];f.unshift(r),u(i,f,s,l)});pe(this,"onDropPropertyClick",r=>n=>{n.preventDefault();const{onChange:i,formData:a,name:s}=this.props,l={...a};rJ(l,r),i(l,[s])});pe(this,"getAvailableKey",(r,n)=>{const{uiSchema:i,registry:a}=this.props,{duplicateKeySuffixSeparator:s="-"}=we(i,a.globalUiOptions);let l=0,u=r;for(;Be(n,u);)u=`${r}${s}${++l}`;return u});pe(this,"onKeyChange",r=>n=>{if(r===n)return;const{formData:i,onChange:a}=this.props;n=this.getAvailableKey(n,i);const s={...i},l={[r]:n},u=Object.keys(s).map(d=>({[l[d]||d]:s[d]})),f=Object.assign({},...u);this.setState({wasPropertyKeyModified:!0}),a(f,[])});pe(this,"handleAddClick",r=>()=>{if(!(r.additionalProperties||r.patternProperties))return;const{formData:n,name:i,onChange:a,registry:s}=this.props,l={...n},u=this.getAvailableKey("newKey",l);if(r.patternProperties)Xe(l,u,null);else{let f,d,p;if(Re(r.additionalProperties)){f=r.additionalProperties.type,d=r.additionalProperties.const,p=r.additionalProperties.default;let y=r.additionalProperties;if(ot in y){const{schemaUtils:_}=s;y=_.retrieveSchema({$ref:y[ot]},n),f=y.type,d=y.const,p=y.default}!f&&(yt in y||Qe in y)&&(f="object")}const m=d??p??this.getDefaultValue(f);Xe(l,u,m)}a(l,[i])})}isRequired(r){const{schema:n}=this.props;return Array.isArray(n.required)&&n.required.indexOf(r)!==-1}getDefaultValue(r){const{registry:{translateString:n}}=this.props;switch(r){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return n(Ue.NewStringDefault)}}render(){const{schema:r,uiSchema:n={},formData:i,errorSchema:a,idSchema:s,name:l,required:u=!1,disabled:f,readonly:d,hideError:p,idPrefix:m,idSeparator:y,onBlur:_,onFocus:w,registry:v,title:g}=this.props,{fields:C,formContext:S,schemaUtils:E,translateString:A,globalUiOptions:x}=v,{SchemaField:N}=C,Y=E.retrieveSchema(r,i),K=we(n,x),{properties:H={}}=Y,te=K.title??Y.title??g??l,ee=K.description??Y.description;let ae;try{const q=Object.keys(H);ae=dR(q,K.order)}catch(q){return $.jsxs("div",{children:[$.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:$.jsx(Bc,{options:{disableParsingRawHTML:!0},children:A(Ue.InvalidObjectField,[l||"root",q.message])})}),$.jsx("pre",{children:JSON.stringify(Y)})]})}const Q=Se("ObjectFieldTemplate",v,K),k={title:K.label===!1?"":te,description:K.label===!1?void 0:ee,properties:ae.map(q=>{const W=Be(Y,[Ve,q,Bn]),L=W?n.additionalProperties:n[q],X=we(L).widget==="hidden",U=de(s,[q],{});return{content:$.jsx(N,{name:q,required:this.isRequired(q),schema:de(Y,[Ve,q],{}),uiSchema:L,errorSchema:de(a,q),idSchema:U,idPrefix:m,idSeparator:y,formData:de(i,q),formContext:S,wasPropertyKeyModified:this.state.wasPropertyKeyModified,onKeyChange:this.onKeyChange(q),onChange:this.onPropertyChange(q,W),onBlur:_,onFocus:w,registry:v,disabled:f,readonly:d,hideError:p,onDropPropertyClick:this.onDropPropertyClick},q),name:q,readonly:d,disabled:f,required:u,hidden:X}}),readonly:d,disabled:f,required:u,idSchema:s,uiSchema:n,errorSchema:a,schema:Y,formData:i,formContext:S,registry:v};return $.jsx(Q,{...k,onAddClick:this.handleAddClick})}}const iJ={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function aJ(e,t,r,n){const i=t.field,{fields:a,translateString:s}=n;if(typeof i=="function")return i;if(typeof i=="string"&&i in a)return a[i];const l=yn(e),u=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=iJ[u];return f&&f in a&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in a?a[d]:()=>{const p=Se("UnsupportedFieldTemplate",n,t);return $.jsx(p,{schema:e,idSchema:r,reason:s(Ue.UnknownFieldType,[String(e.type)]),registry:n})}}function oJ(e){const{schema:t,idSchema:r,uiSchema:n,formData:i,errorSchema:a,idPrefix:s,idSeparator:l,name:u,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,registry:y,wasPropertyKeyModified:_=!1}=e,{formContext:w,schemaUtils:v,globalUiOptions:g}=y,C=we(n,g),S=Se("FieldTemplate",y,C),E=Se("DescriptionFieldTemplate",y,C),A=Se("FieldHelpTemplate",y,C),x=Se("FieldErrorTemplate",y,C),N=v.retrieveSchema(t,i),Y=r[vt],K=bn(v.toIdSchema(N,Y,i,s,l),r),H=B.useCallback((me,It,Vt,Et)=>f(me,It,Vt,Et||Y),[Y,f]),te=aJ(N,C,K,y),ee=!!(C.disabled??e.disabled),ae=!!(C.readonly??(e.readonly||e.schema.readOnly||N.readOnly)),Q=C.hideError,k=Q===void 0?e.hideError:!!Q,q=!!(C.autofocus??e.autofocus);if(Object.keys(N).length===0)return null;const W=v.getDisplayLabel(N,n,g),{__errors:L,...X}=a||{},U=yo(n,["ui:classNames","classNames","ui:style"]);Hr in U&&(U[Hr]=yo(U[Hr],["classNames","style"]));const F=$.jsx(te,{...e,onChange:H,idSchema:K,schema:N,uiSchema:U,disabled:ee,readonly:ae,hideError:k,autofocus:q,errorSchema:X,formContext:w,rawErrors:L}),z=K[vt];let j;_?j=u:j=Bn in N?u:C.title||e.schema.title||N.title||e.title||u;const T=C.description||e.schema.description||N.description||"",D=C.help,V=C.widget==="hidden",Z=["rjsf-field",`rjsf-field-${yn(N)}`];!k&&L&&L.length>0&&Z.push("rjsf-field-error"),C.classNames&&Z.push(C.classNames);const oe=$.jsx(A,{help:D,idSchema:K,schema:N,uiSchema:n,hasErrors:!k&&L&&L.length>0,registry:y}),ue=k||(N.anyOf||N.oneOf)&&!v.isSelect(N)?void 0:$.jsx(x,{errors:L,errorSchema:a,idSchema:K,schema:N,uiSchema:n,registry:y}),he={description:$.jsx(E,{id:pa(z),description:T,schema:N,uiSchema:n,registry:y}),rawDescription:T,help:oe,rawHelp:typeof D=="string"?D:void 0,errors:ue,rawErrors:k?void 0:L,id:z,label:j,hidden:V,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,disabled:ee,readonly:ae,hideError:k,displayLabel:W,classNames:Z.join(" ").trim(),style:C.style,formContext:w,formData:i,schema:N,uiSchema:n,registry:y},be=y.fields.AnyOfField,Le=y.fields.OneOfField,ft=(n==null?void 0:n["ui:field"])&&(n==null?void 0:n["ui:fieldReplacesAnyOrOneOf"])===!0;return $.jsx(S,{...he,children:$.jsxs($.Fragment,{children:[F,N.anyOf&&!ft&&!v.isSelect(N)&&$.jsx(be,{name:u,disabled:ee,readonly:ae,hideError:k,errorSchema:a,formData:i,formContext:w,idPrefix:s,idSchema:K,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.anyOf.map(me=>v.retrieveSchema(Re(me)?me:{},i)),registry:y,required:m,schema:N,uiSchema:n}),N.oneOf&&!ft&&!v.isSelect(N)&&$.jsx(Le,{name:u,disabled:ee,readonly:ae,hideError:k,errorSchema:a,formData:i,formContext:w,idPrefix:s,idSchema:K,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.oneOf.map(me=>v.retrieveSchema(Re(me)?me:{},i)),registry:y,required:m,schema:N,uiSchema:n})]})})}class sJ extends B.Component{shouldComponentUpdate(t){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props.registry;return A_(this,t,this.state,r)}render(){return $.jsx(oJ,{...this.props})}}function lJ(e){const{schema:t,name:r,uiSchema:n,idSchema:i,formData:a,required:s,disabled:l=!1,readonly:u=!1,autofocus:f=!1,onChange:d,onBlur:p,onFocus:m,registry:y,rawErrors:_,hideError:w}=e,{title:v,format:g}=t,{widgets:C,formContext:S,schemaUtils:E,globalUiOptions:A}=y,x=E.isSelect(t)?ua(t,n):void 0;let N=x?"select":"text";g&&uR(t,g,C)&&(N=g);const{widget:Y=N,placeholder:K="",title:H,...te}=we(n),ee=E.getDisplayLabel(t,n,A),ae=H??v??r,Q=en(t,Y,C),k=B.useCallback((q,W,L)=>d(q,[],W,L),[d]);return $.jsx(Q,{options:{...te,enumOptions:x},schema:t,uiSchema:n,id:i.$id,name:r,label:ae,hideLabel:!ee,hideError:w,value:a,onChange:k,onBlur:p,onFocus:m,required:s,disabled:l,readonly:u,formContext:S,autofocus:f,registry:y,placeholder:K,rawErrors:_})}function cJ(e){const{name:t,formData:r,onChange:n}=e;return B.useEffect(()=>{r===void 0&&n(null,[t])},[t,r,n]),null}function uJ(){return{AnyOfField:yw,ArrayField:FG,BooleanField:NG,LayoutGridField:Ep,LayoutHeaderField:RG,LayoutMultiSchemaField:zG,NumberField:GG,ObjectField:nJ,OneOfField:yw,SchemaField:sJ,StringField:lJ,NullField:cJ}}function fJ(e){const{idSchema:t,description:r,registry:n,schema:i,uiSchema:a}=e,s=we(a,n.globalUiOptions),{label:l=!0}=s;if(!r||!l)return null;const u=Se("DescriptionFieldTemplate",n,s);return $.jsx(u,{id:pa(t),description:r,schema:i,uiSchema:a,registry:n})}function dJ(e){const{children:t,className:r,buttonsProps:n,hasToolbar:i,registry:a,uiSchema:s}=e,l=we(s),u=Se("ArrayFieldItemButtonsTemplate",a,l),f={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};return $.jsxs("div",{className:r,children:[$.jsx("div",{className:i?"col-xs-9":"col-xs-12",children:t}),i&&$.jsx("div",{className:"col-xs-3 array-item-toolbox",children:$.jsx("div",{className:"btn-group",style:{display:"flex",justifyContent:"space-around"},children:$.jsx(u,{...n,style:f})})})]})}function hJ(e){const{disabled:t,hasCopy:r,hasMoveDown:n,hasMoveUp:i,hasRemove:a,idSchema:s,index:l,onCopyIndexClick:u,onDropIndexClick:f,onReorderClick:d,readonly:p,registry:m,uiSchema:y}=e,{CopyButton:_,MoveDownButton:w,MoveUpButton:v,RemoveButton:g}=m.templates.ButtonTemplates,C=B.useMemo(()=>u(l),[l,u]),S=B.useMemo(()=>f(l),[l,f]),E=B.useMemo(()=>d(l,l-1),[l,d]),A=B.useMemo(()=>d(l,l+1),[l,d]);return $.jsxs($.Fragment,{children:[(i||n)&&$.jsx(v,{id:tn(s,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!i,onClick:E,uiSchema:y,registry:m}),(i||n)&&$.jsx(w,{id:tn(s,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!n,onClick:A,uiSchema:y,registry:m}),r&&$.jsx(_,{id:tn(s,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:C,uiSchema:y,registry:m}),a&&$.jsx(g,{id:tn(s,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:S,uiSchema:y,registry:m})]})}function pJ(e){const{canAdd:t,className:r,disabled:n,idSchema:i,uiSchema:a,items:s,onAddClick:l,readonly:u,registry:f,required:d,schema:p,title:m}=e,y=we(a),_=Se("ArrayFieldDescriptionTemplate",f,y),w=Se("ArrayFieldItemTemplate",f,y),v=Se("ArrayFieldTitleTemplate",f,y),{ButtonTemplates:{AddButton:g}}=f.templates;return $.jsxs("fieldset",{className:r,id:i.$id,children:[$.jsx(v,{idSchema:i,title:y.title||m,required:d,schema:p,uiSchema:a,registry:f}),$.jsx(_,{idSchema:i,description:y.description||p.description,schema:p,uiSchema:a,registry:f}),$.jsx("div",{className:"row array-item-list",children:s&&s.map(({key:C,...S})=>$.jsx(w,{...S},C))}),t&&$.jsx(g,{id:tn(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:n||u,uiSchema:a,registry:f})]})}function mJ(e){const{idSchema:t,title:r,schema:n,uiSchema:i,required:a,registry:s}=e,l=we(i,s.globalUiOptions),{label:u=!0}=l;if(!r||!u)return null;const f=Se("TitleFieldTemplate",s,l);return $.jsx(f,{id:Cl(t),title:r,required:a,schema:n,uiSchema:i,registry:s})}function gJ(e){const{id:t,name:r,value:n,readonly:i,disabled:a,autofocus:s,onBlur:l,onFocus:u,onChange:f,onChangeOverride:d,options:p,schema:m,uiSchema:y,formContext:_,registry:w,rawErrors:v,type:g,hideLabel:C,hideError:S,...E}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const A={...E,...b_(m,g,p)};let x;A.type==="number"||A.type==="integer"?x=n||n===0?n:"":x=n??"";const N=B.useCallback(({target:{value:H}})=>f(H===""?p.emptyValue:H),[f,p]),Y=B.useCallback(({target:H})=>l(t,H&&H.value),[l,t]),K=B.useCallback(({target:H})=>u(t,H&&H.value),[u,t]);return $.jsxs($.Fragment,{children:[$.jsx("input",{id:t,name:t,className:"form-control",readOnly:i,disabled:a,autoFocus:s,value:x,...A,list:m.examples?ma(t):void 0,onChange:d||N,onBlur:Y,onFocus:K,"aria-describedby":Tt(t,!!m.examples)}),Array.isArray(m.examples)&&$.jsx("datalist",{id:ma(t),children:m.examples.concat(m.default&&!m.examples.includes(m.default)?[m.default]:[]).map(H=>$.jsx("option",{value:H},H))},`datalist_${t}`)]})}function yJ({uiSchema:e}){const{submitText:t,norender:r,props:n={}}=jd(e);return r?null:$.jsx("div",{children:$.jsx("button",{type:"submit",...n,className:`btn btn-info ${n.className||""}`,children:t})})}function es(e){const{iconType:t="default",icon:r,className:n,uiSchema:i,registry:a,...s}=e;return $.jsx("button",{type:"button",className:`btn btn-${t} ${n}`,...s,children:$.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function vJ(e){const{registry:{translateString:t}}=e;return $.jsx(es,{title:t(Ue.CopyButton),...e,icon:"copy"})}function bJ(e){const{registry:{translateString:t}}=e;return $.jsx(es,{title:t(Ue.MoveDownButton),...e,icon:"arrow-down"})}function _J(e){const{registry:{translateString:t}}=e;return $.jsx(es,{title:t(Ue.MoveUpButton),...e,icon:"arrow-up"})}function $J(e){const{registry:{translateString:t}}=e;return $.jsx(es,{title:t(Ue.RemoveButton),...e,iconType:"danger",icon:"remove"})}function wJ({className:e,onClick:t,disabled:r,registry:n}){const{translateString:i}=n;return $.jsx("div",{className:"row",children:$.jsx("p",{className:`col-xs-3 col-xs-offset-9 text-right ${e}`,children:$.jsx(es,{iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(Ue.AddButton),onClick:t,disabled:r,registry:n})})})}function SJ(){return{SubmitButton:yJ,AddButton:wJ,CopyButton:vJ,MoveDownButton:bJ,MoveUpButton:_J,RemoveButton:$J}}const Bw=$_();function Mp({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:n}=t;return we(r,n).enableMarkdownInDescription&&typeof e=="string"?$.jsx(Bc,{options:{disableParsingRawHTML:!0},"data-testid":Bw.markdown,children:e}):e}Mp.TEST_IDS=Bw;function CJ(e){const{id:t,description:r,registry:n,uiSchema:i}=e;return r?$.jsx("div",{id:t,className:"field-description",children:$.jsx(Mp,{description:r,registry:n,uiSchema:i})}):null}function EJ({errors:e,registry:t}){const{translateString:r}=t;return $.jsxs("div",{className:"panel panel-danger errors",children:[$.jsx("div",{className:"panel-heading",children:$.jsx("h3",{className:"panel-title",children:r(Ue.ErrorsLabel)})}),$.jsx("ul",{className:"list-group",children:e.map((n,i)=>$.jsx("li",{className:"list-group-item text-danger",children:n.stack},i))})]})}const OJ="*";function Uw(e){const{label:t,required:r,id:n}=e;return t?$.jsxs("label",{className:"control-label",htmlFor:n,children:[t,r&&$.jsx("span",{className:"required",children:OJ})]}):null}function AJ(e){const{id:t,label:r,children:n,errors:i,help:a,description:s,hidden:l,required:u,displayLabel:f,registry:d,uiSchema:p}=e,m=we(p),y=Se("WrapIfAdditionalTemplate",d,m);return l?$.jsx("div",{className:"hidden",children:n}):$.jsxs(y,{...e,children:[f&&$.jsx(Uw,{label:r,required:u,id:t}),f&&s?s:null,n,i,a]})}function TJ(e){const{errors:t=[],idSchema:r}=e;if(t.length===0)return null;const n=Wd(r);return $.jsx("div",{children:$.jsx("ul",{id:n,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,a)=>$.jsx("li",{className:"text-danger",children:i},a))})})}function PJ(e){const{idSchema:t,help:r}=e;if(!r)return null;const n=E_(t);return typeof r=="string"?$.jsx("p",{id:n,className:"help-block",children:r}):$.jsx("div",{id:n,className:"help-block",children:r})}function IJ(e){const{children:t,column:r,className:n,...i}=e;return $.jsx("div",{className:n,...i,children:t})}function xJ(e){const{selector:t,optionSchemaField:r}=e;return $.jsxs("div",{className:"panel panel-default panel-body",children:[$.jsx("div",{className:"form-group",children:t}),r]})}function DJ(e){const{description:t,disabled:r,formData:n,idSchema:i,onAddClick:a,properties:s,readonly:l,registry:u,required:f,schema:d,title:p,uiSchema:m}=e,y=we(m),_=Se("TitleFieldTemplate",u,y),w=Se("DescriptionFieldTemplate",u,y),{ButtonTemplates:{AddButton:v}}=u.templates;return $.jsxs("fieldset",{id:i.$id,children:[p&&$.jsx(_,{id:Cl(i),title:p,required:f,schema:d,uiSchema:m,registry:u}),t&&$.jsx(w,{id:pa(i),description:t,schema:d,uiSchema:m,registry:u}),s.map(g=>g.content),zg(d,m,n)&&$.jsx(v,{id:tn(i,"add"),className:"rjsf-object-property-expand",onClick:a(d),disabled:r||l,uiSchema:m,registry:u})]})}const FJ="*";function NJ(e){const{id:t,title:r,required:n}=e;return $.jsxs("legend",{id:t,children:[r,n&&$.jsx("span",{className:"required",children:FJ})]})}function MJ(e){const{schema:t,idSchema:r,reason:n,registry:i}=e,{translateString:a}=i;let s=Ue.UnsupportedField;const l=[];return r&&r.$id&&(s=Ue.UnsupportedFieldWithId,l.push(r.$id)),n&&(s=s===Ue.UnsupportedField?Ue.UnsupportedFieldWithReason:Ue.UnsupportedFieldWithIdAndReason,l.push(n)),$.jsxs("div",{className:"unsupported-field",children:[$.jsx("p",{children:$.jsx(Bc,{options:{disableParsingRawHTML:!0},children:a(s,l)})}),t&&$.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function kJ(e){const{id:t,classNames:r,style:n,disabled:i,label:a,onKeyChange:s,onDropPropertyClick:l,readonly:u,required:f,schema:d,hideError:p,rawErrors:m,children:y,uiSchema:_,registry:w}=e,{templates:v,translateString:g}=w,{RemoveButton:C}=v.ButtonTemplates,S=g(Ue.KeyLabel,[a]),E=Bn in d,A=["form-group",r];!p&&m&&m.length>0&&A.push("has-error has-danger");const x=A.join(" ").trim();return E?$.jsx("div",{className:x,style:n,children:$.jsxs("div",{className:"row",children:[$.jsx("div",{className:"col-xs-5 form-additional",children:$.jsxs("div",{className:"form-group",children:[$.jsx(Uw,{label:S,required:f,id:`${t}-key`}),$.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:({target:N})=>s(N&&N.value),defaultValue:a})]})}),$.jsx("div",{className:"form-additional form-group col-xs-5",children:y}),$.jsx("div",{className:"col-xs-2",children:$.jsx(C,{id:tn(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l(a),uiSchema:_,registry:w})})]})}):$.jsx("div",{className:x,style:n,children:y})}function LJ(){return{ArrayFieldDescriptionTemplate:fJ,ArrayFieldItemTemplate:dJ,ArrayFieldItemButtonsTemplate:hJ,ArrayFieldTemplate:pJ,ArrayFieldTitleTemplate:mJ,ButtonTemplates:SJ(),BaseInputTemplate:gJ,DescriptionFieldTemplate:CJ,ErrorListTemplate:EJ,FieldTemplate:AJ,FieldErrorTemplate:TJ,FieldHelpTemplate:PJ,GridTemplate:IJ,MultiSchemaFieldTemplate:xJ,ObjectFieldTemplate:DJ,TitleFieldTemplate:NJ,UnsupportedFieldTemplate:MJ,WrapIfAdditionalTemplate:kJ}}function jJ(e){return Object.values(e).every(t=>t!==-1)}function BJ({type:e,range:t,value:r,select:n,rootId:i,name:a,disabled:s,readonly:l,autofocus:u,registry:f,onBlur:d,onFocus:p}){const m=i+"_"+e,{SelectWidget:y}=f.widgets;return $.jsx(y,{schema:{type:"integer"},id:m,name:a,className:"form-control",options:{enumOptions:kd(t[0],t[1])},placeholder:e,value:r,disabled:s,readonly:l,autofocus:u,onChange:_=>n(e,_),onBlur:d,onFocus:p,registry:f,label:"","aria-describedby":Tt(i)})}function UJ({time:e=!1,disabled:t=!1,readonly:r=!1,autofocus:n=!1,options:i,id:a,name:s,registry:l,onBlur:u,onFocus:f,onChange:d,value:p}){const{translateString:m}=l,[y,_]=B.useState(ga(p,e));B.useEffect(()=>{_(ga(p,e))},[e,p]);const w=B.useCallback((C,S)=>{const E={...y,[C]:typeof S>"u"?-1:S};jJ(E)?d(Al(E,e)):_(E)},[y,d,e]),v=B.useCallback(C=>{if(C.preventDefault(),t||r)return;const S=ga(new Date().toJSON(),e);d(Al(S,e))},[t,r,e,d]),g=B.useCallback(C=>{C.preventDefault(),!(t||r)&&d(void 0)},[t,r,d]);return $.jsxs("ul",{className:"list-inline",children:[y_(y,e,i.yearsRange,i.format).map((C,S)=>$.jsx("li",{className:"list-inline-item",children:$.jsx(BJ,{rootId:a,name:s,select:w,...C,disabled:t,readonly:r,registry:l,onBlur:u,onFocus:f,autofocus:n&&S===0})},S)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&$.jsx("li",{className:"list-inline-item",children:$.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:v,children:m(Ue.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&$.jsx("li",{className:"list-inline-item",children:$.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:m(Ue.ClearLabel)})})]})}function WJ({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return $.jsx(r,{time:e,...t})}function qJ({schema:e,uiSchema:t,options:r,id:n,value:i,disabled:a,readonly:s,label:l,hideLabel:u,autofocus:f=!1,onBlur:d,onFocus:p,onChange:m,registry:y}){const _=Se("DescriptionFieldTemplate",y,r),w=Ol(e),v=B.useCallback(E=>m(E.target.checked),[m]),g=B.useCallback(E=>d(n,E.target.checked),[d,n]),C=B.useCallback(E=>p(n,E.target.checked),[p,n]),S=r.description??e.description;return $.jsxs("div",{className:`checkbox ${a||s?"disabled":""}`,children:[!u&&S&&$.jsx(_,{id:pa(n),description:S,schema:e,uiSchema:t,registry:y}),$.jsxs("label",{children:[$.jsx("input",{type:"checkbox",id:n,name:n,checked:typeof i>"u"?!1:i,required:w,disabled:a||s,autoFocus:f,onChange:v,onBlur:g,onFocus:C,"aria-describedby":Tt(n)}),O_($.jsx("span",{children:l}),u)]})]})}function VJ({id:e,disabled:t,options:{inline:r=!1,enumOptions:n,enumDisabled:i,emptyValue:a},value:s,autofocus:l=!1,readonly:u,onChange:f,onBlur:d,onFocus:p}){const m=Array.isArray(s)?s:[s],y=B.useCallback(({target:w})=>d(e,At(w&&w.value,n,a)),[d,e,n,a]),_=B.useCallback(({target:w})=>p(e,At(w&&w.value,n,a)),[p,e,n,a]);return $.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(n)&&n.map((w,v)=>{const g=Ld(w.value,m),C=Array.isArray(i)&&i.indexOf(w.value)!==-1,S=t||C||u?"disabled":"",E=x=>{x.target.checked?f(JV(v,m,n)):f(YV(v,m,n))},A=$.jsxs("span",{children:[$.jsx("input",{type:"checkbox",id:El(e,v),name:e,checked:g,value:String(v),disabled:t||C||u,autoFocus:l&&v===0,onChange:E,onBlur:y,onFocus:_,"aria-describedby":Tt(e)}),$.jsx("span",{children:w.label})]});return r?$.jsx("label",{className:`checkbox-inline ${S}`,children:A},v):$.jsx("div",{className:`checkbox ${S}`,children:$.jsx("label",{children:A})},v)})})}function RJ(e){const{disabled:t,readonly:r,options:n,registry:i}=e,a=Se("BaseInputTemplate",i,n);return $.jsx(a,{type:"color",...e,disabled:t||r})}function zJ(e){const{onChange:t,options:r,registry:n}=e,i=Se("BaseInputTemplate",n,r),a=B.useCallback(s=>t(s||void 0),[t]);return $.jsx(i,{type:"date",...e,onChange:a})}function HJ(e){const{onChange:t,value:r,options:n,registry:i}=e,a=Se("BaseInputTemplate",i,n);return $.jsx(a,{type:"datetime-local",...e,value:pR(r),onChange:s=>t(fR(s))})}function KJ(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"email",...e})}function GJ(e,t){return e===null?null:e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function YJ(e){const{name:t,size:r,type:n}=e;return new Promise((i,a)=>{const s=new window.FileReader;s.onerror=a,s.onload=l=>{var u;typeof((u=l.target)==null?void 0:u.result)=="string"?i({dataURL:GJ(l.target.result,t),name:t,size:r,type:n}):i({dataURL:null,name:t,size:r,type:n})},s.readAsDataURL(e)})}function JJ(e){return Promise.all(Array.from(e).map(YJ))}function XJ({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:n,type:i,name:a}=e;return n?["image/jpeg","image/png"].includes(i)?$.jsx("img",{src:n,style:{maxWidth:"100%"},className:"file-preview"}):$.jsxs($.Fragment,{children:[" ",$.jsx("a",{download:`preview-${a}`,href:n,className:"file-download",children:r(Ue.PreviewLabel)})]}):null}function ZJ({filesInfo:e,registry:t,preview:r,onRemove:n,options:i}){if(e.length===0)return null;const{translateString:a}=t,{RemoveButton:s}=Se("ButtonTemplates",t,i);return $.jsx("ul",{className:"file-info",children:e.map((l,u)=>{const{name:f,size:d,type:p}=l,m=()=>n(u);return $.jsxs("li",{children:[$.jsx(Bc,{children:a(Ue.FilesInfo,[f,p,String(d)])}),r&&$.jsx(XJ,{fileInfo:l,registry:t}),$.jsx(s,{onClick:m,registry:t})]},u)})})}function QJ(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:n,name:i}=HV(r);return[...t,{dataURL:r,name:i,size:n.size,type:n.type}]}catch{return t}},[])}function eX(e){const{disabled:t,readonly:r,required:n,multiple:i,onChange:a,value:s,options:l,registry:u}=e,f=Se("BaseInputTemplate",u,l),d=B.useCallback(y=>{y.target.files&&JJ(y.target.files).then(_=>{const w=_.map(v=>v.dataURL);a(i?s.concat(w):w[0])})},[i,s,a]),p=B.useMemo(()=>QJ(Array.isArray(s)?s:[s]),[s]),m=B.useCallback(y=>{if(i){const _=s.filter((w,v)=>v!==y);a(_)}else a(void 0)},[i,s,a]);return $.jsxs("div",{children:[$.jsx(f,{...e,disabled:t||r,type:"file",required:s?!1:n,onChangeOverride:d,value:"",accept:l.accept?String(l.accept):void 0}),$.jsx(ZJ,{filesInfo:p,onRemove:m,registry:u,preview:l.filePreview,options:l})]})}function tX({id:e,value:t}){return $.jsx("input",{type:"hidden",id:e,name:e,value:typeof t>"u"?"":t})}function rX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"password",...e})}function nX({options:e,value:t,required:r,disabled:n,readonly:i,autofocus:a=!1,onBlur:s,onFocus:l,onChange:u,id:f}){const{enumOptions:d,enumDisabled:p,inline:m,emptyValue:y}=e,_=B.useCallback(({target:v})=>s(f,At(v&&v.value,d,y)),[s,d,y,f]),w=B.useCallback(({target:v})=>l(f,At(v&&v.value,d,y)),[l,d,y,f]);return $.jsx("div",{className:"field-radio-group",id:f,role:"radiogroup",children:Array.isArray(d)&&d.map((v,g)=>{const C=Ld(v.value,t),S=Array.isArray(p)&&p.indexOf(v.value)!==-1,E=n||S||i?"disabled":"",A=()=>u(v.value),x=$.jsxs("span",{children:[$.jsx("input",{type:"radio",id:El(f,g),checked:C,name:f,required:r,value:String(g),disabled:n||S||i,autoFocus:a&&g===0,onChange:A,onBlur:_,onFocus:w,"aria-describedby":Tt(f)}),$.jsx("span",{children:v.label})]});return m?$.jsx("label",{className:`radio-inline ${E}`,children:x},g):$.jsx("div",{className:`radio ${E}`,children:$.jsx("label",{children:x})},g)})})}function iX(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return $.jsxs("div",{className:"field-range-wrapper",children:[$.jsx(r,{type:"range",...e}),$.jsx("span",{className:"range-view",children:t})]})}function aX({id:e,value:t,required:r,disabled:n,readonly:i,autofocus:a,onChange:s,onFocus:l,onBlur:u,schema:f,options:d}){const{stars:p=5,shape:m="star"}=d,y=f.maximum?Math.min(f.maximum,5):Math.min(Math.max(p,1),5),_=f.minimum||0,w=B.useCallback(S=>{!n&&!i&&s(S)},[s,n,i]),v=B.useCallback(S=>{if(l){const E=Number(S.target.dataset.value);l(e,E)}},[l,e]),g=B.useCallback(S=>{if(u){const E=Number(S.target.dataset.value);u(e,E)}},[u,e]),C=S=>m==="heart"?S?"♥":"♡":S?"★":"☆";return $.jsx($.Fragment,{children:$.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:n||i?"default":"pointer"},children:[[...Array(y)].map((S,E)=>{const A=_+E,x=A<=t;return $.jsx("span",{onClick:()=>w(A),onFocus:v,onBlur:g,"data-value":A,tabIndex:n||i?-1:0,role:"radio","aria-checked":A===t,"aria-label":`${A} ${m==="heart"?"heart":"star"}${A===1?"":"s"}`,style:{color:x?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:C(x)},E)}),$.jsx("input",{type:"hidden",id:e,name:e,value:t||"",required:r,disabled:n||i,"aria-hidden":"true"})]})})}function kp(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function oX({schema:e,id:t,options:r,value:n,required:i,disabled:a,readonly:s,multiple:l=!1,autofocus:u=!1,onChange:f,onBlur:d,onFocus:p,placeholder:m}){const{enumOptions:y,enumDisabled:_,emptyValue:w}=r,v=l?[]:"",g=B.useCallback(x=>{const N=kp(x,l);return p(t,At(N,y,w))},[p,t,l,y,w]),C=B.useCallback(x=>{const N=kp(x,l);return d(t,At(N,y,w))},[d,t,l,y,w]),S=B.useCallback(x=>{const N=kp(x,l);return f(At(N,y,w))},[f,l,y,w]),E=Sl(n,y,l),A=!l&&e.default===void 0;return $.jsxs("select",{id:t,name:t,multiple:l,role:"combobox",className:"form-control",value:typeof E>"u"?v:E,required:i,disabled:a||s,autoFocus:u,onBlur:C,onFocus:g,onChange:S,"aria-describedby":Tt(t),children:[A&&$.jsx("option",{value:"",children:m}),Array.isArray(y)&&y.map(({value:x,label:N},Y)=>{const K=_&&_.indexOf(x)!==-1;return $.jsx("option",{value:String(Y),disabled:K,children:N},Y)})]})}function Ww({id:e,options:t={},placeholder:r,value:n,required:i,disabled:a,readonly:s,autofocus:l=!1,onChange:u,onBlur:f,onFocus:d}){const p=B.useCallback(({target:{value:_}})=>u(_===""?t.emptyValue:_),[u,t.emptyValue]),m=B.useCallback(({target:_})=>f(e,_&&_.value),[f,e]),y=B.useCallback(({target:_})=>d(e,_&&_.value),[e,d]);return $.jsx("textarea",{id:e,name:e,className:"form-control",value:n||"",placeholder:r,required:i,disabled:a,readOnly:s,autoFocus:l,rows:t.rows,onBlur:m,onFocus:y,onChange:p,"aria-describedby":Tt(e)})}Ww.defaultProps={autofocus:!1,options:{}};function sX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{...e})}function lX(e){const{onChange:t,options:r,registry:n}=e,i=Se("BaseInputTemplate",n,r),a=B.useCallback(s=>t(s?`${s}:00`:void 0),[t]);return $.jsx(i,{type:"time",...e,onChange:a})}function cX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"url",...e})}function uX(e){const{options:t,registry:r}=e,n=Se("BaseInputTemplate",r,t);return $.jsx(n,{type:"number",...e})}function fX(){return{AltDateWidget:UJ,AltDateTimeWidget:WJ,CheckboxWidget:qJ,CheckboxesWidget:VJ,ColorWidget:RJ,DateWidget:zJ,DateTimeWidget:HJ,EmailWidget:KJ,FileWidget:eX,HiddenWidget:tX,PasswordWidget:rX,RadioWidget:nX,RangeWidget:iX,RatingWidget:aX,SelectWidget:oX,TextWidget:sX,TextareaWidget:Ww,TimeWidget:lX,UpDownWidget:uX,URLWidget:cX}}function dX(){return{fields:uJ(),templates:LJ(),widgets:fX(),rootSchema:{},formContext:{},translateString:GV}}let hX=class extends B.Component{constructor(r){super(r);pe(this,"formElement");pe(this,"pendingChanges",[]);pe(this,"getUsedFormData",(r,n)=>{if(n.length===0&&typeof r!="object")return r;const i=fw(r,n);return Array.isArray(r)?Object.keys(i).map(a=>i[a]):i});pe(this,"getFieldNames",(r,n)=>{const i=(a,s=[],l=[[]])=>(Object.keys(a).forEach(u=>{if(typeof a[u]=="object"){const f=l.map(d=>[...d,u]);a[u][Gu]&&a[u][Ts]!==""?s.push(a[u][Ts]):i(a[u],s,f)}else u===Ts&&a[u]!==""&&l.forEach(f=>{const d=de(n,f);(typeof d!="object"||Ut(d)||Array.isArray(d)&&d.every(p=>typeof p!="object"))&&s.push(f)})}),s);return i(r)});pe(this,"omitExtraData",r=>{const{schema:n,schemaUtils:i}=this.state,a=i.retrieveSchema(n,r),s=i.toPathSchema(a,"",r),l=this.getFieldNames(s,r);return this.getUsedFormData(r,l)});pe(this,"onChange",(r,n,i,a)=>{this.pendingChanges.push({newValue:r,path:n,newErrorSchema:i,id:a}),this.pendingChanges.length===1&&this.processPendingChange()});pe(this,"reset",()=>{const{onChange:r}=this.props,a={formData:this.getStateFromProps(this.props,void 0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{}};this.setState(a,()=>r&&r({...this.state,...a}))});pe(this,"onBlur",(r,n)=>{const{onBlur:i}=this.props;i&&i(r,n)});pe(this,"onFocus",(r,n)=>{const{onFocus:i}=this.props;i&&i(r,n)});pe(this,"onSubmit",r=>{if(r.preventDefault(),r.target!==r.currentTarget)return;r.persist();const{omitExtraData:n,extraErrors:i,noValidate:a,onSubmit:s}=this.props;let{formData:l}=this.state;if(n===!0&&(l=this.omitExtraData(l)),a||this.validateFormWithFormData(l)){const u=i||{},f=i?Tl(i):[];this.setState({formData:l,errors:f,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s({...this.state,formData:l,status:"submitted"},r)})}});pe(this,"submit",()=>{if(this.formElement.current){const r=new CustomEvent("submit",{cancelable:!0});r.preventDefault(),this.formElement.current.dispatchEvent(r),this.formElement.current.requestSubmit()}});pe(this,"validateFormWithFormData",r=>{const{extraErrors:n,extraErrorsBlockSubmit:i,focusOnFirstError:a,onError:s}=this.props,{errors:l}=this.state,u=this.validate(r);let f=u.errors,d=u.errorSchema;const p=f,m=d,y=f.length>0||n&&i;if(y){if(n){const _=Pl(u,n);d=_.errorSchema,f=_.errors}a&&(typeof a=="function"?a(f[0]):this.focusOnError(f[0])),this.setState({errors:f,errorSchema:d,schemaValidationErrors:p,schemaValidationErrorSchema:m},()=>{s?s(f):console.error("Form validation failed",f)})}else l.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!y});if(!r.validator)throw new Error("A validator is required for Form functionality to work");this.state=this.getStateFromProps(r,r.formData),this.props.onChange&&!pt(this.state.formData,this.props.formData)&&this.props.onChange(this.state),this.formElement=B.createRef()}getSnapshotBeforeUpdate(r,n){if(!pt(this.props,r)){const i=$R(this.props.formData,r.formData),a=!pt(r.schema,this.props.schema),s=i.length>0||!pt(r.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,a||s?void 0:this.state.retrievedSchema,a,i),u=!pt(l,n);return{nextState:l,shouldUpdate:u}}return{shouldUpdate:!1}}componentDidUpdate(r,n,i){if(i.shouldUpdate){const{nextState:a}=i;!pt(a.formData,this.props.formData)&&!pt(a.formData,n.formData)&&this.props.onChange&&this.props.onChange(a),this.setState(a)}}getStateFromProps(r,n,i,a=!1,s=[]){var te;const l=this.state||{},u="schema"in r?r.schema:this.props.schema,f="validator"in r?r.validator:this.props.validator,d=("uiSchema"in r?r.uiSchema:this.props.uiSchema)||{},p=typeof n<"u",m="liveValidate"in r?r.liveValidate:this.props.liveValidate,y=p&&!r.noValidate&&m,_="experimental_defaultFormStateBehavior"in r?r.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in r?r.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let v=l.schemaUtils;(!v||v.doesSchemaUtilsDiffer(f,u,_,w))&&(v=zV(f,u,_,w));const g=v.getRootSchema(),C=v.getDefaultFormState(g,n),S=this.updateRetrievedSchema(i??v.retrieveSchema(g,C)),E=()=>r.noValidate||a?{errors:[],errorSchema:{}}:r.liveValidate?{errors:l.errors||[],errorSchema:l.errorSchema||{}}:{errors:l.schemaValidationErrors||[],errorSchema:l.schemaValidationErrorSchema||{}};let A,x,N=l.schemaValidationErrors,Y=l.schemaValidationErrorSchema;if(y){const ee=this.validate(C,g,v,S);A=ee.errors,i===void 0?x=ee.errorSchema:x=bn((te=this.state)==null?void 0:te.errorSchema,ee.errorSchema,"preventDuplicates"),N=A,Y=x}else{const ee=E();if(A=ee.errors,x=ee.errorSchema,s.length>0){const ae=s.reduce((Q,k)=>(Q[k]=void 0,Q),{});x=Y=bn(ee.errorSchema,ae,"preventDuplicates")}}if(r.extraErrors){const ee=Pl({errorSchema:x,errors:A},r.extraErrors);x=ee.errorSchema,A=ee.errors}const K=v.toIdSchema(S,d["ui:rootFieldId"],C,r.idPrefix,r.idSeparator);return{schemaUtils:v,schema:g,uiSchema:d,idSchema:K,formData:C,edit:p,errors:A,errorSchema:x,schemaValidationErrors:N,schemaValidationErrorSchema:Y,retrievedSchema:S}}shouldComponentUpdate(r,n){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return A_(this,r,n,i)}getPreviousCustomValidateErrors(){const{customValidate:r,uiSchema:n}=this.props,i=this.state.formData;let a={};if(typeof r=="function"){const s=r(i,Ds(i),n);a=Vd(s)}return a}validate(r,n=this.state.schema,i,a){const s=i||this.state.schemaUtils,{customValidate:l,transformErrors:u,uiSchema:f}=this.props,d=a??s.retrieveSchema(n,r);return s.getValidator().validateFormData(r,d,l,u,f)}renderErrors(r){const{errors:n,errorSchema:i,schema:a,uiSchema:s}=this.state,{formContext:l}=this.props,u=we(s),f=Se("ErrorListTemplate",r,u);return n&&n.length?$.jsx(f,{errors:n,errorSchema:i||{},schema:a,uiSchema:s,formContext:l,registry:r}):null}filterErrorsBasedOnSchema(r,n,i){const{retrievedSchema:a,schemaUtils:s}=this.state,l=n??a,u=s.toPathSchema(l,"",i),f=this.getFieldNames(u,i),d=fw(r,f);(n==null?void 0:n.type)!=="object"&&(n==null?void 0:n.type)!=="array"&&(d.__errors=r.__errors);const p=this.getPreviousCustomValidateErrors(),m=(_=[],w)=>_.length===0?_:_.filter(v=>!w.includes(v)),y=(_,w={})=>(I_(_,(v,g)=>{const C=w[g];So(v)||Array.isArray(v)&&v.length===0?delete _[g]:ke(v)&&ke(C)&&Array.isArray(C==null?void 0:C.__errors)?_[g]=m(v.__errors,C.__errors):typeof v=="object"&&!Array.isArray(v.__errors)&&y(v,w[g])}),_);return y(d,p)}processPendingChange(){if(this.pendingChanges.length===0)return;const{newValue:r,path:n,id:i}=this.pendingChanges[0];let{newErrorSchema:a}=this.pendingChanges[0];const{extraErrors:s,omitExtraData:l,liveOmit:u,noValidate:f,liveValidate:d,onChange:p,idPrefix:m=""}=this.props,{formData:y,schemaUtils:_,schema:w,errorSchema:v}=this.state,g=!n||n.length===0||n.length===1&&n[0]===m;let C=this.state.retrievedSchema,S=g?r:Eo(y);if(ke(S)||Array.isArray(S)){g||Xe(S,n,r);const N=this.getStateFromProps(this.props,S);S=N.formData,C=N.retrievedSchema}const E=!f&&d;let A={formData:S,schema:w},x=S;if(l===!0&&u===!0&&(x=this.omitExtraData(S),A={formData:x}),a&&!g){const N=Eo(v);Xe(N,n,a),a=N}if(E){const N=this.validate(x,w,_,C);let Y=N.errors,K=N.errorSchema;const H=Y,te=K;if(s){const ee=Pl(N,s);K=ee.errorSchema,Y=ee.errors}if(a){const ee=this.filterErrorsBasedOnSchema(a,C,x);K=bn(K,ee,"preventDuplicates")}A={formData:x,errors:Y,errorSchema:K,schemaValidationErrors:H,schemaValidationErrorSchema:te}}else if(!f&&a){const N=s?bn(a,s,"preventDuplicates"):a;A={formData:x,errorSchema:N,errors:Tl(N)}}this.setState(A,()=>{p&&p({...this.state,...A},i),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(r){var i;return pt(r,(i=this.state)==null?void 0:i.retrievedSchema)?this.state.retrievedSchema:r}getRegistry(){var m;const{translateString:r,uiSchema:n={},experimental_componentUpdateStrategy:i="customDeep"}=this.props,{schema:a,schemaUtils:s}=this.state,{fields:l,templates:u,widgets:f,formContext:d,translateString:p}=dX();return{fields:{...l,...this.props.fields},templates:{...u,...this.props.templates,ButtonTemplates:{...u.ButtonTemplates,...(m=this.props.templates)==null?void 0:m.ButtonTemplates}},widgets:{...f,...this.props.widgets},rootSchema:a,formContext:this.props.formContext||d,schemaUtils:s,translateString:r||p,globalUiOptions:n[Ju],experimental_componentUpdateStrategy:i}}focusOnError(r){const{idPrefix:n="root",idSeparator:i="_"}=this.props,{property:a}=r,s=T_(a);s[0]===""?s[0]=n:s.unshift(n);const l=s.join(i);let u=this.formElement.current.elements[l];u||(u=this.formElement.current.querySelector(`input[id^="${l}"`)),u&&u.length&&(u=u[0]),u&&u.focus()}validateForm(){const{omitExtraData:r}=this.props;let{formData:n}=this.state;return r===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:r,id:n,idPrefix:i="",idSeparator:a,className:s="",tagName:l,name:u,method:f,target:d,action:p,autoComplete:m,enctype:y,acceptCharset:_,noHtml5Validate:w=!1,disabled:v,readonly:g,formContext:C,showErrorList:S="top",_internalFormWrapper:E}=this.props,{schema:A,uiSchema:x,formData:N,errorSchema:Y,idSchema:K}=this.state,H=this.getRegistry(),{SchemaField:te}=H.fields,{SubmitButton:ee}=H.templates.ButtonTemplates,ae=E?l:void 0,Q=E||l||"form";let{[Ps]:k={}}=we(x);v&&(k={...k,props:{...k.props,disabled:!0}});const q={[Hr]:{[Ps]:k}};return $.jsxs(Q,{className:s||"rjsf",id:n,name:u,method:f,target:d,action:p,autoComplete:m,encType:y,acceptCharset:_,noValidate:w,onSubmit:this.onSubmit,as:ae,ref:this.formElement,children:[S==="top"&&this.renderErrors(H),$.jsx(te,{name:i,schema:A,uiSchema:x,errorSchema:Y,idSchema:K,idPrefix:i,idSeparator:a,formContext:C,formData:N,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:H,disabled:v,readonly:g}),r||$.jsx(ee,{uiSchema:q,registry:H}),S==="bottom"&&this.renderErrors(H)]})}};function pX(e){return B.forwardRef(({fields:t,widgets:r,templates:n,...i},a)=>{var s;return t={...e==null?void 0:e.fields,...t},r={...e==null?void 0:e.widgets,...r},n={...e==null?void 0:e.templates,...n,ButtonTemplates:{...(s=e==null?void 0:e.templates)==null?void 0:s.ButtonTemplates,...n==null?void 0:n.ButtonTemplates}},$.jsx(hX,{...e,...i,fields:t,widgets:r,templates:n,ref:a})})}const mX={width:"100%"},gX={width:"calc(100% / 4)"};function yX(e){const{children:t,buttonsProps:r,hasToolbar:n,index:i,registry:a,uiSchema:s}=e,l=we(s),u=Se("ArrayFieldItemButtonsTemplate",a,l),{rowGutter:f=24,toolbarAlign:d="top"}=a.formContext;return $.jsxs(re.Row,{align:d,gutter:f,children:[$.jsx(re.Col,{flex:"1",children:t}),n&&$.jsx(re.Col,{flex:"192px",children:$.jsx(re.Space.Compact,{style:mX,children:$.jsx(u,{...r,style:gX})})})]},`rjsf-array-item-${i}`)}const vX={paddingBottom:"8px"};function bX(e){const{canAdd:t,className:r,disabled:n,formContext:i,idSchema:a,items:s,onAddClick:l,readonly:u,registry:f,required:d,schema:p,title:m,uiSchema:y}=e,_=we(y),w=Se("ArrayFieldDescriptionTemplate",f,_),v=Se("ArrayFieldItemTemplate",f,_),g=Se("ArrayFieldTitleTemplate",f,_),{ButtonTemplates:{AddButton:C}}=f.templates,{labelAlign:S="right",rowGutter:E=24}=i,{getPrefixCls:A}=B.useContext(re.ConfigProvider.ConfigContext),N=`${A("form")}-item-label`,Y=Il(N,S==="left"&&`${N}-left`);return $.jsx("fieldset",{className:r,id:a.$id,children:$.jsxs(re.Row,{gutter:E,children:[(_.title||m)&&$.jsx(re.Col,{className:Y,span:24,children:$.jsx(g,{idSchema:a,required:d,title:_.title||m,schema:p,uiSchema:y,registry:f})}),(_.description||p.description)&&$.jsx(re.Col,{span:24,style:vX,children:$.jsx(w,{description:_.description||p.description,idSchema:a,schema:p,uiSchema:y,registry:f})}),$.jsx(re.Col,{className:"row array-item-list",span:24,children:s&&s.map(({key:K,...H})=>$.jsx(v,{...H},K))}),t&&$.jsx(re.Col,{span:24,children:$.jsx(re.Row,{gutter:E,justify:"end",children:$.jsx(re.Col,{flex:"192px",children:$.jsx(C,{id:tn(a,"add"),className:"rjsf-array-item-add",disabled:n||u,onClick:l,uiSchema:y,registry:f})})})})]})})}const qw={width:"100%"};function _X(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onChangeOverride:s,onFocus:l,options:u,placeholder:f,readonly:d,schema:p,value:m,type:y}=e,_=b_(p,y,u,!1),{readonlyAsDisabled:w=!0}=r,v=A=>a(A),g=s||(({target:A})=>a(A.value===""?u.emptyValue:A.value)),C=({target:A})=>i(n,A&&A.value),S=({target:A})=>l(n,A&&A.value),E=_.type==="number"||_.type==="integer"?$.jsx(re.InputNumber,{disabled:t||w&&d,id:n,name:n,onBlur:d?void 0:C,onChange:d?void 0:v,onFocus:d?void 0:S,placeholder:f,style:qw,list:p.examples?ma(n):void 0,..._,value:m,"aria-describedby":Tt(n,!!p.examples)}):$.jsx(re.Input,{disabled:t||w&&d,id:n,name:n,onBlur:d?void 0:C,onChange:d?void 0:g,onFocus:d?void 0:S,placeholder:f,style:qw,list:p.examples?ma(n):void 0,..._,value:m,"aria-describedby":Tt(n,!!p.examples)});return $.jsxs($.Fragment,{children:[E,Array.isArray(p.examples)&&$.jsx("datalist",{id:ma(n),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(A=>$.jsx("option",{value:A},A))})]})}function $X(e){const{id:t,description:r,registry:n,uiSchema:i}=e;return r?$.jsx("span",{id:t,children:$.jsx(Mp,{description:r,registry:n,uiSchema:i})}):null}var Lp={exports:{}},Uc={},Vw={exports:{}},Rw={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Rw);var Wc=Rw.exports;(function(e){var t=Wc.default;function r(n,i){if(typeof WeakMap=="function")var a=new WeakMap,s=new WeakMap;return(e.exports=r=function(u,f){if(!f&&u&&u.__esModule)return u;var d,p,m={__proto__:null,default:u};if(u===null||t(u)!="object"&&typeof u!="function")return m;if(d=f?s:a){if(d.has(u))return d.get(u);d.set(u,m)}for(var y in u)y!=="default"&&{}.hasOwnProperty.call(u,y)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(u,y))&&(p.get||p.set)?d(m,y,p):m[y]=u[y]);return m},e.exports.__esModule=!0,e.exports.default=e.exports)(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Vw);var Sn=Vw.exports,zw={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zw);var Ur=zw.exports,Hw={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hw);var Ii=Hw.exports,jp={};Object.defineProperty(jp,"__esModule",{value:!0});var wX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};jp.default=wX;var Cn={},Kw={exports:{}},Gw={exports:{}};(function(e){function t(r){if(Array.isArray(r))return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Gw);var SX=Gw.exports,Yw={exports:{}};(function(e){function t(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,s,l,u,f=[],d=!0,p=!1;try{if(l=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(a=l.call(i)).done)&&(f.push(a.value),f.length!==n);d=!0);}catch(m){p=!0,s=m}finally{try{if(!d&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(p)throw s}}return f}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Yw);var CX=Yw.exports,Jw={exports:{}},Xw={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Xw);var EX=Xw.exports;(function(e){var t=EX;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Jw);var OX=Jw.exports,Zw={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
132
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Zw);var AX=Zw.exports;(function(e){var t=SX,r=CX,n=OX,i=AX;function a(s,l){return t(s)||r(s,l)||n(s,l)||i()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(Kw);var Qw=Kw.exports,eS={exports:{}},tS={exports:{}},rS={exports:{}};(function(e){var t=Wc.default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(rS);var TX=rS.exports;(function(e){var t=Wc.default,r=TX;function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(tS);var PX=tS.exports;(function(e){var t=PX;function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(eS);var nS=eS.exports,iS={exports:{}},aS={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(n.indexOf(a)!==-1)continue;i[a]=r[a]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(aS);var IX=aS.exports;(function(e){var t=IX;function r(n,i){if(n==null)return{};var a,s,l=t(n,i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)a=u[s],i.indexOf(a)===-1&&{}.propertyIsEnumerable.call(n,a)&&(l[a]=n[a])}return l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(iS);var oS=iS.exports;const sS=m2(LR);var ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var xX=B,DX=(0,xX.createContext)({});ts.default=DX;var rs={},lS={exports:{}};(function(e){var t=nS;function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(lS);var Bp=lS.exports,qt={},Da={},Up={};Object.defineProperty(Up,"__esModule",{value:!0}),Up.default=FX;function FX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0}),Wp.default=NX;function NX(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var qp=Ur.default;Object.defineProperty(Da,"__esModule",{value:!0}),Da.clearContainerCache=WX,Da.injectCSS=Rp,Da.removeCSS=BX,Da.updateCSS=qX;var cS=qp(Bp),MX=qp(Up),kX=qp(Wp),uS="data-rc-order",fS="data-rc-priority",LX="rc-util-key",qc=new Map;function dS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):LX}function Vc(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function jX(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Vp(e){return Array.from((qc.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Rp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,MX.default)())return null;var r=t.csp,n=t.prepend,i=t.priority,a=i===void 0?0:i,s=jX(n),l=s==="prependQueue",u=document.createElement("style");u.setAttribute(uS,s),l&&a&&u.setAttribute(fS,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var f=Vc(t),d=f.firstChild;if(n){if(l){var p=(t.styles||Vp(f)).filter(function(m){if(!["prepend","prependQueue"].includes(m.getAttribute(uS)))return!1;var y=Number(m.getAttribute(fS)||0);return a>=y});if(p.length)return f.insertBefore(u,p[p.length-1].nextSibling),u}f.insertBefore(u,d)}else f.appendChild(u);return u}function hS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Vc(t);return(t.styles||Vp(r)).find(function(n){return n.getAttribute(dS(t))===e})}function BX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=hS(e,t);if(r){var n=Vc(t);n.removeChild(r)}}function UX(e,t){var r=qc.get(e);if(!r||!(0,kX.default)(document,r)){var n=Rp("",t),i=n.parentNode;qc.set(e,i),e.removeChild(n)}}function WX(){qc.clear()}function qX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Vc(r),i=Vp(n),a=(0,cS.default)((0,cS.default)({},r),{},{styles:i});UX(n,a);var s=hS(t,a);if(s){var l,u;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var f;s.nonce=(f=a.csp)===null||f===void 0?void 0:f.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var d=Rp(e,a);return d.setAttribute(dS(a),t),d}var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.getShadowRoot=VX,Rc.inShadow=mS;function pS(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function mS(e){return pS(e)instanceof ShadowRoot}function VX(e){return mS(e)?pS(e):null}var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.call=Kp,Sr.default=void 0,Sr.note=yS,Sr.noteOnce=bS,Sr.preMessage=void 0,Sr.resetWarned=vS,Sr.warning=gS,Sr.warningOnce=ns;var zp={},Hp=[],RX=Sr.preMessage=function(t){Hp.push(t)};function gS(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Hp.reduce(function(n,i){return i(n??"","warning")},t);r&&console.error("Warning: ".concat(r))}}function yS(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var r=Hp.reduce(function(n,i){return i(n??"","note")},t);r&&console.warn("Note: ".concat(r))}}function vS(){zp={}}function Kp(e,t,r){!t&&!zp[r]&&(e(!1,r),zp[r]=!0)}function ns(e,t){Kp(gS,e,t)}function bS(e,t){Kp(yS,e,t)}ns.preMessage=RX,ns.resetWarned=vS,ns.noteOnce=bS,Sr.default=ns;var zX=Sn.default,zc=Ur.default;Object.defineProperty(qt,"__esModule",{value:!0}),qt.generate=Jp,qt.getSecondaryColor=eZ,qt.iconStyles=void 0,qt.isIconDefinition=QX,qt.normalizeAttrs=Yp,qt.normalizeTwoToneColors=tZ,qt.useInsertStyles=qt.svgBaseProps=void 0,qt.warning=ZX;var Gp=zc(Bp),_S=zc(Wc),HX=sS,KX=Da,GX=Rc,YX=zc(Sr),Hc=zX(B),JX=zc(ts);function XX(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function ZX(e,t){(0,YX.default)(e,"[@ant-design/icons] ".concat(t))}function QX(e){return(0,_S.default)(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&((0,_S.default)(e.icon)==="object"||typeof e.icon=="function")}function Yp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[XX(r)]=n}return t},{})}function Jp(e,t,r){return r?Hc.default.createElement(e.tag,(0,Gp.default)((0,Gp.default)({key:t},Yp(e.attrs)),r),(e.children||[]).map(function(n,i){return Jp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Hc.default.createElement(e.tag,(0,Gp.default)({key:t},Yp(e.attrs)),(e.children||[]).map(function(n,i){return Jp(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function eZ(e){return(0,HX.generate)(e)[0]}function tZ(e){return e?Array.isArray(e)?e:[e]:[]}qt.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};var rZ=qt.iconStyles=`
133
133
  .anticon {
134
134
  display: inline-flex;
135
135
  align-items: center;
@@ -184,6 +184,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
184
184
  transform: rotate(360deg);
185
185
  }
186
186
  }
187
- `;qt.useInsertStyles=function(t){var r=(0,Hc.useContext)(KX.default),n=r.csp,i=r.prefixCls,a=r.layer,s=QX;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
187
+ `;qt.useInsertStyles=function(t){var r=(0,Hc.useContext)(JX.default),n=r.csp,i=r.prefixCls,a=r.layer,s=rZ;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
188
188
  `).concat(s,`
189
- }`)),(0,Hc.useEffect)(function(){var l=t.current,u=(0,zX.getShadowRoot)(l);(0,RX.updateCSS)(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:u})},[])};var $S=Ur.default,eZ=wn.default;Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var tZ=$S(oS),ns=$S(jp),rZ=eZ(j),xi=qt,nZ=["icon","className","onClick","style","primaryColor","secondaryColor"],is={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function iZ(e){var t=e.primaryColor,r=e.secondaryColor;is.primaryColor=t,is.secondaryColor=r||(0,xi.getSecondaryColor)(t),is.calculated=!!r}function aZ(){return(0,ns.default)({},is)}var Kc=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,s=t.primaryColor,l=t.secondaryColor,u=(0,tZ.default)(t,nZ),f=rZ.useRef(),d=is;if(s&&(d={primaryColor:s,secondaryColor:l||(0,xi.getSecondaryColor)(s)}),(0,xi.useInsertStyles)(f),(0,xi.warning)((0,xi.isIconDefinition)(r),"icon should be icon definiton, but got ".concat(r)),!(0,xi.isIconDefinition)(r))return null;var p=r;return p&&typeof p.icon=="function"&&(p=(0,ns.default)((0,ns.default)({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),(0,xi.generate)(p.icon,"svg-".concat(p.name),(0,ns.default)((0,ns.default)({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:f}))};Kc.displayName="IconReact",Kc.getTwoToneColors=aZ,Kc.setTwoToneColors=iZ,ts.default=Kc;var Gc={},wS=Ur.default;Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.getTwoToneColor=cZ,Gc.setTwoToneColor=lZ;var oZ=wS(Qw),SS=wS(ts),sZ=qt;function lZ(e){var t=(0,sZ.normalizeTwoToneColors)(e),r=(0,oZ.default)(t,2),n=r[0],i=r[1];return SS.default.setTwoToneColors({primaryColor:n,secondaryColor:i})}function cZ(){var e=SS.default.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Di=Ur.default,uZ=wn.default;Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.default=void 0;var fZ=Di(Ii),dZ=Di(Qw),CS=Di(nS),hZ=Di(oS),Yc=uZ(j),pZ=Di(k_),mZ=sS,gZ=Di(es),yZ=Di(ts),Jp=Gc,vZ=qt,bZ=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];(0,Jp.setTwoToneColor)(mZ.blue.primary);var Jc=Yc.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,u=e.twoToneColor,f=(0,hZ.default)(e,bZ),d=Yc.useContext(gZ.default),p=d.prefixCls,m=p===void 0?"anticon":p,y=d.rootClassName,_=(0,pZ.default)(y,m,(0,CS.default)((0,CS.default)({},"".concat(m,"-").concat(n.name),!!n.name),"".concat(m,"-spin"),!!i||n.name==="loading"),r),w=s;w===void 0&&l&&(w=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,g=(0,vZ.normalizeTwoToneColors)(u),C=(0,dZ.default)(g,2),S=C[0],E=C[1];return Yc.createElement("span",(0,fZ.default)({role:"img","aria-label":n.name},f,{ref:t,tabIndex:w,onClick:l,className:_}),Yc.createElement(yZ.default,{icon:n,primaryColor:S,secondaryColor:E,style:v}))});Jc.displayName="AntdIcon",Jc.getTwoToneColor=Jp.getTwoToneColor,Jc.setTwoToneColor=Jp.setTwoToneColor,Sn.default=Jc;var _Z=wn.default,Xp=Ur.default;Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.default=void 0;var $Z=Xp(Ii),ES=_Z(j),wZ=Xp(Lp),SZ=Xp(Sn),CZ=function(t,r){return ES.createElement(SZ.default,(0,$Z.default)({},t,{ref:r,icon:wZ.default}))},OS=ES.forwardRef(CZ);process.env.NODE_ENV!=="production"&&(OS.displayName="ExclamationCircleOutlined"),Uc.default=OS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Uc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(kp,kp.exports);var EZ=kp.exports;const OZ=Qt(EZ);function AZ({errors:e,registry:t}){const{translateString:r}=t,n=()=>$.jsx(re.List,{className:"list-group",size:"small",children:e.map((i,a)=>$.jsx(re.List.Item,{children:$.jsxs(re.Space,{children:[$.jsx(OZ,{}),i.stack]})},a))});return $.jsx(re.Alert,{className:"panel panel-danger errors",description:n(),message:r(Be.ErrorsLabel),type:"error"})}var Zp={exports:{}},Xc={},Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});var TZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"};Qp.default=TZ;var PZ=wn.default,em=Ur.default;Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=void 0;var IZ=em(Ii),AS=PZ(j),xZ=em(Qp),DZ=em(Sn),FZ=function(t,r){return AS.createElement(DZ.default,(0,IZ.default)({},t,{ref:r,icon:xZ.default}))},TS=AS.forwardRef(FZ);process.env.NODE_ENV!=="production"&&(TS.displayName="ArrowDownOutlined"),Xc.default=TS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Xc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(Zp,Zp.exports);var NZ=Zp.exports;const MZ=Qt(NZ);var tm={exports:{}},Zc={},rm={};Object.defineProperty(rm,"__esModule",{value:!0});var kZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};rm.default=kZ;var LZ=wn.default,nm=Ur.default;Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.default=void 0;var jZ=nm(Ii),PS=LZ(j),BZ=nm(rm),UZ=nm(Sn),WZ=function(t,r){return PS.createElement(UZ.default,(0,jZ.default)({},t,{ref:r,icon:BZ.default}))},IS=PS.forwardRef(WZ);process.env.NODE_ENV!=="production"&&(IS.displayName="ArrowUpOutlined"),Zc.default=IS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Zc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(tm,tm.exports);var qZ=tm.exports;const VZ=Qt(qZ);var im={exports:{}},Qc={},am={};Object.defineProperty(am,"__esModule",{value:!0});var RZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};am.default=RZ;var zZ=wn.default,om=Ur.default;Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.default=void 0;var HZ=om(Ii),xS=zZ(j),KZ=om(am),GZ=om(Sn),YZ=function(t,r){return xS.createElement(GZ.default,(0,HZ.default)({},t,{ref:r,icon:KZ.default}))},DS=xS.forwardRef(YZ);process.env.NODE_ENV!=="production"&&(DS.displayName="CopyOutlined"),Qc.default=DS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Qc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(im,im.exports);var JZ=im.exports;const XZ=Qt(JZ);var sm={exports:{}},eu={},lm={};Object.defineProperty(lm,"__esModule",{value:!0});var ZZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};lm.default=ZZ;var QZ=wn.default,cm=Ur.default;Object.defineProperty(eu,"__esModule",{value:!0}),eu.default=void 0;var eQ=cm(Ii),FS=QZ(j),tQ=cm(lm),rQ=cm(Sn),nQ=function(t,r){return FS.createElement(rQ.default,(0,eQ.default)({},t,{ref:r,icon:tQ.default}))},NS=FS.forwardRef(nQ);process.env.NODE_ENV!=="production"&&(NS.displayName="DeleteOutlined"),eu.default=NS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(eu);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(sm,sm.exports);var iQ=sm.exports;const aQ=Qt(iQ);var um={exports:{}},tu={},fm={};Object.defineProperty(fm,"__esModule",{value:!0});var oQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};fm.default=oQ;var sQ=wn.default,dm=Ur.default;Object.defineProperty(tu,"__esModule",{value:!0}),tu.default=void 0;var lQ=dm(Ii),MS=sQ(j),cQ=dm(fm),uQ=dm(Sn),fQ=function(t,r){return MS.createElement(uQ.default,(0,lQ.default)({},t,{ref:r,icon:cQ.default}))},kS=MS.forwardRef(fQ);process.env.NODE_ENV!=="production"&&(kS.displayName="PlusCircleOutlined"),tu.default=kS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(tu);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(um,um.exports);var dQ=um.exports;const hQ=Qt(dQ);function as(e){const{iconType:t="default",icon:r,onClick:n,uiSchema:i,registry:a,...s}=e;return $.jsx(re.Button,{onClick:n,type:t,icon:r,...s})}function pQ(e){const{registry:{translateString:t}}=e;return $.jsx(as,{title:t(Be.AddItemButton),...e,block:!0,iconType:"primary",icon:$.jsx(hQ,{})})}function mQ(e){const{registry:{translateString:t}}=e;return $.jsx(as,{title:t(Be.CopyButton),...e,icon:$.jsx(XZ,{})})}function gQ(e){const{registry:{translateString:t}}=e;return $.jsx(as,{title:t(Be.MoveDownButton),...e,icon:$.jsx(MZ,{})})}function yQ(e){const{registry:{translateString:t}}=e;return $.jsx(as,{title:t(Be.MoveUpButton),...e,icon:$.jsx(VZ,{})})}function vQ(e){const t=we(e.uiSchema),{registry:{translateString:r}}=e;return $.jsx(as,{title:r(Be.RemoveButton),...e,danger:!0,block:!!t.block,iconType:"primary",icon:$.jsx(aQ,{})})}function bQ(e){const{errors:t=[],idSchema:r}=e;if(t.length===0)return null;const n=Ud(r);return $.jsx("div",{id:n,children:t.map(i=>$.jsx("div",{children:i},`field-${n}-error-${i}`))})}const _Q={span:24},$Q={span:24};function wQ(e){const{children:t,classNames:r,style:n,description:i,disabled:a,displayLabel:s,errors:l,formContext:u,help:f,hidden:d,id:p,label:m,onDropPropertyClick:y,onKeyChange:_,rawErrors:w,rawDescription:v,rawHelp:g,readonly:C,registry:S,required:E,schema:A,uiSchema:x}=e,{colon:N,labelCol:Z=_Q,wrapperCol:G=$Q,wrapperStyle:H,descriptionLocation:ee="below"}=u,te=we(x),ae=Se("WrapIfAdditionalTemplate",S,te);if(d)return $.jsx("div",{className:"rjsf-field-hidden",children:t});const Q=v?i:void 0,k={};switch(ee){case"tooltip":k.tooltip=Q;break;case"below":default:k.extra=Q;break}return $.jsx(ae,{classNames:r,style:n,disabled:a,id:p,label:m,onDropPropertyClick:y,onKeyChange:_,readonly:C,required:E,schema:A,uiSchema:x,registry:S,children:$.jsx(re.Form.Item,{colon:N,hasFeedback:A.type!=="array"&&A.type!=="object",help:!!g&&f||(w!=null&&w.length?l:void 0),htmlFor:p,label:s&&m,labelCol:Z,required:E,style:H,validateStatus:w!=null&&w.length?"error":void 0,wrapperCol:G,...k,children:t})})}function SQ(e){const{children:t,column:r,...n}=e;return r?$.jsx(re.Col,{...n,children:t}):$.jsx(re.Row,{...n,children:t})}function CQ(e){const{optionSchemaField:t,selector:r}=e;return $.jsxs("div",{children:[$.jsx("div",{children:r}),t]})}const EQ={paddingBottom:"8px"};function OQ(e){const{description:t,disabled:r,formContext:n,formData:i,idSchema:a,onAddClick:s,properties:l,readonly:u,required:f,registry:d,schema:p,title:m,uiSchema:y}=e,_=we(y),w=Se("TitleFieldTemplate",d,_),v=Se("DescriptionFieldTemplate",d,_),{ButtonTemplates:{AddButton:g}}=d.templates,{colSpan:C=24,labelAlign:S="right",rowGutter:E=24}=n,A=k=>k.content.props.schema,x=k=>A(k).type,N=k=>k.content.props.uiSchema,Z=k=>we(N(k)).field,G=k=>we(N(k)).widget,H=k=>{const W=x(k),R=Z(k),U=G(k),J=l.length<2||W==="object"||W==="array"||U==="textarea"?24:12;if(Re(C)){const L=C;if(br(U))return L[U];if(br(R))return L[R];if(br(W))return L[W]}return Ad(C)?C:J},{getPrefixCls:ee}=j.useContext(re.ConfigProvider.ConfigContext),ae=`${ee("form")}-item-label`,Q=Il(ae,S==="left"&&`${ae}-left`);return $.jsxs("fieldset",{id:a.$id,children:[$.jsxs(re.Row,{gutter:E,children:[m&&$.jsx(re.Col,{className:Q,span:24,children:$.jsx(w,{id:Cl(a),title:m,required:f,schema:p,uiSchema:y,registry:d})}),t&&$.jsx(re.Col,{span:24,style:EQ,children:$.jsx(v,{id:pa(a),description:t,schema:p,uiSchema:y,registry:d})}),l.filter(k=>!k.hidden).map(k=>$.jsx(re.Col,{span:H(k),children:k.content},k.name))]}),Rg(p,y,i)&&$.jsx(re.Col,{span:24,children:$.jsx(re.Row,{gutter:E,justify:"end",children:$.jsx(re.Col,{flex:"192px",children:$.jsx(g,{id:en(a,"add"),className:"rjsf-object-property-expand",disabled:r||u,onClick:s(p),uiSchema:y,registry:d})})})})]})}function AQ({uiSchema:e}){const{submitText:t,norender:r,props:n}=Ld(e);return r?null:$.jsx(re.Button,{type:"submit",...n,htmlType:"submit",children:t})}function TQ({id:e,required:t,registry:r,title:n}){const{formContext:i}=r,{colon:a=!0}=i;let s=n;a&&typeof n=="string"&&n.trim()!==""&&(s=n.replace(/[::]\s*$/,""));const l=()=>{if(!e)return;const p=document.querySelector(`[id="${e}"]`);p&&p.focus&&p.focus()},{getPrefixCls:u}=j.useContext(re.ConfigProvider.ConfigContext),f=u("form"),d=Il({[`${f}-item-required`]:t,[`${f}-item-no-colon`]:!a});return n?$.jsx("label",{className:d,htmlFor:e,onClick:l,title:typeof n=="string"?n:"",children:s}):null}const PQ={span:24},IQ={span:24},xQ={width:"100%"};function DQ(e){const{children:t,classNames:r,style:n,disabled:i,id:a,label:s,onDropPropertyClick:l,onKeyChange:u,readonly:f,required:d,registry:p,schema:m,uiSchema:y}=e,{colon:_,labelCol:w=PQ,readonlyAsDisabled:v=!0,rowGutter:g=24,toolbarAlign:C="top",wrapperCol:S=IQ,wrapperStyle:E}=p.formContext,{templates:A,translateString:x}=p,{RemoveButton:N}=A.ButtonTemplates,Z=x(Be.KeyLabel,[s]);if(!(jn in m))return $.jsx("div",{className:r,style:n,children:t});const H=({target:ae})=>u(ae&&ae.value),ee=y?y[zr]:{},te={...y,[zr]:{...ee,block:!0}};return $.jsx("div",{className:r,style:n,children:$.jsxs(re.Row,{align:C,gutter:g,children:[$.jsx(re.Col,{className:"form-additional",flex:"1",children:$.jsx("div",{className:"form-group",children:$.jsx(re.Form.Item,{colon:_,className:"form-group",hasFeedback:!0,htmlFor:`${a}-key`,label:Z,labelCol:w,required:d,style:E,wrapperCol:S,children:$.jsx(re.Input,{className:"form-control",defaultValue:s,disabled:i||v&&f,id:`${a}-key`,name:`${a}-key`,onBlur:f?void 0:H,style:xQ,type:"text"})})})}),$.jsx(re.Col,{className:"form-additional",flex:"1",children:t}),$.jsx(re.Col,{flex:"192px",children:$.jsx(N,{id:en(a,"remove"),className:"rjsf-object-property-remove",disabled:i||f,onClick:l(s),uiSchema:te,registry:p})})]})})}function FQ(){return{ArrayFieldItemTemplate:pX,ArrayFieldTemplate:gX,BaseInputTemplate:yX,ButtonTemplates:{AddButton:pQ,CopyButton:mQ,MoveDownButton:gQ,MoveUpButton:yQ,RemoveButton:vQ,SubmitButton:AQ},DescriptionFieldTemplate:vX,ErrorListTemplate:AZ,FieldErrorTemplate:bQ,FieldTemplate:wQ,GridTemplate:SQ,MultiSchemaFieldTemplate:CQ,ObjectFieldTemplate:OQ,TitleFieldTemplate:TQ,WrapIfAdditionalTemplate:DQ}}const NQ=e=>Object.values(e).every(t=>t!==-1);function hm(e){const{autofocus:t,disabled:r,formContext:n,id:i,onBlur:a,onChange:s,onFocus:l,options:u,readonly:f,registry:d,showTime:p,value:m}=e,{translateString:y,widgets:_}=d,{SelectWidget:w}=_,{rowGutter:v=24}=n,[g,C]=j.useState(ga(m,p));j.useEffect(()=>{C(ga(m,p))},[p,m]);const S=(N,Z)=>{const G={...g,[N]:typeof Z>"u"?-1:Z};NQ(G)?s(Al(G,p)):C(G)},E=N=>{if(N.preventDefault(),r||f)return;const Z=ga(new Date().toJSON(),p);s(Al(Z,p))},A=N=>{N.preventDefault(),!(r||f)&&s(void 0)},x=N=>$.jsx(w,{autofocus:N.autofocus,className:"form-control",disabled:N.disabled,id:N.id,name:N.name,onBlur:N.onBlur,onChange:Z=>N.select(N.type,Z),onFocus:N.onFocus,options:{enumOptions:Md(N.range[0],N.range[1])},placeholder:N.type,readonly:N.readonly,schema:{type:"integer"},value:N.value,registry:d,label:"","aria-describedby":At(i)});return $.jsxs(re.Row,{gutter:[Math.floor(v/2),Math.floor(v/2)],children:[g_(g,p,u.yearsRange,u.format).map((N,Z)=>{const G=i+"_"+N.type;return $.jsx(re.Col,{flex:"88px",children:x({...N,autofocus:t&&Z===0,disabled:r,id:G,name:i,onBlur:a,onFocus:l,readonly:f,registry:d,select:S,value:(N.value,void 0)})},G)}),!u.hideNowButton&&$.jsx(re.Col,{flex:"88px",children:$.jsx(re.Button,{block:!0,className:"btn-now",onClick:E,type:"primary",children:y(Be.NowLabel)})}),!u.hideClearButton&&$.jsx(re.Col,{flex:"88px",children:$.jsx(re.Button,{block:!0,className:"btn-clear",danger:!0,onClick:A,type:"primary",children:y(Be.ClearLabel)})})]})}hm.defaultProps={autofocus:!1,disabled:!1,options:{yearsRange:[1900,new Date().getFullYear()+2]},readonly:!1,showTime:!1};function LS(e){const{AltDateWidget:t}=e.registry.widgets;return $.jsx(t,{showTime:!0,...e})}LS.defaultProps={...hm.defaultProps,showTime:!0};function MQ({autofocus:e,disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=r,{enumOptions:p,enumDisabled:m,inline:y,emptyValue:_}=l,w=E=>a(Ot(E,p,_)),C={id:n,onBlur:u?void 0:({target:E})=>i(n,Ot(E.value,p,_)),onFocus:u?void 0:({target:E})=>s(n,Ot(E.value,p,_))},S=wl(f,p,!0);return Array.isArray(p)&&p.length>0?$.jsx($.Fragment,{children:$.jsx(re.Checkbox.Group,{disabled:t||d&&u,name:n,onChange:u?void 0:w,value:S,...C,"aria-describedby":At(n),children:Array.isArray(p)&&p.map((E,A)=>$.jsxs("span",{children:[$.jsx(re.Checkbox,{id:El(n,A),name:n,autoFocus:A===0?e:!1,disabled:Array.isArray(m)&&m.indexOf(E.value)!==-1,value:String(A),children:E.label}),!y&&$.jsx("br",{})]},A))})}):null}function kQ(e){const{autofocus:t,disabled:r,formContext:n,id:i,label:a,hideLabel:s,onBlur:l,onChange:u,onFocus:f,readonly:d,value:p}=e,{readonlyAsDisabled:m=!0}=n,y=({target:g})=>u(g.checked),v={onBlur:d?void 0:({target:g})=>l(i,g&&g.checked),onFocus:d?void 0:({target:g})=>f(i,g&&g.checked)};return $.jsx(re.Checkbox,{autoFocus:t,checked:typeof p>"u"?!1:p,disabled:r||m&&d,id:i,name:i,onChange:d?void 0:y,...v,"aria-describedby":At(i),children:O_(a,s,"")})}const LQ={width:"100%"};function jQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,placeholder:l,readonly:u,value:f}=e,{readonlyAsDisabled:d=!0}=r,p=w=>a(w&&w.toISOString()),m=()=>i(n,f),y=()=>s(n,f),_=w=>w.parentNode;return $.jsx(re.DatePicker,{disabled:t||d&&u,getPopupContainer:_,id:n,name:n,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,showTime:!0,style:LQ,value:f&&oc(f),"aria-describedby":At(n)})}const BQ={width:"100%"};function UQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,placeholder:l,readonly:u,value:f}=e,{readonlyAsDisabled:d=!0}=r,p=w=>a(w&&w.format("YYYY-MM-DD")),m=()=>i(n,f),y=()=>s(n,f),_=w=>w.parentNode;return $.jsx(re.DatePicker,{disabled:t||d&&u,getPopupContainer:_,id:n,name:n,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,showTime:!1,style:BQ,value:f&&oc(f),"aria-describedby":At(n)})}function WQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,placeholder:u,readonly:f,value:d}=e,{readonlyAsDisabled:p=!0}=r,m=l.emptyValue||"",y=({target:v})=>a(v.value===""?m:v.value),_=({target:v})=>i(n,v.value),w=({target:v})=>s(n,v.value);return $.jsx(re.Input.Password,{disabled:t||p&&f,id:n,name:n,onBlur:f?void 0:_,onChange:f?void 0:y,onFocus:f?void 0:w,placeholder:u,value:d||"","aria-describedby":At(n)})}function qQ({autofocus:e,disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=r,{enumOptions:p,enumDisabled:m,emptyValue:y}=l,_=({target:{value:C}})=>a(Ot(C,p,y)),w=({target:C})=>i(n,Ot(C&&C.value,p,y)),v=({target:C})=>s(n,Ot(C&&C.value,p,y)),g=wl(f,p);return $.jsx(re.Radio.Group,{disabled:t||d&&u,id:n,name:n,onChange:u?void 0:_,onBlur:u?void 0:w,onFocus:u?void 0:v,value:g,"aria-describedby":At(n),children:Array.isArray(p)&&p.map((C,S)=>$.jsx(re.Radio,{id:El(n,S),name:n,autoFocus:S===0?e:!1,disabled:t||Array.isArray(m)&&m.indexOf(C.value)!==-1,value:String(S),children:C.label},S))})}function VQ(e){const{autofocus:t,disabled:r,formContext:n,id:i,onBlur:a,onChange:s,onFocus:l,options:u,placeholder:f,readonly:d,schema:p,value:m}=e,{readonlyAsDisabled:y=!0}=n,{min:_,max:w,step:v}=y_(p),g=u.emptyValue||"",C=x=>s(x===""?g:x),A={placeholder:f,onBlur:d?void 0:()=>a(i,m),onFocus:d?void 0:()=>l(i,m)};return $.jsx(re.Slider,{autoFocus:t,disabled:r||y&&d,id:i,max:w,min:_,onChange:d?void 0:C,range:!1,step:v,value:m,...A,"aria-describedby":At(i)})}const RQ={width:"100%"};function zQ({autofocus:e,disabled:t,formContext:r={},id:n,multiple:i,onBlur:a,onChange:s,onFocus:l,options:u,placeholder:f,readonly:d,value:p,schema:m}){const{readonlyAsDisabled:y=!0}=r,{enumOptions:_,enumDisabled:w,emptyValue:v}=u,g=H=>s(Ot(H,_,v)),C=()=>a(n,Ot(p,_,v)),S=()=>l(n,Ot(p,_,v)),E=(H,ee)=>ee&&br(ee.label)?ee.label.toLowerCase().indexOf(H.toLowerCase())>=0:!1,A=H=>H.parentNode,x=wl(p,_,i),N={name:n},Z=!i&&m.default===void 0,G=j.useMemo(()=>{if(Array.isArray(_)){const H=_.map(({value:ee,label:te},ae)=>({disabled:Array.isArray(w)&&w.indexOf(ee)!==-1,key:String(ae),value:String(ae),label:te}));return Z&&H.unshift({value:"",label:f||""}),H}},[w,_,f,Z]);return $.jsx(re.Select,{autoFocus:e,disabled:t||y&&d,getPopupContainer:A,id:n,mode:i?"multiple":void 0,onBlur:d?void 0:C,onChange:d?void 0:g,onFocus:d?void 0:S,placeholder:f,style:RQ,value:x,...N,filterOption:E,"aria-describedby":At(n),options:G})}const HQ={width:"100%"};function KQ({disabled:e,formContext:t,id:r,onBlur:n,onChange:i,onFocus:a,options:s,placeholder:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=t,p=({target:w})=>i(w.value===""?s.emptyValue:w.value),m=({target:w})=>n(r,w&&w.value),y=({target:w})=>a(r,w&&w.value),_={type:"textarea"};return $.jsx(re.Input.TextArea,{disabled:e||d&&u,id:r,name:r,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,rows:s.rows||4,style:HQ,value:f,..._,"aria-describedby":At(r)})}function GQ(){return{AltDateTimeWidget:LS,AltDateWidget:hm,CheckboxesWidget:MQ,CheckboxWidget:kQ,DateTimeWidget:jQ,DateWidget:UQ,PasswordWidget:WQ,RadioWidget:qQ,RangeWidget:VQ,SelectWidget:zQ,TextareaWidget:KQ}}function YQ(){return{templates:FQ(),widgets:GQ()}}function JQ(){return fX(YQ())}const XQ=JQ();function jS(e,t,r=[]){const n=[];return e===t?n:e==null||t==null?(e!==t&&n.push({fieldId:r.join("_")||"root",fieldPath:r,oldValue:e,newValue:t}),n):(new Set([...Object.keys(e||{}),...Object.keys(t||{})]).forEach(a=>{const s=[...r,a],l=e==null?void 0:e[a],u=t==null?void 0:t[a];Array.isArray(u)||Array.isArray(l)?JSON.stringify(l)!==JSON.stringify(u)&&n.push({fieldId:s.join("_"),fieldPath:s,oldValue:l,newValue:u}):typeof u=="object"&&u!==null&&typeof l=="object"&&l!==null?n.push(...jS(l,u,s)):l!==u&&n.push({fieldId:s.join("_"),fieldPath:s,oldValue:l,newValue:u})}),n)}function pm(e,t){if(!e||t.length===0)return e;let r=e;for(const n of t){if(r.type==="object"&&r.properties)r=r.properties[n];else if(r.type==="array"&&r.items)r=r.items;else return;if(!r)return}return r}const ru=j.forwardRef((e,t)=>{const{widgets:r={},fields:n={},templates:i={},beforeSubmit:a,afterSubmit:s,beforeValidation:l,afterValidation:u,onFieldFocus:f,onFieldBlur:d,onFieldChange:p,webhooks:m,onWebhookStart:y,onWebhookComplete:_,onWebhookError:w,eventHub:v,schema:g,uiSchema:C={},formData:S={},customValidate:E,...A}=e,x=j.useMemo(()=>v||new mh({beforeSubmit:a,afterSubmit:s,beforeValidation:l,afterValidation:u},{onFieldFocus:f,onFieldBlur:d,onFieldChange:p},m||[],{onWebhookStart:y,onWebhookComplete:_,onWebhookError:w}),[v,a,s,l,u,f,d,p,m,y,_,w]),[N,Z]=j.useState(S);j.useEffect(()=>{Z(S)},[S]);const G=j.useMemo(()=>({...q1,...r}),[r]),H=j.useMemo(()=>({...b1,...n}),[n]),ee=j.useMemo(()=>({...eh,...i,ButtonTemplates:{...eh.ButtonTemplates,...i==null?void 0:i.ButtonTemplates}}),[i]),te=j.useRef(N),ae=j.useCallback(U=>{var D;const{formData:J}=U;jS(te.current,J).forEach(z=>{const B=pm(g,z.fieldPath);x.handleFieldEvent("change",z.fieldId,z.newValue,B,J,z.fieldPath)}),te.current=J,Z(J),(D=e.onChange)==null||D.call(e,U)},[e.onChange,x,g]),Q=j.useCallback(async(U,J)=>{const L=await x.handleBeforeSubmit(U);e.onSubmit&&await e.onSubmit(L,J),await x.handleAfterSubmit(L)},[x,e.onSubmit]),k=j.useCallback((U,J)=>{if(E){const L=E(U,J);return x.handleAfterValidation(L||J,U),L}return x.handleAfterValidation(J,U),J},[E,x]),W=j.useCallback((U,J)=>{const L=U.replace(/^root_/,"").split("_").filter(Boolean),D=L.join("_")||U,z=pm(g,L);x.handleFieldEvent("focus",D,J,z,N,L)},[x,N,g]),R=j.useCallback((U,J)=>{const L=U.replace(/^root_/,"").split("_").filter(Boolean),D=L.join("_")||U,z=pm(g,L);x.handleFieldEvent("blur",D,J,z,N,L)},[x,N,g]);return j.useEffect(()=>()=>{x.cleanup()},[x]),$.jsx(Mg,{eventHub:x,formData:N,children:$.jsx("div",{className:"extended-form-container space-y-6 p-6 bg-background",children:$.jsx(XQ,{ref:t,...A,schema:g,uiSchema:C,formData:N,validator:$p,onChange:ae,onSubmit:Q,onFocus:W,onBlur:R,customValidate:k,widgets:G,fields:H,templates:ee})})})});ru.displayName="ExtendedForm";const{Title:ZQ,Text:QQ}=re.Typography;function eee({schema:e,uiSchema:t,webhooks:r=[],formData:n={},onSubmit:i,onStepChange:a,onFieldFocus:s,onFieldBlur:l,onFieldChange:u,onLiveChange:f,showProgressBar:d=!0,showStepDescription:p=!0,submitButtonText:m="Submit",liveValidate:y=!0,showErrorList:_=!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g}){const C=j.useMemo(()=>{const V=[];return Object.keys(e.properties||{}).forEach(X=>{if(X.startsWith("STEP_")){const oe=e.properties[X];V.push({id:X,title:oe.title||X.replace("STEP_","").replace(/_/g," "),description:oe.description})}}),V.length===0?[{id:"root",title:e.title||"Form",description:e.description}]:V},[e]),S=C.length>1,[E,A]=j.useState(0),[x]=j.useState(()=>(console.log("🚀 Creating FormEventHub instance on mount"),new mh({},{},[],{})));j.useEffect(()=>{console.log("🔄 Updating eventHub configuration:",{webhooks:(r==null?void 0:r.length)||0,hasCallbacks:!!(w||v||g)}),x.updateWebhooks(r||[]),x.updateCallbacks({onWebhookStart:w,onWebhookComplete:v,onWebhookError:g})},[r,w,v,g,x]);const[N,Z]=j.useState(()=>{const V={};return Object.keys(n).forEach(X=>{X.startsWith("STEP_")?Object.assign(V,n[X]):V[X]=n[X]}),V}),[G,H]=j.useState({}),[,ee]=j.useState({}),te=j.useCallback(()=>{if(!S)return e;const V=C[E].id,X=e.properties[V];return console.log(`Getting schema for step ${E}: ${V}`),console.log("Step schema:",X),{type:"object",title:C[E].title,...X}},[E,e,C,S]),ae=j.useCallback(()=>{if(!S)return t;const V=C[E].id,X=t[V];return console.log("Step UI schema:",X),X||{}},[E,t,C,S]),Q=j.useCallback(()=>{if(!S)return N;const V=C[E].id;return G[V]||{}},[E,N,G,C,S]),[k,W]=j.useState(!0),R=j.useCallback(()=>{if(!S)return!0;const V=C[E].id,X=te(),oe=Q();try{const ue=$p.validateFormData(oe,X),he=ue.errors.length===0;return he?console.log(`✓ Validation passed for step: ${V}`):(console.log(`Validation check for step: ${V} (Step ${E+1} of ${C.length})`),console.log("Step data:",oe),console.log("Validation errors:",ue.errors),console.log("Missing/invalid fields:",ue.errors.map(be=>{var Le;return be.property||((Le=be.params)==null?void 0:Le.missingProperty)||be.stack}))),W(he),he}catch(ue){return console.error("Validation error:",ue),W(!1),!1}},[S,C,E,te,Q]),U=j.useCallback(({formData:V,errors:X})=>{if(console.log("Form data changed:",V),S){Z(ue=>({...ue,...V}));const oe=C[E].id;H(ue=>({...ue,[oe]:V})),f&&f({...N,...V})}else Z(V),f&&f(V);ee(X)},[S,C,E,N,f]),J=j.useCallback(V=>{console.log("WizardForm: Field change event received:",V),u&&u(V)},[u]);j.useEffect(()=>{R()},[N,G,E,R]),j.useEffect(()=>{var V;console.log(`📍 Current step changed to: ${E} (${(V=C[E])==null?void 0:V.id})`)},[E,C]);const L=k,D=E===0,z=E===C.length-1,B=()=>{const V=R();if(!z&&V){console.log(`✅ Step ${C[E].id} validation passed! Moving to next step.`);const X=E,oe=E+1;A(oe),a==null||a(oe,N),x?x.handleStepChange(X,oe,N):console.error("❌ EventHub is not initialized!")}else V||console.log(`❌ Step ${C[E].id} validation failed. Cannot proceed to next step.`)},P=()=>{if(!D){const V=E,X=E-1;A(X),a==null||a(X,N),x?x.handleStepChange(V,X,N):console.error("❌ EventHub is not initialized!")}},F=async()=>{if(!k){R();return}const V={};C.forEach(oe=>{V[oe.id]=G[oe.id]||{}});const X=await x.handleBeforeSubmit(V);i&&await i({formData:X,flatFormData:N}),await x.handleAfterSubmit(X)};return S?$.jsxs("div",{style:{marginBottom:"24px"},children:[d&&$.jsx("div",{style:{margin:"0 auto 32px"},children:$.jsx(re.Steps,{labelPlacement:"vertical",current:E,size:"default",items:C.map((V,X)=>({title:$.jsx("div",{style:{lineHeight:1,marginBottom:"8px"},children:V.title}),description:$.jsx("div",{style:{lineHeight:1},children:p?V.description:void 0}),status:X<E?"finish":X===E?k?"process":"error":"wait"})),onChange:V=>{if(V<=E){const X=E;A(V),a==null||a(V,N),x?x.handleStepChange(X,V,N):console.error("❌ EventHub is not initialized!")}}})}),$.jsxs(re.Card,{title:$.jsx(ZQ,{level:4,children:C[E].title}),extra:p&&C[E].description&&$.jsx(QQ,{type:"secondary",children:C[E].description}),children:[$.jsx(ru,{schema:te(),uiSchema:ae(),formData:Q(),onChange:V=>{console.log("ExtendedForm onChange called:",V),U(V)},onFieldFocus:s,onFieldBlur:l,onFieldChange:J,webhooks:r,eventHub:x,liveValidate:!0,showErrorList:!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g,children:$.jsx("div",{style:{display:"none"},children:$.jsx("button",{type:"submit"})})},`wizard-step-${E}`),$.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"24px"},children:[$.jsx(re.Button,{onClick:P,disabled:D,icon:$.jsx(Zd,{}),children:"Previous"}),z?$.jsxs(re.Button,{type:"primary",onClick:F,disabled:!L,children:[m,$.jsx(Xd,{style:{marginLeft:"8px"}})]}):$.jsxs(re.Button,{type:"primary",onClick:B,disabled:!L,children:["Next",$.jsx(Qd,{style:{marginLeft:"8px"}})]})]})]})]}):$.jsx(ru,{schema:e,uiSchema:t,formData:N,onChange:U,onSubmit:F,onFieldFocus:s,onFieldBlur:l,onFieldChange:u,webhooks:r,eventHub:x,liveValidate:y,showErrorList:_?"top":!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g},"single-form")}ie.AUTH_HELPERS=V8,ie.AddressField=Lg,ie.ApiDataSource=uh,ie.ArrayFieldItemTemplate=f1,ie.ArrayFieldTemplate=u1,ie.COMMON_MAPPERS=Y8,ie.COMMON_RESPONSE_MAPPERS=q8,ie.CheckboxPresenter=U1,ie.ChoiceWidget=Rn,ie.ColorWidget=_1,ie.CurrencyField=Bg,ie.DEFAULT_CACHE_CONFIG=lh,ie.DEFAULT_CHOICE_CONFIG=No,ie.DEFAULT_RESPONSE_MAPPER=Mo,ie.DEFAULT_RETRY_CONFIG=x1,ie.DataSourceProvider=ba,ie.DateTimeWidget=oh,ie.DateWidget=x8,ie.DefaultChoiceWidget=Rn,ie.DropdownPresenter=hh,ie.EmailWidget=nh,ie.EnhancedDateWidget=ah,ie.ExtendedForm=ru,ie.FieldTemplate=v1,ie.FileUploadWidget=sc,ie.FileWidget=A1,ie.FormEventHub=mh,ie.FormEventManager=mO,ie.FormEventProvider=Mg,ie.NumberWidget=ic,ie.PAGINATED_MAPPERS=J8,ie.PasswordWidget=Fo,ie.PhoneField=jg,ie.PresentationMode=yt,ie.PresenterStrategy=uc,ie.ProgressIndicator=d1,ie.RadioPresenter=B1,ie.RangeWidget=rh,ie.RatingWidget=w1,ie.ResponseMappingError=Ye,ie.StaticDataSource=ch,ie.StepNavigation=h1,ie.SubmitButton=y1,ie.TelephoneWidget=ac,ie.TextWidget=xo,ie.TextareaWidget=Do,ie.URLWidget=ih,ie.WS_AUTH_HELPERS=z8,ie.WS_MESSAGE_HELPERS=H8,ie.WebSocketConnectionState=F1,ie.WebSocketDataSource=fh,ie.WizardForm=eee,ie.WizardLayout=O8,ie.WizardNavigation=p1,ie.WizardObjectFieldTemplate=m1,ie.WizardSectionTemplate=g1,ie.arrayItemPatterns=Uz,ie.convertLegacyConfig=_z,ie.createActiveMapper=X8,ie.createApiDataSource=W8,ie.createChoiceWidgetRegistry=$z,ie.createConditionalEngineHook=pc,ie.createCustomMapper=j1,ie.createCustomValidate=Lz,ie.createDefaultConfig=ph,ie.createDynamicArrayItemsUiSchema=Bz,ie.createGroupedOptions=k8,ie.createMapperPipeline=Z8,ie.createSimpleHash=D1,ie.createStaticDataSource=N8,ie.createWebSocketDataSource=R8,ie.customFields=b1,ie.customTemplates=eh,ie.customWidgets=q1,ie.deepEquals=J1,ie.extractArrayFromResponse=cc,ie.filterEnabledOptions=Q8,ie.formDataUtils=G1,ie.getNestedValue=_a,ie.groupOptions=rz,ie.hasGroup=M8,ie.isApiDataSource=P1,ie.isStaticDataSource=T1,ie.isWebSocketDataSource=sh,ie.mapNestedResponse=L1,ie.mapResponse=G8,ie.mapSimpleResponse=k1,ie.mergeItemUiSchema=vh,ie.schemaEngineConfig=H1,ie.schemaUtils=Y1,ie.setNestedValue=K8,ie.sortByLabel=ez,ie.sortByValue=tz,ie.suggestPresentationMode=bz,ie.supportsMultipleSelections=I1,ie.textWidgets=wz,ie.transformOptions=nz,ie.uiEngineConfig=z1,ie.useChoiceWidget=hc,ie.useChoiceWidgetWithErrorBoundary=dz,ie.useChoiceWidgetWithMetrics=hz,ie.useConditionalSchema=kz,ie.useConditionalUi=Tz,ie.useConditionalValidation=jz,ie.useDataSource=dc,ie.useDataSourceWithRetry=cz,ie.useFieldEventHandlers=dt,ie.useFormEventHub=kg,ie.useMultipleDataSources=uz,ie.validateChoiceOption=N1,ie.validateChoiceOptions=F8,ie.validationEngineConfig=K1,ie.validationUtils=Wz,ie.validator=$p,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
189
+ }`)),(0,Hc.useEffect)(function(){var l=t.current,u=(0,GX.getShadowRoot)(l);(0,KX.updateCSS)(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:u})},[])};var $S=Ur.default,nZ=Sn.default;Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var iZ=$S(oS),is=$S(Bp),aZ=nZ(B),xi=qt,oZ=["icon","className","onClick","style","primaryColor","secondaryColor"],as={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function sZ(e){var t=e.primaryColor,r=e.secondaryColor;as.primaryColor=t,as.secondaryColor=r||(0,xi.getSecondaryColor)(t),as.calculated=!!r}function lZ(){return(0,is.default)({},as)}var Kc=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,s=t.primaryColor,l=t.secondaryColor,u=(0,iZ.default)(t,oZ),f=aZ.useRef(),d=as;if(s&&(d={primaryColor:s,secondaryColor:l||(0,xi.getSecondaryColor)(s)}),(0,xi.useInsertStyles)(f),(0,xi.warning)((0,xi.isIconDefinition)(r),"icon should be icon definiton, but got ".concat(r)),!(0,xi.isIconDefinition)(r))return null;var p=r;return p&&typeof p.icon=="function"&&(p=(0,is.default)((0,is.default)({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),(0,xi.generate)(p.icon,"svg-".concat(p.name),(0,is.default)((0,is.default)({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:f}))};Kc.displayName="IconReact",Kc.getTwoToneColors=lZ,Kc.setTwoToneColors=sZ,rs.default=Kc;var Gc={},wS=Ur.default;Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.getTwoToneColor=dZ,Gc.setTwoToneColor=fZ;var cZ=wS(Qw),SS=wS(rs),uZ=qt;function fZ(e){var t=(0,uZ.normalizeTwoToneColors)(e),r=(0,cZ.default)(t,2),n=r[0],i=r[1];return SS.default.setTwoToneColors({primaryColor:n,secondaryColor:i})}function dZ(){var e=SS.default.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Di=Ur.default,hZ=Sn.default;Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=void 0;var pZ=Di(Ii),mZ=Di(Qw),CS=Di(nS),gZ=Di(oS),Yc=hZ(B),yZ=Di(k_),vZ=sS,bZ=Di(ts),_Z=Di(rs),Xp=Gc,$Z=qt,wZ=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];(0,Xp.setTwoToneColor)(vZ.blue.primary);var Jc=Yc.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,u=e.twoToneColor,f=(0,gZ.default)(e,wZ),d=Yc.useContext(bZ.default),p=d.prefixCls,m=p===void 0?"anticon":p,y=d.rootClassName,_=(0,yZ.default)(y,m,(0,CS.default)((0,CS.default)({},"".concat(m,"-").concat(n.name),!!n.name),"".concat(m,"-spin"),!!i||n.name==="loading"),r),w=s;w===void 0&&l&&(w=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,g=(0,$Z.normalizeTwoToneColors)(u),C=(0,mZ.default)(g,2),S=C[0],E=C[1];return Yc.createElement("span",(0,pZ.default)({role:"img","aria-label":n.name},f,{ref:t,tabIndex:w,onClick:l,className:_}),Yc.createElement(_Z.default,{icon:n,primaryColor:S,secondaryColor:E,style:v}))});Jc.displayName="AntdIcon",Jc.getTwoToneColor=Xp.getTwoToneColor,Jc.setTwoToneColor=Xp.setTwoToneColor,Cn.default=Jc;var SZ=Sn.default,Zp=Ur.default;Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.default=void 0;var CZ=Zp(Ii),ES=SZ(B),EZ=Zp(jp),OZ=Zp(Cn),AZ=function(t,r){return ES.createElement(OZ.default,(0,CZ.default)({},t,{ref:r,icon:EZ.default}))},OS=ES.forwardRef(AZ);process.env.NODE_ENV!=="production"&&(OS.displayName="ExclamationCircleOutlined"),Uc.default=OS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Uc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(Lp,Lp.exports);var TZ=Lp.exports;const PZ=Qt(TZ);function IZ({errors:e,registry:t}){const{translateString:r}=t,n=()=>$.jsx(re.List,{className:"list-group",size:"small",children:e.map((i,a)=>$.jsx(re.List.Item,{children:$.jsxs(re.Space,{children:[$.jsx(PZ,{}),i.stack]})},a))});return $.jsx(re.Alert,{className:"panel panel-danger errors",description:n(),message:r(Ue.ErrorsLabel),type:"error"})}var Qp={exports:{}},Xc={},em={};Object.defineProperty(em,"__esModule",{value:!0});var xZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"};em.default=xZ;var DZ=Sn.default,tm=Ur.default;Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=void 0;var FZ=tm(Ii),AS=DZ(B),NZ=tm(em),MZ=tm(Cn),kZ=function(t,r){return AS.createElement(MZ.default,(0,FZ.default)({},t,{ref:r,icon:NZ.default}))},TS=AS.forwardRef(kZ);process.env.NODE_ENV!=="production"&&(TS.displayName="ArrowDownOutlined"),Xc.default=TS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Xc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(Qp,Qp.exports);var LZ=Qp.exports;const jZ=Qt(LZ);var rm={exports:{}},Zc={},nm={};Object.defineProperty(nm,"__esModule",{value:!0});var BZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};nm.default=BZ;var UZ=Sn.default,im=Ur.default;Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.default=void 0;var WZ=im(Ii),PS=UZ(B),qZ=im(nm),VZ=im(Cn),RZ=function(t,r){return PS.createElement(VZ.default,(0,WZ.default)({},t,{ref:r,icon:qZ.default}))},IS=PS.forwardRef(RZ);process.env.NODE_ENV!=="production"&&(IS.displayName="ArrowUpOutlined"),Zc.default=IS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Zc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(rm,rm.exports);var zZ=rm.exports;const HZ=Qt(zZ);var am={exports:{}},Qc={},om={};Object.defineProperty(om,"__esModule",{value:!0});var KZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};om.default=KZ;var GZ=Sn.default,sm=Ur.default;Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.default=void 0;var YZ=sm(Ii),xS=GZ(B),JZ=sm(om),XZ=sm(Cn),ZZ=function(t,r){return xS.createElement(XZ.default,(0,YZ.default)({},t,{ref:r,icon:JZ.default}))},DS=xS.forwardRef(ZZ);process.env.NODE_ENV!=="production"&&(DS.displayName="CopyOutlined"),Qc.default=DS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(Qc);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(am,am.exports);var QZ=am.exports;const eQ=Qt(QZ);var lm={exports:{}},eu={},cm={};Object.defineProperty(cm,"__esModule",{value:!0});var tQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};cm.default=tQ;var rQ=Sn.default,um=Ur.default;Object.defineProperty(eu,"__esModule",{value:!0}),eu.default=void 0;var nQ=um(Ii),FS=rQ(B),iQ=um(cm),aQ=um(Cn),oQ=function(t,r){return FS.createElement(aQ.default,(0,nQ.default)({},t,{ref:r,icon:iQ.default}))},NS=FS.forwardRef(oQ);process.env.NODE_ENV!=="production"&&(NS.displayName="DeleteOutlined"),eu.default=NS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(eu);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(lm,lm.exports);var sQ=lm.exports;const lQ=Qt(sQ);var fm={exports:{}},tu={},dm={};Object.defineProperty(dm,"__esModule",{value:!0});var cQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};dm.default=cQ;var uQ=Sn.default,hm=Ur.default;Object.defineProperty(tu,"__esModule",{value:!0}),tu.default=void 0;var fQ=hm(Ii),MS=uQ(B),dQ=hm(dm),hQ=hm(Cn),pQ=function(t,r){return MS.createElement(hQ.default,(0,fQ.default)({},t,{ref:r,icon:dQ.default}))},kS=MS.forwardRef(pQ);process.env.NODE_ENV!=="production"&&(kS.displayName="PlusCircleOutlined"),tu.default=kS,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=n(tu);function n(a){return a&&a.__esModule?a:{default:a}}const i=r;t.default=i,e.exports=i}(fm,fm.exports);var mQ=fm.exports;const gQ=Qt(mQ);function os(e){const{iconType:t="default",icon:r,onClick:n,uiSchema:i,registry:a,...s}=e;return $.jsx(re.Button,{onClick:n,type:t,icon:r,...s})}function yQ(e){const{registry:{translateString:t}}=e;return $.jsx(os,{title:t(Ue.AddItemButton),...e,block:!0,iconType:"primary",icon:$.jsx(gQ,{})})}function vQ(e){const{registry:{translateString:t}}=e;return $.jsx(os,{title:t(Ue.CopyButton),...e,icon:$.jsx(eQ,{})})}function bQ(e){const{registry:{translateString:t}}=e;return $.jsx(os,{title:t(Ue.MoveDownButton),...e,icon:$.jsx(jZ,{})})}function _Q(e){const{registry:{translateString:t}}=e;return $.jsx(os,{title:t(Ue.MoveUpButton),...e,icon:$.jsx(HZ,{})})}function $Q(e){const t=we(e.uiSchema),{registry:{translateString:r}}=e;return $.jsx(os,{title:r(Ue.RemoveButton),...e,danger:!0,block:!!t.block,iconType:"primary",icon:$.jsx(lQ,{})})}function wQ(e){const{errors:t=[],idSchema:r}=e;if(t.length===0)return null;const n=Wd(r);return $.jsx("div",{id:n,children:t.map(i=>$.jsx("div",{children:i},`field-${n}-error-${i}`))})}const SQ={span:24},CQ={span:24};function EQ(e){const{children:t,classNames:r,style:n,description:i,disabled:a,displayLabel:s,errors:l,formContext:u,help:f,hidden:d,id:p,label:m,onDropPropertyClick:y,onKeyChange:_,rawErrors:w,rawDescription:v,rawHelp:g,readonly:C,registry:S,required:E,schema:A,uiSchema:x}=e,{colon:N,labelCol:Y=SQ,wrapperCol:K=CQ,wrapperStyle:H,descriptionLocation:te="below"}=u,ee=we(x),ae=Se("WrapIfAdditionalTemplate",S,ee);if(d)return $.jsx("div",{className:"rjsf-field-hidden",children:t});const Q=v?i:void 0,k={};switch(te){case"tooltip":k.tooltip=Q;break;case"below":default:k.extra=Q;break}return $.jsx(ae,{classNames:r,style:n,disabled:a,id:p,label:m,onDropPropertyClick:y,onKeyChange:_,readonly:C,required:E,schema:A,uiSchema:x,registry:S,children:$.jsx(re.Form.Item,{colon:N,hasFeedback:A.type!=="array"&&A.type!=="object",help:!!g&&f||(w!=null&&w.length?l:void 0),htmlFor:p,label:s&&m,labelCol:Y,required:E,style:H,validateStatus:w!=null&&w.length?"error":void 0,wrapperCol:K,...k,children:t})})}function OQ(e){const{children:t,column:r,...n}=e;return r?$.jsx(re.Col,{...n,children:t}):$.jsx(re.Row,{...n,children:t})}function AQ(e){const{optionSchemaField:t,selector:r}=e;return $.jsxs("div",{children:[$.jsx("div",{children:r}),t]})}const TQ={paddingBottom:"8px"};function PQ(e){const{description:t,disabled:r,formContext:n,formData:i,idSchema:a,onAddClick:s,properties:l,readonly:u,required:f,registry:d,schema:p,title:m,uiSchema:y}=e,_=we(y),w=Se("TitleFieldTemplate",d,_),v=Se("DescriptionFieldTemplate",d,_),{ButtonTemplates:{AddButton:g}}=d.templates,{colSpan:C=24,labelAlign:S="right",rowGutter:E=24}=n,A=k=>k.content.props.schema,x=k=>A(k).type,N=k=>k.content.props.uiSchema,Y=k=>we(N(k)).field,K=k=>we(N(k)).widget,H=k=>{const q=x(k),W=Y(k),L=K(k),X=l.length<2||q==="object"||q==="array"||L==="textarea"?24:12;if(Re(C)){const U=C;if(br(L))return U[L];if(br(W))return U[W];if(br(q))return U[q]}return Td(C)?C:X},{getPrefixCls:te}=B.useContext(re.ConfigProvider.ConfigContext),ae=`${te("form")}-item-label`,Q=Il(ae,S==="left"&&`${ae}-left`);return $.jsxs("fieldset",{id:a.$id,children:[$.jsxs(re.Row,{gutter:E,children:[m&&$.jsx(re.Col,{className:Q,span:24,children:$.jsx(w,{id:Cl(a),title:m,required:f,schema:p,uiSchema:y,registry:d})}),t&&$.jsx(re.Col,{span:24,style:TQ,children:$.jsx(v,{id:pa(a),description:t,schema:p,uiSchema:y,registry:d})}),l.filter(k=>!k.hidden).map(k=>$.jsx(re.Col,{span:H(k),children:k.content},k.name))]}),zg(p,y,i)&&$.jsx(re.Col,{span:24,children:$.jsx(re.Row,{gutter:E,justify:"end",children:$.jsx(re.Col,{flex:"192px",children:$.jsx(g,{id:tn(a,"add"),className:"rjsf-object-property-expand",disabled:r||u,onClick:s(p),uiSchema:y,registry:d})})})})]})}function IQ({uiSchema:e}){const{submitText:t,norender:r,props:n}=jd(e);return r?null:$.jsx(re.Button,{type:"submit",...n,htmlType:"submit",children:t})}function xQ({id:e,required:t,registry:r,title:n}){const{formContext:i}=r,{colon:a=!0}=i;let s=n;a&&typeof n=="string"&&n.trim()!==""&&(s=n.replace(/[::]\s*$/,""));const l=()=>{if(!e)return;const p=document.querySelector(`[id="${e}"]`);p&&p.focus&&p.focus()},{getPrefixCls:u}=B.useContext(re.ConfigProvider.ConfigContext),f=u("form"),d=Il({[`${f}-item-required`]:t,[`${f}-item-no-colon`]:!a});return n?$.jsx("label",{className:d,htmlFor:e,onClick:l,title:typeof n=="string"?n:"",children:s}):null}const DQ={span:24},FQ={span:24},NQ={width:"100%"};function MQ(e){const{children:t,classNames:r,style:n,disabled:i,id:a,label:s,onDropPropertyClick:l,onKeyChange:u,readonly:f,required:d,registry:p,schema:m,uiSchema:y}=e,{colon:_,labelCol:w=DQ,readonlyAsDisabled:v=!0,rowGutter:g=24,toolbarAlign:C="top",wrapperCol:S=FQ,wrapperStyle:E}=p.formContext,{templates:A,translateString:x}=p,{RemoveButton:N}=A.ButtonTemplates,Y=x(Ue.KeyLabel,[s]);if(!(Bn in m))return $.jsx("div",{className:r,style:n,children:t});const H=({target:ae})=>u(ae&&ae.value),te=y?y[Hr]:{},ee={...y,[Hr]:{...te,block:!0}};return $.jsx("div",{className:r,style:n,children:$.jsxs(re.Row,{align:C,gutter:g,children:[$.jsx(re.Col,{className:"form-additional",flex:"1",children:$.jsx("div",{className:"form-group",children:$.jsx(re.Form.Item,{colon:_,className:"form-group",hasFeedback:!0,htmlFor:`${a}-key`,label:Y,labelCol:w,required:d,style:E,wrapperCol:S,children:$.jsx(re.Input,{className:"form-control",defaultValue:s,disabled:i||v&&f,id:`${a}-key`,name:`${a}-key`,onBlur:f?void 0:H,style:NQ,type:"text"})})})}),$.jsx(re.Col,{className:"form-additional",flex:"1",children:t}),$.jsx(re.Col,{flex:"192px",children:$.jsx(N,{id:tn(a,"remove"),className:"rjsf-object-property-remove",disabled:i||f,onClick:l(s),uiSchema:ee,registry:p})})]})})}function kQ(){return{ArrayFieldItemTemplate:yX,ArrayFieldTemplate:bX,BaseInputTemplate:_X,ButtonTemplates:{AddButton:yQ,CopyButton:vQ,MoveDownButton:bQ,MoveUpButton:_Q,RemoveButton:$Q,SubmitButton:IQ},DescriptionFieldTemplate:$X,ErrorListTemplate:IZ,FieldErrorTemplate:wQ,FieldTemplate:EQ,GridTemplate:OQ,MultiSchemaFieldTemplate:AQ,ObjectFieldTemplate:PQ,TitleFieldTemplate:xQ,WrapIfAdditionalTemplate:MQ}}const LQ=e=>Object.values(e).every(t=>t!==-1);function pm(e){const{autofocus:t,disabled:r,formContext:n,id:i,onBlur:a,onChange:s,onFocus:l,options:u,readonly:f,registry:d,showTime:p,value:m}=e,{translateString:y,widgets:_}=d,{SelectWidget:w}=_,{rowGutter:v=24}=n,[g,C]=B.useState(ga(m,p));B.useEffect(()=>{C(ga(m,p))},[p,m]);const S=(N,Y)=>{const K={...g,[N]:typeof Y>"u"?-1:Y};LQ(K)?s(Al(K,p)):C(K)},E=N=>{if(N.preventDefault(),r||f)return;const Y=ga(new Date().toJSON(),p);s(Al(Y,p))},A=N=>{N.preventDefault(),!(r||f)&&s(void 0)},x=N=>$.jsx(w,{autofocus:N.autofocus,className:"form-control",disabled:N.disabled,id:N.id,name:N.name,onBlur:N.onBlur,onChange:Y=>N.select(N.type,Y),onFocus:N.onFocus,options:{enumOptions:kd(N.range[0],N.range[1])},placeholder:N.type,readonly:N.readonly,schema:{type:"integer"},value:N.value,registry:d,label:"","aria-describedby":Tt(i)});return $.jsxs(re.Row,{gutter:[Math.floor(v/2),Math.floor(v/2)],children:[y_(g,p,u.yearsRange,u.format).map((N,Y)=>{const K=i+"_"+N.type;return $.jsx(re.Col,{flex:"88px",children:x({...N,autofocus:t&&Y===0,disabled:r,id:K,name:i,onBlur:a,onFocus:l,readonly:f,registry:d,select:S,value:(N.value,void 0)})},K)}),!u.hideNowButton&&$.jsx(re.Col,{flex:"88px",children:$.jsx(re.Button,{block:!0,className:"btn-now",onClick:E,type:"primary",children:y(Ue.NowLabel)})}),!u.hideClearButton&&$.jsx(re.Col,{flex:"88px",children:$.jsx(re.Button,{block:!0,className:"btn-clear",danger:!0,onClick:A,type:"primary",children:y(Ue.ClearLabel)})})]})}pm.defaultProps={autofocus:!1,disabled:!1,options:{yearsRange:[1900,new Date().getFullYear()+2]},readonly:!1,showTime:!1};function LS(e){const{AltDateWidget:t}=e.registry.widgets;return $.jsx(t,{showTime:!0,...e})}LS.defaultProps={...pm.defaultProps,showTime:!0};function jQ({autofocus:e,disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=r,{enumOptions:p,enumDisabled:m,inline:y,emptyValue:_}=l,w=E=>a(At(E,p,_)),C={id:n,onBlur:u?void 0:({target:E})=>i(n,At(E.value,p,_)),onFocus:u?void 0:({target:E})=>s(n,At(E.value,p,_))},S=Sl(f,p,!0);return Array.isArray(p)&&p.length>0?$.jsx($.Fragment,{children:$.jsx(re.Checkbox.Group,{disabled:t||d&&u,name:n,onChange:u?void 0:w,value:S,...C,"aria-describedby":Tt(n),children:Array.isArray(p)&&p.map((E,A)=>$.jsxs("span",{children:[$.jsx(re.Checkbox,{id:El(n,A),name:n,autoFocus:A===0?e:!1,disabled:Array.isArray(m)&&m.indexOf(E.value)!==-1,value:String(A),children:E.label}),!y&&$.jsx("br",{})]},A))})}):null}function BQ(e){const{autofocus:t,disabled:r,formContext:n,id:i,label:a,hideLabel:s,onBlur:l,onChange:u,onFocus:f,readonly:d,value:p}=e,{readonlyAsDisabled:m=!0}=n,y=({target:g})=>u(g.checked),v={onBlur:d?void 0:({target:g})=>l(i,g&&g.checked),onFocus:d?void 0:({target:g})=>f(i,g&&g.checked)};return $.jsx(re.Checkbox,{autoFocus:t,checked:typeof p>"u"?!1:p,disabled:r||m&&d,id:i,name:i,onChange:d?void 0:y,...v,"aria-describedby":Tt(i),children:O_(a,s,"")})}const UQ={width:"100%"};function WQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,placeholder:l,readonly:u,value:f}=e,{readonlyAsDisabled:d=!0}=r,p=w=>a(w&&w.toISOString()),m=()=>i(n,f),y=()=>s(n,f),_=w=>w.parentNode;return $.jsx(re.DatePicker,{disabled:t||d&&u,getPopupContainer:_,id:n,name:n,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,showTime:!0,style:UQ,value:f&&oc(f),"aria-describedby":Tt(n)})}const qQ={width:"100%"};function VQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,placeholder:l,readonly:u,value:f}=e,{readonlyAsDisabled:d=!0}=r,p=w=>a(w&&w.format("YYYY-MM-DD")),m=()=>i(n,f),y=()=>s(n,f),_=w=>w.parentNode;return $.jsx(re.DatePicker,{disabled:t||d&&u,getPopupContainer:_,id:n,name:n,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,showTime:!1,style:qQ,value:f&&oc(f),"aria-describedby":Tt(n)})}function RQ(e){const{disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,placeholder:u,readonly:f,value:d}=e,{readonlyAsDisabled:p=!0}=r,m=l.emptyValue||"",y=({target:v})=>a(v.value===""?m:v.value),_=({target:v})=>i(n,v.value),w=({target:v})=>s(n,v.value);return $.jsx(re.Input.Password,{disabled:t||p&&f,id:n,name:n,onBlur:f?void 0:_,onChange:f?void 0:y,onFocus:f?void 0:w,placeholder:u,value:d||"","aria-describedby":Tt(n)})}function zQ({autofocus:e,disabled:t,formContext:r,id:n,onBlur:i,onChange:a,onFocus:s,options:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=r,{enumOptions:p,enumDisabled:m,emptyValue:y}=l,_=({target:{value:C}})=>a(At(C,p,y)),w=({target:C})=>i(n,At(C&&C.value,p,y)),v=({target:C})=>s(n,At(C&&C.value,p,y)),g=Sl(f,p);return $.jsx(re.Radio.Group,{disabled:t||d&&u,id:n,name:n,onChange:u?void 0:_,onBlur:u?void 0:w,onFocus:u?void 0:v,value:g,"aria-describedby":Tt(n),children:Array.isArray(p)&&p.map((C,S)=>$.jsx(re.Radio,{id:El(n,S),name:n,autoFocus:S===0?e:!1,disabled:t||Array.isArray(m)&&m.indexOf(C.value)!==-1,value:String(S),children:C.label},S))})}function HQ(e){const{autofocus:t,disabled:r,formContext:n,id:i,onBlur:a,onChange:s,onFocus:l,options:u,placeholder:f,readonly:d,schema:p,value:m}=e,{readonlyAsDisabled:y=!0}=n,{min:_,max:w,step:v}=v_(p),g=u.emptyValue||"",C=x=>s(x===""?g:x),A={placeholder:f,onBlur:d?void 0:()=>a(i,m),onFocus:d?void 0:()=>l(i,m)};return $.jsx(re.Slider,{autoFocus:t,disabled:r||y&&d,id:i,max:w,min:_,onChange:d?void 0:C,range:!1,step:v,value:m,...A,"aria-describedby":Tt(i)})}const KQ={width:"100%"};function GQ({autofocus:e,disabled:t,formContext:r={},id:n,multiple:i,onBlur:a,onChange:s,onFocus:l,options:u,placeholder:f,readonly:d,value:p,schema:m}){const{readonlyAsDisabled:y=!0}=r,{enumOptions:_,enumDisabled:w,emptyValue:v}=u,g=H=>s(At(H,_,v)),C=()=>a(n,At(p,_,v)),S=()=>l(n,At(p,_,v)),E=(H,te)=>te&&br(te.label)?te.label.toLowerCase().indexOf(H.toLowerCase())>=0:!1,A=H=>H.parentNode,x=Sl(p,_,i),N={name:n},Y=!i&&m.default===void 0,K=B.useMemo(()=>{if(Array.isArray(_)){const H=_.map(({value:te,label:ee},ae)=>({disabled:Array.isArray(w)&&w.indexOf(te)!==-1,key:String(ae),value:String(ae),label:ee}));return Y&&H.unshift({value:"",label:f||""}),H}},[w,_,f,Y]);return $.jsx(re.Select,{autoFocus:e,disabled:t||y&&d,getPopupContainer:A,id:n,mode:i?"multiple":void 0,onBlur:d?void 0:C,onChange:d?void 0:g,onFocus:d?void 0:S,placeholder:f,style:KQ,value:x,...N,filterOption:E,"aria-describedby":Tt(n),options:K})}const YQ={width:"100%"};function JQ({disabled:e,formContext:t,id:r,onBlur:n,onChange:i,onFocus:a,options:s,placeholder:l,readonly:u,value:f}){const{readonlyAsDisabled:d=!0}=t,p=({target:w})=>i(w.value===""?s.emptyValue:w.value),m=({target:w})=>n(r,w&&w.value),y=({target:w})=>a(r,w&&w.value),_={type:"textarea"};return $.jsx(re.Input.TextArea,{disabled:e||d&&u,id:r,name:r,onBlur:u?void 0:m,onChange:u?void 0:p,onFocus:u?void 0:y,placeholder:l,rows:s.rows||4,style:YQ,value:f,..._,"aria-describedby":Tt(r)})}function XQ(){return{AltDateTimeWidget:LS,AltDateWidget:pm,CheckboxesWidget:jQ,CheckboxWidget:BQ,DateTimeWidget:WQ,DateWidget:VQ,PasswordWidget:RQ,RadioWidget:zQ,RangeWidget:HQ,SelectWidget:GQ,TextareaWidget:JQ}}function ZQ(){return{templates:kQ(),widgets:XQ()}}function QQ(){return pX(ZQ())}const eee=QQ();function jS(e,t,r=[]){const n=[];return e===t?n:e==null||t==null?(e!==t&&n.push({fieldId:r.join("_")||"root",fieldPath:r,oldValue:e,newValue:t}),n):(new Set([...Object.keys(e||{}),...Object.keys(t||{})]).forEach(a=>{const s=[...r,a],l=e==null?void 0:e[a],u=t==null?void 0:t[a];Array.isArray(u)||Array.isArray(l)?JSON.stringify(l)!==JSON.stringify(u)&&n.push({fieldId:s.join("_"),fieldPath:s,oldValue:l,newValue:u}):typeof u=="object"&&u!==null&&typeof l=="object"&&l!==null?n.push(...jS(l,u,s)):l!==u&&n.push({fieldId:s.join("_"),fieldPath:s,oldValue:l,newValue:u})}),n)}function mm(e,t){if(!e||t.length===0)return e;let r=e;for(const n of t){if(r.type==="object"&&r.properties)r=r.properties[n];else if(r.type==="array"&&r.items)r=r.items;else return;if(!r)return}return r}const ru=B.forwardRef((e,t)=>{const{widgets:r={},fields:n={},templates:i={},beforeSubmit:a,afterSubmit:s,beforeValidation:l,afterValidation:u,onFieldFocus:f,onFieldBlur:d,onFieldChange:p,webhooks:m,onWebhookStart:y,onWebhookComplete:_,onWebhookError:w,eventHub:v,schema:g,uiSchema:C={},formData:S={},customValidate:E,...A}=e,x=B.useMemo(()=>v||new gh({beforeSubmit:a,afterSubmit:s,beforeValidation:l,afterValidation:u},{onFieldFocus:f,onFieldBlur:d,onFieldChange:p},m||[],{onWebhookStart:y,onWebhookComplete:_,onWebhookError:w}),[v,a,s,l,u,f,d,p,m,y,_,w]),[N,Y]=B.useState(S);B.useEffect(()=>{Y(S)},[S]);const K=B.useMemo(()=>({...q1,...r}),[r]),H=B.useMemo(()=>({...b1,...n}),[n]),te=B.useMemo(()=>({...th,...i,ButtonTemplates:{...th.ButtonTemplates,...i==null?void 0:i.ButtonTemplates}}),[i]),ee=B.useRef(N),ae=B.useCallback(L=>{var F;const{formData:X}=L;jS(ee.current,X).forEach(z=>{const j=mm(g,z.fieldPath);x.handleFieldEvent("change",z.fieldId,z.newValue,j,X,z.fieldPath)}),ee.current=X,Y(X),(F=e.onChange)==null||F.call(e,L)},[e.onChange,x,g]),Q=B.useCallback(async(L,X)=>{const U=await x.handleBeforeSubmit(L);e.onSubmit&&await e.onSubmit(U,X),await x.handleAfterSubmit(U)},[x,e.onSubmit]),k=B.useCallback((L,X)=>{if(E){const U=E(L,X);return x.handleAfterValidation(U||X,L),U}return x.handleAfterValidation(X,L),X},[E,x]),q=B.useCallback((L,X)=>{const U=L.replace(/^root_/,"").split("_").filter(Boolean),F=U.join("_")||L,z=mm(g,U);x.handleFieldEvent("focus",F,X,z,N,U)},[x,N,g]),W=B.useCallback((L,X)=>{const U=L.replace(/^root_/,"").split("_").filter(Boolean),F=U.join("_")||L,z=mm(g,U);x.handleFieldEvent("blur",F,X,z,N,U)},[x,N,g]);return B.useEffect(()=>()=>{x.cleanup()},[x]),$.jsx(kg,{eventHub:x,formData:N,children:$.jsx("div",{className:"extended-form-container space-y-6 p-6 bg-background",children:$.jsx(eee,{ref:t,...A,schema:g,uiSchema:C,formData:N,validator:wp,onChange:ae,onSubmit:Q,onFocus:q,onBlur:W,customValidate:k,widgets:K,fields:H,templates:te})})})});ru.displayName="ExtendedForm";const{Title:tee,Text:ree}=re.Typography;function nee({schema:e,uiSchema:t,webhooks:r=[],formData:n={},onSubmit:i,onStepChange:a,onFieldFocus:s,onFieldBlur:l,onFieldChange:u,onLiveChange:f,showProgressBar:d=!0,showStepDescription:p=!0,submitButtonText:m="Submit",liveValidate:y=!0,showErrorList:_=!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g}){const C=B.useMemo(()=>{const V=[];return Object.keys(e.properties||{}).forEach(Z=>{if(Z.startsWith("STEP_")){const oe=e.properties[Z];V.push({id:Z,title:oe.title||Z.replace("STEP_","").replace(/_/g," "),description:oe.description})}}),V.length===0?[{id:"root",title:e.title||"Form",description:e.description}]:V},[e]),S=C.length>1,[E,A]=B.useState(0),[x]=B.useState(()=>(console.log("🚀 Creating FormEventHub instance on mount"),new gh({},{},[],{})));B.useEffect(()=>{console.log("🔄 Updating eventHub configuration:",{webhooks:(r==null?void 0:r.length)||0,hasCallbacks:!!(w||v||g)}),x.updateWebhooks(r||[]),x.updateCallbacks({onWebhookStart:w,onWebhookComplete:v,onWebhookError:g})},[r,w,v,g,x]);const[N,Y]=B.useState(()=>{const V={};return Object.keys(n).forEach(Z=>{Z.startsWith("STEP_")?Object.assign(V,n[Z]):V[Z]=n[Z]}),V}),[K,H]=B.useState({}),[,te]=B.useState({}),ee=B.useCallback(()=>{if(!S)return e;const V=C[E].id,Z=e.properties[V];return console.log(`Getting schema for step ${E}: ${V}`),console.log("Step schema:",Z),{type:"object",title:C[E].title,...Z}},[E,e,C,S]),ae=B.useCallback(()=>{if(!S)return t;const V=C[E].id,Z=t[V];return console.log("Step UI schema:",Z),Z||{}},[E,t,C,S]),Q=B.useCallback(()=>{if(!S)return N;const V=C[E].id;return K[V]||{}},[E,N,K,C,S]),[k,q]=B.useState(!0),W=B.useCallback(()=>{if(!S)return!0;const V=C[E].id,Z=ee(),oe=Q();try{const ue=wp.validateFormData(oe,Z),he=ue.errors.length===0;return he?console.log(`✓ Validation passed for step: ${V}`):(console.log(`Validation check for step: ${V} (Step ${E+1} of ${C.length})`),console.log("Step data:",oe),console.log("Validation errors:",ue.errors),console.log("Missing/invalid fields:",ue.errors.map(be=>{var Le;return be.property||((Le=be.params)==null?void 0:Le.missingProperty)||be.stack}))),q(he),he}catch(ue){return console.error("Validation error:",ue),q(!1),!1}},[S,C,E,ee,Q]),L=B.useCallback(({formData:V,errors:Z})=>{if(console.log("Form data changed:",V),S){Y(ue=>({...ue,...V}));const oe=C[E].id;H(ue=>({...ue,[oe]:V})),f&&f({...N,...V})}else Y(V),f&&f(V);te(Z)},[S,C,E,N,f]),X=B.useCallback(V=>{console.log("WizardForm: Field change event received:",V),u&&u(V)},[u]);B.useEffect(()=>{W()},[N,K,E,W]),B.useEffect(()=>{var V;console.log(`📍 Current step changed to: ${E} (${(V=C[E])==null?void 0:V.id})`)},[E,C]);const U=k,F=E===0,z=E===C.length-1,j=()=>{const V=W();if(!z&&V){console.log(`✅ Step ${C[E].id} validation passed! Moving to next step.`);const Z=E,oe=E+1;A(oe),a==null||a(oe,N),x?x.handleStepChange(Z,oe,N):console.error("❌ EventHub is not initialized!")}else V||console.log(`❌ Step ${C[E].id} validation failed. Cannot proceed to next step.`)},T=()=>{if(!F){const V=E,Z=E-1;A(Z),a==null||a(Z,N),x?x.handleStepChange(V,Z,N):console.error("❌ EventHub is not initialized!")}},D=async()=>{if(!k){W();return}const V={};C.forEach(oe=>{V[oe.id]=K[oe.id]||{}});const Z=await x.handleBeforeSubmit(V);i&&await i({formData:Z,flatFormData:N}),await x.handleAfterSubmit(Z)};return S?$.jsxs("div",{style:{marginBottom:"24px"},children:[d&&$.jsx("div",{style:{margin:"0 auto 32px"},children:$.jsx(re.Steps,{labelPlacement:"vertical",current:E,size:"default",items:C.map((V,Z)=>({title:$.jsx("div",{style:{lineHeight:1,marginBottom:"8px"},children:V.title}),description:$.jsx("div",{style:{lineHeight:1},children:p?V.description:void 0}),status:Z<E?"finish":Z===E?k?"process":"error":"wait"})),onChange:V=>{if(V<=E){const Z=E;A(V),a==null||a(V,N),x?x.handleStepChange(Z,V,N):console.error("❌ EventHub is not initialized!")}}})}),$.jsxs(re.Card,{title:$.jsx(tee,{level:4,children:C[E].title}),extra:p&&C[E].description&&$.jsx(ree,{type:"secondary",children:C[E].description}),children:[$.jsx(ru,{schema:ee(),uiSchema:ae(),formData:Q(),onChange:V=>{console.log("ExtendedForm onChange called:",V),L(V)},onFieldFocus:s,onFieldBlur:l,onFieldChange:X,webhooks:r,eventHub:x,liveValidate:!0,showErrorList:!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g,children:$.jsx("div",{style:{display:"none"},children:$.jsx("button",{type:"submit"})})},`wizard-step-${E}`),$.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"24px"},children:[$.jsx(re.Button,{onClick:T,disabled:F,icon:$.jsx(Qd,{}),children:"Previous"}),z?$.jsxs(re.Button,{type:"primary",onClick:D,disabled:!U,children:[m,$.jsx(Zd,{style:{marginLeft:"8px"}})]}):$.jsxs(re.Button,{type:"primary",onClick:j,disabled:!U,children:["Next",$.jsx(eh,{style:{marginLeft:"8px"}})]})]})]})]}):$.jsx(ru,{schema:e,uiSchema:t,formData:N,onChange:L,onSubmit:D,onFieldFocus:s,onFieldBlur:l,onFieldChange:u,webhooks:r,eventHub:x,liveValidate:y,showErrorList:_?"top":!1,onWebhookStart:w,onWebhookComplete:v,onWebhookError:g},"single-form")}ie.AUTH_HELPERS=V8,ie.AddressField=jg,ie.ApiDataSource=fh,ie.ArrayFieldItemTemplate=f1,ie.ArrayFieldTemplate=u1,ie.COMMON_MAPPERS=Y8,ie.COMMON_RESPONSE_MAPPERS=q8,ie.CheckboxPresenter=U1,ie.ChoiceWidget=Rn,ie.ColorWidget=_1,ie.CurrencyField=Ug,ie.DEFAULT_CACHE_CONFIG=ch,ie.DEFAULT_CHOICE_CONFIG=Mo,ie.DEFAULT_RESPONSE_MAPPER=ko,ie.DEFAULT_RETRY_CONFIG=x1,ie.DataSourceProvider=ba,ie.DateTimeWidget=sh,ie.DateWidget=x8,ie.DefaultChoiceWidget=Rn,ie.DropdownPresenter=ph,ie.EmailWidget=ih,ie.EnhancedDateWidget=oh,ie.ExtendedForm=ru,ie.FieldTemplate=v1,ie.FileUploadWidget=sc,ie.FileWidget=A1,ie.FormEventHub=gh,ie.FormEventManager=mO,ie.FormEventProvider=kg,ie.NumberWidget=ic,ie.PAGINATED_MAPPERS=J8,ie.PasswordWidget=No,ie.PhoneField=Bg,ie.PresentationMode=bt,ie.PresenterStrategy=uc,ie.ProgressIndicator=d1,ie.RadioPresenter=B1,ie.RangeWidget=nh,ie.RatingWidget=w1,ie.ResponseMappingError=Ye,ie.StaticDataSource=uh,ie.StepNavigation=h1,ie.SubmitButton=y1,ie.TelephoneWidget=ac,ie.TextWidget=Do,ie.TextareaWidget=Fo,ie.URLWidget=ah,ie.WS_AUTH_HELPERS=z8,ie.WS_MESSAGE_HELPERS=H8,ie.WebSocketConnectionState=F1,ie.WebSocketDataSource=dh,ie.WizardForm=nee,ie.WizardLayout=O8,ie.WizardNavigation=p1,ie.WizardObjectFieldTemplate=m1,ie.WizardSectionTemplate=g1,ie.arrayItemPatterns=Uz,ie.convertLegacyConfig=_z,ie.createActiveMapper=X8,ie.createApiDataSource=W8,ie.createChoiceWidgetRegistry=$z,ie.createConditionalEngineHook=pc,ie.createCustomMapper=j1,ie.createCustomValidate=Lz,ie.createDefaultConfig=mh,ie.createDynamicArrayItemsUiSchema=Bz,ie.createGroupedOptions=k8,ie.createMapperPipeline=Z8,ie.createSimpleHash=D1,ie.createStaticDataSource=N8,ie.createWebSocketDataSource=R8,ie.customFields=b1,ie.customTemplates=th,ie.customWidgets=q1,ie.deepEquals=J1,ie.extractArrayFromResponse=cc,ie.filterEnabledOptions=Q8,ie.formDataUtils=G1,ie.getNestedValue=_a,ie.groupOptions=rz,ie.hasGroup=M8,ie.isApiDataSource=P1,ie.isStaticDataSource=T1,ie.isWebSocketDataSource=lh,ie.mapNestedResponse=L1,ie.mapResponse=G8,ie.mapSimpleResponse=k1,ie.mergeItemUiSchema=bh,ie.schemaEngineConfig=H1,ie.schemaUtils=Y1,ie.setNestedValue=K8,ie.sortByLabel=ez,ie.sortByValue=tz,ie.suggestPresentationMode=bz,ie.supportsMultipleSelections=I1,ie.textWidgets=wz,ie.transformOptions=nz,ie.uiEngineConfig=z1,ie.useChoiceWidget=hc,ie.useChoiceWidgetWithErrorBoundary=dz,ie.useChoiceWidgetWithMetrics=hz,ie.useConditionalSchema=kz,ie.useConditionalUi=Tz,ie.useConditionalValidation=jz,ie.useDataSource=dc,ie.useDataSourceWithRetry=cz,ie.useFieldEventHandlers=ht,ie.useFormEventHub=Lg,ie.useMultipleDataSources=uz,ie.validateChoiceOption=N1,ie.validateChoiceOptions=F8,ie.validationEngineConfig=K1,ie.validationUtils=Wz,ie.validator=wp,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});