finform-react-builder 1.8.17 → 1.8.18
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/components/FinForm/types.d.ts +1 -0
- package/dist/index.es.js +1412 -1381
- package/dist/index.js +27 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var bc=Object.defineProperty;var Qa=e=>{throw TypeError(e)};var wc=(e,t,r)=>t in e?bc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rn=(e,t,r)=>wc(e,typeof t!="symbol"?t+"":t,r),bi=(e,t,r)=>t.has(e)||Qa("Cannot "+r);var C=(e,t,r)=>(bi(e,t,"read from private field"),r?r.call(e):t.get(e)),ge=(e,t,r)=>t.has(e)?Qa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),te=(e,t,r,n)=>(bi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(bi(e,t,"access private method"),r);var jn=(e,t,r,n)=>({set _(i){te(e,t,i,r)},get _(){return C(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),$=require("react"),E=require("@mui/material"),Sc=require("@emotion/styled"),Tr=require("@emotion/react");function Cc(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 re=Cc($);var Sn=e=>e.type==="checkbox",dr=e=>e instanceof Date,Ye=e=>e==null;const zs=e=>typeof e=="object";var ze=e=>!Ye(e)&&!Array.isArray(e)&&zs(e)&&!dr(e),Vs=e=>ze(e)&&e.target?Sn(e.target)?e.target.checked:e.target.value:e,Ec=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bs=(e,t)=>e.has(Ec(t)),kc=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},va=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Le(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(va&&(e instanceof Blob||n))&&(r||ze(e)))if(t=r?[]:{},!r&&!kc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Le(e[i]));else return e;return t}var ci=e=>/^\w*$/.test(e),Me=e=>e===void 0,ba=e=>Array.isArray(e)?e.filter(Boolean):[],wa=e=>ba(e.replace(/["|']|\]/g,"").split(/\.|\[/)),G=(e,t,r)=>{if(!t||!ze(e))return r;const n=(ci(t)?[t]:wa(t)).reduce((i,a)=>Ye(i)?i:i[a],e);return Me(n)||n===e?Me(e[t])?r:e[t]:n},it=e=>typeof e=="boolean",Ce=(e,t,r)=>{let n=-1;const i=ci(t)?[t]:wa(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const p=e[s];l=ze(p)||Array.isArray(p)?p:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const Wn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},vt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ns=$.createContext(null);Ns.displayName="HookFormContext";const Sa=()=>$.useContext(Ns);var Ls=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==vt.all&&(t._proxyFormState[o]=!n||vt.all),r&&(r[o]=!0),e[o]}});return i};const Ca=typeof window<"u"?re.useLayoutEffect:re.useEffect;function Tc(e){const t=Sa(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=$.useState(r._formState),l=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ca(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:p=>{!n&&s({...r._formState,...p})}}),[i,n,a]),$.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>Ls(o,r,l.current,!1),[o,r])}var Rt=e=>typeof e=="string",qs=(e,t,r,n,i)=>Rt(e)?(n&&t.watch.add(e),G(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),G(r,a))):(n&&(t.watchAll=!0),r);function Oc(e){const t=Sa(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=$.useRef(i),[l,p]=$.useState(r._getWatch(n,s.current));return Ca(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:u=>!a&&p(qs(n,r._names,u.values||r._formValues,!1,s.current))}),[n,r,a,o]),$.useEffect(()=>r._removeUnmounted()),l}function jc(e){const t=Sa(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=Bs(i._names.array,r),s=Oc({control:i,name:r,defaultValue:G(i._formValues,r,G(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Tc({control:i,name:r,exact:!0}),p=$.useRef(e),u=$.useRef(i.register(r,{...e.rules,value:s,...it(e.disabled)?{disabled:e.disabled}:{}})),d=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!G(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!G(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!G(l.validatingFields,r)},error:{enumerable:!0,get:()=>G(l.errors,r)}}),[l,r]),f=$.useCallback(b=>u.current.onChange({target:{value:Vs(b),name:r},type:Wn.CHANGE}),[r]),x=$.useCallback(()=>u.current.onBlur({target:{value:G(i._formValues,r),name:r},type:Wn.BLUR}),[r,i._formValues]),S=$.useCallback(b=>{const g=G(i._fields,r);g&&b&&(g._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:j=>b.setCustomValidity(j),reportValidity:()=>b.reportValidity()})},[i._fields,r]),c=$.useMemo(()=>({name:r,value:s,...it(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:f,onBlur:x,ref:S}),[r,n,l.disabled,f,x,S,s]);return $.useEffect(()=>{const b=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...it(p.current.disabled)?{disabled:p.current.disabled}:{}});const g=(j,R)=>{const k=G(i._fields,j);k&&k._f&&(k._f.mount=R)};if(g(r,!0),b){const j=Le(G(i._options.defaultValues,r));Ce(i._defaultValues,r,j),Me(G(i._formValues,r))&&Ce(i._formValues,r,j)}return!o&&i.register(r),()=>{(o?b&&!i._state.action:b)?i.unregister(r):g(r,!1)}},[r,i,o,a]),$.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),$.useMemo(()=>({field:c,formState:l,fieldState:d}),[c,l,d])}const ct=e=>e.render(jc(e));var Us=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},pn=e=>Array.isArray(e)?e:[e],Ya=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},zi=e=>Ye(e)||!zs(e);function Ht(e,t){if(zi(e)||zi(t))return e===t;if(dr(e)&&dr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(dr(a)&&dr(o)||ze(a)&&ze(o)||Array.isArray(a)&&Array.isArray(o)?!Ht(a,o):a!==o)return!1}}return!0}var et=e=>ze(e)&&!Object.keys(e).length,Ea=e=>e.type==="file",bt=e=>typeof e=="function",Hn=e=>{if(!va)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ws=e=>e.type==="select-multiple",ka=e=>e.type==="radio",Fc=e=>ka(e)||Sn(e),wi=e=>Hn(e)&&e.isConnected;function Ac(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Me(e)?n++:e[t[n++]];return e}function _c(e){for(const t in e)if(e.hasOwnProperty(t)&&!Me(e[t]))return!1;return!0}function Be(e,t){const r=Array.isArray(t)?t:ci(t)?[t]:wa(t),n=r.length===1?e:Ac(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(ze(n)&&et(n)||Array.isArray(n)&&_c(n))&&Be(e,r.slice(0,-1)),e}var Hs=e=>{for(const t in e)if(bt(e[t]))return!0;return!1};function Kn(e,t={}){const r=Array.isArray(e);if(ze(e)||r)for(const n in e)Array.isArray(e[n])||ze(e[n])&&!Hs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Kn(e[n],t[n])):Ye(e[n])||(t[n]=!0);return t}function Ks(e,t,r){const n=Array.isArray(e);if(ze(e)||n)for(const i in e)Array.isArray(e[i])||ze(e[i])&&!Hs(e[i])?Me(t)||zi(r[i])?r[i]=Array.isArray(e[i])?Kn(e[i],[]):{...Kn(e[i])}:Ks(e[i],Ye(t)?{}:t[i],r[i]):r[i]=!Ht(e[i],t[i]);return r}var nn=(e,t)=>Ks(e,t,Kn(t));const Ga={value:!1,isValid:!1},Za={value:!0,isValid:!0};var Qs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Me(e[0].attributes.value)?Me(e[0].value)||e[0].value===""?Za:{value:e[0].value,isValid:!0}:Za:Ga}return Ga},Ys=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Me(e)?e:t?e===""?NaN:e&&+e:r&&Rt(e)?new Date(e):n?n(e):e;const Xa={isValid:!1,value:null};var Gs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Xa):Xa;function Ja(e){const t=e.ref;return Ea(t)?t.files:ka(t)?Gs(e.refs).value:Ws(t)?[...t.selectedOptions].map(({value:r})=>r):Sn(t)?Qs(e.refs).value:Ys(Me(t.value)?e.ref.value:t.value,e)}var Rc=(e,t,r,n)=>{const i={};for(const a of e){const o=G(t,a);o&&Ce(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Qn=e=>e instanceof RegExp,an=e=>Me(e)?e:Qn(e)?e.source:ze(e)?Qn(e.value)?e.value.source:e.value:e,eo=e=>({isOnSubmit:!e||e===vt.onSubmit,isOnBlur:e===vt.onBlur,isOnChange:e===vt.onChange,isOnAll:e===vt.all,isOnTouch:e===vt.onTouched});const to="AsyncFunction";var $c=e=>!!e&&!!e.validate&&!!(bt(e.validate)&&e.validate.constructor.name===to||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===to)),Dc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ro=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const dn=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=G(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(dn(s,t))break}else if(ze(s)&&dn(s,t))break}}};function no(e,t,r){const n=G(e,r);if(n||ci(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=G(t,a),s=G(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var Pc=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return et(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||vt.all))},Ic=(e,t,r)=>!e||!t||e===t||pn(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Mc=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,zc=(e,t)=>!ba(G(e,t)).length&&Be(e,t),Vc=(e,t,r)=>{const n=pn(G(e,r));return Ce(n,"root",t[r]),Ce(e,r,n),e},Vn=e=>Rt(e);function io(e,t,r="validate"){if(Vn(e)||Array.isArray(e)&&e.every(Vn)||it(e)&&!e)return{type:r,message:Vn(e)?e:"",ref:t}}var Rr=e=>ze(e)&&!Qn(e)?e:{value:e,message:""},ao=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:p,minLength:u,min:d,max:f,pattern:x,validate:S,name:c,valueAsNumber:b,mount:g}=e._f,j=G(r,c);if(!g||t.has(c))return{};const R=s?s[0]:o,k=I=>{i&&R.reportValidity&&(R.setCustomValidity(it(I)?"":I||""),R.reportValidity())},v={},B=ka(o),A=Sn(o),K=B||A,W=(b||Ea(o))&&Me(o.value)&&Me(j)||Hn(o)&&o.value===""||j===""||Array.isArray(j)&&!j.length,h=Us.bind(null,c,n,v),z=(I,U,N,X=Pt.maxLength,ae=Pt.minLength)=>{const he=I?U:N;v[c]={type:I?X:ae,message:he,ref:o,...h(I?X:ae,he)}};if(a?!Array.isArray(j)||!j.length:l&&(!K&&(W||Ye(j))||it(j)&&!j||A&&!Qs(s).isValid||B&&!Gs(s).isValid)){const{value:I,message:U}=Vn(l)?{value:!!l,message:l}:Rr(l);if(I&&(v[c]={type:Pt.required,message:U,ref:R,...h(Pt.required,U)},!n))return k(U),v}if(!W&&(!Ye(d)||!Ye(f))){let I,U;const N=Rr(f),X=Rr(d);if(!Ye(j)&&!isNaN(j)){const ae=o.valueAsNumber||j&&+j;Ye(N.value)||(I=ae>N.value),Ye(X.value)||(U=ae<X.value)}else{const ae=o.valueAsDate||new Date(j),he=V=>new Date(new Date().toDateString()+" "+V),ie=o.type=="time",oe=o.type=="week";Rt(N.value)&&j&&(I=ie?he(j)>he(N.value):oe?j>N.value:ae>new Date(N.value)),Rt(X.value)&&j&&(U=ie?he(j)<he(X.value):oe?j<X.value:ae<new Date(X.value))}if((I||U)&&(z(!!I,N.message,X.message,Pt.max,Pt.min),!n))return k(v[c].message),v}if((p||u)&&!W&&(Rt(j)||a&&Array.isArray(j))){const I=Rr(p),U=Rr(u),N=!Ye(I.value)&&j.length>+I.value,X=!Ye(U.value)&&j.length<+U.value;if((N||X)&&(z(N,I.message,U.message),!n))return k(v[c].message),v}if(x&&!W&&Rt(j)){const{value:I,message:U}=Rr(x);if(Qn(I)&&!j.match(I)&&(v[c]={type:Pt.pattern,message:U,ref:o,...h(Pt.pattern,U)},!n))return k(U),v}if(S){if(bt(S)){const I=await S(j,r),U=io(I,R);if(U&&(v[c]={...U,...h(Pt.validate,U.message)},!n))return k(U.message),v}else if(ze(S)){let I={};for(const U in S){if(!et(I)&&!n)break;const N=io(await S[U](j,r),R,U);N&&(I={...N,...h(U,N.message)},k(N.message),n&&(v[c]=I))}if(!et(I)&&(v[c]={ref:R,...I},!n))return v}}return k(!0),v};const Bc={mode:vt.onSubmit,reValidateMode:vt.onChange,shouldFocusError:!0};function Nc(e={}){let t={...Bc,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:bt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=ze(t.defaultValues)||ze(t.values)?Le(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Le(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,p=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:Ya(),state:Ya()},x=t.criteriaMode===vt.all,S=y=>T=>{clearTimeout(p),p=setTimeout(y,T)},c=async y=>{if(!t.disabled&&(u.isValid||d.isValid||y)){const T=t.resolver?et((await A()).errors):await W(n,!0);T!==r.isValid&&f.state.next({isValid:T})}},b=(y,T)=>{!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((y||Array.from(s.mount)).forEach(O=>{O&&(T?Ce(r.validatingFields,O,T):Be(r.validatingFields,O))}),f.state.next({validatingFields:r.validatingFields,isValidating:!et(r.validatingFields)}))},g=(y,T=[],O,Y,F=!0,_=!0)=>{if(Y&&O&&!t.disabled){if(o.action=!0,_&&Array.isArray(G(n,y))){const D=O(G(n,y),Y.argA,Y.argB);F&&Ce(n,y,D)}if(_&&Array.isArray(G(r.errors,y))){const D=O(G(r.errors,y),Y.argA,Y.argB);F&&Ce(r.errors,y,D),zc(r.errors,y)}if((u.touchedFields||d.touchedFields)&&_&&Array.isArray(G(r.touchedFields,y))){const D=O(G(r.touchedFields,y),Y.argA,Y.argB);F&&Ce(r.touchedFields,y,D)}(u.dirtyFields||d.dirtyFields)&&(r.dirtyFields=nn(i,a)),f.state.next({name:y,isDirty:z(y,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ce(a,y,T)},j=(y,T)=>{Ce(r.errors,y,T),f.state.next({errors:r.errors})},R=y=>{r.errors=y,f.state.next({errors:r.errors,isValid:!1})},k=(y,T,O,Y)=>{const F=G(n,y);if(F){const _=G(a,y,Me(O)?G(i,y):O);Me(_)||Y&&Y.defaultChecked||T?Ce(a,y,T?_:Ja(F._f)):N(y,_),o.mount&&c()}},v=(y,T,O,Y,F)=>{let _=!1,D=!1;const ee={name:y};if(!t.disabled){if(!O||Y){(u.isDirty||d.isDirty)&&(D=r.isDirty,r.isDirty=ee.isDirty=z(),_=D!==ee.isDirty);const le=Ht(G(i,y),T);D=!!G(r.dirtyFields,y),le?Be(r.dirtyFields,y):Ce(r.dirtyFields,y,!0),ee.dirtyFields=r.dirtyFields,_=_||(u.dirtyFields||d.dirtyFields)&&D!==!le}if(O){const le=G(r.touchedFields,y);le||(Ce(r.touchedFields,y,O),ee.touchedFields=r.touchedFields,_=_||(u.touchedFields||d.touchedFields)&&le!==O)}_&&F&&f.state.next(ee)}return _?ee:{}},B=(y,T,O,Y)=>{const F=G(r.errors,y),_=(u.isValid||d.isValid)&&it(T)&&r.isValid!==T;if(t.delayError&&O?(l=S(()=>j(y,O)),l(t.delayError)):(clearTimeout(p),l=null,O?Ce(r.errors,y,O):Be(r.errors,y)),(O?!Ht(F,O):F)||!et(Y)||_){const D={...Y,..._&&it(T)?{isValid:T}:{},errors:r.errors,name:y};r={...r,...D},f.state.next(D)}},A=async y=>{b(y,!0);const T=await t.resolver(a,t.context,Rc(y||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(y),T},K=async y=>{const{errors:T}=await A(y);if(y)for(const O of y){const Y=G(T,O);Y?Ce(r.errors,O,Y):Be(r.errors,O)}else r.errors=T;return T},W=async(y,T,O={valid:!0})=>{for(const Y in y){const F=y[Y];if(F){const{_f:_,...D}=F;if(_){const ee=s.array.has(_.name),le=F._f&&$c(F._f);le&&u.validatingFields&&b([Y],!0);const Oe=await ao(F,s.disabled,a,x,t.shouldUseNativeValidation&&!T,ee);if(le&&u.validatingFields&&b([Y]),Oe[_.name]&&(O.valid=!1,T))break;!T&&(G(Oe,_.name)?ee?Vc(r.errors,Oe,_.name):Ce(r.errors,_.name,Oe[_.name]):Be(r.errors,_.name))}!et(D)&&await W(D,T,O)}}return O.valid},h=()=>{for(const y of s.unMount){const T=G(n,y);T&&(T._f.refs?T._f.refs.every(O=>!wi(O)):!wi(T._f.ref))&&ne(y)}s.unMount=new Set},z=(y,T)=>!t.disabled&&(y&&T&&Ce(a,y,T),!Ht(V(),i)),I=(y,T,O)=>qs(y,s,{...o.mount?a:Me(T)?i:Rt(y)?{[y]:T}:T},O,T),U=y=>ba(G(o.mount?a:i,y,t.shouldUnregister?G(i,y,[]):[])),N=(y,T,O={})=>{const Y=G(n,y);let F=T;if(Y){const _=Y._f;_&&(!_.disabled&&Ce(a,y,Ys(T,_)),F=Hn(_.ref)&&Ye(T)?"":T,Ws(_.ref)?[..._.ref.options].forEach(D=>D.selected=F.includes(D.value)):_.refs?Sn(_.ref)?_.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(F)?D.checked=!!F.find(ee=>ee===D.value):D.checked=F===D.value||!!F)}):_.refs.forEach(D=>D.checked=D.value===F):Ea(_.ref)?_.ref.value="":(_.ref.value=F,_.ref.type||f.state.next({name:y,values:Le(a)})))}(O.shouldDirty||O.shouldTouch)&&v(y,F,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&oe(y)},X=(y,T,O)=>{for(const Y in T){if(!T.hasOwnProperty(Y))return;const F=T[Y],_=y+"."+Y,D=G(n,_);(s.array.has(y)||ze(F)||D&&!D._f)&&!dr(F)?X(_,F,O):N(_,F,O)}},ae=(y,T,O={})=>{const Y=G(n,y),F=s.array.has(y),_=Le(T);Ce(a,y,_),F?(f.array.next({name:y,values:Le(a)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:y,dirtyFields:nn(i,a),isDirty:z(y,_)})):Y&&!Y._f&&!Ye(_)?X(y,_,O):N(y,_,O),ro(y,s)&&f.state.next({...r}),f.state.next({name:o.mount?y:void 0,values:Le(a)})},he=async y=>{o.mount=!0;const T=y.target;let O=T.name,Y=!0;const F=G(n,O),_=le=>{Y=Number.isNaN(le)||dr(le)&&isNaN(le.getTime())||Ht(le,G(a,O,le))},D=eo(t.mode),ee=eo(t.reValidateMode);if(F){let le,Oe;const Ae=T.type?Ja(F._f):Vs(y),We=y.type===Wn.BLUR||y.type===Wn.FOCUS_OUT,Ct=!Dc(F._f)&&!t.resolver&&!G(r.errors,O)&&!F._f.deps||Mc(We,G(r.touchedFields,O),r.isSubmitted,ee,D),Dt=ro(O,s,We);Ce(a,O,Ae),We?(F._f.onBlur&&F._f.onBlur(y),l&&l(0)):F._f.onChange&&F._f.onChange(y);const Et=v(O,Ae,We),mt=!et(Et)||Dt;if(!We&&f.state.next({name:O,type:y.type,values:Le(a)}),Ct)return(u.isValid||d.isValid)&&(t.mode==="onBlur"?We&&c():We||c()),mt&&f.state.next({name:O,...Dt?{}:Et});if(!We&&Dt&&f.state.next({...r}),t.resolver){const{errors:yt}=await A([O]);if(_(Ae),Y){const lr=no(r.errors,n,O),_r=no(yt,n,lr.name||O);le=_r.error,O=_r.name,Oe=et(yt)}}else b([O],!0),le=(await ao(F,s.disabled,a,x,t.shouldUseNativeValidation))[O],b([O]),_(Ae),Y&&(le?Oe=!1:(u.isValid||d.isValid)&&(Oe=await W(n,!0)));Y&&(F._f.deps&&oe(F._f.deps),B(O,Oe,le,Et))}},ie=(y,T)=>{if(G(r.errors,T)&&y.focus)return y.focus(),1},oe=async(y,T={})=>{let O,Y;const F=pn(y);if(t.resolver){const _=await K(Me(y)?y:F);O=et(_),Y=y?!F.some(D=>G(_,D)):O}else y?(Y=(await Promise.all(F.map(async _=>{const D=G(n,_);return await W(D&&D._f?{[_]:D}:D)}))).every(Boolean),!(!Y&&!r.isValid)&&c()):Y=O=await W(n);return f.state.next({...!Rt(y)||(u.isValid||d.isValid)&&O!==r.isValid?{}:{name:y},...t.resolver||!y?{isValid:O}:{},errors:r.errors}),T.shouldFocus&&!Y&&dn(n,ie,y?F:s.mount),Y},V=y=>{const T={...o.mount?a:i};return Me(y)?T:Rt(y)?G(T,y):y.map(O=>G(T,O))},H=(y,T)=>({invalid:!!G((T||r).errors,y),isDirty:!!G((T||r).dirtyFields,y),error:G((T||r).errors,y),isValidating:!!G(r.validatingFields,y),isTouched:!!G((T||r).touchedFields,y)}),ue=y=>{y&&pn(y).forEach(T=>Be(r.errors,T)),f.state.next({errors:y?r.errors:{}})},me=(y,T,O)=>{const Y=(G(n,y,{_f:{}})._f||{}).ref,F=G(r.errors,y)||{},{ref:_,message:D,type:ee,...le}=F;Ce(r.errors,y,{...le,...T,ref:Y}),f.state.next({name:y,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(y,T)=>bt(y)?f.state.subscribe({next:O=>y(I(void 0,T),O)}):I(y,T,!0),q=y=>f.state.subscribe({next:T=>{Ic(y.name,T.name,y.exact)&&Pc(T,y.formState||u,Ne,y.reRenderRoot)&&y.callback({values:{...a},...r,...T})}}).unsubscribe,Z=y=>(o.mount=!0,d={...d,...y.formState},q({...y,formState:d})),ne=(y,T={})=>{for(const O of y?pn(y):s.mount)s.mount.delete(O),s.array.delete(O),T.keepValue||(Be(n,O),Be(a,O)),!T.keepError&&Be(r.errors,O),!T.keepDirty&&Be(r.dirtyFields,O),!T.keepTouched&&Be(r.touchedFields,O),!T.keepIsValidating&&Be(r.validatingFields,O),!t.shouldUnregister&&!T.keepDefaultValue&&Be(i,O);f.state.next({values:Le(a)}),f.state.next({...r,...T.keepDirty?{isDirty:z()}:{}}),!T.keepIsValid&&c()},ce=({disabled:y,name:T})=>{(it(y)&&o.mount||y||s.disabled.has(T))&&(y?s.disabled.add(T):s.disabled.delete(T))},fe=(y,T={})=>{let O=G(n,y);const Y=it(T.disabled)||it(t.disabled);return Ce(n,y,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:y}},name:y,mount:!0,...T}}),s.mount.add(y),O?ce({disabled:it(T.disabled)?T.disabled:t.disabled,name:y}):k(y,!0,T.value),{...Y?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:an(T.min),max:an(T.max),minLength:an(T.minLength),maxLength:an(T.maxLength),pattern:an(T.pattern)}:{},name:y,onChange:he,onBlur:he,ref:F=>{if(F){fe(y,T),O=G(n,y);const _=Me(F.value)&&F.querySelectorAll&&F.querySelectorAll("input,select,textarea")[0]||F,D=Fc(_),ee=O._f.refs||[];if(D?ee.find(le=>le===_):_===O._f.ref)return;Ce(n,y,{_f:{...O._f,...D?{refs:[...ee.filter(wi),_,...Array.isArray(G(i,y))?[{}]:[]],ref:{type:_.type,name:y}}:{ref:_}}}),k(y,!1,void 0,_)}else O=G(n,y,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(Bs(s.array,y)&&o.action)&&s.unMount.add(y)}}},de=()=>t.shouldFocusError&&dn(n,ie,s.mount),L=y=>{it(y)&&(f.state.next({disabled:y}),dn(n,(T,O)=>{const Y=G(n,O);Y&&(T.disabled=Y._f.disabled||y,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(F=>{F.disabled=Y._f.disabled||y}))},0,!1))},M=(y,T)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let F=Le(a);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:_,values:D}=await A();r.errors=_,F=D}else await W(n);if(s.disabled.size)for(const _ of s.disabled)Ce(F,_,void 0);if(Be(r.errors,"root"),et(r.errors)){f.state.next({errors:{}});try{await y(F,O)}catch(_){Y=_}}else T&&await T({...r.errors},O),de(),setTimeout(de);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},J=(y,T={})=>{G(n,y)&&(Me(T.defaultValue)?ae(y,Le(G(i,y))):(ae(y,T.defaultValue),Ce(i,y,Le(T.defaultValue))),T.keepTouched||Be(r.touchedFields,y),T.keepDirty||(Be(r.dirtyFields,y),r.isDirty=T.defaultValue?z(y,Le(G(i,y))):z()),T.keepError||(Be(r.errors,y),u.isValid&&c()),f.state.next({...r}))},ye=(y,T={})=>{const O=y?Le(y):i,Y=Le(O),F=et(y),_=F?i:Y;if(T.keepDefaultValues||(i=O),!T.keepValues){if(T.keepDirtyValues){const D=new Set([...s.mount,...Object.keys(nn(i,a))]);for(const ee of Array.from(D))G(r.dirtyFields,ee)?Ce(_,ee,G(a,ee)):ae(ee,G(_,ee))}else{if(va&&Me(y))for(const D of s.mount){const ee=G(n,D);if(ee&&ee._f){const le=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(Hn(le)){const Oe=le.closest("form");if(Oe){Oe.reset();break}}}}for(const D of s.mount)ae(D,G(_,D))}a=Le(_),f.array.next({values:{..._}}),f.state.next({values:{..._}})}s={mount:T.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!T.keepIsValid||!!T.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:F?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Ht(y,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:F?{}:T.keepDirtyValues?T.keepDefaultValues&&a?nn(i,a):r.dirtyFields:T.keepDefaultValues&&y?nn(i,y):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},xe=(y,T)=>ye(bt(y)?y(a):y,T),Ue=(y,T={})=>{const O=G(n,y),Y=O&&O._f;if(Y){const F=Y.refs?Y.refs[0]:Y.ref;F.focus&&(F.focus(),T.shouldSelect&&bt(F.select)&&F.select())}},Ne=y=>{r={...r,...y}},pe={control:{register:fe,unregister:ne,getFieldState:H,handleSubmit:M,setError:me,_subscribe:q,_runSchema:A,_focusError:de,_getWatch:I,_getDirty:z,_setValid:c,_setFieldArray:g,_setDisabledField:ce,_setErrors:R,_getFieldArray:U,_reset:ye,_resetDefaultValues:()=>bt(t.defaultValues)&&t.defaultValues().then(y=>{xe(y,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:h,_disableForm:L,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(y){o=y},get _defaultValues(){return i},get _names(){return s},set _names(y){s=y},get _formState(){return r},get _options(){return t},set _options(y){t={...t,...y}}},subscribe:Z,trigger:oe,register:fe,handleSubmit:M,watch:se,setValue:ae,getValues:V,reset:xe,resetField:J,clearErrors:ue,unregister:ne,setError:me,setFocus:Ue,getFieldState:H};return{...pe,formControl:pe}}function Lc(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:bt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:bt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!bt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Nc(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,Ca(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),$.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),$.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),$.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),$.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),$.useEffect(()=>{e.values&&!Ht(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),$.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=Ls(n,a),t.current}const oo=(e,t,r)=>{if(e&&"reportValidity"in e){const n=G(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Zs=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?oo(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>oo(i,r,e))}},qc=(e,t)=>{t.shouldUseNativeValidation&&Zs(e,t);const r={};for(const n in e){const i=G(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Uc(t.names||Object.keys(e),n)){const o=Object.assign({},G(r,n));Ce(o,"root",a),Ce(r,n,o)}else Ce(r,n,a)}return r},Uc=(e,t)=>{const r=so(t);return e.some(n=>so(n).match(`^${r}\\.\\d+`))};function so(e){return e.replace(/\]|\[/g,"")}function Wc(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var l=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(p){return a.shouldUseNativeValidation&&Zs({},a),{values:r.raw?Object.assign({},n):p,errors:{}}}))}catch(p){return s(p)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(!o.inner)throw o;return{values:{},errors:qc((s=o,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(p,u){if(p[u.path]||(p[u.path]={message:u.message,type:u.type}),l){var d=p[u.path].types,f=d&&d[u.type];p[u.path]=Us(u.path,l,p,u.type,f?[].concat(f,u.message):u.message)}return p},{})),a)};var s,l}))}catch(o){return Promise.reject(o)}}}var Cn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Er=typeof window>"u"||"Deno"in globalThis;function tt(){}function Hc(e,t){return typeof e=="function"?e(t):e}function Vi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e=="function"?e(t):e}function pt(e,t){return typeof e=="function"?e(t):e}function lo(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Ta(o,t.options))return!1}else if(!mn(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function co(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(hn(t.options.mutationKey)!==hn(a))return!1}else if(!mn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ta(e,t){return((t==null?void 0:t.queryKeyHashFn)||hn)(e)}function hn(e){return JSON.stringify(e,(t,r)=>Li(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function mn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>mn(e[r],t[r])):!1}function Bi(e,t){if(e===t)return e;const r=uo(e)&&uo(t);if(r||Li(e)&&Li(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},l=new Set(n);let p=0;for(let u=0;u<o;u++){const d=r?u:a[u];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,p++):(s[d]=Bi(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&p++)}return i===o&&p===i?e:s}return t}function Ni(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function uo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Li(e){if(!po(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!po(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function po(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kc(e){return new Promise(t=>{setTimeout(t,e)})}function qi(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Bi(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Bi(e,t)}return t}function Qc(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Yc(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Yn=Symbol();function Js(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Yn&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gc(e,t){return typeof e=="function"?e(...t):!!e}var hr,Kt,Nr,Fs,Zc=(Fs=class extends Cn{constructor(){super();ge(this,hr);ge(this,Kt);ge(this,Nr);te(this,Nr,t=>{if(!Er&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,Kt)||this.setEventListener(C(this,Nr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Kt))==null||t.call(this),te(this,Kt,void 0))}setEventListener(t){var r;te(this,Nr,t),(r=C(this,Kt))==null||r.call(this),te(this,Kt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,hr)!==t&&(te(this,hr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,hr)=="boolean"?C(this,hr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hr=new WeakMap,Kt=new WeakMap,Nr=new WeakMap,Fs),Oa=new Zc,Lr,Qt,qr,As,Xc=(As=class extends Cn{constructor(){super();ge(this,Lr,!0);ge(this,Qt);ge(this,qr);te(this,qr,t=>{if(!Er&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){C(this,Qt)||this.setEventListener(C(this,qr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Qt))==null||t.call(this),te(this,Qt,void 0))}setEventListener(t){var r;te(this,qr,t),(r=C(this,Qt))==null||r.call(this),te(this,Qt,t(this.setOnline.bind(this)))}setOnline(t){C(this,Lr)!==t&&(te(this,Lr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,Lr)}},Lr=new WeakMap,Qt=new WeakMap,qr=new WeakMap,As),Gn=new Xc;function Ui(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Jc(e){return Math.min(1e3*2**e,3e4)}function el(e){return(e??"online")==="online"?Gn.isOnline():!0}var tl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Si(e){return e instanceof tl}function rl(e){let t=!1,r=0,n=!1,i;const a=Ui(),o=c=>{var b;n||(f(new tl(c)),(b=e.abort)==null||b.call(e))},s=()=>{t=!0},l=()=>{t=!1},p=()=>Oa.isFocused()&&(e.networkMode==="always"||Gn.isOnline())&&e.canRun(),u=()=>el(e.networkMode)&&e.canRun(),d=c=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,c),i==null||i(),a.resolve(c))},f=c=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,c),i==null||i(),a.reject(c))},x=()=>new Promise(c=>{var b;i=g=>{(n||p())&&c(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var c;i=void 0,n||(c=e.onContinue)==null||c.call(e)}),S=()=>{if(n)return;let c;const b=r===0?e.initialPromise:void 0;try{c=b??e.fn()}catch(g){c=Promise.reject(g)}Promise.resolve(c).then(d).catch(g=>{var B;if(n)return;const j=e.retry??(Er?0:3),R=e.retryDelay??Jc,k=typeof R=="function"?R(r,g):R,v=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,g);if(t||!v){f(g);return}r++,(B=e.onFail)==null||B.call(e,r,g),Kc(k).then(()=>p()?void 0:x()).then(()=>{t?f(g):S()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?S():x().then(S),a)}}var eu=e=>setTimeout(e,0);function tu(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=eu;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var qe=tu(),mr,_s,nl=(_s=class{constructor(){ge(this,mr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vi(this.gcTime)&&te(this,mr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Er?1/0:5*60*1e3))}clearGcTimeout(){C(this,mr)&&(clearTimeout(C(this,mr)),te(this,mr,void 0))}},mr=new WeakMap,_s),Ur,yr,ut,gr,He,xn,xr,gt,Bt,Rs,ru=(Rs=class extends nl{constructor(t){super();ge(this,gt);ge(this,Ur);ge(this,yr);ge(this,ut);ge(this,gr);ge(this,He);ge(this,xn);ge(this,xr);te(this,xr,!1),te(this,xn,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,gr,t.client),te(this,ut,C(this,gr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,Ur,nu(this.options)),this.state=t.state??C(this,Ur),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,He))==null?void 0:t.promise}setOptions(t){this.options={...C(this,xn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,ut).remove(this)}setData(t,r){const n=qi(this.state.data,t,this.options);return ve(this,gt,Bt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,gt,Bt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=C(this,He))==null?void 0:n.promise;return(i=C(this,He))==null||i.cancel(t),r?r.then(tt).catch(tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Ur))}isActive(){return this.observers.some(t=>pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Xs(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,He))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,He))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,He)&&(C(this,xr)?C(this,He).cancel({revert:!0}):C(this,He).cancelRetry()),this.scheduleGc()),C(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,gt,Bt).call(this,{type:"invalidate"})}fetch(t,r){var p,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,He))return C(this,He).continueRetry(),C(this,He).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(x=>x.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(te(this,xr,!0),n.signal)})},a=()=>{const f=Js(this.options,r),S=(()=>{const c={client:C(this,gr),queryKey:this.queryKey,meta:this.meta};return i(c),c})();return te(this,xr,!1),this.options.persister?this.options.persister(f,S,this):f(S)},s=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,gr),state:this.state,fetchFn:a};return i(f),f})();(p=this.options.behavior)==null||p.onFetch(s,this),te(this,yr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ve(this,gt,Bt).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const l=f=>{var x,S,c,b;Si(f)&&f.silent||ve(this,gt,Bt).call(this,{type:"error",error:f}),Si(f)||((S=(x=C(this,ut).config).onError)==null||S.call(x,f,this),(b=(c=C(this,ut).config).onSettled)==null||b.call(c,this.state.data,f,this)),this.scheduleGc()};return te(this,He,rl({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var x,S,c,b;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(S=(x=C(this,ut).config).onSuccess)==null||S.call(x,f,this),(b=(c=C(this,ut).config).onSettled)==null||b.call(c,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,x)=>{ve(this,gt,Bt).call(this,{type:"failed",failureCount:f,error:x})},onPause:()=>{ve(this,gt,Bt).call(this,{type:"pause"})},onContinue:()=>{ve(this,gt,Bt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),C(this,He).start()}},Ur=new WeakMap,yr=new WeakMap,ut=new WeakMap,gr=new WeakMap,He=new WeakMap,xn=new WeakMap,xr=new WeakMap,gt=new WeakSet,Bt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...il(n.data,this.options),fetchMeta:t.meta??null};case"success":return te(this,yr,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Si(i)&&i.revert&&C(this,yr)?{...C(this,yr),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,ut).notify({query:this,type:"updated",action:t})})},Rs);function il(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:el(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jt,$s,iu=($s=class extends Cn{constructor(t={}){super();ge(this,jt);this.config=t,te(this,jt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ta(i,r);let o=this.get(a);return o||(o=new ru({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,jt).has(t.queryHash)||(C(this,jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,jt).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,jt).get(t)}getAll(){return[...C(this,jt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>lo(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>lo(t,n)):r}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},jt=new WeakMap,$s),Ft,Ke,vr,At,Ut,Ds,au=(Ds=class extends nl{constructor(t){super();ge(this,At);ge(this,Ft);ge(this,Ke);ge(this,vr);this.mutationId=t.mutationId,te(this,Ke,t.mutationCache),te(this,Ft,[]),this.state=t.state||ou(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ft).includes(t)||(C(this,Ft).push(t),this.clearGcTimeout(),C(this,Ke).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,Ft,C(this,Ft).filter(r=>r!==t)),this.scheduleGc(),C(this,Ke).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ft).length||(this.state.status==="pending"?this.scheduleGc():C(this,Ke).remove(this))}continue(){var t;return((t=C(this,vr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,p,u,d,f,x,S,c,b,g,j,R,k,v,B,A,K;const r=()=>{ve(this,At,Ut).call(this,{type:"continue"})};te(this,vr,rl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(W,h)=>{ve(this,At,Ut).call(this,{type:"failed",failureCount:W,error:h})},onPause:()=>{ve(this,At,Ut).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Ke).canRun(this)}));const n=this.state.status==="pending",i=!C(this,vr).canStart();try{if(n)r();else{ve(this,At,Ut).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=C(this,Ke).config).onMutate)==null?void 0:o.call(a,t,this));const h=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));h!==this.state.context&&ve(this,At,Ut).call(this,{type:"pending",context:h,variables:t,isPaused:i})}const W=await C(this,vr).start();return await((u=(p=C(this,Ke).config).onSuccess)==null?void 0:u.call(p,W,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,W,t,this.state.context)),await((S=(x=C(this,Ke).config).onSettled)==null?void 0:S.call(x,W,null,this.state.variables,this.state.context,this)),await((b=(c=this.options).onSettled)==null?void 0:b.call(c,W,null,t,this.state.context)),ve(this,At,Ut).call(this,{type:"success",data:W}),W}catch(W){try{throw await((j=(g=C(this,Ke).config).onError)==null?void 0:j.call(g,W,t,this.state.context,this)),await((k=(R=this.options).onError)==null?void 0:k.call(R,W,t,this.state.context)),await((B=(v=C(this,Ke).config).onSettled)==null?void 0:B.call(v,void 0,W,this.state.variables,this.state.context,this)),await((K=(A=this.options).onSettled)==null?void 0:K.call(A,void 0,W,t,this.state.context)),W}finally{ve(this,At,Ut).call(this,{type:"error",error:W})}}finally{C(this,Ke).runNext(this)}}},Ft=new WeakMap,Ke=new WeakMap,vr=new WeakMap,At=new WeakSet,Ut=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qe.batch(()=>{C(this,Ft).forEach(n=>{n.onMutationUpdate(t)}),C(this,Ke).notify({mutation:this,type:"updated",action:t})})},Ds);function ou(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Nt,xt,vn,Ps,su=(Ps=class extends Cn{constructor(t={}){super();ge(this,Nt);ge(this,xt);ge(this,vn);this.config=t,te(this,Nt,new Set),te(this,xt,new Map),te(this,vn,0)}build(t,r,n){const i=new au({mutationCache:this,mutationId:++jn(this,vn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){C(this,Nt).add(t);const r=Fn(t);if(typeof r=="string"){const n=C(this,xt).get(r);n?n.push(t):C(this,xt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,Nt).delete(t)){const r=Fn(t);if(typeof r=="string"){const n=C(this,xt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&C(this,xt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Fn(t);if(typeof r=="string"){const n=C(this,xt).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Fn(t);if(typeof r=="string"){const i=(n=C(this,xt).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qe.batch(()=>{C(this,Nt).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,Nt).clear(),C(this,xt).clear()})}getAll(){return Array.from(C(this,Nt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>co(r,n))}findAll(t={}){return this.getAll().filter(r=>co(t,r))}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(tt))))}},Nt=new WeakMap,xt=new WeakMap,vn=new WeakMap,Ps);function Fn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function fo(e){return{onFetch:(t,r)=>{var u,d,f,x,S;const n=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],o=((S=t.state.data)==null?void 0:S.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const p=async()=>{let c=!1;const b=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},g=Js(t.options,t.fetchOptions),j=async(R,k,v)=>{if(c)return Promise.reject();if(k==null&&R.pages.length)return Promise.resolve(R);const A=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:k,direction:v?"backward":"forward",meta:t.options.meta};return b(z),z})(),K=await g(A),{maxPages:W}=t.options,h=v?Yc:Qc;return{pages:h(R.pages,K,W),pageParams:h(R.pageParams,k,W)}};if(i&&a.length){const R=i==="backward",k=R?lu:ho,v={pages:a,pageParams:o},B=k(n,v);s=await j(v,B,R)}else{const R=e??a.length;do{const k=l===0?o[0]??n.initialPageParam:ho(n,s);if(l>0&&k==null)break;s=await j(s,k),l++}while(l<R)}return s};t.options.persister?t.fetchFn=()=>{var c,b;return(b=(c=t.options).persister)==null?void 0:b.call(c,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function ho(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function lu(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ie,Yt,Gt,Wr,Hr,Zt,Kr,Qr,Is,cu=(Is=class{constructor(e={}){ge(this,Ie);ge(this,Yt);ge(this,Gt);ge(this,Wr);ge(this,Hr);ge(this,Zt);ge(this,Kr);ge(this,Qr);te(this,Ie,e.queryCache||new iu),te(this,Yt,e.mutationCache||new su),te(this,Gt,e.defaultOptions||{}),te(this,Wr,new Map),te(this,Hr,new Map),te(this,Zt,0)}mount(){jn(this,Zt)._++,C(this,Zt)===1&&(te(this,Kr,Oa.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onFocus())})),te(this,Qr,Gn.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ie).onOnline())})))}unmount(){var e,t;jn(this,Zt)._--,C(this,Zt)===0&&((e=C(this,Kr))==null||e.call(this),te(this,Kr,void 0),(t=C(this,Qr))==null||t.call(this),te(this,Qr,void 0))}isFetching(e){return C(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Yt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,Ie).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,Ie).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(rr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,Ie).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=C(this,Ie).get(n.queryHash),a=i==null?void 0:i.state.data,o=Hc(t,a);if(o!==void 0)return C(this,Ie).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return qe.batch(()=>C(this,Ie).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,Ie).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,Ie);qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,Ie);return qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qe.batch(()=>C(this,Ie).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(tt).catch(tt)}invalidateQueries(e,t={}){return qe.batch(()=>(C(this,Ie).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=qe.batch(()=>C(this,Ie).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(tt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(tt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,Ie).build(this,t);return r.isStaleByTime(rr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(tt).catch(tt)}fetchInfiniteQuery(e){return e.behavior=fo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(tt).catch(tt)}ensureInfiniteQueryData(e){return e.behavior=fo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gn.isOnline()?C(this,Yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Ie)}getMutationCache(){return C(this,Yt)}getDefaultOptions(){return C(this,Gt)}setDefaultOptions(e){te(this,Gt,e)}setQueryDefaults(e,t){C(this,Wr).set(hn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Wr).values()],r={};return t.forEach(n=>{mn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,Hr).set(hn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Hr).values()],r={};return t.forEach(n=>{mn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Gt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ta(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Yn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Gt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Ie).clear(),C(this,Yt).clear()}},Ie=new WeakMap,Yt=new WeakMap,Gt=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,Zt=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,Is),Je,be,bn,Qe,br,Yr,Xt,Jt,wn,Gr,Zr,wr,Sr,er,Xr,Ee,sn,Wi,Hi,Ki,Qi,Yi,Gi,Zi,al,Ms,uu=(Ms=class extends Cn{constructor(t,r){super();ge(this,Ee);ge(this,Je);ge(this,be);ge(this,bn);ge(this,Qe);ge(this,br);ge(this,Yr);ge(this,Xt);ge(this,Jt);ge(this,wn);ge(this,Gr);ge(this,Zr);ge(this,wr);ge(this,Sr);ge(this,er);ge(this,Xr,new Set);this.options=r,te(this,Je,t),te(this,Jt,null),te(this,Xt,Ui()),this.options.experimental_prefetchInRender||C(this,Xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,be).addObserver(this),mo(C(this,be),this.options)?ve(this,Ee,sn).call(this):this.updateResult(),ve(this,Ee,Qi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xi(C(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xi(C(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Ee,Yi).call(this),ve(this,Ee,Gi).call(this),C(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=C(this,be);if(this.options=C(this,Je).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pt(this.options.enabled,C(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Ee,Zi).call(this),C(this,be).setOptions(this.options),r._defaulted&&!Ni(this.options,r)&&C(this,Je).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,be),observer:this});const i=this.hasListeners();i&&yo(C(this,be),n,this.options,r)&&ve(this,Ee,sn).call(this),this.updateResult(),i&&(C(this,be)!==n||pt(this.options.enabled,C(this,be))!==pt(r.enabled,C(this,be))||rr(this.options.staleTime,C(this,be))!==rr(r.staleTime,C(this,be)))&&ve(this,Ee,Wi).call(this);const a=ve(this,Ee,Hi).call(this);i&&(C(this,be)!==n||pt(this.options.enabled,C(this,be))!==pt(r.enabled,C(this,be))||a!==C(this,er))&&ve(this,Ee,Ki).call(this,a)}getOptimisticResult(t){const r=C(this,Je).getQueryCache().build(C(this,Je),t),n=this.createResult(r,t);return du(this,n)&&(te(this,Qe,n),te(this,Yr,this.options),te(this,br,C(this,be).state)),n}getCurrentResult(){return C(this,Qe)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){C(this,Xr).add(t)}getCurrentQuery(){return C(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=C(this,Je).defaultQueryOptions(t),n=C(this,Je).getQueryCache().build(C(this,Je),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,Ee,sn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Qe)))}createResult(t,r){var W;const n=C(this,be),i=this.options,a=C(this,Qe),o=C(this,br),s=C(this,Yr),p=t!==n?t.state:C(this,bn),{state:u}=t;let d={...u},f=!1,x;if(r._optimisticResults){const h=this.hasListeners(),z=!h&&mo(t,r),I=h&&yo(t,n,r,i);(z||I)&&(d={...d,...il(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:S,errorUpdatedAt:c,status:b}=d;x=d.data;let g=!1;if(r.placeholderData!==void 0&&x===void 0&&b==="pending"){let h;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(h=a.data,g=!0):h=typeof r.placeholderData=="function"?r.placeholderData((W=C(this,Zr))==null?void 0:W.state.data,C(this,Zr)):r.placeholderData,h!==void 0&&(b="success",x=qi(a==null?void 0:a.data,h,r),f=!0)}if(r.select&&x!==void 0&&!g)if(a&&x===(o==null?void 0:o.data)&&r.select===C(this,wn))x=C(this,Gr);else try{te(this,wn,r.select),x=r.select(x),x=qi(a==null?void 0:a.data,x,r),te(this,Gr,x),te(this,Jt,null)}catch(h){te(this,Jt,h)}C(this,Jt)&&(S=C(this,Jt),x=C(this,Gr),c=Date.now(),b="error");const j=d.fetchStatus==="fetching",R=b==="pending",k=b==="error",v=R&&j,B=x!==void 0,K={status:b,fetchStatus:d.fetchStatus,isPending:R,isSuccess:b==="success",isError:k,isInitialLoading:v,isLoading:v,data:x,dataUpdatedAt:d.dataUpdatedAt,error:S,errorUpdatedAt:c,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!R,isLoadingError:k&&!B,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:k&&B,isStale:ja(t,r),refetch:this.refetch,promise:C(this,Xt),isEnabled:pt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const h=U=>{K.status==="error"?U.reject(K.error):K.data!==void 0&&U.resolve(K.data)},z=()=>{const U=te(this,Xt,K.promise=Ui());h(U)},I=C(this,Xt);switch(I.status){case"pending":t.queryHash===n.queryHash&&h(I);break;case"fulfilled":(K.status==="error"||K.data!==I.value)&&z();break;case"rejected":(K.status!=="error"||K.error!==I.reason)&&z();break}}return K}updateResult(){const t=C(this,Qe),r=this.createResult(C(this,be),this.options);if(te(this,br,C(this,be).state),te(this,Yr,this.options),C(this,br).data!==void 0&&te(this,Zr,C(this,be)),Ni(r,t))return;te(this,Qe,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!C(this,Xr).size)return!0;const o=new Set(a??C(this,Xr));return this.options.throwOnError&&o.add("error"),Object.keys(C(this,Qe)).some(s=>{const l=s;return C(this,Qe)[l]!==t[l]&&o.has(l)})};ve(this,Ee,al).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Ee,Qi).call(this)}},Je=new WeakMap,be=new WeakMap,bn=new WeakMap,Qe=new WeakMap,br=new WeakMap,Yr=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,wn=new WeakMap,Gr=new WeakMap,Zr=new WeakMap,wr=new WeakMap,Sr=new WeakMap,er=new WeakMap,Xr=new WeakMap,Ee=new WeakSet,sn=function(t){ve(this,Ee,Zi).call(this);let r=C(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(tt)),r},Wi=function(){ve(this,Ee,Yi).call(this);const t=rr(this.options.staleTime,C(this,be));if(Er||C(this,Qe).isStale||!Vi(t))return;const n=Xs(C(this,Qe).dataUpdatedAt,t)+1;te(this,wr,setTimeout(()=>{C(this,Qe).isStale||this.updateResult()},n))},Hi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,be)):this.options.refetchInterval)??!1},Ki=function(t){ve(this,Ee,Gi).call(this),te(this,er,t),!(Er||pt(this.options.enabled,C(this,be))===!1||!Vi(C(this,er))||C(this,er)===0)&&te(this,Sr,setInterval(()=>{(this.options.refetchIntervalInBackground||Oa.isFocused())&&ve(this,Ee,sn).call(this)},C(this,er)))},Qi=function(){ve(this,Ee,Wi).call(this),ve(this,Ee,Ki).call(this,ve(this,Ee,Hi).call(this))},Yi=function(){C(this,wr)&&(clearTimeout(C(this,wr)),te(this,wr,void 0))},Gi=function(){C(this,Sr)&&(clearInterval(C(this,Sr)),te(this,Sr,void 0))},Zi=function(){const t=C(this,Je).getQueryCache().build(C(this,Je),this.options);if(t===C(this,be))return;const r=C(this,be);te(this,be,t),te(this,bn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},al=function(t){qe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(C(this,Qe))}),C(this,Je).getQueryCache().notify({query:C(this,be),type:"observerResultsUpdated"})})},Ms);function pu(e,t){return pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mo(e,t){return pu(e,t)||e.state.data!==void 0&&Xi(e,t,t.refetchOnMount)}function Xi(e,t,r){if(pt(t.enabled,e)!==!1&&rr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ja(e,t)}return!1}function yo(e,t,r,n){return(e!==t||pt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ja(e,r)}function ja(e,t){return pt(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function du(e,t){return!Ni(e.getCurrentResult(),t)}var ol=re.createContext(void 0),fu=e=>{const t=re.useContext(ol);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hu=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(ol.Provider,{value:e,children:t})),sl=re.createContext(!1),mu=()=>re.useContext(sl);sl.Provider;function yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gu=re.createContext(yu()),xu=()=>re.useContext(gu),vu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},bu=e=>{re.useEffect(()=>{e.clearReset()},[e])},wu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Gc(r,[e.error,n])),Su=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Cu=(e,t)=>e.isLoading&&e.isFetching&&!t,Eu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,go=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ku(e,t,r){var d,f,x,S,c;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=mu(),i=xu(),a=fu(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",Su(o),vu(o,i),bu(i);const s=!a.getQueryCache().get(o.queryHash),[l]=re.useState(()=>new t(a,o)),p=l.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(re.useSyncExternalStore(re.useCallback(b=>{const g=u?l.subscribe(qe.batchCalls(b)):tt;return l.updateResult(),g},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),re.useEffect(()=>{l.setOptions(o)},[o,l]),Eu(o,p))throw go(o,l,i);if(wu({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw p.error;if((S=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||S.call(x,o,p),o.experimental_prefetchInRender&&!Er&&Cu(p,n)){const b=s?go(o,l,i):(c=a.getQueryCache().get(o.queryHash))==null?void 0:c.promise;b==null||b.catch(tt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?p:l.trackResult(p)}function Tu(e,t){return ku(e,uu)}function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var An={exports:{}},_n={exports:{}},we={};/** @license React v16.13.1
|
|
1
|
+
"use strict";var bc=Object.defineProperty;var Ya=e=>{throw TypeError(e)};var wc=(e,t,r)=>t in e?bc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rn=(e,t,r)=>wc(e,typeof t!="symbol"?t+"":t,r),bi=(e,t,r)=>t.has(e)||Ya("Cannot "+r);var E=(e,t,r)=>(bi(e,t,"read from private field"),r?r.call(e):t.get(e)),ge=(e,t,r)=>t.has(e)?Ya("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),te=(e,t,r,n)=>(bi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(bi(e,t,"access private method"),r);var jn=(e,t,r,n)=>({set _(i){te(e,t,i,r)},get _(){return E(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),D=require("react"),C=require("@mui/material"),Sc=require("@emotion/styled"),Tr=require("@emotion/react");function Cc(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 re=Cc(D);var Sn=e=>e.type==="checkbox",dr=e=>e instanceof Date,Ye=e=>e==null;const Vs=e=>typeof e=="object";var ze=e=>!Ye(e)&&!Array.isArray(e)&&Vs(e)&&!dr(e),Bs=e=>ze(e)&&e.target?Sn(e.target)?e.target.checked:e.target.value:e,Ec=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ns=(e,t)=>e.has(Ec(t)),kc=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},va=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Le(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(va&&(e instanceof Blob||n))&&(r||ze(e)))if(t=r?[]:{},!r&&!kc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Le(e[i]));else return e;return t}var ci=e=>/^\w*$/.test(e),Me=e=>e===void 0,ba=e=>Array.isArray(e)?e.filter(Boolean):[],wa=e=>ba(e.replace(/["|']|\]/g,"").split(/\.|\[/)),G=(e,t,r)=>{if(!t||!ze(e))return r;const n=(ci(t)?[t]:wa(t)).reduce((i,a)=>Ye(i)?i:i[a],e);return Me(n)||n===e?Me(e[t])?r:e[t]:n},it=e=>typeof e=="boolean",Ce=(e,t,r)=>{let n=-1;const i=ci(t)?[t]:wa(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const p=e[s];l=ze(p)||Array.isArray(p)?p:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const Wn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},vt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ls=D.createContext(null);Ls.displayName="HookFormContext";const Sa=()=>D.useContext(Ls);var qs=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==vt.all&&(t._proxyFormState[o]=!n||vt.all),r&&(r[o]=!0),e[o]}});return i};const Ca=typeof window<"u"?re.useLayoutEffect:re.useEffect;function Tc(e){const t=Sa(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=D.useState(r._formState),l=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ca(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:p=>{!n&&s({...r._formState,...p})}}),[i,n,a]),D.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),D.useMemo(()=>qs(o,r,l.current,!1),[o,r])}var Rt=e=>typeof e=="string",Us=(e,t,r,n,i)=>Rt(e)?(n&&t.watch.add(e),G(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),G(r,a))):(n&&(t.watchAll=!0),r);function Oc(e){const t=Sa(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=D.useRef(i),[l,p]=D.useState(r._getWatch(n,s.current));return Ca(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:u=>!a&&p(Us(n,r._names,u.values||r._formValues,!1,s.current))}),[n,r,a,o]),D.useEffect(()=>r._removeUnmounted()),l}function jc(e){const t=Sa(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=Ns(i._names.array,r),s=Oc({control:i,name:r,defaultValue:G(i._formValues,r,G(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Tc({control:i,name:r,exact:!0}),p=D.useRef(e),u=D.useRef(i.register(r,{...e.rules,value:s,...it(e.disabled)?{disabled:e.disabled}:{}})),d=D.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!G(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!G(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!G(l.validatingFields,r)},error:{enumerable:!0,get:()=>G(l.errors,r)}}),[l,r]),f=D.useCallback(b=>u.current.onChange({target:{value:Bs(b),name:r},type:Wn.CHANGE}),[r]),x=D.useCallback(()=>u.current.onBlur({target:{value:G(i._formValues,r),name:r},type:Wn.BLUR}),[r,i._formValues]),S=D.useCallback(b=>{const g=G(i._fields,r);g&&b&&(g._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:j=>b.setCustomValidity(j),reportValidity:()=>b.reportValidity()})},[i._fields,r]),c=D.useMemo(()=>({name:r,value:s,...it(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:f,onBlur:x,ref:S}),[r,n,l.disabled,f,x,S,s]);return D.useEffect(()=>{const b=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...it(p.current.disabled)?{disabled:p.current.disabled}:{}});const g=(j,$)=>{const k=G(i._fields,j);k&&k._f&&(k._f.mount=$)};if(g(r,!0),b){const j=Le(G(i._options.defaultValues,r));Ce(i._defaultValues,r,j),Me(G(i._formValues,r))&&Ce(i._formValues,r,j)}return!o&&i.register(r),()=>{(o?b&&!i._state.action:b)?i.unregister(r):g(r,!1)}},[r,i,o,a]),D.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),D.useMemo(()=>({field:c,formState:l,fieldState:d}),[c,l,d])}const ct=e=>e.render(jc(e));var Ws=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},pn=e=>Array.isArray(e)?e:[e],Ga=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},zi=e=>Ye(e)||!Vs(e);function Ht(e,t){if(zi(e)||zi(t))return e===t;if(dr(e)&&dr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(dr(a)&&dr(o)||ze(a)&&ze(o)||Array.isArray(a)&&Array.isArray(o)?!Ht(a,o):a!==o)return!1}}return!0}var et=e=>ze(e)&&!Object.keys(e).length,Ea=e=>e.type==="file",bt=e=>typeof e=="function",Hn=e=>{if(!va)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hs=e=>e.type==="select-multiple",ka=e=>e.type==="radio",Fc=e=>ka(e)||Sn(e),wi=e=>Hn(e)&&e.isConnected;function Ac(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Me(e)?n++:e[t[n++]];return e}function _c(e){for(const t in e)if(e.hasOwnProperty(t)&&!Me(e[t]))return!1;return!0}function Be(e,t){const r=Array.isArray(t)?t:ci(t)?[t]:wa(t),n=r.length===1?e:Ac(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(ze(n)&&et(n)||Array.isArray(n)&&_c(n))&&Be(e,r.slice(0,-1)),e}var Ks=e=>{for(const t in e)if(bt(e[t]))return!0;return!1};function Kn(e,t={}){const r=Array.isArray(e);if(ze(e)||r)for(const n in e)Array.isArray(e[n])||ze(e[n])&&!Ks(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Kn(e[n],t[n])):Ye(e[n])||(t[n]=!0);return t}function Qs(e,t,r){const n=Array.isArray(e);if(ze(e)||n)for(const i in e)Array.isArray(e[i])||ze(e[i])&&!Ks(e[i])?Me(t)||zi(r[i])?r[i]=Array.isArray(e[i])?Kn(e[i],[]):{...Kn(e[i])}:Qs(e[i],Ye(t)?{}:t[i],r[i]):r[i]=!Ht(e[i],t[i]);return r}var nn=(e,t)=>Qs(e,t,Kn(t));const Za={value:!1,isValid:!1},Xa={value:!0,isValid:!0};var Ys=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Me(e[0].attributes.value)?Me(e[0].value)||e[0].value===""?Xa:{value:e[0].value,isValid:!0}:Xa:Za}return Za},Gs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Me(e)?e:t?e===""?NaN:e&&+e:r&&Rt(e)?new Date(e):n?n(e):e;const Ja={isValid:!1,value:null};var Zs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ja):Ja;function eo(e){const t=e.ref;return Ea(t)?t.files:ka(t)?Zs(e.refs).value:Hs(t)?[...t.selectedOptions].map(({value:r})=>r):Sn(t)?Ys(e.refs).value:Gs(Me(t.value)?e.ref.value:t.value,e)}var Rc=(e,t,r,n)=>{const i={};for(const a of e){const o=G(t,a);o&&Ce(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Qn=e=>e instanceof RegExp,an=e=>Me(e)?e:Qn(e)?e.source:ze(e)?Qn(e.value)?e.value.source:e.value:e,to=e=>({isOnSubmit:!e||e===vt.onSubmit,isOnBlur:e===vt.onBlur,isOnChange:e===vt.onChange,isOnAll:e===vt.all,isOnTouch:e===vt.onTouched});const ro="AsyncFunction";var $c=e=>!!e&&!!e.validate&&!!(bt(e.validate)&&e.validate.constructor.name===ro||ze(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ro)),Dc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),no=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const dn=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=G(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(dn(s,t))break}else if(ze(s)&&dn(s,t))break}}};function io(e,t,r){const n=G(e,r);if(n||ci(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=G(t,a),s=G(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var Pc=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return et(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||vt.all))},Ic=(e,t,r)=>!e||!t||e===t||pn(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Mc=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,zc=(e,t)=>!ba(G(e,t)).length&&Be(e,t),Vc=(e,t,r)=>{const n=pn(G(e,r));return Ce(n,"root",t[r]),Ce(e,r,n),e},Vn=e=>Rt(e);function ao(e,t,r="validate"){if(Vn(e)||Array.isArray(e)&&e.every(Vn)||it(e)&&!e)return{type:r,message:Vn(e)?e:"",ref:t}}var Rr=e=>ze(e)&&!Qn(e)?e:{value:e,message:""},oo=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:p,minLength:u,min:d,max:f,pattern:x,validate:S,name:c,valueAsNumber:b,mount:g}=e._f,j=G(r,c);if(!g||t.has(c))return{};const $=s?s[0]:o,k=I=>{i&&$.reportValidity&&($.setCustomValidity(it(I)?"":I||""),$.reportValidity())},v={},B=ka(o),_=Sn(o),K=B||_,W=(b||Ea(o))&&Me(o.value)&&Me(j)||Hn(o)&&o.value===""||j===""||Array.isArray(j)&&!j.length,m=Ws.bind(null,c,n,v),z=(I,U,N,X=Pt.maxLength,ae=Pt.minLength)=>{const me=I?U:N;v[c]={type:I?X:ae,message:me,ref:o,...m(I?X:ae,me)}};if(a?!Array.isArray(j)||!j.length:l&&(!K&&(W||Ye(j))||it(j)&&!j||_&&!Ys(s).isValid||B&&!Zs(s).isValid)){const{value:I,message:U}=Vn(l)?{value:!!l,message:l}:Rr(l);if(I&&(v[c]={type:Pt.required,message:U,ref:$,...m(Pt.required,U)},!n))return k(U),v}if(!W&&(!Ye(d)||!Ye(f))){let I,U;const N=Rr(f),X=Rr(d);if(!Ye(j)&&!isNaN(j)){const ae=o.valueAsNumber||j&&+j;Ye(N.value)||(I=ae>N.value),Ye(X.value)||(U=ae<X.value)}else{const ae=o.valueAsDate||new Date(j),me=V=>new Date(new Date().toDateString()+" "+V),ie=o.type=="time",oe=o.type=="week";Rt(N.value)&&j&&(I=ie?me(j)>me(N.value):oe?j>N.value:ae>new Date(N.value)),Rt(X.value)&&j&&(U=ie?me(j)<me(X.value):oe?j<X.value:ae<new Date(X.value))}if((I||U)&&(z(!!I,N.message,X.message,Pt.max,Pt.min),!n))return k(v[c].message),v}if((p||u)&&!W&&(Rt(j)||a&&Array.isArray(j))){const I=Rr(p),U=Rr(u),N=!Ye(I.value)&&j.length>+I.value,X=!Ye(U.value)&&j.length<+U.value;if((N||X)&&(z(N,I.message,U.message),!n))return k(v[c].message),v}if(x&&!W&&Rt(j)){const{value:I,message:U}=Rr(x);if(Qn(I)&&!j.match(I)&&(v[c]={type:Pt.pattern,message:U,ref:o,...m(Pt.pattern,U)},!n))return k(U),v}if(S){if(bt(S)){const I=await S(j,r),U=ao(I,$);if(U&&(v[c]={...U,...m(Pt.validate,U.message)},!n))return k(U.message),v}else if(ze(S)){let I={};for(const U in S){if(!et(I)&&!n)break;const N=ao(await S[U](j,r),$,U);N&&(I={...N,...m(U,N.message)},k(N.message),n&&(v[c]=I))}if(!et(I)&&(v[c]={ref:$,...I},!n))return v}}return k(!0),v};const Bc={mode:vt.onSubmit,reValidateMode:vt.onChange,shouldFocusError:!0};function Nc(e={}){let t={...Bc,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:bt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=ze(t.defaultValues)||ze(t.values)?Le(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Le(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,p=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:Ga(),state:Ga()},x=t.criteriaMode===vt.all,S=y=>O=>{clearTimeout(p),p=setTimeout(y,O)},c=async y=>{if(!t.disabled&&(u.isValid||d.isValid||y)){const O=t.resolver?et((await _()).errors):await W(n,!0);O!==r.isValid&&f.state.next({isValid:O})}},b=(y,O)=>{!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((y||Array.from(s.mount)).forEach(T=>{T&&(O?Ce(r.validatingFields,T,O):Be(r.validatingFields,T))}),f.state.next({validatingFields:r.validatingFields,isValidating:!et(r.validatingFields)}))},g=(y,O=[],T,Y,F=!0,A=!0)=>{if(Y&&T&&!t.disabled){if(o.action=!0,A&&Array.isArray(G(n,y))){const R=T(G(n,y),Y.argA,Y.argB);F&&Ce(n,y,R)}if(A&&Array.isArray(G(r.errors,y))){const R=T(G(r.errors,y),Y.argA,Y.argB);F&&Ce(r.errors,y,R),zc(r.errors,y)}if((u.touchedFields||d.touchedFields)&&A&&Array.isArray(G(r.touchedFields,y))){const R=T(G(r.touchedFields,y),Y.argA,Y.argB);F&&Ce(r.touchedFields,y,R)}(u.dirtyFields||d.dirtyFields)&&(r.dirtyFields=nn(i,a)),f.state.next({name:y,isDirty:z(y,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ce(a,y,O)},j=(y,O)=>{Ce(r.errors,y,O),f.state.next({errors:r.errors})},$=y=>{r.errors=y,f.state.next({errors:r.errors,isValid:!1})},k=(y,O,T,Y)=>{const F=G(n,y);if(F){const A=G(a,y,Me(T)?G(i,y):T);Me(A)||Y&&Y.defaultChecked||O?Ce(a,y,O?A:eo(F._f)):N(y,A),o.mount&&c()}},v=(y,O,T,Y,F)=>{let A=!1,R=!1;const J={name:y};if(!t.disabled){if(!T||Y){(u.isDirty||d.isDirty)&&(R=r.isDirty,r.isDirty=J.isDirty=z(),A=R!==J.isDirty);const le=Ht(G(i,y),O);R=!!G(r.dirtyFields,y),le?Be(r.dirtyFields,y):Ce(r.dirtyFields,y,!0),J.dirtyFields=r.dirtyFields,A=A||(u.dirtyFields||d.dirtyFields)&&R!==!le}if(T){const le=G(r.touchedFields,y);le||(Ce(r.touchedFields,y,T),J.touchedFields=r.touchedFields,A=A||(u.touchedFields||d.touchedFields)&&le!==T)}A&&F&&f.state.next(J)}return A?J:{}},B=(y,O,T,Y)=>{const F=G(r.errors,y),A=(u.isValid||d.isValid)&&it(O)&&r.isValid!==O;if(t.delayError&&T?(l=S(()=>j(y,T)),l(t.delayError)):(clearTimeout(p),l=null,T?Ce(r.errors,y,T):Be(r.errors,y)),(T?!Ht(F,T):F)||!et(Y)||A){const R={...Y,...A&&it(O)?{isValid:O}:{},errors:r.errors,name:y};r={...r,...R},f.state.next(R)}},_=async y=>{b(y,!0);const O=await t.resolver(a,t.context,Rc(y||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(y),O},K=async y=>{const{errors:O}=await _(y);if(y)for(const T of y){const Y=G(O,T);Y?Ce(r.errors,T,Y):Be(r.errors,T)}else r.errors=O;return O},W=async(y,O,T={valid:!0})=>{for(const Y in y){const F=y[Y];if(F){const{_f:A,...R}=F;if(A){const J=s.array.has(A.name),le=F._f&&$c(F._f);le&&u.validatingFields&&b([Y],!0);const Oe=await oo(F,s.disabled,a,x,t.shouldUseNativeValidation&&!O,J);if(le&&u.validatingFields&&b([Y]),Oe[A.name]&&(T.valid=!1,O))break;!O&&(G(Oe,A.name)?J?Vc(r.errors,Oe,A.name):Ce(r.errors,A.name,Oe[A.name]):Be(r.errors,A.name))}!et(R)&&await W(R,O,T)}}return T.valid},m=()=>{for(const y of s.unMount){const O=G(n,y);O&&(O._f.refs?O._f.refs.every(T=>!wi(T)):!wi(O._f.ref))&&ne(y)}s.unMount=new Set},z=(y,O)=>!t.disabled&&(y&&O&&Ce(a,y,O),!Ht(V(),i)),I=(y,O,T)=>Us(y,s,{...o.mount?a:Me(O)?i:Rt(y)?{[y]:O}:O},T,O),U=y=>ba(G(o.mount?a:i,y,t.shouldUnregister?G(i,y,[]):[])),N=(y,O,T={})=>{const Y=G(n,y);let F=O;if(Y){const A=Y._f;A&&(!A.disabled&&Ce(a,y,Gs(O,A)),F=Hn(A.ref)&&Ye(O)?"":O,Hs(A.ref)?[...A.ref.options].forEach(R=>R.selected=F.includes(R.value)):A.refs?Sn(A.ref)?A.refs.forEach(R=>{(!R.defaultChecked||!R.disabled)&&(Array.isArray(F)?R.checked=!!F.find(J=>J===R.value):R.checked=F===R.value||!!F)}):A.refs.forEach(R=>R.checked=R.value===F):Ea(A.ref)?A.ref.value="":(A.ref.value=F,A.ref.type||f.state.next({name:y,values:Le(a)})))}(T.shouldDirty||T.shouldTouch)&&v(y,F,T.shouldTouch,T.shouldDirty,!0),T.shouldValidate&&oe(y)},X=(y,O,T)=>{for(const Y in O){if(!O.hasOwnProperty(Y))return;const F=O[Y],A=y+"."+Y,R=G(n,A);(s.array.has(y)||ze(F)||R&&!R._f)&&!dr(F)?X(A,F,T):N(A,F,T)}},ae=(y,O,T={})=>{const Y=G(n,y),F=s.array.has(y),A=Le(O);Ce(a,y,A),F?(f.array.next({name:y,values:Le(a)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&T.shouldDirty&&f.state.next({name:y,dirtyFields:nn(i,a),isDirty:z(y,A)})):Y&&!Y._f&&!Ye(A)?X(y,A,T):N(y,A,T),no(y,s)&&f.state.next({...r}),f.state.next({name:o.mount?y:void 0,values:Le(a)})},me=async y=>{o.mount=!0;const O=y.target;let T=O.name,Y=!0;const F=G(n,T),A=le=>{Y=Number.isNaN(le)||dr(le)&&isNaN(le.getTime())||Ht(le,G(a,T,le))},R=to(t.mode),J=to(t.reValidateMode);if(F){let le,Oe;const Ae=O.type?eo(F._f):Bs(y),We=y.type===Wn.BLUR||y.type===Wn.FOCUS_OUT,Ct=!Dc(F._f)&&!t.resolver&&!G(r.errors,T)&&!F._f.deps||Mc(We,G(r.touchedFields,T),r.isSubmitted,J,R),Dt=no(T,s,We);Ce(a,T,Ae),We?(F._f.onBlur&&F._f.onBlur(y),l&&l(0)):F._f.onChange&&F._f.onChange(y);const Et=v(T,Ae,We),ht=!et(Et)||Dt;if(!We&&f.state.next({name:T,type:y.type,values:Le(a)}),Ct)return(u.isValid||d.isValid)&&(t.mode==="onBlur"?We&&c():We||c()),ht&&f.state.next({name:T,...Dt?{}:Et});if(!We&&Dt&&f.state.next({...r}),t.resolver){const{errors:yt}=await _([T]);if(A(Ae),Y){const lr=io(r.errors,n,T),_r=io(yt,n,lr.name||T);le=_r.error,T=_r.name,Oe=et(yt)}}else b([T],!0),le=(await oo(F,s.disabled,a,x,t.shouldUseNativeValidation))[T],b([T]),A(Ae),Y&&(le?Oe=!1:(u.isValid||d.isValid)&&(Oe=await W(n,!0)));Y&&(F._f.deps&&oe(F._f.deps),B(T,Oe,le,Et))}},ie=(y,O)=>{if(G(r.errors,O)&&y.focus)return y.focus(),1},oe=async(y,O={})=>{let T,Y;const F=pn(y);if(t.resolver){const A=await K(Me(y)?y:F);T=et(A),Y=y?!F.some(R=>G(A,R)):T}else y?(Y=(await Promise.all(F.map(async A=>{const R=G(n,A);return await W(R&&R._f?{[A]:R}:R)}))).every(Boolean),!(!Y&&!r.isValid)&&c()):Y=T=await W(n);return f.state.next({...!Rt(y)||(u.isValid||d.isValid)&&T!==r.isValid?{}:{name:y},...t.resolver||!y?{isValid:T}:{},errors:r.errors}),O.shouldFocus&&!Y&&dn(n,ie,y?F:s.mount),Y},V=y=>{const O={...o.mount?a:i};return Me(y)?O:Rt(y)?G(O,y):y.map(T=>G(O,T))},H=(y,O)=>({invalid:!!G((O||r).errors,y),isDirty:!!G((O||r).dirtyFields,y),error:G((O||r).errors,y),isValidating:!!G(r.validatingFields,y),isTouched:!!G((O||r).touchedFields,y)}),pe=y=>{y&&pn(y).forEach(O=>Be(r.errors,O)),f.state.next({errors:y?r.errors:{}})},he=(y,O,T)=>{const Y=(G(n,y,{_f:{}})._f||{}).ref,F=G(r.errors,y)||{},{ref:A,message:R,type:J,...le}=F;Ce(r.errors,y,{...le,...O,ref:Y}),f.state.next({name:y,errors:r.errors,isValid:!1}),T&&T.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(y,O)=>bt(y)?f.state.subscribe({next:T=>y(I(void 0,O),T)}):I(y,O,!0),q=y=>f.state.subscribe({next:O=>{Ic(y.name,O.name,y.exact)&&Pc(O,y.formState||u,Ne,y.reRenderRoot)&&y.callback({values:{...a},...r,...O})}}).unsubscribe,Z=y=>(o.mount=!0,d={...d,...y.formState},q({...y,formState:d})),ne=(y,O={})=>{for(const T of y?pn(y):s.mount)s.mount.delete(T),s.array.delete(T),O.keepValue||(Be(n,T),Be(a,T)),!O.keepError&&Be(r.errors,T),!O.keepDirty&&Be(r.dirtyFields,T),!O.keepTouched&&Be(r.touchedFields,T),!O.keepIsValidating&&Be(r.validatingFields,T),!t.shouldUnregister&&!O.keepDefaultValue&&Be(i,T);f.state.next({values:Le(a)}),f.state.next({...r,...O.keepDirty?{isDirty:z()}:{}}),!O.keepIsValid&&c()},ce=({disabled:y,name:O})=>{(it(y)&&o.mount||y||s.disabled.has(O))&&(y?s.disabled.add(O):s.disabled.delete(O))},fe=(y,O={})=>{let T=G(n,y);const Y=it(O.disabled)||it(t.disabled);return Ce(n,y,{...T||{},_f:{...T&&T._f?T._f:{ref:{name:y}},name:y,mount:!0,...O}}),s.mount.add(y),T?ce({disabled:it(O.disabled)?O.disabled:t.disabled,name:y}):k(y,!0,O.value),{...Y?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:an(O.min),max:an(O.max),minLength:an(O.minLength),maxLength:an(O.maxLength),pattern:an(O.pattern)}:{},name:y,onChange:me,onBlur:me,ref:F=>{if(F){fe(y,O),T=G(n,y);const A=Me(F.value)&&F.querySelectorAll&&F.querySelectorAll("input,select,textarea")[0]||F,R=Fc(A),J=T._f.refs||[];if(R?J.find(le=>le===A):A===T._f.ref)return;Ce(n,y,{_f:{...T._f,...R?{refs:[...J.filter(wi),A,...Array.isArray(G(i,y))?[{}]:[]],ref:{type:A.type,name:y}}:{ref:A}}}),k(y,!1,void 0,A)}else T=G(n,y,{}),T._f&&(T._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(Ns(s.array,y)&&o.action)&&s.unMount.add(y)}}},de=()=>t.shouldFocusError&&dn(n,ie,s.mount),L=y=>{it(y)&&(f.state.next({disabled:y}),dn(n,(O,T)=>{const Y=G(n,T);Y&&(O.disabled=Y._f.disabled||y,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(F=>{F.disabled=Y._f.disabled||y}))},0,!1))},M=(y,O)=>async T=>{let Y;T&&(T.preventDefault&&T.preventDefault(),T.persist&&T.persist());let F=Le(a);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:A,values:R}=await _();r.errors=A,F=R}else await W(n);if(s.disabled.size)for(const A of s.disabled)Ce(F,A,void 0);if(Be(r.errors,"root"),et(r.errors)){f.state.next({errors:{}});try{await y(F,T)}catch(A){Y=A}}else O&&await O({...r.errors},T),de(),setTimeout(de);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},ee=(y,O={})=>{G(n,y)&&(Me(O.defaultValue)?ae(y,Le(G(i,y))):(ae(y,O.defaultValue),Ce(i,y,Le(O.defaultValue))),O.keepTouched||Be(r.touchedFields,y),O.keepDirty||(Be(r.dirtyFields,y),r.isDirty=O.defaultValue?z(y,Le(G(i,y))):z()),O.keepError||(Be(r.errors,y),u.isValid&&c()),f.state.next({...r}))},ye=(y,O={})=>{const T=y?Le(y):i,Y=Le(T),F=et(y),A=F?i:Y;if(O.keepDefaultValues||(i=T),!O.keepValues){if(O.keepDirtyValues){const R=new Set([...s.mount,...Object.keys(nn(i,a))]);for(const J of Array.from(R))G(r.dirtyFields,J)?Ce(A,J,G(a,J)):ae(J,G(A,J))}else{if(va&&Me(y))for(const R of s.mount){const J=G(n,R);if(J&&J._f){const le=Array.isArray(J._f.refs)?J._f.refs[0]:J._f.ref;if(Hn(le)){const Oe=le.closest("form");if(Oe){Oe.reset();break}}}}for(const R of s.mount)ae(R,G(A,R))}a=Le(A),f.array.next({values:{...A}}),f.state.next({values:{...A}})}s={mount:O.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!O.keepIsValid||!!O.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:F?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!Ht(y,i)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:F?{}:O.keepDirtyValues?O.keepDefaultValues&&a?nn(i,a):r.dirtyFields:O.keepDefaultValues&&y?nn(i,y):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},xe=(y,O)=>ye(bt(y)?y(a):y,O),Ue=(y,O={})=>{const T=G(n,y),Y=T&&T._f;if(Y){const F=Y.refs?Y.refs[0]:Y.ref;F.focus&&(F.focus(),O.shouldSelect&&bt(F.select)&&F.select())}},Ne=y=>{r={...r,...y}},ue={control:{register:fe,unregister:ne,getFieldState:H,handleSubmit:M,setError:he,_subscribe:q,_runSchema:_,_focusError:de,_getWatch:I,_getDirty:z,_setValid:c,_setFieldArray:g,_setDisabledField:ce,_setErrors:$,_getFieldArray:U,_reset:ye,_resetDefaultValues:()=>bt(t.defaultValues)&&t.defaultValues().then(y=>{xe(y,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:m,_disableForm:L,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(y){o=y},get _defaultValues(){return i},get _names(){return s},set _names(y){s=y},get _formState(){return r},get _options(){return t},set _options(y){t={...t,...y}}},subscribe:Z,trigger:oe,register:fe,handleSubmit:M,watch:se,setValue:ae,getValues:V,reset:xe,resetField:ee,clearErrors:pe,unregister:ne,setError:he,setFocus:Ue,getFieldState:H};return{...ue,formControl:ue}}function Lc(e={}){const t=D.useRef(void 0),r=D.useRef(void 0),[n,i]=D.useState({isDirty:!1,isValidating:!1,isLoading:bt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:bt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!bt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Nc(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,Ca(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),D.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),D.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),D.useEffect(()=>{e.values&&!Ht(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),D.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=qs(n,a),t.current}const so=(e,t,r)=>{if(e&&"reportValidity"in e){const n=G(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Xs=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?so(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>so(i,r,e))}},qc=(e,t)=>{t.shouldUseNativeValidation&&Xs(e,t);const r={};for(const n in e){const i=G(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Uc(t.names||Object.keys(e),n)){const o=Object.assign({},G(r,n));Ce(o,"root",a),Ce(r,n,o)}else Ce(r,n,a)}return r},Uc=(e,t)=>{const r=lo(t);return e.some(n=>lo(n).match(`^${r}\\.\\d+`))};function lo(e){return e.replace(/\]|\[/g,"")}function Wc(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var l=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(p){return a.shouldUseNativeValidation&&Xs({},a),{values:r.raw?Object.assign({},n):p,errors:{}}}))}catch(p){return s(p)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(!o.inner)throw o;return{values:{},errors:qc((s=o,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(p,u){if(p[u.path]||(p[u.path]={message:u.message,type:u.type}),l){var d=p[u.path].types,f=d&&d[u.type];p[u.path]=Ws(u.path,l,p,u.type,f?[].concat(f,u.message):u.message)}return p},{})),a)};var s,l}))}catch(o){return Promise.reject(o)}}}var Cn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Er=typeof window>"u"||"Deno"in globalThis;function tt(){}function Hc(e,t){return typeof e=="function"?e(t):e}function Vi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Js(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e=="function"?e(t):e}function pt(e,t){return typeof e=="function"?e(t):e}function co(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Ta(o,t.options))return!1}else if(!hn(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function uo(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(mn(t.options.mutationKey)!==mn(a))return!1}else if(!hn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ta(e,t){return((t==null?void 0:t.queryKeyHashFn)||mn)(e)}function mn(e){return JSON.stringify(e,(t,r)=>Li(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function hn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>hn(e[r],t[r])):!1}function Bi(e,t){if(e===t)return e;const r=po(e)&&po(t);if(r||Li(e)&&Li(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},l=new Set(n);let p=0;for(let u=0;u<o;u++){const d=r?u:a[u];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,p++):(s[d]=Bi(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&p++)}return i===o&&p===i?e:s}return t}function Ni(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function po(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Li(e){if(!fo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!fo(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kc(e){return new Promise(t=>{setTimeout(t,e)})}function qi(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Bi(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Bi(e,t)}return t}function Qc(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Yc(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Yn=Symbol();function el(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Yn&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gc(e,t){return typeof e=="function"?e(...t):!!e}var mr,Kt,Nr,As,Zc=(As=class extends Cn{constructor(){super();ge(this,mr);ge(this,Kt);ge(this,Nr);te(this,Nr,t=>{if(!Er&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,Kt)||this.setEventListener(E(this,Nr))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Kt))==null||t.call(this),te(this,Kt,void 0))}setEventListener(t){var r;te(this,Nr,t),(r=E(this,Kt))==null||r.call(this),te(this,Kt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){E(this,mr)!==t&&(te(this,mr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,mr)=="boolean"?E(this,mr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mr=new WeakMap,Kt=new WeakMap,Nr=new WeakMap,As),Oa=new Zc,Lr,Qt,qr,_s,Xc=(_s=class extends Cn{constructor(){super();ge(this,Lr,!0);ge(this,Qt);ge(this,qr);te(this,qr,t=>{if(!Er&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){E(this,Qt)||this.setEventListener(E(this,qr))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Qt))==null||t.call(this),te(this,Qt,void 0))}setEventListener(t){var r;te(this,qr,t),(r=E(this,Qt))==null||r.call(this),te(this,Qt,t(this.setOnline.bind(this)))}setOnline(t){E(this,Lr)!==t&&(te(this,Lr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return E(this,Lr)}},Lr=new WeakMap,Qt=new WeakMap,qr=new WeakMap,_s),Gn=new Xc;function Ui(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Jc(e){return Math.min(1e3*2**e,3e4)}function tl(e){return(e??"online")==="online"?Gn.isOnline():!0}var rl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Si(e){return e instanceof rl}function nl(e){let t=!1,r=0,n=!1,i;const a=Ui(),o=c=>{var b;n||(f(new rl(c)),(b=e.abort)==null||b.call(e))},s=()=>{t=!0},l=()=>{t=!1},p=()=>Oa.isFocused()&&(e.networkMode==="always"||Gn.isOnline())&&e.canRun(),u=()=>tl(e.networkMode)&&e.canRun(),d=c=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,c),i==null||i(),a.resolve(c))},f=c=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,c),i==null||i(),a.reject(c))},x=()=>new Promise(c=>{var b;i=g=>{(n||p())&&c(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var c;i=void 0,n||(c=e.onContinue)==null||c.call(e)}),S=()=>{if(n)return;let c;const b=r===0?e.initialPromise:void 0;try{c=b??e.fn()}catch(g){c=Promise.reject(g)}Promise.resolve(c).then(d).catch(g=>{var B;if(n)return;const j=e.retry??(Er?0:3),$=e.retryDelay??Jc,k=typeof $=="function"?$(r,g):$,v=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,g);if(t||!v){f(g);return}r++,(B=e.onFail)==null||B.call(e,r,g),Kc(k).then(()=>p()?void 0:x()).then(()=>{t?f(g):S()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?S():x().then(S),a)}}var eu=e=>setTimeout(e,0);function tu(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=eu;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var qe=tu(),hr,Rs,il=(Rs=class{constructor(){ge(this,hr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vi(this.gcTime)&&te(this,hr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Er?1/0:5*60*1e3))}clearGcTimeout(){E(this,hr)&&(clearTimeout(E(this,hr)),te(this,hr,void 0))}},hr=new WeakMap,Rs),Ur,yr,ut,gr,He,xn,xr,gt,Bt,$s,ru=($s=class extends il{constructor(t){super();ge(this,gt);ge(this,Ur);ge(this,yr);ge(this,ut);ge(this,gr);ge(this,He);ge(this,xn);ge(this,xr);te(this,xr,!1),te(this,xn,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,gr,t.client),te(this,ut,E(this,gr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,Ur,nu(this.options)),this.state=t.state??E(this,Ur),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,He))==null?void 0:t.promise}setOptions(t){this.options={...E(this,xn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,ut).remove(this)}setData(t,r){const n=qi(this.state.data,t,this.options);return ve(this,gt,Bt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,gt,Bt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=E(this,He))==null?void 0:n.promise;return(i=E(this,He))==null||i.cancel(t),r?r.then(tt).catch(tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,Ur))}isActive(){return this.observers.some(t=>pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Js(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,He))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,He))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,He)&&(E(this,xr)?E(this,He).cancel({revert:!0}):E(this,He).cancelRetry()),this.scheduleGc()),E(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,gt,Bt).call(this,{type:"invalidate"})}fetch(t,r){var p,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,He))return E(this,He).continueRetry(),E(this,He).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(x=>x.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(te(this,xr,!0),n.signal)})},a=()=>{const f=el(this.options,r),S=(()=>{const c={client:E(this,gr),queryKey:this.queryKey,meta:this.meta};return i(c),c})();return te(this,xr,!1),this.options.persister?this.options.persister(f,S,this):f(S)},s=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,gr),state:this.state,fetchFn:a};return i(f),f})();(p=this.options.behavior)==null||p.onFetch(s,this),te(this,yr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&ve(this,gt,Bt).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const l=f=>{var x,S,c,b;Si(f)&&f.silent||ve(this,gt,Bt).call(this,{type:"error",error:f}),Si(f)||((S=(x=E(this,ut).config).onError)==null||S.call(x,f,this),(b=(c=E(this,ut).config).onSettled)==null||b.call(c,this.state.data,f,this)),this.scheduleGc()};return te(this,He,nl({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var x,S,c,b;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(S=(x=E(this,ut).config).onSuccess)==null||S.call(x,f,this),(b=(c=E(this,ut).config).onSettled)==null||b.call(c,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,x)=>{ve(this,gt,Bt).call(this,{type:"failed",failureCount:f,error:x})},onPause:()=>{ve(this,gt,Bt).call(this,{type:"pause"})},onContinue:()=>{ve(this,gt,Bt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),E(this,He).start()}},Ur=new WeakMap,yr=new WeakMap,ut=new WeakMap,gr=new WeakMap,He=new WeakMap,xn=new WeakMap,xr=new WeakMap,gt=new WeakSet,Bt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...al(n.data,this.options),fetchMeta:t.meta??null};case"success":return te(this,yr,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Si(i)&&i.revert&&E(this,yr)?{...E(this,yr),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,ut).notify({query:this,type:"updated",action:t})})},$s);function al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jt,Ds,iu=(Ds=class extends Cn{constructor(t={}){super();ge(this,jt);this.config=t,te(this,jt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ta(i,r);let o=this.get(a);return o||(o=new ru({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){E(this,jt).has(t.queryHash)||(E(this,jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,jt).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,jt).get(t)}getAll(){return[...E(this,jt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>co(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>co(t,n)):r}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},jt=new WeakMap,Ds),Ft,Ke,vr,At,Ut,Ps,au=(Ps=class extends il{constructor(t){super();ge(this,At);ge(this,Ft);ge(this,Ke);ge(this,vr);this.mutationId=t.mutationId,te(this,Ke,t.mutationCache),te(this,Ft,[]),this.state=t.state||ou(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Ft).includes(t)||(E(this,Ft).push(t),this.clearGcTimeout(),E(this,Ke).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,Ft,E(this,Ft).filter(r=>r!==t)),this.scheduleGc(),E(this,Ke).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Ft).length||(this.state.status==="pending"?this.scheduleGc():E(this,Ke).remove(this))}continue(){var t;return((t=E(this,vr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,p,u,d,f,x,S,c,b,g,j,$,k,v,B,_,K;const r=()=>{ve(this,At,Ut).call(this,{type:"continue"})};te(this,vr,nl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(W,m)=>{ve(this,At,Ut).call(this,{type:"failed",failureCount:W,error:m})},onPause:()=>{ve(this,At,Ut).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Ke).canRun(this)}));const n=this.state.status==="pending",i=!E(this,vr).canStart();try{if(n)r();else{ve(this,At,Ut).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=E(this,Ke).config).onMutate)==null?void 0:o.call(a,t,this));const m=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));m!==this.state.context&&ve(this,At,Ut).call(this,{type:"pending",context:m,variables:t,isPaused:i})}const W=await E(this,vr).start();return await((u=(p=E(this,Ke).config).onSuccess)==null?void 0:u.call(p,W,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,W,t,this.state.context)),await((S=(x=E(this,Ke).config).onSettled)==null?void 0:S.call(x,W,null,this.state.variables,this.state.context,this)),await((b=(c=this.options).onSettled)==null?void 0:b.call(c,W,null,t,this.state.context)),ve(this,At,Ut).call(this,{type:"success",data:W}),W}catch(W){try{throw await((j=(g=E(this,Ke).config).onError)==null?void 0:j.call(g,W,t,this.state.context,this)),await((k=($=this.options).onError)==null?void 0:k.call($,W,t,this.state.context)),await((B=(v=E(this,Ke).config).onSettled)==null?void 0:B.call(v,void 0,W,this.state.variables,this.state.context,this)),await((K=(_=this.options).onSettled)==null?void 0:K.call(_,void 0,W,t,this.state.context)),W}finally{ve(this,At,Ut).call(this,{type:"error",error:W})}}finally{E(this,Ke).runNext(this)}}},Ft=new WeakMap,Ke=new WeakMap,vr=new WeakMap,At=new WeakSet,Ut=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qe.batch(()=>{E(this,Ft).forEach(n=>{n.onMutationUpdate(t)}),E(this,Ke).notify({mutation:this,type:"updated",action:t})})},Ps);function ou(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Nt,xt,vn,Is,su=(Is=class extends Cn{constructor(t={}){super();ge(this,Nt);ge(this,xt);ge(this,vn);this.config=t,te(this,Nt,new Set),te(this,xt,new Map),te(this,vn,0)}build(t,r,n){const i=new au({mutationCache:this,mutationId:++jn(this,vn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){E(this,Nt).add(t);const r=Fn(t);if(typeof r=="string"){const n=E(this,xt).get(r);n?n.push(t):E(this,xt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,Nt).delete(t)){const r=Fn(t);if(typeof r=="string"){const n=E(this,xt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&E(this,xt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Fn(t);if(typeof r=="string"){const n=E(this,xt).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Fn(t);if(typeof r=="string"){const i=(n=E(this,xt).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qe.batch(()=>{E(this,Nt).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,Nt).clear(),E(this,xt).clear()})}getAll(){return Array.from(E(this,Nt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>uo(r,n))}findAll(t={}){return this.getAll().filter(r=>uo(t,r))}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(tt))))}},Nt=new WeakMap,xt=new WeakMap,vn=new WeakMap,Is);function Fn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function mo(e){return{onFetch:(t,r)=>{var u,d,f,x,S;const n=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],o=((S=t.state.data)==null?void 0:S.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const p=async()=>{let c=!1;const b=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},g=el(t.options,t.fetchOptions),j=async($,k,v)=>{if(c)return Promise.reject();if(k==null&&$.pages.length)return Promise.resolve($);const _=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:k,direction:v?"backward":"forward",meta:t.options.meta};return b(z),z})(),K=await g(_),{maxPages:W}=t.options,m=v?Yc:Qc;return{pages:m($.pages,K,W),pageParams:m($.pageParams,k,W)}};if(i&&a.length){const $=i==="backward",k=$?lu:ho,v={pages:a,pageParams:o},B=k(n,v);s=await j(v,B,$)}else{const $=e??a.length;do{const k=l===0?o[0]??n.initialPageParam:ho(n,s);if(l>0&&k==null)break;s=await j(s,k),l++}while(l<$)}return s};t.options.persister?t.fetchFn=()=>{var c,b;return(b=(c=t.options).persister)==null?void 0:b.call(c,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function ho(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function lu(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ie,Yt,Gt,Wr,Hr,Zt,Kr,Qr,Ms,cu=(Ms=class{constructor(e={}){ge(this,Ie);ge(this,Yt);ge(this,Gt);ge(this,Wr);ge(this,Hr);ge(this,Zt);ge(this,Kr);ge(this,Qr);te(this,Ie,e.queryCache||new iu),te(this,Yt,e.mutationCache||new su),te(this,Gt,e.defaultOptions||{}),te(this,Wr,new Map),te(this,Hr,new Map),te(this,Zt,0)}mount(){jn(this,Zt)._++,E(this,Zt)===1&&(te(this,Kr,Oa.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ie).onFocus())})),te(this,Qr,Gn.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ie).onOnline())})))}unmount(){var e,t;jn(this,Zt)._--,E(this,Zt)===0&&((e=E(this,Kr))==null||e.call(this),te(this,Kr,void 0),(t=E(this,Qr))==null||t.call(this),te(this,Qr,void 0))}isFetching(e){return E(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Yt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ie).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Ie).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(rr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return E(this,Ie).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=E(this,Ie).get(n.queryHash),a=i==null?void 0:i.state.data,o=Hc(t,a);if(o!==void 0)return E(this,Ie).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return qe.batch(()=>E(this,Ie).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ie).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Ie);qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Ie);return qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qe.batch(()=>E(this,Ie).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(tt).catch(tt)}invalidateQueries(e,t={}){return qe.batch(()=>(E(this,Ie).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=qe.batch(()=>E(this,Ie).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(tt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(tt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Ie).build(this,t);return r.isStaleByTime(rr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(tt).catch(tt)}fetchInfiniteQuery(e){return e.behavior=mo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(tt).catch(tt)}ensureInfiniteQueryData(e){return e.behavior=mo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gn.isOnline()?E(this,Yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ie)}getMutationCache(){return E(this,Yt)}getDefaultOptions(){return E(this,Gt)}setDefaultOptions(e){te(this,Gt,e)}setQueryDefaults(e,t){E(this,Wr).set(mn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Wr).values()],r={};return t.forEach(n=>{hn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){E(this,Hr).set(mn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Hr).values()],r={};return t.forEach(n=>{hn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Gt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ta(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Yn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Gt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ie).clear(),E(this,Yt).clear()}},Ie=new WeakMap,Yt=new WeakMap,Gt=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,Zt=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,Ms),Je,be,bn,Qe,br,Yr,Xt,Jt,wn,Gr,Zr,wr,Sr,er,Xr,Ee,sn,Wi,Hi,Ki,Qi,Yi,Gi,Zi,ol,zs,uu=(zs=class extends Cn{constructor(t,r){super();ge(this,Ee);ge(this,Je);ge(this,be);ge(this,bn);ge(this,Qe);ge(this,br);ge(this,Yr);ge(this,Xt);ge(this,Jt);ge(this,wn);ge(this,Gr);ge(this,Zr);ge(this,wr);ge(this,Sr);ge(this,er);ge(this,Xr,new Set);this.options=r,te(this,Je,t),te(this,Jt,null),te(this,Xt,Ui()),this.options.experimental_prefetchInRender||E(this,Xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,be).addObserver(this),yo(E(this,be),this.options)?ve(this,Ee,sn).call(this):this.updateResult(),ve(this,Ee,Qi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xi(E(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xi(E(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Ee,Yi).call(this),ve(this,Ee,Gi).call(this),E(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=E(this,be);if(this.options=E(this,Je).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pt(this.options.enabled,E(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Ee,Zi).call(this),E(this,be).setOptions(this.options),r._defaulted&&!Ni(this.options,r)&&E(this,Je).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,be),observer:this});const i=this.hasListeners();i&&go(E(this,be),n,this.options,r)&&ve(this,Ee,sn).call(this),this.updateResult(),i&&(E(this,be)!==n||pt(this.options.enabled,E(this,be))!==pt(r.enabled,E(this,be))||rr(this.options.staleTime,E(this,be))!==rr(r.staleTime,E(this,be)))&&ve(this,Ee,Wi).call(this);const a=ve(this,Ee,Hi).call(this);i&&(E(this,be)!==n||pt(this.options.enabled,E(this,be))!==pt(r.enabled,E(this,be))||a!==E(this,er))&&ve(this,Ee,Ki).call(this,a)}getOptimisticResult(t){const r=E(this,Je).getQueryCache().build(E(this,Je),t),n=this.createResult(r,t);return du(this,n)&&(te(this,Qe,n),te(this,Yr,this.options),te(this,br,E(this,be).state)),n}getCurrentResult(){return E(this,Qe)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){E(this,Xr).add(t)}getCurrentQuery(){return E(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,Je).defaultQueryOptions(t),n=E(this,Je).getQueryCache().build(E(this,Je),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,Ee,sn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Qe)))}createResult(t,r){var W;const n=E(this,be),i=this.options,a=E(this,Qe),o=E(this,br),s=E(this,Yr),p=t!==n?t.state:E(this,bn),{state:u}=t;let d={...u},f=!1,x;if(r._optimisticResults){const m=this.hasListeners(),z=!m&&yo(t,r),I=m&&go(t,n,r,i);(z||I)&&(d={...d,...al(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:S,errorUpdatedAt:c,status:b}=d;x=d.data;let g=!1;if(r.placeholderData!==void 0&&x===void 0&&b==="pending"){let m;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(m=a.data,g=!0):m=typeof r.placeholderData=="function"?r.placeholderData((W=E(this,Zr))==null?void 0:W.state.data,E(this,Zr)):r.placeholderData,m!==void 0&&(b="success",x=qi(a==null?void 0:a.data,m,r),f=!0)}if(r.select&&x!==void 0&&!g)if(a&&x===(o==null?void 0:o.data)&&r.select===E(this,wn))x=E(this,Gr);else try{te(this,wn,r.select),x=r.select(x),x=qi(a==null?void 0:a.data,x,r),te(this,Gr,x),te(this,Jt,null)}catch(m){te(this,Jt,m)}E(this,Jt)&&(S=E(this,Jt),x=E(this,Gr),c=Date.now(),b="error");const j=d.fetchStatus==="fetching",$=b==="pending",k=b==="error",v=$&&j,B=x!==void 0,K={status:b,fetchStatus:d.fetchStatus,isPending:$,isSuccess:b==="success",isError:k,isInitialLoading:v,isLoading:v,data:x,dataUpdatedAt:d.dataUpdatedAt,error:S,errorUpdatedAt:c,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!$,isLoadingError:k&&!B,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:k&&B,isStale:ja(t,r),refetch:this.refetch,promise:E(this,Xt),isEnabled:pt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const m=U=>{K.status==="error"?U.reject(K.error):K.data!==void 0&&U.resolve(K.data)},z=()=>{const U=te(this,Xt,K.promise=Ui());m(U)},I=E(this,Xt);switch(I.status){case"pending":t.queryHash===n.queryHash&&m(I);break;case"fulfilled":(K.status==="error"||K.data!==I.value)&&z();break;case"rejected":(K.status!=="error"||K.error!==I.reason)&&z();break}}return K}updateResult(){const t=E(this,Qe),r=this.createResult(E(this,be),this.options);if(te(this,br,E(this,be).state),te(this,Yr,this.options),E(this,br).data!==void 0&&te(this,Zr,E(this,be)),Ni(r,t))return;te(this,Qe,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!E(this,Xr).size)return!0;const o=new Set(a??E(this,Xr));return this.options.throwOnError&&o.add("error"),Object.keys(E(this,Qe)).some(s=>{const l=s;return E(this,Qe)[l]!==t[l]&&o.has(l)})};ve(this,Ee,ol).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Ee,Qi).call(this)}},Je=new WeakMap,be=new WeakMap,bn=new WeakMap,Qe=new WeakMap,br=new WeakMap,Yr=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,wn=new WeakMap,Gr=new WeakMap,Zr=new WeakMap,wr=new WeakMap,Sr=new WeakMap,er=new WeakMap,Xr=new WeakMap,Ee=new WeakSet,sn=function(t){ve(this,Ee,Zi).call(this);let r=E(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(tt)),r},Wi=function(){ve(this,Ee,Yi).call(this);const t=rr(this.options.staleTime,E(this,be));if(Er||E(this,Qe).isStale||!Vi(t))return;const n=Js(E(this,Qe).dataUpdatedAt,t)+1;te(this,wr,setTimeout(()=>{E(this,Qe).isStale||this.updateResult()},n))},Hi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,be)):this.options.refetchInterval)??!1},Ki=function(t){ve(this,Ee,Gi).call(this),te(this,er,t),!(Er||pt(this.options.enabled,E(this,be))===!1||!Vi(E(this,er))||E(this,er)===0)&&te(this,Sr,setInterval(()=>{(this.options.refetchIntervalInBackground||Oa.isFocused())&&ve(this,Ee,sn).call(this)},E(this,er)))},Qi=function(){ve(this,Ee,Wi).call(this),ve(this,Ee,Ki).call(this,ve(this,Ee,Hi).call(this))},Yi=function(){E(this,wr)&&(clearTimeout(E(this,wr)),te(this,wr,void 0))},Gi=function(){E(this,Sr)&&(clearInterval(E(this,Sr)),te(this,Sr,void 0))},Zi=function(){const t=E(this,Je).getQueryCache().build(E(this,Je),this.options);if(t===E(this,be))return;const r=E(this,be);te(this,be,t),te(this,bn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ol=function(t){qe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,Qe))}),E(this,Je).getQueryCache().notify({query:E(this,be),type:"observerResultsUpdated"})})},zs);function pu(e,t){return pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yo(e,t){return pu(e,t)||e.state.data!==void 0&&Xi(e,t,t.refetchOnMount)}function Xi(e,t,r){if(pt(t.enabled,e)!==!1&&rr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ja(e,t)}return!1}function go(e,t,r,n){return(e!==t||pt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ja(e,r)}function ja(e,t){return pt(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function du(e,t){return!Ni(e.getCurrentResult(),t)}var sl=re.createContext(void 0),fu=e=>{const t=re.useContext(sl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mu=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(sl.Provider,{value:e,children:t})),ll=re.createContext(!1),hu=()=>re.useContext(ll);ll.Provider;function yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gu=re.createContext(yu()),xu=()=>re.useContext(gu),vu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},bu=e=>{re.useEffect(()=>{e.clearReset()},[e])},wu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Gc(r,[e.error,n])),Su=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Cu=(e,t)=>e.isLoading&&e.isFetching&&!t,Eu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xo=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ku(e,t,r){var d,f,x,S,c;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=hu(),i=xu(),a=fu(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",Su(o),vu(o,i),bu(i);const s=!a.getQueryCache().get(o.queryHash),[l]=re.useState(()=>new t(a,o)),p=l.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(re.useSyncExternalStore(re.useCallback(b=>{const g=u?l.subscribe(qe.batchCalls(b)):tt;return l.updateResult(),g},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),re.useEffect(()=>{l.setOptions(o)},[o,l]),Eu(o,p))throw xo(o,l,i);if(wu({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw p.error;if((S=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||S.call(x,o,p),o.experimental_prefetchInRender&&!Er&&Cu(p,n)){const b=s?xo(o,l,i):(c=a.getQueryCache().get(o.queryHash))==null?void 0:c.promise;b==null||b.catch(tt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?p:l.trackResult(p)}function Tu(e,t){return ku(e,uu)}function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var An={exports:{}},_n={exports:{}},we={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var vo;function Ou(){if(vo)return we;vo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function $(v){if(typeof v=="object"&&v!==null){var B=v.$$typeof;switch(B){case t:switch(v=v.type,v){case l:case p:case n:case a:case i:case d:return v;default:switch(v=v&&v.$$typeof,v){case s:case u:case S:case x:case o:return v;default:return B}}case r:return B}}}function k(v){return $(v)===p}return we.AsyncMode=l,we.ConcurrentMode=p,we.ContextConsumer=s,we.ContextProvider=o,we.Element=t,we.ForwardRef=u,we.Fragment=n,we.Lazy=S,we.Memo=x,we.Portal=r,we.Profiler=a,we.StrictMode=i,we.Suspense=d,we.isAsyncMode=function(v){return k(v)||$(v)===l},we.isConcurrentMode=k,we.isContextConsumer=function(v){return $(v)===s},we.isContextProvider=function(v){return $(v)===o},we.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},we.isForwardRef=function(v){return $(v)===u},we.isFragment=function(v){return $(v)===n},we.isLazy=function(v){return $(v)===S},we.isMemo=function(v){return $(v)===x},we.isPortal=function(v){return $(v)===r},we.isProfiler=function(v){return $(v)===a},we.isStrictMode=function(v){return $(v)===i},we.isSuspense=function(v){return $(v)===d},we.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===p||v===a||v===i||v===d||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===S||v.$$typeof===x||v.$$typeof===o||v.$$typeof===s||v.$$typeof===u||v.$$typeof===b||v.$$typeof===g||v.$$typeof===j||v.$$typeof===c)},we.typeOf=$,we}var Se={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var bo;function ju(){return bo||(bo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function $(M){return typeof M=="string"||typeof M=="function"||M===n||M===p||M===a||M===i||M===d||M===f||typeof M=="object"&&M!==null&&(M.$$typeof===S||M.$$typeof===x||M.$$typeof===o||M.$$typeof===s||M.$$typeof===u||M.$$typeof===b||M.$$typeof===g||M.$$typeof===j||M.$$typeof===c)}function k(M){if(typeof M=="object"&&M!==null){var ee=M.$$typeof;switch(ee){case t:var ye=M.type;switch(ye){case l:case p:case n:case a:case i:case d:return ye;default:var xe=ye&&ye.$$typeof;switch(xe){case s:case u:case S:case x:case o:return xe;default:return ee}}case r:return ee}}}var v=l,B=p,_=s,K=o,W=t,m=u,z=n,I=S,U=x,N=r,X=a,ae=i,me=d,ie=!1;function oe(M){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(M)||k(M)===l}function V(M){return k(M)===p}function H(M){return k(M)===s}function pe(M){return k(M)===o}function he(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function se(M){return k(M)===u}function q(M){return k(M)===n}function Z(M){return k(M)===S}function ne(M){return k(M)===x}function ce(M){return k(M)===r}function fe(M){return k(M)===a}function de(M){return k(M)===i}function L(M){return k(M)===d}Se.AsyncMode=v,Se.ConcurrentMode=B,Se.ContextConsumer=_,Se.ContextProvider=K,Se.Element=W,Se.ForwardRef=m,Se.Fragment=z,Se.Lazy=I,Se.Memo=U,Se.Portal=N,Se.Profiler=X,Se.StrictMode=ae,Se.Suspense=me,Se.isAsyncMode=oe,Se.isConcurrentMode=V,Se.isContextConsumer=H,Se.isContextProvider=pe,Se.isElement=he,Se.isForwardRef=se,Se.isFragment=q,Se.isLazy=Z,Se.isMemo=ne,Se.isPortal=ce,Se.isProfiler=fe,Se.isStrictMode=de,Se.isSuspense=L,Se.isValidElementType=$,Se.typeOf=k}()),Se}var wo;function cl(){return wo||(wo=1,process.env.NODE_ENV==="production"?_n.exports=Ou():_n.exports=ju()),_n.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var Ci,
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var M=L(ne,de,se,q,Z+"."+de,r);if(M)return M}return null}return b(H)}function N(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(N);if(V===null||s(V))return!0;var H=d(V);if(H){var
|
|
19
|
+
*/var Ci,So;function Fu(){if(So)return Ci;So=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(u){p[u]=u}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ci=i()?Object.assign:function(a,o){for(var s,l=n(a),p,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){p=e(s);for(var f=0;f<p.length;f++)r.call(s,p[f])&&(l[p[f]]=s[p[f]])}}return l},Ci}var Ei,Co;function Aa(){if(Co)return Ei;Co=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ei=e,Ei}var ki,Eo;function ul(){return Eo||(Eo=1,ki=Function.call.bind(Object.prototype.hasOwnProperty)),ki}var Ti,ko;function Au(){if(ko)return Ti;ko=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Aa(),r={},n=ul();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,p){if(process.env.NODE_ENV!=="production"){for(var u in a)if(n(a,u)){var d;try{if(typeof a[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[u](o,u,l,s,null,t)}catch(S){d=S}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var x=p?p():"";e("Failed "+s+" type: "+d.message+(x??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ti=i,Ti}var Oi,To;function _u(){if(To)return Oi;To=1;var e=cl(),t=Fu(),r=Aa(),n=ul(),i=Au(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Oi=function(s,l){var p=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(V){var H=V&&(p&&V[p]||V[u]);if(typeof H=="function")return H}var f="<<anonymous>>",x={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:j(),arrayOf:$,element:k(),elementType:v(),instanceOf:B,node:m(),objectOf:K,oneOf:_,oneOfType:W,shape:I,exact:U};function S(V,H){return V===H?V!==0||1/V===1/H:V!==V&&H!==H}function c(V,H){this.message=V,this.data=H&&typeof H=="object"?H:{},this.stack=""}c.prototype=Error.prototype;function b(V){if(process.env.NODE_ENV!=="production")var H={},pe=0;function he(q,Z,ne,ce,fe,de,L){if(ce=ce||f,de=de||ne,L!==r){if(l){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ee=ce+":"+ne;!H[ee]&&pe<3&&(a("You are manually calling a React.PropTypes validation function for the `"+de+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),H[ee]=!0,pe++)}}return Z[ne]==null?q?Z[ne]===null?new c("The "+fe+" `"+de+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new c("The "+fe+" `"+de+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:V(Z,ne,ce,fe,de)}var se=he.bind(null,!1);return se.isRequired=he.bind(null,!0),se}function g(V){function H(pe,he,se,q,Z,ne){var ce=pe[he],fe=ae(ce);if(fe!==V){var de=me(ce);return new c("Invalid "+q+" `"+Z+"` of type "+("`"+de+"` supplied to `"+se+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return b(H)}function j(){return b(o)}function $(V){function H(pe,he,se,q,Z){if(typeof V!="function")return new c("Property `"+Z+"` of component `"+se+"` has invalid PropType notation inside arrayOf.");var ne=pe[he];if(!Array.isArray(ne)){var ce=ae(ne);return new c("Invalid "+q+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+se+"`, expected an array."))}for(var fe=0;fe<ne.length;fe++){var de=V(ne,fe,se,q,Z+"["+fe+"]",r);if(de instanceof Error)return de}return null}return b(H)}function k(){function V(H,pe,he,se,q){var Z=H[pe];if(!s(Z)){var ne=ae(Z);return new c("Invalid "+se+" `"+q+"` of type "+("`"+ne+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return b(V)}function v(){function V(H,pe,he,se,q){var Z=H[pe];if(!e.isValidElementType(Z)){var ne=ae(Z);return new c("Invalid "+se+" `"+q+"` of type "+("`"+ne+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return b(V)}function B(V){function H(pe,he,se,q,Z){if(!(pe[he]instanceof V)){var ne=V.name||f,ce=oe(pe[he]);return new c("Invalid "+q+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+se+"`, expected ")+("instance of `"+ne+"`."))}return null}return b(H)}function _(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function H(pe,he,se,q,Z){for(var ne=pe[he],ce=0;ce<V.length;ce++)if(S(ne,V[ce]))return null;var fe=JSON.stringify(V,function(L,M){var ee=me(M);return ee==="symbol"?String(M):M});return new c("Invalid "+q+" `"+Z+"` of value `"+String(ne)+"` "+("supplied to `"+se+"`, expected one of "+fe+"."))}return b(H)}function K(V){function H(pe,he,se,q,Z){if(typeof V!="function")return new c("Property `"+Z+"` of component `"+se+"` has invalid PropType notation inside objectOf.");var ne=pe[he],ce=ae(ne);if(ce!=="object")return new c("Invalid "+q+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+se+"`, expected an object."));for(var fe in ne)if(n(ne,fe)){var de=V(ne,fe,se,q,Z+"."+fe,r);if(de instanceof Error)return de}return null}return b(H)}function W(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var H=0;H<V.length;H++){var pe=V[H];if(typeof pe!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(pe)+" at index "+H+"."),o}function he(se,q,Z,ne,ce){for(var fe=[],de=0;de<V.length;de++){var L=V[de],M=L(se,q,Z,ne,ce,r);if(M==null)return null;M.data&&n(M.data,"expectedType")&&fe.push(M.data.expectedType)}var ee=fe.length>0?", expected one of type ["+fe.join(", ")+"]":"";return new c("Invalid "+ne+" `"+ce+"` supplied to "+("`"+Z+"`"+ee+"."))}return b(he)}function m(){function V(H,pe,he,se,q){return N(H[pe])?null:new c("Invalid "+se+" `"+q+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return b(V)}function z(V,H,pe,he,se){return new c((V||"React class")+": "+H+" type `"+pe+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+se+"`.")}function I(V){function H(pe,he,se,q,Z){var ne=pe[he],ce=ae(ne);if(ce!=="object")return new c("Invalid "+q+" `"+Z+"` of type `"+ce+"` "+("supplied to `"+se+"`, expected `object`."));for(var fe in V){var de=V[fe];if(typeof de!="function")return z(se,q,Z,fe,me(de));var L=de(ne,fe,se,q,Z+"."+fe,r);if(L)return L}return null}return b(H)}function U(V){function H(pe,he,se,q,Z){var ne=pe[he],ce=ae(ne);if(ce!=="object")return new c("Invalid "+q+" `"+Z+"` of type `"+ce+"` "+("supplied to `"+se+"`, expected `object`."));var fe=t({},pe[he],V);for(var de in fe){var L=V[de];if(n(V,de)&&typeof L!="function")return z(se,q,Z,de,me(L));if(!L)return new c("Invalid "+q+" `"+Z+"` key `"+de+"` supplied to `"+se+"`.\nBad object: "+JSON.stringify(pe[he],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var M=L(ne,de,se,q,Z+"."+de,r);if(M)return M}return null}return b(H)}function N(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(N);if(V===null||s(V))return!0;var H=d(V);if(H){var pe=H.call(V),he;if(H!==V.entries){for(;!(he=pe.next()).done;)if(!N(he.value))return!1}else for(;!(he=pe.next()).done;){var se=he.value;if(se&&!N(se[1]))return!1}}else return!1;return!0;default:return!1}}function X(V,H){return V==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function ae(V){var H=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":X(H,V)?"symbol":H}function me(V){if(typeof V>"u"||V===null)return""+V;var H=ae(V);if(H==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return H}function ie(V){var H=me(V);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function oe(V){return!V.constructor||!V.constructor.name?f:V.constructor.name}return x.checkPropTypes=i,x.resetWarningCache=i.resetWarningCache,x.PropTypes=x,x},Oi}var ji,Oo;function Ru(){if(Oo)return ji;Oo=1;var e=Aa();function t(){}function r(){}return r.resetWarningCache=t,ji=function(){function n(o,s,l,p,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},ji}var jo;function $u(){if(jo)return An.exports;if(jo=1,process.env.NODE_ENV!=="production"){var e=cl(),t=!0;An.exports=_u()(e.isElement,t)}else An.exports=Ru()();return An.exports}var Du=$u();const w=Fa(Du);function pl(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=pl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ge(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=pl(e))&&(n&&(n+=" "),n+=t);return n}function tn(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let o="",s=!0;for(let l=0;l<a.length;l+=1){const p=a[l];p&&(o+=(s===!0?"":" ")+t(p),s=!1,r&&r[p]&&(o+=" "+r[p]))}n[i]=o}return n}function ir(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function $e(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ir(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Rn={exports:{}},ke={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-is.production.js
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(V),null," "));var M=L(ne,de,se,q,Z+"."
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var
|
|
28
|
+
*/var Fo;function Pu(){if(Fo)return ke;Fo=1;var e=Symbol.for("react.transitional.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.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function S(c){if(typeof c=="object"&&c!==null){var b=c.$$typeof;switch(b){case e:switch(c=c.type,c){case r:case i:case n:case l:case p:case f:return c;default:switch(c=c&&c.$$typeof,c){case o:case s:case d:case u:return c;case a:return c;default:return b}}case t:return b}}}return ke.ContextConsumer=a,ke.ContextProvider=o,ke.Element=e,ke.ForwardRef=s,ke.Fragment=r,ke.Lazy=d,ke.Memo=u,ke.Portal=t,ke.Profiler=i,ke.StrictMode=n,ke.Suspense=l,ke.SuspenseList=p,ke.isContextConsumer=function(c){return S(c)===a},ke.isContextProvider=function(c){return S(c)===o},ke.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},ke.isForwardRef=function(c){return S(c)===s},ke.isFragment=function(c){return S(c)===r},ke.isLazy=function(c){return S(c)===d},ke.isMemo=function(c){return S(c)===u},ke.isPortal=function(c){return S(c)===t},ke.isProfiler=function(c){return S(c)===i},ke.isStrictMode=function(c){return S(c)===n},ke.isSuspense=function(c){return S(c)===l},ke.isSuspenseList=function(c){return S(c)===p},ke.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===i||c===n||c===l||c===p||typeof c=="object"&&c!==null&&(c.$$typeof===d||c.$$typeof===u||c.$$typeof===o||c.$$typeof===a||c.$$typeof===s||c.$$typeof===x||c.getModuleId!==void 0)},ke.typeOf=S,ke}var Te={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
@@ -33,21 +33,21 @@ Valid keys: `+JSON.stringify(Object.keys(V),null," "));var M=L(ne,de,se,q,Z+"."
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
37
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ir(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function Nu(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const ui={xs:0,sm:600,md:900,lg:1200,xl:1536},
|
|
36
|
+
*/var Ao;function Iu(){return Ao||(Ao=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var b=c.$$typeof;switch(b){case t:switch(c=c.type,c){case n:case a:case i:case p:case u:case x:return c;default:switch(c=c&&c.$$typeof,c){case s:case l:case f:case d:return c;case o:return c;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),x=Symbol.for("react.view_transition"),S=Symbol.for("react.client.reference");Te.ContextConsumer=o,Te.ContextProvider=s,Te.Element=t,Te.ForwardRef=l,Te.Fragment=n,Te.Lazy=f,Te.Memo=d,Te.Portal=r,Te.Profiler=a,Te.StrictMode=i,Te.Suspense=p,Te.SuspenseList=u,Te.isContextConsumer=function(c){return e(c)===o},Te.isContextProvider=function(c){return e(c)===s},Te.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},Te.isForwardRef=function(c){return e(c)===l},Te.isFragment=function(c){return e(c)===n},Te.isLazy=function(c){return e(c)===f},Te.isMemo=function(c){return e(c)===d},Te.isPortal=function(c){return e(c)===r},Te.isProfiler=function(c){return e(c)===a},Te.isStrictMode=function(c){return e(c)===i},Te.isSuspense=function(c){return e(c)===p},Te.isSuspenseList=function(c){return e(c)===u},Te.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===n||c===a||c===i||c===p||c===u||typeof c=="object"&&c!==null&&(c.$$typeof===f||c.$$typeof===d||c.$$typeof===s||c.$$typeof===o||c.$$typeof===l||c.$$typeof===S||c.getModuleId!==void 0)},Te.typeOf=e}()),Te}var _o;function Mu(){return _o||(_o=1,process.env.NODE_ENV==="production"?Rn.exports=Pu():Rn.exports=Iu()),Rn.exports}var Zn=Mu();function _t(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dl(e){if(re.isValidElement(e)||Zn.isValidElementType(e)||!_t(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=dl(e[r])}),t}function ot(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return _t(e)&&_t(t)&&Object.keys(t).forEach(i=>{re.isValidElement(t[i])||Zn.isValidElementType(t[i])?n[i]=t[i]:_t(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&_t(e[i])?n[i]=ot(e[i],t[i],r):r.clone?n[i]=_t(t[i])?dl(t[i]):t[i]:n[i]=t[i]}),n}function fn(e,t){return t?ot(e,t,{clone:!1}):e}const or=process.env.NODE_ENV!=="production"?w.oneOfType([w.number,w.string,w.object,w.array]):{};function zu(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var o,s;const a=/min-width:\s*([0-9.]+)/;return+(((o=n.match(a))==null?void 0:o[1])||0)-+(((s=i.match(a))==null?void 0:s[1])||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function Vu(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Bu(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
37
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ir(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function Nu(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const ui={xs:0,sm:600,md:900,lg:1200,xl:1536},Ro={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ui[e]}px)`},Lu={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:ui[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Lt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||Ro;return t.reduce((o,s,l)=>(o[a.up(a.keys[l])]=r(t[l]),o),{})}if(typeof t=="object"){const a=n.breakpoints||Ro;return Object.keys(t).reduce((o,s)=>{if(Vu(a.keys,s)){const l=Bu(n.containerQueries?n:Lu,s);l&&(o[l]=r(t[s],s))}else if(Object.keys(a.values||ui).includes(s)){const l=a.up(s);o[l]=r(t[s],s)}else{const l=s;o[l]=t[l]}return o},{})}return r(t)}function qu(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function Uu(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function pi(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function Xn(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=pi(e,r)||n,t&&(i=t(i,n,e)),i}function Ve(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],l=o.theme,p=pi(l,n)||{};return Lt(o,s,d=>{let f=Xn(p,i,d);return d===f&&typeof d=="string"&&(f=Xn(p,i,`${t}${d==="default"?"":$e(d)}`,d)),r===!1?f:{[r]:f}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:or}:{},a.filterProps=[t],a}function Wu(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Hu={m:"margin",p:"padding"},Ku={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$o={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Qu=Wu(e=>{if(e.length>2)if($o[e])e=$o[e];else return[e];const[t,r]=e.split(""),n=Hu[t],i=Ku[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),di=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Yu=[...di,...fi];function En(e,t,r,n){const i=pi(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
38
38
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
39
39
|
`)));const s=i[o];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
40
|
-
`)),()=>{})}function _a(e){return En(e,"spacing",8,"spacing")}function kn(e,t){return typeof t=="string"||t==null?t:e(t)}function Gu(e,t){return r=>e.reduce((n,i)=>(n[i]=kn(t,r),n),{})}function Zu(e,t,r,n){if(!t.includes(r))return null;const i=Qu(r),a=Gu(i,n),o=e[r];return Lt(e,o,a)}function dl(e,t){const r=_a(e.theme);return Object.keys(e).map(n=>Zu(e,t,n,r)).reduce(fn,{})}function De(e){return dl(e,di)}De.propTypes=process.env.NODE_ENV!=="production"?di.reduce((e,t)=>(e[t]=or,e),{}):{};De.filterProps=di;function Pe(e){return dl(e,fi)}Pe.propTypes=process.env.NODE_ENV!=="production"?fi.reduce((e,t)=>(e[t]=or,e),{}):{};Pe.filterProps=fi;process.env.NODE_ENV!=="production"&&Yu.reduce((e,t)=>(e[t]=or,e),{});function hi(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?fn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function ft(e){return typeof e!="number"?e:`${e}px solid`}function ht(e,t){return Ve({prop:e,themeKey:"borders",transform:t})}const Xu=ht("border",ft),Ju=ht("borderTop",ft),ep=ht("borderRight",ft),tp=ht("borderBottom",ft),rp=ht("borderLeft",ft),np=ht("borderColor"),ip=ht("borderTopColor"),ap=ht("borderRightColor"),op=ht("borderBottomColor"),sp=ht("borderLeftColor"),lp=ht("outline",ft),cp=ht("outlineColor"),mi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=En(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:kn(t,n)});return Lt(e,e.borderRadius,r)}return null};mi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:or}:{};mi.filterProps=["borderRadius"];hi(Xu,Ju,ep,tp,rp,np,ip,ap,op,sp,mi,lp,cp);const yi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=En(e.theme,"spacing",8,"gap"),r=n=>({gap:kn(t,n)});return Lt(e,e.gap,r)}return null};yi.propTypes=process.env.NODE_ENV!=="production"?{gap:or}:{};yi.filterProps=["gap"];const gi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=En(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:kn(t,n)});return Lt(e,e.columnGap,r)}return null};gi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:or}:{};gi.filterProps=["columnGap"];const xi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=En(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:kn(t,n)});return Lt(e,e.rowGap,r)}return null};xi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:or}:{};xi.filterProps=["rowGap"];const up=Ve({prop:"gridColumn"}),pp=Ve({prop:"gridRow"}),dp=Ve({prop:"gridAutoFlow"}),fp=Ve({prop:"gridAutoColumns"}),hp=Ve({prop:"gridAutoRows"}),mp=Ve({prop:"gridTemplateColumns"}),yp=Ve({prop:"gridTemplateRows"}),gp=Ve({prop:"gridTemplateAreas"}),xp=Ve({prop:"gridArea"});hi(yi,gi,xi,up,pp,dp,fp,hp,mp,yp,gp,xp);function Br(e,t){return t==="grey"?t:e}const vp=Ve({prop:"color",themeKey:"palette",transform:Br}),bp=Ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Br}),wp=Ve({prop:"backgroundColor",themeKey:"palette",transform:Br});hi(vp,bp,wp);function at(e){return e<=1&&e!==0?`${e*100}%`:e}const Sp=Ve({prop:"width",transform:at}),Ra=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,o,s,l;const n=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[r])||ui[r];return n?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:at(r)}};return Lt(e,e.maxWidth,t)}return null};Ra.filterProps=["maxWidth"];const Cp=Ve({prop:"minWidth",transform:at}),Ep=Ve({prop:"height",transform:at}),kp=Ve({prop:"maxHeight",transform:at}),Tp=Ve({prop:"minHeight",transform:at});Ve({prop:"size",cssProperty:"width",transform:at});Ve({prop:"size",cssProperty:"height",transform:at});const Op=Ve({prop:"boxSizing"});hi(Sp,Ra,Cp,Ep,kp,Tp,Op);const Tn={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:mi},color:{themeKey:"palette",transform:Br},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Br},backgroundColor:{themeKey:"palette",transform:Br},p:{style:Pe},pt:{style:Pe},pr:{style:Pe},pb:{style:Pe},pl:{style:Pe},px:{style:Pe},py:{style:Pe},padding:{style:Pe},paddingTop:{style:Pe},paddingRight:{style:Pe},paddingBottom:{style:Pe},paddingLeft:{style:Pe},paddingX:{style:Pe},paddingY:{style:Pe},paddingInline:{style:Pe},paddingInlineStart:{style:Pe},paddingInlineEnd:{style:Pe},paddingBlock:{style:Pe},paddingBlockStart:{style:Pe},paddingBlockEnd:{style:Pe},m:{style:De},mt:{style:De},mr:{style:De},mb:{style:De},ml:{style:De},mx:{style:De},my:{style:De},margin:{style:De},marginTop:{style:De},marginRight:{style:De},marginBottom:{style:De},marginLeft:{style:De},marginX:{style:De},marginY:{style:De},marginInline:{style:De},marginInlineStart:{style:De},marginInlineEnd:{style:De},marginBlock:{style:De},marginBlockStart:{style:De},marginBlockEnd:{style:De},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:yi},rowGap:{style:xi},columnGap:{style:gi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:at},maxWidth:{style:Ra},minWidth:{transform:at},height:{transform:at},maxHeight:{transform:at},minHeight:{transform:at},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function jp(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Fp(e,t){return typeof e=="function"?e(t):e}function Ap(){function e(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:p,transform:u,style:d}=s;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const f=pi(i,p)||{};return d?d(o):Lt(o,n,S=>{let c=Xn(f,u,S);return S===c&&typeof S=="string"&&(c=Xn(f,u,`${r}${S==="default"?"":$e(S)}`,S)),l===!1?c:{[l]:c}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Tn;function o(s){let l=s;if(typeof s=="function")l=s(i);else if(typeof s!="object")return s;if(!l)return null;const p=qu(i.breakpoints),u=Object.keys(p);let d=p;return Object.keys(l).forEach(f=>{const x=Fp(l[f],i);if(x!=null)if(typeof x=="object")if(a[f])d=fn(d,e(f,x,i,a));else{const S=Lt({theme:i},x,c=>({[f]:c}));jp(S,x)?d[f]=t({sx:x,theme:i}):d=fn(d,S)}else d=fn(d,e(f,x,i,a))}),zu(i,Uu(u,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const Jr=Ap();Jr.filterProps=["sx"];const _p=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Tn;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Rp(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=_p(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return _t(s)?{...n,...s}:n}:a={...n,...t},{...i,sx:a}}function $p(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Dp={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Pp(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ip=/[A-Z]|^ms/g,Mp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fl=function(t){return t.charCodeAt(1)===45},$o=function(t){return t!=null&&typeof t!="boolean"},Fi=Pp(function(e){return fl(e)?e:e.replace(Ip,"-$&").toLowerCase()}),Do=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Mp,function(n,i,a){return tr={name:i,styles:a,next:tr},i})}return Dp[t]!==1&&!fl(t)&&typeof r=="number"&&r!==0?r+"px":r};function Jn(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return tr={name:i.name,styles:i.styles,next:tr},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)tr={name:o.name,styles:o.styles,next:tr},o=o.next;var s=a.styles+";";return s}return zp(e,t,r)}}var l=r;return l}function zp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Jn(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;$o(s)&&(n+=Fi(a)+":"+Do(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)$o(o[l])&&(n+=Fi(a)+":"+Do(a,o[l])+";");else{var p=Jn(e,t,o);switch(a){case"animation":case"animationName":{n+=Fi(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var Po=/label:\s*([^\s;{]+)\s*(;|$)/g,tr;function Vp(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";tr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Jn(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Jn(r,t,e[s]),n){var l=a;i+=l[s]}Po.lastIndex=0;for(var p="",u;(u=Po.exec(i))!==null;)p+="-"+u[1];var d=$p(i)+p;return{name:d,styles:i,next:tr}}/**
|
|
40
|
+
`)),()=>{})}function _a(e){return En(e,"spacing",8,"spacing")}function kn(e,t){return typeof t=="string"||t==null?t:e(t)}function Gu(e,t){return r=>e.reduce((n,i)=>(n[i]=kn(t,r),n),{})}function Zu(e,t,r,n){if(!t.includes(r))return null;const i=Qu(r),a=Gu(i,n),o=e[r];return Lt(e,o,a)}function fl(e,t){const r=_a(e.theme);return Object.keys(e).map(n=>Zu(e,t,n,r)).reduce(fn,{})}function De(e){return fl(e,di)}De.propTypes=process.env.NODE_ENV!=="production"?di.reduce((e,t)=>(e[t]=or,e),{}):{};De.filterProps=di;function Pe(e){return fl(e,fi)}Pe.propTypes=process.env.NODE_ENV!=="production"?fi.reduce((e,t)=>(e[t]=or,e),{}):{};Pe.filterProps=fi;process.env.NODE_ENV!=="production"&&Yu.reduce((e,t)=>(e[t]=or,e),{});function mi(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?fn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function ft(e){return typeof e!="number"?e:`${e}px solid`}function mt(e,t){return Ve({prop:e,themeKey:"borders",transform:t})}const Xu=mt("border",ft),Ju=mt("borderTop",ft),ep=mt("borderRight",ft),tp=mt("borderBottom",ft),rp=mt("borderLeft",ft),np=mt("borderColor"),ip=mt("borderTopColor"),ap=mt("borderRightColor"),op=mt("borderBottomColor"),sp=mt("borderLeftColor"),lp=mt("outline",ft),cp=mt("outlineColor"),hi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=En(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:kn(t,n)});return Lt(e,e.borderRadius,r)}return null};hi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:or}:{};hi.filterProps=["borderRadius"];mi(Xu,Ju,ep,tp,rp,np,ip,ap,op,sp,hi,lp,cp);const yi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=En(e.theme,"spacing",8,"gap"),r=n=>({gap:kn(t,n)});return Lt(e,e.gap,r)}return null};yi.propTypes=process.env.NODE_ENV!=="production"?{gap:or}:{};yi.filterProps=["gap"];const gi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=En(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:kn(t,n)});return Lt(e,e.columnGap,r)}return null};gi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:or}:{};gi.filterProps=["columnGap"];const xi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=En(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:kn(t,n)});return Lt(e,e.rowGap,r)}return null};xi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:or}:{};xi.filterProps=["rowGap"];const up=Ve({prop:"gridColumn"}),pp=Ve({prop:"gridRow"}),dp=Ve({prop:"gridAutoFlow"}),fp=Ve({prop:"gridAutoColumns"}),mp=Ve({prop:"gridAutoRows"}),hp=Ve({prop:"gridTemplateColumns"}),yp=Ve({prop:"gridTemplateRows"}),gp=Ve({prop:"gridTemplateAreas"}),xp=Ve({prop:"gridArea"});mi(yi,gi,xi,up,pp,dp,fp,mp,hp,yp,gp,xp);function Br(e,t){return t==="grey"?t:e}const vp=Ve({prop:"color",themeKey:"palette",transform:Br}),bp=Ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Br}),wp=Ve({prop:"backgroundColor",themeKey:"palette",transform:Br});mi(vp,bp,wp);function at(e){return e<=1&&e!==0?`${e*100}%`:e}const Sp=Ve({prop:"width",transform:at}),Ra=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,o,s,l;const n=((o=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:o[r])||ui[r];return n?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:at(r)}};return Lt(e,e.maxWidth,t)}return null};Ra.filterProps=["maxWidth"];const Cp=Ve({prop:"minWidth",transform:at}),Ep=Ve({prop:"height",transform:at}),kp=Ve({prop:"maxHeight",transform:at}),Tp=Ve({prop:"minHeight",transform:at});Ve({prop:"size",cssProperty:"width",transform:at});Ve({prop:"size",cssProperty:"height",transform:at});const Op=Ve({prop:"boxSizing"});mi(Sp,Ra,Cp,Ep,kp,Tp,Op);const Tn={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:hi},color:{themeKey:"palette",transform:Br},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Br},backgroundColor:{themeKey:"palette",transform:Br},p:{style:Pe},pt:{style:Pe},pr:{style:Pe},pb:{style:Pe},pl:{style:Pe},px:{style:Pe},py:{style:Pe},padding:{style:Pe},paddingTop:{style:Pe},paddingRight:{style:Pe},paddingBottom:{style:Pe},paddingLeft:{style:Pe},paddingX:{style:Pe},paddingY:{style:Pe},paddingInline:{style:Pe},paddingInlineStart:{style:Pe},paddingInlineEnd:{style:Pe},paddingBlock:{style:Pe},paddingBlockStart:{style:Pe},paddingBlockEnd:{style:Pe},m:{style:De},mt:{style:De},mr:{style:De},mb:{style:De},ml:{style:De},mx:{style:De},my:{style:De},margin:{style:De},marginTop:{style:De},marginRight:{style:De},marginBottom:{style:De},marginLeft:{style:De},marginX:{style:De},marginY:{style:De},marginInline:{style:De},marginInlineStart:{style:De},marginInlineEnd:{style:De},marginBlock:{style:De},marginBlockStart:{style:De},marginBlockEnd:{style:De},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:yi},rowGap:{style:xi},columnGap:{style:gi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:at},maxWidth:{style:Ra},minWidth:{transform:at},height:{transform:at},maxHeight:{transform:at},minHeight:{transform:at},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function jp(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Fp(e,t){return typeof e=="function"?e(t):e}function Ap(){function e(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:p,transform:u,style:d}=s;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const f=pi(i,p)||{};return d?d(o):Lt(o,n,S=>{let c=Xn(f,u,S);return S===c&&typeof S=="string"&&(c=Xn(f,u,`${r}${S==="default"?"":$e(S)}`,S)),l===!1?c:{[l]:c}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Tn;function o(s){let l=s;if(typeof s=="function")l=s(i);else if(typeof s!="object")return s;if(!l)return null;const p=qu(i.breakpoints),u=Object.keys(p);let d=p;return Object.keys(l).forEach(f=>{const x=Fp(l[f],i);if(x!=null)if(typeof x=="object")if(a[f])d=fn(d,e(f,x,i,a));else{const S=Lt({theme:i},x,c=>({[f]:c}));jp(S,x)?d[f]=t({sx:x,theme:i}):d=fn(d,S)}else d=fn(d,e(f,x,i,a))}),zu(i,Uu(u,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const Jr=Ap();Jr.filterProps=["sx"];const _p=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Tn;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Rp(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=_p(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...o)=>{const s=t(...o);return _t(s)?{...n,...s}:n}:a={...n,...t},{...i,sx:a}}function $p(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Dp={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Pp(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ip=/[A-Z]|^ms/g,Mp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ml=function(t){return t.charCodeAt(1)===45},Do=function(t){return t!=null&&typeof t!="boolean"},Fi=Pp(function(e){return ml(e)?e:e.replace(Ip,"-$&").toLowerCase()}),Po=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Mp,function(n,i,a){return tr={name:i,styles:a,next:tr},i})}return Dp[t]!==1&&!ml(t)&&typeof r=="number"&&r!==0?r+"px":r};function Jn(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return tr={name:i.name,styles:i.styles,next:tr},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)tr={name:o.name,styles:o.styles,next:tr},o=o.next;var s=a.styles+";";return s}return zp(e,t,r)}}var l=r;return l}function zp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Jn(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;Do(s)&&(n+=Fi(a)+":"+Po(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)Do(o[l])&&(n+=Fi(a)+":"+Po(a,o[l])+";");else{var p=Jn(e,t,o);switch(a){case"animation":case"animationName":{n+=Fi(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var Io=/label:\s*([^\s;{]+)\s*(;|$)/g,tr;function Vp(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";tr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Jn(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Jn(r,t,e[s]),n){var l=a;i+=l[s]}Io.lastIndex=0;for(var p="",u;(u=Io.exec(i))!==null;)p+="-"+u[1];var d=$p(i)+p;return{name:d,styles:i,next:tr}}/**
|
|
41
41
|
* @mui/styled-engine v7.1.1
|
|
42
42
|
*
|
|
43
43
|
* @license MIT
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/function Bp(e,t){const r=Sc(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
47
|
-
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function Np(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const
|
|
47
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function Np(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Mo=[];function zo(e){return Mo[0]=e,Vp(Mo)}const Lp=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function qp(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=Lp(t),o=Object.keys(a);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-n/100}${r})`}function p(f,x){const S=o.indexOf(x);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${r}) and (max-width:${(S!==-1&&typeof t[o[S]]=="number"?t[o[S]]:x)-n/100}${r})`}function u(f){return o.indexOf(f)+1<o.length?p(f,o[o.indexOf(f)+1]):s(f)}function d(f){const x=o.indexOf(f);return x===0?s(o[1]):x===o.length-1?l(o[x]):p(f,o[o.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:l,between:p,only:u,not:d,unit:r,...i}}const Up={borderRadius:4};function hl(e=8,t=_a({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function Wp(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function yl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...o}=e,s=qp(r),l=hl(i);let p=ot({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Up,...a}},o);return p=Nu(p),p.applyStyles=Wp,p=t.reduce((u,d)=>ot(u,d),p),p.unstable_sxConfig={...Tn,...o==null?void 0:o.unstable_sxConfig},p.unstable_sx=function(d){return Jr({sx:d,theme:this})},p}const Vo=e=>e,Hp=()=>{let e=Vo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vo}}},Kp=Hp(),Qp={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function sr(e,t,r="Mui"){const n=Qp[t];return n?`${r}-${n}`:`${Kp.generate(e)}-${t}`}function Or(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=sr(e,i,r)}),n}function gl(e,t=""){return e.displayName||e.name||t}function Bo(e,t,r){const n=gl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Yp(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return gl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Zn.ForwardRef:return Bo(e,e.render,"ForwardRef");case Zn.Memo:return Bo(e,e.type,"memo");default:return}}}function xl(e){const{variants:t,...r}=e,n={variants:t,style:zo(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=zo(i.style))}),n}const Gp=yl();function Ai(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Zp(e){return e?(t,r)=>r[e]:null}function Xp(e,t,r){e.theme=rd(e.theme)?r:e.theme[t]||e.theme}function Bn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Bn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return vl(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function vl(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(n))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==o.props[s])continue e;typeof o.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(o.style(n))):r.push(o.style)}return r}function Jp(e={}){const{themeId:t,defaultTheme:r=Gp,rootShouldForwardProp:n=Ai,slotShouldForwardProp:i=Ai}=e;function a(s){Xp(s,t,r)}return(s,l={})=>{Np(s,v=>v.filter(B=>B!==Jr));const{name:p,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:x=Zp(bl(u)),...S}=l,c=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=f||!1;let g=Ai;u==="Root"||u==="root"?g=n:u?g=i:nd(s)&&(g=void 0);const j=Bp(s,{shouldForwardProp:g,label:td(p,u),...S}),$=v=>{if(v.__emotion_real===v)return v;if(typeof v=="function")return function(_){return Bn(_,v)};if(_t(v)){const B=xl(v);return B.variants?function(K){return Bn(K,B)}:B.style}return v},k=(...v)=>{const B=[],_=v.map($),K=[];if(B.push(a),p&&x&&K.push(function(I){var ae,me;const N=(me=(ae=I.theme.components)==null?void 0:ae[p])==null?void 0:me.styleOverrides;if(!N)return null;const X={};for(const ie in N)X[ie]=Bn(I,N[ie]);return x(I,X)}),p&&!c&&K.push(function(I){var X,ae;const U=I.theme,N=(ae=(X=U==null?void 0:U.components)==null?void 0:X[p])==null?void 0:ae.variants;return N?vl(I,N):null}),b||K.push(Jr),Array.isArray(_[0])){const z=_.shift(),I=new Array(B.length).fill(""),U=new Array(K.length).fill("");let N;N=[...I,...z,...U],N.raw=[...I,...z.raw,...U],B.unshift(N)}const W=[...B,..._,...K],m=j(...W);return s.muiName&&(m.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=ed(p,u,s)),m};return j.withConfig&&(k.withConfig=j.withConfig),k}}function ed(e,t,r){return e?`${e}${$e(t||"")}`:`Styled(${Yp(r)})`}function td(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${bl(t||"Root")}`),r}function rd(e){for(const t in e)return!1;return!0}function nd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function bl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ji(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=n;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],o=t[i];if(!o)r[i]=a||{};else if(!a)r[i]=o;else{r[i]={...o};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const l=s;r[i][l]=Ji(a[l],o[l])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const id=typeof window<"u"?re.useLayoutEffect:re.useEffect;function ad(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function $a(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),ad(e,t,r)}function od(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function ar(e){if(e.type)return e;if(e.charAt(0)==="#")return ar(od(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
48
48
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ir(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ir(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const sd=e=>{const t=ar(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ln=(e,t)=>{try{return sd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function vi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function
|
|
50
|
-
`))}return b}const f=({color:c,name:b,mainShade:g=500,lightShade:j=300,darkShade
|
|
49
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ir(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const sd=e=>{const t=ar(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ln=(e,t)=>{try{return sd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function vi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function wl(e){e=ar(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),o=(p,u=(p+r/30)%12)=>i-a*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),vi({type:s,values:l})}function ea(e){e=ar(e);let t=e.type==="hsl"||e.type==="hsla"?ar(wl(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function No(e,t){const r=ea(e),n=ea(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function $t(e,t){return e=ar(e),t=$a(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,vi(e)}function $n(e,t,r){try{return $t(e,t)}catch{return e}}function Da(e,t){if(e=ar(e),t=$a(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return vi(e)}function je(e,t,r){try{return Da(e,t)}catch{return e}}function Pa(e,t){if(e=ar(e),t=$a(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return vi(e)}function Fe(e,t,r){try{return Pa(e,t)}catch{return e}}function ld(e,t=.15){return ea(e)>.5?Da(e,t):Pa(e,t)}function Dn(e,t,r){try{return ld(e,t)}catch{return e}}const cd=re.createContext(void 0);process.env.NODE_ENV!=="production"&&(w.node,w.object);function ud(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?Ji(i.defaultProps,n):!i.styleOverrides&&!i.variants?Ji(i,n):n}function pd({props:e,name:t}){const r=re.useContext(cd);return ud({props:e,name:t,theme:{components:r}})}const Lo={theme:void 0};function dd(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(Lo.theme=i.theme,a=xl(e(Lo)),t=a,r=i.theme),a}}function fd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const qo=(e,t,r,n=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},md=(e,t,r)=>{function n(i,a=[],o=[]){Object.entries(i).forEach(([s,l])=>{(!r||r&&!r([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,s],Array.isArray(l)?[...o,s]:o):t([...a,s],l,o))})}n(e)},hd=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function _i(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},o={};return md(e,(s,l,p)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const u=`--${r?`${r}-`:""}${s.join("-")}`,d=hd(s,l);Object.assign(i,{[u]:d}),qo(a,s,`var(${u})`,p),qo(o,s,`var(${u}, ${d})`,p)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function yd(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:o,defaultColorScheme:s="light",...l}=e,{vars:p,css:u,varsWithDefaults:d}=_i(l,t);let f=d;const x={},{[s]:S,...c}=a;if(Object.entries(c||{}).forEach(([$,k])=>{const{vars:v,css:B,varsWithDefaults:_}=_i(k,t);f=ot(f,_),x[$]={css:B,vars:v}}),S){const{css:$,vars:k,varsWithDefaults:v}=_i(S,t);f=ot(f,v),x[s]={css:$,vars:k}}function b($,k){var B,_;let v=i;if(i==="class"&&(v=".%s"),i==="data"&&(v="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(v=`[${i}="%s"]`),$){if(v==="media")return e.defaultColorScheme===$?":root":{[`@media (prefers-color-scheme: ${((_=(B=a[$])==null?void 0:B.palette)==null?void 0:_.mode)||$})`]:{":root":k}};if(v)return e.defaultColorScheme===$?`:root, ${v.replace("%s",String($))}`:v.replace("%s",String($))}return":root"}return{vars:f,generateThemeVars:()=>{let $={...p};return Object.entries(x).forEach(([,{vars:k}])=>{$=ot($,k)}),$},generateStyleSheets:()=>{var K,W;const $=[],k=e.defaultColorScheme||"light";function v(m,z){Object.keys(z).length&&$.push(typeof m=="string"?{[m]:{...z}}:m)}v(r(void 0,{...u}),u);const{[k]:B,..._}=x;if(B){const{css:m}=B,z=(W=(K=a[k])==null?void 0:K.palette)==null?void 0:W.mode,I=!n&&z?{colorScheme:z,...m}:{...m};v(r(k,{...I}),I)}return Object.entries(_).forEach(([m,{css:z}])=>{var N,X;const I=(X=(N=a[m])==null?void 0:N.palette)==null?void 0:X.mode,U=!n&&I?{colorScheme:I,...z}:{...z};v(r(m,{...U}),U)}),$}}}function gd(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const yn={black:"#000",white:"#fff"},xd={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},$r={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Dr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},on={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Pr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ir={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Mr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sl(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:yn.white,default:yn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const vd=Sl();function Cl(){return{text:{primary:yn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:yn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Uo=Cl();function Wo(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Pa(e.main,i):t==="dark"&&(e.dark=Da(e.main,a)))}function bd(e="light"){return e==="dark"?{main:Pr[200],light:Pr[50],dark:Pr[400]}:{main:Pr[700],light:Pr[400],dark:Pr[800]}}function wd(e="light"){return e==="dark"?{main:$r[200],light:$r[50],dark:$r[400]}:{main:$r[500],light:$r[300],dark:$r[700]}}function Sd(e="light"){return e==="dark"?{main:Dr[500],light:Dr[300],dark:Dr[700]}:{main:Dr[700],light:Dr[400],dark:Dr[800]}}function Cd(e="light"){return e==="dark"?{main:Ir[400],light:Ir[300],dark:Ir[700]}:{main:Ir[700],light:Ir[500],dark:Ir[900]}}function Ed(e="light"){return e==="dark"?{main:Mr[400],light:Mr[300],dark:Mr[700]}:{main:Mr[800],light:Mr[500],dark:Mr[900]}}function kd(e="light"){return e==="dark"?{main:on[400],light:on[300],dark:on[700]}:{main:"#ed6c02",light:on[500],dark:on[900]}}function Ia(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||bd(t),o=e.secondary||wd(t),s=e.error||Sd(t),l=e.info||Cd(t),p=e.success||Ed(t),u=e.warning||kd(t);function d(c){const b=No(c,Uo.text.primary)>=r?Uo.text.primary:vd.text.primary;if(process.env.NODE_ENV!=="production"){const g=No(c,b);g<3&&console.error([`MUI: The contrast ratio of ${g}:1 for ${b} on ${c}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
50
|
+
`))}return b}const f=({color:c,name:b,mainShade:g=500,lightShade:j=300,darkShade:$=700})=>{if(c={...c},!c.main&&c[g]&&(c.main=c[g]),!c.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
51
51
|
The color object needs to have a \`main\` property or a \`${g}\` property.`:ir(11,b?` (${b})`:"",g));if(typeof c.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
52
52
|
\`color.main\` should be a string, but \`${JSON.stringify(c.main)}\` was provided instead.
|
|
53
53
|
|
|
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
|
|
|
61
61
|
|
|
62
62
|
const theme2 = createTheme({ palette: {
|
|
63
63
|
primary: { main: green[500] },
|
|
64
|
-
} });`:ir(12,b?` (${b})`:"",JSON.stringify(c.main)));return
|
|
65
|
-
`)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof o=="string"?o:
|
|
64
|
+
} });`:ir(12,b?` (${b})`:"",JSON.stringify(c.main)));return Wo(c,"light",j,n),Wo(c,"dark",$,n),c.contrastText||(c.contrastText=d(c.main)),c};let x;return t==="light"?x=Sl():t==="dark"&&(x=Cl()),process.env.NODE_ENV!=="production"&&(x||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ot({common:{...yn},mode:t,primary:f({color:a,name:"primary"}),secondary:f({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:p,name:"success"}),grey:xd,contrastThreshold:r,getContrastText:d,augmentColor:f,tonalOffset:n,...x},i)}function Td(e){const t={};return Object.entries(e).forEach(n=>{const[i,a]=n;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Od(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function jd(e){return Math.round(e*1e5)/1e5}const Ho={textTransform:"uppercase"},Ko='"Roboto", "Helvetica", "Arial", sans-serif';function Fd(e,t){const{fontFamily:r=Ko,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:p,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const f=n/14,x=u||(b=>`${b/l*f}rem`),S=(b,g,j,$,k)=>({fontFamily:r,fontWeight:b,fontSize:x(g),lineHeight:j,...r===Ko?{letterSpacing:`${jd($/g)}em`}:{},...k,...p}),c={h1:S(i,96,1.167,-1.5),h2:S(i,60,1.2,-.5),h3:S(a,48,1.167,0),h4:S(a,34,1.235,.25),h5:S(a,24,1.334,0),h6:S(o,20,1.6,.15),subtitle1:S(a,16,1.75,.15),subtitle2:S(o,14,1.57,.1),body1:S(a,16,1.5,.15),body2:S(a,14,1.43,.15),button:S(o,14,1.75,.4,Ho),caption:S(a,12,1.66,.4),overline:S(a,12,2.66,1,Ho),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ot({htmlFontSize:l,pxToRem:x,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,...c},d,{clone:!1})}const Ad=.2,_d=.14,Rd=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ad})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${_d})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rd})`].join(",")}const $d=["none",_e(0,2,1,-1,0,1,1,0,0,1,3,0),_e(0,3,1,-2,0,2,2,0,0,1,5,0),_e(0,3,3,-2,0,3,4,0,0,1,8,0),_e(0,2,4,-1,0,4,5,0,0,1,10,0),_e(0,3,5,-1,0,5,8,0,0,1,14,0),_e(0,3,5,-1,0,6,10,0,0,1,18,0),_e(0,4,5,-2,0,7,10,1,0,2,16,1),_e(0,5,5,-3,0,8,10,1,0,3,14,2),_e(0,5,6,-3,0,9,12,1,0,3,16,2),_e(0,6,6,-3,0,10,14,1,0,4,18,3),_e(0,6,7,-4,0,11,15,1,0,4,20,3),_e(0,7,8,-4,0,12,17,2,0,5,22,4),_e(0,7,8,-4,0,13,19,2,0,5,24,4),_e(0,7,9,-4,0,14,21,2,0,5,26,4),_e(0,8,9,-5,0,15,22,2,0,6,28,5),_e(0,8,10,-5,0,16,24,2,0,6,30,5),_e(0,8,11,-5,0,17,26,2,0,6,32,5),_e(0,9,11,-5,0,18,28,2,0,7,34,6),_e(0,9,12,-6,0,19,29,2,0,7,36,6),_e(0,10,13,-6,0,20,31,3,0,8,38,7),_e(0,10,13,-6,0,21,33,3,0,8,40,7),_e(0,10,14,-6,0,22,35,3,0,8,42,7),_e(0,11,14,-7,0,23,36,3,0,9,44,8),_e(0,11,15,-7,0,24,38,3,0,9,46,8)],Dd={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Pd={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Qo(e){return`${Math.round(e)}ms`}function Id(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Md(e){const t={...Dd,...e.easing},r={...Pd,...e.duration};return{getAutoHeightDuration:Id,create:(i=["all"],a={})=>{const{duration:o=r.standard,easing:s=t.easeInOut,delay:l=0,...p}=a;if(process.env.NODE_ENV!=="production"){const u=f=>typeof f=="string",d=f=>!Number.isNaN(parseFloat(f));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),u(s)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
65
|
+
`)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof o=="string"?o:Qo(o)} ${s} ${typeof l=="string"?l:Qo(l)}`).join(",")},...e,easing:t,duration:r}}const zd={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Vd(e){return _t(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function El(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[o,s]=i[a];!Vd(s)||o.startsWith("unstable_")?delete n[o]:_t(s)&&(n[o]={...s},r(n[o]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
66
66
|
|
|
67
67
|
const theme = ${JSON.stringify(t,null,2)};
|
|
68
68
|
|
|
69
69
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
70
70
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
71
71
|
|
|
72
|
-
export default theme;`}function ta(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:l,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ir(20));const u=Ia(a),d=
|
|
73
|
-
`))}c[g]={}}}};Object.keys(f.components).forEach(c=>{const b=f.components[c].styleOverrides;b&&c.startsWith("Mui")&&S(b,c)})}return f.unstable_sxConfig={...Tn,...p==null?void 0:p.unstable_sxConfig},f.unstable_sx=function(S){return Jr({sx:S,theme:this})},f.toRuntimeSource=
|
|
74
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Kd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const kt=e=>{try{return e()}catch{}},Qd=(e="mui")=>fd(e);function Ri(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=Ld({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=ta({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...El(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||kl(i)},o}function Yd(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=qd,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...p}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),f=Qd(a),{[d]:x,light:S,dark:c,...b}=r,g={...b};let j=x;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:ir(21,d));const R=Ri(g,j,p,d);S&&!g.light&&Ri(g,S,void 0,"light"),c&&!g.dark&&Ri(g,c,void 0,"dark");let k={defaultColorScheme:d,...R,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:g,font:{...Td(R.typography),...R.font},spacing:Kd(p.spacing)};Object.keys(k.colorSchemes).forEach(W=>{const h=k.colorSchemes[W].palette,z=I=>{const U=I.split("-"),N=U[1],X=U[2];return f(I,h[N][X])};if(h.mode==="light"&&(P(h.common,"background","#fff"),P(h.common,"onBackground","#000")),h.mode==="dark"&&(P(h.common,"background","#000"),P(h.common,"onBackground","#fff")),Hd(h,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),h.mode==="light"){P(h.Alert,"errorColor",je(h.error.light,.6)),P(h.Alert,"infoColor",je(h.info.light,.6)),P(h.Alert,"successColor",je(h.success.light,.6)),P(h.Alert,"warningColor",je(h.warning.light,.6)),P(h.Alert,"errorFilledBg",z("palette-error-main")),P(h.Alert,"infoFilledBg",z("palette-info-main")),P(h.Alert,"successFilledBg",z("palette-success-main")),P(h.Alert,"warningFilledBg",z("palette-warning-main")),P(h.Alert,"errorFilledColor",kt(()=>h.getContrastText(h.error.main))),P(h.Alert,"infoFilledColor",kt(()=>h.getContrastText(h.info.main))),P(h.Alert,"successFilledColor",kt(()=>h.getContrastText(h.success.main))),P(h.Alert,"warningFilledColor",kt(()=>h.getContrastText(h.warning.main))),P(h.Alert,"errorStandardBg",Fe(h.error.light,.9)),P(h.Alert,"infoStandardBg",Fe(h.info.light,.9)),P(h.Alert,"successStandardBg",Fe(h.success.light,.9)),P(h.Alert,"warningStandardBg",Fe(h.warning.light,.9)),P(h.Alert,"errorIconColor",z("palette-error-main")),P(h.Alert,"infoIconColor",z("palette-info-main")),P(h.Alert,"successIconColor",z("palette-success-main")),P(h.Alert,"warningIconColor",z("palette-warning-main")),P(h.AppBar,"defaultBg",z("palette-grey-100")),P(h.Avatar,"defaultBg",z("palette-grey-400")),P(h.Button,"inheritContainedBg",z("palette-grey-300")),P(h.Button,"inheritContainedHoverBg",z("palette-grey-A100")),P(h.Chip,"defaultBorder",z("palette-grey-400")),P(h.Chip,"defaultAvatarColor",z("palette-grey-700")),P(h.Chip,"defaultIconColor",z("palette-grey-700")),P(h.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(h.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(h.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(h.LinearProgress,"primaryBg",Fe(h.primary.main,.62)),P(h.LinearProgress,"secondaryBg",Fe(h.secondary.main,.62)),P(h.LinearProgress,"errorBg",Fe(h.error.main,.62)),P(h.LinearProgress,"infoBg",Fe(h.info.main,.62)),P(h.LinearProgress,"successBg",Fe(h.success.main,.62)),P(h.LinearProgress,"warningBg",Fe(h.warning.main,.62)),P(h.Skeleton,"bg",`rgba(${z("palette-text-primaryChannel")} / 0.11)`),P(h.Slider,"primaryTrack",Fe(h.primary.main,.62)),P(h.Slider,"secondaryTrack",Fe(h.secondary.main,.62)),P(h.Slider,"errorTrack",Fe(h.error.main,.62)),P(h.Slider,"infoTrack",Fe(h.info.main,.62)),P(h.Slider,"successTrack",Fe(h.success.main,.62)),P(h.Slider,"warningTrack",Fe(h.warning.main,.62));const I=Dn(h.background.default,.8);P(h.SnackbarContent,"bg",I),P(h.SnackbarContent,"color",kt(()=>h.getContrastText(I))),P(h.SpeedDialAction,"fabHoverBg",Dn(h.background.paper,.15)),P(h.StepConnector,"border",z("palette-grey-400")),P(h.StepContent,"border",z("palette-grey-400")),P(h.Switch,"defaultColor",z("palette-common-white")),P(h.Switch,"defaultDisabledColor",z("palette-grey-100")),P(h.Switch,"primaryDisabledColor",Fe(h.primary.main,.62)),P(h.Switch,"secondaryDisabledColor",Fe(h.secondary.main,.62)),P(h.Switch,"errorDisabledColor",Fe(h.error.main,.62)),P(h.Switch,"infoDisabledColor",Fe(h.info.main,.62)),P(h.Switch,"successDisabledColor",Fe(h.success.main,.62)),P(h.Switch,"warningDisabledColor",Fe(h.warning.main,.62)),P(h.TableCell,"border",Fe($n(h.divider,1),.88)),P(h.Tooltip,"bg",$n(h.grey[700],.92))}if(h.mode==="dark"){P(h.Alert,"errorColor",Fe(h.error.light,.6)),P(h.Alert,"infoColor",Fe(h.info.light,.6)),P(h.Alert,"successColor",Fe(h.success.light,.6)),P(h.Alert,"warningColor",Fe(h.warning.light,.6)),P(h.Alert,"errorFilledBg",z("palette-error-dark")),P(h.Alert,"infoFilledBg",z("palette-info-dark")),P(h.Alert,"successFilledBg",z("palette-success-dark")),P(h.Alert,"warningFilledBg",z("palette-warning-dark")),P(h.Alert,"errorFilledColor",kt(()=>h.getContrastText(h.error.dark))),P(h.Alert,"infoFilledColor",kt(()=>h.getContrastText(h.info.dark))),P(h.Alert,"successFilledColor",kt(()=>h.getContrastText(h.success.dark))),P(h.Alert,"warningFilledColor",kt(()=>h.getContrastText(h.warning.dark))),P(h.Alert,"errorStandardBg",je(h.error.light,.9)),P(h.Alert,"infoStandardBg",je(h.info.light,.9)),P(h.Alert,"successStandardBg",je(h.success.light,.9)),P(h.Alert,"warningStandardBg",je(h.warning.light,.9)),P(h.Alert,"errorIconColor",z("palette-error-main")),P(h.Alert,"infoIconColor",z("palette-info-main")),P(h.Alert,"successIconColor",z("palette-success-main")),P(h.Alert,"warningIconColor",z("palette-warning-main")),P(h.AppBar,"defaultBg",z("palette-grey-900")),P(h.AppBar,"darkBg",z("palette-background-paper")),P(h.AppBar,"darkColor",z("palette-text-primary")),P(h.Avatar,"defaultBg",z("palette-grey-600")),P(h.Button,"inheritContainedBg",z("palette-grey-800")),P(h.Button,"inheritContainedHoverBg",z("palette-grey-700")),P(h.Chip,"defaultBorder",z("palette-grey-700")),P(h.Chip,"defaultAvatarColor",z("palette-grey-300")),P(h.Chip,"defaultIconColor",z("palette-grey-300")),P(h.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(h.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(h.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(h.LinearProgress,"primaryBg",je(h.primary.main,.5)),P(h.LinearProgress,"secondaryBg",je(h.secondary.main,.5)),P(h.LinearProgress,"errorBg",je(h.error.main,.5)),P(h.LinearProgress,"infoBg",je(h.info.main,.5)),P(h.LinearProgress,"successBg",je(h.success.main,.5)),P(h.LinearProgress,"warningBg",je(h.warning.main,.5)),P(h.Skeleton,"bg",`rgba(${z("palette-text-primaryChannel")} / 0.13)`),P(h.Slider,"primaryTrack",je(h.primary.main,.5)),P(h.Slider,"secondaryTrack",je(h.secondary.main,.5)),P(h.Slider,"errorTrack",je(h.error.main,.5)),P(h.Slider,"infoTrack",je(h.info.main,.5)),P(h.Slider,"successTrack",je(h.success.main,.5)),P(h.Slider,"warningTrack",je(h.warning.main,.5));const I=Dn(h.background.default,.98);P(h.SnackbarContent,"bg",I),P(h.SnackbarContent,"color",kt(()=>h.getContrastText(I))),P(h.SpeedDialAction,"fabHoverBg",Dn(h.background.paper,.15)),P(h.StepConnector,"border",z("palette-grey-600")),P(h.StepContent,"border",z("palette-grey-600")),P(h.Switch,"defaultColor",z("palette-grey-300")),P(h.Switch,"defaultDisabledColor",z("palette-grey-600")),P(h.Switch,"primaryDisabledColor",je(h.primary.main,.55)),P(h.Switch,"secondaryDisabledColor",je(h.secondary.main,.55)),P(h.Switch,"errorDisabledColor",je(h.error.main,.55)),P(h.Switch,"infoDisabledColor",je(h.info.main,.55)),P(h.Switch,"successDisabledColor",je(h.success.main,.55)),P(h.Switch,"warningDisabledColor",je(h.warning.main,.55)),P(h.TableCell,"border",je($n(h.divider,1),.68)),P(h.Tooltip,"bg",$n(h.grey[700],.92))}It(h.background,"default"),It(h.background,"paper"),It(h.common,"background"),It(h.common,"onBackground"),It(h,"divider"),Object.keys(h).forEach(I=>{const U=h[I];I!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&P(h[I],"mainChannel",ln(cn(U.main))),U.light&&P(h[I],"lightChannel",ln(cn(U.light))),U.dark&&P(h[I],"darkChannel",ln(cn(U.dark))),U.contrastText&&P(h[I],"contrastTextChannel",ln(cn(U.contrastText))),I==="text"&&(It(h[I],"primary"),It(h[I],"secondary")),I==="action"&&(U.active&&It(h[I],"active"),U.selected&&It(h[I],"selected")))})}),k=t.reduce((W,h)=>ot(W,h),k);const v={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:Wd(k)},{vars:B,generateThemeVars:A,generateStyleSheets:K}=yd(k,v);return k.vars=B,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([W,h])=>{k[W]=h}),k.generateThemeVars=A,k.generateStyleSheets=K,k.generateSpacing=function(){return hl(p.spacing,_a(this))},k.getColorSchemeSelector=gd(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Tn,...p==null?void 0:p.unstable_sxConfig},k.unstable_sx=function(h){return Jr({sx:h,theme:this})},k.toRuntimeSource=Cl,k}function Qo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ia({...r===!0?{}:r.palette,mode:t})})}function Gd(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...o}=e,s=a||"light",l=i==null?void 0:i[s],p={...i,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ta(e,...t);let u=r;"palette"in e||p[s]&&(p[s]!==!0?u=p[s].palette:s==="dark"&&(u={mode:"dark"}));const d=ta({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=p,d.palette.mode==="light"&&(d.colorSchemes.light={...p.light!==!0&&p.light,palette:d.palette},Qo(d,"dark",p.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:d.palette},Qo(d,"light",p.light)),d}return!r&&!("light"in p)&&s==="light"&&(p.light=!0),Yd({...o,colorSchemes:p,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const Zd=Gd(),Xd="$$material";function Jd(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ef=e=>Jd(e)&&e!=="classes",lt=Jp({themeId:Xd,defaultTheme:Zd,rootShouldForwardProp:ef});function tf(){return Rp}const kr=dd;process.env.NODE_ENV!=="production"&&(w.node,w.object.isRequired);function jr(e){return pd(e)}function rf(e){return typeof e.main=="string"}function nf(e,t=[]){if(!rf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ei(e=[]){return([,t])=>t&&nf(t,e)}function af(e){return sr("MuiTypography",e)}Or("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const of={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sf=tf(),lf=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${$e(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return tn(s,af,o)},cf=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${$e(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(kr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(ei()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${$e(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),Yo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Tl=re.forwardRef(function(t,r){const{color:n,...i}=jr({props:t,name:"MuiTypography"}),a=!of[n],o=sf({...i,...a&&{color:n}}),{align:s="inherit",className:l,component:p,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:x="body1",variantMapping:S=Yo,...c}=o,b={...o,align:s,color:n,className:l,component:p,gutterBottom:u,noWrap:d,paragraph:f,variant:x,variantMapping:S},g=p||(f?"p":S[x]||Yo[x])||"span",j=lf(b);return m.jsx(cf,{as:g,ref:r,className:Ge(j.root,l),...c,ownerState:b,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...c.style}})});process.env.NODE_ENV!=="production"&&(Tl.propTypes={align:w.oneOf(["center","inherit","justify","left","right"]),children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),w.string]),component:w.elementType,gutterBottom:w.bool,noWrap:w.bool,paragraph:w.bool,style:w.object,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOfType([w.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),w.string]),variantMapping:w.object});const Ma=re.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ma.displayName="FormControlContext");function uf(){return re.useContext(Ma)}function pf(e){return sr("MuiInputAdornment",e)}const Go=Or("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Zo;const df=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${$e(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},ff=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:o}=e,s={root:["root",r&&"disablePointerEvents",i&&`position${$e(i)}`,o,n&&"hiddenLabel",a&&`size${$e(a)}`]};return tn(s,pf,t)},hf=lt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:df})(kr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Go.positionStart}&:not(.${Go.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Ol=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:p,variant:u,...d}=n,f=uf()||{};let x=u;u&&f.variant&&process.env.NODE_ENV!=="production"&&u===f.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),f&&!x&&(x=f.variant);const S={...n,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:p,variant:x},c=ff(S);return m.jsx(Ma.Provider,{value:null,children:m.jsx(hf,{as:o,ownerState:S,className:Ge(c.root,a),ref:r,...d,children:typeof i=="string"&&!l?m.jsx(Tl,{color:"textSecondary",children:i}):m.jsxs(re.Fragment,{children:[p==="start"?Zo||(Zo=m.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Ol.propTypes={children:w.node,classes:w.object,className:w.string,component:w.elementType,disablePointerEvents:w.bool,disableTypography:w.bool,position:w.oneOf(["end","start"]).isRequired,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOf(["filled","outlined","standard"])});function za(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function mf(e){return sr("MuiSvgIcon",e)}Or("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const yf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${$e(t)}`,`fontSize${$e(r)}`]};return tn(i,mf,n)},gf=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$e(r.color)}`],t[`fontSize${$e(r.fontSize)}`]]}})(kr(({theme:e})=>{var t,r,n,i,a,o,s,l,p,u,d,f,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:c=>!c.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:o.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:u.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,c])=>c&&c.main).map(([c])=>{var b,g;return{props:{color:c},style:{color:(g=(b=(e.vars??e).palette)==null?void 0:b[c])==null?void 0:g.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(S=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ti=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:l="medium",htmlColor:p,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...x}=n,S=re.isValidElement(i)&&i.type==="svg",c={...n,color:o,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:S},b={};u||(b.viewBox=f);const g=yf(c);return m.jsxs(gf,{as:s,className:Ge(g.root,a),focusable:"false",color:p,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...x,...S&&i.props,ownerState:c,children:[S?i.props.children:i,d?m.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ti.propTypes={children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),w.string]),component:w.elementType,fontSize:w.oneOfType([w.oneOf(["inherit","large","medium","small"]),w.string]),htmlColor:w.string,inheritViewBox:w.bool,shapeRendering:w.string,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),titleAccess:w.string,viewBox:w.string});ti.muiName="SvgIcon";function St(e,t){function r(n,i){return m.jsx(ti,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ti.muiName,re.memo(re.forwardRef(r))}let Xo=0;function xf(e){const[t,r]=re.useState(e),n=e||t;return re.useEffect(()=>{t==null&&(Xo+=1,r(`mui-${Xo}`))},[t]),n}const vf={...re},Jo=vf.useId;function bf(e){if(Jo!==void 0){const t=Jo();return e??t}return xf(e)}function Nn(e){const t=re.useRef(e);return id(()=>{t.current=e}),re.useRef((...r)=>(0,t.current)(...r)).current}function es(...e){const t=re.useRef(void 0),r=re.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return re.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const wf=w.oneOfType([w.func,w.object]);function Sf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Cf(e,t,r,n,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!Sf(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${o}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ef=za(w.elementType,Cf);function ts(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
-
`))}return!1}const
|
|
72
|
+
export default theme;`}function ta(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:l,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ir(20));const u=Ia(a),d=yl(e);let f=ot(d,{mixins:Od(d.breakpoints,n),palette:u,shadows:$d.slice(),typography:Fd(u,s),transitions:Md(o),zIndex:{...zd}});if(f=ot(f,p),f=t.reduce((x,S)=>ot(x,S),f),process.env.NODE_ENV!=="production"){const x=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],S=(c,b)=>{let g;for(g in c){const j=c[g];if(x.includes(g)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const $=sr("",g);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${g}\` internal state.`,"You can not override it like this: ",JSON.stringify(c,null,2),"",`Instead, you need to use the '&.${$}' syntax:`,JSON.stringify({root:{[`&.${$}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
|
+
`))}c[g]={}}}};Object.keys(f.components).forEach(c=>{const b=f.components[c].styleOverrides;b&&c.startsWith("Mui")&&S(b,c)})}return f.unstable_sxConfig={...Tn,...p==null?void 0:p.unstable_sxConfig},f.unstable_sx=function(S){return Jr({sx:S,theme:this})},f.toRuntimeSource=El,f}function Bd(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Nd=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Bd(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function kl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Tl(e){return e==="dark"?Nd:[]}function Ld(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=Ia(t);return{palette:a,opacity:{...kl(a.mode),...r},overlays:n||Tl(a.mode),...i}}function qd(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Ud=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Wd=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Ud(e.cssVarPrefix).forEach(s=>{o[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:a?{[a.replace("%s",t)]:o,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function Hd(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function P(e,t,r){!e[t]&&r&&(e[t]=r)}function cn(e){return typeof e!="string"||!e.startsWith("hsl")?e:wl(e)}function It(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ln(cn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
74
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Kd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const kt=e=>{try{return e()}catch{}},Qd=(e="mui")=>fd(e);function Ri(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=Ld({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...o}=ta({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...kl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Tl(i)},o}function Yd(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:o=qd,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...p}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),f=Qd(a),{[d]:x,light:S,dark:c,...b}=r,g={...b};let j=x;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:ir(21,d));const $=Ri(g,j,p,d);S&&!g.light&&Ri(g,S,void 0,"light"),c&&!g.dark&&Ri(g,c,void 0,"dark");let k={defaultColorScheme:d,...$,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:g,font:{...Td($.typography),...$.font},spacing:Kd(p.spacing)};Object.keys(k.colorSchemes).forEach(W=>{const m=k.colorSchemes[W].palette,z=I=>{const U=I.split("-"),N=U[1],X=U[2];return f(I,m[N][X])};if(m.mode==="light"&&(P(m.common,"background","#fff"),P(m.common,"onBackground","#000")),m.mode==="dark"&&(P(m.common,"background","#000"),P(m.common,"onBackground","#fff")),Hd(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){P(m.Alert,"errorColor",je(m.error.light,.6)),P(m.Alert,"infoColor",je(m.info.light,.6)),P(m.Alert,"successColor",je(m.success.light,.6)),P(m.Alert,"warningColor",je(m.warning.light,.6)),P(m.Alert,"errorFilledBg",z("palette-error-main")),P(m.Alert,"infoFilledBg",z("palette-info-main")),P(m.Alert,"successFilledBg",z("palette-success-main")),P(m.Alert,"warningFilledBg",z("palette-warning-main")),P(m.Alert,"errorFilledColor",kt(()=>m.getContrastText(m.error.main))),P(m.Alert,"infoFilledColor",kt(()=>m.getContrastText(m.info.main))),P(m.Alert,"successFilledColor",kt(()=>m.getContrastText(m.success.main))),P(m.Alert,"warningFilledColor",kt(()=>m.getContrastText(m.warning.main))),P(m.Alert,"errorStandardBg",Fe(m.error.light,.9)),P(m.Alert,"infoStandardBg",Fe(m.info.light,.9)),P(m.Alert,"successStandardBg",Fe(m.success.light,.9)),P(m.Alert,"warningStandardBg",Fe(m.warning.light,.9)),P(m.Alert,"errorIconColor",z("palette-error-main")),P(m.Alert,"infoIconColor",z("palette-info-main")),P(m.Alert,"successIconColor",z("palette-success-main")),P(m.Alert,"warningIconColor",z("palette-warning-main")),P(m.AppBar,"defaultBg",z("palette-grey-100")),P(m.Avatar,"defaultBg",z("palette-grey-400")),P(m.Button,"inheritContainedBg",z("palette-grey-300")),P(m.Button,"inheritContainedHoverBg",z("palette-grey-A100")),P(m.Chip,"defaultBorder",z("palette-grey-400")),P(m.Chip,"defaultAvatarColor",z("palette-grey-700")),P(m.Chip,"defaultIconColor",z("palette-grey-700")),P(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(m.LinearProgress,"primaryBg",Fe(m.primary.main,.62)),P(m.LinearProgress,"secondaryBg",Fe(m.secondary.main,.62)),P(m.LinearProgress,"errorBg",Fe(m.error.main,.62)),P(m.LinearProgress,"infoBg",Fe(m.info.main,.62)),P(m.LinearProgress,"successBg",Fe(m.success.main,.62)),P(m.LinearProgress,"warningBg",Fe(m.warning.main,.62)),P(m.Skeleton,"bg",`rgba(${z("palette-text-primaryChannel")} / 0.11)`),P(m.Slider,"primaryTrack",Fe(m.primary.main,.62)),P(m.Slider,"secondaryTrack",Fe(m.secondary.main,.62)),P(m.Slider,"errorTrack",Fe(m.error.main,.62)),P(m.Slider,"infoTrack",Fe(m.info.main,.62)),P(m.Slider,"successTrack",Fe(m.success.main,.62)),P(m.Slider,"warningTrack",Fe(m.warning.main,.62));const I=Dn(m.background.default,.8);P(m.SnackbarContent,"bg",I),P(m.SnackbarContent,"color",kt(()=>m.getContrastText(I))),P(m.SpeedDialAction,"fabHoverBg",Dn(m.background.paper,.15)),P(m.StepConnector,"border",z("palette-grey-400")),P(m.StepContent,"border",z("palette-grey-400")),P(m.Switch,"defaultColor",z("palette-common-white")),P(m.Switch,"defaultDisabledColor",z("palette-grey-100")),P(m.Switch,"primaryDisabledColor",Fe(m.primary.main,.62)),P(m.Switch,"secondaryDisabledColor",Fe(m.secondary.main,.62)),P(m.Switch,"errorDisabledColor",Fe(m.error.main,.62)),P(m.Switch,"infoDisabledColor",Fe(m.info.main,.62)),P(m.Switch,"successDisabledColor",Fe(m.success.main,.62)),P(m.Switch,"warningDisabledColor",Fe(m.warning.main,.62)),P(m.TableCell,"border",Fe($n(m.divider,1),.88)),P(m.Tooltip,"bg",$n(m.grey[700],.92))}if(m.mode==="dark"){P(m.Alert,"errorColor",Fe(m.error.light,.6)),P(m.Alert,"infoColor",Fe(m.info.light,.6)),P(m.Alert,"successColor",Fe(m.success.light,.6)),P(m.Alert,"warningColor",Fe(m.warning.light,.6)),P(m.Alert,"errorFilledBg",z("palette-error-dark")),P(m.Alert,"infoFilledBg",z("palette-info-dark")),P(m.Alert,"successFilledBg",z("palette-success-dark")),P(m.Alert,"warningFilledBg",z("palette-warning-dark")),P(m.Alert,"errorFilledColor",kt(()=>m.getContrastText(m.error.dark))),P(m.Alert,"infoFilledColor",kt(()=>m.getContrastText(m.info.dark))),P(m.Alert,"successFilledColor",kt(()=>m.getContrastText(m.success.dark))),P(m.Alert,"warningFilledColor",kt(()=>m.getContrastText(m.warning.dark))),P(m.Alert,"errorStandardBg",je(m.error.light,.9)),P(m.Alert,"infoStandardBg",je(m.info.light,.9)),P(m.Alert,"successStandardBg",je(m.success.light,.9)),P(m.Alert,"warningStandardBg",je(m.warning.light,.9)),P(m.Alert,"errorIconColor",z("palette-error-main")),P(m.Alert,"infoIconColor",z("palette-info-main")),P(m.Alert,"successIconColor",z("palette-success-main")),P(m.Alert,"warningIconColor",z("palette-warning-main")),P(m.AppBar,"defaultBg",z("palette-grey-900")),P(m.AppBar,"darkBg",z("palette-background-paper")),P(m.AppBar,"darkColor",z("palette-text-primary")),P(m.Avatar,"defaultBg",z("palette-grey-600")),P(m.Button,"inheritContainedBg",z("palette-grey-800")),P(m.Button,"inheritContainedHoverBg",z("palette-grey-700")),P(m.Chip,"defaultBorder",z("palette-grey-700")),P(m.Chip,"defaultAvatarColor",z("palette-grey-300")),P(m.Chip,"defaultIconColor",z("palette-grey-300")),P(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(m.LinearProgress,"primaryBg",je(m.primary.main,.5)),P(m.LinearProgress,"secondaryBg",je(m.secondary.main,.5)),P(m.LinearProgress,"errorBg",je(m.error.main,.5)),P(m.LinearProgress,"infoBg",je(m.info.main,.5)),P(m.LinearProgress,"successBg",je(m.success.main,.5)),P(m.LinearProgress,"warningBg",je(m.warning.main,.5)),P(m.Skeleton,"bg",`rgba(${z("palette-text-primaryChannel")} / 0.13)`),P(m.Slider,"primaryTrack",je(m.primary.main,.5)),P(m.Slider,"secondaryTrack",je(m.secondary.main,.5)),P(m.Slider,"errorTrack",je(m.error.main,.5)),P(m.Slider,"infoTrack",je(m.info.main,.5)),P(m.Slider,"successTrack",je(m.success.main,.5)),P(m.Slider,"warningTrack",je(m.warning.main,.5));const I=Dn(m.background.default,.98);P(m.SnackbarContent,"bg",I),P(m.SnackbarContent,"color",kt(()=>m.getContrastText(I))),P(m.SpeedDialAction,"fabHoverBg",Dn(m.background.paper,.15)),P(m.StepConnector,"border",z("palette-grey-600")),P(m.StepContent,"border",z("palette-grey-600")),P(m.Switch,"defaultColor",z("palette-grey-300")),P(m.Switch,"defaultDisabledColor",z("palette-grey-600")),P(m.Switch,"primaryDisabledColor",je(m.primary.main,.55)),P(m.Switch,"secondaryDisabledColor",je(m.secondary.main,.55)),P(m.Switch,"errorDisabledColor",je(m.error.main,.55)),P(m.Switch,"infoDisabledColor",je(m.info.main,.55)),P(m.Switch,"successDisabledColor",je(m.success.main,.55)),P(m.Switch,"warningDisabledColor",je(m.warning.main,.55)),P(m.TableCell,"border",je($n(m.divider,1),.68)),P(m.Tooltip,"bg",$n(m.grey[700],.92))}It(m.background,"default"),It(m.background,"paper"),It(m.common,"background"),It(m.common,"onBackground"),It(m,"divider"),Object.keys(m).forEach(I=>{const U=m[I];I!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&P(m[I],"mainChannel",ln(cn(U.main))),U.light&&P(m[I],"lightChannel",ln(cn(U.light))),U.dark&&P(m[I],"darkChannel",ln(cn(U.dark))),U.contrastText&&P(m[I],"contrastTextChannel",ln(cn(U.contrastText))),I==="text"&&(It(m[I],"primary"),It(m[I],"secondary")),I==="action"&&(U.active&&It(m[I],"active"),U.selected&&It(m[I],"selected")))})}),k=t.reduce((W,m)=>ot(W,m),k);const v={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:Wd(k)},{vars:B,generateThemeVars:_,generateStyleSheets:K}=yd(k,v);return k.vars=B,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([W,m])=>{k[W]=m}),k.generateThemeVars=_,k.generateStyleSheets=K,k.generateSpacing=function(){return hl(p.spacing,_a(this))},k.getColorSchemeSelector=gd(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Tn,...p==null?void 0:p.unstable_sxConfig},k.unstable_sx=function(m){return Jr({sx:m,theme:this})},k.toRuntimeSource=El,k}function Yo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ia({...r===!0?{}:r.palette,mode:t})})}function Gd(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...o}=e,s=a||"light",l=i==null?void 0:i[s],p={...i,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ta(e,...t);let u=r;"palette"in e||p[s]&&(p[s]!==!0?u=p[s].palette:s==="dark"&&(u={mode:"dark"}));const d=ta({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=p,d.palette.mode==="light"&&(d.colorSchemes.light={...p.light!==!0&&p.light,palette:d.palette},Yo(d,"dark",p.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:d.palette},Yo(d,"light",p.light)),d}return!r&&!("light"in p)&&s==="light"&&(p.light=!0),Yd({...o,colorSchemes:p,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const Zd=Gd(),Xd="$$material";function Jd(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ef=e=>Jd(e)&&e!=="classes",lt=Jp({themeId:Xd,defaultTheme:Zd,rootShouldForwardProp:ef});function tf(){return Rp}const kr=dd;process.env.NODE_ENV!=="production"&&(w.node,w.object.isRequired);function jr(e){return pd(e)}function rf(e){return typeof e.main=="string"}function nf(e,t=[]){if(!rf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ei(e=[]){return([,t])=>t&&nf(t,e)}function af(e){return sr("MuiTypography",e)}Or("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const of={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sf=tf(),lf=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${$e(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return tn(s,af,o)},cf=lt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${$e(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(kr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(ei()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${$e(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),Go={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ol=re.forwardRef(function(t,r){const{color:n,...i}=jr({props:t,name:"MuiTypography"}),a=!of[n],o=sf({...i,...a&&{color:n}}),{align:s="inherit",className:l,component:p,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:x="body1",variantMapping:S=Go,...c}=o,b={...o,align:s,color:n,className:l,component:p,gutterBottom:u,noWrap:d,paragraph:f,variant:x,variantMapping:S},g=p||(f?"p":S[x]||Go[x])||"span",j=lf(b);return h.jsx(cf,{as:g,ref:r,className:Ge(j.root,l),...c,ownerState:b,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...c.style}})});process.env.NODE_ENV!=="production"&&(Ol.propTypes={align:w.oneOf(["center","inherit","justify","left","right"]),children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),w.string]),component:w.elementType,gutterBottom:w.bool,noWrap:w.bool,paragraph:w.bool,style:w.object,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOfType([w.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),w.string]),variantMapping:w.object});const Ma=re.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ma.displayName="FormControlContext");function uf(){return re.useContext(Ma)}function pf(e){return sr("MuiInputAdornment",e)}const Zo=Or("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Xo;const df=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${$e(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},ff=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:o}=e,s={root:["root",r&&"disablePointerEvents",i&&`position${$e(i)}`,o,n&&"hiddenLabel",a&&`size${$e(a)}`]};return tn(s,pf,t)},mf=lt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:df})(kr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Zo.positionStart}&:not(.${Zo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),jl=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:o="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:p,variant:u,...d}=n,f=uf()||{};let x=u;u&&f.variant&&process.env.NODE_ENV!=="production"&&u===f.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),f&&!x&&(x=f.variant);const S={...n,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:p,variant:x},c=ff(S);return h.jsx(Ma.Provider,{value:null,children:h.jsx(mf,{as:o,ownerState:S,className:Ge(c.root,a),ref:r,...d,children:typeof i=="string"&&!l?h.jsx(Ol,{color:"textSecondary",children:i}):h.jsxs(re.Fragment,{children:[p==="start"?Xo||(Xo=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(jl.propTypes={children:w.node,classes:w.object,className:w.string,component:w.elementType,disablePointerEvents:w.bool,disableTypography:w.bool,position:w.oneOf(["end","start"]).isRequired,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),variant:w.oneOf(["filled","outlined","standard"])});function za(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function hf(e){return sr("MuiSvgIcon",e)}Or("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const yf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${$e(t)}`,`fontSize${$e(r)}`]};return tn(i,hf,n)},gf=lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$e(r.color)}`],t[`fontSize${$e(r.fontSize)}`]]}})(kr(({theme:e})=>{var t,r,n,i,a,o,s,l,p,u,d,f,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:c=>!c.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:o.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:u.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,c])=>c&&c.main).map(([c])=>{var b,g;return{props:{color:c},style:{color:(g=(b=(e.vars??e).palette)==null?void 0:b[c])==null?void 0:g.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(S=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ti=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:l="medium",htmlColor:p,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...x}=n,S=re.isValidElement(i)&&i.type==="svg",c={...n,color:o,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:S},b={};u||(b.viewBox=f);const g=yf(c);return h.jsxs(gf,{as:s,className:Ge(g.root,a),focusable:"false",color:p,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...x,...S&&i.props,ownerState:c,children:[S?i.props.children:i,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ti.propTypes={children:w.node,classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),w.string]),component:w.elementType,fontSize:w.oneOfType([w.oneOf(["inherit","large","medium","small"]),w.string]),htmlColor:w.string,inheritViewBox:w.bool,shapeRendering:w.string,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),titleAccess:w.string,viewBox:w.string});ti.muiName="SvgIcon";function St(e,t){function r(n,i){return h.jsx(ti,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ti.muiName,re.memo(re.forwardRef(r))}let Jo=0;function xf(e){const[t,r]=re.useState(e),n=e||t;return re.useEffect(()=>{t==null&&(Jo+=1,r(`mui-${Jo}`))},[t]),n}const vf={...re},es=vf.useId;function bf(e){if(es!==void 0){const t=es();return e??t}return xf(e)}function Nn(e){const t=re.useRef(e);return id(()=>{t.current=e}),re.useRef((...r)=>(0,t.current)(...r)).current}function ts(...e){const t=re.useRef(void 0),r=re.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return re.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const wf=w.oneOfType([w.func,w.object]);function Sf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Cf(e,t,r,n,i){const a=e[t],o=i||t;if(a==null||typeof window>"u")return null;let s;return typeof a=="function"&&!Sf(a)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${o}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ef=za(w.elementType,Cf);function rs(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
+
`))}return!1}const ns={};function Fl(e,t){const r=re.useRef(ns);return r.current===ns&&(r.current=e(t)),r}class ri{constructor(){rn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ri}static use(){const t=Fl(ri.create).current,[r,n]=re.useState(!1);return t.shouldMount=r,t.setShouldMount=n,re.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=Tf(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function kf(){return ri.use()}function Tf(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function ra(){return ra=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},ra.apply(null,arguments)}function Of(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 na(e,t){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},na(e,t)}function jf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,na(e,t)}const is=D.createContext(null);function Ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Va(e,t){var r=function(a){return t&&D.isValidElement(a)?t(a):a},n=Object.create(null);return e&&D.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function Af(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var o,s={};for(var l in t){if(n[l])for(o=0;o<n[l].length;o++){var p=n[l][o];s[n[l][o]]=r(p)}s[l]=r(l)}for(o=0;o<i.length;o++)s[i[o]]=r(i[o]);return s}function fr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function _f(e,t){return Va(e.children,function(r){return D.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:fr(r,"appear",e),enter:fr(r,"enter",e),exit:fr(r,"exit",e)})})}function Rf(e,t,r){var n=Va(e.children),i=Af(t,n);return Object.keys(i).forEach(function(a){var o=i[a];if(D.isValidElement(o)){var s=a in t,l=a in n,p=t[a],u=D.isValidElement(p)&&!p.props.in;l&&(!s||u)?i[a]=D.cloneElement(o,{onExited:r.bind(null,o),in:!0,exit:fr(o,"exit",e),enter:fr(o,"enter",e)}):!l&&s&&!u?i[a]=D.cloneElement(o,{in:!1}):l&&s&&D.isValidElement(p)&&(i[a]=D.cloneElement(o,{onExited:r.bind(null,o),in:p.props.in,exit:fr(o,"exit",e),enter:fr(o,"enter",e)}))}}),i}var $f=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Df={component:"div",childFactory:function(t){return t}},Ba=function(e){jf(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=a.handleExited.bind(Ff(a));return a.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var o=a.children,s=a.handleExited,l=a.firstRender;return{children:l?_f(i,s):Rf(i,o,s),firstRender:!1}},r.handleExited=function(i,a){var o=Va(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(s){var l=ra({},s.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,a=i.component,o=i.childFactory,s=Of(i,["component","childFactory"]),l=this.state.contextValue,p=$f(this.state.children).map(o);return delete s.appear,delete s.enter,delete s.exit,a===null?D.createElement(is.Provider,{value:l},p):D.createElement(is.Provider,{value:l},D.createElement(a,s,p))},t}(D.Component);Ba.propTypes=process.env.NODE_ENV!=="production"?{component:w.any,children:w.node,appear:w.bool,enter:w.bool,exit:w.bool,childFactory:w.func}:{};Ba.defaultProps=Df;const Pf=[];function If(e){re.useEffect(e,Pf)}class Na{constructor(){rn(this,"currentId",null);rn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});rn(this,"disposeEffect",()=>this.clear)}static create(){return new Na}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Mf(){const e=Fl(Na.create).current;return If(e.disposeEffect),e}function Al(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:l,timeout:p}=e,[u,d]=re.useState(!1),f=Ge(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),x={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},S=Ge(r.child,u&&r.childLeaving,n&&r.childPulsate);return!s&&!u&&d(!0),re.useEffect(()=>{if(!s&&l!=null){const c=setTimeout(l,p);return()=>{clearTimeout(c)}}},[l,s,p]),h.jsx("span",{className:f,style:x,children:h.jsx("span",{className:S})})}process.env.NODE_ENV!=="production"&&(Al.propTypes={classes:w.object.isRequired,className:w.string,in:w.bool,onExited:w.func,pulsate:w.bool,rippleSize:w.number,rippleX:w.number,rippleY:w.number,timeout:w.number.isRequired});const dt=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ia=550,zf=80,Vf=Tr.keyframes`
|
|
76
76
|
0% {
|
|
77
77
|
transform: scale(0);
|
|
78
78
|
opacity: 0.1;
|
|
@@ -102,7 +102,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
102
102
|
100% {
|
|
103
103
|
transform: scale(1);
|
|
104
104
|
}
|
|
105
|
-
`,Lf=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),qf=lt(
|
|
105
|
+
`,Lf=lt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),qf=lt(Al,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
106
106
|
opacity: 0;
|
|
107
107
|
position: absolute;
|
|
108
108
|
|
|
@@ -145,7 +145,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
145
145
|
animation-iteration-count: infinite;
|
|
146
146
|
animation-delay: 200ms;
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`,_l=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o,...s}=n,[l,p]=re.useState([]),u=re.useRef(0),d=re.useRef(null);re.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=re.useRef(!1),x=Mf(),S=re.useRef(null),c=re.useRef(null),b=re.useCallback(k=>{const{pulsate:v,rippleX:B,rippleY:_,rippleSize:K,cb:W}=k;p(m=>[...m,h.jsx(qf,{classes:{ripple:Ge(a.ripple,dt.ripple),rippleVisible:Ge(a.rippleVisible,dt.rippleVisible),ripplePulsate:Ge(a.ripplePulsate,dt.ripplePulsate),child:Ge(a.child,dt.child),childLeaving:Ge(a.childLeaving,dt.childLeaving),childPulsate:Ge(a.childPulsate,dt.childPulsate)},timeout:ia,pulsate:v,rippleX:B,rippleY:_,rippleSize:K},u.current)]),u.current+=1,d.current=W},[a]),g=re.useCallback((k={},v={},B=()=>{})=>{const{pulsate:_=!1,center:K=i||v.pulsate,fakeElement:W=!1}=v;if((k==null?void 0:k.type)==="mousedown"&&f.current){f.current=!1;return}(k==null?void 0:k.type)==="touchstart"&&(f.current=!0);const m=W?null:c.current,z=m?m.getBoundingClientRect():{width:0,height:0,left:0,top:0};let I,U,N;if(K||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)I=Math.round(z.width/2),U=Math.round(z.height/2);else{const{clientX:X,clientY:ae}=k.touches&&k.touches.length>0?k.touches[0]:k;I=Math.round(X-z.left),U=Math.round(ae-z.top)}if(K)N=Math.sqrt((2*z.width**2+z.height**2)/3),N%2===0&&(N+=1);else{const X=Math.max(Math.abs((m?m.clientWidth:0)-I),I)*2+2,ae=Math.max(Math.abs((m?m.clientHeight:0)-U),U)*2+2;N=Math.sqrt(X**2+ae**2)}k!=null&&k.touches?S.current===null&&(S.current=()=>{b({pulsate:_,rippleX:I,rippleY:U,rippleSize:N,cb:B})},x.start(zf,()=>{S.current&&(S.current(),S.current=null)})):b({pulsate:_,rippleX:I,rippleY:U,rippleSize:N,cb:B})},[i,b,x]),j=re.useCallback(()=>{g({},{pulsate:!0})},[g]),$=re.useCallback((k,v)=>{if(x.clear(),(k==null?void 0:k.type)==="touchend"&&S.current){S.current(),S.current=null,x.start(0,()=>{$(k,v)});return}S.current=null,p(B=>B.length>0?B.slice(1):B),d.current=v},[x]);return re.useImperativeHandle(r,()=>({pulsate:j,start:g,stop:$}),[j,g,$]),h.jsx(Lf,{className:Ge(dt.root,a.root,o),ref:c,...s,children:h.jsx(Ba,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(_l.propTypes={center:w.bool,classes:w.object,className:w.string});function Uf(e){return sr("MuiButtonBase",e)}const Wf=Or("MuiButtonBase",["root","disabled","focusVisible"]),Hf=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,o=tn({root:["root",t&&"disabled",r&&"focusVisible"]},Uf,i);return r&&n&&(o.root+=` ${n}`),o},Kf=lt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Wf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Rl=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:l="button",disabled:p=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:x,LinkComponent:S="a",onBlur:c,onClick:b,onContextMenu:g,onDragLeave:j,onFocus:$,onFocusVisible:k,onKeyDown:v,onKeyUp:B,onMouseDown:_,onMouseLeave:K,onMouseUp:W,onTouchEnd:m,onTouchMove:z,onTouchStart:I,tabIndex:U=0,TouchRippleProps:N,touchRippleRef:X,type:ae,...me}=n,ie=re.useRef(null),oe=kf(),V=ts(oe.ref,X),[H,pe]=re.useState(!1);p&&H&&pe(!1),re.useImperativeHandle(i,()=>({focusVisible:()=>{pe(!0),ie.current.focus()}}),[]);const he=oe.shouldMount&&!u&&!p;re.useEffect(()=>{H&&f&&!u&&oe.pulsate()},[u,f,H,oe]);const se=Mt(oe,"start",_,d),q=Mt(oe,"stop",g,d),Z=Mt(oe,"stop",j,d),ne=Mt(oe,"stop",W,d),ce=Mt(oe,"stop",T=>{H&&T.preventDefault(),K&&K(T)},d),fe=Mt(oe,"start",I,d),de=Mt(oe,"stop",m,d),L=Mt(oe,"stop",z,d),M=Mt(oe,"stop",T=>{rs(T.target)||pe(!1),c&&c(T)},!1),ee=Nn(T=>{ie.current||(ie.current=T.currentTarget),rs(T.target)&&(pe(!0),k&&k(T)),$&&$(T)}),ye=()=>{const T=ie.current;return l&&l!=="button"&&!(T.tagName==="A"&&T.href)},xe=Nn(T=>{f&&!T.repeat&&H&&T.key===" "&&oe.stop(T,()=>{oe.start(T)}),T.target===T.currentTarget&&ye()&&T.key===" "&&T.preventDefault(),v&&v(T),T.target===T.currentTarget&&ye()&&T.key==="Enter"&&!p&&(T.preventDefault(),b&&b(T))}),Ue=Nn(T=>{f&&T.key===" "&&H&&!T.defaultPrevented&&oe.stop(T,()=>{oe.pulsate(T)}),B&&B(T),b&&T.target===T.currentTarget&&ye()&&T.key===" "&&!T.defaultPrevented&&b(T)});let Ne=l;Ne==="button"&&(me.href||me.to)&&(Ne=S);const Ze={};Ne==="button"?(Ze.type=ae===void 0?"button":ae,Ze.disabled=p):(!me.href&&!me.to&&(Ze.role="button"),p&&(Ze["aria-disabled"]=p));const ue=ts(r,ie),y={...n,centerRipple:a,component:l,disabled:p,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:U,focusVisible:H},O=Hf(y);return h.jsxs(Kf,{as:Ne,className:Ge(O.root,s),ownerState:y,onBlur:M,onClick:b,onContextMenu:q,onFocus:ee,onKeyDown:xe,onKeyUp:Ue,onMouseDown:se,onMouseLeave:ce,onMouseUp:ne,onDragLeave:Z,onTouchEnd:de,onTouchMove:L,onTouchStart:fe,ref:ue,tabIndex:p?-1:U,type:ae,...Ze,...me,children:[o,he?h.jsx(_l,{ref:V,center:a,...N}):null]})});function Mt(e,t,r,n=!1){return Nn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(Rl.propTypes={action:wf,centerRipple:w.bool,children:w.node,classes:w.object,className:w.string,component:Ef,disabled:w.bool,disableRipple:w.bool,disableTouchRipple:w.bool,focusRipple:w.bool,focusVisibleClassName:w.string,href:w.any,LinkComponent:w.elementType,onBlur:w.func,onClick:w.func,onContextMenu:w.func,onDragLeave:w.func,onFocus:w.func,onFocusVisible:w.func,onKeyDown:w.func,onKeyUp:w.func,onMouseDown:w.func,onMouseLeave:w.func,onMouseUp:w.func,onTouchEnd:w.func,onTouchMove:w.func,onTouchStart:w.func,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),tabIndex:w.number,TouchRippleProps:w.object,touchRippleRef:w.oneOfType([w.func,w.shape({current:w.shape({pulsate:w.func.isRequired,start:w.func.isRequired,stop:w.func.isRequired})})]),type:w.oneOfType([w.oneOf(["button","reset","submit"]),w.string])});function Qf(e){return sr("MuiCircularProgress",e)}Or("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qt=44,aa=Tr.keyframes`
|
|
149
149
|
0% {
|
|
150
150
|
transform: rotate(0deg);
|
|
151
151
|
}
|
|
@@ -172,12 +172,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
172
172
|
animation: ${aa} 1.4s linear infinite;
|
|
173
173
|
`:null,Gf=typeof oa!="string"?Tr.css`
|
|
174
174
|
animation: ${oa} 1.4s ease-in-out infinite;
|
|
175
|
-
`:null,Zf=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${$e(n)}`],svg:["svg"],circle:["circle",`circle${$e(r)}`,i&&"circleDisableShrink"]};return tn(a,Qf,t)},Xf=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${$e(r.color)}`]]}})(kr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Yf||{animation:`${aa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ei()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jf=lt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),
|
|
176
|
-
`)):null),classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),w.string]),disabled:w.bool,disableFocusRipple:w.bool,disableRipple:w.bool,edge:w.oneOf(["end","start",!1]),id:w.string,loading:w.bool,loadingIndicator:w.node,size:w.oneOfType([w.oneOf(["small","medium","large"]),w.string]),sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object])});const as=St(m.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),os=St(m.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),ah=St(m.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),La=St(m.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ni=St(m.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),oh=St(m.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),Q={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},ss=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},sh=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),zt=(e,t,r)=>{const n=ss(e),i=ss(t);return sh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},qa=e=>{const t="#FFFFFF",r="#000000";return{50:zt(t,e,.08),100:zt(t,e,.16),200:zt(t,e,.28),300:zt(t,e,.4),400:zt(t,e,.55),500:e,600:zt(e,r,.1),700:zt(e,r,.2),800:zt(e,r,.3),900:zt(e,r,.42)}},lh=qa(Q.primary.main),ch=qa(Q.secondary.main),nt=qa(Q.text.primary),uh={primary:Q.primary.main,secondary:Q.secondary.main,textPrimary:Q.text.primary,textSecondary:Q.text.secondary,divider:Q.divider,background:Q.background},sa=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:l="6px",endorsementHeight:p=28,endorsementPaddingX:u="8px",...d})=>{var c,b;const f=!!r,x=a?m.jsx(E.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:u,paddingRight:u,borderRadius:l,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,S={...d.InputProps,endAdornment:x||i?m.jsxs(E.InputAdornment,{sx:{mr:-1},position:"end",children:[x||i,(c=d.InputProps)==null?void 0:c.endAdornment]}):(b=d.InputProps)==null?void 0:b.endAdornment};return m.jsxs(E.Box,{children:[f&&m.jsx(E.Typography,{variant:n,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:r}),m.jsx(E.TextField,{fullWidth:!0,size:"small",...d,InputProps:S,label:f?void 0:d.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary},"& .MuiFormLabel-root":{color:Q.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:Q.text.primary},"& .MuiFormHelperText-root":{color:e?Q.error.main:Q.text.secondary},...t}})]})},$l=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:l,sx:p,...u})=>{const d=$.useId(),f=l==null||l===""||Array.isArray(l)&&l.length===0,x=S=>m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...S,children:m.jsx("path",{d:"M6 9l6 6 6-6",stroke:Q.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return m.jsxs(E.FormControl,{fullWidth:!0,size:a,error:!!u.error,variant:"outlined",children:[e&&m.jsx(E.Typography,{variant:o,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:e}),t&&m.jsx(E.InputLabel,{id:d,shrink:!f||!!s,sx:{color:Q.text.secondary,"&.Mui-focused":{color:Q.text.primary},"&.Mui-error":{color:Q.error.main}},children:t}),m.jsx(E.Select,{...u,value:l,labelId:t?d:void 0,label:t,displayEmpty:!0,input:m.jsx(E.OutlinedInput,{label:t}),IconComponent:x,renderValue:S=>{const c=S;if(f)return m.jsx("span",{style:{color:Q.text.secondary},children:s??""});const b=r.find(g=>g.value===c);return(b==null?void 0:b.label)??String(c)},endAdornment:n?m.jsx(E.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${Q.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:Q.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:Q.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:Q.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:nt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:nt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:Q.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?m.jsx(E.MenuItem,{disabled:!0,children:m.jsx(E.CircularProgress,{size:16})}):r.map(S=>m.jsx(E.MenuItem,{value:S.value,sx:{backgroundColor:Q.background.paper,color:Q.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:nt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:nt[50],borderRadius:"4px"}},children:S.label},S.value))}),i&&m.jsx(E.FormHelperText,{children:i})]})},ph=e=>m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:m.jsx("path",{d:"M6 9l6 6 6-6",stroke:Q.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Dl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:l="subtitle2",disabled:p,loading:u,error:d,helperText:f,onOpen:x,noOptionsText:S,sx:c})=>m.jsxs(E.Box,{children:[a&&m.jsx(E.Typography,{variant:l,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:a}),m.jsx(E.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:m.jsx(ph,{}),disabled:p,loading:u,onOpen:x,noOptionsText:S,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${Q.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:Q.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...c},getOptionLabel:b=>typeof b=="string"?b:(b==null?void 0:b.label)??"",isOptionEqualToValue:(b,g)=>((b==null?void 0:b.value)??b)===((g==null?void 0:g.value)??g),renderOption:(b,g,{selected:j})=>m.jsxs(E.Box,{component:"li",...b,sx:{backgroundColor:Q.background.paper,color:Q.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:nt[50]},"&.Mui-focused":{backgroundColor:nt[50]},...j?{backgroundColor:nt[50]}:{}},children:[n&&m.jsx(E.Checkbox,{checked:j}),m.jsx(E.Typography,{variant:"body2",sx:{color:Q.text.primary,fontSize:14},children:typeof g=="string"?g:g.label})]}),renderInput:b=>m.jsx(E.TextField,{...b,label:i,placeholder:o,size:"small",error:d,helperText:f,InputLabelProps:{shrink:!!r||!!o,sx:{color:Q.text.secondary,"&.Mui-focused":{color:Q.text.primary},"&.Mui-error":{color:Q.error.main}}},InputProps:{...b.InputProps,endAdornment:m.jsxs(m.Fragment,{children:[u?m.jsx(E.CircularProgress,{size:20}):null,b.InputProps.endAdornment]})}}),onChange:(b,g)=>s(g)})]}),la=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>m.jsx(E.FormControlLabel,{control:m.jsx(E.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ca=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>m.jsx(E.FormControlLabel,{control:m.jsx(E.Switch,{checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ua=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:l,error:p,groupPadding:u=1.5,itemGap:d=1})=>m.jsxs(E.FormControl,{error:p,sx:f=>{var x;return{display:"flex",flexDirection:"column",px:f.spacing(u),borderRadius:((x=f.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:f.palette.background.paper}},children:[o==="top"&&e&&m.jsx(E.Typography,{variant:s,sx:f=>({color:f.palette.text.primary,mb:.5,fontSize:f.typography.fontSize,fontWeight:500}),children:e}),t&&m.jsx(E.FormLabel,{sx:f=>({color:f.palette.text.secondary,mb:.5,mx:1,fontSize:f.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:f.palette.text.primary},"&.Mui-error":{color:f.palette.error.main}}),children:t}),m.jsx(E.RadioGroup,{row:i,value:r,onChange:f=>a(f.target.value),sx:f=>({display:"flex",flexDirection:i?"row":"column",gap:f.spacing(d),alignItems:i?"center":"flex-start",mt:-1}),children:n.map(f=>m.jsx(E.FormControlLabel,{value:f.value,control:m.jsx(E.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:f.label,sx:x=>({m:0,"& .MuiFormControlLabel-label":{color:x.palette.text.primary,fontSize:14}})},String(f.value)))}),l&&m.jsx(E.FormHelperText,{sx:{mt:.5},children:l})]}),Pl=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>m.jsxs(E.Box,{children:[e==="top"&&r&&m.jsx(E.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),m.jsx(E.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),Il=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const o=!!e;return m.jsxs(E.Box,{children:[o&&m.jsx(E.Typography,{variant:t,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:e}),m.jsx(E.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:o?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:Q.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:Q.text.primary},"& .MuiFormHelperText-root":{color:r?Q.error.main:Q.text.secondary},...n}})]})},Ml=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>m.jsxs(E.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[m.jsxs(E.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&m.jsx(E.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&m.jsx(E.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&m.jsx(E.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),dh=()=>m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:m.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),m.jsx("defs",{children:m.jsx("clipPath",{id:"clip0_5814_24904",children:m.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function fh({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:l=!0,renderItem:p,chipText:u,helperText:d}){const[f,x]=$.useState(null),[S,c]=$.useState(null),b=k=>v=>{if(!i){x(k),v.dataTransfer.effectAllowed="move";try{v.dataTransfer.setData("text/plain",String(t(e[k])))}catch{}}},g=k=>v=>{i||(v.preventDefault(),c(k),v.dataTransfer.dropEffect="move")},j=k=>v=>{if(i)return;if(v.preventDefault(),f===null||f===k){x(null),c(null);return}const B=[...e],[A]=B.splice(f,1);B.splice(k,0,A),x(null),c(null),r(B)},R=()=>{x(null),c(null)};return m.jsxs(E.Box,{role:"list",sx:k=>({display:"flex",flexDirection:"column",gap:k.spacing(1),...a}),children:[n,m.jsx(E.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((k,v)=>{const B=f===v,A=S===v&&f!==null&&f!==v;return m.jsx(E.Box,{role:"listitem",draggable:!i,onDragStart:b(v),onDragOver:g(v),onDrop:j(v),onDragEnd:R,sx:K=>{var W;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${A?K.palette.primary.main:"#EBEBEB"}`,borderRadius:((W=K.shape)==null?void 0:W.borderRadius)||"8px",padding:K.spacing(1),opacity:B?.6:1,boxShadow:A?`0 0 0 2px ${K.palette.primary.main}33`:"none"}},children:p?p(k,B):m.jsxs(E.Box,{sx:K=>({display:"flex",alignItems:"center",gap:K.spacing(1),minWidth:0}),children:[l&&m.jsx(dh,{}),s&&m.jsxs(E.Typography,{variant:"body2",sx:K=>({fontWeight:600,fontSize:14,color:`${K.palette.text.primary}`,flex:"0 0 auto"}),children:[v+1,"."]}),(()=>{const K=typeof u=="function"?u(k,v):u;return K?m.jsx(E.Chip,{label:K,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),m.jsx(E.Typography,{variant:"body2",sx:K=>({fontSize:12,fontWeight:500,color:`${K.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(k):""})]})},String(t(k)))}),d?typeof d=="string"?m.jsx(E.Typography,{variant:"caption",sx:k=>({color:`${k.palette.text.primary}60`}),children:d}):d:null]})}const hh=lt(E.StepConnector)(()=>({[`&.${E.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${E.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${E.stepConnectorClasses.completed} .${E.stepConnectorClasses.line}`]:{borderColor:Q.primary.main}})),mh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:o,completed:s,icon:l}=a;return s?m.jsx(E.Box,{sx:{width:24,height:24,border:`1.2px solid ${Q.primary.main}`,borderRadius:"50%",backgroundColor:Q.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:m.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):o?m.jsx(E.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${Q.primary.main}`,backgroundColor:$t(Q.primary.main,.2),color:Q.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):m.jsx(E.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:Q.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return m.jsx(E.Stepper,{orientation:"vertical",activeStep:t,connector:m.jsx(hh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:Q.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,o)=>m.jsxs(E.Step,{onClick:()=>r==null?void 0:r(o),completed:o<t,children:[m.jsx(E.StepLabel,{StepIconComponent:i,children:m.jsx(E.Typography,{sx:{fontSize:12,fontWeight:500,color:o===t?Q.primary.main:Q.text.primary},children:a.label})}),o!==e.length-1&&m.jsx(E.Divider,{sx:{ml:4.2,borderColor:Q.divider}})]},o))})},zl=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...o})=>m.jsx(E.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${$t(t||s.palette.text.primary,.5)}`,backgroundColor:$t(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),yh=lt(E.StepConnector)(()=>({[`&.${E.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${E.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${E.stepConnectorClasses.completed} .${E.stepConnectorClasses.line}`]:{borderColor:Q.primary.main}})),gh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),o=s=>{const{active:l,completed:p,icon:u}=s;return p?m.jsx(E.Box,{sx:{width:24,height:24,border:`1.2px solid ${Q.primary.main}`,borderRadius:"50%",backgroundColor:Q.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:m.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):l?m.jsx(E.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${Q.primary.main}`,backgroundColor:$t(Q.primary.main,.2),color:Q.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:u}):m.jsx(E.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:Q.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:u})};return m.jsx(E.Stepper,{orientation:"vertical",activeStep:t,connector:m.jsx(yh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:Q.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((s,l)=>m.jsxs(E.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[m.jsxs(E.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[m.jsxs(E.StepLabel,{StepIconComponent:o,children:[m.jsxs(E.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[m.jsx(E.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?Q.primary.main:Q.text.primary},children:s.label}),m.jsx(zl,{size:"small",colorHex:l<t?Q.success.main:l===t?"#973B00":Q.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),m.jsx(E.Typography,{sx:{fontSize:12,fontWeight:400,color:`${Q.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===l&&m.jsx(E.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&m.jsx(E.Divider,{sx:{ml:4.2,borderColor:Q.divider}})]},l))})},xh=St(m.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),vh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:o,sx:s})=>{const l=o||Q.info.main,p=$t(l,.08),u=$t(l,.08),d=a??m.jsx(xh,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?m.jsxs(E.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:[m.jsx(E.Box,{sx:{display:"flex",alignItems:"center"},children:d}),m.jsx(E.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?m.jsx(E.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:m.jsx(E.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?m.jsxs(E.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${u}`,...s},children:[m.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,m.jsx(E.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&m.jsx(E.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),m.jsx(E.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,x)=>m.jsx(E.ListItem,{sx:{py:0},children:m.jsx(E.ListItemText,{primary:f})},x))})]}):m.jsx(E.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${u}`,boxShadow:"none",...s},children:m.jsx(E.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,x)=>m.jsx(E.ListItem,{sx:{py:0},children:m.jsx(E.ListItemText,{primary:f})},x))})})},Vl=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>m.jsxs(E.Box,{children:[m.jsx(E.Tabs,{value:e,onChange:(o,s)=>t(s),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s;return m.jsx(E.Tab,{value:l,disabled:o.disabled,label:m.jsx(E.Typography,{variant:"body2",children:o.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s,p=o.content??(typeof o.value=="object"?o.value:null);return p&&e===l?m.jsx(E.Box,{sx:{mt:1},children:p},`panel-${l}`):null})]});async function Bl(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:l={},params:p={},body:u,transform:d,passThroughFields:f}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const k=/\{([^}]+)\}/g;x=x.replace(k,(v,B)=>{const A=n[B];return A!=null?encodeURIComponent(String(A)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const S=new URLSearchParams;Object.entries(p).forEach(([k,v])=>{v!=null&&S.append(k,String(v))}),S.toString()&&(x+=`${x.includes("?")?"&":"?"}${S.toString()}`);try{const k=/^https?:\/\//i.test(x),v=new URL(x,k?void 0:"http://local.placeholder"),B=Array.from(v.searchParams.entries());for(const[A,K]of B)(K===""||K==="undefined"||K==="null")&&v.searchParams.delete(A);k?x=v.toString():x=v.pathname+(v.search?v.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const c={"Content-Type":"application/json",...r,...l},b={method:a,headers:c};(a==="POST"||a==="PUT")&&u&&(b.body=JSON.stringify(u));const g=await fetch(x,b);if(!g.ok)throw new Error(`API request failed: ${g.status} ${g.statusText}`);const j=await g.json();if(d)return d(Array.isArray(j)?j:j.data||j);const R=Array.isArray(j)?j:j.data||j;if(!Array.isArray(R))throw new Error("API response is not an array");return R.map(k=>{const v={label:k[s]||k.name||k.title||String(k[o]||""),value:k[o]||k.id||k.value||""},B=Array.isArray(f)?f:void 0;if(Array.isArray(B))for(const A of B)k[A]!==void 0&&(v[A]=k[A]);return v})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function Nl(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const s=n[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,n]),o=$.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Tu({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return Bl(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function ur(e){return!!(e.apiConfig||e.api_endpoint)}function Ua(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function bh(e,t){const r=Ua(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const Ll=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})=>{const s=r[e.name],l=!!s,[p,u]=$.useState(!1),d=$.useRef(!1),[f,x]=$.useState(!1),[S,c]=$.useState(!1),[b,g]=$.useState(!1),j=$.useRef(null),R=$.useRef(null),k=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},v=q=>k()?`${q} *`:q,B=()=>e.value!==void 0?e.value:e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:"",A=$.useMemo(()=>{const q=Ua(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),K=$.useRef(null),W=A!=null&&A.dependsOn?a==null?void 0:a[A.dependsOn]:null,h=$.useMemo(()=>{if(!(A!=null&&A.dependsOn))return!1;const q=W,Z=K.current,ne=q!==Z;return ne&&(K.current=q),ne},[A==null?void 0:A.dependsOn,W]),z=$.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const Z=q.field,ne=q.equals,ce=q.in,fe=Z?(a||{})[Z]:void 0;if(Z&&typeof ne<"u")return fe===ne;if(Z&&Array.isArray(ce))return ce.includes(fe)}return!0},[e.showWhen,a]),I=$.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),U=$.useCallback(()=>{const q=e.endAdornment;if(typeof q=="function")try{return q(a||{})}catch{return}return q},[e,a]),N=$.useMemo(()=>p&&ur(e)&&(!(A!=null&&A.dependsOn)||W),[p,e,A==null?void 0:A.dependsOn,W]),X=$.useMemo(()=>{const q={};if(!a)return q;const Z=(A==null?void 0:A.endpoint)||(e==null?void 0:e.api_endpoint);if(Z&&typeof Z=="string"){const ne=Z.match(/\{([^}]+)\}/g)||[];for(const ce of ne){const fe=ce.slice(1,-1),de=a[fe];de!==void 0&&(q[fe]=de)}}if(A!=null&&A.dependsOn){const ne=A.dependsOn,ce=a[ne];ce!==void 0&&(q[ne]=ce)}return q},[A==null?void 0:A.endpoint,e==null?void 0:e.api_endpoint,A==null?void 0:A.dependsOn,a]),{data:ae=[],isLoading:he,error:ie}=Nl(A,n,i,X,N),oe=$.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]),V=$.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]);$.useEffect(()=>{if(ur(e)&&!d.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(d.current=!0,u(!0))}},[e,a]),$.useEffect(()=>{ur(e)&&(A!=null&&A.dependsOn)&&h&&d.current&&(d.current=!1,u(!1))},[h,A==null?void 0:A.dependsOn]);const H=$.useCallback(()=>ur(e)?ae:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,ae]),ue=()=>{var q,Z,ne,ce,fe,de;switch(e.type){case"title":return m.jsx(E.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return m.jsx(E.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const L=e.actionName,M=e.actionComponent,J=e.actionLabel,ye=pe=>m.jsx(Ml,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:pe??e.actions}),xe=pe=>{if(e.cardWrap){const T={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return m.jsx(E.Card,{sx:T,...e.cardProps,children:pe})}return pe};return xe(L&&M?m.jsx(ct,{name:L,control:t,defaultValue:e.value??!1,render:({field:pe})=>ye(M==="switch"?m.jsx(ca,{label:J,checked:!!pe.value,onChange:pe.onChange}):m.jsx(la,{label:J||"",checked:!!pe.value,onChange:pe.onChange}))}):ye());case"tabs":return m.jsx(ct,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Z=(q=e.items)==null?void 0:q[0])==null?void 0:Z.value)=="string"||typeof((ce=(ne=e.items)==null?void 0:ne[0])==null?void 0:ce.value)=="number"?(de=(fe=e.items)==null?void 0:fe[0])==null?void 0:de.value:0),render:({field:pe})=>m.jsx(Vl,{value:pe.value,onChange:pe.onChange,items:e.items||[],ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx})});case"text":case"email":case"password":case"tel":case"textarea":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>e.type==="textarea"?m.jsx(Il,{...pe,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText}):m.jsx(sa,{...pe,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endorsementText:I(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?f?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:m.jsx(Ol,{position:"end",children:m.jsx(Ln,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:f?m.jsx(os,{}):m.jsx(as,{})})})}:void 0})});case"number":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(sa,{...pe,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endAdornment:U(),endorsementText:I(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const Ue=H();return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx($l,{labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?v(e.label):void 0,labelVariant:e.labelVariant,value:pe.value,onChange:pe.onChange,options:Ue,disabled:e.disabled||he,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?v(e.label):void 0):e.placeholder,loading:he,error:l||!!ie,helperText:(s==null?void 0:s.message)||(ie==null?void 0:ie.message)||e.helperText,onOpen:oe})});case"checkbox":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(la,{label:v(e.label),checked:!!pe.value,disabled:e.disabled,onChange:pe.onChange})});case"toggle":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:pe.value,options:e.options||[],row:!0,onChange:pe.onChange})});case"radio":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:pe.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:pe.onChange})});case"switch":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(ca,{label:v(e.label),checked:!!pe.value,disabled:e.disabled,onChange:pe.onChange})});case"autocomplete":const Ne=H(),Ze=!!(e.disabled||he||A!=null&&A.dependsOn&&!W);return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>{const y=pe.value,T=e.multiple===!0,O=(A==null?void 0:A.valueField)||e.value_field||"value",Y=(A==null?void 0:A.labelField)||e.label_field||"label",F=D=>{if(D!=null){if(typeof D=="string"||typeof D=="number")return D;if(typeof D=="object"){if(D[O]!==void 0)return D[O];if(D.value!==void 0)return D.value;if(D.id!==void 0)return D.id}}},_=(()=>{if(T)return(Array.isArray(y)?y:[]).map(ee=>{const le=Ne.find(Oe=>{const Ae=F(Oe);return Ae!==void 0&&Ae===ee});return le||{[O]:ee,[Y]:`Selected: ${ee}`,value:ee,label:`Selected: ${ee}`}});{if(y==null||y==="")return null;const D=Ne.find(ee=>{const le=F(ee);return le!==void 0&&le===y});return D||{[O]:y,[Y]:`Selected: ${y}`,value:y,label:`Selected: ${y}`}}})();return m.jsx(Dl,{id:e.id,options:Ne,value:_,multiple:T,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,placeholder:Ze&&(A!=null&&A.dependsOn)&&!W?`Please select ${A.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:Ze,loading:he,error:l||!!ie,helperText:(s==null?void 0:s.message)||(ie==null?void 0:ie.message)||e.helperText||"",onOpen:V,noOptionsText:Ze&&(A!=null&&A.dependsOn)&&!W?`Please select ${A.dependsOn.replace(/_/g," ")} first`:he?"Fetching data...":p&&!he&&Ne.length===0?"No options available":"Click to load options",onChange:D=>{const ee=(A==null?void 0:A.valueField)||e.value_field||"value";if(T){const Oe=(Array.isArray(D)?D:[]).map(Ae=>typeof Ae=="object"&&(Ae[ee]||Ae.value||Ae.id)||Ae);pe.onChange(Oe)}else{let le;D&&typeof D=="object"?le=D[ee]||D.value||D.id||D:le=D,pe.onChange(le);const Oe=e.selectedAssignments;if(Oe&&D&&typeof D=="object")for(const[Ae,We]of Object.entries(Oe)){const Ct=D[We];if(Ct!==void 0&&typeof o=="function")try{o(Ae,Ct,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>m.jsx(Pl,{...pe,id:e.name,label:v(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:s==null?void 0:s.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return m.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:pe})=>{const y=pe.value||e.defaultValue||e.src;if(y){const D=e.imageUploaded||{},ee=D.previewText||"Preview",le=D.removeText||"Remove",Oe=D.saveText||"Save logo",Ae=D.showSave!==void 0?D.showSave:!!(e.onSave||D.saveText),We=()=>{if(g(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},Ct=()=>{pe.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:R.current||void 0})},Et=mt=>{const yt=mt.target.files&&mt.target.files[0];if(yt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(yt)}catch{}try{const lr=URL.createObjectURL(yt);pe.onChange(lr)}catch{}R.current=yt,g(!1)}};return m.jsxs(E.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...D.cardSx},children:[m.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Et}),m.jsxs(E.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[m.jsx(E.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...D.thumbnailSx},children:m.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),m.jsxs(E.Box,{sx:{flexGrow:1},children:[m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:500,...D.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),m.jsx(E.Typography,{sx:{fontSize:"10px",...D.fileMetaSx},children:"Image selected"})]}),m.jsxs(E.Box,{sx:{display:"flex",gap:1},children:[m.jsx(E.Button,{type:"button",sx:{...D.previewButtonSx},variant:"outlined",onClick:We,startIcon:m.jsx(as,{}),children:ee}),m.jsx(E.Button,{variant:"outlined",color:"error",onClick:Ct,sx:{...D.removeButtonSx},startIcon:m.jsx(os,{}),children:le}),Ae&&m.jsx(E.Button,{variant:"contained",onClick:Dt,sx:{...D.saveButtonSx},children:Oe})]})]}),m.jsxs(E.Dialog,{open:b,onClose:()=>g(!1),maxWidth:"md",fullWidth:!0,children:[m.jsx(E.DialogTitle,{children:D.previewTitle||"Image preview"}),m.jsx(E.DialogContent,{children:m.jsx(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:m.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),m.jsxs(E.DialogActions,{children:[m.jsx(E.Button,{type:"button",variant:"outlined",onClick:()=>{var mt;return(mt=j.current)==null?void 0:mt.click()},children:D.replaceText||"Replace logo"}),m.jsx(E.Button,{type:"button",variant:"contained",onClick:()=>g(!1),children:D.closeText||"Close"})]})]})]})}const T=e.imagePlaceholder||{},O=T.icon||"upload",Y=j,F=()=>{var D;try{(D=Y.current)==null||D.click()}catch{}},_=D=>{const ee=D.target.files&&D.target.files[0];if(ee){typeof e.onFileSelected=="function"&&e.onFileSelected(ee);try{const le=URL.createObjectURL(ee);pe.onChange(le)}catch{}R.current=ee}};return m.jsxs(E.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...T.sx},children:[m.jsx("input",{type:"file",ref:Y,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:_}),m.jsx(Ln,{sx:{borderRadius:"8px",...T.iconSx},children:O==="image"?m.jsx(oh,{sx:{width:36,height:36,color:"primary.main"}}):m.jsx(ni,{sx:{width:36,height:36,color:"primary.main"}})}),m.jsx(E.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...T.titleSx},children:T.title||"Drag & Drop the image here"}),m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...T.subtitleSx},children:T.subtitle||""}),m.jsx(E.Button,{onClick:F,sx:{my:2,...T.buttonSx},startIcon:m.jsx(ni,{}),variant:"contained",disabled:e.disabled,children:T.buttonText||"Upload File"}),m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:400,...T.helperTextSx},children:T.helperText||e.helperText||""})]})}});case"component":return m.jsx(E.Box,{children:e.render?e.render():e.content});default:return null}},me=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),se=$.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let Z="";q==null?Z="":Array.isArray(q)?Z=q.join(", "):typeof q=="object"?Z=JSON.stringify(q):Z=String(q),await navigator.clipboard.writeText(Z),c(!0),window.setTimeout(()=>c(!1),1200)}catch{}},[a,e.name]);return m.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[m.jsx(E.Box,{sx:{flexGrow:1},children:z?ue():null}),me&&m.jsx(Ln,{"aria-label":`copy ${e.label||e.name}`,onClick:se,size:"small",children:S?m.jsx(La,{fontSize:"small"}):m.jsx(ah,{fontSize:"small"})})]})};var $i,ls;function wh(){if(ls)return $i;ls=1;function e(g){this._maxSize=g,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(g){return this._values[g]},e.prototype.set=function(g,j){return this._size>=this._maxSize&&this.clear(),g in this._values||this._size++,this._values[g]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),l=new e(o),p=new e(o);$i={Cache:e,split:d,normalizePath:u,setter:function(g){var j=u(g);return l.get(g)||l.set(g,function(k,v){for(var B=0,A=j.length,K=k;B<A-1;){var W=j[B];if(W==="__proto__"||W==="constructor"||W==="prototype")return k;K=K[j[B++]]}K[j[B]]=v})},getter:function(g,j){var R=u(g);return p.get(g)||p.set(g,function(v){for(var B=0,A=R.length;B<A;)if(v!=null||!j)v=v[R[B++]];else return;return v})},join:function(g){return g.reduce(function(j,R){return j+(x(R)||r.test(R)?"["+R+"]":(j?".":"")+R)},"")},forEach:function(g,j,R){f(Array.isArray(g)?g:d(g),j,R)}};function u(g){return s.get(g)||s.set(g,d(g).map(function(j){return j.replace(a,"$2")}))}function d(g){return g.match(t)||[""]}function f(g,j,R){var k=g.length,v,B,A,K;for(B=0;B<k;B++)v=g[B],v&&(b(v)&&(v='"'+v+'"'),K=x(v),A=!K&&/^\d+$/.test(v),j.call(R,v,K,A,B,g))}function x(g){return typeof g=="string"&&g&&["'",'"'].indexOf(g.charAt(0))!==-1}function S(g){return g.match(n)&&!g.match(r)}function c(g){return i.test(g)}function b(g){return!x(g)&&(S(g)||c(g))}return $i}var Cr=wh(),Di,cs;function Sh(){if(cs)return Di;cs=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(e)||[],r=u=>u[0].toUpperCase()+u.slice(1),n=(u,d)=>t(u).join(d).toLowerCase(),i=u=>t(u).reduce((d,f)=>`${d}${d?f[0].toUpperCase()+f.slice(1).toLowerCase():f.toLowerCase()}`,"");return Di={words:t,upperFirst:r,camelCase:i,pascalCase:u=>r(i(u)),snakeCase:u=>n(u,"_"),kebabCase:u=>n(u,"-"),sentenceCase:u=>r(n(u," ")),titleCase:u=>t(u).map(r).join(" ")},Di}var Pi=Sh(),Pn={exports:{}},us;function Ch(){if(us)return Pn.exports;us=1,Pn.exports=function(i){return e(t(i),i)},Pn.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),l={},p=o,u=r(a),d=n(i);for(a.forEach(function(x){if(!d.has(x[0])||!d.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)l[p]||f(i[p],p,new Set);return s;function f(x,S,c){if(c.has(x)){var b;try{b=", node was:"+JSON.stringify(x)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!d.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!l[S]){l[S]=!0;var g=u.get(x)||new Set;if(g=Array.from(g),S=g.length){c.add(x);do{var j=g[--S];f(j,d.get(j),c)}while(S);c.delete(x)}s[--o]=x}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var l=i[o];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var l=i[o];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Pn.exports}var Eh=Ch();const kh=Fa(Eh),Th=Object.prototype.toString,Oh=Error.prototype.toString,jh=RegExp.prototype.toString,Fh=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ah=/^Symbol\((.*)\)(.*)$/;function _h(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ps(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _h(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Fh.call(e).replace(Ah,"Symbol($1)");const n=Th.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Oh.call(e)+"]":n==="RegExp"?jh.call(e):null}function nr(e,t){let r=ps(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=ps(this[n],t);return a!==null?a:i},2)}function ql(e){return e==null?[]:[].concat(e)}let Ul,Wl,Hl,Rh=/\$\{\s*(\w+)\s*\}/g;Ul=Symbol.toStringTag;class ds{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ul]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],ql(t).forEach(a=>{if(rt.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Wl=Symbol.hasInstance;Hl=Symbol.toStringTag;class rt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Rh,(i,a)=>nr(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new ds(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Hl]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,rt)}static[Wl](t){return ds[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ot={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${nr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${nr(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${nr(r,!0)}\``+i}},Xe={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Wt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},da={isValue:"${path} field must be ${value}"},qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},$h={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Dh={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``}return rt.formatError(Ot.notType,e)}};Object.assign(Object.create(null),{mixed:Ot,string:Xe,number:Wt,date:pa,object:qn,array:$h,boolean:da,tuple:Dh});const Wa=e=>e&&e.__isYupSchema__;class ii{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new ii(t,(s,l)=>{var p;let u=o(...s)?i:a;return(p=u==null?void 0:u(l))!=null?p:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Wa(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const In={context:"$",value:"."};class Fr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===In.context,this.isValue=this.key[0]===In.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?In.context:this.isValue?In.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Cr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Fr.prototype.__isYupRef=!0;const wt=e=>e==null;function zr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:p,test:u,params:d,message:f,skipAbsent:x}=e;let{parent:S,context:c,abortEarly:b=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function j(z){return Fr.isRef(z)?z.getValue(r,S,c):z}function R(z={}){const I=Object.assign({value:r,originalValue:a,label:o.spec.label,path:z.path||n,spec:o.spec,disableStackTrace:z.disableStackTrace||g},d,z.params);for(const N of Object.keys(I))I[N]=j(I[N]);const U=new rt(rt.formatError(z.message||f,I),r,I.path,z.type||p,I.disableStackTrace);return U.params=I,U}const k=b?s:l;let v={path:n,parent:S,type:p,from:i.from,createError:R,resolve:j,options:i,originalValue:a,schema:o};const B=z=>{rt.isError(z)?k(z):z?l(null):k(R())},A=z=>{rt.isError(z)?k(z):s(z)};if(x&&wt(r))return B(!0);let W;try{var h;if(W=u.call(v,r,v),typeof((h=W)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(B,A)}}catch(z){A(z);return}B(W)}return t.OPTIONS=e,t}function Ph(e,t,r,n=r){let i,a,o;return t?(Cr.forEach(t,(s,l,p)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",f=p?parseInt(u,10):0;if(e.innerType||d){if(d&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&f>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[f],e=d?e.spec.types[f]:e.innerType}if(!p){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[u],e=e.fields[u]}a=u,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class ai extends Set{describe(){const t=[];for(const r of this.values())t.push(Fr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new ai(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Vr(e,t=new Map){if(Wa(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Vr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Vr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Vr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Vr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class st{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ai,this._blacklist=new ai,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ot.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Vr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&wt(a))return a;let o=nr(t),s=nr(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
175
|
+
`:null,Zf=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${$e(n)}`],svg:["svg"],circle:["circle",`circle${$e(r)}`,i&&"circleDisableShrink"]};return tn(a,Qf,t)},Xf=lt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${$e(r.color)}`]]}})(kr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Yf||{animation:`${aa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ei()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jf=lt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),em=lt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${$e(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(kr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Gf||{animation:`${oa} 1.4s ease-in-out infinite`}}]}))),$l=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:l,thickness:p=3.6,value:u=0,variant:d="indeterminate",...f}=n,x={...n,color:a,disableShrink:o,size:s,thickness:p,value:u,variant:d},S=Zf(x),c={},b={},g={};if(d==="determinate"){const j=2*Math.PI*((qt-p)/2);c.strokeDasharray=j.toFixed(3),g["aria-valuenow"]=Math.round(u),c.strokeDashoffset=`${((100-u)/100*j).toFixed(3)}px`,b.transform="rotate(-90deg)"}return h.jsx(Xf,{className:Ge(S.root,i),style:{width:s,height:s,...b,...l},ownerState:x,ref:r,role:"progressbar",...g,...f,children:h.jsx(Jf,{className:S.svg,ownerState:x,viewBox:`${qt/2} ${qt/2} ${qt} ${qt}`,children:h.jsx(em,{className:S.circle,style:c,ownerState:x,cx:qt,cy:qt,r:(qt-p)/2,fill:"none",strokeWidth:p})})})});process.env.NODE_ENV!=="production"&&($l.propTypes={classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","primary","secondary","error","info","success","warning"]),w.string]),disableShrink:za(w.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:w.oneOfType([w.number,w.string]),style:w.object,sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object]),thickness:w.number,value:w.number,variant:w.oneOf(["determinate","indeterminate"])});function tm(e){return sr("MuiIconButton",e)}const as=Or("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),rm=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",r&&"disabled",n!=="default"&&`color${$e(n)}`,i&&`edge${$e(i)}`,`size${$e(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return tn(s,tm,t)},nm=lt(Rl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${$e(r.color)}`],r.edge&&t[`edge${$e(r.edge)}`],t[`size${$e(r.size)}`]]}})(kr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),kr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ei()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ei()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${as.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${as.loading}`]:{color:"transparent"}}))),im=lt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Ln=re.forwardRef(function(t,r){const n=jr({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:o,color:s="default",disabled:l=!1,disableFocusRipple:p=!1,size:u="medium",id:d,loading:f=null,loadingIndicator:x,...S}=n,c=bf(d),b=x??h.jsx($l,{"aria-labelledby":c,color:"inherit",size:16}),g={...n,edge:i,color:s,disabled:l,disableFocusRipple:p,loading:f,loadingIndicator:b,size:u},j=rm(g);return h.jsxs(nm,{id:f?c:d,className:Ge(j.root,o),centerRipple:!0,focusRipple:!p,disabled:l||f,ref:r,...S,ownerState:g,children:[typeof f=="boolean"&&h.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:h.jsx(im,{className:j.loadingIndicator,ownerState:g,children:f&&b})}),a]})});process.env.NODE_ENV!=="production"&&(Ln.propTypes={children:za(w.node,e=>re.Children.toArray(e.children).some(r=>re.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
+
`)):null),classes:w.object,className:w.string,color:w.oneOfType([w.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),w.string]),disabled:w.bool,disableFocusRipple:w.bool,disableRipple:w.bool,edge:w.oneOf(["end","start",!1]),id:w.string,loading:w.bool,loadingIndicator:w.node,size:w.oneOfType([w.oneOf(["small","medium","large"]),w.string]),sx:w.oneOfType([w.arrayOf(w.oneOfType([w.func,w.object,w.bool])),w.func,w.object])});const os=St(h.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),ss=St(h.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),am=St(h.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),La=St(h.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ni=St(h.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),om=St(h.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),Q={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},ls=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},sm=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),zt=(e,t,r)=>{const n=ls(e),i=ls(t);return sm(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},qa=e=>{const t="#FFFFFF",r="#000000";return{50:zt(t,e,.08),100:zt(t,e,.16),200:zt(t,e,.28),300:zt(t,e,.4),400:zt(t,e,.55),500:e,600:zt(e,r,.1),700:zt(e,r,.2),800:zt(e,r,.3),900:zt(e,r,.42)}},lm=qa(Q.primary.main),cm=qa(Q.secondary.main),nt=qa(Q.text.primary),um={primary:Q.primary.main,secondary:Q.secondary.main,textPrimary:Q.text.primary,textSecondary:Q.text.secondary,divider:Q.divider,background:Q.background},sa=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:l="6px",endorsementHeight:p=28,endorsementPaddingX:u="8px",...d})=>{var c,b;const f=!!r,x=a?h.jsx(C.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:u,paddingRight:u,borderRadius:l,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,S={...d.InputProps,endAdornment:x||i?h.jsxs(C.InputAdornment,{sx:{mr:-1},position:"end",children:[x||i,(c=d.InputProps)==null?void 0:c.endAdornment]}):(b=d.InputProps)==null?void 0:b.endAdornment};return h.jsxs(C.Box,{children:[f&&h.jsx(C.Typography,{variant:n,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:r}),h.jsx(C.TextField,{fullWidth:!0,size:"small",...d,InputProps:S,label:f?void 0:d.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary},"& .MuiFormLabel-root":{color:Q.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:Q.text.primary},"& .MuiFormHelperText-root":{color:e?Q.error.main:Q.text.secondary},...t}})]})},Dl=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:l,sx:p,...u})=>{const d=D.useId(),f=l==null||l===""||Array.isArray(l)&&l.length===0,x=S=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...S,children:h.jsx("path",{d:"M6 9l6 6 6-6",stroke:Q.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return h.jsxs(C.FormControl,{fullWidth:!0,size:a,error:!!u.error,variant:"outlined",children:[e&&h.jsx(C.Typography,{variant:o,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:e}),t&&h.jsx(C.InputLabel,{id:d,shrink:!f||!!s,sx:{color:Q.text.secondary,"&.Mui-focused":{color:Q.text.primary},"&.Mui-error":{color:Q.error.main}},children:t}),h.jsx(C.Select,{...u,value:l,labelId:t?d:void 0,label:t,displayEmpty:!0,input:h.jsx(C.OutlinedInput,{label:t}),IconComponent:x,renderValue:S=>{const c=S;if(f)return h.jsx("span",{style:{color:Q.text.secondary},children:s??""});const b=r.find(g=>g.value===c);return(b==null?void 0:b.label)??String(c)},endAdornment:n?h.jsx(C.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${Q.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:Q.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:Q.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:Q.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:nt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:nt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:Q.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?h.jsx(C.MenuItem,{disabled:!0,children:h.jsx(C.CircularProgress,{size:16})}):r.map(S=>h.jsx(C.MenuItem,{value:S.value,sx:{backgroundColor:Q.background.paper,color:Q.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:nt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:nt[50],borderRadius:"4px"}},children:S.label},S.value))}),i&&h.jsx(C.FormHelperText,{children:i})]})},pm=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M6 9l6 6 6-6",stroke:Q.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Pl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:l="subtitle2",disabled:p,loading:u,error:d,helperText:f,onOpen:x,noOptionsText:S,sx:c})=>h.jsxs(C.Box,{children:[a&&h.jsx(C.Typography,{variant:l,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:a}),h.jsx(C.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:h.jsx(pm,{}),disabled:p,loading:u,onOpen:x,noOptionsText:S,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${Q.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:Q.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...c},getOptionLabel:b=>typeof b=="string"?b:(b==null?void 0:b.label)??"",isOptionEqualToValue:(b,g)=>((b==null?void 0:b.value)??b)===((g==null?void 0:g.value)??g),renderOption:(b,g,{selected:j})=>h.jsxs(C.Box,{component:"li",...b,sx:{backgroundColor:Q.background.paper,color:Q.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:nt[50]},"&.Mui-focused":{backgroundColor:nt[50]},...j?{backgroundColor:nt[50]}:{}},children:[n&&h.jsx(C.Checkbox,{checked:j}),h.jsx(C.Typography,{variant:"body2",sx:{color:Q.text.primary,fontSize:14},children:typeof g=="string"?g:g.label})]}),renderInput:b=>h.jsx(C.TextField,{...b,label:i,placeholder:o,size:"small",error:d,helperText:f,InputLabelProps:{shrink:!!r||!!o,sx:{color:Q.text.secondary,"&.Mui-focused":{color:Q.text.primary},"&.Mui-error":{color:Q.error.main}}},InputProps:{...b.InputProps,endAdornment:h.jsxs(h.Fragment,{children:[u?h.jsx(C.CircularProgress,{size:20}):null,b.InputProps.endAdornment]})}}),onChange:(b,g)=>s(g)})]}),la=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>h.jsx(C.FormControlLabel,{control:h.jsx(C.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ca=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>h.jsx(C.FormControlLabel,{control:h.jsx(C.Switch,{checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ua=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:l,error:p,groupPadding:u=1.5,itemGap:d=1})=>h.jsxs(C.FormControl,{error:p,sx:f=>{var x;return{display:"flex",flexDirection:"column",px:f.spacing(u),borderRadius:((x=f.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:f.palette.background.paper}},children:[o==="top"&&e&&h.jsx(C.Typography,{variant:s,sx:f=>({color:f.palette.text.primary,mb:.5,fontSize:f.typography.fontSize,fontWeight:500}),children:e}),t&&h.jsx(C.FormLabel,{sx:f=>({color:f.palette.text.secondary,mb:.5,mx:1,fontSize:f.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:f.palette.text.primary},"&.Mui-error":{color:f.palette.error.main}}),children:t}),h.jsx(C.RadioGroup,{row:i,value:r,onChange:f=>a(f.target.value),sx:f=>({display:"flex",flexDirection:i?"row":"column",gap:f.spacing(d),alignItems:i?"center":"flex-start",mt:-1}),children:n.map(f=>h.jsx(C.FormControlLabel,{value:f.value,control:h.jsx(C.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:f.label,sx:x=>({m:0,"& .MuiFormControlLabel-label":{color:x.palette.text.primary,fontSize:14}})},String(f.value)))}),l&&h.jsx(C.FormHelperText,{sx:{mt:.5},children:l})]}),Il=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>h.jsxs(C.Box,{children:[e==="top"&&r&&h.jsx(C.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),h.jsx(C.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),Ml=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const o=!!e;return h.jsxs(C.Box,{children:[o&&h.jsx(C.Typography,{variant:t,sx:{color:Q.text.primary,mb:.5,fontWeight:500},children:e}),h.jsx(C.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:o?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:Q.background.paper,borderRadius:"8px","& fieldset":{borderColor:Q.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:Q.error.main}},"& .MuiInputBase-input":{color:Q.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:Q.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:Q.text.primary},"& .MuiFormHelperText-root":{color:r?Q.error.main:Q.text.secondary},...n}})]})},zl=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>h.jsxs(C.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[h.jsxs(C.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&h.jsx(C.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&h.jsx(C.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),dm=()=>h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:h.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_5814_24904",children:h.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function fm({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:l=!0,renderItem:p,chipText:u,helperText:d}){const[f,x]=D.useState(null),[S,c]=D.useState(null),b=k=>v=>{if(!i){x(k),v.dataTransfer.effectAllowed="move";try{v.dataTransfer.setData("text/plain",String(t(e[k])))}catch{}}},g=k=>v=>{i||(v.preventDefault(),c(k),v.dataTransfer.dropEffect="move")},j=k=>v=>{if(i)return;if(v.preventDefault(),f===null||f===k){x(null),c(null);return}const B=[...e],[_]=B.splice(f,1);B.splice(k,0,_),x(null),c(null),r(B)},$=()=>{x(null),c(null)};return h.jsxs(C.Box,{role:"list",sx:k=>({display:"flex",flexDirection:"column",gap:k.spacing(1),...a}),children:[n,h.jsx(C.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((k,v)=>{const B=f===v,_=S===v&&f!==null&&f!==v;return h.jsx(C.Box,{role:"listitem",draggable:!i,onDragStart:b(v),onDragOver:g(v),onDrop:j(v),onDragEnd:$,sx:K=>{var W;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${_?K.palette.primary.main:"#EBEBEB"}`,borderRadius:((W=K.shape)==null?void 0:W.borderRadius)||"8px",padding:K.spacing(1),opacity:B?.6:1,boxShadow:_?`0 0 0 2px ${K.palette.primary.main}33`:"none"}},children:p?p(k,B):h.jsxs(C.Box,{sx:K=>({display:"flex",alignItems:"center",gap:K.spacing(1),minWidth:0}),children:[l&&h.jsx(dm,{}),s&&h.jsxs(C.Typography,{variant:"body2",sx:K=>({fontWeight:600,fontSize:14,color:`${K.palette.text.primary}`,flex:"0 0 auto"}),children:[v+1,"."]}),(()=>{const K=typeof u=="function"?u(k,v):u;return K?h.jsx(C.Chip,{label:K,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),h.jsx(C.Typography,{variant:"body2",sx:K=>({fontSize:12,fontWeight:500,color:`${K.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(k):""})]})},String(t(k)))}),d?typeof d=="string"?h.jsx(C.Typography,{variant:"caption",sx:k=>({color:`${k.palette.text.primary}60`}),children:d}):d:null]})}const mm=lt(C.StepConnector)(()=>({[`&.${C.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${C.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${C.stepConnectorClasses.completed} .${C.stepConnectorClasses.line}`]:{borderColor:Q.primary.main}})),hm=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:o,completed:s,icon:l}=a;return s?h.jsx(C.Box,{sx:{width:24,height:24,border:`1.2px solid ${Q.primary.main}`,borderRadius:"50%",backgroundColor:Q.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):o?h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${Q.primary.main}`,backgroundColor:$t(Q.primary.main,.2),color:Q.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:Q.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return h.jsx(C.Stepper,{orientation:"vertical",activeStep:t,connector:h.jsx(mm,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:Q.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,o)=>h.jsxs(C.Step,{onClick:()=>r==null?void 0:r(o),completed:o<t,children:[h.jsx(C.StepLabel,{StepIconComponent:i,children:h.jsx(C.Typography,{sx:{fontSize:12,fontWeight:500,color:o===t?Q.primary.main:Q.text.primary},children:a.label})}),o!==e.length-1&&h.jsx(C.Divider,{sx:{ml:4.2,borderColor:Q.divider}})]},o))})},Vl=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...o})=>h.jsx(C.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${$t(t||s.palette.text.primary,.5)}`,backgroundColor:$t(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),ym=lt(C.StepConnector)(()=>({[`&.${C.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${C.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${C.stepConnectorClasses.completed} .${C.stepConnectorClasses.line}`]:{borderColor:Q.primary.main}})),gm=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=D.useState(null),o=s=>{const{active:l,completed:p,icon:u}=s;return p?h.jsx(C.Box,{sx:{width:24,height:24,border:`1.2px solid ${Q.primary.main}`,borderRadius:"50%",backgroundColor:Q.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:h.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):l?h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${Q.primary.main}`,backgroundColor:$t(Q.primary.main,.2),color:Q.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:u}):h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:Q.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:u})};return h.jsx(C.Stepper,{orientation:"vertical",activeStep:t,connector:h.jsx(ym,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:Q.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((s,l)=>h.jsxs(C.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[h.jsxs(C.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[h.jsxs(C.StepLabel,{StepIconComponent:o,children:[h.jsxs(C.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[h.jsx(C.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?Q.primary.main:Q.text.primary},children:s.label}),h.jsx(Vl,{size:"small",colorHex:l<t?Q.success.main:l===t?"#973B00":Q.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),h.jsx(C.Typography,{sx:{fontSize:12,fontWeight:400,color:`${Q.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===l&&h.jsx(C.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&h.jsx(C.Divider,{sx:{ml:4.2,borderColor:Q.divider}})]},l))})},xm=St(h.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),vm=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:o,sx:s})=>{const l=o||Q.info.main,p=$t(l,.08),u=$t(l,.08),d=a??h.jsx(xm,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?h.jsxs(C.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:[h.jsx(C.Box,{sx:{display:"flex",alignItems:"center"},children:d}),h.jsx(C.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?h.jsx(C.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:h.jsx(C.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?h.jsxs(C.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${u}`,...s},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,h.jsx(C.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&h.jsx(C.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),h.jsx(C.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,x)=>h.jsx(C.ListItem,{sx:{py:0},children:h.jsx(C.ListItemText,{primary:f})},x))})]}):h.jsx(C.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${u}`,boxShadow:"none",...s},children:h.jsx(C.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,x)=>h.jsx(C.ListItem,{sx:{py:0},children:h.jsx(C.ListItemText,{primary:f})},x))})})},Bl=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>h.jsxs(C.Box,{children:[h.jsx(C.Tabs,{value:e,onChange:(o,s)=>t(s),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s;return h.jsx(C.Tab,{value:l,disabled:o.disabled,label:h.jsx(C.Typography,{variant:"body2",children:o.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s,p=o.content??(typeof o.value=="object"?o.value:null);return p&&e===l?h.jsx(C.Box,{sx:{mt:1},children:p},`panel-${l}`):null})]});async function Nl(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:l={},params:p={},body:u,transform:d,passThroughFields:f}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const k=/\{([^}]+)\}/g;x=x.replace(k,(v,B)=>{const _=n[B];return _!=null?encodeURIComponent(String(_)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const S=new URLSearchParams;Object.entries(p).forEach(([k,v])=>{v!=null&&S.append(k,String(v))}),S.toString()&&(x+=`${x.includes("?")?"&":"?"}${S.toString()}`);try{const k=/^https?:\/\//i.test(x),v=new URL(x,k?void 0:"http://local.placeholder"),B=Array.from(v.searchParams.entries());for(const[_,K]of B)(K===""||K==="undefined"||K==="null")&&v.searchParams.delete(_);k?x=v.toString():x=v.pathname+(v.search?v.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const c={"Content-Type":"application/json",...r,...l},b={method:a,headers:c};(a==="POST"||a==="PUT")&&u&&(b.body=JSON.stringify(u));const g=await fetch(x,b);if(!g.ok)throw new Error(`API request failed: ${g.status} ${g.statusText}`);const j=await g.json();if(d)return d(Array.isArray(j)?j:j.data||j);const $=Array.isArray(j)?j:j.data||j;if(!Array.isArray($))throw new Error("API response is not an array");return $.map(k=>{const v={label:k[s]||k.name||k.title||String(k[o]||""),value:k[o]||k.id||k.value||""},B=Array.isArray(f)?f:void 0;if(Array.isArray(B))for(const _ of B)k[_]!==void 0&&(v[_]=k[_]);return v})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function Ll(e,t,r,n,i=!1){const a=D.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const s=n[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,n]),o=D.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Tu({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return Nl(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function ur(e){return!!(e.apiConfig||e.api_endpoint)}function Ua(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function bm(e,t){const r=Ua(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const Wa=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})=>{const s=r[e.name],l=!!s,[p,u]=D.useState(!1),d=D.useRef(!1),[f,x]=D.useState(!1),[S,c]=D.useState(!1),[b,g]=D.useState(!1),j=D.useRef(null),$=D.useRef(null),k=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},v=q=>k()?`${q} *`:q,B=()=>e.value!==void 0?e.value:e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:"",_=D.useMemo(()=>{const q=Ua(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),K=D.useRef(null),W=_!=null&&_.dependsOn?a==null?void 0:a[_.dependsOn]:null,m=D.useMemo(()=>{if(!(_!=null&&_.dependsOn))return!1;const q=W,Z=K.current,ne=q!==Z;return ne&&(K.current=q),ne},[_==null?void 0:_.dependsOn,W]),z=D.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const Z=q.field,ne=q.equals,ce=q.in,fe=Z?(a||{})[Z]:void 0;if(Z&&typeof ne<"u")return fe===ne;if(Z&&Array.isArray(ce))return ce.includes(fe)}return!0},[e.showWhen,a]),I=D.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),U=D.useCallback(()=>{const q=e.endAdornment;if(typeof q=="function")try{return q(a||{})}catch{return}return q},[e,a]),N=D.useMemo(()=>p&&ur(e)&&(!(_!=null&&_.dependsOn)||W),[p,e,_==null?void 0:_.dependsOn,W]),X=D.useMemo(()=>{const q={};if(!a)return q;const Z=(_==null?void 0:_.endpoint)||(e==null?void 0:e.api_endpoint);if(Z&&typeof Z=="string"){const ne=Z.match(/\{([^}]+)\}/g)||[];for(const ce of ne){const fe=ce.slice(1,-1),de=a[fe];de!==void 0&&(q[fe]=de)}}if(_!=null&&_.dependsOn){const ne=_.dependsOn,ce=a[ne];ce!==void 0&&(q[ne]=ce)}return q},[_==null?void 0:_.endpoint,e==null?void 0:e.api_endpoint,_==null?void 0:_.dependsOn,a]),{data:ae=[],isLoading:me,error:ie}=Ll(_,n,i,X,N),oe=D.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]),V=D.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]);D.useEffect(()=>{if(ur(e)&&!d.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(d.current=!0,u(!0))}},[e,a]),D.useEffect(()=>{ur(e)&&(_!=null&&_.dependsOn)&&m&&d.current&&(d.current=!1,u(!1))},[m,_==null?void 0:_.dependsOn]);const H=D.useCallback(()=>ur(e)?ae:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,ae]),pe=()=>{var q,Z,ne,ce,fe,de;switch(e.type){case"title":return h.jsx(C.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return h.jsx(C.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const L=e.actionName,M=e.actionComponent,ee=e.actionLabel,ye=ue=>h.jsx(zl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:ue??e.actions}),xe=ue=>{if(e.cardWrap){const O={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return h.jsx(C.Card,{sx:O,...e.cardProps,children:ue})}return ue};return xe(L&&M?h.jsx(ct,{name:L,control:t,defaultValue:e.value??!1,render:({field:ue})=>ye(M==="switch"?h.jsx(ca,{label:ee,checked:!!ue.value,onChange:ue.onChange}):h.jsx(la,{label:ee||"",checked:!!ue.value,onChange:ue.onChange}))}):ye());case"tabs":return h.jsx(ct,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Z=(q=e.items)==null?void 0:q[0])==null?void 0:Z.value)=="string"||typeof((ce=(ne=e.items)==null?void 0:ne[0])==null?void 0:ce.value)=="number"?(de=(fe=e.items)==null?void 0:fe[0])==null?void 0:de.value:0),render:({field:ue})=>{const y=e.items||[],O=y.map((A,R)=>({label:A.label,value:typeof A.value=="string"||typeof A.value=="number"?A.value:R,content:A.content,disabled:A.disabled})),T=ue.value,Y=(()=>{if(typeof T=="string"||typeof T=="number"){const A=y.findIndex((R,J)=>typeof R.value=="string"||typeof R.value=="number"?R.value===T:J===T);return A>=0?A:0}return Number(T)||0})(),F=y[Y]||{};return h.jsxs(C.Box,{children:[h.jsx(Bl,{value:ue.value,onChange:ue.onChange,items:O,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(F.fields)&&F.fields.length>0&&h.jsx(C.Box,{sx:{mt:1,display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2},children:F.fields.map(A=>{const R=Math.min(Math.max(A.col??12,1),12);return h.jsx(C.Box,{sx:{gridColumn:`span ${R}`},children:h.jsx(Wa,{field:A,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})},A.name)})})]})}});case"text":case"email":case"password":case"tel":case"textarea":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>e.type==="textarea"?h.jsx(Ml,{...ue,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText}):h.jsx(sa,{...ue,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endorsementText:I(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?f?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:h.jsx(jl,{position:"end",children:h.jsx(Ln,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:f?h.jsx(ss,{}):h.jsx(os,{})})})}:void 0})});case"number":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(sa,{...ue,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endAdornment:U(),endorsementText:I(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const Ue=H();return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(Dl,{labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?v(e.label):void 0,labelVariant:e.labelVariant,value:ue.value,onChange:ue.onChange,options:Ue,disabled:e.disabled||me,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?v(e.label):void 0):e.placeholder,loading:me,error:l||!!ie,helperText:(s==null?void 0:s.message)||(ie==null?void 0:ie.message)||e.helperText,onOpen:oe})});case"checkbox":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(la,{label:v(e.label),checked:!!ue.value,disabled:e.disabled,onChange:ue.onChange})});case"toggle":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:ue.value,options:e.options||[],row:!0,onChange:ue.onChange})});case"radio":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:ue.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:ue.onChange})});case"switch":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(ca,{label:v(e.label),checked:!!ue.value,disabled:e.disabled,onChange:ue.onChange})});case"autocomplete":const Ne=H(),Ze=!!(e.disabled||me||_!=null&&_.dependsOn&&!W);return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>{const y=ue.value,O=e.multiple===!0,T=(_==null?void 0:_.valueField)||e.value_field||"value",Y=(_==null?void 0:_.labelField)||e.label_field||"label",F=R=>{if(R!=null){if(typeof R=="string"||typeof R=="number")return R;if(typeof R=="object"){if(R[T]!==void 0)return R[T];if(R.value!==void 0)return R.value;if(R.id!==void 0)return R.id}}},A=(()=>{if(O)return(Array.isArray(y)?y:[]).map(J=>{const le=Ne.find(Oe=>{const Ae=F(Oe);return Ae!==void 0&&Ae===J});return le||{[T]:J,[Y]:`Selected: ${J}`,value:J,label:`Selected: ${J}`}});{if(y==null||y==="")return null;const R=Ne.find(J=>{const le=F(J);return le!==void 0&&le===y});return R||{[T]:y,[Y]:`Selected: ${y}`,value:y,label:`Selected: ${y}`}}})();return h.jsx(Pl,{id:e.id,options:Ne,value:A,multiple:O,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,placeholder:Ze&&(_!=null&&_.dependsOn)&&!W?`Please select ${_.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:Ze,loading:me,error:l||!!ie,helperText:(s==null?void 0:s.message)||(ie==null?void 0:ie.message)||e.helperText||"",onOpen:V,noOptionsText:Ze&&(_!=null&&_.dependsOn)&&!W?`Please select ${_.dependsOn.replace(/_/g," ")} first`:me?"Fetching data...":p&&!me&&Ne.length===0?"No options available":"Click to load options",onChange:R=>{const J=(_==null?void 0:_.valueField)||e.value_field||"value";if(O){const Oe=(Array.isArray(R)?R:[]).map(Ae=>typeof Ae=="object"&&(Ae[J]||Ae.value||Ae.id)||Ae);ue.onChange(Oe)}else{let le;R&&typeof R=="object"?le=R[J]||R.value||R.id||R:le=R,ue.onChange(le);const Oe=e.selectedAssignments;if(Oe&&R&&typeof R=="object")for(const[Ae,We]of Object.entries(Oe)){const Ct=R[We];if(Ct!==void 0&&typeof o=="function")try{o(Ae,Ct,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>h.jsx(Il,{...ue,id:e.name,label:v(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:s==null?void 0:s.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return h.jsx(ct,{name:e.name,control:t,defaultValue:B(),render:({field:ue})=>{const y=ue.value||e.defaultValue||e.src;if(y){const R=e.imageUploaded||{},J=R.previewText||"Preview",le=R.removeText||"Remove",Oe=R.saveText||"Save logo",Ae=R.showSave!==void 0?R.showSave:!!(e.onSave||R.saveText),We=()=>{if(g(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},Ct=()=>{ue.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:$.current||void 0})},Et=ht=>{const yt=ht.target.files&&ht.target.files[0];if(yt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(yt)}catch{}try{const lr=URL.createObjectURL(yt);ue.onChange(lr)}catch{}$.current=yt,g(!1)}};return h.jsxs(C.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...R.cardSx},children:[h.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Et}),h.jsxs(C.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[h.jsx(C.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...R.thumbnailSx},children:h.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),h.jsxs(C.Box,{sx:{flexGrow:1},children:[h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:500,...R.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),h.jsx(C.Typography,{sx:{fontSize:"10px",...R.fileMetaSx},children:"Image selected"})]}),h.jsxs(C.Box,{sx:{display:"flex",gap:1},children:[h.jsx(C.Button,{type:"button",sx:{...R.previewButtonSx},variant:"outlined",onClick:We,startIcon:h.jsx(os,{}),children:J}),h.jsx(C.Button,{variant:"outlined",color:"error",onClick:Ct,sx:{...R.removeButtonSx},startIcon:h.jsx(ss,{}),children:le}),Ae&&h.jsx(C.Button,{variant:"contained",onClick:Dt,sx:{...R.saveButtonSx},children:Oe})]})]}),h.jsxs(C.Dialog,{open:b,onClose:()=>g(!1),maxWidth:"md",fullWidth:!0,children:[h.jsx(C.DialogTitle,{children:R.previewTitle||"Image preview"}),h.jsx(C.DialogContent,{children:h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:h.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),h.jsxs(C.DialogActions,{children:[h.jsx(C.Button,{type:"button",variant:"outlined",onClick:()=>{var ht;return(ht=j.current)==null?void 0:ht.click()},children:R.replaceText||"Replace logo"}),h.jsx(C.Button,{type:"button",variant:"contained",onClick:()=>g(!1),children:R.closeText||"Close"})]})]})]})}const O=e.imagePlaceholder||{},T=O.icon||"upload",Y=j,F=()=>{var R;try{(R=Y.current)==null||R.click()}catch{}},A=R=>{const J=R.target.files&&R.target.files[0];if(J){typeof e.onFileSelected=="function"&&e.onFileSelected(J);try{const le=URL.createObjectURL(J);ue.onChange(le)}catch{}$.current=J}};return h.jsxs(C.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...O.sx},children:[h.jsx("input",{type:"file",ref:Y,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:A}),h.jsx(Ln,{sx:{borderRadius:"8px",...O.iconSx},children:T==="image"?h.jsx(om,{sx:{width:36,height:36,color:"primary.main"}}):h.jsx(ni,{sx:{width:36,height:36,color:"primary.main"}})}),h.jsx(C.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...O.titleSx},children:O.title||"Drag & Drop the image here"}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...O.subtitleSx},children:O.subtitle||""}),h.jsx(C.Button,{onClick:F,sx:{my:2,...O.buttonSx},startIcon:h.jsx(ni,{}),variant:"contained",disabled:e.disabled,children:O.buttonText||"Upload File"}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400,...O.helperTextSx},children:O.helperText||e.helperText||""})]})}});case"component":return h.jsx(C.Box,{children:e.render?e.render():e.content});default:return null}},he=D.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),se=D.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let Z="";q==null?Z="":Array.isArray(q)?Z=q.join(", "):typeof q=="object"?Z=JSON.stringify(q):Z=String(q),await navigator.clipboard.writeText(Z),c(!0),window.setTimeout(()=>c(!1),1200)}catch{}},[a,e.name]);return h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[h.jsx(C.Box,{sx:{flexGrow:1},children:z?pe():null}),he&&h.jsx(Ln,{"aria-label":`copy ${e.label||e.name}`,onClick:se,size:"small",children:S?h.jsx(La,{fontSize:"small"}):h.jsx(am,{fontSize:"small"})})]})};var $i,cs;function wm(){if(cs)return $i;cs=1;function e(g){this._maxSize=g,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(g){return this._values[g]},e.prototype.set=function(g,j){return this._size>=this._maxSize&&this.clear(),g in this._values||this._size++,this._values[g]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),l=new e(o),p=new e(o);$i={Cache:e,split:d,normalizePath:u,setter:function(g){var j=u(g);return l.get(g)||l.set(g,function(k,v){for(var B=0,_=j.length,K=k;B<_-1;){var W=j[B];if(W==="__proto__"||W==="constructor"||W==="prototype")return k;K=K[j[B++]]}K[j[B]]=v})},getter:function(g,j){var $=u(g);return p.get(g)||p.set(g,function(v){for(var B=0,_=$.length;B<_;)if(v!=null||!j)v=v[$[B++]];else return;return v})},join:function(g){return g.reduce(function(j,$){return j+(x($)||r.test($)?"["+$+"]":(j?".":"")+$)},"")},forEach:function(g,j,$){f(Array.isArray(g)?g:d(g),j,$)}};function u(g){return s.get(g)||s.set(g,d(g).map(function(j){return j.replace(a,"$2")}))}function d(g){return g.match(t)||[""]}function f(g,j,$){var k=g.length,v,B,_,K;for(B=0;B<k;B++)v=g[B],v&&(b(v)&&(v='"'+v+'"'),K=x(v),_=!K&&/^\d+$/.test(v),j.call($,v,K,_,B,g))}function x(g){return typeof g=="string"&&g&&["'",'"'].indexOf(g.charAt(0))!==-1}function S(g){return g.match(n)&&!g.match(r)}function c(g){return i.test(g)}function b(g){return!x(g)&&(S(g)||c(g))}return $i}var Cr=wm(),Di,us;function Sm(){if(us)return Di;us=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(e)||[],r=u=>u[0].toUpperCase()+u.slice(1),n=(u,d)=>t(u).join(d).toLowerCase(),i=u=>t(u).reduce((d,f)=>`${d}${d?f[0].toUpperCase()+f.slice(1).toLowerCase():f.toLowerCase()}`,"");return Di={words:t,upperFirst:r,camelCase:i,pascalCase:u=>r(i(u)),snakeCase:u=>n(u,"_"),kebabCase:u=>n(u,"-"),sentenceCase:u=>r(n(u," ")),titleCase:u=>t(u).map(r).join(" ")},Di}var Pi=Sm(),Pn={exports:{}},ps;function Cm(){if(ps)return Pn.exports;ps=1,Pn.exports=function(i){return e(t(i),i)},Pn.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),l={},p=o,u=r(a),d=n(i);for(a.forEach(function(x){if(!d.has(x[0])||!d.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)l[p]||f(i[p],p,new Set);return s;function f(x,S,c){if(c.has(x)){var b;try{b=", node was:"+JSON.stringify(x)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!d.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!l[S]){l[S]=!0;var g=u.get(x)||new Set;if(g=Array.from(g),S=g.length){c.add(x);do{var j=g[--S];f(j,d.get(j),c)}while(S);c.delete(x)}s[--o]=x}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var l=i[o];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var l=i[o];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Pn.exports}var Em=Cm();const km=Fa(Em),Tm=Object.prototype.toString,Om=Error.prototype.toString,jm=RegExp.prototype.toString,Fm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Am=/^Symbol\((.*)\)(.*)$/;function _m(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ds(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _m(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Fm.call(e).replace(Am,"Symbol($1)");const n=Tm.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Om.call(e)+"]":n==="RegExp"?jm.call(e):null}function nr(e,t){let r=ds(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=ds(this[n],t);return a!==null?a:i},2)}function ql(e){return e==null?[]:[].concat(e)}let Ul,Wl,Hl,Rm=/\$\{\s*(\w+)\s*\}/g;Ul=Symbol.toStringTag;class fs{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ul]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],ql(t).forEach(a=>{if(rt.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Wl=Symbol.hasInstance;Hl=Symbol.toStringTag;class rt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Rm,(i,a)=>nr(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new fs(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Hl]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,rt)}static[Wl](t){return fs[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ot={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${nr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${nr(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${nr(r,!0)}\``+i}},Xe={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Wt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},da={isValue:"${path} field must be ${value}"},qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},$m={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Dm={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``}return rt.formatError(Ot.notType,e)}};Object.assign(Object.create(null),{mixed:Ot,string:Xe,number:Wt,date:pa,object:qn,array:$m,boolean:da,tuple:Dm});const Ha=e=>e&&e.__isYupSchema__;class ii{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new ii(t,(s,l)=>{var p;let u=o(...s)?i:a;return(p=u==null?void 0:u(l))!=null?p:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Ha(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const In={context:"$",value:"."};class Fr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===In.context,this.isValue=this.key[0]===In.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?In.context:this.isValue?In.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Cr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Fr.prototype.__isYupRef=!0;const wt=e=>e==null;function zr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:p,test:u,params:d,message:f,skipAbsent:x}=e;let{parent:S,context:c,abortEarly:b=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function j(z){return Fr.isRef(z)?z.getValue(r,S,c):z}function $(z={}){const I=Object.assign({value:r,originalValue:a,label:o.spec.label,path:z.path||n,spec:o.spec,disableStackTrace:z.disableStackTrace||g},d,z.params);for(const N of Object.keys(I))I[N]=j(I[N]);const U=new rt(rt.formatError(z.message||f,I),r,I.path,z.type||p,I.disableStackTrace);return U.params=I,U}const k=b?s:l;let v={path:n,parent:S,type:p,from:i.from,createError:$,resolve:j,options:i,originalValue:a,schema:o};const B=z=>{rt.isError(z)?k(z):z?l(null):k($())},_=z=>{rt.isError(z)?k(z):s(z)};if(x&&wt(r))return B(!0);let W;try{var m;if(W=u.call(v,r,v),typeof((m=W)==null?void 0:m.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(B,_)}}catch(z){_(z);return}B(W)}return t.OPTIONS=e,t}function Pm(e,t,r,n=r){let i,a,o;return t?(Cr.forEach(t,(s,l,p)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",f=p?parseInt(u,10):0;if(e.innerType||d){if(d&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&f>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[f],e=d?e.spec.types[f]:e.innerType}if(!p){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[u],e=e.fields[u]}a=u,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class ai extends Set{describe(){const t=[];for(const r of this.values())t.push(Fr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new ai(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Vr(e,t=new Map){if(Ha(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Vr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Vr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Vr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Vr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class st{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ai,this._blacklist=new ai,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ot.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Vr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&wt(a))return a;let o=nr(t),s=nr(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
177
177
|
|
|
178
178
|
attempted value: ${o}
|
|
179
|
-
`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let p=[];for(let u of Object.values(this.internalTests))u&&p.push(u);this.runTests({path:a,value:l,originalValue:o,options:r,tests:p},n,u=>{if(u.length)return i(u,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:p}=t,u=c=>{i||(i=!0,r(c,o))},d=c=>{i||(i=!0,n(c,o))},f=a.length,x=[];if(!f)return d([]);let S={value:o,originalValue:s,path:l,options:p,schema:this};for(let c=0;c<a.length;c++){const b=a[c];b(S,u,function(j){j&&(Array.isArray(j)?x.push(...j):x.push(j)),--f<=0&&d(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let p=n[s];const u=Object.assign({},o,{strict:!0,parent:n,value:p,originalValue:a[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(d,f,x)=>this.resolve(u)._validate(p,u,f,x)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,p)=>{rt.isError(l)&&(l.value=p),s(l)},(l,p)=>{l.length?s(new rt(l,p,void 0,void 0,a)):o(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw rt.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new rt(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(rt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(rt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Vr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=zr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=zr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ot.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ot.notNull){return this.nullability(!1,t)}required(t=Ot.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ot.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=zr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=ql(t).map(a=>new Fr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ii(i,r):ii.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=zr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ot.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=zr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Ot.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=zr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,p,u)=>u.findIndex(d=>d.name===l.name)===p)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=Ph(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Ih=()=>!0;function Kl(e){return new Ql(e)}class Ql extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ih},t))}}Kl.prototype=Ql.prototype;function Yl(){return new Gl}class Gl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return wt(r)||r===!0}})}isFalse(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return wt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yl.prototype=Gl.prototype;const Mh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zh(e){const t=fa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function fa(e){var t,r;const n=Mh.exec(e);return n?{year:Vt(n[1]),month:Vt(n[2],1)-1,day:Vt(n[3],1),hour:Vt(n[4]),minute:Vt(n[5]),second:Vt(n[6]),millisecond:n[7]?Vt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Vt(n[10]),minuteOffset:Vt(n[11])}:null}function Vt(e,t=0){return Number(e)||t}let Vh=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bh=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Nh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Lh="^\\d{4}-\\d{2}-\\d{2}",qh="\\d{2}:\\d{2}:\\d{2}",Uh="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wh=new RegExp(`${Lh}T${qh}(\\.\\d+)?${Uh}$`),Hh=e=>wt(e)||e===e.trim(),Kh={}.toString();function un(){return new Zl}class Zl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Kh?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ot.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Xe.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Xe.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Xe.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Xe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Xe.email){return this.matches(Vh,{name:"email",message:t,excludeEmptyString:!0})}url(t=Xe.url){return this.matches(Bh,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Xe.uuid){return this.matches(Nh,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Wh,{name:"datetime",message:r||Xe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=fa(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Xe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=fa(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Xe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hh})}lowercase(t=Xe.lowercase){return this.transform(r=>wt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toLowerCase()})}uppercase(t=Xe.uppercase){return this.transform(r=>wt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toUpperCase()})}}un.prototype=Zl.prototype;let Qh=e=>e!=+e;function Xl(){return new Jl}class Jl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Qh(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Wt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Wt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Wt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Wt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Wt.positive){return this.moreThan(0,t)}negative(t=Wt.negative){return this.lessThan(0,t)}integer(t=Wt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>wt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>wt(i)?i:Math[t](i))}}Xl.prototype=Jl.prototype;let ec=new Date(""),Yh=e=>Object.prototype.toString.call(e)==="[object Date]";function Ha(){return new On}class On extends st{constructor(){super({type:"date",check(t){return Yh(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=zh(t),isNaN(t)?On.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Fr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=pa.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=pa.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}On.INVALID_DATE=ec;Ha.prototype=On.prototype;Ha.INVALID_DATE=ec;function Gh(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=Cr.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Fr.isRef(s)&&s.isSibling?a(s.path,o):Wa(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return kh.array(Array.from(n),r).reverse()}function fs(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function tc(e){return(t,r)=>fs(e,t)-fs(e,r)}const Zh=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Un(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Un(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Un(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Un)}):"optional"in e?e.optional():e}const Xh=(e,t)=>{const r=[...Cr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Cr.getter(Cr.join(r),!0)(e);return!!(i&&n in i)};let hs=e=>Object.prototype.toString.call(e)==="[object Object]";function ms(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jh=tc([]);function rc(e){return new nc(e)}class nc extends st{constructor(t){super({type:"object",check(r){return hs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),l={},p=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),u=!1;for(const d of s){let f=a[d],x=d in i;if(f){let S,c=i[d];p.path=(r.path?`${r.path}.`:"")+d,f=f.resolve({value:c,context:r.context,parent:l});let b=f instanceof st?f.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){u=u||d in i;continue}S=!r.__validating||!g?f.cast(i[d],p):i[d],S!==void 0&&(l[d]=S)}else x&&!o&&(l[d]=i[d]);(x!==d in l||l[d]!==i[d])&&(u=!0)}return u?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,p)=>{if(!s||!hs(p)){i(l,p);return}o=o||p;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Fr.isRef(f)||u.push(f.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:o}))}this.runTests({tests:u,value:p,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(l),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gh(t,r),n._sortErrors=tc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Un(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Cr.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return Xh(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Zh)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qn.exact,test(r){if(r==null)return!0;const n=ms(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=ms(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Pi.camelCase)}snakeCase(){return this.transformKeys(Pi.snakeCase)}constantCase(){return this.transformKeys(t=>Pi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}rc.prototype=nc.prototype;const ic=e=>{const t={};return e.forEach(r=>{var a,o,s;let n;switch(r.type){case"text":case"textarea":case"tel":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=un().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=cr(n,r,"string"));break;case"password":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=Xl().typeError(`${r.label} must be a number`),r.validation?n=cr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=un(),r.validation&&(n=cr(n,r,"string"));break;case"checkbox":n=Yl(),r.validation&&(n=cr(n,r,"boolean"));break;case"date":n=Ha().typeError(`${r.label} must be a valid date`),r.validation?n=cr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=Kl()}if(((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required){const l=((s=r.validation)==null?void 0:s.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),rc().shape(t)},cr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,o=>o?i.test(o):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},ac=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=$.useMemo(()=>Array.from({length:t},(u,d)=>d+1),[t]),s=$.useMemo(()=>Math.round(e/t*100),[e,t]),l=u=>n[u-1]||`Step ${u}`,p=u=>u===e||a.includes(u)||u===e+1&&a.includes(e);return m.jsxs(E.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[m.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[m.jsx(E.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((u,d)=>{const f=u===e,x=u<e||a.includes(u),S=f||x?"primary.main":"#8F97A4";return m.jsxs(E.Box,{sx:{display:"flex",alignItems:"center"},children:[m.jsxs(E.Box,{onClick:()=>p(u)&&r(u),sx:{display:"flex",alignItems:"center",cursor:p(u)?"pointer":"default"},children:[m.jsx(E.Box,{sx:{width:24,height:24,borderRadius:"50%",border:f||x?"2px solid":"1px solid",borderColor:f||x?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c=>f||x?$t(c.palette.primary.main,.2):"transparent",mr:.5,color:S,fontWeight:f||x?600:500,fontSize:"12px"},children:u}),i&&m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:600,color:S},children:l(u)})]}),d<o.length-1&&m.jsx(E.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:u<e?"primary.main":"#DFE3E8"}})]},u)})}),m.jsx(E.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),m.jsx(E.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:u=>u.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},oc=({buttons:e,disabled:t=!1})=>{const r=s=>{s.onClick&&s.onClick()},n=e.filter(s=>s.position==="left"||!s.position),i=e.filter(s=>s.position==="center"),a=e.filter(s=>s.position==="right"),o=(s,l)=>{const p=(s.text||"").toLowerCase(),u=s.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=s.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),f=s.type?s.type:u?"submit":"button",x=d?"outlined":"contained",S=s.disabled||t,c=b=>b&&["primary","secondary","error","info","success","warning"].includes(b)?b:"primary";return m.jsxs(E.Button,{type:f,variant:x,color:c(s.color),size:s.size||"large",disabled:S,onClick:s.onClick?()=>r(s):void 0,sx:s.sx,children:[s.loading&&m.jsx(E.CircularProgress,{size:20,sx:{mr:1}}),s.text]},`${s.text}-${l}`)};return m.jsxs(E.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(E.Box,{sx:{display:"flex",gap:2},children:n.map((s,l)=>o(s,l))}),m.jsx(E.Box,{sx:{display:"flex",gap:2},children:i.map((s,l)=>o(s,l))}),m.jsx(E.Box,{sx:{display:"flex",gap:2},children:a.map((s,l)=>o(s,l))})]})},em=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:l="right",layout:p="horizontal",spacing:u=2,sx:d}=e,f=g=>{let j="button",R="contained";return g.type?j=g.type:g.text.toLowerCase().includes("submit")||g.text.toLowerCase().includes("save")||g.text.toLowerCase().includes("next")?j="submit":(g.text.toLowerCase().includes("reset")||g.text.toLowerCase().includes("clear"))&&(j="reset"),(g.text.toLowerCase().includes("cancel")||g.text.toLowerCase().includes("back")||g.text.toLowerCase().includes("draft"))&&(R="outlined"),{buttonType:j,buttonVariant:R}},x=g=>["primary","secondary","error","warning","info","success"].includes(g||"")?g:"primary",S=g=>{const{buttonType:j}=f(g);g.onClick?g.onClick():j==="submit"&&t?t(o):a&&r&&(g.text.toLowerCase().includes("next")?r(n+1,i):(g.text.toLowerCase().includes("back")||g.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(g,j)=>{const{buttonType:R,buttonVariant:k}=f(g),v=x(g.color);return m.jsx(E.Button,{type:R,variant:k,color:v,size:g.size||"medium",disabled:g.disabled,onClick:()=>S(g),sx:g.sx,children:g.text},j)},b=()=>{const g={display:"flex",gap:u,...d};switch(l){case"left":return{...g,justifyContent:"flex-start"};case"center":return{...g,justifyContent:"center"};case"right":return{...g,justifyContent:"flex-end"};case"space-between":return{...g,justifyContent:"space-between"};default:return{...g,justifyContent:"flex-end"}}};return p==="vertical"?m.jsx(E.Box,{sx:b(),children:s.map((g,j)=>m.jsx(E.Box,{sx:{width:"100%"},children:c(g,j)},j))}):m.jsx(E.Box,{sx:b(),children:m.jsx(E.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((g,j)=>c(g,j))})})},tm=new cu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),rm=e=>m.jsx(hu,{client:tm,children:m.jsx(nm,{...e})}),nm=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:l=!0,buttons:p,buttonGroup:u,baseUrl:d,apiHeaders:f,stepNavigationProps:x})=>{var fe,de;const S=[...new Set(r.map(L=>L.step).filter(L=>L!=null&&L>0))].sort((L,M)=>(L||0)-(M||0)),c=S.length>1,b=S.length||1,[g,j]=$.useState(1),R=c?r.filter(L=>L.step===g):r,k=$.useMemo(()=>ic(R),[R]),{control:v,handleSubmit:B,formState:{errors:A},watch:K,setValue:W,resetField:h,trigger:z}=Lc({resolver:Wc(k),mode:"onChange",defaultValues:s}),I=K(),U=$.useRef({});$.useEffect(()=>{const L=[];for(const M of r){const J=M.depends_on;J&&typeof M.name=="string"&&L.push({dependentField:M.name,dependencyName:J})}if(L.length!==0)for(const{dependentField:M,dependencyName:J}of L){const ye=U.current[J],xe=I==null?void 0:I[J];if(ye!==xe)try{h(M)}catch{}U.current[J]=xe}},[r,I,h]);const N=$.useRef(i);$.useEffect(()=>{N.current=i},[i]);const X=$.useMemo(()=>{try{return JSON.stringify(I)}catch{return String(Date.now())}},[I]),ae=$.useRef(null);$.useEffect(()=>{N.current&&ae.current!==X&&(ae.current=X,N.current(I))},[X]);const he=async()=>{if(!c)return!0;const L=r.filter(J=>J.step===g);for(const J of L)if(J.required){const ye=I[J.name];let xe=!0;if(J.type==="checkbox"?xe=ye===!0:Array.isArray(ye)?xe=ye.length>0:xe=ye!=null&&ye!=="",!xe)return!1}return await z()?!0:Object.keys(A).filter(ye=>L.some(xe=>xe.name===ye)).map(ye=>{const xe=A[ye];return typeof(xe==null?void 0:xe.message)=="string"?xe.message:`${ye} is invalid`}).length===0},ie=$.useMemo(()=>{if(!c)return!0;const L=r.filter(J=>J.step===g);for(const J of L)if(J.required){const ye=I[J.name];let xe=!0;if(J.type==="checkbox"?xe=ye===!0:Array.isArray(ye)?xe=ye.length>0:xe=ye!=null&&ye!=="",!xe)return!1}return Object.keys(A).filter(J=>L.some(ye=>ye.name===J)).length===0},[c,g,r,I,A]),oe=$.useMemo(()=>{if(c)return ie;for(const L of r)if(L.required){const M=I[L.name];let J=!0;if(L.type==="checkbox"?J=M===!0:J=M!=null&&M!==""&&!(Array.isArray(M)&&M.length===0),!J)return!1}return Object.keys(A).length===0},[c,ie,r,I,A]),V=async L=>{L<1||L>b||L>g&&c&&!await he()||j(L)},H=async L=>{if(c&&g<b){console.warn("Form submission attempted on non-final step");return}o&&o(L),n(L)},ue=async L=>{L&&(L.preventDefault(),L.stopPropagation()),c&&g<b&&await he()&&V(g+1)},me=L=>{L&&(L.preventDefault(),L.stopPropagation()),c&&g>1&&V(g-1)},se=L=>L.col?L.col:(L.xs||L.sm||L.md||L.lg||L.xl)&&(L.xs||L.sm||L.md||L.lg||L.xl)||12,q=t?E.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((fe=t.typography)==null?void 0:fe.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((de=t.typography)==null?void 0:de.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Z=()=>{if(u&&u.buttons&&u.buttons.length>0){const L={...u,buttons:u.buttons.map(M=>{const J=(M.text||"").toLowerCase(),ye=M.type==="submit"||J.includes("submit")||J.includes("save")||J.includes("finish")||J.includes("complete"),xe=J.includes("next");let Ue=!1;return c?(ye||xe)&&(Ue=!ie):ye&&(Ue=!oe),{...M,disabled:M.disabled||Ue}})};return m.jsx(E.Box,{sx:{mt:3},children:m.jsx(em,{config:L,onSubmit:H,onStepChange:V,currentStep:g,totalSteps:b,isMultiStep:c,formData:I})})}if(p&&p.length>0){const L=p.map(M=>{const J=(M.text||"").toLowerCase(),ye=M.type==="submit"||J.includes("submit")||J.includes("save")||J.includes("finish")||J.includes("complete"),xe=J.includes("next");let Ue=!1;return c?(ye||xe)&&(Ue=!ie):ye&&(Ue=!oe),{...M,disabled:M.disabled||Ue}});return m.jsx(oc,{buttons:L})}return l?m.jsx(E.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:m.jsxs(E.Box,{sx:{display:"flex",gap:2},children:[c&&g>1&&m.jsx(E.Button,{type:"button",variant:"outlined",onClick:me,children:"Previous"}),c?g<b?m.jsx(E.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!ie,onClick:ue,children:"Next"}):m.jsx(E.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ie,children:a}):m.jsx(E.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!oe,children:a})]})}):null},ne=$.useMemo(()=>{const L=[];let M=[];for(const J of R)J.type==="section"&&M.length>0?(L.push(M),M=[J]):M.push(J);return M.length>0&&L.push(M),L},[R]),ce=m.jsxs(E.Box,{component:"form",onSubmit:L=>{if(c&&g<b){L.preventDefault(),L.stopPropagation(),ie&&ue();return}B(H)(L)},id:e,onKeyDown:L=>{L.key==="Enter"&&c&&g<b&&(L.preventDefault(),ie&&ue())},children:[c&&m.jsx(ac,{currentStep:g,totalSteps:b,onStepChange:V,stepTitles:x==null?void 0:x.stepTitles,showStepTitles:(x==null?void 0:x.showStepTitles)!==!1}),ne.map((L,M)=>m.jsx(E.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},children:L.map(J=>{const ye=se(J);return m.jsx(E.Box,{sx:{gridColumn:`span ${ye}`},children:m.jsx(Ll,{field:J,control:v,errors:A,baseUrl:d,apiHeaders:f,formData:I,setValue:W})},J.name)})},`group-${M}`)),Z()]});return q?m.jsx(E.ThemeProvider,{theme:q,children:ce}):ce},im=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:o})=>m.jsx(E.Box,{sx:{textAlign:"center"},children:m.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Ar(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(u){try{p(n.next(u))}catch(d){o(d)}}function l(u){try{p(n.throw(u))}catch(d){o(d)}}function p(u){u.done?a(u.value):i(u.value).then(s,l)}p((n=n.apply(e,t||[])).next())})}const am=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function en(e,t,r){const n=om(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&ys(n,"path",a),ys(n,"relativePath",a),n}function om(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=am.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function ys(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const sm=[".DS_Store","Thumbs.db"];function lm(e){return Ar(this,void 0,void 0,function*(){return oi(e)&&cm(e.dataTransfer)?fm(e.dataTransfer,e.type):um(e)?pm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dm(e):[]})}function cm(e){return oi(e)}function um(e){return oi(e)&&oi(e.target)}function oi(e){return typeof e=="object"&&e!==null}function pm(e){return ha(e.target.files).map(t=>en(t))}function dm(e){return Ar(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>en(r))})}function fm(e,t){return Ar(this,void 0,void 0,function*(){if(e.items){const r=ha(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(hm));return gs(sc(n))}return gs(ha(e.files).map(r=>en(r)))})}function gs(e){return e.filter(t=>sm.indexOf(t.name)===-1)}function ha(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function hm(e){if(typeof e.webkitGetAsEntry!="function")return xs(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?lc(t):xs(e,t)}function sc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?sc(r):[r]],[])}function xs(e,t){return Ar(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,en(o)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return en(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function mm(e){return Ar(this,void 0,void 0,function*(){return e.isDirectory?lc(e):ym(e)})}function lc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(o=>Ar(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(mm));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function ym(e){return Ar(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=en(n,e.fullPath);t(i)},n=>{r(n)})})})}var Mn={},vs;function gm(){return vs||(vs=1,Mn.__esModule=!0,Mn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Mn}var xm=gm();const Ii=Fa(xm);function bs(e){return wm(e)||bm(e)||uc(e)||vm()}function vm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uc(e,t){if(e){if(typeof e=="string")return
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
183
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mc(e,t){if(e){if(typeof e=="string")return ya(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ya(e,t)}}function ya(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function Zm(e){if(Array.isArray(e))return e}function Ts(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 Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ts(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ts(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ga(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function li(e,t){if(e==null)return{};var r=Xm(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xm(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Ka=$.forwardRef(function(e,t){var r=e.children,n=li(e,Nm),i=gc(n),a=i.open,o=li(i,Lm);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Re(Re({},o),{},{open:a})))});Ka.displayName="Dropzone";var yc={disabled:!1,getFilesFromEvent:lm,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ka.defaultProps=yc;Ka.propTypes={children:w.func,accept:w.objectOf(w.arrayOf(w.string)),multiple:w.bool,preventDropOnDocument:w.bool,noClick:w.bool,noKeyboard:w.bool,noDrag:w.bool,noDragEventsBubbling:w.bool,minSize:w.number,maxSize:w.number,maxFiles:w.number,disabled:w.bool,getFilesFromEvent:w.func,onFileDialogCancel:w.func,onFileDialogOpen:w.func,useFsAccessApi:w.bool,autoFocus:w.bool,onDragEnter:w.func,onDragLeave:w.func,onDragOver:w.func,onDrop:w.func,onDropAccepted:w.func,onDropRejected:w.func,onError:w.func,validator:w.func};var xa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function gc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},yc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,p=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,x=t.onDropAccepted,S=t.onDropRejected,c=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,j=t.autoFocus,R=t.preventDropOnDocument,k=t.noClick,v=t.noKeyboard,B=t.noDrag,A=t.noDragEventsBubbling,K=t.onError,W=t.validator,h=$.useMemo(function(){return zm(r)},[r]),z=$.useMemo(function(){return Mm(r)},[r]),I=$.useMemo(function(){return typeof b=="function"?b:Os},[b]),U=$.useMemo(function(){return typeof c=="function"?c:Os},[c]),N=$.useRef(null),X=$.useRef(null),ae=$.useReducer(Jm,xa),he=Mi(ae,2),ie=he[0],oe=he[1],V=ie.isFocused,H=ie.isFileDialogActive,ue=$.useRef(typeof window<"u"&&window.isSecureContext&&g&&Im()),me=function(){!ue.current&&H&&setTimeout(function(){if(X.current){var _=X.current.files;_.length||(oe({type:"closeDialog"}),U())}},300)};$.useEffect(function(){return window.addEventListener("focus",me,!1),function(){window.removeEventListener("focus",me,!1)}},[X,H,U,ue]);var se=$.useRef([]),q=function(_){N.current&&N.current.contains(_.target)||(_.preventDefault(),se.current=[])};$.useEffect(function(){return R&&(document.addEventListener("dragover",ks,!1),document.addEventListener("drop",q,!1)),function(){R&&(document.removeEventListener("dragover",ks),document.removeEventListener("drop",q))}},[N,R]),$.useEffect(function(){return!n&&j&&N.current&&N.current.focus(),function(){}},[N,j,n]);var Z=$.useCallback(function(F){K?K(F):console.error(F)},[K]),ne=$.useCallback(function(F){F.preventDefault(),F.persist(),y(F),se.current=[].concat(Wm(se.current),[F.target]),zn(F)&&Promise.resolve(i(F)).then(function(_){if(!(si(F)&&!A)){var D=_.length,ee=D>0&&Rm({files:_,accept:h,minSize:o,maxSize:a,multiple:s,maxFiles:l,validator:W}),le=D>0&&!ee;oe({isDragAccept:ee,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),p&&p(F)}}).catch(function(_){return Z(_)})},[i,p,Z,A,h,o,a,s,l,W]),ce=$.useCallback(function(F){F.preventDefault(),F.persist(),y(F);var _=zn(F);if(_&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return _&&d&&d(F),!1},[d,A]),fe=$.useCallback(function(F){F.preventDefault(),F.persist(),y(F);var _=se.current.filter(function(ee){return N.current&&N.current.contains(ee)}),D=_.indexOf(F.target);D!==-1&&_.splice(D,1),se.current=_,!(_.length>0)&&(oe({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zn(F)&&u&&u(F))},[N,u,A]),de=$.useCallback(function(F,_){var D=[],ee=[];F.forEach(function(le){var Oe=pc(le,h),Ae=Mi(Oe,2),We=Ae[0],Ct=Ae[1],Dt=dc(le,o,a),Et=Mi(Dt,2),mt=Et[0],yt=Et[1],lr=W?W(le):null;if(We&&mt&&!lr)D.push(le);else{var _r=[Ct,yt];lr&&(_r=_r.concat(lr)),ee.push({file:le,errors:_r.filter(function(vc){return vc})})}}),(!s&&D.length>1||s&&l>=1&&D.length>l)&&(D.forEach(function(le){ee.push({file:le,errors:[_m]})}),D.splice(0)),oe({acceptedFiles:D,fileRejections:ee,isDragReject:ee.length>0,type:"setFiles"}),f&&f(D,ee,_),ee.length>0&&S&&S(ee,_),D.length>0&&x&&x(D,_)},[oe,s,h,o,a,l,f,x,S,W]),L=$.useCallback(function(F){F.preventDefault(),F.persist(),y(F),se.current=[],zn(F)&&Promise.resolve(i(F)).then(function(_){si(F)&&!A||de(_,F)}).catch(function(_){return Z(_)}),oe({type:"reset"})},[i,de,Z,A]),M=$.useCallback(function(){if(ue.current){oe({type:"openDialog"}),I();var F={multiple:s,types:z};window.showOpenFilePicker(F).then(function(_){return i(_)}).then(function(_){de(_,null),oe({type:"closeDialog"})}).catch(function(_){Vm(_)?(U(_),oe({type:"closeDialog"})):Bm(_)?(ue.current=!1,X.current?(X.current.value=null,X.current.click()):Z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Z(_)});return}X.current&&(oe({type:"openDialog"}),I(),X.current.value=null,X.current.click())},[oe,I,U,g,de,Z,z,s]),J=$.useCallback(function(F){!N.current||!N.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),M())},[N,M]),ye=$.useCallback(function(){oe({type:"focus"})},[]),xe=$.useCallback(function(){oe({type:"blur"})},[]),Ue=$.useCallback(function(){k||(Pm()?setTimeout(M,0):M())},[k,M]),Ne=function(_){return n?null:_},Ze=function(_){return v?null:Ne(_)},pe=function(_){return B?null:Ne(_)},y=function(_){A&&_.stopPropagation()},T=$.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=F.refKey,D=_===void 0?"ref":_,ee=F.role,le=F.onKeyDown,Oe=F.onFocus,Ae=F.onBlur,We=F.onClick,Ct=F.onDragEnter,Dt=F.onDragOver,Et=F.onDragLeave,mt=F.onDrop,yt=li(F,qm);return Re(Re(ga({onKeyDown:Ze(Tt(le,J)),onFocus:Ze(Tt(Oe,ye)),onBlur:Ze(Tt(Ae,xe)),onClick:Ne(Tt(We,Ue)),onDragEnter:pe(Tt(Ct,ne)),onDragOver:pe(Tt(Dt,ce)),onDragLeave:pe(Tt(Et,fe)),onDrop:pe(Tt(mt,L)),role:typeof ee=="string"&&ee!==""?ee:"presentation"},D,N),!n&&!v?{tabIndex:0}:{}),yt)}},[N,J,ye,xe,Ue,ne,ce,fe,L,v,B,n]),O=$.useCallback(function(F){F.stopPropagation()},[]),Y=$.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=F.refKey,D=_===void 0?"ref":_,ee=F.onChange,le=F.onClick,Oe=li(F,Um),Ae=ga({accept:h,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ne(Tt(ee,L)),onClick:Ne(Tt(le,O)),tabIndex:-1},D,X);return Re(Re({},Ae),Oe)}},[X,r,s,L,n]);return Re(Re({},ie),{},{isFocused:V&&!n,getRootProps:T,getInputProps:Y,rootRef:N,inputRef:X,open:Ne(M)})}function Jm(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},xa),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},xa);default:return e}}function Os(){}const ey=St(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ty=St(m.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),js=St(m.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),ry=St(m.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),xc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?m.jsx(ry,{}):e.file.type.includes("pdf")?m.jsx(js,{}):m.jsx(js,{}),n=()=>{switch(e.status){case"success":return m.jsx(ey,{color:"success"});case"uploading":return m.jsx(E.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const o=1024,s=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(o));return parseFloat((a/Math.pow(o,l)).toFixed(2))+" "+s[l]};return m.jsxs(E.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[m.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),m.jsxs(E.Box,{sx:{flex:1,minWidth:0},children:[m.jsx(E.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),m.jsxs(E.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),m.jsx(E.Tooltip,{title:"Remove file",children:m.jsx(E.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:m.jsx(ty,{})})})]})},ny=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:o,title:s,subtitle:l,buttonText:p,fileSupportedText:u})=>{const[d,f]=$.useState(t),[x,S]=$.useState([]),[c,b]=$.useState(!1),[g,j]=$.useState(!1),[R,k]=$.useState([]),v=$.useRef(null);$.useEffect(()=>{f(t)},[t]);const B=$.useCallback(N=>{var ae,he;return((ae=e==null?void 0:e.fileTypes)==null?void 0:ae.some(ie=>{if(ie.includes("*")){const oe=ie.split("/")[0];return N.type.startsWith(oe)}return N.type===ie}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(he=e==null?void 0:e.fileTypes)==null?void 0:he.join(", ")}`},[e]),A=$.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),b(!0);const X=[],ae=[];try{for(const ie of N){let oe=null;if(e!=null&&e.multiple&&d.some(H=>H.file.name===ie.name&&H.file.size===ie.size&&H.file.lastModified===ie.lastModified)){ae.push(`${ie.name}: File already exists`);continue}if(oe=B(ie),!oe&&(e!=null&&e.customValidation))try{const V=e.customValidation(ie);V instanceof Promise?oe=await V:oe=V}catch(V){oe=`Custom validation failed: ${V instanceof Error?V.message:"Unknown error"}`}if(oe)ae.push(`${ie.name}: ${oe}`);else{const V={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ie,preview:ie.type.startsWith("image/")?URL.createObjectURL(ie):void 0,progress:0,status:"pending",uploadedAt:new Date};X.push(V)}}const he=e!=null&&e.multiple?[...d,...X]:X;f(he),r==null||r(he),ae.length>0?(k(ae),S(ae)):(k([]),S([]))}catch(he){const ie=`Unexpected error: ${he instanceof Error?he.message:"Unknown error"}`;k([ie]),S([ie])}},[d,e==null?void 0:e.multiple,B,e==null?void 0:e.customValidation,r]),K=$.useCallback(N=>{b(!0);const X=d.filter(ae=>ae.id!==N);f(X),r==null||r(X),k([]),v.current&&(v.current.value="")},[d,r]),W=$.useCallback(()=>{if(e!=null&&e.required&&d.length===0){S([`${e.title} is required`]);return}k([]),j(!0);const N=d.filter(X=>X.status!=="error");n==null||n(N)},[d,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:h,getInputProps:z,isDragActive:I}=gc({onDrop:A,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!c)return;const N=[],X=[...R,...N];X.length>0?S(X):S([])},[d,e==null?void 0:e.required,e==null?void 0:e.title,c,g,R]);const U=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return m.jsxs(E.Box,{className:a,style:o,children:[m.jsxs(E.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&m.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&m.jsx(E.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(E.Card,{...h(),key:`dropzone-${d.length}`,sx:{border:"1px dashed",borderColor:I?"primary.main":"#CCCCCC",backgroundColor:I?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},m.jsx("input",{...z(),ref:v}),m.jsx(E.IconButton,{sx:{borderRadius:"8px"},children:m.jsx(ni,{sx:{width:36,height:36,color:"primary.main"}})}),m.jsx(E.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),m.jsx(E.Button,{onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},sx:{my:2},startIcon:m.jsx(ni,{}),variant:"contained",children:p}),m.jsx(E.Typography,{sx:{fontSize:"12px",fontWeight:400},children:u})),x.length>0&&m.jsx(E.Alert,{severity:"error",sx:{mt:2},children:x.map((N,X)=>m.jsx(E.Typography,{variant:"body2",children:N},X))}),d.length>0&&m.jsxs(E.Box,{sx:{mt:2},children:[m.jsxs(E.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",d.length,")"]}),d.map(N=>m.jsx(xc,{file:N,onRemove:K},N.id))]}),(e==null?void 0:e.helperText)&&m.jsx(E.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&m.jsx(E.Box,{sx:{mt:3,display:"flex",justifyContent:U()},children:m.jsx(E.Button,{variant:"contained",onClick:W,disabled:i||e.submitButton.disabled||d.length===0,startIcon:e.submitButton.loading?m.jsx(E.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=oc;exports.DocumentUpload=ny;exports.FieldRenderer=Ll;exports.FilePreview=xc;exports.FinAutocomplete=Dl;exports.FinCheckbox=la;exports.FinChip=zl;exports.FinCustomizedVerticalStepper=gh;exports.FinDateField=Pl;exports.FinDragDropList=fh;exports.FinForm=rm;exports.FinInfoCard=vh;exports.FinRadioGroup=ua;exports.FinSelect=$l;exports.FinSwitch=ca;exports.FinTabs=Vl;exports.FinTextField=sa;exports.FinTextarea=Il;exports.FinUiHeader=Ml;exports.FinVerticalStepper=mh;exports.ImageComponent=im;exports.StepNavigation=ac;exports.brand=uh;exports.fetchApiData=Bl;exports.finflowPalette=Q;exports.generateSchema=ic;exports.getApiConfig=Ua;exports.hasApiConfig=ur;exports.neutral=nt;exports.primary=lh;exports.secondary=ch;exports.shouldShowField=bh;exports.useApiData=Nl;
|
|
179
|
+
`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let p=[];for(let u of Object.values(this.internalTests))u&&p.push(u);this.runTests({path:a,value:l,originalValue:o,options:r,tests:p},n,u=>{if(u.length)return i(u,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:p}=t,u=c=>{i||(i=!0,r(c,o))},d=c=>{i||(i=!0,n(c,o))},f=a.length,x=[];if(!f)return d([]);let S={value:o,originalValue:s,path:l,options:p,schema:this};for(let c=0;c<a.length;c++){const b=a[c];b(S,u,function(j){j&&(Array.isArray(j)?x.push(...j):x.push(j)),--f<=0&&d(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let p=n[s];const u=Object.assign({},o,{strict:!0,parent:n,value:p,originalValue:a[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(d,f,x)=>this.resolve(u)._validate(p,u,f,x)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,p)=>{rt.isError(l)&&(l.value=p),s(l)},(l,p)=>{l.length?s(new rt(l,p,void 0,void 0,a)):o(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw rt.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new rt(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(rt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(rt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Vr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=zr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=zr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ot.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ot.notNull){return this.nullability(!1,t)}required(t=Ot.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ot.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=zr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=ql(t).map(a=>new Fr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ii(i,r):ii.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=zr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ot.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=zr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Ot.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=zr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,p,u)=>u.findIndex(d=>d.name===l.name)===p)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=Pm(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Im=()=>!0;function Kl(e){return new Ql(e)}class Ql extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Im},t))}}Kl.prototype=Ql.prototype;function Yl(){return new Gl}class Gl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return wt(r)||r===!0}})}isFalse(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return wt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yl.prototype=Gl.prototype;const Mm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zm(e){const t=fa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function fa(e){var t,r;const n=Mm.exec(e);return n?{year:Vt(n[1]),month:Vt(n[2],1)-1,day:Vt(n[3],1),hour:Vt(n[4]),minute:Vt(n[5]),second:Vt(n[6]),millisecond:n[7]?Vt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Vt(n[10]),minuteOffset:Vt(n[11])}:null}function Vt(e,t=0){return Number(e)||t}let Vm=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Nm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Lm="^\\d{4}-\\d{2}-\\d{2}",qm="\\d{2}:\\d{2}:\\d{2}",Um="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wm=new RegExp(`${Lm}T${qm}(\\.\\d+)?${Um}$`),Hm=e=>wt(e)||e===e.trim(),Km={}.toString();function un(){return new Zl}class Zl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Km?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ot.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Xe.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Xe.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Xe.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Xe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Xe.email){return this.matches(Vm,{name:"email",message:t,excludeEmptyString:!0})}url(t=Xe.url){return this.matches(Bm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Xe.uuid){return this.matches(Nm,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Wm,{name:"datetime",message:r||Xe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=fa(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Xe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=fa(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Xe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hm})}lowercase(t=Xe.lowercase){return this.transform(r=>wt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toLowerCase()})}uppercase(t=Xe.uppercase){return this.transform(r=>wt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toUpperCase()})}}un.prototype=Zl.prototype;let Qm=e=>e!=+e;function Xl(){return new Jl}class Jl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Qm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Wt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Wt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Wt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Wt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Wt.positive){return this.moreThan(0,t)}negative(t=Wt.negative){return this.lessThan(0,t)}integer(t=Wt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>wt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>wt(i)?i:Math[t](i))}}Xl.prototype=Jl.prototype;let ec=new Date(""),Ym=e=>Object.prototype.toString.call(e)==="[object Date]";function Ka(){return new On}class On extends st{constructor(){super({type:"date",check(t){return Ym(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=zm(t),isNaN(t)?On.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Fr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=pa.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=pa.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}On.INVALID_DATE=ec;Ka.prototype=On.prototype;Ka.INVALID_DATE=ec;function Gm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=Cr.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Fr.isRef(s)&&s.isSibling?a(s.path,o):Ha(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return km.array(Array.from(n),r).reverse()}function ms(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function tc(e){return(t,r)=>ms(e,t)-ms(e,r)}const Zm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Un(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Un(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Un(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Un)}):"optional"in e?e.optional():e}const Xm=(e,t)=>{const r=[...Cr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Cr.getter(Cr.join(r),!0)(e);return!!(i&&n in i)};let hs=e=>Object.prototype.toString.call(e)==="[object Object]";function ys(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jm=tc([]);function rc(e){return new nc(e)}class nc extends st{constructor(t){super({type:"object",check(r){return hs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),l={},p=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),u=!1;for(const d of s){let f=a[d],x=d in i;if(f){let S,c=i[d];p.path=(r.path?`${r.path}.`:"")+d,f=f.resolve({value:c,context:r.context,parent:l});let b=f instanceof st?f.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){u=u||d in i;continue}S=!r.__validating||!g?f.cast(i[d],p):i[d],S!==void 0&&(l[d]=S)}else x&&!o&&(l[d]=i[d]);(x!==d in l||l[d]!==i[d])&&(u=!0)}return u?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,p)=>{if(!s||!hs(p)){i(l,p);return}o=o||p;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Fr.isRef(f)||u.push(f.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:o}))}this.runTests({tests:u,value:p,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(l),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gm(t,r),n._sortErrors=tc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Un(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Cr.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return Xm(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Zm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qn.exact,test(r){if(r==null)return!0;const n=ys(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=ys(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Pi.camelCase)}snakeCase(){return this.transformKeys(Pi.snakeCase)}constantCase(){return this.transformKeys(t=>Pi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}rc.prototype=nc.prototype;const ic=e=>{const t={};return e.forEach(r=>{var a,o,s;let n;switch(r.type){case"text":case"textarea":case"tel":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=un().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=cr(n,r,"string"));break;case"password":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=Xl().typeError(`${r.label} must be a number`),r.validation?n=cr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=un(),r.validation&&(n=cr(n,r,"string"));break;case"checkbox":n=Yl(),r.validation&&(n=cr(n,r,"boolean"));break;case"date":n=Ka().typeError(`${r.label} must be a valid date`),r.validation?n=cr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=Kl()}if(((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required){const l=((s=r.validation)==null?void 0:s.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),rc().shape(t)},cr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,o=>o?i.test(o):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},ac=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=D.useMemo(()=>Array.from({length:t},(u,d)=>d+1),[t]),s=D.useMemo(()=>Math.round(e/t*100),[e,t]),l=u=>n[u-1]||`Step ${u}`,p=u=>u===e||a.includes(u)||u===e+1&&a.includes(e);return h.jsxs(C.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((u,d)=>{const f=u===e,x=u<e||a.includes(u),S=f||x?"primary.main":"#8F97A4";return h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center"},children:[h.jsxs(C.Box,{onClick:()=>p(u)&&r(u),sx:{display:"flex",alignItems:"center",cursor:p(u)?"pointer":"default"},children:[h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:f||x?"2px solid":"1px solid",borderColor:f||x?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c=>f||x?$t(c.palette.primary.main,.2):"transparent",mr:.5,color:S,fontWeight:f||x?600:500,fontSize:"12px"},children:u}),i&&h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:600,color:S},children:l(u)})]}),d<o.length-1&&h.jsx(C.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:u<e?"primary.main":"#DFE3E8"}})]},u)})}),h.jsx(C.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),h.jsx(C.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:u=>u.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},oc=({buttons:e,disabled:t=!1})=>{const r=s=>{s.onClick&&s.onClick()},n=e.filter(s=>s.position==="left"||!s.position),i=e.filter(s=>s.position==="center"),a=e.filter(s=>s.position==="right"),o=(s,l)=>{const p=(s.text||"").toLowerCase(),u=s.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=s.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),f=s.type?s.type:u?"submit":"button",x=d?"outlined":"contained",S=s.disabled||t,c=b=>b&&["primary","secondary","error","info","success","warning"].includes(b)?b:"primary";return h.jsxs(C.Button,{type:f,variant:x,color:c(s.color),size:s.size||"large",disabled:S,onClick:s.onClick?()=>r(s):void 0,sx:s.sx,children:[s.loading&&h.jsx(C.CircularProgress,{size:20,sx:{mr:1}}),s.text]},`${s.text}-${l}`)};return h.jsxs(C.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(C.Box,{sx:{display:"flex",gap:2},children:n.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:i.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:a.map((s,l)=>o(s,l))})]})},eh=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:l="right",layout:p="horizontal",spacing:u=2,sx:d}=e,f=g=>{let j="button",$="contained";return g.type?j=g.type:g.text.toLowerCase().includes("submit")||g.text.toLowerCase().includes("save")||g.text.toLowerCase().includes("next")?j="submit":(g.text.toLowerCase().includes("reset")||g.text.toLowerCase().includes("clear"))&&(j="reset"),(g.text.toLowerCase().includes("cancel")||g.text.toLowerCase().includes("back")||g.text.toLowerCase().includes("draft"))&&($="outlined"),{buttonType:j,buttonVariant:$}},x=g=>["primary","secondary","error","warning","info","success"].includes(g||"")?g:"primary",S=g=>{const{buttonType:j}=f(g);g.onClick?g.onClick():j==="submit"&&t?t(o):a&&r&&(g.text.toLowerCase().includes("next")?r(n+1,i):(g.text.toLowerCase().includes("back")||g.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(g,j)=>{const{buttonType:$,buttonVariant:k}=f(g),v=x(g.color);return h.jsx(C.Button,{type:$,variant:k,color:v,size:g.size||"medium",disabled:g.disabled,onClick:()=>S(g),sx:g.sx,children:g.text},j)},b=()=>{const g={display:"flex",gap:u,...d};switch(l){case"left":return{...g,justifyContent:"flex-start"};case"center":return{...g,justifyContent:"center"};case"right":return{...g,justifyContent:"flex-end"};case"space-between":return{...g,justifyContent:"space-between"};default:return{...g,justifyContent:"flex-end"}}};return p==="vertical"?h.jsx(C.Box,{sx:b(),children:s.map((g,j)=>h.jsx(C.Box,{sx:{width:"100%"},children:c(g,j)},j))}):h.jsx(C.Box,{sx:b(),children:h.jsx(C.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((g,j)=>c(g,j))})})},th=new cu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),rh=e=>h.jsx(mu,{client:th,children:h.jsx(nh,{...e})}),nh=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:l=!0,buttons:p,buttonGroup:u,baseUrl:d,apiHeaders:f,stepNavigationProps:x})=>{var fe,de;const S=[...new Set(r.map(L=>L.step).filter(L=>L!=null&&L>0))].sort((L,M)=>(L||0)-(M||0)),c=S.length>1,b=S.length||1,[g,j]=D.useState(1),$=c?r.filter(L=>L.step===g):r,k=D.useMemo(()=>ic($),[$]),{control:v,handleSubmit:B,formState:{errors:_},watch:K,setValue:W,resetField:m,trigger:z}=Lc({resolver:Wc(k),mode:"onChange",defaultValues:s}),I=K(),U=D.useRef({});D.useEffect(()=>{const L=[];for(const M of r){const ee=M.depends_on;ee&&typeof M.name=="string"&&L.push({dependentField:M.name,dependencyName:ee})}if(L.length!==0)for(const{dependentField:M,dependencyName:ee}of L){const ye=U.current[ee],xe=I==null?void 0:I[ee];if(ye!==xe)try{m(M)}catch{}U.current[ee]=xe}},[r,I,m]);const N=D.useRef(i);D.useEffect(()=>{N.current=i},[i]);const X=D.useMemo(()=>{try{return JSON.stringify(I)}catch{return String(Date.now())}},[I]),ae=D.useRef(null);D.useEffect(()=>{N.current&&ae.current!==X&&(ae.current=X,N.current(I))},[X]);const me=async()=>{if(!c)return!0;const L=r.filter(ee=>ee.step===g);for(const ee of L)if(ee.required){const ye=I[ee.name];let xe=!0;if(ee.type==="checkbox"?xe=ye===!0:Array.isArray(ye)?xe=ye.length>0:xe=ye!=null&&ye!=="",!xe)return!1}return await z()?!0:Object.keys(_).filter(ye=>L.some(xe=>xe.name===ye)).map(ye=>{const xe=_[ye];return typeof(xe==null?void 0:xe.message)=="string"?xe.message:`${ye} is invalid`}).length===0},ie=D.useMemo(()=>{if(!c)return!0;const L=r.filter(ee=>ee.step===g);for(const ee of L)if(ee.required){const ye=I[ee.name];let xe=!0;if(ee.type==="checkbox"?xe=ye===!0:Array.isArray(ye)?xe=ye.length>0:xe=ye!=null&&ye!=="",!xe)return!1}return Object.keys(_).filter(ee=>L.some(ye=>ye.name===ee)).length===0},[c,g,r,I,_]),oe=D.useMemo(()=>{if(c)return ie;for(const L of r)if(L.required){const M=I[L.name];let ee=!0;if(L.type==="checkbox"?ee=M===!0:ee=M!=null&&M!==""&&!(Array.isArray(M)&&M.length===0),!ee)return!1}return Object.keys(_).length===0},[c,ie,r,I,_]),V=async L=>{L<1||L>b||L>g&&c&&!await me()||j(L)},H=async L=>{if(c&&g<b){console.warn("Form submission attempted on non-final step");return}o&&o(L),n(L)},pe=async L=>{L&&(L.preventDefault(),L.stopPropagation()),c&&g<b&&await me()&&V(g+1)},he=L=>{L&&(L.preventDefault(),L.stopPropagation()),c&&g>1&&V(g-1)},se=L=>L.col?L.col:(L.xs||L.sm||L.md||L.lg||L.xl)&&(L.xs||L.sm||L.md||L.lg||L.xl)||12,q=t?C.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((fe=t.typography)==null?void 0:fe.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((de=t.typography)==null?void 0:de.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Z=()=>{if(u&&u.buttons&&u.buttons.length>0){const L={...u,buttons:u.buttons.map(M=>{const ee=(M.text||"").toLowerCase(),ye=M.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),xe=ee.includes("next");let Ue=!1;return c?(ye||xe)&&(Ue=!ie):ye&&(Ue=!oe),{...M,disabled:M.disabled||Ue}})};return h.jsx(C.Box,{sx:{mt:3},children:h.jsx(eh,{config:L,onSubmit:H,onStepChange:V,currentStep:g,totalSteps:b,isMultiStep:c,formData:I})})}if(p&&p.length>0){const L=p.map(M=>{const ee=(M.text||"").toLowerCase(),ye=M.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),xe=ee.includes("next");let Ue=!1;return c?(ye||xe)&&(Ue=!ie):ye&&(Ue=!oe),{...M,disabled:M.disabled||Ue}});return h.jsx(oc,{buttons:L})}return l?h.jsx(C.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:h.jsxs(C.Box,{sx:{display:"flex",gap:2},children:[c&&g>1&&h.jsx(C.Button,{type:"button",variant:"outlined",onClick:he,children:"Previous"}),c?g<b?h.jsx(C.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!ie,onClick:pe,children:"Next"}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ie,children:a}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!oe,children:a})]})}):null},ne=D.useMemo(()=>{const L=[];let M=[];for(const ee of $)ee.type==="section"&&M.length>0?(L.push(M),M=[ee]):M.push(ee);return M.length>0&&L.push(M),L},[$]),ce=h.jsxs(C.Box,{component:"form",onSubmit:L=>{if(c&&g<b){L.preventDefault(),L.stopPropagation(),ie&&pe();return}B(H)(L)},id:e,onKeyDown:L=>{L.key==="Enter"&&c&&g<b&&(L.preventDefault(),ie&&pe())},children:[c&&h.jsx(ac,{currentStep:g,totalSteps:b,onStepChange:V,stepTitles:x==null?void 0:x.stepTitles,showStepTitles:(x==null?void 0:x.showStepTitles)!==!1}),ne.map((L,M)=>h.jsx(C.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},children:L.map(ee=>{const ye=se(ee);return h.jsx(C.Box,{sx:{gridColumn:`span ${ye}`},children:h.jsx(Wa,{field:ee,control:v,errors:_,baseUrl:d,apiHeaders:f,formData:I,setValue:W})},ee.name)})},`group-${M}`)),Z()]});return q?h.jsx(C.ThemeProvider,{theme:q,children:ce}):ce},ih=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:o})=>h.jsx(C.Box,{sx:{textAlign:"center"},children:h.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Ar(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(u){try{p(n.next(u))}catch(d){o(d)}}function l(u){try{p(n.throw(u))}catch(d){o(d)}}function p(u){u.done?a(u.value):i(u.value).then(s,l)}p((n=n.apply(e,t||[])).next())})}const ah=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function en(e,t,r){const n=oh(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&gs(n,"path",a),gs(n,"relativePath",a),n}function oh(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=ah.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function gs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const sh=[".DS_Store","Thumbs.db"];function lh(e){return Ar(this,void 0,void 0,function*(){return oi(e)&&ch(e.dataTransfer)?fh(e.dataTransfer,e.type):uh(e)?ph(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dh(e):[]})}function ch(e){return oi(e)}function uh(e){return oi(e)&&oi(e.target)}function oi(e){return typeof e=="object"&&e!==null}function ph(e){return ma(e.target.files).map(t=>en(t))}function dh(e){return Ar(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>en(r))})}function fh(e,t){return Ar(this,void 0,void 0,function*(){if(e.items){const r=ma(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(mh));return xs(sc(n))}return xs(ma(e.files).map(r=>en(r)))})}function xs(e){return e.filter(t=>sh.indexOf(t.name)===-1)}function ma(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function mh(e){if(typeof e.webkitGetAsEntry!="function")return vs(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?lc(t):vs(e,t)}function sc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?sc(r):[r]],[])}function vs(e,t){return Ar(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,en(o)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return en(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function hh(e){return Ar(this,void 0,void 0,function*(){return e.isDirectory?lc(e):yh(e)})}function lc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(o=>Ar(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(hh));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function yh(e){return Ar(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=en(n,e.fullPath);t(i)},n=>{r(n)})})})}var Mn={},bs;function gh(){return bs||(bs=1,Mn.__esModule=!0,Mn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Mn}var xh=gh();const Ii=Fa(xh);function ws(e){return wh(e)||bh(e)||uc(e)||vh()}function vh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wh(e){if(Array.isArray(e))return ha(e)}function Ss(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 Cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ss(Object(r),!0).forEach(function(n){cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ss(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gn(e,t){return Eh(e)||Ch(e,t)||uc(e,t)||Sh()}function Sh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uc(e,t){if(e){if(typeof e=="string")return ha(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ha(e,t)}}function ha(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ch(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function Eh(e){if(Array.isArray(e))return e}var kh=typeof Ii=="function"?Ii:Ii.default,Th="file-invalid-type",Oh="file-too-large",jh="file-too-small",Fh="too-many-files",Ah=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:Th,message:"File type must be ".concat(n)}},Es=function(t){return{code:Oh,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ks=function(t){return{code:jh,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},_h={code:Fh,message:"Too many files"};function pc(e,t){var r=e.type==="application/x-moz-file"||kh(e,t);return[r,r?null:Ah(t)]}function dc(e,t,r){if(pr(e.size))if(pr(t)&&pr(r)){if(e.size>r)return[!1,Es(r)];if(e.size<t)return[!1,ks(t)]}else{if(pr(t)&&e.size<t)return[!1,ks(t)];if(pr(r)&&e.size>r)return[!1,Es(r)]}return[!0,null]}function pr(e){return e!=null}function Rh(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(l){var p=pc(l,r),u=gn(p,1),d=u[0],f=dc(l,n,i),x=gn(f,1),S=x[0],c=s?s(l):null;return d&&S&&!c})}function si(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ts(e){e.preventDefault()}function $h(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Dh(e){return e.indexOf("Edge/")!==-1}function Ph(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $h(e)||Dh(e)}function Tt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!si(n)&&s&&s.apply(void 0,[n].concat(a)),si(n)})}}function Ih(){return"showOpenFilePicker"in window}function Mh(e){if(pr(e)){var t=Object.entries(e).filter(function(r){var n=gn(r,2),i=n[0],a=n[1],o=!0;return fc(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(mc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(r,n){var i=gn(n,2),a=i[0],o=i[1];return Cs(Cs({},r),{},cc({},a,o))},{});return[{description:"Files",accept:t}]}return e}function zh(e){if(pr(e))return Object.entries(e).reduce(function(t,r){var n=gn(r,2),i=n[0],a=n[1];return[].concat(ws(t),[i],ws(a))},[]).filter(function(t){return fc(t)||mc(t)}).join(",")}function Vh(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Bh(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function fc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function mc(e){return/^.*\.[\w]+$/.test(e)}var Nh=["children"],Lh=["open"],qh=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Uh=["refKey","onChange","onClick"];function Wh(e){return Qh(e)||Kh(e)||hc(e)||Hh()}function Hh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qh(e){if(Array.isArray(e))return ya(e)}function Mi(e,t){return Zh(e)||Gh(e,t)||hc(e,t)||Yh()}function Yh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
183
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hc(e,t){if(e){if(typeof e=="string")return ya(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ya(e,t)}}function ya(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gh(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function Zh(e){if(Array.isArray(e))return e}function Os(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 Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Os(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ga(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function li(e,t){if(e==null)return{};var r=Xh(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xh(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Qa=D.forwardRef(function(e,t){var r=e.children,n=li(e,Nh),i=gc(n),a=i.open,o=li(i,Lh);return D.useImperativeHandle(t,function(){return{open:a}},[a]),D.createElement(D.Fragment,null,r(Re(Re({},o),{},{open:a})))});Qa.displayName="Dropzone";var yc={disabled:!1,getFilesFromEvent:lh,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Qa.defaultProps=yc;Qa.propTypes={children:w.func,accept:w.objectOf(w.arrayOf(w.string)),multiple:w.bool,preventDropOnDocument:w.bool,noClick:w.bool,noKeyboard:w.bool,noDrag:w.bool,noDragEventsBubbling:w.bool,minSize:w.number,maxSize:w.number,maxFiles:w.number,disabled:w.bool,getFilesFromEvent:w.func,onFileDialogCancel:w.func,onFileDialogOpen:w.func,useFsAccessApi:w.bool,autoFocus:w.bool,onDragEnter:w.func,onDragLeave:w.func,onDragOver:w.func,onDrop:w.func,onDropAccepted:w.func,onDropRejected:w.func,onError:w.func,validator:w.func};var xa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function gc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},yc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,p=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,x=t.onDropAccepted,S=t.onDropRejected,c=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,j=t.autoFocus,$=t.preventDropOnDocument,k=t.noClick,v=t.noKeyboard,B=t.noDrag,_=t.noDragEventsBubbling,K=t.onError,W=t.validator,m=D.useMemo(function(){return zh(r)},[r]),z=D.useMemo(function(){return Mh(r)},[r]),I=D.useMemo(function(){return typeof b=="function"?b:js},[b]),U=D.useMemo(function(){return typeof c=="function"?c:js},[c]),N=D.useRef(null),X=D.useRef(null),ae=D.useReducer(Jh,xa),me=Mi(ae,2),ie=me[0],oe=me[1],V=ie.isFocused,H=ie.isFileDialogActive,pe=D.useRef(typeof window<"u"&&window.isSecureContext&&g&&Ih()),he=function(){!pe.current&&H&&setTimeout(function(){if(X.current){var A=X.current.files;A.length||(oe({type:"closeDialog"}),U())}},300)};D.useEffect(function(){return window.addEventListener("focus",he,!1),function(){window.removeEventListener("focus",he,!1)}},[X,H,U,pe]);var se=D.useRef([]),q=function(A){N.current&&N.current.contains(A.target)||(A.preventDefault(),se.current=[])};D.useEffect(function(){return $&&(document.addEventListener("dragover",Ts,!1),document.addEventListener("drop",q,!1)),function(){$&&(document.removeEventListener("dragover",Ts),document.removeEventListener("drop",q))}},[N,$]),D.useEffect(function(){return!n&&j&&N.current&&N.current.focus(),function(){}},[N,j,n]);var Z=D.useCallback(function(F){K?K(F):console.error(F)},[K]),ne=D.useCallback(function(F){F.preventDefault(),F.persist(),y(F),se.current=[].concat(Wh(se.current),[F.target]),zn(F)&&Promise.resolve(i(F)).then(function(A){if(!(si(F)&&!_)){var R=A.length,J=R>0&&Rh({files:A,accept:m,minSize:o,maxSize:a,multiple:s,maxFiles:l,validator:W}),le=R>0&&!J;oe({isDragAccept:J,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),p&&p(F)}}).catch(function(A){return Z(A)})},[i,p,Z,_,m,o,a,s,l,W]),ce=D.useCallback(function(F){F.preventDefault(),F.persist(),y(F);var A=zn(F);if(A&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return A&&d&&d(F),!1},[d,_]),fe=D.useCallback(function(F){F.preventDefault(),F.persist(),y(F);var A=se.current.filter(function(J){return N.current&&N.current.contains(J)}),R=A.indexOf(F.target);R!==-1&&A.splice(R,1),se.current=A,!(A.length>0)&&(oe({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zn(F)&&u&&u(F))},[N,u,_]),de=D.useCallback(function(F,A){var R=[],J=[];F.forEach(function(le){var Oe=pc(le,m),Ae=Mi(Oe,2),We=Ae[0],Ct=Ae[1],Dt=dc(le,o,a),Et=Mi(Dt,2),ht=Et[0],yt=Et[1],lr=W?W(le):null;if(We&&ht&&!lr)R.push(le);else{var _r=[Ct,yt];lr&&(_r=_r.concat(lr)),J.push({file:le,errors:_r.filter(function(vc){return vc})})}}),(!s&&R.length>1||s&&l>=1&&R.length>l)&&(R.forEach(function(le){J.push({file:le,errors:[_h]})}),R.splice(0)),oe({acceptedFiles:R,fileRejections:J,isDragReject:J.length>0,type:"setFiles"}),f&&f(R,J,A),J.length>0&&S&&S(J,A),R.length>0&&x&&x(R,A)},[oe,s,m,o,a,l,f,x,S,W]),L=D.useCallback(function(F){F.preventDefault(),F.persist(),y(F),se.current=[],zn(F)&&Promise.resolve(i(F)).then(function(A){si(F)&&!_||de(A,F)}).catch(function(A){return Z(A)}),oe({type:"reset"})},[i,de,Z,_]),M=D.useCallback(function(){if(pe.current){oe({type:"openDialog"}),I();var F={multiple:s,types:z};window.showOpenFilePicker(F).then(function(A){return i(A)}).then(function(A){de(A,null),oe({type:"closeDialog"})}).catch(function(A){Vh(A)?(U(A),oe({type:"closeDialog"})):Bh(A)?(pe.current=!1,X.current?(X.current.value=null,X.current.click()):Z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Z(A)});return}X.current&&(oe({type:"openDialog"}),I(),X.current.value=null,X.current.click())},[oe,I,U,g,de,Z,z,s]),ee=D.useCallback(function(F){!N.current||!N.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),M())},[N,M]),ye=D.useCallback(function(){oe({type:"focus"})},[]),xe=D.useCallback(function(){oe({type:"blur"})},[]),Ue=D.useCallback(function(){k||(Ph()?setTimeout(M,0):M())},[k,M]),Ne=function(A){return n?null:A},Ze=function(A){return v?null:Ne(A)},ue=function(A){return B?null:Ne(A)},y=function(A){_&&A.stopPropagation()},O=D.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=F.refKey,R=A===void 0?"ref":A,J=F.role,le=F.onKeyDown,Oe=F.onFocus,Ae=F.onBlur,We=F.onClick,Ct=F.onDragEnter,Dt=F.onDragOver,Et=F.onDragLeave,ht=F.onDrop,yt=li(F,qh);return Re(Re(ga({onKeyDown:Ze(Tt(le,ee)),onFocus:Ze(Tt(Oe,ye)),onBlur:Ze(Tt(Ae,xe)),onClick:Ne(Tt(We,Ue)),onDragEnter:ue(Tt(Ct,ne)),onDragOver:ue(Tt(Dt,ce)),onDragLeave:ue(Tt(Et,fe)),onDrop:ue(Tt(ht,L)),role:typeof J=="string"&&J!==""?J:"presentation"},R,N),!n&&!v?{tabIndex:0}:{}),yt)}},[N,ee,ye,xe,Ue,ne,ce,fe,L,v,B,n]),T=D.useCallback(function(F){F.stopPropagation()},[]),Y=D.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=F.refKey,R=A===void 0?"ref":A,J=F.onChange,le=F.onClick,Oe=li(F,Uh),Ae=ga({accept:m,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ne(Tt(J,L)),onClick:Ne(Tt(le,T)),tabIndex:-1},R,X);return Re(Re({},Ae),Oe)}},[X,r,s,L,n]);return Re(Re({},ie),{},{isFocused:V&&!n,getRootProps:O,getInputProps:Y,rootRef:N,inputRef:X,open:Ne(M)})}function Jh(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},xa),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},xa);default:return e}}function js(){}const ey=St(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ty=St(h.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Fs=St(h.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),ry=St(h.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),xc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?h.jsx(ry,{}):e.file.type.includes("pdf")?h.jsx(Fs,{}):h.jsx(Fs,{}),n=()=>{switch(e.status){case"success":return h.jsx(ey,{color:"success"});case"uploading":return h.jsx(C.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const o=1024,s=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(o));return parseFloat((a/Math.pow(o,l)).toFixed(2))+" "+s[l]};return h.jsxs(C.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),h.jsxs(C.Box,{sx:{flex:1,minWidth:0},children:[h.jsx(C.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),h.jsxs(C.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),h.jsx(C.Tooltip,{title:"Remove file",children:h.jsx(C.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:h.jsx(ty,{})})})]})},ny=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:o,title:s,subtitle:l,buttonText:p,fileSupportedText:u})=>{const[d,f]=D.useState(t),[x,S]=D.useState([]),[c,b]=D.useState(!1),[g,j]=D.useState(!1),[$,k]=D.useState([]),v=D.useRef(null);D.useEffect(()=>{f(t)},[t]);const B=D.useCallback(N=>{var ae,me;return((ae=e==null?void 0:e.fileTypes)==null?void 0:ae.some(ie=>{if(ie.includes("*")){const oe=ie.split("/")[0];return N.type.startsWith(oe)}return N.type===ie}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(me=e==null?void 0:e.fileTypes)==null?void 0:me.join(", ")}`},[e]),_=D.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),b(!0);const X=[],ae=[];try{for(const ie of N){let oe=null;if(e!=null&&e.multiple&&d.some(H=>H.file.name===ie.name&&H.file.size===ie.size&&H.file.lastModified===ie.lastModified)){ae.push(`${ie.name}: File already exists`);continue}if(oe=B(ie),!oe&&(e!=null&&e.customValidation))try{const V=e.customValidation(ie);V instanceof Promise?oe=await V:oe=V}catch(V){oe=`Custom validation failed: ${V instanceof Error?V.message:"Unknown error"}`}if(oe)ae.push(`${ie.name}: ${oe}`);else{const V={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ie,preview:ie.type.startsWith("image/")?URL.createObjectURL(ie):void 0,progress:0,status:"pending",uploadedAt:new Date};X.push(V)}}const me=e!=null&&e.multiple?[...d,...X]:X;f(me),r==null||r(me),ae.length>0?(k(ae),S(ae)):(k([]),S([]))}catch(me){const ie=`Unexpected error: ${me instanceof Error?me.message:"Unknown error"}`;k([ie]),S([ie])}},[d,e==null?void 0:e.multiple,B,e==null?void 0:e.customValidation,r]),K=D.useCallback(N=>{b(!0);const X=d.filter(ae=>ae.id!==N);f(X),r==null||r(X),k([]),v.current&&(v.current.value="")},[d,r]),W=D.useCallback(()=>{if(e!=null&&e.required&&d.length===0){S([`${e.title} is required`]);return}k([]),j(!0);const N=d.filter(X=>X.status!=="error");n==null||n(N)},[d,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:m,getInputProps:z,isDragActive:I}=gc({onDrop:_,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});D.useEffect(()=>{if(!c)return;const N=[],X=[...$,...N];X.length>0?S(X):S([])},[d,e==null?void 0:e.required,e==null?void 0:e.title,c,g,$]);const U=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return h.jsxs(C.Box,{className:a,style:o,children:[h.jsxs(C.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&h.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&h.jsx(C.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),D.createElement(C.Card,{...m(),key:`dropzone-${d.length}`,sx:{border:"1px dashed",borderColor:I?"primary.main":"#CCCCCC",backgroundColor:I?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},h.jsx("input",{...z(),ref:v}),h.jsx(C.IconButton,{sx:{borderRadius:"8px"},children:h.jsx(ni,{sx:{width:36,height:36,color:"primary.main"}})}),h.jsx(C.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:s}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),h.jsx(C.Button,{onClick:()=>{var N;return(N=v.current)==null?void 0:N.click()},sx:{my:2},startIcon:h.jsx(ni,{}),variant:"contained",children:p}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400},children:u})),x.length>0&&h.jsx(C.Alert,{severity:"error",sx:{mt:2},children:x.map((N,X)=>h.jsx(C.Typography,{variant:"body2",children:N},X))}),d.length>0&&h.jsxs(C.Box,{sx:{mt:2},children:[h.jsxs(C.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",d.length,")"]}),d.map(N=>h.jsx(xc,{file:N,onRemove:K},N.id))]}),(e==null?void 0:e.helperText)&&h.jsx(C.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&h.jsx(C.Box,{sx:{mt:3,display:"flex",justifyContent:U()},children:h.jsx(C.Button,{variant:"contained",onClick:W,disabled:i||e.submitButton.disabled||d.length===0,startIcon:e.submitButton.loading?h.jsx(C.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=oc;exports.DocumentUpload=ny;exports.FieldRenderer=Wa;exports.FilePreview=xc;exports.FinAutocomplete=Pl;exports.FinCheckbox=la;exports.FinChip=Vl;exports.FinCustomizedVerticalStepper=gm;exports.FinDateField=Il;exports.FinDragDropList=fm;exports.FinForm=rh;exports.FinInfoCard=vm;exports.FinRadioGroup=ua;exports.FinSelect=Dl;exports.FinSwitch=ca;exports.FinTabs=Bl;exports.FinTextField=sa;exports.FinTextarea=Ml;exports.FinUiHeader=zl;exports.FinVerticalStepper=hm;exports.ImageComponent=ih;exports.StepNavigation=ac;exports.brand=um;exports.fetchApiData=Nl;exports.finflowPalette=Q;exports.generateSchema=ic;exports.getApiConfig=Ua;exports.hasApiConfig=ur;exports.neutral=nt;exports.primary=lm;exports.secondary=cm;exports.shouldShowField=bm;exports.useApiData=Ll;
|