finform-react-builder 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1968 -1963
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";var da=e=>{throw TypeError(e)};var Xn=(e,t,r)=>t.has(e)||da("Cannot "+r);var v=(e,t,r)=>(Xn(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?da("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),G=(e,t,r,n)=>(Xn(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),de=(e,t,r)=>(Xn(e,t,"access private method"),r);var un=(e,t,r,n)=>({set _(i){G(e,t,i,r)},get _(){return v(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),M=require("react"),I=require("@mui/material"),dl=require("@emotion/styled");require("@emotion/react");function fl(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 Ce=fl(M);var tn=e=>e.type==="checkbox",Qt=e=>e instanceof Date,Ne=e=>e==null;const Ls=e=>typeof e=="object";var Fe=e=>!Ne(e)&&!Array.isArray(e)&&Ls(e)&&!Qt(e),qs=e=>Fe(e)&&e.target?tn(e.target)?e.target.checked:e.target.value:e,ml=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bs=(e,t)=>e.has(ml(t)),hl=e=>{const t=e.constructor&&e.constructor.prototype;return Fe(t)&&t.hasOwnProperty("isPrototypeOf")},Bi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Re(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(!(Bi&&(e instanceof Blob||n))&&(r||Fe(e)))if(t=r?[]:{},!r&&!hl(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Re(e[i]));else return e;return t}var Ln=e=>/^\w*$/.test(e),Ae=e=>e===void 0,Ui=e=>Array.isArray(e)?e.filter(Boolean):[],Wi=e=>Ui(e.replace(/["|']|\]/g,"").split(/\.|\[/)),q=(e,t,r)=>{if(!t||!Fe(e))return r;const n=(Ln(t)?[t]:Wi(t)).reduce((i,a)=>Ne(i)?i:i[a],e);return Ae(n)||n===e?Ae(e[t])?r:e[t]:n},He=e=>typeof e=="boolean",ge=(e,t,r)=>{let n=-1;const i=Ln(t)?[t]:Wi(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const d=e[o];l=Fe(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const On={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},it={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Us=M.createContext(null);Us.displayName="HookFormContext";const Hi=()=>M.useContext(Us);var Ws=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==it.all&&(t._proxyFormState[s]=!n||it.all),r&&(r[s]=!0),e[s]}});return i};const Ki=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;function gl(e){const t=Hi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=M.useState(r._formState),l=M.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ki(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),M.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),M.useMemo(()=>Ws(s,r,l.current,!1),[s,r])}var ht=e=>typeof e=="string",Hs=(e,t,r,n,i)=>ht(e)?(n&&t.watch.add(e),q(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),q(r,a))):(n&&(t.watchAll=!0),r);function yl(e){const t=Hi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=M.useRef(i),[l,d]=M.useState(r._getWatch(n,o.current));return Ki(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:p=>!a&&d(Hs(n,r._names,p.values||r._formValues,!1,o.current))}),[n,r,a,s]),M.useEffect(()=>r._removeUnmounted()),l}function vl(e){const t=Hi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=Bs(i._names.array,r),o=yl({control:i,name:r,defaultValue:q(i._formValues,r,q(i._defaultValues,r,e.defaultValue)),exact:!0}),l=gl({control:i,name:r,exact:!0}),d=M.useRef(e),p=M.useRef(i.register(r,{...e.rules,value:o,...He(e.disabled)?{disabled:e.disabled}:{}})),f=M.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!q(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!q(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!q(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!q(l.validatingFields,r)},error:{enumerable:!0,get:()=>q(l.errors,r)}}),[l,r]),m=M.useCallback(w=>p.current.onChange({target:{value:qs(w),name:r},type:On.CHANGE}),[r]),x=M.useCallback(()=>p.current.onBlur({target:{value:q(i._formValues,r),name:r},type:On.BLUR}),[r,i._formValues]),h=M.useCallback(w=>{const y=q(i._fields,r);y&&w&&(y._f.ref={focus:()=>w.focus&&w.focus(),select:()=>w.select&&w.select(),setCustomValidity:O=>w.setCustomValidity(O),reportValidity:()=>w.reportValidity()})},[i._fields,r]),c=M.useMemo(()=>({name:r,value:o,...He(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:m,onBlur:x,ref:h}),[r,n,l.disabled,m,x,h,o]);return M.useEffect(()=>{const w=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...He(d.current.disabled)?{disabled:d.current.disabled}:{}});const y=(O,$)=>{const F=q(i._fields,O);F&&F._f&&(F._f.mount=$)};if(y(r,!0),w){const O=Re(q(i._options.defaultValues,r));ge(i._defaultValues,r,O),Ae(q(i._formValues,r))&&ge(i._formValues,r,O)}return!s&&i.register(r),()=>{(s?w&&!i._state.action:w)?i.unregister(r):y(r,!1)}},[r,i,s,a]),M.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),M.useMemo(()=>({field:c,formState:l,fieldState:f}),[c,l,f])}const lt=e=>e.render(vl(e));var Ks=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Ur=e=>Array.isArray(e)?e:[e],fa=()=>{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=[]}}},yi=e=>Ne(e)||!Ls(e);function _t(e,t){if(yi(e)||yi(t))return e===t;if(Qt(e)&&Qt(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 s=t[i];if(Qt(a)&&Qt(s)||Fe(a)&&Fe(s)||Array.isArray(a)&&Array.isArray(s)?!_t(a,s):a!==s)return!1}}return!0}var Be=e=>Fe(e)&&!Object.keys(e).length,Qi=e=>e.type==="file",at=e=>typeof e=="function",Tn=e=>{if(!Bi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qs=e=>e.type==="select-multiple",Gi=e=>e.type==="radio",xl=e=>Gi(e)||tn(e),ei=e=>Tn(e)&&e.isConnected;function bl(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ae(e)?n++:e[t[n++]];return e}function wl(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ae(e[t]))return!1;return!0}function $e(e,t){const r=Array.isArray(t)?t:Ln(t)?[t]:Wi(t),n=r.length===1?e:bl(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Fe(n)&&Be(n)||Array.isArray(n)&&wl(n))&&$e(e,r.slice(0,-1)),e}var Gs=e=>{for(const t in e)if(at(e[t]))return!0;return!1};function Cn(e,t={}){const r=Array.isArray(e);if(Fe(e)||r)for(const n in e)Array.isArray(e[n])||Fe(e[n])&&!Gs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Cn(e[n],t[n])):Ne(e[n])||(t[n]=!0);return t}function Ys(e,t,r){const n=Array.isArray(e);if(Fe(e)||n)for(const i in e)Array.isArray(e[i])||Fe(e[i])&&!Gs(e[i])?Ae(t)||yi(r[i])?r[i]=Array.isArray(e[i])?Cn(e[i],[]):{...Cn(e[i])}:Ys(e[i],Ne(t)?{}:t[i],r[i]):r[i]=!_t(e[i],t[i]);return r}var Mr=(e,t)=>Ys(e,t,Cn(t));const ma={value:!1,isValid:!1},ha={value:!0,isValid:!0};var Zs=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&&!Ae(e[0].attributes.value)?Ae(e[0].value)||e[0].value===""?ha:{value:e[0].value,isValid:!0}:ha:ma}return ma},Js=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ae(e)?e:t?e===""?NaN:e&&+e:r&&ht(e)?new Date(e):n?n(e):e;const ga={isValid:!1,value:null};var Xs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ga):ga;function ya(e){const t=e.ref;return Qi(t)?t.files:Gi(t)?Xs(e.refs).value:Qs(t)?[...t.selectedOptions].map(({value:r})=>r):tn(t)?Zs(e.refs).value:Js(Ae(t.value)?e.ref.value:t.value,e)}var Sl=(e,t,r,n)=>{const i={};for(const a of e){const s=q(t,a);s&&ge(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},_n=e=>e instanceof RegExp,zr=e=>Ae(e)?e:_n(e)?e.source:Fe(e)?_n(e.value)?e.value.source:e.value:e,va=e=>({isOnSubmit:!e||e===it.onSubmit,isOnBlur:e===it.onBlur,isOnChange:e===it.onChange,isOnAll:e===it.all,isOnTouch:e===it.onTouched});const xa="AsyncFunction";var El=e=>!!e&&!!e.validate&&!!(at(e.validate)&&e.validate.constructor.name===xa||Fe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===xa)),kl=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ba=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=q(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Wr(o,t))break}else if(Fe(o)&&Wr(o,t))break}}};function wa(e,t,r){const n=q(e,r);if(n||Ln(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=q(t,a),o=q(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var Ol=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Be(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||it.all))},Tl=(e,t,r)=>!e||!t||e===t||Ur(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Cl=(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,_l=(e,t)=>!Ui(q(e,t)).length&&$e(e,t),Al=(e,t,r)=>{const n=Ur(q(e,r));return ge(n,"root",t[r]),ge(e,r,n),e},wn=e=>ht(e);function Sa(e,t,r="validate"){if(wn(e)||Array.isArray(e)&&e.every(wn)||He(e)&&!e)return{type:r,message:wn(e)?e:"",ref:t}}var pr=e=>Fe(e)&&!_n(e)?e:{value:e,message:""},Ea=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:d,minLength:p,min:f,max:m,pattern:x,validate:h,name:c,valueAsNumber:w,mount:y}=e._f,O=q(r,c);if(!y||t.has(c))return{};const $=o?o[0]:s,F=k=>{i&&$.reportValidity&&($.setCustomValidity(He(k)?"":k||""),$.reportValidity())},b={},V=Gi(s),K=tn(s),Y=V||K,W=(w||Qi(s))&&Ae(s.value)&&Ae(O)||Tn(s)&&s.value===""||O===""||Array.isArray(O)&&!O.length,u=Ks.bind(null,c,n,b),D=(k,P,z,L=gt.maxLength,U=gt.minLength)=>{const ue=k?P:z;b[c]={type:k?L:U,message:ue,ref:s,...u(k?L:U,ue)}};if(a?!Array.isArray(O)||!O.length:l&&(!Y&&(W||Ne(O))||He(O)&&!O||K&&!Zs(o).isValid||V&&!Xs(o).isValid)){const{value:k,message:P}=wn(l)?{value:!!l,message:l}:pr(l);if(k&&(b[c]={type:gt.required,message:P,ref:$,...u(gt.required,P)},!n))return F(P),b}if(!W&&(!Ne(f)||!Ne(m))){let k,P;const z=pr(m),L=pr(f);if(!Ne(O)&&!isNaN(O)){const U=s.valueAsNumber||O&&+O;Ne(z.value)||(k=U>z.value),Ne(L.value)||(P=U<L.value)}else{const U=s.valueAsDate||new Date(O),ue=R=>new Date(new Date().toDateString()+" "+R),X=s.type=="time",ee=s.type=="week";ht(z.value)&&O&&(k=X?ue(O)>ue(z.value):ee?O>z.value:U>new Date(z.value)),ht(L.value)&&O&&(P=X?ue(O)<ue(L.value):ee?O<L.value:U<new Date(L.value))}if((k||P)&&(D(!!k,z.message,L.message,gt.max,gt.min),!n))return F(b[c].message),b}if((d||p)&&!W&&(ht(O)||a&&Array.isArray(O))){const k=pr(d),P=pr(p),z=!Ne(k.value)&&O.length>+k.value,L=!Ne(P.value)&&O.length<+P.value;if((z||L)&&(D(z,k.message,P.message),!n))return F(b[c].message),b}if(x&&!W&&ht(O)){const{value:k,message:P}=pr(x);if(_n(k)&&!O.match(k)&&(b[c]={type:gt.pattern,message:P,ref:s,...u(gt.pattern,P)},!n))return F(P),b}if(h){if(at(h)){const k=await h(O,r),P=Sa(k,$);if(P&&(b[c]={...P,...u(gt.validate,P.message)},!n))return F(P.message),b}else if(Fe(h)){let k={};for(const P in h){if(!Be(k)&&!n)break;const z=Sa(await h[P](O,r),$,P);z&&(k={...z,...u(P,z.message)},F(z.message),n&&(b[c]=k))}if(!Be(k)&&(b[c]={ref:$,...k},!n))return b}}return F(!0),b};const Fl={mode:it.onSubmit,reValidateMode:it.onChange,shouldFocusError:!0};function jl(e={}){let t={...Fl,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:at(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=Fe(t.defaultValues)||Fe(t.values)?Re(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Re(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...p};const m={array:fa(),state:fa()},x=t.criteriaMode===it.all,h=g=>S=>{clearTimeout(d),d=setTimeout(g,S)},c=async g=>{if(!t.disabled&&(p.isValid||f.isValid||g)){const S=t.resolver?Be((await K()).errors):await W(n,!0);S!==r.isValid&&m.state.next({isValid:S})}},w=(g,S)=>{!t.disabled&&(p.isValidating||p.validatingFields||f.isValidating||f.validatingFields)&&((g||Array.from(o.mount)).forEach(j=>{j&&(S?ge(r.validatingFields,j,S):$e(r.validatingFields,j))}),m.state.next({validatingFields:r.validatingFields,isValidating:!Be(r.validatingFields)}))},y=(g,S=[],j,H,E=!0,_=!0)=>{if(H&&j&&!t.disabled){if(s.action=!0,_&&Array.isArray(q(n,g))){const B=j(q(n,g),H.argA,H.argB);E&&ge(n,g,B)}if(_&&Array.isArray(q(r.errors,g))){const B=j(q(r.errors,g),H.argA,H.argB);E&&ge(r.errors,g,B),_l(r.errors,g)}if((p.touchedFields||f.touchedFields)&&_&&Array.isArray(q(r.touchedFields,g))){const B=j(q(r.touchedFields,g),H.argA,H.argB);E&&ge(r.touchedFields,g,B)}(p.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Mr(i,a)),m.state.next({name:g,isDirty:D(g,S),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ge(a,g,S)},O=(g,S)=>{ge(r.errors,g,S),m.state.next({errors:r.errors})},$=g=>{r.errors=g,m.state.next({errors:r.errors,isValid:!1})},F=(g,S,j,H)=>{const E=q(n,g);if(E){const _=q(a,g,Ae(j)?q(i,g):j);Ae(_)||H&&H.defaultChecked||S?ge(a,g,S?_:ya(E._f)):z(g,_),s.mount&&c()}},b=(g,S,j,H,E)=>{let _=!1,B=!1;const ne={name:g};if(!t.disabled){if(!j||H){(p.isDirty||f.isDirty)&&(B=r.isDirty,r.isDirty=ne.isDirty=D(),_=B!==ne.isDirty);const le=_t(q(i,g),S);B=!!q(r.dirtyFields,g),le?$e(r.dirtyFields,g):ge(r.dirtyFields,g,!0),ne.dirtyFields=r.dirtyFields,_=_||(p.dirtyFields||f.dirtyFields)&&B!==!le}if(j){const le=q(r.touchedFields,g);le||(ge(r.touchedFields,g,j),ne.touchedFields=r.touchedFields,_=_||(p.touchedFields||f.touchedFields)&&le!==j)}_&&E&&m.state.next(ne)}return _?ne:{}},V=(g,S,j,H)=>{const E=q(r.errors,g),_=(p.isValid||f.isValid)&&He(S)&&r.isValid!==S;if(t.delayError&&j?(l=h(()=>O(g,j)),l(t.delayError)):(clearTimeout(d),l=null,j?ge(r.errors,g,j):$e(r.errors,g)),(j?!_t(E,j):E)||!Be(H)||_){const B={...H,..._&&He(S)?{isValid:S}:{},errors:r.errors,name:g};r={...r,...B},m.state.next(B)}},K=async g=>{w(g,!0);const S=await t.resolver(a,t.context,Sl(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return w(g),S},Y=async g=>{const{errors:S}=await K(g);if(g)for(const j of g){const H=q(S,j);H?ge(r.errors,j,H):$e(r.errors,j)}else r.errors=S;return S},W=async(g,S,j={valid:!0})=>{for(const H in g){const E=g[H];if(E){const{_f:_,...B}=E;if(_){const ne=o.array.has(_.name),le=E._f&&El(E._f);le&&p.validatingFields&&w([H],!0);const De=await Ea(E,o.disabled,a,x,t.shouldUseNativeValidation&&!S,ne);if(le&&p.validatingFields&&w([H]),De[_.name]&&(j.valid=!1,S))break;!S&&(q(De,_.name)?ne?Al(r.errors,De,_.name):ge(r.errors,_.name,De[_.name]):$e(r.errors,_.name))}!Be(B)&&await W(B,S,j)}}return j.valid},u=()=>{for(const g of o.unMount){const S=q(n,g);S&&(S._f.refs?S._f.refs.every(j=>!ei(j)):!ei(S._f.ref))&&se(g)}o.unMount=new Set},D=(g,S)=>!t.disabled&&(g&&S&&ge(a,g,S),!_t(R(),i)),k=(g,S,j)=>Hs(g,o,{...s.mount?a:Ae(S)?i:ht(g)?{[g]:S}:S},j,S),P=g=>Ui(q(s.mount?a:i,g,t.shouldUnregister?q(i,g,[]):[])),z=(g,S,j={})=>{const H=q(n,g);let E=S;if(H){const _=H._f;_&&(!_.disabled&&ge(a,g,Js(S,_)),E=Tn(_.ref)&&Ne(S)?"":S,Qs(_.ref)?[..._.ref.options].forEach(B=>B.selected=E.includes(B.value)):_.refs?tn(_.ref)?_.refs.forEach(B=>{(!B.defaultChecked||!B.disabled)&&(Array.isArray(E)?B.checked=!!E.find(ne=>ne===B.value):B.checked=E===B.value||!!E)}):_.refs.forEach(B=>B.checked=B.value===E):Qi(_.ref)?_.ref.value="":(_.ref.value=E,_.ref.type||m.state.next({name:g,values:Re(a)})))}(j.shouldDirty||j.shouldTouch)&&b(g,E,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&ee(g)},L=(g,S,j)=>{for(const H in S){if(!S.hasOwnProperty(H))return;const E=S[H],_=g+"."+H,B=q(n,_);(o.array.has(g)||Fe(E)||B&&!B._f)&&!Qt(E)?L(_,E,j):z(_,E,j)}},U=(g,S,j={})=>{const H=q(n,g),E=o.array.has(g),_=Re(S);ge(a,g,_),E?(m.array.next({name:g,values:Re(a)}),(p.isDirty||p.dirtyFields||f.isDirty||f.dirtyFields)&&j.shouldDirty&&m.state.next({name:g,dirtyFields:Mr(i,a),isDirty:D(g,_)})):H&&!H._f&&!Ne(_)?L(g,_,j):z(g,_,j),ba(g,o)&&m.state.next({...r}),m.state.next({name:s.mount?g:void 0,values:Re(a)})},ue=async g=>{s.mount=!0;const S=g.target;let j=S.name,H=!0;const E=q(n,j),_=le=>{H=Number.isNaN(le)||Qt(le)&&isNaN(le.getTime())||_t(le,q(a,j,le))},B=va(t.mode),ne=va(t.reValidateMode);if(E){let le,De;const tt=S.type?ya(E._f):qs(g),Ye=g.type===On.BLUR||g.type===On.FOCUS_OUT,Rr=!kl(E._f)&&!t.resolver&&!q(r.errors,j)&&!E._f.deps||Cl(Ye,q(r.touchedFields,j),r.isSubmitted,ne,B),Ut=ba(j,o,Ye);ge(a,j,tt),Ye?(E._f.onBlur&&E._f.onBlur(g),l&&l(0)):E._f.onChange&&E._f.onChange(g);const Ot=b(j,tt,Ye),Pr=!Be(Ot)||Ut;if(!Ye&&m.state.next({name:j,type:g.type,values:Re(a)}),Rr)return(p.isValid||f.isValid)&&(t.mode==="onBlur"?Ye&&c():Ye||c()),Pr&&m.state.next({name:j,...Ut?{}:Ot});if(!Ye&&Ut&&m.state.next({...r}),t.resolver){const{errors:cr}=await K([j]);if(_(tt),H){const Ir=wa(r.errors,n,j),ur=wa(cr,n,Ir.name||j);le=ur.error,j=ur.name,De=Be(cr)}}else w([j],!0),le=(await Ea(E,o.disabled,a,x,t.shouldUseNativeValidation))[j],w([j]),_(tt),H&&(le?De=!1:(p.isValid||f.isValid)&&(De=await W(n,!0)));H&&(E._f.deps&&ee(E._f.deps),V(j,De,le,Ot))}},X=(g,S)=>{if(q(r.errors,S)&&g.focus)return g.focus(),1},ee=async(g,S={})=>{let j,H;const E=Ur(g);if(t.resolver){const _=await Y(Ae(g)?g:E);j=Be(_),H=g?!E.some(B=>q(_,B)):j}else g?(H=(await Promise.all(E.map(async _=>{const B=q(n,_);return await W(B&&B._f?{[_]:B}:B)}))).every(Boolean),!(!H&&!r.isValid)&&c()):H=j=await W(n);return m.state.next({...!ht(g)||(p.isValid||f.isValid)&&j!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:j}:{},errors:r.errors}),S.shouldFocus&&!H&&Wr(n,X,g?E:o.mount),H},R=g=>{const S={...s.mount?a:i};return Ae(g)?S:ht(g)?q(S,g):g.map(j=>q(S,j))},C=(g,S)=>({invalid:!!q((S||r).errors,g),isDirty:!!q((S||r).dirtyFields,g),error:q((S||r).errors,g),isValidating:!!q(r.validatingFields,g),isTouched:!!q((S||r).touchedFields,g)}),re=g=>{g&&Ur(g).forEach(S=>$e(r.errors,S)),m.state.next({errors:g?r.errors:{}})},J=(g,S,j)=>{const H=(q(n,g,{_f:{}})._f||{}).ref,E=q(r.errors,g)||{},{ref:_,message:B,type:ne,...le}=E;ge(r.errors,g,{...le,...S,ref:H}),m.state.next({name:g,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&H&&H.focus&&H.focus()},Q=(g,S)=>at(g)?m.state.subscribe({next:j=>g(k(void 0,S),j)}):k(g,S,!0),te=g=>m.state.subscribe({next:S=>{Tl(g.name,S.name,g.exact)&&Ol(S,g.formState||p,kt,g.reRenderRoot)&&g.callback({values:{...a},...r,...S})}}).unsubscribe,ae=g=>(s.mount=!0,f={...f,...g.formState},te({...g,formState:f})),se=(g,S={})=>{for(const j of g?Ur(g):o.mount)o.mount.delete(j),o.array.delete(j),S.keepValue||($e(n,j),$e(a,j)),!S.keepError&&$e(r.errors,j),!S.keepDirty&&$e(r.dirtyFields,j),!S.keepTouched&&$e(r.touchedFields,j),!S.keepIsValidating&&$e(r.validatingFields,j),!t.shouldUnregister&&!S.keepDefaultValue&&$e(i,j);m.state.next({values:Re(a)}),m.state.next({...r,...S.keepDirty?{isDirty:D()}:{}}),!S.keepIsValid&&c()},ce=({disabled:g,name:S})=>{(He(g)&&s.mount||g||o.disabled.has(S))&&(g?o.disabled.add(S):o.disabled.delete(S))},pe=(g,S={})=>{let j=q(n,g);const H=He(S.disabled)||He(t.disabled);return ge(n,g,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:g}},name:g,mount:!0,...S}}),o.mount.add(g),j?ce({disabled:He(S.disabled)?S.disabled:t.disabled,name:g}):F(g,!0,S.value),{...H?{disabled:S.disabled||t.disabled}:{},...t.progressive?{required:!!S.required,min:zr(S.min),max:zr(S.max),minLength:zr(S.minLength),maxLength:zr(S.maxLength),pattern:zr(S.pattern)}:{},name:g,onChange:ue,onBlur:ue,ref:E=>{if(E){pe(g,S),j=q(n,g);const _=Ae(E.value)&&E.querySelectorAll&&E.querySelectorAll("input,select,textarea")[0]||E,B=xl(_),ne=j._f.refs||[];if(B?ne.find(le=>le===_):_===j._f.ref)return;ge(n,g,{_f:{...j._f,...B?{refs:[...ne.filter(ei),_,...Array.isArray(q(i,g))?[{}]:[]],ref:{type:_.type,name:g}}:{ref:_}}}),F(g,!1,void 0,_)}else j=q(n,g,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||S.shouldUnregister)&&!(Bs(o.array,g)&&s.action)&&o.unMount.add(g)}}},oe=()=>t.shouldFocusError&&Wr(n,X,o.mount),_e=g=>{He(g)&&(m.state.next({disabled:g}),Wr(n,(S,j)=>{const H=q(n,j);H&&(S.disabled=H._f.disabled||g,Array.isArray(H._f.refs)&&H._f.refs.forEach(E=>{E.disabled=H._f.disabled||g}))},0,!1))},N=(g,S)=>async j=>{let H;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let E=Re(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:_,values:B}=await K();r.errors=_,E=B}else await W(n);if(o.disabled.size)for(const _ of o.disabled)ge(E,_,void 0);if($e(r.errors,"root"),Be(r.errors)){m.state.next({errors:{}});try{await g(E,j)}catch(_){H=_}}else S&&await S({...r.errors},j),oe(),setTimeout(oe);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Be(r.errors)&&!H,submitCount:r.submitCount+1,errors:r.errors}),H)throw H},Me=(g,S={})=>{q(n,g)&&(Ae(S.defaultValue)?U(g,Re(q(i,g))):(U(g,S.defaultValue),ge(i,g,Re(S.defaultValue))),S.keepTouched||$e(r.touchedFields,g),S.keepDirty||($e(r.dirtyFields,g),r.isDirty=S.defaultValue?D(g,Re(q(i,g))):D()),S.keepError||($e(r.errors,g),p.isValid&&c()),m.state.next({...r}))},ot=(g,S={})=>{const j=g?Re(g):i,H=Re(j),E=Be(g),_=E?i:H;if(S.keepDefaultValues||(i=j),!S.keepValues){if(S.keepDirtyValues){const B=new Set([...o.mount,...Object.keys(Mr(i,a))]);for(const ne of Array.from(B))q(r.dirtyFields,ne)?ge(_,ne,q(a,ne)):U(ne,q(_,ne))}else{if(Bi&&Ae(g))for(const B of o.mount){const ne=q(n,B);if(ne&&ne._f){const le=Array.isArray(ne._f.refs)?ne._f.refs[0]:ne._f.ref;if(Tn(le)){const De=le.closest("form");if(De){De.reset();break}}}}for(const B of o.mount)U(B,q(_,B))}a=Re(_),m.array.next({values:{..._}}),m.state.next({values:{..._}})}o={mount:S.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!p.isValid||!!S.keepIsValid||!!S.keepDirtyValues,s.watch=!!t.shouldUnregister,m.state.next({submitCount:S.keepSubmitCount?r.submitCount:0,isDirty:E?!1:S.keepDirty?r.isDirty:!!(S.keepDefaultValues&&!_t(g,i)),isSubmitted:S.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:E?{}:S.keepDirtyValues?S.keepDefaultValues&&a?Mr(i,a):r.dirtyFields:S.keepDefaultValues&&g?Mr(i,g):S.keepDirty?r.dirtyFields:{},touchedFields:S.keepTouched?r.touchedFields:{},errors:S.keepErrors?r.errors:{},isSubmitSuccessful:S.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Et=(g,S)=>ot(at(g)?g(a):g,S),ln=(g,S={})=>{const j=q(n,g),H=j&&j._f;if(H){const E=H.refs?H.refs[0]:H.ref;E.focus&&(E.focus(),S.shouldSelect&&at(E.select)&&E.select())}},kt=g=>{r={...r,...g}},Bt={control:{register:pe,unregister:se,getFieldState:C,handleSubmit:N,setError:J,_subscribe:te,_runSchema:K,_focusError:oe,_getWatch:k,_getDirty:D,_setValid:c,_setFieldArray:y,_setDisabledField:ce,_setErrors:$,_getFieldArray:P,_reset:ot,_resetDefaultValues:()=>at(t.defaultValues)&&t.defaultValues().then(g=>{Et(g,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:_e,_subjects:m,_proxyFormState:p,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(g){s=g},get _defaultValues(){return i},get _names(){return o},set _names(g){o=g},get _formState(){return r},get _options(){return t},set _options(g){t={...t,...g}}},subscribe:ae,trigger:ee,register:pe,handleSubmit:N,watch:Q,setValue:U,getValues:R,reset:Et,resetField:Me,clearErrors:re,unregister:se,setError:J,setFocus:ln,getFieldState:C};return{...Bt,formControl:Bt}}function $l(e={}){const t=M.useRef(void 0),r=M.useRef(void 0),[n,i]=M.useState({isDirty:!1,isValidating:!1,isLoading:at(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:at(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!at(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=jl(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Ki(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),M.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),M.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),M.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),M.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),M.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),M.useEffect(()=>{e.values&&!_t(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),M.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=Ws(n,a),t.current}const ka=(e,t,r)=>{if(e&&"reportValidity"in e){const n=q(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},eo=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ka(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>ka(i,r,e))}},Dl=(e,t)=>{t.shouldUseNativeValidation&&eo(e,t);const r={};for(const n in e){const i=q(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Rl(t.names||Object.keys(e),n)){const s=Object.assign({},q(r,n));ge(s,"root",a),ge(r,n,s)}else ge(r,n,a)}return r},Rl=(e,t)=>{const r=Oa(t);return e.some(n=>Oa(n).match(`^${r}\\.\\d+`))};function Oa(e){return e.replace(/\]|\[/g,"")}function Pl(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){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(d){return a.shouldUseNativeValidation&&eo({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:Dl((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,p){if(d[p.path]||(d[p.path]={message:p.message,type:p.type}),l){var f=d[p.path].types,m=f&&f[p.type];d[p.path]=Ks(p.path,l,d,p.type,m?[].concat(m,p.message):p.message)}return d},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var rn=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(){}},ar=typeof window>"u"||"Deno"in globalThis;function Ue(){}function Il(e,t){return typeof e=="function"?e(t):e}function vi(e){return typeof e=="number"&&e>=0&&e!==1/0}function to(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zt(e,t){return typeof e=="function"?e(t):e}function Je(e,t){return typeof e=="function"?e(t):e}function Ta(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Yi(s,t.options))return!1}else if(!Qr(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ca(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Kr(t.options.mutationKey)!==Kr(a))return!1}else if(!Qr(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Yi(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kr)(e)}function Kr(e){return JSON.stringify(e,(t,r)=>wi(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Qr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Qr(e[r],t[r])):!1}function xi(e,t){if(e===t)return e;const r=_a(e)&&_a(t);if(r||wi(e)&&wi(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let d=0;for(let p=0;p<s;p++){const f=r?p:a[p];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,d++):(o[f]=xi(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function bi(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 _a(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wi(e){if(!Aa(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Aa(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Aa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ml(e){return new Promise(t=>{setTimeout(t,e)})}function Si(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 xi(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 xi(e,t)}return t}function zl(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Vl(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var An=Symbol();function ro(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===An&&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===An?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Nl(e,t){return typeof e=="function"?e(...t):!!e}var Gt,At,br,$s,Ll=($s=class extends rn{constructor(){super();ie(this,Gt);ie(this,At);ie(this,br);G(this,br,t=>{if(!ar&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){v(this,At)||this.setEventListener(v(this,br))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,At))==null||t.call(this),G(this,At,void 0))}setEventListener(t){var r;G(this,br,t),(r=v(this,At))==null||r.call(this),G(this,At,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){v(this,Gt)!==t&&(G(this,Gt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof v(this,Gt)=="boolean"?v(this,Gt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gt=new WeakMap,At=new WeakMap,br=new WeakMap,$s),Zi=new Ll,wr,Ft,Sr,Ds,ql=(Ds=class extends rn{constructor(){super();ie(this,wr,!0);ie(this,Ft);ie(this,Sr);G(this,Sr,t=>{if(!ar&&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(){v(this,Ft)||this.setEventListener(v(this,Sr))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,Ft))==null||t.call(this),G(this,Ft,void 0))}setEventListener(t){var r;G(this,Sr,t),(r=v(this,Ft))==null||r.call(this),G(this,Ft,t(this.setOnline.bind(this)))}setOnline(t){v(this,wr)!==t&&(G(this,wr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return v(this,wr)}},wr=new WeakMap,Ft=new WeakMap,Sr=new WeakMap,Ds),Fn=new ql;function Ei(){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 Bl(e){return Math.min(1e3*2**e,3e4)}function no(e){return(e??"online")==="online"?Fn.isOnline():!0}var io=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ti(e){return e instanceof io}function ao(e){let t=!1,r=0,n=!1,i;const a=Ei(),s=c=>{var w;n||(m(new io(c)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},l=()=>{t=!1},d=()=>Zi.isFocused()&&(e.networkMode==="always"||Fn.isOnline())&&e.canRun(),p=()=>no(e.networkMode)&&e.canRun(),f=c=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,c),i==null||i(),a.resolve(c))},m=c=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,c),i==null||i(),a.reject(c))},x=()=>new Promise(c=>{var w;i=y=>{(n||d())&&c(y)},(w=e.onPause)==null||w.call(e)}).then(()=>{var c;i=void 0,n||(c=e.onContinue)==null||c.call(e)}),h=()=>{if(n)return;let c;const w=r===0?e.initialPromise:void 0;try{c=w??e.fn()}catch(y){c=Promise.reject(y)}Promise.resolve(c).then(f).catch(y=>{var V;if(n)return;const O=e.retry??(ar?0:3),$=e.retryDelay??Bl,F=typeof $=="function"?$(r,y):$,b=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,y);if(t||!b){m(y);return}r++,(V=e.onFail)==null||V.call(e,r,y),Ml(F).then(()=>d()?void 0:x()).then(()=>{t?m(y):h()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:p,start:()=>(p()?h():x().then(h),a)}}var Ul=e=>setTimeout(e,0);function Wl(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=Ul;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Pe=Wl(),Yt,Rs,so=(Rs=class{constructor(){ie(this,Yt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vi(this.gcTime)&&G(this,Yt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ar?1/0:5*60*1e3))}clearGcTimeout(){v(this,Yt)&&(clearTimeout(v(this,Yt)),G(this,Yt,void 0))}},Yt=new WeakMap,Rs),Er,Zt,Ze,Jt,Ie,Zr,Xt,rt,xt,Ps,Hl=(Ps=class extends so{constructor(t){super();ie(this,rt);ie(this,Er);ie(this,Zt);ie(this,Ze);ie(this,Jt);ie(this,Ie);ie(this,Zr);ie(this,Xt);G(this,Xt,!1),G(this,Zr,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,Jt,t.client),G(this,Ze,v(this,Jt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,Er,Kl(this.options)),this.state=t.state??v(this,Er),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=v(this,Ie))==null?void 0:t.promise}setOptions(t){this.options={...v(this,Zr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&v(this,Ze).remove(this)}setData(t,r){const n=Si(this.state.data,t,this.options);return de(this,rt,xt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){de(this,rt,xt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=v(this,Ie))==null?void 0:n.promise;return(i=v(this,Ie))==null||i.cancel(t),r?r.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(v(this,Er))}isActive(){return this.observers.some(t=>Je(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===An||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zt(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:!to(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=v(this,Ie))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=v(this,Ie))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),v(this,Ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(v(this,Ie)&&(v(this,Xt)?v(this,Ie).cancel({revert:!0}):v(this,Ie).cancelRetry()),this.scheduleGc()),v(this,Ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,rt,xt).call(this,{type:"invalidate"})}fetch(t,r){var d,p,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(v(this,Ie))return v(this,Ie).continueRetry(),v(this,Ie).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(x=>x.options.queryFn);m&&this.setOptions(m.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=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(G(this,Xt,!0),n.signal)})},a=()=>{const m=ro(this.options,r),h=(()=>{const c={client:v(this,Jt),queryKey:this.queryKey,meta:this.meta};return i(c),c})();return G(this,Xt,!1),this.options.persister?this.options.persister(m,h,this):m(h)},o=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:v(this,Jt),state:this.state,fetchFn:a};return i(m),m})();(d=this.options.behavior)==null||d.onFetch(o,this),G(this,Zt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=o.fetchOptions)==null?void 0:p.meta))&&de(this,rt,xt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=m=>{var x,h,c,w;ti(m)&&m.silent||de(this,rt,xt).call(this,{type:"error",error:m}),ti(m)||((h=(x=v(this,Ze).config).onError)==null||h.call(x,m,this),(w=(c=v(this,Ze).config).onSettled)==null||w.call(c,this.state.data,m,this)),this.scheduleGc()};return G(this,Ie,ao({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var x,h,c,w;if(m===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(m)}catch(y){l(y);return}(h=(x=v(this,Ze).config).onSuccess)==null||h.call(x,m,this),(w=(c=v(this,Ze).config).onSettled)==null||w.call(c,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,x)=>{de(this,rt,xt).call(this,{type:"failed",failureCount:m,error:x})},onPause:()=>{de(this,rt,xt).call(this,{type:"pause"})},onContinue:()=>{de(this,rt,xt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),v(this,Ie).start()}},Er=new WeakMap,Zt=new WeakMap,Ze=new WeakMap,Jt=new WeakMap,Ie=new WeakMap,Zr=new WeakMap,Xt=new WeakMap,rt=new WeakSet,xt=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,...oo(n.data,this.options),fetchMeta:t.meta??null};case"success":return G(this,Zt,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 ti(i)&&i.revert&&v(this,Zt)?{...v(this,Zt),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),Pe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),v(this,Ze).notify({query:this,type:"updated",action:t})})},Ps);function oo(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:no(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kl(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 dt,Is,Ql=(Is=class extends rn{constructor(t={}){super();ie(this,dt);this.config=t,G(this,dt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Yi(i,r);let s=this.get(a);return s||(s=new Hl({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){v(this,dt).has(t.queryHash)||(v(this,dt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=v(this,dt).get(t.queryHash);r&&(t.destroy(),r===t&&v(this,dt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return v(this,dt).get(t)}getAll(){return[...v(this,dt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ta(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Ta(t,n)):r}notify(t){Pe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Pe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dt=new WeakMap,Is),ft,ze,er,mt,Tt,Ms,Gl=(Ms=class extends so{constructor(t){super();ie(this,mt);ie(this,ft);ie(this,ze);ie(this,er);this.mutationId=t.mutationId,G(this,ze,t.mutationCache),G(this,ft,[]),this.state=t.state||Yl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){v(this,ft).includes(t)||(v(this,ft).push(t),this.clearGcTimeout(),v(this,ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,ft,v(this,ft).filter(r=>r!==t)),this.scheduleGc(),v(this,ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){v(this,ft).length||(this.state.status==="pending"?this.scheduleGc():v(this,ze).remove(this))}continue(){var t;return((t=v(this,er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,d,p,f,m,x,h,c,w,y,O,$,F,b,V,K,Y;const r=()=>{de(this,mt,Tt).call(this,{type:"continue"})};G(this,er,ao({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(W,u)=>{de(this,mt,Tt).call(this,{type:"failed",failureCount:W,error:u})},onPause:()=>{de(this,mt,Tt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>v(this,ze).canRun(this)}));const n=this.state.status==="pending",i=!v(this,er).canStart();try{if(n)r();else{de(this,mt,Tt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=v(this,ze).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));u!==this.state.context&&de(this,mt,Tt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const W=await v(this,er).start();return await((p=(d=v(this,ze).config).onSuccess)==null?void 0:p.call(d,W,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,W,t,this.state.context)),await((h=(x=v(this,ze).config).onSettled)==null?void 0:h.call(x,W,null,this.state.variables,this.state.context,this)),await((w=(c=this.options).onSettled)==null?void 0:w.call(c,W,null,t,this.state.context)),de(this,mt,Tt).call(this,{type:"success",data:W}),W}catch(W){try{throw await((O=(y=v(this,ze).config).onError)==null?void 0:O.call(y,W,t,this.state.context,this)),await((F=($=this.options).onError)==null?void 0:F.call($,W,t,this.state.context)),await((V=(b=v(this,ze).config).onSettled)==null?void 0:V.call(b,void 0,W,this.state.variables,this.state.context,this)),await((Y=(K=this.options).onSettled)==null?void 0:Y.call(K,void 0,W,t,this.state.context)),W}finally{de(this,mt,Tt).call(this,{type:"error",error:W})}}finally{v(this,ze).runNext(this)}}},ft=new WeakMap,ze=new WeakMap,er=new WeakMap,mt=new WeakSet,Tt=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),Pe.batch(()=>{v(this,ft).forEach(n=>{n.onMutationUpdate(t)}),v(this,ze).notify({mutation:this,type:"updated",action:t})})},Ms);function Yl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bt,nt,Jr,zs,Zl=(zs=class extends rn{constructor(t={}){super();ie(this,bt);ie(this,nt);ie(this,Jr);this.config=t,G(this,bt,new Set),G(this,nt,new Map),G(this,Jr,0)}build(t,r,n){const i=new Gl({mutationCache:this,mutationId:++un(this,Jr)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){v(this,bt).add(t);const r=pn(t);if(typeof r=="string"){const n=v(this,nt).get(r);n?n.push(t):v(this,nt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(v(this,bt).delete(t)){const r=pn(t);if(typeof r=="string"){const n=v(this,nt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&v(this,nt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=pn(t);if(typeof r=="string"){const n=v(this,nt).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=pn(t);if(typeof r=="string"){const i=(n=v(this,nt).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(){Pe.batch(()=>{v(this,bt).forEach(t=>{this.notify({type:"removed",mutation:t})}),v(this,bt).clear(),v(this,nt).clear()})}getAll(){return Array.from(v(this,bt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ca(r,n))}findAll(t={}){return this.getAll().filter(r=>Ca(t,r))}notify(t){Pe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Pe.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ue))))}},bt=new WeakMap,nt=new WeakMap,Jr=new WeakMap,zs);function pn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Fa(e){return{onFetch:(t,r)=>{var p,f,m,x,h;const n=t.options,i=(m=(f=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],s=((h=t.state.data)==null?void 0:h.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let c=!1;const w=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},y=ro(t.options,t.fetchOptions),O=async($,F,b)=>{if(c)return Promise.reject();if(F==null&&$.pages.length)return Promise.resolve($);const K=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:F,direction:b?"backward":"forward",meta:t.options.meta};return w(D),D})(),Y=await y(K),{maxPages:W}=t.options,u=b?Vl:zl;return{pages:u($.pages,Y,W),pageParams:u($.pageParams,F,W)}};if(i&&a.length){const $=i==="backward",F=$?Jl:ja,b={pages:a,pageParams:s},V=F(n,b);o=await O(b,V,$)}else{const $=e??a.length;do{const F=l===0?s[0]??n.initialPageParam:ja(n,o);if(l>0&&F==null)break;o=await O(o,F),l++}while(l<$)}return o};t.options.persister?t.fetchFn=()=>{var c,w;return(w=(c=t.options).persister)==null?void 0:w.call(c,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function ja(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 Jl(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 Te,jt,$t,kr,Or,Dt,Tr,Cr,Vs,Xl=(Vs=class{constructor(e={}){ie(this,Te);ie(this,jt);ie(this,$t);ie(this,kr);ie(this,Or);ie(this,Dt);ie(this,Tr);ie(this,Cr);G(this,Te,e.queryCache||new Ql),G(this,jt,e.mutationCache||new Zl),G(this,$t,e.defaultOptions||{}),G(this,kr,new Map),G(this,Or,new Map),G(this,Dt,0)}mount(){un(this,Dt)._++,v(this,Dt)===1&&(G(this,Tr,Zi.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,Te).onFocus())})),G(this,Cr,Fn.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,Te).onOnline())})))}unmount(){var e,t;un(this,Dt)._--,v(this,Dt)===0&&((e=v(this,Tr))==null||e.call(this),G(this,Tr,void 0),(t=v(this,Cr))==null||t.call(this),G(this,Cr,void 0))}isFetching(e){return v(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return v(this,jt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=v(this,Te).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=v(this,Te).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return v(this,Te).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=v(this,Te).get(n.queryHash),a=i==null?void 0:i.state.data,s=Il(t,a);if(s!==void 0)return v(this,Te).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Pe.batch(()=>v(this,Te).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=v(this,Te).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=v(this,Te);Pe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=v(this,Te);return Pe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Pe.batch(()=>v(this,Te).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return Pe.batch(()=>(v(this,Te).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=Pe.batch(()=>v(this,Te).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ue)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=v(this,Te).build(this,t);return r.isStaleByTime(zt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=Fa(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=Fa(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fn.isOnline()?v(this,jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return v(this,Te)}getMutationCache(){return v(this,jt)}getDefaultOptions(){return v(this,$t)}setDefaultOptions(e){G(this,$t,e)}setQueryDefaults(e,t){v(this,kr).set(Kr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...v(this,kr).values()],r={};return t.forEach(n=>{Qr(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){v(this,Or).set(Kr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...v(this,Or).values()],r={};return t.forEach(n=>{Qr(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...v(this,$t).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Yi(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===An&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...v(this,$t).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){v(this,Te).clear(),v(this,jt).clear()}},Te=new WeakMap,jt=new WeakMap,$t=new WeakMap,kr=new WeakMap,Or=new WeakMap,Dt=new WeakMap,Tr=new WeakMap,Cr=new WeakMap,Vs),qe,fe,Xr,Ve,tr,_r,Rt,Pt,en,Ar,Fr,rr,nr,It,jr,ye,Nr,ki,Oi,Ti,Ci,_i,Ai,Fi,lo,Ns,ec=(Ns=class extends rn{constructor(t,r){super();ie(this,ye);ie(this,qe);ie(this,fe);ie(this,Xr);ie(this,Ve);ie(this,tr);ie(this,_r);ie(this,Rt);ie(this,Pt);ie(this,en);ie(this,Ar);ie(this,Fr);ie(this,rr);ie(this,nr);ie(this,It);ie(this,jr,new Set);this.options=r,G(this,qe,t),G(this,Pt,null),G(this,Rt,Ei()),this.options.experimental_prefetchInRender||v(this,Rt).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&&(v(this,fe).addObserver(this),$a(v(this,fe),this.options)?de(this,ye,Nr).call(this):this.updateResult(),de(this,ye,Ci).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ji(v(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ji(v(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,ye,_i).call(this),de(this,ye,Ai).call(this),v(this,fe).removeObserver(this)}setOptions(t){const r=this.options,n=v(this,fe);if(this.options=v(this,qe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Je(this.options.enabled,v(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,ye,Fi).call(this),v(this,fe).setOptions(this.options),r._defaulted&&!bi(this.options,r)&&v(this,qe).getQueryCache().notify({type:"observerOptionsUpdated",query:v(this,fe),observer:this});const i=this.hasListeners();i&&Da(v(this,fe),n,this.options,r)&&de(this,ye,Nr).call(this),this.updateResult(),i&&(v(this,fe)!==n||Je(this.options.enabled,v(this,fe))!==Je(r.enabled,v(this,fe))||zt(this.options.staleTime,v(this,fe))!==zt(r.staleTime,v(this,fe)))&&de(this,ye,ki).call(this);const a=de(this,ye,Oi).call(this);i&&(v(this,fe)!==n||Je(this.options.enabled,v(this,fe))!==Je(r.enabled,v(this,fe))||a!==v(this,It))&&de(this,ye,Ti).call(this,a)}getOptimisticResult(t){const r=v(this,qe).getQueryCache().build(v(this,qe),t),n=this.createResult(r,t);return rc(this,n)&&(G(this,Ve,n),G(this,_r,this.options),G(this,tr,v(this,fe).state)),n}getCurrentResult(){return v(this,Ve)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){v(this,jr).add(t)}getCurrentQuery(){return v(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=v(this,qe).defaultQueryOptions(t),n=v(this,qe).getQueryCache().build(v(this,qe),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return de(this,ye,Nr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),v(this,Ve)))}createResult(t,r){var W;const n=v(this,fe),i=this.options,a=v(this,Ve),s=v(this,tr),o=v(this,_r),d=t!==n?t.state:v(this,Xr),{state:p}=t;let f={...p},m=!1,x;if(r._optimisticResults){const u=this.hasListeners(),D=!u&&$a(t,r),k=u&&Da(t,n,r,i);(D||k)&&(f={...f,...oo(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:c,status:w}=f;x=f.data;let y=!1;if(r.placeholderData!==void 0&&x===void 0&&w==="pending"){let u;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(u=a.data,y=!0):u=typeof r.placeholderData=="function"?r.placeholderData((W=v(this,Fr))==null?void 0:W.state.data,v(this,Fr)):r.placeholderData,u!==void 0&&(w="success",x=Si(a==null?void 0:a.data,u,r),m=!0)}if(r.select&&x!==void 0&&!y)if(a&&x===(s==null?void 0:s.data)&&r.select===v(this,en))x=v(this,Ar);else try{G(this,en,r.select),x=r.select(x),x=Si(a==null?void 0:a.data,x,r),G(this,Ar,x),G(this,Pt,null)}catch(u){G(this,Pt,u)}v(this,Pt)&&(h=v(this,Pt),x=v(this,Ar),c=Date.now(),w="error");const O=f.fetchStatus==="fetching",$=w==="pending",F=w==="error",b=$&&O,V=x!==void 0,Y={status:w,fetchStatus:f.fetchStatus,isPending:$,isSuccess:w==="success",isError:F,isInitialLoading:b,isLoading:b,data:x,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:c,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:O,isRefetching:O&&!$,isLoadingError:F&&!V,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:F&&V,isStale:Ji(t,r),refetch:this.refetch,promise:v(this,Rt),isEnabled:Je(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=P=>{Y.status==="error"?P.reject(Y.error):Y.data!==void 0&&P.resolve(Y.data)},D=()=>{const P=G(this,Rt,Y.promise=Ei());u(P)},k=v(this,Rt);switch(k.status){case"pending":t.queryHash===n.queryHash&&u(k);break;case"fulfilled":(Y.status==="error"||Y.data!==k.value)&&D();break;case"rejected":(Y.status!=="error"||Y.error!==k.reason)&&D();break}}return Y}updateResult(){const t=v(this,Ve),r=this.createResult(v(this,fe),this.options);if(G(this,tr,v(this,fe).state),G(this,_r,this.options),v(this,tr).data!==void 0&&G(this,Fr,v(this,fe)),bi(r,t))return;G(this,Ve,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!v(this,jr).size)return!0;const s=new Set(a??v(this,jr));return this.options.throwOnError&&s.add("error"),Object.keys(v(this,Ve)).some(o=>{const l=o;return v(this,Ve)[l]!==t[l]&&s.has(l)})};de(this,ye,lo).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,ye,Ci).call(this)}},qe=new WeakMap,fe=new WeakMap,Xr=new WeakMap,Ve=new WeakMap,tr=new WeakMap,_r=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,en=new WeakMap,Ar=new WeakMap,Fr=new WeakMap,rr=new WeakMap,nr=new WeakMap,It=new WeakMap,jr=new WeakMap,ye=new WeakSet,Nr=function(t){de(this,ye,Fi).call(this);let r=v(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ue)),r},ki=function(){de(this,ye,_i).call(this);const t=zt(this.options.staleTime,v(this,fe));if(ar||v(this,Ve).isStale||!vi(t))return;const n=to(v(this,Ve).dataUpdatedAt,t)+1;G(this,rr,setTimeout(()=>{v(this,Ve).isStale||this.updateResult()},n))},Oi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(v(this,fe)):this.options.refetchInterval)??!1},Ti=function(t){de(this,ye,Ai).call(this),G(this,It,t),!(ar||Je(this.options.enabled,v(this,fe))===!1||!vi(v(this,It))||v(this,It)===0)&&G(this,nr,setInterval(()=>{(this.options.refetchIntervalInBackground||Zi.isFocused())&&de(this,ye,Nr).call(this)},v(this,It)))},Ci=function(){de(this,ye,ki).call(this),de(this,ye,Ti).call(this,de(this,ye,Oi).call(this))},_i=function(){v(this,rr)&&(clearTimeout(v(this,rr)),G(this,rr,void 0))},Ai=function(){v(this,nr)&&(clearInterval(v(this,nr)),G(this,nr,void 0))},Fi=function(){const t=v(this,qe).getQueryCache().build(v(this,qe),this.options);if(t===v(this,fe))return;const r=v(this,fe);G(this,fe,t),G(this,Xr,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lo=function(t){Pe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(v(this,Ve))}),v(this,qe).getQueryCache().notify({query:v(this,fe),type:"observerResultsUpdated"})})},Ns);function tc(e,t){return Je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $a(e,t){return tc(e,t)||e.state.data!==void 0&&ji(e,t,t.refetchOnMount)}function ji(e,t,r){if(Je(t.enabled,e)!==!1&&zt(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ji(e,t)}return!1}function Da(e,t,r,n){return(e!==t||Je(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ji(e,r)}function Ji(e,t){return Je(t.enabled,e)!==!1&&e.isStaleByTime(zt(t.staleTime,e))}function rc(e,t){return!bi(e.getCurrentResult(),t)}var co=Ce.createContext(void 0),nc=e=>{const t=Ce.useContext(co);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ic=({client:e,children:t})=>(Ce.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(co.Provider,{value:e,children:t})),uo=Ce.createContext(!1),ac=()=>Ce.useContext(uo);uo.Provider;function sc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oc=Ce.createContext(sc()),lc=()=>Ce.useContext(oc),cc=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},uc=e=>{Ce.useEffect(()=>{e.clearReset()},[e])},pc=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Nl(r,[e.error,n])),dc=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))}},fc=(e,t)=>e.isLoading&&e.isFetching&&!t,mc=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ra=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function hc(e,t,r){var f,m,x,h,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=ac(),i=lc(),a=nc(),s=a.defaultQueryOptions(e);(m=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.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`)),s._optimisticResults=n?"isRestoring":"optimistic",dc(s),cc(s,i),uc(i);const o=!a.getQueryCache().get(s.queryHash),[l]=Ce.useState(()=>new t(a,s)),d=l.getOptimisticResult(s),p=!n&&e.subscribed!==!1;if(Ce.useSyncExternalStore(Ce.useCallback(w=>{const y=p?l.subscribe(Pe.batchCalls(w)):Ue;return l.updateResult(),y},[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Ce.useEffect(()=>{l.setOptions(s)},[s,l]),mc(s,d))throw Ra(s,l,i);if(pc({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((h=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||h.call(x,s,d),s.experimental_prefetchInRender&&!ar&&fc(d,n)){const w=o?Ra(s,l,i):(c=a.getQueryCache().get(s.queryHash))==null?void 0:c.promise;w==null||w.catch(Ue).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?d:l.trackResult(d)}function gc(e,t){return hc(e,ec)}const po=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>T.jsx(I.Box,{sx:{textAlign:"center"},children:T.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});async function fo(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:d={},body:p,transform:f,dependsOn:m}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),m&&n){const F=n[m];F&&(x=x.replace(`{${m}}`,encodeURIComponent(F)))}const h=new URLSearchParams;Object.entries(d).forEach(([F,b])=>{b!=null&&h.append(F,String(b))}),h.toString()&&(x+=`${x.includes("?")?"&":"?"}${h.toString()}`);const c={"Content-Type":"application/json",...r,...l},w={method:a,headers:c};(a==="POST"||a==="PUT")&&p&&(w.body=JSON.stringify(p));const y=await fetch(x,w);if(!y.ok)throw new Error(`API request failed: ${y.status} ${y.statusText}`);const O=await y.json();if(f)return f(Array.isArray(O)?O:O.data||O);const $=Array.isArray(O)?O:O.data||O;if(!Array.isArray($))throw new Error("API response is not an array");return $.map(F=>({label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""}))}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function mo(e,t,r,n,i=!1){const a=M.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=M.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],[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]);return gc({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return fo(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function Ht(e){return!!(e.apiConfig||e.api_endpoint)}function Xi(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 yc(e,t){const r=Xi(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 ho=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a})=>{const s=r[e.name],o=!!s,[l,d]=M.useState(!1),p=M.useRef(!1),f=()=>{var k;return e.required!==void 0?e.required:((k=e.validation)==null?void 0:k.required)!==void 0?e.validation.required:!1},m=k=>f()?`${k} *`:k,x=()=>e.value!==void 0?e.value:e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:"",h=M.useMemo(()=>Xi(e),[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional]),c=M.useRef(null),w=h!=null&&h.dependsOn?a==null?void 0:a[h.dependsOn]:null,y=M.useMemo(()=>{if(!(h!=null&&h.dependsOn))return!1;const k=w,P=c.current,z=k!==P;return z&&(c.current=k),z},[h==null?void 0:h.dependsOn,w]),O=M.useMemo(()=>!0,[]),$=M.useMemo(()=>l&&Ht(e)&&(!(h!=null&&h.dependsOn)||w),[l,e,h==null?void 0:h.dependsOn,w]),F=M.useMemo(()=>{if(!(h!=null&&h.dependsOn)||!a)return{};const k={};return h.dependsOn&&a[h.dependsOn]!==void 0&&(k[h.dependsOn]=a[h.dependsOn]),k},[h==null?void 0:h.dependsOn,a]),{data:b=[],isLoading:V,error:K}=mo(h,n,i,F,$),Y=M.useCallback(()=>{Ht(e)&&!p.current&&(p.current=!0,d(!0))},[e]),W=M.useCallback(()=>{Ht(e)&&!p.current&&(p.current=!0,d(!0))},[e]);M.useEffect(()=>{if(Ht(e)&&!p.current){const k=a==null?void 0:a[e.name];k!=null&&k!==""&&(p.current=!0,d(!0))}},[e,a]),M.useEffect(()=>{Ht(e)&&(h!=null&&h.dependsOn)&&y&&p.current&&(p.current=!1,d(!1))},[y,h==null?void 0:h.dependsOn]);const u=M.useCallback(()=>Ht(e)?b:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,b]);if(!O)return null;const D=()=>{switch(e.type){case"title":return T.jsx(I.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 T.jsx(I.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"text":case"email":case"password":case"tel":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsx(I.TextField,{...L,id:e.id,fullWidth:!0,label:m(e.label),type:e.type,placeholder:e.placeholder,disabled:e.disabled,error:o,helperText:s==null?void 0:s.message})});case"number":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsx(I.TextField,{...L,id:e.id,fullWidth:!0,label:m(e.label),type:"number",placeholder:e.placeholder,disabled:e.disabled,error:o,helperText:s==null?void 0:s.message,inputProps:{min:e.min,max:e.max}})});case"select":const k=u();return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsxs(I.FormControl,{fullWidth:!0,error:o||!!K,children:[T.jsx(I.InputLabel,{id:e.id,children:m(e.label)}),T.jsx(I.Select,{...L,labelId:e.id,label:m(e.label),disabled:e.disabled||V,endAdornment:V?T.jsx(I.CircularProgress,{size:20}):void 0,onOpen:Y,children:V?T.jsx(I.MenuItem,{disabled:!0,children:T.jsxs(I.Box,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[T.jsx(I.CircularProgress,{size:16}),T.jsx(I.Typography,{variant:"body2",children:"Fetching data..."})]})}):k.length>0?k.map(U=>T.jsx(I.MenuItem,{value:U.value,children:U.label},U.value)):l&&!V?T.jsx(I.MenuItem,{disabled:!0,children:T.jsx(I.Typography,{variant:"body2",color:"text.secondary",children:"No options available"})}):T.jsx(I.MenuItem,{disabled:!0,children:T.jsx(I.Typography,{variant:"body2",color:"text.secondary",children:"Click to load options"})})}),(o||K)&&T.jsx(I.FormHelperText,{children:(s==null?void 0:s.message)||(K==null?void 0:K.message)})]})});case"checkbox":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsxs(I.Box,{sx:{mt:1,mb:0},children:[T.jsx(I.FormControlLabel,{control:T.jsx(I.Checkbox,{...L,id:e.id,checked:L.value,disabled:e.disabled}),label:m(e.label)}),o&&T.jsx(I.FormHelperText,{error:!0,sx:{ml:0},children:s==null?void 0:s.message})]})});case"toggle":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsxs(I.FormControl,{component:"fieldset",error:o,children:[T.jsx(I.Typography,{variant:"body2",component:"legend",sx:{mb:1},children:m(e.label)}),T.jsx(I.RadioGroup,{...L,row:!0,children:e.options.map(U=>T.jsx(I.FormControlLabel,{value:U.value,control:T.jsx(I.Radio,{}),label:U.label},U.value))}),o&&T.jsx(I.FormHelperText,{error:!0,children:s==null?void 0:s.message})]})});case"radio":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsxs(I.FormControl,{component:"fieldset",error:o,children:[T.jsx(I.Typography,{variant:"body2",component:"legend",sx:{mb:1},children:m(e.label)}),T.jsx(I.RadioGroup,{...L,children:e.options.map(U=>T.jsx(I.FormControlLabel,{value:U.value,control:T.jsx(I.Radio,{}),label:U.label},U.value))}),o&&T.jsx(I.FormHelperText,{error:!0,children:s==null?void 0:s.message})]})});case"switch":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsxs(I.Box,{sx:{mt:1,mb:0},children:[T.jsx(I.FormControlLabel,{control:T.jsx(I.Switch,{...L,id:e.id,checked:L.value,disabled:e.disabled}),label:m(e.label)}),o&&T.jsx(I.FormHelperText,{error:!0,sx:{ml:0},children:s==null?void 0:s.message})]})});case"autocomplete":const P=u(),z=!!(e.disabled||V||h!=null&&h.dependsOn&&!w);return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>{const U=L.value,ue=(()=>{if(!U)return null;const X=(h==null?void 0:h.valueField)||e.value_field||"value",ee=(h==null?void 0:h.labelField)||e.label_field||"label",R=P.find(C=>typeof C=="string"?C===U:C[X]===U||C.value===U||C.id===U);return R||(U?{[X]:U,[ee]:`Selected: ${U}`,value:U,label:`Selected: ${U}`}:null)})();return T.jsx(I.Autocomplete,{...L,id:e.id,options:P,value:ue,getOptionLabel:X=>{if(typeof X=="string")return X;const ee=(h==null?void 0:h.labelField)||e.label_field||"label";return X[ee]||X.label||X.name||""},isOptionEqualToValue:(X,ee)=>{if(!X||!ee)return!1;if(typeof X=="string"&&typeof ee=="string")return X===ee;if(typeof X=="object"&&ee){const R=(h==null?void 0:h.valueField)||e.value_field||"value";return typeof ee=="object"?X[R]===ee[R]||X.value===ee.value||X.id===ee.id:X[R]===ee||X.value===ee||X.id===ee}return!1},multiple:e.multiple,freeSolo:e.freeSolo,filterOptions:e.filterOptions===!1?()=>P:void 0,disabled:z,loading:V,onOpen:W,renderInput:X=>T.jsx(I.TextField,{...X,label:m(e.label),placeholder:z&&(h!=null&&h.dependsOn)&&!w?`Please select ${h.dependsOn.replace(/_/g," ")} first`:e.placeholder,error:o||!!K,helperText:(s==null?void 0:s.message)||(K==null?void 0:K.message)||"",InputProps:{...X.InputProps,endAdornment:T.jsxs(T.Fragment,{children:[V?T.jsx(I.CircularProgress,{color:"inherit",size:20}):null,X.InputProps.endAdornment]})}}),onChange:(X,ee)=>{let R;if(ee&&typeof ee=="object"){const C=(h==null?void 0:h.valueField)||e.value_field||"value";R=ee[C]||ee.value||ee.id||ee}else R=ee;L.onChange(R)},noOptionsText:z&&(h!=null&&h.dependsOn)&&!w?`Please select ${h.dependsOn.replace(/_/g," ")} first`:V?"Fetching data...":l&&!V&&P.length===0?"No options available":"Click to load options"})}});case"date":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsx(I.TextField,{...L,id:e.name,fullWidth:!0,label:m(e.label),type:"date",disabled:e.disabled,error:o,helperText:s==null?void 0:s.message,InputLabelProps:{shrink:!0},inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return T.jsx(lt,{name:e.name,control:t,defaultValue:x(),render:({field:L})=>T.jsx(po,{src:L.value||e.defaultValue||e.src,alt:e.alt||e.label,width:e.width,height:e.height,style:e.style,className:e.className,onClick:e.onClick})});default:return null}};return T.jsx(I.Box,{children:D()})};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ri,Pa;function vc(){if(Pa)return ri;Pa=1;function e(y){this._maxSize=y,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(y){return this._values[y]},e.prototype.set=function(y,O){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=O};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),d=new e(s);ri={Cache:e,split:f,normalizePath:p,setter:function(y){var O=p(y);return l.get(y)||l.set(y,function(F,b){for(var V=0,K=O.length,Y=F;V<K-1;){var W=O[V];if(W==="__proto__"||W==="constructor"||W==="prototype")return F;Y=Y[O[V++]]}Y[O[V]]=b})},getter:function(y,O){var $=p(y);return d.get(y)||d.set(y,function(b){for(var V=0,K=$.length;V<K;)if(b!=null||!O)b=b[$[V++]];else return;return b})},join:function(y){return y.reduce(function(O,$){return O+(x($)||r.test($)?"["+$+"]":(O?".":"")+$)},"")},forEach:function(y,O,$){m(Array.isArray(y)?y:f(y),O,$)}};function p(y){return o.get(y)||o.set(y,f(y).map(function(O){return O.replace(a,"$2")}))}function f(y){return y.match(t)||[""]}function m(y,O,$){var F=y.length,b,V,K,Y;for(V=0;V<F;V++)b=y[V],b&&(w(b)&&(b='"'+b+'"'),Y=x(b),K=!Y&&/^\d+$/.test(b),O.call($,b,Y,K,V,y))}function x(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function h(y){return y.match(n)&&!y.match(r)}function c(y){return i.test(y)}function w(y){return!x(y)&&(h(y)||c(y))}return ri}var ir=vc(),ni,Ia;function xc(){if(Ia)return ni;Ia=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=p=>p.match(e)||[],r=p=>p[0].toUpperCase()+p.slice(1),n=(p,f)=>t(p).join(f).toLowerCase(),i=p=>t(p).reduce((f,m)=>`${f}${f?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return ni={words:t,upperFirst:r,camelCase:i,pascalCase:p=>r(i(p)),snakeCase:p=>n(p,"_"),kebabCase:p=>n(p,"-"),sentenceCase:p=>r(n(p," ")),titleCase:p=>t(p).map(r).join(" ")},ni}var ii=xc(),dn={exports:{}},Ma;function bc(){if(Ma)return dn.exports;Ma=1,dn.exports=function(i){return e(t(i),i)},dn.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},d=s,p=r(a),f=n(i);for(a.forEach(function(x){if(!f.has(x[0])||!f.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)l[d]||m(i[d],d,new Set);return o;function m(x,h,c){if(c.has(x)){var w;try{w=", node was:"+JSON.stringify(x)}catch{w=""}throw new Error("Cyclic dependency"+w)}if(!f.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!l[h]){l[h]=!0;var y=p.get(x)||new Set;if(y=Array.from(y),h=y.length){c.add(x);do{var O=y[--h];m(O,f.get(O),c)}while(h);c.delete(x)}o[--s]=x}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];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,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return dn.exports}var wc=bc();const Sc=ea(wc),Ec=Object.prototype.toString,kc=Error.prototype.toString,Oc=RegExp.prototype.toString,Tc=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Cc=/^Symbol\((.*)\)(.*)$/;function _c(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function za(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _c(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Tc.call(e).replace(Cc,"Symbol($1)");const n=Ec.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+kc.call(e)+"]":n==="RegExp"?Oc.call(e):null}function Vt(e,t){let r=za(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=za(this[n],t);return a!==null?a:i},2)}function go(e){return e==null?[]:[].concat(e)}let yo,vo,xo,Ac=/\$\{\s*(\w+)\s*\}/g;yo=Symbol.toStringTag;class Va{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[yo]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],go(t).forEach(a=>{if(We.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}vo=Symbol.hasInstance;xo=Symbol.toStringTag;class We 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(Ac,(i,a)=>Vt(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Va(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xo]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,We)}static[vo](t){return Va[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let pt={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 \`${Vt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Vt(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Vt(r,!0)}\``+i}},Le={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"},Ct={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"},$i={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Di={isValue:"${path} field must be ${value}"},Sn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Fc={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"},jc={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: \`${Vt(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: \`${Vt(r,!0)}\``}return We.formatError(pt.notType,e)}};Object.assign(Object.create(null),{mixed:pt,string:Le,number:Ct,date:$i,object:Sn,array:Fc,boolean:Di,tuple:jc});const ta=e=>e&&e.__isYupSchema__;class jn{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,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new jn(t,(o,l)=>{var d;let p=s(...o)?i:a;return(d=p==null?void 0:p(l))!=null?d: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(!ta(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const fn={context:"$",value:"."};class or{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]===fn.context,this.isValue=this.key[0]===fn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?fn.context:this.isValue?fn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&ir.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}}or.prototype.__isYupRef=!0;const st=e=>e==null;function dr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:d,test:p,params:f,message:m,skipAbsent:x}=e;let{parent:h,context:c,abortEarly:w=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=i;function O(D){return or.isRef(D)?D.getValue(r,h,c):D}function $(D={}){const k=Object.assign({value:r,originalValue:a,label:s.spec.label,path:D.path||n,spec:s.spec,disableStackTrace:D.disableStackTrace||y},f,D.params);for(const z of Object.keys(k))k[z]=O(k[z]);const P=new We(We.formatError(D.message||m,k),r,k.path,D.type||d,k.disableStackTrace);return P.params=k,P}const F=w?o:l;let b={path:n,parent:h,type:d,from:i.from,createError:$,resolve:O,options:i,originalValue:a,schema:s};const V=D=>{We.isError(D)?F(D):D?l(null):F($())},K=D=>{We.isError(D)?F(D):o(D)};if(x&&st(r))return V(!0);let W;try{var u;if(W=p.call(b,r,b),typeof((u=W)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(V,K)}}catch(D){K(D);return}V(W)}return t.OPTIONS=e,t}function $c(e,t,r,n=r){let i,a,s;return t?(ir.forEach(t,(o,l,d)=>{let p=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",m=d?parseInt(p,10):0;if(e.innerType||f){if(f&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[m],e=f?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[p])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[p],e=e.fields[p]}a=p,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class $n extends Set{describe(){const t=[];for(const r of this.values())t.push(or.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 $n(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(ta(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 Ge{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 $n,this._blacklist=new $n,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(pt.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(s=>{a.test(s.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&&st(a))return a;let s=Vt(t),o=Vt(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
1
|
+
"use strict";var da=e=>{throw TypeError(e)};var Xn=(e,t,r)=>t.has(e)||da("Cannot "+r);var y=(e,t,r)=>(Xn(e,t,"read from private field"),r?r.call(e):t.get(e)),ae=(e,t,r)=>t.has(e)?da("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),G=(e,t,r,n)=>(Xn(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),de=(e,t,r)=>(Xn(e,t,"access private method"),r);var un=(e,t,r,n)=>({set _(i){G(e,t,i,r)},get _(){return y(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),M=require("react"),I=require("@mui/material"),dl=require("@emotion/styled");require("@emotion/react");function fl(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 Ce=fl(M);var tn=e=>e.type==="checkbox",Qt=e=>e instanceof Date,Ne=e=>e==null;const Ls=e=>typeof e=="object";var Fe=e=>!Ne(e)&&!Array.isArray(e)&&Ls(e)&&!Qt(e),qs=e=>Fe(e)&&e.target?tn(e.target)?e.target.checked:e.target.value:e,ml=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bs=(e,t)=>e.has(ml(t)),hl=e=>{const t=e.constructor&&e.constructor.prototype;return Fe(t)&&t.hasOwnProperty("isPrototypeOf")},Bi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Re(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(!(Bi&&(e instanceof Blob||n))&&(r||Fe(e)))if(t=r?[]:{},!r&&!hl(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Re(e[i]));else return e;return t}var Ln=e=>/^\w*$/.test(e),Ae=e=>e===void 0,Ui=e=>Array.isArray(e)?e.filter(Boolean):[],Wi=e=>Ui(e.replace(/["|']|\]/g,"").split(/\.|\[/)),U=(e,t,r)=>{if(!t||!Fe(e))return r;const n=(Ln(t)?[t]:Wi(t)).reduce((i,a)=>Ne(i)?i:i[a],e);return Ae(n)||n===e?Ae(e[t])?r:e[t]:n},He=e=>typeof e=="boolean",ge=(e,t,r)=>{let n=-1;const i=Ln(t)?[t]:Wi(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const f=e[o];l=Fe(f)||Array.isArray(f)?f:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const On={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},it={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Us=M.createContext(null);Us.displayName="HookFormContext";const Hi=()=>M.useContext(Us);var Ws=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==it.all&&(t._proxyFormState[s]=!n||it.all),r&&(r[s]=!0),e[s]}});return i};const Ki=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;function gl(e){const t=Hi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=M.useState(r._formState),l=M.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ki(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:f=>{!n&&o({...r._formState,...f})}}),[i,n,a]),M.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),M.useMemo(()=>Ws(s,r,l.current,!1),[s,r])}var ht=e=>typeof e=="string",Hs=(e,t,r,n,i)=>ht(e)?(n&&t.watch.add(e),U(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),U(r,a))):(n&&(t.watchAll=!0),r);function yl(e){const t=Hi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=M.useRef(i),[l,f]=M.useState(r._getWatch(n,o.current));return Ki(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:p=>!a&&f(Hs(n,r._names,p.values||r._formValues,!1,o.current))}),[n,r,a,s]),M.useEffect(()=>r._removeUnmounted()),l}function vl(e){const t=Hi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=Bs(i._names.array,r),o=yl({control:i,name:r,defaultValue:U(i._formValues,r,U(i._defaultValues,r,e.defaultValue)),exact:!0}),l=gl({control:i,name:r,exact:!0}),f=M.useRef(e),p=M.useRef(i.register(r,{...e.rules,value:o,...He(e.disabled)?{disabled:e.disabled}:{}})),d=M.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!U(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!U(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!U(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!U(l.validatingFields,r)},error:{enumerable:!0,get:()=>U(l.errors,r)}}),[l,r]),m=M.useCallback(x=>p.current.onChange({target:{value:qs(x),name:r},type:On.CHANGE}),[r]),b=M.useCallback(()=>p.current.onBlur({target:{value:U(i._formValues,r),name:r},type:On.BLUR}),[r,i._formValues]),h=M.useCallback(x=>{const v=U(i._fields,r);v&&x&&(v._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:O=>x.setCustomValidity(O),reportValidity:()=>x.reportValidity()})},[i._fields,r]),c=M.useMemo(()=>({name:r,value:o,...He(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:m,onBlur:b,ref:h}),[r,n,l.disabled,m,b,h,o]);return M.useEffect(()=>{const x=i._options.shouldUnregister||a;i.register(r,{...f.current.rules,...He(f.current.disabled)?{disabled:f.current.disabled}:{}});const v=(O,j)=>{const A=U(i._fields,O);A&&A._f&&(A._f.mount=j)};if(v(r,!0),x){const O=Re(U(i._options.defaultValues,r));ge(i._defaultValues,r,O),Ae(U(i._formValues,r))&&ge(i._formValues,r,O)}return!s&&i.register(r),()=>{(s?x&&!i._state.action:x)?i.unregister(r):v(r,!1)}},[r,i,s,a]),M.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),M.useMemo(()=>({field:c,formState:l,fieldState:d}),[c,l,d])}const lt=e=>e.render(vl(e));var Ks=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Ur=e=>Array.isArray(e)?e:[e],fa=()=>{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=[]}}},yi=e=>Ne(e)||!Ls(e);function _t(e,t){if(yi(e)||yi(t))return e===t;if(Qt(e)&&Qt(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 s=t[i];if(Qt(a)&&Qt(s)||Fe(a)&&Fe(s)||Array.isArray(a)&&Array.isArray(s)?!_t(a,s):a!==s)return!1}}return!0}var Be=e=>Fe(e)&&!Object.keys(e).length,Qi=e=>e.type==="file",at=e=>typeof e=="function",Tn=e=>{if(!Bi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qs=e=>e.type==="select-multiple",Gi=e=>e.type==="radio",xl=e=>Gi(e)||tn(e),ei=e=>Tn(e)&&e.isConnected;function bl(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ae(e)?n++:e[t[n++]];return e}function wl(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ae(e[t]))return!1;return!0}function $e(e,t){const r=Array.isArray(t)?t:Ln(t)?[t]:Wi(t),n=r.length===1?e:bl(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Fe(n)&&Be(n)||Array.isArray(n)&&wl(n))&&$e(e,r.slice(0,-1)),e}var Gs=e=>{for(const t in e)if(at(e[t]))return!0;return!1};function Cn(e,t={}){const r=Array.isArray(e);if(Fe(e)||r)for(const n in e)Array.isArray(e[n])||Fe(e[n])&&!Gs(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Cn(e[n],t[n])):Ne(e[n])||(t[n]=!0);return t}function Ys(e,t,r){const n=Array.isArray(e);if(Fe(e)||n)for(const i in e)Array.isArray(e[i])||Fe(e[i])&&!Gs(e[i])?Ae(t)||yi(r[i])?r[i]=Array.isArray(e[i])?Cn(e[i],[]):{...Cn(e[i])}:Ys(e[i],Ne(t)?{}:t[i],r[i]):r[i]=!_t(e[i],t[i]);return r}var Mr=(e,t)=>Ys(e,t,Cn(t));const ma={value:!1,isValid:!1},ha={value:!0,isValid:!0};var Zs=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&&!Ae(e[0].attributes.value)?Ae(e[0].value)||e[0].value===""?ha:{value:e[0].value,isValid:!0}:ha:ma}return ma},Js=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ae(e)?e:t?e===""?NaN:e&&+e:r&&ht(e)?new Date(e):n?n(e):e;const ga={isValid:!1,value:null};var Xs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ga):ga;function ya(e){const t=e.ref;return Qi(t)?t.files:Gi(t)?Xs(e.refs).value:Qs(t)?[...t.selectedOptions].map(({value:r})=>r):tn(t)?Zs(e.refs).value:Js(Ae(t.value)?e.ref.value:t.value,e)}var Sl=(e,t,r,n)=>{const i={};for(const a of e){const s=U(t,a);s&&ge(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},_n=e=>e instanceof RegExp,zr=e=>Ae(e)?e:_n(e)?e.source:Fe(e)?_n(e.value)?e.value.source:e.value:e,va=e=>({isOnSubmit:!e||e===it.onSubmit,isOnBlur:e===it.onBlur,isOnChange:e===it.onChange,isOnAll:e===it.all,isOnTouch:e===it.onTouched});const xa="AsyncFunction";var El=e=>!!e&&!!e.validate&&!!(at(e.validate)&&e.validate.constructor.name===xa||Fe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===xa)),kl=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ba=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=U(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Wr(o,t))break}else if(Fe(o)&&Wr(o,t))break}}};function wa(e,t,r){const n=U(e,r);if(n||Ln(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=U(t,a),o=U(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var Ol=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Be(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||it.all))},Tl=(e,t,r)=>!e||!t||e===t||Ur(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Cl=(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,_l=(e,t)=>!Ui(U(e,t)).length&&$e(e,t),Al=(e,t,r)=>{const n=Ur(U(e,r));return ge(n,"root",t[r]),ge(e,r,n),e},wn=e=>ht(e);function Sa(e,t,r="validate"){if(wn(e)||Array.isArray(e)&&e.every(wn)||He(e)&&!e)return{type:r,message:wn(e)?e:"",ref:t}}var pr=e=>Fe(e)&&!_n(e)?e:{value:e,message:""},Ea=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:f,minLength:p,min:d,max:m,pattern:b,validate:h,name:c,valueAsNumber:x,mount:v}=e._f,O=U(r,c);if(!v||t.has(c))return{};const j=o?o[0]:s,A=k=>{i&&j.reportValidity&&(j.setCustomValidity(He(k)?"":k||""),j.reportValidity())},w={},V=Gi(s),Q=tn(s),X=V||Q,q=(x||Qi(s))&&Ae(s.value)&&Ae(O)||Tn(s)&&s.value===""||O===""||Array.isArray(O)&&!O.length,u=Ks.bind(null,c,n,w),$=(k,R,z,B=gt.maxLength,H=gt.minLength)=>{const ue=k?R:z;w[c]={type:k?B:H,message:ue,ref:s,...u(k?B:H,ue)}};if(a?!Array.isArray(O)||!O.length:l&&(!X&&(q||Ne(O))||He(O)&&!O||Q&&!Zs(o).isValid||V&&!Xs(o).isValid)){const{value:k,message:R}=wn(l)?{value:!!l,message:l}:pr(l);if(k&&(w[c]={type:gt.required,message:R,ref:j,...u(gt.required,R)},!n))return A(R),w}if(!q&&(!Ne(d)||!Ne(m))){let k,R;const z=pr(m),B=pr(d);if(!Ne(O)&&!isNaN(O)){const H=s.valueAsNumber||O&&+O;Ne(z.value)||(k=H>z.value),Ne(B.value)||(R=H<B.value)}else{const H=s.valueAsDate||new Date(O),ue=D=>new Date(new Date().toDateString()+" "+D),re=s.type=="time",ee=s.type=="week";ht(z.value)&&O&&(k=re?ue(O)>ue(z.value):ee?O>z.value:H>new Date(z.value)),ht(B.value)&&O&&(R=re?ue(O)<ue(B.value):ee?O<B.value:H<new Date(B.value))}if((k||R)&&($(!!k,z.message,B.message,gt.max,gt.min),!n))return A(w[c].message),w}if((f||p)&&!q&&(ht(O)||a&&Array.isArray(O))){const k=pr(f),R=pr(p),z=!Ne(k.value)&&O.length>+k.value,B=!Ne(R.value)&&O.length<+R.value;if((z||B)&&($(z,k.message,R.message),!n))return A(w[c].message),w}if(b&&!q&&ht(O)){const{value:k,message:R}=pr(b);if(_n(k)&&!O.match(k)&&(w[c]={type:gt.pattern,message:R,ref:s,...u(gt.pattern,R)},!n))return A(R),w}if(h){if(at(h)){const k=await h(O,r),R=Sa(k,j);if(R&&(w[c]={...R,...u(gt.validate,R.message)},!n))return A(R.message),w}else if(Fe(h)){let k={};for(const R in h){if(!Be(k)&&!n)break;const z=Sa(await h[R](O,r),j,R);z&&(k={...z,...u(R,z.message)},A(z.message),n&&(w[c]=k))}if(!Be(k)&&(w[c]={ref:j,...k},!n))return w}}return A(!0),w};const Fl={mode:it.onSubmit,reValidateMode:it.onChange,shouldFocusError:!0};function jl(e={}){let t={...Fl,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:at(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=Fe(t.defaultValues)||Fe(t.values)?Re(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Re(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...p};const m={array:fa(),state:fa()},b=t.criteriaMode===it.all,h=g=>S=>{clearTimeout(f),f=setTimeout(g,S)},c=async g=>{if(!t.disabled&&(p.isValid||d.isValid||g)){const S=t.resolver?Be((await Q()).errors):await q(n,!0);S!==r.isValid&&m.state.next({isValid:S})}},x=(g,S)=>{!t.disabled&&(p.isValidating||p.validatingFields||d.isValidating||d.validatingFields)&&((g||Array.from(o.mount)).forEach(F=>{F&&(S?ge(r.validatingFields,F,S):$e(r.validatingFields,F))}),m.state.next({validatingFields:r.validatingFields,isValidating:!Be(r.validatingFields)}))},v=(g,S=[],F,K,E=!0,C=!0)=>{if(K&&F&&!t.disabled){if(s.action=!0,C&&Array.isArray(U(n,g))){const W=F(U(n,g),K.argA,K.argB);E&&ge(n,g,W)}if(C&&Array.isArray(U(r.errors,g))){const W=F(U(r.errors,g),K.argA,K.argB);E&&ge(r.errors,g,W),_l(r.errors,g)}if((p.touchedFields||d.touchedFields)&&C&&Array.isArray(U(r.touchedFields,g))){const W=F(U(r.touchedFields,g),K.argA,K.argB);E&&ge(r.touchedFields,g,W)}(p.dirtyFields||d.dirtyFields)&&(r.dirtyFields=Mr(i,a)),m.state.next({name:g,isDirty:$(g,S),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ge(a,g,S)},O=(g,S)=>{ge(r.errors,g,S),m.state.next({errors:r.errors})},j=g=>{r.errors=g,m.state.next({errors:r.errors,isValid:!1})},A=(g,S,F,K)=>{const E=U(n,g);if(E){const C=U(a,g,Ae(F)?U(i,g):F);Ae(C)||K&&K.defaultChecked||S?ge(a,g,S?C:ya(E._f)):z(g,C),s.mount&&c()}},w=(g,S,F,K,E)=>{let C=!1,W=!1;const ie={name:g};if(!t.disabled){if(!F||K){(p.isDirty||d.isDirty)&&(W=r.isDirty,r.isDirty=ie.isDirty=$(),C=W!==ie.isDirty);const le=_t(U(i,g),S);W=!!U(r.dirtyFields,g),le?$e(r.dirtyFields,g):ge(r.dirtyFields,g,!0),ie.dirtyFields=r.dirtyFields,C=C||(p.dirtyFields||d.dirtyFields)&&W!==!le}if(F){const le=U(r.touchedFields,g);le||(ge(r.touchedFields,g,F),ie.touchedFields=r.touchedFields,C=C||(p.touchedFields||d.touchedFields)&&le!==F)}C&&E&&m.state.next(ie)}return C?ie:{}},V=(g,S,F,K)=>{const E=U(r.errors,g),C=(p.isValid||d.isValid)&&He(S)&&r.isValid!==S;if(t.delayError&&F?(l=h(()=>O(g,F)),l(t.delayError)):(clearTimeout(f),l=null,F?ge(r.errors,g,F):$e(r.errors,g)),(F?!_t(E,F):E)||!Be(K)||C){const W={...K,...C&&He(S)?{isValid:S}:{},errors:r.errors,name:g};r={...r,...W},m.state.next(W)}},Q=async g=>{x(g,!0);const S=await t.resolver(a,t.context,Sl(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return x(g),S},X=async g=>{const{errors:S}=await Q(g);if(g)for(const F of g){const K=U(S,F);K?ge(r.errors,F,K):$e(r.errors,F)}else r.errors=S;return S},q=async(g,S,F={valid:!0})=>{for(const K in g){const E=g[K];if(E){const{_f:C,...W}=E;if(C){const ie=o.array.has(C.name),le=E._f&&El(E._f);le&&p.validatingFields&&x([K],!0);const De=await Ea(E,o.disabled,a,b,t.shouldUseNativeValidation&&!S,ie);if(le&&p.validatingFields&&x([K]),De[C.name]&&(F.valid=!1,S))break;!S&&(U(De,C.name)?ie?Al(r.errors,De,C.name):ge(r.errors,C.name,De[C.name]):$e(r.errors,C.name))}!Be(W)&&await q(W,S,F)}}return F.valid},u=()=>{for(const g of o.unMount){const S=U(n,g);S&&(S._f.refs?S._f.refs.every(F=>!ei(F)):!ei(S._f.ref))&&se(g)}o.unMount=new Set},$=(g,S)=>!t.disabled&&(g&&S&&ge(a,g,S),!_t(D(),i)),k=(g,S,F)=>Hs(g,o,{...s.mount?a:Ae(S)?i:ht(g)?{[g]:S}:S},F,S),R=g=>Ui(U(s.mount?a:i,g,t.shouldUnregister?U(i,g,[]):[])),z=(g,S,F={})=>{const K=U(n,g);let E=S;if(K){const C=K._f;C&&(!C.disabled&&ge(a,g,Js(S,C)),E=Tn(C.ref)&&Ne(S)?"":S,Qs(C.ref)?[...C.ref.options].forEach(W=>W.selected=E.includes(W.value)):C.refs?tn(C.ref)?C.refs.forEach(W=>{(!W.defaultChecked||!W.disabled)&&(Array.isArray(E)?W.checked=!!E.find(ie=>ie===W.value):W.checked=E===W.value||!!E)}):C.refs.forEach(W=>W.checked=W.value===E):Qi(C.ref)?C.ref.value="":(C.ref.value=E,C.ref.type||m.state.next({name:g,values:Re(a)})))}(F.shouldDirty||F.shouldTouch)&&w(g,E,F.shouldTouch,F.shouldDirty,!0),F.shouldValidate&&ee(g)},B=(g,S,F)=>{for(const K in S){if(!S.hasOwnProperty(K))return;const E=S[K],C=g+"."+K,W=U(n,C);(o.array.has(g)||Fe(E)||W&&!W._f)&&!Qt(E)?B(C,E,F):z(C,E,F)}},H=(g,S,F={})=>{const K=U(n,g),E=o.array.has(g),C=Re(S);ge(a,g,C),E?(m.array.next({name:g,values:Re(a)}),(p.isDirty||p.dirtyFields||d.isDirty||d.dirtyFields)&&F.shouldDirty&&m.state.next({name:g,dirtyFields:Mr(i,a),isDirty:$(g,C)})):K&&!K._f&&!Ne(C)?B(g,C,F):z(g,C,F),ba(g,o)&&m.state.next({...r}),m.state.next({name:s.mount?g:void 0,values:Re(a)})},ue=async g=>{s.mount=!0;const S=g.target;let F=S.name,K=!0;const E=U(n,F),C=le=>{K=Number.isNaN(le)||Qt(le)&&isNaN(le.getTime())||_t(le,U(a,F,le))},W=va(t.mode),ie=va(t.reValidateMode);if(E){let le,De;const tt=S.type?ya(E._f):qs(g),Ye=g.type===On.BLUR||g.type===On.FOCUS_OUT,Rr=!kl(E._f)&&!t.resolver&&!U(r.errors,F)&&!E._f.deps||Cl(Ye,U(r.touchedFields,F),r.isSubmitted,ie,W),Ut=ba(F,o,Ye);ge(a,F,tt),Ye?(E._f.onBlur&&E._f.onBlur(g),l&&l(0)):E._f.onChange&&E._f.onChange(g);const Ot=w(F,tt,Ye),Pr=!Be(Ot)||Ut;if(!Ye&&m.state.next({name:F,type:g.type,values:Re(a)}),Rr)return(p.isValid||d.isValid)&&(t.mode==="onBlur"?Ye&&c():Ye||c()),Pr&&m.state.next({name:F,...Ut?{}:Ot});if(!Ye&&Ut&&m.state.next({...r}),t.resolver){const{errors:cr}=await Q([F]);if(C(tt),K){const Ir=wa(r.errors,n,F),ur=wa(cr,n,Ir.name||F);le=ur.error,F=ur.name,De=Be(cr)}}else x([F],!0),le=(await Ea(E,o.disabled,a,b,t.shouldUseNativeValidation))[F],x([F]),C(tt),K&&(le?De=!1:(p.isValid||d.isValid)&&(De=await q(n,!0)));K&&(E._f.deps&&ee(E._f.deps),V(F,De,le,Ot))}},re=(g,S)=>{if(U(r.errors,S)&&g.focus)return g.focus(),1},ee=async(g,S={})=>{let F,K;const E=Ur(g);if(t.resolver){const C=await X(Ae(g)?g:E);F=Be(C),K=g?!E.some(W=>U(C,W)):F}else g?(K=(await Promise.all(E.map(async C=>{const W=U(n,C);return await q(W&&W._f?{[C]:W}:W)}))).every(Boolean),!(!K&&!r.isValid)&&c()):K=F=await q(n);return m.state.next({...!ht(g)||(p.isValid||d.isValid)&&F!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:F}:{},errors:r.errors}),S.shouldFocus&&!K&&Wr(n,re,g?E:o.mount),K},D=g=>{const S={...s.mount?a:i};return Ae(g)?S:ht(g)?U(S,g):g.map(F=>U(S,F))},N=(g,S)=>({invalid:!!U((S||r).errors,g),isDirty:!!U((S||r).dirtyFields,g),error:U((S||r).errors,g),isValidating:!!U(r.validatingFields,g),isTouched:!!U((S||r).touchedFields,g)}),P=g=>{g&&Ur(g).forEach(S=>$e(r.errors,S)),m.state.next({errors:g?r.errors:{}})},ne=(g,S,F)=>{const K=(U(n,g,{_f:{}})._f||{}).ref,E=U(r.errors,g)||{},{ref:C,message:W,type:ie,...le}=E;ge(r.errors,g,{...le,...S,ref:K}),m.state.next({name:g,errors:r.errors,isValid:!1}),F&&F.shouldFocus&&K&&K.focus&&K.focus()},Y=(g,S)=>at(g)?m.state.subscribe({next:F=>g(k(void 0,S),F)}):k(g,S,!0),te=g=>m.state.subscribe({next:S=>{Tl(g.name,S.name,g.exact)&&Ol(S,g.formState||p,kt,g.reRenderRoot)&&g.callback({values:{...a},...r,...S})}}).unsubscribe,Z=g=>(s.mount=!0,d={...d,...g.formState},te({...g,formState:d})),se=(g,S={})=>{for(const F of g?Ur(g):o.mount)o.mount.delete(F),o.array.delete(F),S.keepValue||($e(n,F),$e(a,F)),!S.keepError&&$e(r.errors,F),!S.keepDirty&&$e(r.dirtyFields,F),!S.keepTouched&&$e(r.touchedFields,F),!S.keepIsValidating&&$e(r.validatingFields,F),!t.shouldUnregister&&!S.keepDefaultValue&&$e(i,F);m.state.next({values:Re(a)}),m.state.next({...r,...S.keepDirty?{isDirty:$()}:{}}),!S.keepIsValid&&c()},ce=({disabled:g,name:S})=>{(He(g)&&s.mount||g||o.disabled.has(S))&&(g?o.disabled.add(S):o.disabled.delete(S))},pe=(g,S={})=>{let F=U(n,g);const K=He(S.disabled)||He(t.disabled);return ge(n,g,{...F||{},_f:{...F&&F._f?F._f:{ref:{name:g}},name:g,mount:!0,...S}}),o.mount.add(g),F?ce({disabled:He(S.disabled)?S.disabled:t.disabled,name:g}):A(g,!0,S.value),{...K?{disabled:S.disabled||t.disabled}:{},...t.progressive?{required:!!S.required,min:zr(S.min),max:zr(S.max),minLength:zr(S.minLength),maxLength:zr(S.maxLength),pattern:zr(S.pattern)}:{},name:g,onChange:ue,onBlur:ue,ref:E=>{if(E){pe(g,S),F=U(n,g);const C=Ae(E.value)&&E.querySelectorAll&&E.querySelectorAll("input,select,textarea")[0]||E,W=xl(C),ie=F._f.refs||[];if(W?ie.find(le=>le===C):C===F._f.ref)return;ge(n,g,{_f:{...F._f,...W?{refs:[...ie.filter(ei),C,...Array.isArray(U(i,g))?[{}]:[]],ref:{type:C.type,name:g}}:{ref:C}}}),A(g,!1,void 0,C)}else F=U(n,g,{}),F._f&&(F._f.mount=!1),(t.shouldUnregister||S.shouldUnregister)&&!(Bs(o.array,g)&&s.action)&&o.unMount.add(g)}}},oe=()=>t.shouldFocusError&&Wr(n,re,o.mount),_e=g=>{He(g)&&(m.state.next({disabled:g}),Wr(n,(S,F)=>{const K=U(n,F);K&&(S.disabled=K._f.disabled||g,Array.isArray(K._f.refs)&&K._f.refs.forEach(E=>{E.disabled=K._f.disabled||g}))},0,!1))},L=(g,S)=>async F=>{let K;F&&(F.preventDefault&&F.preventDefault(),F.persist&&F.persist());let E=Re(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:W}=await Q();r.errors=C,E=W}else await q(n);if(o.disabled.size)for(const C of o.disabled)ge(E,C,void 0);if($e(r.errors,"root"),Be(r.errors)){m.state.next({errors:{}});try{await g(E,F)}catch(C){K=C}}else S&&await S({...r.errors},F),oe(),setTimeout(oe);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Be(r.errors)&&!K,submitCount:r.submitCount+1,errors:r.errors}),K)throw K},Me=(g,S={})=>{U(n,g)&&(Ae(S.defaultValue)?H(g,Re(U(i,g))):(H(g,S.defaultValue),ge(i,g,Re(S.defaultValue))),S.keepTouched||$e(r.touchedFields,g),S.keepDirty||($e(r.dirtyFields,g),r.isDirty=S.defaultValue?$(g,Re(U(i,g))):$()),S.keepError||($e(r.errors,g),p.isValid&&c()),m.state.next({...r}))},ot=(g,S={})=>{const F=g?Re(g):i,K=Re(F),E=Be(g),C=E?i:K;if(S.keepDefaultValues||(i=F),!S.keepValues){if(S.keepDirtyValues){const W=new Set([...o.mount,...Object.keys(Mr(i,a))]);for(const ie of Array.from(W))U(r.dirtyFields,ie)?ge(C,ie,U(a,ie)):H(ie,U(C,ie))}else{if(Bi&&Ae(g))for(const W of o.mount){const ie=U(n,W);if(ie&&ie._f){const le=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Tn(le)){const De=le.closest("form");if(De){De.reset();break}}}}for(const W of o.mount)H(W,U(C,W))}a=Re(C),m.array.next({values:{...C}}),m.state.next({values:{...C}})}o={mount:S.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!p.isValid||!!S.keepIsValid||!!S.keepDirtyValues,s.watch=!!t.shouldUnregister,m.state.next({submitCount:S.keepSubmitCount?r.submitCount:0,isDirty:E?!1:S.keepDirty?r.isDirty:!!(S.keepDefaultValues&&!_t(g,i)),isSubmitted:S.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:E?{}:S.keepDirtyValues?S.keepDefaultValues&&a?Mr(i,a):r.dirtyFields:S.keepDefaultValues&&g?Mr(i,g):S.keepDirty?r.dirtyFields:{},touchedFields:S.keepTouched?r.touchedFields:{},errors:S.keepErrors?r.errors:{},isSubmitSuccessful:S.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Et=(g,S)=>ot(at(g)?g(a):g,S),ln=(g,S={})=>{const F=U(n,g),K=F&&F._f;if(K){const E=K.refs?K.refs[0]:K.ref;E.focus&&(E.focus(),S.shouldSelect&&at(E.select)&&E.select())}},kt=g=>{r={...r,...g}},Bt={control:{register:pe,unregister:se,getFieldState:N,handleSubmit:L,setError:ne,_subscribe:te,_runSchema:Q,_focusError:oe,_getWatch:k,_getDirty:$,_setValid:c,_setFieldArray:v,_setDisabledField:ce,_setErrors:j,_getFieldArray:R,_reset:ot,_resetDefaultValues:()=>at(t.defaultValues)&&t.defaultValues().then(g=>{Et(g,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:_e,_subjects:m,_proxyFormState:p,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(g){s=g},get _defaultValues(){return i},get _names(){return o},set _names(g){o=g},get _formState(){return r},get _options(){return t},set _options(g){t={...t,...g}}},subscribe:Z,trigger:ee,register:pe,handleSubmit:L,watch:Y,setValue:H,getValues:D,reset:Et,resetField:Me,clearErrors:P,unregister:se,setError:ne,setFocus:ln,getFieldState:N};return{...Bt,formControl:Bt}}function $l(e={}){const t=M.useRef(void 0),r=M.useRef(void 0),[n,i]=M.useState({isDirty:!1,isValidating:!1,isLoading:at(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:at(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!at(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=jl(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Ki(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),M.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),M.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),M.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),M.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),M.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),M.useEffect(()=>{e.values&&!_t(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),M.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=Ws(n,a),t.current}const ka=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},eo=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ka(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>ka(i,r,e))}},Dl=(e,t)=>{t.shouldUseNativeValidation&&eo(e,t);const r={};for(const n in e){const i=U(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Rl(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));ge(s,"root",a),ge(r,n,s)}else ge(r,n,a)}return r},Rl=(e,t)=>{const r=Oa(t);return e.some(n=>Oa(n).match(`^${r}\\.\\d+`))};function Oa(e){return e.replace(/\]|\[/g,"")}function Pl(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){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(f){return a.shouldUseNativeValidation&&eo({},a),{values:r.raw?Object.assign({},n):f,errors:{}}}))}catch(f){return o(f)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:Dl((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(f,p){if(f[p.path]||(f[p.path]={message:p.message,type:p.type}),l){var d=f[p.path].types,m=d&&d[p.type];f[p.path]=Ks(p.path,l,f,p.type,m?[].concat(m,p.message):p.message)}return f},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var rn=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(){}},ar=typeof window>"u"||"Deno"in globalThis;function Ue(){}function Il(e,t){return typeof e=="function"?e(t):e}function vi(e){return typeof e=="number"&&e>=0&&e!==1/0}function to(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zt(e,t){return typeof e=="function"?e(t):e}function Je(e,t){return typeof e=="function"?e(t):e}function Ta(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Yi(s,t.options))return!1}else if(!Qr(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ca(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Kr(t.options.mutationKey)!==Kr(a))return!1}else if(!Qr(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Yi(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kr)(e)}function Kr(e){return JSON.stringify(e,(t,r)=>wi(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Qr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Qr(e[r],t[r])):!1}function xi(e,t){if(e===t)return e;const r=_a(e)&&_a(t);if(r||wi(e)&&wi(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let f=0;for(let p=0;p<s;p++){const d=r?p:a[p];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,f++):(o[d]=xi(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&f++)}return i===s&&f===i?e:o}return t}function bi(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 _a(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wi(e){if(!Aa(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Aa(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Aa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ml(e){return new Promise(t=>{setTimeout(t,e)})}function Si(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 xi(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 xi(e,t)}return t}function zl(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Vl(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var An=Symbol();function ro(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===An&&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===An?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Nl(e,t){return typeof e=="function"?e(...t):!!e}var Gt,At,br,$s,Ll=($s=class extends rn{constructor(){super();ae(this,Gt);ae(this,At);ae(this,br);G(this,br,t=>{if(!ar&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){y(this,At)||this.setEventListener(y(this,br))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,At))==null||t.call(this),G(this,At,void 0))}setEventListener(t){var r;G(this,br,t),(r=y(this,At))==null||r.call(this),G(this,At,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){y(this,Gt)!==t&&(G(this,Gt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof y(this,Gt)=="boolean"?y(this,Gt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gt=new WeakMap,At=new WeakMap,br=new WeakMap,$s),Zi=new Ll,wr,Ft,Sr,Ds,ql=(Ds=class extends rn{constructor(){super();ae(this,wr,!0);ae(this,Ft);ae(this,Sr);G(this,Sr,t=>{if(!ar&&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(){y(this,Ft)||this.setEventListener(y(this,Sr))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Ft))==null||t.call(this),G(this,Ft,void 0))}setEventListener(t){var r;G(this,Sr,t),(r=y(this,Ft))==null||r.call(this),G(this,Ft,t(this.setOnline.bind(this)))}setOnline(t){y(this,wr)!==t&&(G(this,wr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return y(this,wr)}},wr=new WeakMap,Ft=new WeakMap,Sr=new WeakMap,Ds),Fn=new ql;function Ei(){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 Bl(e){return Math.min(1e3*2**e,3e4)}function no(e){return(e??"online")==="online"?Fn.isOnline():!0}var io=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ti(e){return e instanceof io}function ao(e){let t=!1,r=0,n=!1,i;const a=Ei(),s=c=>{var x;n||(m(new io(c)),(x=e.abort)==null||x.call(e))},o=()=>{t=!0},l=()=>{t=!1},f=()=>Zi.isFocused()&&(e.networkMode==="always"||Fn.isOnline())&&e.canRun(),p=()=>no(e.networkMode)&&e.canRun(),d=c=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,c),i==null||i(),a.resolve(c))},m=c=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,c),i==null||i(),a.reject(c))},b=()=>new Promise(c=>{var x;i=v=>{(n||f())&&c(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var c;i=void 0,n||(c=e.onContinue)==null||c.call(e)}),h=()=>{if(n)return;let c;const x=r===0?e.initialPromise:void 0;try{c=x??e.fn()}catch(v){c=Promise.reject(v)}Promise.resolve(c).then(d).catch(v=>{var V;if(n)return;const O=e.retry??(ar?0:3),j=e.retryDelay??Bl,A=typeof j=="function"?j(r,v):j,w=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,v);if(t||!w){m(v);return}r++,(V=e.onFail)==null||V.call(e,r,v),Ml(A).then(()=>f()?void 0:b()).then(()=>{t?m(v):h()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:p,start:()=>(p()?h():b().then(h),a)}}var Ul=e=>setTimeout(e,0);function Wl(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=Ul;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Pe=Wl(),Yt,Rs,so=(Rs=class{constructor(){ae(this,Yt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vi(this.gcTime)&&G(this,Yt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ar?1/0:5*60*1e3))}clearGcTimeout(){y(this,Yt)&&(clearTimeout(y(this,Yt)),G(this,Yt,void 0))}},Yt=new WeakMap,Rs),Er,Zt,Ze,Jt,Ie,Zr,Xt,rt,xt,Ps,Hl=(Ps=class extends so{constructor(t){super();ae(this,rt);ae(this,Er);ae(this,Zt);ae(this,Ze);ae(this,Jt);ae(this,Ie);ae(this,Zr);ae(this,Xt);G(this,Xt,!1),G(this,Zr,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,Jt,t.client),G(this,Ze,y(this,Jt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,Er,Kl(this.options)),this.state=t.state??y(this,Er),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,Ie))==null?void 0:t.promise}setOptions(t){this.options={...y(this,Zr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Ze).remove(this)}setData(t,r){const n=Si(this.state.data,t,this.options);return de(this,rt,xt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){de(this,rt,xt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=y(this,Ie))==null?void 0:n.promise;return(i=y(this,Ie))==null||i.cancel(t),r?r.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Er))}isActive(){return this.observers.some(t=>Je(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===An||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zt(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:!to(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=y(this,Ie))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=y(this,Ie))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(y(this,Ie)&&(y(this,Xt)?y(this,Ie).cancel({revert:!0}):y(this,Ie).cancelRetry()),this.scheduleGc()),y(this,Ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,rt,xt).call(this,{type:"invalidate"})}fetch(t,r){var f,p,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(y(this,Ie))return y(this,Ie).continueRetry(),y(this,Ie).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.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=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(G(this,Xt,!0),n.signal)})},a=()=>{const m=ro(this.options,r),h=(()=>{const c={client:y(this,Jt),queryKey:this.queryKey,meta:this.meta};return i(c),c})();return G(this,Xt,!1),this.options.persister?this.options.persister(m,h,this):m(h)},o=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:y(this,Jt),state:this.state,fetchFn:a};return i(m),m})();(f=this.options.behavior)==null||f.onFetch(o,this),G(this,Zt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=o.fetchOptions)==null?void 0:p.meta))&&de(this,rt,xt).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=m=>{var b,h,c,x;ti(m)&&m.silent||de(this,rt,xt).call(this,{type:"error",error:m}),ti(m)||((h=(b=y(this,Ze).config).onError)==null||h.call(b,m,this),(x=(c=y(this,Ze).config).onSettled)==null||x.call(c,this.state.data,m,this)),this.scheduleGc()};return G(this,Ie,ao({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var b,h,c,x;if(m===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(m)}catch(v){l(v);return}(h=(b=y(this,Ze).config).onSuccess)==null||h.call(b,m,this),(x=(c=y(this,Ze).config).onSettled)==null||x.call(c,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,b)=>{de(this,rt,xt).call(this,{type:"failed",failureCount:m,error:b})},onPause:()=>{de(this,rt,xt).call(this,{type:"pause"})},onContinue:()=>{de(this,rt,xt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),y(this,Ie).start()}},Er=new WeakMap,Zt=new WeakMap,Ze=new WeakMap,Jt=new WeakMap,Ie=new WeakMap,Zr=new WeakMap,Xt=new WeakMap,rt=new WeakSet,xt=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,...oo(n.data,this.options),fetchMeta:t.meta??null};case"success":return G(this,Zt,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 ti(i)&&i.revert&&y(this,Zt)?{...y(this,Zt),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),Pe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),y(this,Ze).notify({query:this,type:"updated",action:t})})},Ps);function oo(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:no(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kl(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 dt,Is,Ql=(Is=class extends rn{constructor(t={}){super();ae(this,dt);this.config=t,G(this,dt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Yi(i,r);let s=this.get(a);return s||(s=new Hl({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){y(this,dt).has(t.queryHash)||(y(this,dt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=y(this,dt).get(t.queryHash);r&&(t.destroy(),r===t&&y(this,dt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,dt).get(t)}getAll(){return[...y(this,dt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ta(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Ta(t,n)):r}notify(t){Pe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Pe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dt=new WeakMap,Is),ft,ze,er,mt,Tt,Ms,Gl=(Ms=class extends so{constructor(t){super();ae(this,mt);ae(this,ft);ae(this,ze);ae(this,er);this.mutationId=t.mutationId,G(this,ze,t.mutationCache),G(this,ft,[]),this.state=t.state||Yl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,ft).includes(t)||(y(this,ft).push(t),this.clearGcTimeout(),y(this,ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,ft,y(this,ft).filter(r=>r!==t)),this.scheduleGc(),y(this,ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,ft).length||(this.state.status==="pending"?this.scheduleGc():y(this,ze).remove(this))}continue(){var t;return((t=y(this,er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,f,p,d,m,b,h,c,x,v,O,j,A,w,V,Q,X;const r=()=>{de(this,mt,Tt).call(this,{type:"continue"})};G(this,er,ao({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(q,u)=>{de(this,mt,Tt).call(this,{type:"failed",failureCount:q,error:u})},onPause:()=>{de(this,mt,Tt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,ze).canRun(this)}));const n=this.state.status==="pending",i=!y(this,er).canStart();try{if(n)r();else{de(this,mt,Tt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=y(this,ze).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));u!==this.state.context&&de(this,mt,Tt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const q=await y(this,er).start();return await((p=(f=y(this,ze).config).onSuccess)==null?void 0:p.call(f,q,t,this.state.context,this)),await((m=(d=this.options).onSuccess)==null?void 0:m.call(d,q,t,this.state.context)),await((h=(b=y(this,ze).config).onSettled)==null?void 0:h.call(b,q,null,this.state.variables,this.state.context,this)),await((x=(c=this.options).onSettled)==null?void 0:x.call(c,q,null,t,this.state.context)),de(this,mt,Tt).call(this,{type:"success",data:q}),q}catch(q){try{throw await((O=(v=y(this,ze).config).onError)==null?void 0:O.call(v,q,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,q,t,this.state.context)),await((V=(w=y(this,ze).config).onSettled)==null?void 0:V.call(w,void 0,q,this.state.variables,this.state.context,this)),await((X=(Q=this.options).onSettled)==null?void 0:X.call(Q,void 0,q,t,this.state.context)),q}finally{de(this,mt,Tt).call(this,{type:"error",error:q})}}finally{y(this,ze).runNext(this)}}},ft=new WeakMap,ze=new WeakMap,er=new WeakMap,mt=new WeakSet,Tt=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),Pe.batch(()=>{y(this,ft).forEach(n=>{n.onMutationUpdate(t)}),y(this,ze).notify({mutation:this,type:"updated",action:t})})},Ms);function Yl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bt,nt,Jr,zs,Zl=(zs=class extends rn{constructor(t={}){super();ae(this,bt);ae(this,nt);ae(this,Jr);this.config=t,G(this,bt,new Set),G(this,nt,new Map),G(this,Jr,0)}build(t,r,n){const i=new Gl({mutationCache:this,mutationId:++un(this,Jr)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){y(this,bt).add(t);const r=pn(t);if(typeof r=="string"){const n=y(this,nt).get(r);n?n.push(t):y(this,nt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,bt).delete(t)){const r=pn(t);if(typeof r=="string"){const n=y(this,nt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&y(this,nt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=pn(t);if(typeof r=="string"){const n=y(this,nt).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=pn(t);if(typeof r=="string"){const i=(n=y(this,nt).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(){Pe.batch(()=>{y(this,bt).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,bt).clear(),y(this,nt).clear()})}getAll(){return Array.from(y(this,bt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ca(r,n))}findAll(t={}){return this.getAll().filter(r=>Ca(t,r))}notify(t){Pe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Pe.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ue))))}},bt=new WeakMap,nt=new WeakMap,Jr=new WeakMap,zs);function pn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Fa(e){return{onFetch:(t,r)=>{var p,d,m,b,h;const n=t.options,i=(m=(d=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((b=t.state.data)==null?void 0:b.pages)||[],s=((h=t.state.data)==null?void 0:h.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const f=async()=>{let c=!1;const x=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},v=ro(t.options,t.fetchOptions),O=async(j,A,w)=>{if(c)return Promise.reject();if(A==null&&j.pages.length)return Promise.resolve(j);const Q=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:A,direction:w?"backward":"forward",meta:t.options.meta};return x($),$})(),X=await v(Q),{maxPages:q}=t.options,u=w?Vl:zl;return{pages:u(j.pages,X,q),pageParams:u(j.pageParams,A,q)}};if(i&&a.length){const j=i==="backward",A=j?Jl:ja,w={pages:a,pageParams:s},V=A(n,w);o=await O(w,V,j)}else{const j=e??a.length;do{const A=l===0?s[0]??n.initialPageParam:ja(n,o);if(l>0&&A==null)break;o=await O(o,A),l++}while(l<j)}return o};t.options.persister?t.fetchFn=()=>{var c,x;return(x=(c=t.options).persister)==null?void 0:x.call(c,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function ja(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 Jl(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 Te,jt,$t,kr,Or,Dt,Tr,Cr,Vs,Xl=(Vs=class{constructor(e={}){ae(this,Te);ae(this,jt);ae(this,$t);ae(this,kr);ae(this,Or);ae(this,Dt);ae(this,Tr);ae(this,Cr);G(this,Te,e.queryCache||new Ql),G(this,jt,e.mutationCache||new Zl),G(this,$t,e.defaultOptions||{}),G(this,kr,new Map),G(this,Or,new Map),G(this,Dt,0)}mount(){un(this,Dt)._++,y(this,Dt)===1&&(G(this,Tr,Zi.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,Te).onFocus())})),G(this,Cr,Fn.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,Te).onOnline())})))}unmount(){var e,t;un(this,Dt)._--,y(this,Dt)===0&&((e=y(this,Tr))==null||e.call(this),G(this,Tr,void 0),(t=y(this,Cr))==null||t.call(this),G(this,Cr,void 0))}isFetching(e){return y(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,jt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=y(this,Te).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=y(this,Te).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return y(this,Te).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=y(this,Te).get(n.queryHash),a=i==null?void 0:i.state.data,s=Il(t,a);if(s!==void 0)return y(this,Te).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Pe.batch(()=>y(this,Te).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=y(this,Te).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=y(this,Te);Pe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=y(this,Te);return Pe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Pe.batch(()=>y(this,Te).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return Pe.batch(()=>(y(this,Te).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=Pe.batch(()=>y(this,Te).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ue)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=y(this,Te).build(this,t);return r.isStaleByTime(zt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=Fa(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=Fa(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fn.isOnline()?y(this,jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,Te)}getMutationCache(){return y(this,jt)}getDefaultOptions(){return y(this,$t)}setDefaultOptions(e){G(this,$t,e)}setQueryDefaults(e,t){y(this,kr).set(Kr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,kr).values()],r={};return t.forEach(n=>{Qr(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){y(this,Or).set(Kr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Or).values()],r={};return t.forEach(n=>{Qr(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,$t).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Yi(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===An&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,$t).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,Te).clear(),y(this,jt).clear()}},Te=new WeakMap,jt=new WeakMap,$t=new WeakMap,kr=new WeakMap,Or=new WeakMap,Dt=new WeakMap,Tr=new WeakMap,Cr=new WeakMap,Vs),qe,fe,Xr,Ve,tr,_r,Rt,Pt,en,Ar,Fr,rr,nr,It,jr,ye,Nr,ki,Oi,Ti,Ci,_i,Ai,Fi,lo,Ns,ec=(Ns=class extends rn{constructor(t,r){super();ae(this,ye);ae(this,qe);ae(this,fe);ae(this,Xr);ae(this,Ve);ae(this,tr);ae(this,_r);ae(this,Rt);ae(this,Pt);ae(this,en);ae(this,Ar);ae(this,Fr);ae(this,rr);ae(this,nr);ae(this,It);ae(this,jr,new Set);this.options=r,G(this,qe,t),G(this,Pt,null),G(this,Rt,Ei()),this.options.experimental_prefetchInRender||y(this,Rt).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&&(y(this,fe).addObserver(this),$a(y(this,fe),this.options)?de(this,ye,Nr).call(this):this.updateResult(),de(this,ye,Ci).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ji(y(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ji(y(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,ye,_i).call(this),de(this,ye,Ai).call(this),y(this,fe).removeObserver(this)}setOptions(t){const r=this.options,n=y(this,fe);if(this.options=y(this,qe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Je(this.options.enabled,y(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,ye,Fi).call(this),y(this,fe).setOptions(this.options),r._defaulted&&!bi(this.options,r)&&y(this,qe).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,fe),observer:this});const i=this.hasListeners();i&&Da(y(this,fe),n,this.options,r)&&de(this,ye,Nr).call(this),this.updateResult(),i&&(y(this,fe)!==n||Je(this.options.enabled,y(this,fe))!==Je(r.enabled,y(this,fe))||zt(this.options.staleTime,y(this,fe))!==zt(r.staleTime,y(this,fe)))&&de(this,ye,ki).call(this);const a=de(this,ye,Oi).call(this);i&&(y(this,fe)!==n||Je(this.options.enabled,y(this,fe))!==Je(r.enabled,y(this,fe))||a!==y(this,It))&&de(this,ye,Ti).call(this,a)}getOptimisticResult(t){const r=y(this,qe).getQueryCache().build(y(this,qe),t),n=this.createResult(r,t);return rc(this,n)&&(G(this,Ve,n),G(this,_r,this.options),G(this,tr,y(this,fe).state)),n}getCurrentResult(){return y(this,Ve)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){y(this,jr).add(t)}getCurrentQuery(){return y(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=y(this,qe).defaultQueryOptions(t),n=y(this,qe).getQueryCache().build(y(this,qe),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return de(this,ye,Nr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Ve)))}createResult(t,r){var q;const n=y(this,fe),i=this.options,a=y(this,Ve),s=y(this,tr),o=y(this,_r),f=t!==n?t.state:y(this,Xr),{state:p}=t;let d={...p},m=!1,b;if(r._optimisticResults){const u=this.hasListeners(),$=!u&&$a(t,r),k=u&&Da(t,n,r,i);($||k)&&(d={...d,...oo(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:c,status:x}=d;b=d.data;let v=!1;if(r.placeholderData!==void 0&&b===void 0&&x==="pending"){let u;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(u=a.data,v=!0):u=typeof r.placeholderData=="function"?r.placeholderData((q=y(this,Fr))==null?void 0:q.state.data,y(this,Fr)):r.placeholderData,u!==void 0&&(x="success",b=Si(a==null?void 0:a.data,u,r),m=!0)}if(r.select&&b!==void 0&&!v)if(a&&b===(s==null?void 0:s.data)&&r.select===y(this,en))b=y(this,Ar);else try{G(this,en,r.select),b=r.select(b),b=Si(a==null?void 0:a.data,b,r),G(this,Ar,b),G(this,Pt,null)}catch(u){G(this,Pt,u)}y(this,Pt)&&(h=y(this,Pt),b=y(this,Ar),c=Date.now(),x="error");const O=d.fetchStatus==="fetching",j=x==="pending",A=x==="error",w=j&&O,V=b!==void 0,X={status:x,fetchStatus:d.fetchStatus,isPending:j,isSuccess:x==="success",isError:A,isInitialLoading:w,isLoading:w,data:b,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:c,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!j,isLoadingError:A&&!V,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&V,isStale:Ji(t,r),refetch:this.refetch,promise:y(this,Rt),isEnabled:Je(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=R=>{X.status==="error"?R.reject(X.error):X.data!==void 0&&R.resolve(X.data)},$=()=>{const R=G(this,Rt,X.promise=Ei());u(R)},k=y(this,Rt);switch(k.status){case"pending":t.queryHash===n.queryHash&&u(k);break;case"fulfilled":(X.status==="error"||X.data!==k.value)&&$();break;case"rejected":(X.status!=="error"||X.error!==k.reason)&&$();break}}return X}updateResult(){const t=y(this,Ve),r=this.createResult(y(this,fe),this.options);if(G(this,tr,y(this,fe).state),G(this,_r,this.options),y(this,tr).data!==void 0&&G(this,Fr,y(this,fe)),bi(r,t))return;G(this,Ve,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!y(this,jr).size)return!0;const s=new Set(a??y(this,jr));return this.options.throwOnError&&s.add("error"),Object.keys(y(this,Ve)).some(o=>{const l=o;return y(this,Ve)[l]!==t[l]&&s.has(l)})};de(this,ye,lo).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,ye,Ci).call(this)}},qe=new WeakMap,fe=new WeakMap,Xr=new WeakMap,Ve=new WeakMap,tr=new WeakMap,_r=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,en=new WeakMap,Ar=new WeakMap,Fr=new WeakMap,rr=new WeakMap,nr=new WeakMap,It=new WeakMap,jr=new WeakMap,ye=new WeakSet,Nr=function(t){de(this,ye,Fi).call(this);let r=y(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ue)),r},ki=function(){de(this,ye,_i).call(this);const t=zt(this.options.staleTime,y(this,fe));if(ar||y(this,Ve).isStale||!vi(t))return;const n=to(y(this,Ve).dataUpdatedAt,t)+1;G(this,rr,setTimeout(()=>{y(this,Ve).isStale||this.updateResult()},n))},Oi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,fe)):this.options.refetchInterval)??!1},Ti=function(t){de(this,ye,Ai).call(this),G(this,It,t),!(ar||Je(this.options.enabled,y(this,fe))===!1||!vi(y(this,It))||y(this,It)===0)&&G(this,nr,setInterval(()=>{(this.options.refetchIntervalInBackground||Zi.isFocused())&&de(this,ye,Nr).call(this)},y(this,It)))},Ci=function(){de(this,ye,ki).call(this),de(this,ye,Ti).call(this,de(this,ye,Oi).call(this))},_i=function(){y(this,rr)&&(clearTimeout(y(this,rr)),G(this,rr,void 0))},Ai=function(){y(this,nr)&&(clearInterval(y(this,nr)),G(this,nr,void 0))},Fi=function(){const t=y(this,qe).getQueryCache().build(y(this,qe),this.options);if(t===y(this,fe))return;const r=y(this,fe);G(this,fe,t),G(this,Xr,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lo=function(t){Pe.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(y(this,Ve))}),y(this,qe).getQueryCache().notify({query:y(this,fe),type:"observerResultsUpdated"})})},Ns);function tc(e,t){return Je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $a(e,t){return tc(e,t)||e.state.data!==void 0&&ji(e,t,t.refetchOnMount)}function ji(e,t,r){if(Je(t.enabled,e)!==!1&&zt(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ji(e,t)}return!1}function Da(e,t,r,n){return(e!==t||Je(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ji(e,r)}function Ji(e,t){return Je(t.enabled,e)!==!1&&e.isStaleByTime(zt(t.staleTime,e))}function rc(e,t){return!bi(e.getCurrentResult(),t)}var co=Ce.createContext(void 0),nc=e=>{const t=Ce.useContext(co);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ic=({client:e,children:t})=>(Ce.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(co.Provider,{value:e,children:t})),uo=Ce.createContext(!1),ac=()=>Ce.useContext(uo);uo.Provider;function sc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oc=Ce.createContext(sc()),lc=()=>Ce.useContext(oc),cc=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},uc=e=>{Ce.useEffect(()=>{e.clearReset()},[e])},pc=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Nl(r,[e.error,n])),dc=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))}},fc=(e,t)=>e.isLoading&&e.isFetching&&!t,mc=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ra=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function hc(e,t,r){var d,m,b,h,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=ac(),i=lc(),a=nc(),s=a.defaultQueryOptions(e);(m=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||m.call(d,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.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`)),s._optimisticResults=n?"isRestoring":"optimistic",dc(s),cc(s,i),uc(i);const o=!a.getQueryCache().get(s.queryHash),[l]=Ce.useState(()=>new t(a,s)),f=l.getOptimisticResult(s),p=!n&&e.subscribed!==!1;if(Ce.useSyncExternalStore(Ce.useCallback(x=>{const v=p?l.subscribe(Pe.batchCalls(x)):Ue;return l.updateResult(),v},[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Ce.useEffect(()=>{l.setOptions(s)},[s,l]),mc(s,f))throw Ra(s,l,i);if(pc({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw f.error;if((h=(b=a.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||h.call(b,s,f),s.experimental_prefetchInRender&&!ar&&fc(f,n)){const x=o?Ra(s,l,i):(c=a.getQueryCache().get(s.queryHash))==null?void 0:c.promise;x==null||x.catch(Ue).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?f:l.trackResult(f)}function gc(e,t){return hc(e,ec)}const po=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>T.jsx(I.Box,{sx:{textAlign:"center"},children:T.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});async function fo(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:f={},body:p,transform:d,dependsOn:m}=e;let b=i;if(t&&!i.startsWith("http")&&(b=`${t}${i.startsWith("/")?i:`/${i}`}`),m&&n){const A=n[m];A&&(b=b.replace(`{${m}}`,encodeURIComponent(A)))}const h=new URLSearchParams;Object.entries(f).forEach(([A,w])=>{w!=null&&h.append(A,String(w))}),h.toString()&&(b+=`${b.includes("?")?"&":"?"}${h.toString()}`);const c={"Content-Type":"application/json",...r,...l},x={method:a,headers:c};(a==="POST"||a==="PUT")&&p&&(x.body=JSON.stringify(p));const v=await fetch(b,x);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const O=await v.json();if(d)return d(Array.isArray(O)?O:O.data||O);const j=Array.isArray(O)?O:O.data||O;if(!Array.isArray(j))throw new Error("API response is not an array");return j.map(A=>({label:A[o]||A.name||A.title||String(A[s]||""),value:A[s]||A.id||A.value||""}))}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function mo(e,t,r,n,i=!1){const a=M.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=M.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],[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]);return gc({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return fo(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function Ht(e){return!!(e.apiConfig||e.api_endpoint)}function Xi(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 yc(e,t){const r=Xi(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 ho=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a})=>{const s=r[e.name],o=!!s,[l,f]=M.useState(!1),p=M.useRef(!1),d=()=>{var k;return e.required!==void 0?e.required:((k=e.validation)==null?void 0:k.required)!==void 0?e.validation.required:!1},m=k=>d()?`${k} *`:k,b=()=>e.value!==void 0?e.value:e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:"",h=M.useMemo(()=>Xi(e),[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional]),c=M.useRef(null),x=h!=null&&h.dependsOn?a==null?void 0:a[h.dependsOn]:null,v=M.useMemo(()=>{if(!(h!=null&&h.dependsOn))return!1;const k=x,R=c.current,z=k!==R;return z&&(c.current=k),z},[h==null?void 0:h.dependsOn,x]),O=M.useMemo(()=>!0,[]),j=M.useMemo(()=>l&&Ht(e)&&(!(h!=null&&h.dependsOn)||x),[l,e,h==null?void 0:h.dependsOn,x]),A=M.useMemo(()=>{if(!(h!=null&&h.dependsOn)||!a)return{};const k={};return h.dependsOn&&a[h.dependsOn]!==void 0&&(k[h.dependsOn]=a[h.dependsOn]),k},[h==null?void 0:h.dependsOn,a]),{data:w=[],isLoading:V,error:Q}=mo(h,n,i,A,j),X=M.useCallback(()=>{Ht(e)&&!p.current&&(p.current=!0,f(!0))},[e]),q=M.useCallback(()=>{Ht(e)&&!p.current&&(p.current=!0,f(!0))},[e]);M.useEffect(()=>{if(Ht(e)&&!p.current){const k=a==null?void 0:a[e.name];k!=null&&k!==""&&(p.current=!0,f(!0))}},[e,a]),M.useEffect(()=>{Ht(e)&&(h!=null&&h.dependsOn)&&v&&p.current&&(p.current=!1,f(!1))},[v,h==null?void 0:h.dependsOn]);const u=M.useCallback(()=>Ht(e)?w:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,w]);if(!O)return null;const $=()=>{switch(e.type){case"title":return T.jsx(I.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 T.jsx(I.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"text":case"email":case"password":case"tel":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsx(I.TextField,{...B,id:e.id,fullWidth:!0,label:m(e.label),type:e.type,placeholder:e.placeholder,disabled:e.disabled,error:o,helperText:s==null?void 0:s.message})});case"number":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsx(I.TextField,{...B,id:e.id,fullWidth:!0,label:m(e.label),type:"number",placeholder:e.placeholder,disabled:e.disabled,error:o,helperText:s==null?void 0:s.message,inputProps:{min:e.min,max:e.max}})});case"select":const k=u();return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsxs(I.FormControl,{fullWidth:!0,error:o||!!Q,children:[T.jsx(I.InputLabel,{id:e.id,children:m(e.label)}),T.jsx(I.Select,{...B,labelId:e.id,label:m(e.label),disabled:e.disabled||V,endAdornment:V?T.jsx(I.CircularProgress,{size:20}):void 0,onOpen:X,children:V?T.jsx(I.MenuItem,{disabled:!0,children:T.jsxs(I.Box,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[T.jsx(I.CircularProgress,{size:16}),T.jsx(I.Typography,{variant:"body2",children:"Fetching data..."})]})}):k.length>0?k.map(H=>T.jsx(I.MenuItem,{value:H.value,children:H.label},H.value)):l&&!V?T.jsx(I.MenuItem,{disabled:!0,children:T.jsx(I.Typography,{variant:"body2",color:"text.secondary",children:"No options available"})}):T.jsx(I.MenuItem,{disabled:!0,children:T.jsx(I.Typography,{variant:"body2",color:"text.secondary",children:"Click to load options"})})}),(o||Q)&&T.jsx(I.FormHelperText,{children:(s==null?void 0:s.message)||(Q==null?void 0:Q.message)})]})});case"checkbox":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsxs(I.Box,{sx:{mt:1,mb:0},children:[T.jsx(I.FormControlLabel,{control:T.jsx(I.Checkbox,{...B,id:e.id,checked:B.value,disabled:e.disabled}),label:m(e.label)}),o&&T.jsx(I.FormHelperText,{error:!0,sx:{ml:0},children:s==null?void 0:s.message})]})});case"toggle":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsxs(I.FormControl,{component:"fieldset",error:o,children:[T.jsx(I.Typography,{variant:"body2",component:"legend",sx:{mb:1},children:m(e.label)}),T.jsx(I.RadioGroup,{...B,row:!0,children:e.options.map(H=>T.jsx(I.FormControlLabel,{value:H.value,control:T.jsx(I.Radio,{}),label:H.label},H.value))}),o&&T.jsx(I.FormHelperText,{error:!0,children:s==null?void 0:s.message})]})});case"radio":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsxs(I.FormControl,{component:"fieldset",error:o,children:[T.jsx(I.Typography,{variant:"body2",component:"legend",sx:{mb:1},children:m(e.label)}),T.jsx(I.RadioGroup,{...B,children:e.options.map(H=>T.jsx(I.FormControlLabel,{value:H.value,control:T.jsx(I.Radio,{}),label:H.label},H.value))}),o&&T.jsx(I.FormHelperText,{error:!0,children:s==null?void 0:s.message})]})});case"switch":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsxs(I.Box,{sx:{mt:1,mb:0},children:[T.jsx(I.FormControlLabel,{control:T.jsx(I.Switch,{...B,id:e.id,checked:B.value,disabled:e.disabled}),label:m(e.label)}),o&&T.jsx(I.FormHelperText,{error:!0,sx:{ml:0},children:s==null?void 0:s.message})]})});case"autocomplete":const R=u(),z=!!(e.disabled||V||h!=null&&h.dependsOn&&!x);return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>{const H=B.value,ue=(()=>{if(!H)return null;const re=(h==null?void 0:h.valueField)||e.value_field||"value",ee=(h==null?void 0:h.labelField)||e.label_field||"label",D=R.find(N=>typeof N=="string"?N===H:N[re]===H||N.value===H||N.id===H);return D||(H?{[re]:H,[ee]:`Selected: ${H}`,value:H,label:`Selected: ${H}`}:null)})();return T.jsx(I.Autocomplete,{...B,id:e.id,options:R,value:ue,getOptionLabel:re=>{if(typeof re=="string")return re;const ee=(h==null?void 0:h.labelField)||e.label_field||"label";return re[ee]||re.label||re.name||""},isOptionEqualToValue:(re,ee)=>{if(!re||!ee)return!1;if(typeof re=="string"&&typeof ee=="string")return re===ee;if(typeof re=="object"&&ee){const D=(h==null?void 0:h.valueField)||e.value_field||"value";return typeof ee=="object"?re[D]===ee[D]||re.value===ee.value||re.id===ee.id:re[D]===ee||re.value===ee||re.id===ee}return!1},multiple:e.multiple,freeSolo:e.freeSolo,filterOptions:e.filterOptions===!1?()=>R:void 0,disabled:z,loading:V,onOpen:q,renderInput:re=>T.jsx(I.TextField,{...re,label:m(e.label),placeholder:z&&(h!=null&&h.dependsOn)&&!x?`Please select ${h.dependsOn.replace(/_/g," ")} first`:e.placeholder,error:o||!!Q,helperText:(s==null?void 0:s.message)||(Q==null?void 0:Q.message)||"",InputProps:{...re.InputProps,endAdornment:T.jsxs(T.Fragment,{children:[V?T.jsx(I.CircularProgress,{color:"inherit",size:20}):null,re.InputProps.endAdornment]})}}),onChange:(re,ee)=>{let D;if(ee&&typeof ee=="object"){const N=(h==null?void 0:h.valueField)||e.value_field||"value";D=ee[N]||ee.value||ee.id||ee}else D=ee;B.onChange(D)},noOptionsText:z&&(h!=null&&h.dependsOn)&&!x?`Please select ${h.dependsOn.replace(/_/g," ")} first`:V?"Fetching data...":l&&!V&&R.length===0?"No options available":"Click to load options"})}});case"date":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsx(I.TextField,{...B,id:e.name,fullWidth:!0,label:m(e.label),type:"date",disabled:e.disabled,error:o,helperText:s==null?void 0:s.message,InputLabelProps:{shrink:!0},inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return T.jsx(lt,{name:e.name,control:t,defaultValue:b(),render:({field:B})=>T.jsx(po,{src:B.value||e.defaultValue||e.src,alt:e.alt||e.label,width:e.width,height:e.height,style:e.style,className:e.className,onClick:e.onClick})});default:return null}};return T.jsx(I.Box,{children:$()})};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ri,Pa;function vc(){if(Pa)return ri;Pa=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,O){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=O};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),f=new e(s);ri={Cache:e,split:d,normalizePath:p,setter:function(v){var O=p(v);return l.get(v)||l.set(v,function(A,w){for(var V=0,Q=O.length,X=A;V<Q-1;){var q=O[V];if(q==="__proto__"||q==="constructor"||q==="prototype")return A;X=X[O[V++]]}X[O[V]]=w})},getter:function(v,O){var j=p(v);return f.get(v)||f.set(v,function(w){for(var V=0,Q=j.length;V<Q;)if(w!=null||!O)w=w[j[V++]];else return;return w})},join:function(v){return v.reduce(function(O,j){return O+(b(j)||r.test(j)?"["+j+"]":(O?".":"")+j)},"")},forEach:function(v,O,j){m(Array.isArray(v)?v:d(v),O,j)}};function p(v){return o.get(v)||o.set(v,d(v).map(function(O){return O.replace(a,"$2")}))}function d(v){return v.match(t)||[""]}function m(v,O,j){var A=v.length,w,V,Q,X;for(V=0;V<A;V++)w=v[V],w&&(x(w)&&(w='"'+w+'"'),X=b(w),Q=!X&&/^\d+$/.test(w),O.call(j,w,X,Q,V,v))}function b(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function h(v){return v.match(n)&&!v.match(r)}function c(v){return i.test(v)}function x(v){return!b(v)&&(h(v)||c(v))}return ri}var ir=vc(),ni,Ia;function xc(){if(Ia)return ni;Ia=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=p=>p.match(e)||[],r=p=>p[0].toUpperCase()+p.slice(1),n=(p,d)=>t(p).join(d).toLowerCase(),i=p=>t(p).reduce((d,m)=>`${d}${d?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return ni={words:t,upperFirst:r,camelCase:i,pascalCase:p=>r(i(p)),snakeCase:p=>n(p,"_"),kebabCase:p=>n(p,"-"),sentenceCase:p=>r(n(p," ")),titleCase:p=>t(p).map(r).join(" ")},ni}var ii=xc(),dn={exports:{}},Ma;function bc(){if(Ma)return dn.exports;Ma=1,dn.exports=function(i){return e(t(i),i)},dn.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},f=s,p=r(a),d=n(i);for(a.forEach(function(b){if(!d.has(b[0])||!d.has(b[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});f--;)l[f]||m(i[f],f,new Set);return o;function m(b,h,c){if(c.has(b)){var x;try{x=", node was:"+JSON.stringify(b)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!d.has(b))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(b));if(!l[h]){l[h]=!0;var v=p.get(b)||new Set;if(v=Array.from(v),h=v.length){c.add(b);do{var O=v[--h];m(O,d.get(O),c)}while(h);c.delete(b)}o[--s]=b}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];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,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return dn.exports}var wc=bc();const Sc=ea(wc),Ec=Object.prototype.toString,kc=Error.prototype.toString,Oc=RegExp.prototype.toString,Tc=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Cc=/^Symbol\((.*)\)(.*)$/;function _c(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function za(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _c(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Tc.call(e).replace(Cc,"Symbol($1)");const n=Ec.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+kc.call(e)+"]":n==="RegExp"?Oc.call(e):null}function Vt(e,t){let r=za(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=za(this[n],t);return a!==null?a:i},2)}function go(e){return e==null?[]:[].concat(e)}let yo,vo,xo,Ac=/\$\{\s*(\w+)\s*\}/g;yo=Symbol.toStringTag;class Va{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[yo]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],go(t).forEach(a=>{if(We.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}vo=Symbol.hasInstance;xo=Symbol.toStringTag;class We 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(Ac,(i,a)=>Vt(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Va(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xo]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,We)}static[vo](t){return Va[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let pt={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 \`${Vt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Vt(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Vt(r,!0)}\``+i}},Le={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"},Ct={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"},$i={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Di={isValue:"${path} field must be ${value}"},Sn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Fc={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"},jc={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: \`${Vt(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: \`${Vt(r,!0)}\``}return We.formatError(pt.notType,e)}};Object.assign(Object.create(null),{mixed:pt,string:Le,number:Ct,date:$i,object:Sn,array:Fc,boolean:Di,tuple:jc});const ta=e=>e&&e.__isYupSchema__;class jn{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,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new jn(t,(o,l)=>{var f;let p=s(...o)?i:a;return(f=p==null?void 0:p(l))!=null?f: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(!ta(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const fn={context:"$",value:"."};class or{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]===fn.context,this.isValue=this.key[0]===fn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?fn.context:this.isValue?fn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&ir.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}}or.prototype.__isYupRef=!0;const st=e=>e==null;function dr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:f,test:p,params:d,message:m,skipAbsent:b}=e;let{parent:h,context:c,abortEarly:x=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function O($){return or.isRef($)?$.getValue(r,h,c):$}function j($={}){const k=Object.assign({value:r,originalValue:a,label:s.spec.label,path:$.path||n,spec:s.spec,disableStackTrace:$.disableStackTrace||v},d,$.params);for(const z of Object.keys(k))k[z]=O(k[z]);const R=new We(We.formatError($.message||m,k),r,k.path,$.type||f,k.disableStackTrace);return R.params=k,R}const A=x?o:l;let w={path:n,parent:h,type:f,from:i.from,createError:j,resolve:O,options:i,originalValue:a,schema:s};const V=$=>{We.isError($)?A($):$?l(null):A(j())},Q=$=>{We.isError($)?A($):o($)};if(b&&st(r))return V(!0);let q;try{var u;if(q=p.call(w,r,w),typeof((u=q)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(V,Q)}}catch($){Q($);return}V(q)}return t.OPTIONS=e,t}function $c(e,t,r,n=r){let i,a,s;return t?(ir.forEach(t,(o,l,f)=>{let p=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",m=f?parseInt(p,10):0;if(e.innerType||d){if(d&&!f)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[m],e=d?e.spec.types[m]:e.innerType}if(!f){if(!e.fields||!e.fields[p])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[p],e=e.fields[p]}a=p,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class $n extends Set{describe(){const t=[];for(const r of this.values())t.push(or.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 $n(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(ta(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 Ge{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 $n,this._blacklist=new $n,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(pt.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(s=>{a.test(s.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&&st(a))return a;let s=Vt(t),o=Vt(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
2
2
|
|
|
3
3
|
attempted value: ${s}
|
|
4
|
-
`+(o!==s?`result of cast: ${o}`:""))}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:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let d=[];for(let p of Object.values(this.internalTests))p&&d.push(p);this.runTests({path:a,value:l,originalValue:s,options:r,tests:d},n,p=>{if(p.length)return i(p,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:d}=t,p=c=>{i||(i=!0,r(c,s))},f=c=>{i||(i=!0,n(c,s))},m=a.length,x=[];if(!m)return f([]);let h={value:s,originalValue:o,path:l,options:d,schema:this};for(let c=0;c<a.length;c++){const w=a[c];w(h,p,function(O){O&&(Array.isArray(O)?x.push(...O):x.push(O)),--m<=0&&f(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let d=n[o];const p=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,m,x)=>this.resolve(p)._validate(d,p,m,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((s,o)=>i._validate(t,r,(l,d)=>{We.isError(l)&&(l.value=d),o(l)},(l,d)=>{l.length?o(new We(l,d,void 0,void 0,a)):s(d)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw We.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new We(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(We.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(We.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=dr({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=dr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=pt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=pt.notNull){return this.nullability(!1,t)}required(t=pt.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=pt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=dr(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(s=>!(s.OPTIONS.name===r.name&&(a||s.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=go(t).map(a=>new or(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new jn(i,r):jn.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=dr({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=pt.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=dr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=pt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=dr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!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:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,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,d,p)=>p.findIndex(f=>f.name===l.name)===d)}}}Ge.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ge.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=$c(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Ge.prototype[e]=Ge.prototype.oneOf;for(const e of["not","nope"])Ge.prototype[e]=Ge.prototype.notOneOf;const Dc=()=>!0;function bo(e){return new wo(e)}class wo extends Ge{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Dc},t))}}bo.prototype=wo.prototype;function So(){return new Eo}class Eo extends Ge{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=Di.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return st(r)||r===!0}})}isFalse(t=Di.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return st(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)}}So.prototype=Eo.prototype;const Rc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Pc(e){const t=Ri(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 Ri(e){var t,r;const n=Rc.exec(e);return n?{year:yt(n[1]),month:yt(n[2],1)-1,day:yt(n[3],1),hour:yt(n[4]),minute:yt(n[5]),second:yt(n[6]),millisecond:n[7]?yt(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:yt(n[10]),minuteOffset:yt(n[11])}:null}function yt(e,t=0){return Number(e)||t}let Ic=/^[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])?)*$/,Mc=/^((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,zc=/^(?:[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,Vc="^\\d{4}-\\d{2}-\\d{2}",Nc="\\d{2}:\\d{2}:\\d{2}",Lc="(([+-]\\d{2}(:?\\d{2})?)|Z)",qc=new RegExp(`${Vc}T${Nc}(\\.\\d+)?${Lc}$`),Bc=e=>st(e)||e===e.trim(),Uc={}.toString();function Lr(){return new ko}class ko extends Ge{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===Uc?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||pt.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=Le.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=Le.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=Le.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||Le.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=Le.email){return this.matches(Ic,{name:"email",message:t,excludeEmptyString:!0})}url(t=Le.url){return this.matches(Mc,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Le.uuid){return this.matches(zc,{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(qc,{name:"datetime",message:r||Le.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Le.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Ri(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||Le.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Ri(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Le.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Bc})}lowercase(t=Le.lowercase){return this.transform(r=>st(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>st(r)||r===r.toLowerCase()})}uppercase(t=Le.uppercase){return this.transform(r=>st(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>st(r)||r===r.toUpperCase()})}}Lr.prototype=ko.prototype;let Wc=e=>e!=+e;function Oo(){return new To}class To extends Ge{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Wc(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=Ct.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=Ct.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=Ct.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=Ct.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Ct.positive){return this.moreThan(0,t)}negative(t=Ct.negative){return this.lessThan(0,t)}integer(t=Ct.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>st(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=>st(i)?i:Math[t](i))}}Oo.prototype=To.prototype;let Co=new Date(""),Hc=e=>Object.prototype.toString.call(e)==="[object Date]";function ra(){return new nn}class nn extends Ge{constructor(){super({type:"date",check(t){return Hc(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Pc(t),isNaN(t)?nn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(or.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=$i.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=$i.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)}})}}nn.INVALID_DATE=Co;ra.prototype=nn.prototype;ra.INVALID_DATE=Co;function Kc(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=ir.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),or.isRef(o)&&o.isSibling?a(o.path,s):ta(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Sc.array(Array.from(n),r).reverse()}function Na(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 _o(e){return(t,r)=>Na(e,t)-Na(e,r)}const Qc=(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 En(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=En(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=En(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(En)}):"optional"in e?e.optional():e}const Gc=(e,t)=>{const r=[...ir.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=ir.getter(ir.join(r),!0)(e);return!!(i&&n in i)};let La=e=>Object.prototype.toString.call(e)==="[object Object]";function qa(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Yc=_o([]);function Ao(e){return new Fo(e)}class Fo extends Ge{constructor(t){super({type:"object",check(r){return La(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Yc,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,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),l={},d=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),p=!1;for(const f of o){let m=a[f],x=f in i;if(m){let h,c=i[f];d.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:c,context:r.context,parent:l});let w=m instanceof Ge?m.spec:void 0,y=w==null?void 0:w.strict;if(w!=null&&w.strip){p=p||f in i;continue}h=!r.__validating||!y?m.cast(i[f],d):i[f],h!==void 0&&(l[f]=h)}else x&&!s&&(l[f]=i[f]);(x!==f in l||l[f]!==i[f])&&(p=!0)}return p?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,d)=>{if(!o||!La(d)){i(l,d);return}s=s||d;let p=[];for(let f of this._nodes){let m=this.fields[f];!m||or.isRef(m)||p.push(m.asNestedTest({options:r,key:f,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:p,value:d,originalValue:s,options:r},n,f=>{i(f.sort(this._sortErrors).concat(l),d)})})}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 s=n[i];n[i]=s===void 0?a:s}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 s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Kc(t,r),n._sortErrors=_o(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 En(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=ir.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return Gc(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Qc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Sn.exact,test(r){if(r==null)return!0;const n=qa(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Sn.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=qa(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Sn.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(ii.camelCase)}snakeCase(){return this.transformKeys(ii.snakeCase)}constantCase(){return this.transformKeys(t=>ii.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}Ao.prototype=Fo.prototype;const jo=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=Lr(),r.validation?n=Wt(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=Lr().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=Wt(n,r,"string"));break;case"password":n=Lr(),r.validation?n=Wt(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=Oo().typeError(`${r.label} must be a number`),r.validation?n=Wt(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=Lr(),r.validation&&(n=Wt(n,r,"string"));break;case"checkbox":n=So(),r.validation&&(n=Wt(n,r,"boolean"));break;case"date":n=ra().typeError(`${r.label} must be a valid date`),r.validation?n=Wt(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=bo()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),Ao().shape(t)},Wt=(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,s=>s?i.test(s):!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},$o=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=Array.from({length:t},(p,f)=>f+1),o=p=>a.includes(p),l=p=>p===e||o(p)||p===e+1&&o(e),d=p=>n[p-1]?n[p-1]:`Step ${p}`;return T.jsx(I.Box,{sx:{mb:3},children:T.jsx(I.Stepper,{activeStep:e-1,orientation:"horizontal",children:s.map(p=>T.jsx(I.Step,{completed:o(p),children:T.jsx(I.StepLabel,{onClick:()=>l(p)&&r(p),sx:{cursor:l(p)?"pointer":"default","&:hover":l(p)?{opacity:.7}:{}},children:i&&T.jsx(I.Typography,{variant:"body2",component:"span",children:d(p)})})},p))})})},Do=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const d=o.position==="right"||o.text.toLowerCase().includes("submit")||o.text.toLowerCase().includes("save")||o.text.toLowerCase().includes("next"),p=o.position==="left"||o.text.toLowerCase().includes("cancel")||o.text.toLowerCase().includes("back")||o.text.toLowerCase().includes("draft"),f=d?"submit":"button",m=p?"outlined":"contained",x=o.disabled||t,h=c=>c&&["primary","secondary","error","info","success","warning"].includes(c)?c:"primary";return T.jsxs(I.Button,{type:f,variant:m,color:h(o.color),size:o.size||"large",disabled:x,onClick:f==="button"?()=>r(o):void 0,sx:o.sx,children:[o.loading&&T.jsx(I.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return T.jsxs(I.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[T.jsx(I.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),T.jsx(I.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),T.jsx(I.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},Zc=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:d="horizontal",spacing:p=2,sx:f}=e,m=y=>{let O="button",$="contained";return y.type?O=y.type:y.text.toLowerCase().includes("submit")||y.text.toLowerCase().includes("save")||y.text.toLowerCase().includes("next")?O="submit":(y.text.toLowerCase().includes("reset")||y.text.toLowerCase().includes("clear"))&&(O="reset"),(y.text.toLowerCase().includes("cancel")||y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("draft"))&&($="outlined"),{buttonType:O,buttonVariant:$}},x=y=>["primary","secondary","error","warning","info","success"].includes(y||"")?y:"primary",h=y=>{const{buttonType:O}=m(y);y.onClick?y.onClick():O==="submit"&&t?t(s):a&&r&&(y.text.toLowerCase().includes("next")?r(n+1,i):(y.text.toLowerCase().includes("back")||y.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(y,O)=>{const{buttonType:$,buttonVariant:F}=m(y),b=x(y.color);return T.jsx(I.Button,{type:$,variant:F,color:b,size:y.size||"medium",disabled:y.disabled,onClick:()=>h(y),sx:y.sx,children:y.text},O)},w=()=>{const y={display:"flex",gap:p,...f};switch(l){case"left":return{...y,justifyContent:"flex-start"};case"center":return{...y,justifyContent:"center"};case"right":return{...y,justifyContent:"flex-end"};case"space-between":return{...y,justifyContent:"space-between"};default:return{...y,justifyContent:"flex-end"}}};return d==="vertical"?T.jsx(I.Box,{sx:w(),children:o.map((y,O)=>T.jsx(I.Box,{sx:{width:"100%"},children:c(y,O)},O))}):T.jsx(I.Box,{sx:w(),children:T.jsx(I.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((y,O)=>c(y,O))})})},Jc=new Xl({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Xc=e=>T.jsx(ic,{client:Jc,children:T.jsx(eu,{...e})}),eu=({id:e,theme:t,fields:r,onSubmit:n,submitButtonText:i="Submit",onSubmitClick:a,defaultValues:s,showSubmitButton:o=!0,buttons:l,buttonGroup:d,baseUrl:p,apiHeaders:f})=>{var ee,R;const m=[...new Set(r.map(C=>C.step).filter(C=>C!=null&&C>0))].sort((C,re)=>(C||0)-(re||0)),x=m.length>1,h=m.length||1,[c,w]=M.useState(1),y=x?r.filter(C=>C.step===c):r,O=jo(y),{control:$,handleSubmit:F,formState:{errors:b},watch:V,trigger:K}=$l({resolver:Pl(O),mode:"onChange",defaultValues:s}),Y=V(),W=async()=>{if(!x)return!0;const C=r.filter(J=>J.step===c);for(const J of C)if(J.required){const Q=Y[J.name];let te=!0;if(J.type==="checkbox"?te=Q===!0:te=Q!=null&&Q!=="",!te)return!1}return await K()?!0:Object.keys(b).filter(Q=>C.some(te=>te.name===Q)).map(Q=>{const te=b[Q];return typeof(te==null?void 0:te.message)=="string"?te.message:`${Q} is invalid`}).length===0},u=M.useMemo(()=>{if(!x)return!0;const C=r.filter(J=>J.step===c);for(const J of C)if(J.required){const Q=Y[J.name];let te=!0;if(J.type==="checkbox"?te=Q===!0:te=Q!=null&&Q!=="",!te)return!1}return Object.keys(b).filter(J=>C.some(Q=>Q.name===J)).length===0},[x,c,r,Y,b]),D=async C=>{C<1||C>h||C>c&&x&&!await W()||w(C)},k=async C=>{if(x&&c<h){console.warn("Form submission attempted on non-final step");return}a&&a(C),n(C)},P=async C=>{C&&(C.preventDefault(),C.stopPropagation()),x&&c<h&&await W()&&D(c+1)},z=C=>{C&&(C.preventDefault(),C.stopPropagation()),x&&c>1&&D(c-1)},L=C=>C.col?C.col:(C.xs||C.sm||C.md||C.lg||C.xl)&&(C.xs||C.sm||C.md||C.lg||C.xl)||12,U=t?I.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:((ee=t.typography)==null?void 0:ee.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((R=t.typography)==null?void 0:R.fontSize)=="number"?t.typography.fontSize:14}}):void 0,ue=()=>d&&d.buttons&&d.buttons.length>0?T.jsx(I.Box,{sx:{mt:3},children:T.jsx(Zc,{config:d,onSubmit:k,onStepChange:D,currentStep:c,totalSteps:h,isMultiStep:x,formData:Y})}):l&&l.length>0?T.jsx(Do,{buttons:l}):o?T.jsx(I.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:T.jsxs(I.Box,{sx:{display:"flex",gap:2},children:[x&&c>1&&T.jsx(I.Button,{type:"button",variant:"outlined",onClick:z,children:"Previous"}),x?c<h?T.jsx(I.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!u,onClick:P,children:"Next"}):T.jsx(I.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!u,children:i}):T.jsx(I.Button,{type:"submit",variant:"contained",color:"primary",size:"large",children:i})]})}):null,X=T.jsxs(I.Box,{component:"form",onSubmit:C=>{if(x&&c<h){C.preventDefault(),C.stopPropagation(),u&&P();return}F(k)(C)},id:e,onKeyDown:C=>{C.key==="Enter"&&x&&c<h&&(C.preventDefault(),u&&P())},children:[x&&T.jsx($o,{currentStep:c,totalSteps:h,onStepChange:D}),T.jsx(I.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2},children:y.map(C=>{const re=L(C);return T.jsx(I.Box,{sx:{gridColumn:`span ${re}`},children:T.jsx(ho,{field:C,control:$,errors:b,baseUrl:p,apiHeaders:f,formData:Y})},C.name)})}),ue()]});return U?T.jsx(I.ThemeProvider,{theme:U,children:X}):X},Ba=e=>e,tu=()=>{let e=Ba;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ba}}},ru=tu();function Nt(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 sr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var mn={exports:{}},hn={exports:{}},me={};/** @license React v16.13.1
|
|
4
|
+
`+(o!==s?`result of cast: ${o}`:""))}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:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let f=[];for(let p of Object.values(this.internalTests))p&&f.push(p);this.runTests({path:a,value:l,originalValue:s,options:r,tests:f},n,p=>{if(p.length)return i(p,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:f}=t,p=c=>{i||(i=!0,r(c,s))},d=c=>{i||(i=!0,n(c,s))},m=a.length,b=[];if(!m)return d([]);let h={value:s,originalValue:o,path:l,options:f,schema:this};for(let c=0;c<a.length;c++){const x=a[c];x(h,p,function(O){O&&(Array.isArray(O)?b.push(...O):b.push(O)),--m<=0&&d(b)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let f=n[o];const p=Object.assign({},s,{strict:!0,parent:n,value:f,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(d,m,b)=>this.resolve(p)._validate(f,p,m,b)}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((s,o)=>i._validate(t,r,(l,f)=>{We.isError(l)&&(l.value=f),o(l)},(l,f)=>{l.length?o(new We(l,f,void 0,void 0,a)):s(f)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw We.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new We(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(We.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(We.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=dr({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=dr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=pt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=pt.notNull){return this.nullability(!1,t)}required(t=pt.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=pt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=dr(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(s=>!(s.OPTIONS.name===r.name&&(a||s.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=go(t).map(a=>new or(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new jn(i,r):jn.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=dr({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=pt.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=dr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=pt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=dr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!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:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,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,f,p)=>p.findIndex(d=>d.name===l.name)===f)}}}Ge.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ge.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=$c(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Ge.prototype[e]=Ge.prototype.oneOf;for(const e of["not","nope"])Ge.prototype[e]=Ge.prototype.notOneOf;const Dc=()=>!0;function bo(e){return new wo(e)}class wo extends Ge{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Dc},t))}}bo.prototype=wo.prototype;function So(){return new Eo}class Eo extends Ge{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=Di.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return st(r)||r===!0}})}isFalse(t=Di.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return st(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)}}So.prototype=Eo.prototype;const Rc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Pc(e){const t=Ri(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 Ri(e){var t,r;const n=Rc.exec(e);return n?{year:yt(n[1]),month:yt(n[2],1)-1,day:yt(n[3],1),hour:yt(n[4]),minute:yt(n[5]),second:yt(n[6]),millisecond:n[7]?yt(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:yt(n[10]),minuteOffset:yt(n[11])}:null}function yt(e,t=0){return Number(e)||t}let Ic=/^[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])?)*$/,Mc=/^((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,zc=/^(?:[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,Vc="^\\d{4}-\\d{2}-\\d{2}",Nc="\\d{2}:\\d{2}:\\d{2}",Lc="(([+-]\\d{2}(:?\\d{2})?)|Z)",qc=new RegExp(`${Vc}T${Nc}(\\.\\d+)?${Lc}$`),Bc=e=>st(e)||e===e.trim(),Uc={}.toString();function Lr(){return new ko}class ko extends Ge{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===Uc?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||pt.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=Le.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=Le.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=Le.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||Le.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=Le.email){return this.matches(Ic,{name:"email",message:t,excludeEmptyString:!0})}url(t=Le.url){return this.matches(Mc,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Le.uuid){return this.matches(zc,{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(qc,{name:"datetime",message:r||Le.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Le.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Ri(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||Le.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Ri(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Le.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Bc})}lowercase(t=Le.lowercase){return this.transform(r=>st(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>st(r)||r===r.toLowerCase()})}uppercase(t=Le.uppercase){return this.transform(r=>st(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>st(r)||r===r.toUpperCase()})}}Lr.prototype=ko.prototype;let Wc=e=>e!=+e;function Oo(){return new To}class To extends Ge{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Wc(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=Ct.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=Ct.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=Ct.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=Ct.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Ct.positive){return this.moreThan(0,t)}negative(t=Ct.negative){return this.lessThan(0,t)}integer(t=Ct.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>st(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=>st(i)?i:Math[t](i))}}Oo.prototype=To.prototype;let Co=new Date(""),Hc=e=>Object.prototype.toString.call(e)==="[object Date]";function ra(){return new nn}class nn extends Ge{constructor(){super({type:"date",check(t){return Hc(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Pc(t),isNaN(t)?nn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(or.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=$i.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=$i.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)}})}}nn.INVALID_DATE=Co;ra.prototype=nn.prototype;ra.INVALID_DATE=Co;function Kc(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=ir.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),or.isRef(o)&&o.isSibling?a(o.path,s):ta(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Sc.array(Array.from(n),r).reverse()}function Na(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 _o(e){return(t,r)=>Na(e,t)-Na(e,r)}const Qc=(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 En(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=En(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=En(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(En)}):"optional"in e?e.optional():e}const Gc=(e,t)=>{const r=[...ir.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=ir.getter(ir.join(r),!0)(e);return!!(i&&n in i)};let La=e=>Object.prototype.toString.call(e)==="[object Object]";function qa(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Yc=_o([]);function Ao(e){return new Fo(e)}class Fo extends Ge{constructor(t){super({type:"object",check(r){return La(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Yc,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,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),l={},f=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),p=!1;for(const d of o){let m=a[d],b=d in i;if(m){let h,c=i[d];f.path=(r.path?`${r.path}.`:"")+d,m=m.resolve({value:c,context:r.context,parent:l});let x=m instanceof Ge?m.spec:void 0,v=x==null?void 0:x.strict;if(x!=null&&x.strip){p=p||d in i;continue}h=!r.__validating||!v?m.cast(i[d],f):i[d],h!==void 0&&(l[d]=h)}else b&&!s&&(l[d]=i[d]);(b!==d in l||l[d]!==i[d])&&(p=!0)}return p?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,f)=>{if(!o||!La(f)){i(l,f);return}s=s||f;let p=[];for(let d of this._nodes){let m=this.fields[d];!m||or.isRef(m)||p.push(m.asNestedTest({options:r,key:d,parent:f,parentPath:r.path,originalParent:s}))}this.runTests({tests:p,value:f,originalValue:s,options:r},n,d=>{i(d.sort(this._sortErrors).concat(l),f)})})}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 s=n[i];n[i]=s===void 0?a:s}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 s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Kc(t,r),n._sortErrors=_o(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 En(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=ir.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return Gc(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Qc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Sn.exact,test(r){if(r==null)return!0;const n=qa(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Sn.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=qa(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Sn.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(ii.camelCase)}snakeCase(){return this.transformKeys(ii.snakeCase)}constantCase(){return this.transformKeys(t=>ii.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}Ao.prototype=Fo.prototype;const jo=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=Lr(),r.validation?n=Wt(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=Lr().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=Wt(n,r,"string"));break;case"password":n=Lr(),r.validation?n=Wt(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=Oo().typeError(`${r.label} must be a number`),r.validation?n=Wt(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=Lr(),r.validation&&(n=Wt(n,r,"string"));break;case"checkbox":n=So(),r.validation&&(n=Wt(n,r,"boolean"));break;case"date":n=ra().typeError(`${r.label} must be a valid date`),r.validation?n=Wt(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=bo()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),Ao().shape(t)},Wt=(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,s=>s?i.test(s):!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},$o=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=Array.from({length:t},(p,d)=>d+1),o=p=>a.includes(p),l=p=>p===e||o(p)||p===e+1&&o(e),f=p=>n[p-1]?n[p-1]:`Step ${p}`;return T.jsx(I.Box,{sx:{mb:3},children:T.jsx(I.Stepper,{activeStep:e-1,orientation:"horizontal",children:s.map(p=>T.jsx(I.Step,{completed:o(p),children:T.jsx(I.StepLabel,{onClick:()=>l(p)&&r(p),sx:{cursor:l(p)?"pointer":"default","&:hover":l(p)?{opacity:.7}:{}},children:i&&T.jsx(I.Typography,{variant:"body2",component:"span",children:f(p)})})},p))})})},Do=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const f=o.position==="right"||o.text.toLowerCase().includes("submit")||o.text.toLowerCase().includes("save")||o.text.toLowerCase().includes("next"),p=o.position==="left"||o.text.toLowerCase().includes("cancel")||o.text.toLowerCase().includes("back")||o.text.toLowerCase().includes("draft"),d=f?"submit":"button",m=p?"outlined":"contained",b=o.disabled||t,h=c=>c&&["primary","secondary","error","info","success","warning"].includes(c)?c:"primary";return T.jsxs(I.Button,{type:d,variant:m,color:h(o.color),size:o.size||"large",disabled:b,onClick:d==="button"?()=>r(o):void 0,sx:o.sx,children:[o.loading&&T.jsx(I.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return T.jsxs(I.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[T.jsx(I.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),T.jsx(I.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),T.jsx(I.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},Zc=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:f="horizontal",spacing:p=2,sx:d}=e,m=v=>{let O="button",j="contained";return v.type?O=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?O="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(O="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(j="outlined"),{buttonType:O,buttonVariant:j}},b=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",h=v=>{const{buttonType:O}=m(v);v.onClick?v.onClick():O==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(v,O)=>{const{buttonType:j,buttonVariant:A}=m(v),w=b(v.color);return T.jsx(I.Button,{type:j,variant:A,color:w,size:v.size||"medium",disabled:v.disabled,onClick:()=>h(v),sx:v.sx,children:v.text},O)},x=()=>{const v={display:"flex",gap:p,...d};switch(l){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return f==="vertical"?T.jsx(I.Box,{sx:x(),children:o.map((v,O)=>T.jsx(I.Box,{sx:{width:"100%"},children:c(v,O)},O))}):T.jsx(I.Box,{sx:x(),children:T.jsx(I.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,O)=>c(v,O))})})},Jc=new Xl({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Xc=e=>T.jsx(ic,{client:Jc,children:T.jsx(eu,{...e})}),eu=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:l=!0,buttons:f,buttonGroup:p,baseUrl:d,apiHeaders:m})=>{var D,N;const b=[...new Set(r.map(P=>P.step).filter(P=>P!=null&&P>0))].sort((P,ne)=>(P||0)-(ne||0)),h=b.length>1,c=b.length||1,[x,v]=M.useState(1),O=h?r.filter(P=>P.step===x):r,j=jo(O),{control:A,handleSubmit:w,formState:{errors:V},watch:Q,trigger:X}=$l({resolver:Pl(j),mode:"onChange",defaultValues:o}),q=Q();M.useEffect(()=>{i&&i(q)},[q,i]);const u=async()=>{if(!h)return!0;const P=r.filter(Y=>Y.step===x);for(const Y of P)if(Y.required){const te=q[Y.name];let Z=!0;if(Y.type==="checkbox"?Z=te===!0:Z=te!=null&&te!=="",!Z)return!1}return await X()?!0:Object.keys(V).filter(te=>P.some(Z=>Z.name===te)).map(te=>{const Z=V[te];return typeof(Z==null?void 0:Z.message)=="string"?Z.message:`${te} is invalid`}).length===0},$=M.useMemo(()=>{if(!h)return!0;const P=r.filter(Y=>Y.step===x);for(const Y of P)if(Y.required){const te=q[Y.name];let Z=!0;if(Y.type==="checkbox"?Z=te===!0:Z=te!=null&&te!=="",!Z)return!1}return Object.keys(V).filter(Y=>P.some(te=>te.name===Y)).length===0},[h,x,r,q,V]),k=async P=>{P<1||P>c||P>x&&h&&!await u()||v(P)},R=async P=>{if(h&&x<c){console.warn("Form submission attempted on non-final step");return}s&&s(P),n(P)},z=async P=>{P&&(P.preventDefault(),P.stopPropagation()),h&&x<c&&await u()&&k(x+1)},B=P=>{P&&(P.preventDefault(),P.stopPropagation()),h&&x>1&&k(x-1)},H=P=>P.col?P.col:(P.xs||P.sm||P.md||P.lg||P.xl)&&(P.xs||P.sm||P.md||P.lg||P.xl)||12,ue=t?I.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:((D=t.typography)==null?void 0:D.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((N=t.typography)==null?void 0:N.fontSize)=="number"?t.typography.fontSize:14}}):void 0,re=()=>p&&p.buttons&&p.buttons.length>0?T.jsx(I.Box,{sx:{mt:3},children:T.jsx(Zc,{config:p,onSubmit:R,onStepChange:k,currentStep:x,totalSteps:c,isMultiStep:h,formData:q})}):f&&f.length>0?T.jsx(Do,{buttons:f}):l?T.jsx(I.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:T.jsxs(I.Box,{sx:{display:"flex",gap:2},children:[h&&x>1&&T.jsx(I.Button,{type:"button",variant:"outlined",onClick:B,children:"Previous"}),h?x<c?T.jsx(I.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!$,onClick:z,children:"Next"}):T.jsx(I.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!$,children:a}):T.jsx(I.Button,{type:"submit",variant:"contained",color:"primary",size:"large",children:a})]})}):null,ee=T.jsxs(I.Box,{component:"form",onSubmit:P=>{if(h&&x<c){P.preventDefault(),P.stopPropagation(),$&&z();return}w(R)(P)},id:e,onKeyDown:P=>{P.key==="Enter"&&h&&x<c&&(P.preventDefault(),$&&z())},children:[h&&T.jsx($o,{currentStep:x,totalSteps:c,onStepChange:k}),T.jsx(I.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2},children:O.map(P=>{const ne=H(P);return T.jsx(I.Box,{sx:{gridColumn:`span ${ne}`},children:T.jsx(ho,{field:P,control:A,errors:V,baseUrl:d,apiHeaders:m,formData:q})},P.name)})}),re()]});return ue?T.jsx(I.ThemeProvider,{theme:ue,children:ee}):ee},Ba=e=>e,tu=()=>{let e=Ba;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ba}}},ru=tu();function Nt(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 sr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var mn={exports:{}},hn={exports:{}},me={};/** @license React v16.13.1
|
|
5
5
|
* react-is.production.min.js
|
|
6
6
|
*
|
|
7
7
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var Ua;function nu(){if(Ua)return me;Ua=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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,
|
|
11
|
+
*/var Ua;function nu(){if(Ua)return me;Ua=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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(w){if(typeof w=="object"&&w!==null){var V=w.$$typeof;switch(V){case t:switch(w=w.type,w){case l:case f:case n:case a:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case o:case p:case h:case b:case s:return w;default:return V}}case r:return V}}}function A(w){return j(w)===f}return me.AsyncMode=l,me.ConcurrentMode=f,me.ContextConsumer=o,me.ContextProvider=s,me.Element=t,me.ForwardRef=p,me.Fragment=n,me.Lazy=h,me.Memo=b,me.Portal=r,me.Profiler=a,me.StrictMode=i,me.Suspense=d,me.isAsyncMode=function(w){return A(w)||j(w)===l},me.isConcurrentMode=A,me.isContextConsumer=function(w){return j(w)===o},me.isContextProvider=function(w){return j(w)===s},me.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},me.isForwardRef=function(w){return j(w)===p},me.isFragment=function(w){return j(w)===n},me.isLazy=function(w){return j(w)===h},me.isMemo=function(w){return j(w)===b},me.isPortal=function(w){return j(w)===r},me.isProfiler=function(w){return j(w)===a},me.isStrictMode=function(w){return j(w)===i},me.isSuspense=function(w){return j(w)===d},me.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===f||w===a||w===i||w===d||w===m||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===b||w.$$typeof===s||w.$$typeof===o||w.$$typeof===p||w.$$typeof===x||w.$$typeof===v||w.$$typeof===O||w.$$typeof===c)},me.typeOf=j,me}var he={};/** @license React v16.13.1
|
|
12
12
|
* react-is.development.js
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Wa;function iu(){return Wa||(Wa=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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,
|
|
18
|
+
*/var Wa;function iu(){return Wa||(Wa=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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(L){return typeof L=="string"||typeof L=="function"||L===n||L===f||L===a||L===i||L===d||L===m||typeof L=="object"&&L!==null&&(L.$$typeof===h||L.$$typeof===b||L.$$typeof===s||L.$$typeof===o||L.$$typeof===p||L.$$typeof===x||L.$$typeof===v||L.$$typeof===O||L.$$typeof===c)}function A(L){if(typeof L=="object"&&L!==null){var Me=L.$$typeof;switch(Me){case t:var ot=L.type;switch(ot){case l:case f:case n:case a:case i:case d:return ot;default:var Et=ot&&ot.$$typeof;switch(Et){case o:case p:case h:case b:case s:return Et;default:return Me}}case r:return Me}}}var w=l,V=f,Q=o,X=s,q=t,u=p,$=n,k=h,R=b,z=r,B=a,H=i,ue=d,re=!1;function ee(L){return re||(re=!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.")),D(L)||A(L)===l}function D(L){return A(L)===f}function N(L){return A(L)===o}function P(L){return A(L)===s}function ne(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function Y(L){return A(L)===p}function te(L){return A(L)===n}function Z(L){return A(L)===h}function se(L){return A(L)===b}function ce(L){return A(L)===r}function pe(L){return A(L)===a}function oe(L){return A(L)===i}function _e(L){return A(L)===d}he.AsyncMode=w,he.ConcurrentMode=V,he.ContextConsumer=Q,he.ContextProvider=X,he.Element=q,he.ForwardRef=u,he.Fragment=$,he.Lazy=k,he.Memo=R,he.Portal=z,he.Profiler=B,he.StrictMode=H,he.Suspense=ue,he.isAsyncMode=ee,he.isConcurrentMode=D,he.isContextConsumer=N,he.isContextProvider=P,he.isElement=ne,he.isForwardRef=Y,he.isFragment=te,he.isLazy=Z,he.isMemo=se,he.isPortal=ce,he.isProfiler=pe,he.isStrictMode=oe,he.isSuspense=_e,he.isValidElementType=j,he.typeOf=A}()),he}var Ha;function Ro(){return Ha||(Ha=1,process.env.NODE_ENV==="production"?hn.exports=nu():hn.exports=iu()),hn.exports}/*
|
|
19
19
|
object-assign
|
|
20
20
|
(c) Sindre Sorhus
|
|
21
21
|
@license MIT
|
|
22
|
-
*/var ai,Ka;function au(){if(Ka)return ai;Ka=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 s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(p){return s[p]});if(l.join("")!=="0123456789")return!1;var
|
|
23
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
22
|
+
*/var ai,Ka;function au(){if(Ka)return ai;Ka=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 s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(p){return s[p]});if(l.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(p){f[p]=p}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ai=i()?Object.assign:function(a,s){for(var o,l=n(a),f,p=1;p<arguments.length;p++){o=Object(arguments[p]);for(var d in o)t.call(o,d)&&(l[d]=o[d]);if(e){f=e(o);for(var m=0;m<f.length;m++)r.call(o,f[m])&&(l[f[m]]=o[f[m]])}}return l},ai}var si,Qa;function na(){if(Qa)return si;Qa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return si=e,si}var oi,Ga;function Po(){return Ga||(Ga=1,oi=Function.call.bind(Object.prototype.hasOwnProperty)),oi}var li,Ya;function su(){if(Ya)return li;Ya=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=na(),r={},n=Po();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,l,f){if(process.env.NODE_ENV!=="production"){for(var p in a)if(n(a,p)){var d;try{if(typeof a[p]!="function"){var m=Error((l||"React class")+": "+o+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=a[p](s,p,l,o,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+p+"` 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 b=f?f():"";e("Failed "+o+" type: "+d.message+(b??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},li=i,li}var ci,Za;function ou(){if(Za)return ci;Za=1;var e=Ro(),t=au(),r=na(),n=Po(),i=su(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return ci=function(o,l){var f=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function d(D){var N=D&&(f&&D[f]||D[p]);if(typeof N=="function")return N}var m="<<anonymous>>",b={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:O(),arrayOf:j,element:A(),elementType:w(),instanceOf:V,node:u(),objectOf:X,oneOf:Q,oneOfType:q,shape:k,exact:R};function h(D,N){return D===N?D!==0||1/D===1/N:D!==D&&N!==N}function c(D,N){this.message=D,this.data=N&&typeof N=="object"?N:{},this.stack=""}c.prototype=Error.prototype;function x(D){if(process.env.NODE_ENV!=="production")var N={},P=0;function ne(te,Z,se,ce,pe,oe,_e){if(ce=ce||m,oe=oe||se,_e!==r){if(l){var L=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 L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Me=ce+":"+se;!N[Me]&&P<3&&(a("You are manually calling a React.PropTypes validation function for the `"+oe+"` 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."),N[Me]=!0,P++)}}return Z[se]==null?te?Z[se]===null?new c("The "+pe+" `"+oe+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new c("The "+pe+" `"+oe+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:D(Z,se,ce,pe,oe)}var Y=ne.bind(null,!1);return Y.isRequired=ne.bind(null,!0),Y}function v(D){function N(P,ne,Y,te,Z,se){var ce=P[ne],pe=H(ce);if(pe!==D){var oe=ue(ce);return new c("Invalid "+te+" `"+Z+"` of type "+("`"+oe+"` supplied to `"+Y+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return x(N)}function O(){return x(s)}function j(D){function N(P,ne,Y,te,Z){if(typeof D!="function")return new c("Property `"+Z+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var se=P[ne];if(!Array.isArray(se)){var ce=H(se);return new c("Invalid "+te+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+Y+"`, expected an array."))}for(var pe=0;pe<se.length;pe++){var oe=D(se,pe,Y,te,Z+"["+pe+"]",r);if(oe instanceof Error)return oe}return null}return x(N)}function A(){function D(N,P,ne,Y,te){var Z=N[P];if(!o(Z)){var se=H(Z);return new c("Invalid "+Y+" `"+te+"` of type "+("`"+se+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return x(D)}function w(){function D(N,P,ne,Y,te){var Z=N[P];if(!e.isValidElementType(Z)){var se=H(Z);return new c("Invalid "+Y+" `"+te+"` of type "+("`"+se+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return x(D)}function V(D){function N(P,ne,Y,te,Z){if(!(P[ne]instanceof D)){var se=D.name||m,ce=ee(P[ne]);return new c("Invalid "+te+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+Y+"`, expected ")+("instance of `"+se+"`."))}return null}return x(N)}function Q(D){if(!Array.isArray(D))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.")),s;function N(P,ne,Y,te,Z){for(var se=P[ne],ce=0;ce<D.length;ce++)if(h(se,D[ce]))return null;var pe=JSON.stringify(D,function(_e,L){var Me=ue(L);return Me==="symbol"?String(L):L});return new c("Invalid "+te+" `"+Z+"` of value `"+String(se)+"` "+("supplied to `"+Y+"`, expected one of "+pe+"."))}return x(N)}function X(D){function N(P,ne,Y,te,Z){if(typeof D!="function")return new c("Property `"+Z+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var se=P[ne],ce=H(se);if(ce!=="object")return new c("Invalid "+te+" `"+Z+"` of type "+("`"+ce+"` supplied to `"+Y+"`, expected an object."));for(var pe in se)if(n(se,pe)){var oe=D(se,pe,Y,te,Z+"."+pe,r);if(oe instanceof Error)return oe}return null}return x(N)}function q(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var N=0;N<D.length;N++){var P=D[N];if(typeof P!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(P)+" at index "+N+"."),s}function ne(Y,te,Z,se,ce){for(var pe=[],oe=0;oe<D.length;oe++){var _e=D[oe],L=_e(Y,te,Z,se,ce,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&pe.push(L.data.expectedType)}var Me=pe.length>0?", expected one of type ["+pe.join(", ")+"]":"";return new c("Invalid "+se+" `"+ce+"` supplied to "+("`"+Z+"`"+Me+"."))}return x(ne)}function u(){function D(N,P,ne,Y,te){return z(N[P])?null:new c("Invalid "+Y+" `"+te+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return x(D)}function $(D,N,P,ne,Y){return new c((D||"React class")+": "+N+" type `"+P+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function k(D){function N(P,ne,Y,te,Z){var se=P[ne],ce=H(se);if(ce!=="object")return new c("Invalid "+te+" `"+Z+"` of type `"+ce+"` "+("supplied to `"+Y+"`, expected `object`."));for(var pe in D){var oe=D[pe];if(typeof oe!="function")return $(Y,te,Z,pe,ue(oe));var _e=oe(se,pe,Y,te,Z+"."+pe,r);if(_e)return _e}return null}return x(N)}function R(D){function N(P,ne,Y,te,Z){var se=P[ne],ce=H(se);if(ce!=="object")return new c("Invalid "+te+" `"+Z+"` of type `"+ce+"` "+("supplied to `"+Y+"`, expected `object`."));var pe=t({},P[ne],D);for(var oe in pe){var _e=D[oe];if(n(D,oe)&&typeof _e!="function")return $(Y,te,Z,oe,ue(_e));if(!_e)return new c("Invalid "+te+" `"+Z+"` key `"+oe+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(P[ne],null," ")+`
|
|
23
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var L=_e(se,oe,Y,te,Z+"."+oe,r);if(L)return L}return null}return x(N)}function z(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(z);if(D===null||o(D))return!0;var N=d(D);if(N){var P=N.call(D),ne;if(N!==D.entries){for(;!(ne=P.next()).done;)if(!z(ne.value))return!1}else for(;!(ne=P.next()).done;){var Y=ne.value;if(Y&&!z(Y[1]))return!1}}else return!1;return!0;default:return!1}}function B(D,N){return D==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function H(D){var N=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":B(N,D)?"symbol":N}function ue(D){if(typeof D>"u"||D===null)return""+D;var N=H(D);if(N==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return N}function re(D){var N=ue(D);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function ee(D){return!D.constructor||!D.constructor.name?m:D.constructor.name}return b.checkPropTypes=i,b.resetWarningCache=i.resetWarningCache,b.PropTypes=b,b},ci}var ui,Ja;function lu(){if(Ja)return ui;Ja=1;var e=na();function t(){}function r(){}return r.resetWarningCache=t,ui=function(){function n(s,o,l,f,p,d){if(d!==e){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}}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},ui}var Xa;function cu(){if(Xa)return mn.exports;if(Xa=1,process.env.NODE_ENV!=="production"){var e=Ro(),t=!0;mn.exports=ou()(e.isElement,t)}else mn.exports=lu()();return mn.exports}var uu=cu();const J=ea(uu);function Io(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=Io(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function pu(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Io(e))&&(n&&(n+=" "),n+=t);return n}function du(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let s="",o=!0;for(let l=0;l<a.length;l+=1){const f=a[l];f&&(s+=(o===!0?"":" ")+t(f),o=!1,r&&r[f]&&(s+=" "+r[f]))}n[i]=s}return n}var gn={exports:{}},ve={};/**
|
|
24
24
|
* @license React
|
|
25
25
|
* react-is.production.js
|
|
26
26
|
*
|
|
@@ -28,7 +28,7 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var N=_e(se,oe,Q,te,ae+"
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/var es;function fu(){if(es)return ve;es=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"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),
|
|
31
|
+
*/var es;function fu(){if(es)return ve;es=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"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function h(c){if(typeof c=="object"&&c!==null){var x=c.$$typeof;switch(x){case e:switch(c=c.type,c){case r:case i:case n:case l:case f:case m:return c;default:switch(c=c&&c.$$typeof,c){case s:case o:case d:case p:return c;case a:return c;default:return x}}case t:return x}}}return ve.ContextConsumer=a,ve.ContextProvider=s,ve.Element=e,ve.ForwardRef=o,ve.Fragment=r,ve.Lazy=d,ve.Memo=p,ve.Portal=t,ve.Profiler=i,ve.StrictMode=n,ve.Suspense=l,ve.SuspenseList=f,ve.isContextConsumer=function(c){return h(c)===a},ve.isContextProvider=function(c){return h(c)===s},ve.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},ve.isForwardRef=function(c){return h(c)===o},ve.isFragment=function(c){return h(c)===r},ve.isLazy=function(c){return h(c)===d},ve.isMemo=function(c){return h(c)===p},ve.isPortal=function(c){return h(c)===t},ve.isProfiler=function(c){return h(c)===i},ve.isStrictMode=function(c){return h(c)===n},ve.isSuspense=function(c){return h(c)===l},ve.isSuspenseList=function(c){return h(c)===f},ve.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===i||c===n||c===l||c===f||typeof c=="object"&&c!==null&&(c.$$typeof===d||c.$$typeof===p||c.$$typeof===s||c.$$typeof===a||c.$$typeof===o||c.$$typeof===b||c.getModuleId!==void 0)},ve.typeOf=h,ve}var xe={};/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-is.development.js
|
|
34
34
|
*
|
|
@@ -36,22 +36,22 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var N=_e(se,oe,Q,te,ae+"
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var ts;function mu(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var
|
|
40
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Nt(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function xu(e){const t=(a,s)=>a.replace("@media",s?`@container ${s}`:"@container");function r(a,s){a.up=(...o)=>t(e.breakpoints.up(...o),s),a.down=(...o)=>t(e.breakpoints.down(...o),s),a.between=(...o)=>t(e.breakpoints.between(...o),s),a.only=(...o)=>t(e.breakpoints.only(...o),s),a.not=(...o)=>{const l=t(e.breakpoints.not(...o),s);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 qn={xs:0,sm:600,md:900,lg:1200,xl:1536},ns={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${qn[e]}px)`},bu={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:qn[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function St(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||ns;return t.reduce((s,o,l)=>(s[a.up(a.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const a=n.breakpoints||ns;return Object.keys(t).reduce((s,o)=>{if(yu(a.keys,o)){const l=vu(n.containerQueries?n:bu,o);l&&(s[l]=r(t[o],o))}else if(Object.keys(a.values||qn).includes(o)){const l=a.up(o);s[l]=r(t[o],o)}else{const l=o;s[l]=t[l]}return s},{})}return r(t)}function wu(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function Su(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Bn(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 Rn(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Bn(e,r)||n,t&&(i=t(i,n,e)),i}function je(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=s=>{if(s[t]==null)return null;const o=s[t],l=s.theme,
|
|
39
|
+
*/var ts;function mu(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var x=c.$$typeof;switch(x){case t:switch(c=c.type,c){case n:case a:case i:case f:case p:case b:return c;default:switch(c=c&&c.$$typeof,c){case o:case l:case m:case d:return c;case s:return c;default:return x}}case r:return x}}}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"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");xe.ContextConsumer=s,xe.ContextProvider=o,xe.Element=t,xe.ForwardRef=l,xe.Fragment=n,xe.Lazy=m,xe.Memo=d,xe.Portal=r,xe.Profiler=a,xe.StrictMode=i,xe.Suspense=f,xe.SuspenseList=p,xe.isContextConsumer=function(c){return e(c)===s},xe.isContextProvider=function(c){return e(c)===o},xe.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},xe.isForwardRef=function(c){return e(c)===l},xe.isFragment=function(c){return e(c)===n},xe.isLazy=function(c){return e(c)===m},xe.isMemo=function(c){return e(c)===d},xe.isPortal=function(c){return e(c)===r},xe.isProfiler=function(c){return e(c)===a},xe.isStrictMode=function(c){return e(c)===i},xe.isSuspense=function(c){return e(c)===f},xe.isSuspenseList=function(c){return e(c)===p},xe.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===n||c===a||c===i||c===f||c===p||typeof c=="object"&&c!==null&&(c.$$typeof===m||c.$$typeof===d||c.$$typeof===o||c.$$typeof===s||c.$$typeof===l||c.$$typeof===h||c.getModuleId!==void 0)},xe.typeOf=e}()),xe}var rs;function hu(){return rs||(rs=1,process.env.NODE_ENV==="production"?gn.exports=fu():gn.exports=mu()),gn.exports}var Dn=hu();function wt(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 Mo(e){if(Ce.isValidElement(e)||Dn.isValidElementType(e)||!wt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Mo(e[r])}),t}function Qe(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return wt(e)&&wt(t)&&Object.keys(t).forEach(i=>{Ce.isValidElement(t[i])||Dn.isValidElementType(t[i])?n[i]=t[i]:wt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&wt(e[i])?n[i]=Qe(e[i],t[i],r):r.clone?n[i]=wt(t[i])?Mo(t[i]):t[i]:n[i]=t[i]}),n}function Hr(e,t){return t?Qe(e,t,{clone:!1}):e}const qt=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.string,J.object,J.array]):{};function gu(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var s,o;const a=/min-width:\s*([0-9.]+)/;return+(((s=n.match(a))==null?void 0:s[1])||0)-+(((o=i.match(a))==null?void 0:o[1])||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function yu(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function vu(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>\`.
|
|
40
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Nt(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function xu(e){const t=(a,s)=>a.replace("@media",s?`@container ${s}`:"@container");function r(a,s){a.up=(...o)=>t(e.breakpoints.up(...o),s),a.down=(...o)=>t(e.breakpoints.down(...o),s),a.between=(...o)=>t(e.breakpoints.between(...o),s),a.only=(...o)=>t(e.breakpoints.only(...o),s),a.not=(...o)=>{const l=t(e.breakpoints.not(...o),s);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 qn={xs:0,sm:600,md:900,lg:1200,xl:1536},ns={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${qn[e]}px)`},bu={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:qn[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function St(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||ns;return t.reduce((s,o,l)=>(s[a.up(a.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const a=n.breakpoints||ns;return Object.keys(t).reduce((s,o)=>{if(yu(a.keys,o)){const l=vu(n.containerQueries?n:bu,o);l&&(s[l]=r(t[o],o))}else if(Object.keys(a.values||qn).includes(o)){const l=a.up(o);s[l]=r(t[o],o)}else{const l=o;s[l]=t[l]}return s},{})}return r(t)}function wu(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function Su(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Bn(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 Rn(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Bn(e,r)||n,t&&(i=t(i,n,e)),i}function je(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=s=>{if(s[t]==null)return null;const o=s[t],l=s.theme,f=Bn(l,n)||{};return St(s,o,d=>{let m=Rn(f,i,d);return d===m&&typeof d=="string"&&(m=Rn(f,i,`${t}${d==="default"?"":sr(d)}`,d)),r===!1?m:{[r]:m}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:qt}:{},a.filterProps=[t],a}function Eu(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const ku={m:"margin",p:"padding"},Ou={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},is={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Tu=Eu(e=>{if(e.length>2)if(is[e])e=is[e];else return[e];const[t,r]=e.split(""),n=ku[t],i=Ou[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),Un=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Wn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Cu=[...Un,...Wn];function an(e,t,r,n){const i=Bn(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 s=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
41
41
|
`)):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(`
|
|
42
42
|
`)));const o=i[s];return a>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}: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(`
|
|
43
|
-
`)),()=>{})}function ia(e){return an(e,"spacing",8,"spacing")}function sn(e,t){return typeof t=="string"||t==null?t:e(t)}function _u(e,t){return r=>e.reduce((n,i)=>(n[i]=sn(t,r),n),{})}function Au(e,t,r,n){if(!t.includes(r))return null;const i=Tu(r),a=_u(i,n),s=e[r];return St(e,s,a)}function zo(e,t){const r=ia(e.theme);return Object.keys(e).map(n=>Au(e,t,n,r)).reduce(Hr,{})}function ke(e){return zo(e,Un)}ke.propTypes=process.env.NODE_ENV!=="production"?Un.reduce((e,t)=>(e[t]=qt,e),{}):{};ke.filterProps=Un;function Oe(e){return zo(e,Wn)}Oe.propTypes=process.env.NODE_ENV!=="production"?Wn.reduce((e,t)=>(e[t]=qt,e),{}):{};Oe.filterProps=Wn;process.env.NODE_ENV!=="production"&&Cu.reduce((e,t)=>(e[t]=qt,e),{});function Hn(...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]?Hr(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 Xe(e){return typeof e!="number"?e:`${e}px solid`}function et(e,t){return je({prop:e,themeKey:"borders",transform:t})}const Fu=et("border",Xe),ju=et("borderTop",Xe),$u=et("borderRight",Xe),Du=et("borderBottom",Xe),Ru=et("borderLeft",Xe),Pu=et("borderColor"),Iu=et("borderTopColor"),Mu=et("borderRightColor"),zu=et("borderBottomColor"),Vu=et("borderLeftColor"),Nu=et("outline",Xe),Lu=et("outlineColor"),Kn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=an(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:sn(t,n)});return St(e,e.borderRadius,r)}return null};Kn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:qt}:{};Kn.filterProps=["borderRadius"];Hn(Fu,ju,$u,Du,Ru,Pu,Iu,Mu,zu,Vu,Kn,Nu,Lu);const Qn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=an(e.theme,"spacing",8,"gap"),r=n=>({gap:sn(t,n)});return St(e,e.gap,r)}return null};Qn.propTypes=process.env.NODE_ENV!=="production"?{gap:qt}:{};Qn.filterProps=["gap"];const Gn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=an(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:sn(t,n)});return St(e,e.columnGap,r)}return null};Gn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:qt}:{};Gn.filterProps=["columnGap"];const Yn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=an(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:sn(t,n)});return St(e,e.rowGap,r)}return null};Yn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:qt}:{};Yn.filterProps=["rowGap"];const qu=je({prop:"gridColumn"}),Bu=je({prop:"gridRow"}),Uu=je({prop:"gridAutoFlow"}),Wu=je({prop:"gridAutoColumns"}),Hu=je({prop:"gridAutoRows"}),Ku=je({prop:"gridTemplateColumns"}),Qu=je({prop:"gridTemplateRows"}),Gu=je({prop:"gridTemplateAreas"}),Yu=je({prop:"gridArea"});Hn(Qn,Gn,Yn,qu,Bu,Uu,Wu,Hu,Ku,Qu,Gu,Yu);function xr(e,t){return t==="grey"?t:e}const Zu=je({prop:"color",themeKey:"palette",transform:xr}),Ju=je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:xr}),Xu=je({prop:"backgroundColor",themeKey:"palette",transform:xr});Hn(Zu,Ju,Xu);function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}const ep=je({prop:"width",transform:Ke}),aa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,l;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||qn[r];return n?((l=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Ke(r)}};return St(e,e.maxWidth,t)}return null};aa.filterProps=["maxWidth"];const tp=je({prop:"minWidth",transform:Ke}),rp=je({prop:"height",transform:Ke}),np=je({prop:"maxHeight",transform:Ke}),ip=je({prop:"minHeight",transform:Ke});je({prop:"size",cssProperty:"width",transform:Ke});je({prop:"size",cssProperty:"height",transform:Ke});const ap=je({prop:"boxSizing"});Hn(ep,aa,tp,rp,np,ip,ap);const Zn={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Kn},color:{themeKey:"palette",transform:xr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:xr},backgroundColor:{themeKey:"palette",transform:xr},p:{style:Oe},pt:{style:Oe},pr:{style:Oe},pb:{style:Oe},pl:{style:Oe},px:{style:Oe},py:{style:Oe},padding:{style:Oe},paddingTop:{style:Oe},paddingRight:{style:Oe},paddingBottom:{style:Oe},paddingLeft:{style:Oe},paddingX:{style:Oe},paddingY:{style:Oe},paddingInline:{style:Oe},paddingInlineStart:{style:Oe},paddingInlineEnd:{style:Oe},paddingBlock:{style:Oe},paddingBlockStart:{style:Oe},paddingBlockEnd:{style:Oe},m:{style:ke},mt:{style:ke},mr:{style:ke},mb:{style:ke},ml:{style:ke},mx:{style:ke},my:{style:ke},margin:{style:ke},marginTop:{style:ke},marginRight:{style:ke},marginBottom:{style:ke},marginLeft:{style:ke},marginX:{style:ke},marginY:{style:ke},marginInline:{style:ke},marginInlineStart:{style:ke},marginInlineEnd:{style:ke},marginBlock:{style:ke},marginBlockStart:{style:ke},marginBlockEnd:{style:ke},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:Qn},rowGap:{style:Yn},columnGap:{style:Gn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ke},maxWidth:{style:aa},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},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 sp(...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 op(e,t){return typeof e=="function"?e(t):e}function lp(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:l=r,themeKey:d,transform:p,style:f}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const m=Bn(i,d)||{};return f?f(s):St(s,n,h=>{let c=Rn(m,p,h);return h===c&&typeof h=="string"&&(c=Rn(m,p,`${r}${h==="default"?"":sr(h)}`,h)),l===!1?c:{[l]:c}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Zn;function s(o){let l=o;if(typeof o=="function")l=o(i);else if(typeof o!="object")return o;if(!l)return null;const d=wu(i.breakpoints),p=Object.keys(d);let f=d;return Object.keys(l).forEach(m=>{const x=op(l[m],i);if(x!=null)if(typeof x=="object")if(a[m])f=Hr(f,e(m,x,i,a));else{const h=St({theme:i},x,c=>({[m]:c}));sp(h,x)?f[m]=t({sx:x,theme:i}):f=Hr(f,h)}else f=Hr(f,e(m,x,i,a))}),gu(i,Su(p,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const $r=lp();$r.filterProps=["sx"];function cp(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 up={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 dp=/[A-Z]|^ms/g,fp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vo=function(t){return t.charCodeAt(1)===45},as=function(t){return t!=null&&typeof t!="boolean"},pi=pp(function(e){return Vo(e)?e:e.replace(dp,"-$&").toLowerCase()}),ss=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(fp,function(n,i,a){return Mt={name:i,styles:a,next:Mt},i})}return up[t]!==1&&!Vo(t)&&typeof r=="number"&&r!==0?r+"px":r};function Pn(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 Mt={name:i.name,styles:i.styles,next:Mt},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)Mt={name:s.name,styles:s.styles,next:Mt},s=s.next;var o=a.styles+";";return o}return mp(e,t,r)}}var l=r;return l}function mp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Pn(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;as(o)&&(n+=pi(a)+":"+ss(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)as(s[l])&&(n+=pi(a)+":"+ss(a,s[l])+";");else{var d=Pn(e,t,s);switch(a){case"animation":case"animationName":{n+=pi(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var os=/label:\s*([^\s;{]+)\s*(;|$)/g,Mt;function hp(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="";Mt=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Pn(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=Pn(r,t,e[o]),n){var l=a;i+=l[o]}os.lastIndex=0;for(var d="",p;(p=os.exec(i))!==null;)d+="-"+p[1];var f=cp(i)+d;return{name:f,styles:i,next:Mt}}/**
|
|
43
|
+
`)),()=>{})}function ia(e){return an(e,"spacing",8,"spacing")}function sn(e,t){return typeof t=="string"||t==null?t:e(t)}function _u(e,t){return r=>e.reduce((n,i)=>(n[i]=sn(t,r),n),{})}function Au(e,t,r,n){if(!t.includes(r))return null;const i=Tu(r),a=_u(i,n),s=e[r];return St(e,s,a)}function zo(e,t){const r=ia(e.theme);return Object.keys(e).map(n=>Au(e,t,n,r)).reduce(Hr,{})}function ke(e){return zo(e,Un)}ke.propTypes=process.env.NODE_ENV!=="production"?Un.reduce((e,t)=>(e[t]=qt,e),{}):{};ke.filterProps=Un;function Oe(e){return zo(e,Wn)}Oe.propTypes=process.env.NODE_ENV!=="production"?Wn.reduce((e,t)=>(e[t]=qt,e),{}):{};Oe.filterProps=Wn;process.env.NODE_ENV!=="production"&&Cu.reduce((e,t)=>(e[t]=qt,e),{});function Hn(...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]?Hr(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 Xe(e){return typeof e!="number"?e:`${e}px solid`}function et(e,t){return je({prop:e,themeKey:"borders",transform:t})}const Fu=et("border",Xe),ju=et("borderTop",Xe),$u=et("borderRight",Xe),Du=et("borderBottom",Xe),Ru=et("borderLeft",Xe),Pu=et("borderColor"),Iu=et("borderTopColor"),Mu=et("borderRightColor"),zu=et("borderBottomColor"),Vu=et("borderLeftColor"),Nu=et("outline",Xe),Lu=et("outlineColor"),Kn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=an(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:sn(t,n)});return St(e,e.borderRadius,r)}return null};Kn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:qt}:{};Kn.filterProps=["borderRadius"];Hn(Fu,ju,$u,Du,Ru,Pu,Iu,Mu,zu,Vu,Kn,Nu,Lu);const Qn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=an(e.theme,"spacing",8,"gap"),r=n=>({gap:sn(t,n)});return St(e,e.gap,r)}return null};Qn.propTypes=process.env.NODE_ENV!=="production"?{gap:qt}:{};Qn.filterProps=["gap"];const Gn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=an(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:sn(t,n)});return St(e,e.columnGap,r)}return null};Gn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:qt}:{};Gn.filterProps=["columnGap"];const Yn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=an(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:sn(t,n)});return St(e,e.rowGap,r)}return null};Yn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:qt}:{};Yn.filterProps=["rowGap"];const qu=je({prop:"gridColumn"}),Bu=je({prop:"gridRow"}),Uu=je({prop:"gridAutoFlow"}),Wu=je({prop:"gridAutoColumns"}),Hu=je({prop:"gridAutoRows"}),Ku=je({prop:"gridTemplateColumns"}),Qu=je({prop:"gridTemplateRows"}),Gu=je({prop:"gridTemplateAreas"}),Yu=je({prop:"gridArea"});Hn(Qn,Gn,Yn,qu,Bu,Uu,Wu,Hu,Ku,Qu,Gu,Yu);function xr(e,t){return t==="grey"?t:e}const Zu=je({prop:"color",themeKey:"palette",transform:xr}),Ju=je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:xr}),Xu=je({prop:"backgroundColor",themeKey:"palette",transform:xr});Hn(Zu,Ju,Xu);function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}const ep=je({prop:"width",transform:Ke}),aa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,l;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||qn[r];return n?((l=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Ke(r)}};return St(e,e.maxWidth,t)}return null};aa.filterProps=["maxWidth"];const tp=je({prop:"minWidth",transform:Ke}),rp=je({prop:"height",transform:Ke}),np=je({prop:"maxHeight",transform:Ke}),ip=je({prop:"minHeight",transform:Ke});je({prop:"size",cssProperty:"width",transform:Ke});je({prop:"size",cssProperty:"height",transform:Ke});const ap=je({prop:"boxSizing"});Hn(ep,aa,tp,rp,np,ip,ap);const Zn={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Kn},color:{themeKey:"palette",transform:xr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:xr},backgroundColor:{themeKey:"palette",transform:xr},p:{style:Oe},pt:{style:Oe},pr:{style:Oe},pb:{style:Oe},pl:{style:Oe},px:{style:Oe},py:{style:Oe},padding:{style:Oe},paddingTop:{style:Oe},paddingRight:{style:Oe},paddingBottom:{style:Oe},paddingLeft:{style:Oe},paddingX:{style:Oe},paddingY:{style:Oe},paddingInline:{style:Oe},paddingInlineStart:{style:Oe},paddingInlineEnd:{style:Oe},paddingBlock:{style:Oe},paddingBlockStart:{style:Oe},paddingBlockEnd:{style:Oe},m:{style:ke},mt:{style:ke},mr:{style:ke},mb:{style:ke},ml:{style:ke},mx:{style:ke},my:{style:ke},margin:{style:ke},marginTop:{style:ke},marginRight:{style:ke},marginBottom:{style:ke},marginLeft:{style:ke},marginX:{style:ke},marginY:{style:ke},marginInline:{style:ke},marginInlineStart:{style:ke},marginInlineEnd:{style:ke},marginBlock:{style:ke},marginBlockStart:{style:ke},marginBlockEnd:{style:ke},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:Qn},rowGap:{style:Yn},columnGap:{style:Gn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ke},maxWidth:{style:aa},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},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 sp(...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 op(e,t){return typeof e=="function"?e(t):e}function lp(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:l=r,themeKey:f,transform:p,style:d}=o;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const m=Bn(i,f)||{};return d?d(s):St(s,n,h=>{let c=Rn(m,p,h);return h===c&&typeof h=="string"&&(c=Rn(m,p,`${r}${h==="default"?"":sr(h)}`,h)),l===!1?c:{[l]:c}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Zn;function s(o){let l=o;if(typeof o=="function")l=o(i);else if(typeof o!="object")return o;if(!l)return null;const f=wu(i.breakpoints),p=Object.keys(f);let d=f;return Object.keys(l).forEach(m=>{const b=op(l[m],i);if(b!=null)if(typeof b=="object")if(a[m])d=Hr(d,e(m,b,i,a));else{const h=St({theme:i},b,c=>({[m]:c}));sp(h,b)?d[m]=t({sx:b,theme:i}):d=Hr(d,h)}else d=Hr(d,e(m,b,i,a))}),gu(i,Su(p,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const $r=lp();$r.filterProps=["sx"];function cp(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 up={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 dp=/[A-Z]|^ms/g,fp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vo=function(t){return t.charCodeAt(1)===45},as=function(t){return t!=null&&typeof t!="boolean"},pi=pp(function(e){return Vo(e)?e:e.replace(dp,"-$&").toLowerCase()}),ss=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(fp,function(n,i,a){return Mt={name:i,styles:a,next:Mt},i})}return up[t]!==1&&!Vo(t)&&typeof r=="number"&&r!==0?r+"px":r};function Pn(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 Mt={name:i.name,styles:i.styles,next:Mt},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)Mt={name:s.name,styles:s.styles,next:Mt},s=s.next;var o=a.styles+";";return o}return mp(e,t,r)}}var l=r;return l}function mp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Pn(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;as(o)&&(n+=pi(a)+":"+ss(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)as(s[l])&&(n+=pi(a)+":"+ss(a,s[l])+";");else{var f=Pn(e,t,s);switch(a){case"animation":case"animationName":{n+=pi(a)+":"+f+";";break}default:n+=a+"{"+f+"}"}}}return n}var os=/label:\s*([^\s;{]+)\s*(;|$)/g,Mt;function hp(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="";Mt=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Pn(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=Pn(r,t,e[o]),n){var l=a;i+=l[o]}os.lastIndex=0;for(var f="",p;(p=os.exec(i))!==null;)f+="-"+p[1];var d=cp(i)+f;return{name:d,styles:i,next:Mt}}/**
|
|
44
44
|
* @mui/styled-engine v7.1.1
|
|
45
45
|
*
|
|
46
46
|
* @license MIT
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
49
|
*/function gp(e,t){const r=dl(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(`
|
|
50
|
-
`)):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 yp(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ls=[];function cs(e){return ls[0]=e,hp(ls)}const vp=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 xp(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=vp(t),s=Object.keys(a);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function
|
|
50
|
+
`)):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 yp(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ls=[];function cs(e){return ls[0]=e,hp(ls)}const vp=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 xp(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=vp(t),s=Object.keys(a);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function f(m,b){const h=s.indexOf(b);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:b)-n/100}${r})`}function p(m){return s.indexOf(m)+1<s.length?f(m,s[s.indexOf(m)+1]):o(m)}function d(m){const b=s.indexOf(m);return b===0?o(s[1]):b===s.length-1?l(s[b]):f(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:l,between:f,only:p,not:d,unit:r,...i}}const bp={borderRadius:4};function No(e=8,t=ia({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 s=t(a);return typeof s=="number"?`${s}px`:s}).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 Lo(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=xp(r),l=No(i);let f=Qe({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...bp,...a}},s);return f=xu(f),f.applyStyles=wp,f=t.reduce((p,d)=>Qe(p,d),f),f.unstable_sxConfig={...Zn,...s==null?void 0:s.unstable_sxConfig},f.unstable_sx=function(d){return $r({sx:d,theme:this})},f}const Sp={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 sa(e,t,r="Mui"){const n=Sp[t];return n?`${r}-${n}`:`${ru.generate(e)}-${t}`}function Ep(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=sa(e,i,r)}),n}function qo(e,t=""){return e.displayName||e.name||t}function us(e,t,r){const n=qo(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function kp(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return qo(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Dn.ForwardRef:return us(e,e.render,"ForwardRef");case Dn.Memo:return us(e,e.type,"memo");default:return}}}function Bo(e){const{variants:t,...r}=e,n={variants:t,style:cs(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=cs(i.style))}),n}const Op=Lo();function di(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Tp(e){return e?(t,r)=>r[e]:null}function Cp(e,t,r){e.theme=jp(e.theme)?r:e.theme[t]||e.theme}function kn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>kn(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 Uo(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Uo(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const o in s.props)if(e[o]!==s.props[o]&&((i=e.ownerState)==null?void 0:i[o])!==s.props[o])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function _p(e={}){const{themeId:t,defaultTheme:r=Op,rootShouldForwardProp:n=di,slotShouldForwardProp:i=di}=e;function a(o){Cp(o,t,r)}return(o,l={})=>{yp(o,w=>w.filter(V=>V!==$r));const{name:f,slot:p,skipVariantsResolver:d,skipSx:m,overridesResolver:b=Tp(Wo(p)),...h}=l,c=d!==void 0?d:p&&p!=="Root"&&p!=="root"||!1,x=m||!1;let v=di;p==="Root"||p==="root"?v=n:p?v=i:$p(o)&&(v=void 0);const O=gp(o,{shouldForwardProp:v,label:Fp(f,p),...h}),j=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(Q){return kn(Q,w)};if(wt(w)){const V=Bo(w);return V.variants?function(X){return kn(X,V)}:V.style}return w},A=(...w)=>{const V=[],Q=w.map(j),X=[];if(V.push(a),f&&b&&X.push(function(k){var H,ue;const z=(ue=(H=k.theme.components)==null?void 0:H[f])==null?void 0:ue.styleOverrides;if(!z)return null;const B={};for(const re in z)B[re]=kn(k,z[re]);return b(k,B)}),f&&!c&&X.push(function(k){var B,H;const R=k.theme,z=(H=(B=R==null?void 0:R.components)==null?void 0:B[f])==null?void 0:H.variants;return z?Uo(k,z):null}),x||X.push($r),Array.isArray(Q[0])){const $=Q.shift(),k=new Array(V.length).fill(""),R=new Array(X.length).fill("");let z;z=[...k,...$,...R],z.raw=[...k,...$.raw,...R],V.unshift(z)}const q=[...V,...Q,...X],u=O(...q);return o.muiName&&(u.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(u.displayName=Ap(f,p,o)),u};return O.withConfig&&(A.withConfig=O.withConfig),A}}function Ap(e,t,r){return e?`${e}${sr(t||"")}`:`Styled(${kp(r)})`}function Fp(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Wo(t||"Root")}`),r}function jp(e){for(const t in e)return!1;return!0}function $p(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wo(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Pi(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],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)){const l=o;r[i][l]=Pi(a[l],s[l])}}}else r[i]===void 0&&(r[i]=e[i])}return r}function Dp(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function oa(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}].`),Dp(e,t,r)}function Rp(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 Lt(e){if(e.type)return e;if(e.charAt(0)==="#")return Lt(Rp(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.
|
|
51
51
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Nt(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.
|
|
52
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Nt(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Pp=e=>{const t=Lt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},qr=(e,t)=>{try{return Pp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Jn(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 Ho(e){e=Lt(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(
|
|
53
|
-
`))}return
|
|
54
|
-
The color object needs to have a \`main\` property or a \`${
|
|
52
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Nt(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Pp=e=>{const t=Lt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},qr=(e,t)=>{try{return Pp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Jn(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 Ho(e){e=Lt(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(f,p=(f+r/30)%12)=>i-a*Math.max(Math.min(p-3,9-p,1),-1);let o="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",l.push(t[3])),Jn({type:o,values:l})}function Ii(e){e=Lt(e);let t=e.type==="hsl"||e.type==="hsla"?Lt(Ho(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 ps(e,t){const r=Ii(e),n=Ii(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ip(e,t){return e=Lt(e),t=oa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Jn(e)}function yn(e,t,r){try{return Ip(e,t)}catch{return e}}function la(e,t){if(e=Lt(e),t=oa(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 Jn(e)}function be(e,t,r){try{return la(e,t)}catch{return e}}function ca(e,t){if(e=Lt(e),t=oa(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 Jn(e)}function we(e,t,r){try{return ca(e,t)}catch{return e}}function Mp(e,t=.15){return Ii(e)>.5?la(e,t):ca(e,t)}function vn(e,t,r){try{return Mp(e,t)}catch{return e}}const zp=Ce.createContext(void 0);process.env.NODE_ENV!=="production"&&(J.node,J.object);function Vp(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?Pi(i.defaultProps,n):!i.styleOverrides&&!i.variants?Pi(i,n):n}function Np({props:e,name:t}){const r=Ce.useContext(zp);return Vp({props:e,name:t,theme:{components:r}})}const ds={theme:void 0};function Lp(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(ds.theme=i.theme,a=Bo(e(ds)),t=a,r=i.theme),a}}function qp(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 fs=(e,t,r,n=[])=>{let i=e;t.forEach((a,s)=>{s===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])})},Bp=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,l])=>{(!r||r&&!r([...a,o]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,o],Array.isArray(l)?[...s,o]:s):t([...a,o],l,s))})}n(e)},Up=(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 fi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Bp(e,(o,l,f)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(o,l))){const p=`--${r?`${r}-`:""}${o.join("-")}`,d=Up(o,l);Object.assign(i,{[p]:d}),fs(a,o,`var(${p})`,f),fs(s,o,`var(${p}, ${d})`,f)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Wp(e,t={}){const{getSelector:r=x,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...l}=e,{vars:f,css:p,varsWithDefaults:d}=fi(l,t);let m=d;const b={},{[o]:h,...c}=a;if(Object.entries(c||{}).forEach(([j,A])=>{const{vars:w,css:V,varsWithDefaults:Q}=fi(A,t);m=Qe(m,Q),b[j]={css:V,vars:w}}),h){const{css:j,vars:A,varsWithDefaults:w}=fi(h,t);m=Qe(m,w),b[o]={css:j,vars:A}}function x(j,A){var V,Q;let w=i;if(i==="class"&&(w=".%s"),i==="data"&&(w="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(w=`[${i}="%s"]`),j){if(w==="media")return e.defaultColorScheme===j?":root":{[`@media (prefers-color-scheme: ${((Q=(V=a[j])==null?void 0:V.palette)==null?void 0:Q.mode)||j})`]:{":root":A}};if(w)return e.defaultColorScheme===j?`:root, ${w.replace("%s",String(j))}`:w.replace("%s",String(j))}return":root"}return{vars:m,generateThemeVars:()=>{let j={...f};return Object.entries(b).forEach(([,{vars:A}])=>{j=Qe(j,A)}),j},generateStyleSheets:()=>{var X,q;const j=[],A=e.defaultColorScheme||"light";function w(u,$){Object.keys($).length&&j.push(typeof u=="string"?{[u]:{...$}}:u)}w(r(void 0,{...p}),p);const{[A]:V,...Q}=b;if(V){const{css:u}=V,$=(q=(X=a[A])==null?void 0:X.palette)==null?void 0:q.mode,k=!n&&$?{colorScheme:$,...u}:{...u};w(r(A,{...k}),k)}return Object.entries(Q).forEach(([u,{css:$}])=>{var z,B;const k=(B=(z=a[u])==null?void 0:z.palette)==null?void 0:B.mode,R=!n&&k?{colorScheme:k,...$}:{...$};w(r(u,{...R}),R)}),j}}}function Hp(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 Gr={black:"#000",white:"#fff"},Kp={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"},fr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},mr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Vr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},gr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},yr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ko(){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:Gr.white,default:Gr.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 Qp=Ko();function Qo(){return{text:{primary:Gr.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:Gr.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 ms=Qo();function hs(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=ca(e.main,i):t==="dark"&&(e.dark=la(e.main,a)))}function Gp(e="light"){return e==="dark"?{main:hr[200],light:hr[50],dark:hr[400]}:{main:hr[700],light:hr[400],dark:hr[800]}}function Yp(e="light"){return e==="dark"?{main:fr[200],light:fr[50],dark:fr[400]}:{main:fr[500],light:fr[300],dark:fr[700]}}function Zp(e="light"){return e==="dark"?{main:mr[500],light:mr[300],dark:mr[700]}:{main:mr[700],light:mr[400],dark:mr[800]}}function Jp(e="light"){return e==="dark"?{main:gr[400],light:gr[300],dark:gr[700]}:{main:gr[700],light:gr[500],dark:gr[900]}}function Xp(e="light"){return e==="dark"?{main:yr[400],light:yr[300],dark:yr[700]}:{main:yr[800],light:yr[500],dark:yr[900]}}function ed(e="light"){return e==="dark"?{main:Vr[400],light:Vr[300],dark:Vr[700]}:{main:"#ed6c02",light:Vr[500],dark:Vr[900]}}function ua(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Gp(t),s=e.secondary||Yp(t),o=e.error||Zp(t),l=e.info||Jp(t),f=e.success||Xp(t),p=e.warning||ed(t);function d(c){const x=ps(c,ms.text.primary)>=r?ms.text.primary:Qp.text.primary;if(process.env.NODE_ENV!=="production"){const v=ps(c,x);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${x} 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(`
|
|
53
|
+
`))}return x}const m=({color:c,name:x,mainShade:v=500,lightShade:O=300,darkShade:j=700})=>{if(c={...c},!c.main&&c[v]&&(c.main=c[v]),!c.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
54
|
+
The color object needs to have a \`main\` property or a \`${v}\` property.`:Nt(11,x?` (${x})`:"",v));if(typeof c.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
|
|
55
55
|
\`color.main\` should be a string, but \`${JSON.stringify(c.main)}\` was provided instead.
|
|
56
56
|
|
|
57
57
|
Did you intend to use one of the following approaches?
|
|
@@ -64,19 +64,19 @@ const theme1 = createTheme({ palette: {
|
|
|
64
64
|
|
|
65
65
|
const theme2 = createTheme({ palette: {
|
|
66
66
|
primary: { main: green[500] },
|
|
67
|
-
} });`:Nt(12,
|
|
68
|
-
`)),Object.keys(
|
|
67
|
+
} });`:Nt(12,x?` (${x})`:"",JSON.stringify(c.main)));return hs(c,"light",O,n),hs(c,"dark",j,n),c.contrastText||(c.contrastText=d(c.main)),c};let b;return t==="light"?b=Ko():t==="dark"&&(b=Qo()),process.env.NODE_ENV!=="production"&&(b||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Qe({common:{...Gr},mode:t,primary:m({color:a,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:o,name:"error"}),warning:m({color:p,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:f,name:"success"}),grey:Kp,contrastThreshold:r,getContrastText:d,augmentColor:m,tonalOffset:n,...b},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 rd(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function nd(e){return Math.round(e*1e5)/1e5}const gs={textTransform:"uppercase"},ys='"Roboto", "Helvetica", "Arial", sans-serif';function id(e,t){const{fontFamily:r=ys,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:l=16,allVariants:f,pxToRem:p,...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 m=n/14,b=p||(x=>`${x/l*m}rem`),h=(x,v,O,j,A)=>({fontFamily:r,fontWeight:x,fontSize:b(v),lineHeight:O,...r===ys?{letterSpacing:`${nd(j/v)}em`}:{},...A,...f}),c={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(a,48,1.167,0),h4:h(a,34,1.235,.25),h5:h(a,24,1.334,0),h6:h(s,20,1.6,.15),subtitle1:h(a,16,1.75,.15),subtitle2:h(s,14,1.57,.1),body1:h(a,16,1.5,.15),body2:h(a,14,1.43,.15),button:h(s,14,1.75,.4,gs),caption:h(a,12,1.66,.4),overline:h(a,12,2.66,1,gs),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qe({htmlFontSize:l,pxToRem:b,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...c},d,{clone:!1})}const ad=.2,sd=.14,od=.12;function Se(...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,${sd})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${od})`].join(",")}const ld=["none",Se(0,2,1,-1,0,1,1,0,0,1,3,0),Se(0,3,1,-2,0,2,2,0,0,1,5,0),Se(0,3,3,-2,0,3,4,0,0,1,8,0),Se(0,2,4,-1,0,4,5,0,0,1,10,0),Se(0,3,5,-1,0,5,8,0,0,1,14,0),Se(0,3,5,-1,0,6,10,0,0,1,18,0),Se(0,4,5,-2,0,7,10,1,0,2,16,1),Se(0,5,5,-3,0,8,10,1,0,3,14,2),Se(0,5,6,-3,0,9,12,1,0,3,16,2),Se(0,6,6,-3,0,10,14,1,0,4,18,3),Se(0,6,7,-4,0,11,15,1,0,4,20,3),Se(0,7,8,-4,0,12,17,2,0,5,22,4),Se(0,7,8,-4,0,13,19,2,0,5,24,4),Se(0,7,9,-4,0,14,21,2,0,5,26,4),Se(0,8,9,-5,0,15,22,2,0,6,28,5),Se(0,8,10,-5,0,16,24,2,0,6,30,5),Se(0,8,11,-5,0,17,26,2,0,6,32,5),Se(0,9,11,-5,0,18,28,2,0,7,34,6),Se(0,9,12,-6,0,19,29,2,0,7,36,6),Se(0,10,13,-6,0,20,31,3,0,8,38,7),Se(0,10,13,-6,0,21,33,3,0,8,40,7),Se(0,10,14,-6,0,22,35,3,0,8,42,7),Se(0,11,14,-7,0,23,36,3,0,9,44,8),Se(0,11,15,-7,0,24,38,3,0,9,46,8)],cd={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)"},ud={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vs(e){return`${Math.round(e)}ms`}function pd(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function dd(e){const t={...cd,...e.easing},r={...ud,...e.duration};return{getAutoHeightDuration:pd,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:l=0,...f}=a;if(process.env.NODE_ENV!=="production"){const p=m=>typeof m=="string",d=m=>!Number.isNaN(parseFloat(m));!p(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!p(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),p(o)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!p(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(`
|
|
68
|
+
`)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(p=>`${p} ${typeof s=="string"?s:vs(s)} ${o} ${typeof l=="string"?l:vs(l)}`).join(",")},...e,easing:t,duration:r}}const fd={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function md(e){return wt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Go(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[s,o]=i[a];!md(o)||s.startsWith("unstable_")?delete n[s]:wt(o)&&(n[s]={...o},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
69
69
|
|
|
70
70
|
const theme = ${JSON.stringify(t,null,2)};
|
|
71
71
|
|
|
72
72
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
73
73
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
74
74
|
|
|
75
|
-
export default theme;`}function Mi(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:l,...
|
|
76
|
-
`))}c[
|
|
77
|
-
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 Sd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},Ed=(e="mui")=>qp(e);function mi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=yd({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=Mi({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Yo(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Zo(i)},s}function kd(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=vd,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...d}=e,p=Object.keys(r)[0],f=n||(r.light&&p!=="light"?"light":p),m=Ed(a),{[f]:x,light:h,dark:c,...w}=r,y={...w};let O=x;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(O=!0),!O)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Nt(21,f));const $=mi(y,O,d,f);h&&!y.light&&mi(y,h,void 0,"light"),c&&!y.dark&&mi(y,c,void 0,"dark");let F={defaultColorScheme:f,...$,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:m,colorSchemes:y,font:{...td($.typography),...$.font},spacing:Sd(d.spacing)};Object.keys(F.colorSchemes).forEach(W=>{const u=F.colorSchemes[W].palette,D=k=>{const P=k.split("-"),z=P[1],L=P[2];return m(k,u[z][L])};if(u.mode==="light"&&(A(u.common,"background","#fff"),A(u.common,"onBackground","#000")),u.mode==="dark"&&(A(u.common,"background","#000"),A(u.common,"onBackground","#fff")),wd(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){A(u.Alert,"errorColor",be(u.error.light,.6)),A(u.Alert,"infoColor",be(u.info.light,.6)),A(u.Alert,"successColor",be(u.success.light,.6)),A(u.Alert,"warningColor",be(u.warning.light,.6)),A(u.Alert,"errorFilledBg",D("palette-error-main")),A(u.Alert,"infoFilledBg",D("palette-info-main")),A(u.Alert,"successFilledBg",D("palette-success-main")),A(u.Alert,"warningFilledBg",D("palette-warning-main")),A(u.Alert,"errorFilledColor",ct(()=>u.getContrastText(u.error.main))),A(u.Alert,"infoFilledColor",ct(()=>u.getContrastText(u.info.main))),A(u.Alert,"successFilledColor",ct(()=>u.getContrastText(u.success.main))),A(u.Alert,"warningFilledColor",ct(()=>u.getContrastText(u.warning.main))),A(u.Alert,"errorStandardBg",we(u.error.light,.9)),A(u.Alert,"infoStandardBg",we(u.info.light,.9)),A(u.Alert,"successStandardBg",we(u.success.light,.9)),A(u.Alert,"warningStandardBg",we(u.warning.light,.9)),A(u.Alert,"errorIconColor",D("palette-error-main")),A(u.Alert,"infoIconColor",D("palette-info-main")),A(u.Alert,"successIconColor",D("palette-success-main")),A(u.Alert,"warningIconColor",D("palette-warning-main")),A(u.AppBar,"defaultBg",D("palette-grey-100")),A(u.Avatar,"defaultBg",D("palette-grey-400")),A(u.Button,"inheritContainedBg",D("palette-grey-300")),A(u.Button,"inheritContainedHoverBg",D("palette-grey-A100")),A(u.Chip,"defaultBorder",D("palette-grey-400")),A(u.Chip,"defaultAvatarColor",D("palette-grey-700")),A(u.Chip,"defaultIconColor",D("palette-grey-700")),A(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),A(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),A(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),A(u.LinearProgress,"primaryBg",we(u.primary.main,.62)),A(u.LinearProgress,"secondaryBg",we(u.secondary.main,.62)),A(u.LinearProgress,"errorBg",we(u.error.main,.62)),A(u.LinearProgress,"infoBg",we(u.info.main,.62)),A(u.LinearProgress,"successBg",we(u.success.main,.62)),A(u.LinearProgress,"warningBg",we(u.warning.main,.62)),A(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),A(u.Slider,"primaryTrack",we(u.primary.main,.62)),A(u.Slider,"secondaryTrack",we(u.secondary.main,.62)),A(u.Slider,"errorTrack",we(u.error.main,.62)),A(u.Slider,"infoTrack",we(u.info.main,.62)),A(u.Slider,"successTrack",we(u.success.main,.62)),A(u.Slider,"warningTrack",we(u.warning.main,.62));const k=vn(u.background.default,.8);A(u.SnackbarContent,"bg",k),A(u.SnackbarContent,"color",ct(()=>u.getContrastText(k))),A(u.SpeedDialAction,"fabHoverBg",vn(u.background.paper,.15)),A(u.StepConnector,"border",D("palette-grey-400")),A(u.StepContent,"border",D("palette-grey-400")),A(u.Switch,"defaultColor",D("palette-common-white")),A(u.Switch,"defaultDisabledColor",D("palette-grey-100")),A(u.Switch,"primaryDisabledColor",we(u.primary.main,.62)),A(u.Switch,"secondaryDisabledColor",we(u.secondary.main,.62)),A(u.Switch,"errorDisabledColor",we(u.error.main,.62)),A(u.Switch,"infoDisabledColor",we(u.info.main,.62)),A(u.Switch,"successDisabledColor",we(u.success.main,.62)),A(u.Switch,"warningDisabledColor",we(u.warning.main,.62)),A(u.TableCell,"border",we(yn(u.divider,1),.88)),A(u.Tooltip,"bg",yn(u.grey[700],.92))}if(u.mode==="dark"){A(u.Alert,"errorColor",we(u.error.light,.6)),A(u.Alert,"infoColor",we(u.info.light,.6)),A(u.Alert,"successColor",we(u.success.light,.6)),A(u.Alert,"warningColor",we(u.warning.light,.6)),A(u.Alert,"errorFilledBg",D("palette-error-dark")),A(u.Alert,"infoFilledBg",D("palette-info-dark")),A(u.Alert,"successFilledBg",D("palette-success-dark")),A(u.Alert,"warningFilledBg",D("palette-warning-dark")),A(u.Alert,"errorFilledColor",ct(()=>u.getContrastText(u.error.dark))),A(u.Alert,"infoFilledColor",ct(()=>u.getContrastText(u.info.dark))),A(u.Alert,"successFilledColor",ct(()=>u.getContrastText(u.success.dark))),A(u.Alert,"warningFilledColor",ct(()=>u.getContrastText(u.warning.dark))),A(u.Alert,"errorStandardBg",be(u.error.light,.9)),A(u.Alert,"infoStandardBg",be(u.info.light,.9)),A(u.Alert,"successStandardBg",be(u.success.light,.9)),A(u.Alert,"warningStandardBg",be(u.warning.light,.9)),A(u.Alert,"errorIconColor",D("palette-error-main")),A(u.Alert,"infoIconColor",D("palette-info-main")),A(u.Alert,"successIconColor",D("palette-success-main")),A(u.Alert,"warningIconColor",D("palette-warning-main")),A(u.AppBar,"defaultBg",D("palette-grey-900")),A(u.AppBar,"darkBg",D("palette-background-paper")),A(u.AppBar,"darkColor",D("palette-text-primary")),A(u.Avatar,"defaultBg",D("palette-grey-600")),A(u.Button,"inheritContainedBg",D("palette-grey-800")),A(u.Button,"inheritContainedHoverBg",D("palette-grey-700")),A(u.Chip,"defaultBorder",D("palette-grey-700")),A(u.Chip,"defaultAvatarColor",D("palette-grey-300")),A(u.Chip,"defaultIconColor",D("palette-grey-300")),A(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),A(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),A(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),A(u.LinearProgress,"primaryBg",be(u.primary.main,.5)),A(u.LinearProgress,"secondaryBg",be(u.secondary.main,.5)),A(u.LinearProgress,"errorBg",be(u.error.main,.5)),A(u.LinearProgress,"infoBg",be(u.info.main,.5)),A(u.LinearProgress,"successBg",be(u.success.main,.5)),A(u.LinearProgress,"warningBg",be(u.warning.main,.5)),A(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),A(u.Slider,"primaryTrack",be(u.primary.main,.5)),A(u.Slider,"secondaryTrack",be(u.secondary.main,.5)),A(u.Slider,"errorTrack",be(u.error.main,.5)),A(u.Slider,"infoTrack",be(u.info.main,.5)),A(u.Slider,"successTrack",be(u.success.main,.5)),A(u.Slider,"warningTrack",be(u.warning.main,.5));const k=vn(u.background.default,.98);A(u.SnackbarContent,"bg",k),A(u.SnackbarContent,"color",ct(()=>u.getContrastText(k))),A(u.SpeedDialAction,"fabHoverBg",vn(u.background.paper,.15)),A(u.StepConnector,"border",D("palette-grey-600")),A(u.StepContent,"border",D("palette-grey-600")),A(u.Switch,"defaultColor",D("palette-grey-300")),A(u.Switch,"defaultDisabledColor",D("palette-grey-600")),A(u.Switch,"primaryDisabledColor",be(u.primary.main,.55)),A(u.Switch,"secondaryDisabledColor",be(u.secondary.main,.55)),A(u.Switch,"errorDisabledColor",be(u.error.main,.55)),A(u.Switch,"infoDisabledColor",be(u.info.main,.55)),A(u.Switch,"successDisabledColor",be(u.success.main,.55)),A(u.Switch,"warningDisabledColor",be(u.warning.main,.55)),A(u.TableCell,"border",be(yn(u.divider,1),.68)),A(u.Tooltip,"bg",yn(u.grey[700],.92))}vt(u.background,"default"),vt(u.background,"paper"),vt(u.common,"background"),vt(u.common,"onBackground"),vt(u,"divider"),Object.keys(u).forEach(k=>{const P=u[k];k!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&A(u[k],"mainChannel",qr(Br(P.main))),P.light&&A(u[k],"lightChannel",qr(Br(P.light))),P.dark&&A(u[k],"darkChannel",qr(Br(P.dark))),P.contrastText&&A(u[k],"contrastTextChannel",qr(Br(P.contrastText))),k==="text"&&(vt(u[k],"primary"),vt(u[k],"secondary")),k==="action"&&(P.active&&vt(u[k],"active"),P.selected&&vt(u[k],"selected")))})}),F=t.reduce((W,u)=>Qe(W,u),F);const b={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:bd(F)},{vars:V,generateThemeVars:K,generateStyleSheets:Y}=Wp(F,b);return F.vars=V,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([W,u])=>{F[W]=u}),F.generateThemeVars=K,F.generateStyleSheets=Y,F.generateSpacing=function(){return No(d.spacing,ia(this))},F.getColorSchemeSelector=Hp(o),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...Zn,...d==null?void 0:d.unstable_sxConfig},F.unstable_sx=function(u){return $r({sx:u,theme:this})},F.toRuntimeSource=Go,F}function xs(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ua({...r===!0?{}:r.palette,mode:t})})}function Od(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Mi(e,...t);let p=r;"palette"in e||d[o]&&(d[o]!==!0?p=d[o].palette:o==="dark"&&(p={mode:"dark"}));const f=Mi({...e,palette:p},...t);return f.defaultColorScheme=o,f.colorSchemes=d,f.palette.mode==="light"&&(f.colorSchemes.light={...d.light!==!0&&d.light,palette:f.palette},xs(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},xs(f,"light",d.light)),f}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),kd({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const Td=Od(),Cd="$$material";function _d(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ad=e=>_d(e)&&e!=="classes",Fd=_p({themeId:Cd,defaultTheme:Td,rootShouldForwardProp:Ad}),jd=Lp;process.env.NODE_ENV!=="production"&&(Z.node,Z.object.isRequired);function $d(e){return Np(e)}function Dd(e){return sa("MuiSvgIcon",e)}Ep("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rd=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${sr(t)}`,`fontSize${sr(r)}`]};return du(i,Dd,n)},Pd=Fd("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${sr(r.color)}`],t[`fontSize${sr(r.fontSize)}`]]}})(jd(({theme:e})=>{var t,r,n,i,a,s,o,l,d,p,f,m,x,h;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:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((p=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:p.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,c])=>c&&c.main).map(([c])=>{var w,y;return{props:{color:c},style:{color:(y=(w=(e.vars??e).palette)==null?void 0:w[c])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(m=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(h=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:h.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),In=Ce.forwardRef(function(t,r){const n=$d({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:p=!1,titleAccess:f,viewBox:m="0 0 24 24",...x}=n,h=Ce.isValidElement(i)&&i.type==="svg",c={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:m,hasSvgAsChild:h},w={};p||(w.viewBox=m);const y=Rd(c);return T.jsxs(Pd,{as:o,className:pu(y.root,a),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...w,...x,...h&&i.props,ownerState:c,children:[h?i.props.children:i,f?T.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(In.propTypes={children:Z.node,classes:Z.object,className:Z.string,color:Z.oneOfType([Z.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Z.string]),component:Z.elementType,fontSize:Z.oneOfType([Z.oneOf(["inherit","large","medium","small"]),Z.string]),htmlColor:Z.string,inheritViewBox:Z.bool,shapeRendering:Z.string,sx:Z.oneOfType([Z.arrayOf(Z.oneOfType([Z.func,Z.object,Z.bool])),Z.func,Z.object]),titleAccess:Z.string,viewBox:Z.string});In.muiName="SvgIcon";function on(e,t){function r(n,i){return T.jsx(In,{"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=In.muiName,Ce.memo(Ce.forwardRef(r))}const Id=on(T.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"),Md=on(T.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),zd=on(T.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"),Mn=on(T.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"),Jo=on(T.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");function lr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(p){try{d(n.next(p))}catch(f){s(f)}}function l(p){try{d(n.throw(p))}catch(f){s(f)}}function d(p){p.done?a(p.value):i(p.value).then(o,l)}d((n=n.apply(e,t||[])).next())})}const Vd=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 Dr(e,t,r){const n=Nd(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&bs(n,"path",a),bs(n,"relativePath",a),n}function Nd(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Vd.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function bs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Ld=[".DS_Store","Thumbs.db"];function qd(e){return lr(this,void 0,void 0,function*(){return zn(e)&&Bd(e.dataTransfer)?Kd(e.dataTransfer,e.type):Ud(e)?Wd(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Hd(e):[]})}function Bd(e){return zn(e)}function Ud(e){return zn(e)&&zn(e.target)}function zn(e){return typeof e=="object"&&e!==null}function Wd(e){return zi(e.target.files).map(t=>Dr(t))}function Hd(e){return lr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>Dr(r))})}function Kd(e,t){return lr(this,void 0,void 0,function*(){if(e.items){const r=zi(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Qd));return ws(Xo(n))}return ws(zi(e.files).map(r=>Dr(r)))})}function ws(e){return e.filter(t=>Ld.indexOf(t.name)===-1)}function zi(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 Qd(e){if(typeof e.webkitGetAsEntry!="function")return Ss(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?el(t):Ss(e,t)}function Xo(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Xo(r):[r]],[])}function Ss(e,t){return lr(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 s=yield a.getFile();return s.handle=a,Dr(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return Dr(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Gd(e){return lr(this,void 0,void 0,function*(){return e.isDirectory?el(e):Yd(e)})}function el(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>lr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Gd));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Yd(e){return lr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=Dr(n,e.fullPath);t(i)},n=>{r(n)})})})}var xn={},Es;function Zd(){return Es||(Es=1,xn.__esModule=!0,xn.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(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),xn}var Jd=Zd();const hi=ea(Jd);function ks(e){return tf(e)||ef(e)||rl(e)||Xd()}function Xd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
75
|
+
export default theme;`}function Mi(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:l,...f}=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.":Nt(20));const p=ua(a),d=Lo(e);let m=Qe(d,{mixins:rd(d.breakpoints,n),palette:p,shadows:ld.slice(),typography:id(p,o),transitions:dd(s),zIndex:{...fd}});if(m=Qe(m,f),m=t.reduce((b,h)=>Qe(b,h),m),process.env.NODE_ENV!=="production"){const b=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(c,x)=>{let v;for(v in c){const O=c[v];if(b.includes(v)&&Object.keys(O).length>0){if(process.env.NODE_ENV!=="production"){const j=sa("",v);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(c,null,2),"",`Instead, you need to use the '&.${j}' syntax:`,JSON.stringify({root:{[`&.${j}`]:O}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
76
|
+
`))}c[v]={}}}};Object.keys(m.components).forEach(c=>{const x=m.components[c].styleOverrides;x&&c.startsWith("Mui")&&h(x,c)})}return m.unstable_sxConfig={...Zn,...f==null?void 0:f.unstable_sxConfig},m.unstable_sx=function(h){return $r({sx:h,theme:this})},m.toRuntimeSource=Go,m}function hd(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 gd=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=hd(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Yo(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Zo(e){return e==="dark"?gd:[]}function yd(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=ua(t);return{palette:a,opacity:{...Yo(a.mode),...r},overlays:n||Zo(a.mode),...i}}function vd(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 xd=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],bd=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 s={};return xd(e.cssVarPrefix).forEach(o=>{s[o]=r[o],delete r[o]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:a?{[a.replace("%s",t)]:s,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}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 wd(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function _(e,t,r){!e[t]&&r&&(e[t]=r)}function Br(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ho(e)}function vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=qr(Br(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().
|
|
77
|
+
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 Sd(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},Ed=(e="mui")=>qp(e);function mi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=yd({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=Mi({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Yo(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Zo(i)},s}function kd(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=vd,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...f}=e,p=Object.keys(r)[0],d=n||(r.light&&p!=="light"?"light":p),m=Ed(a),{[d]:b,light:h,dark:c,...x}=r,v={...x};let O=b;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(O=!0),!O)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:Nt(21,d));const j=mi(v,O,f,d);h&&!v.light&&mi(v,h,void 0,"light"),c&&!v.dark&&mi(v,c,void 0,"dark");let A={defaultColorScheme:d,...j,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:m,colorSchemes:v,font:{...td(j.typography),...j.font},spacing:Sd(f.spacing)};Object.keys(A.colorSchemes).forEach(q=>{const u=A.colorSchemes[q].palette,$=k=>{const R=k.split("-"),z=R[1],B=R[2];return m(k,u[z][B])};if(u.mode==="light"&&(_(u.common,"background","#fff"),_(u.common,"onBackground","#000")),u.mode==="dark"&&(_(u.common,"background","#000"),_(u.common,"onBackground","#fff")),wd(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){_(u.Alert,"errorColor",be(u.error.light,.6)),_(u.Alert,"infoColor",be(u.info.light,.6)),_(u.Alert,"successColor",be(u.success.light,.6)),_(u.Alert,"warningColor",be(u.warning.light,.6)),_(u.Alert,"errorFilledBg",$("palette-error-main")),_(u.Alert,"infoFilledBg",$("palette-info-main")),_(u.Alert,"successFilledBg",$("palette-success-main")),_(u.Alert,"warningFilledBg",$("palette-warning-main")),_(u.Alert,"errorFilledColor",ct(()=>u.getContrastText(u.error.main))),_(u.Alert,"infoFilledColor",ct(()=>u.getContrastText(u.info.main))),_(u.Alert,"successFilledColor",ct(()=>u.getContrastText(u.success.main))),_(u.Alert,"warningFilledColor",ct(()=>u.getContrastText(u.warning.main))),_(u.Alert,"errorStandardBg",we(u.error.light,.9)),_(u.Alert,"infoStandardBg",we(u.info.light,.9)),_(u.Alert,"successStandardBg",we(u.success.light,.9)),_(u.Alert,"warningStandardBg",we(u.warning.light,.9)),_(u.Alert,"errorIconColor",$("palette-error-main")),_(u.Alert,"infoIconColor",$("palette-info-main")),_(u.Alert,"successIconColor",$("palette-success-main")),_(u.Alert,"warningIconColor",$("palette-warning-main")),_(u.AppBar,"defaultBg",$("palette-grey-100")),_(u.Avatar,"defaultBg",$("palette-grey-400")),_(u.Button,"inheritContainedBg",$("palette-grey-300")),_(u.Button,"inheritContainedHoverBg",$("palette-grey-A100")),_(u.Chip,"defaultBorder",$("palette-grey-400")),_(u.Chip,"defaultAvatarColor",$("palette-grey-700")),_(u.Chip,"defaultIconColor",$("palette-grey-700")),_(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),_(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),_(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),_(u.LinearProgress,"primaryBg",we(u.primary.main,.62)),_(u.LinearProgress,"secondaryBg",we(u.secondary.main,.62)),_(u.LinearProgress,"errorBg",we(u.error.main,.62)),_(u.LinearProgress,"infoBg",we(u.info.main,.62)),_(u.LinearProgress,"successBg",we(u.success.main,.62)),_(u.LinearProgress,"warningBg",we(u.warning.main,.62)),_(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),_(u.Slider,"primaryTrack",we(u.primary.main,.62)),_(u.Slider,"secondaryTrack",we(u.secondary.main,.62)),_(u.Slider,"errorTrack",we(u.error.main,.62)),_(u.Slider,"infoTrack",we(u.info.main,.62)),_(u.Slider,"successTrack",we(u.success.main,.62)),_(u.Slider,"warningTrack",we(u.warning.main,.62));const k=vn(u.background.default,.8);_(u.SnackbarContent,"bg",k),_(u.SnackbarContent,"color",ct(()=>u.getContrastText(k))),_(u.SpeedDialAction,"fabHoverBg",vn(u.background.paper,.15)),_(u.StepConnector,"border",$("palette-grey-400")),_(u.StepContent,"border",$("palette-grey-400")),_(u.Switch,"defaultColor",$("palette-common-white")),_(u.Switch,"defaultDisabledColor",$("palette-grey-100")),_(u.Switch,"primaryDisabledColor",we(u.primary.main,.62)),_(u.Switch,"secondaryDisabledColor",we(u.secondary.main,.62)),_(u.Switch,"errorDisabledColor",we(u.error.main,.62)),_(u.Switch,"infoDisabledColor",we(u.info.main,.62)),_(u.Switch,"successDisabledColor",we(u.success.main,.62)),_(u.Switch,"warningDisabledColor",we(u.warning.main,.62)),_(u.TableCell,"border",we(yn(u.divider,1),.88)),_(u.Tooltip,"bg",yn(u.grey[700],.92))}if(u.mode==="dark"){_(u.Alert,"errorColor",we(u.error.light,.6)),_(u.Alert,"infoColor",we(u.info.light,.6)),_(u.Alert,"successColor",we(u.success.light,.6)),_(u.Alert,"warningColor",we(u.warning.light,.6)),_(u.Alert,"errorFilledBg",$("palette-error-dark")),_(u.Alert,"infoFilledBg",$("palette-info-dark")),_(u.Alert,"successFilledBg",$("palette-success-dark")),_(u.Alert,"warningFilledBg",$("palette-warning-dark")),_(u.Alert,"errorFilledColor",ct(()=>u.getContrastText(u.error.dark))),_(u.Alert,"infoFilledColor",ct(()=>u.getContrastText(u.info.dark))),_(u.Alert,"successFilledColor",ct(()=>u.getContrastText(u.success.dark))),_(u.Alert,"warningFilledColor",ct(()=>u.getContrastText(u.warning.dark))),_(u.Alert,"errorStandardBg",be(u.error.light,.9)),_(u.Alert,"infoStandardBg",be(u.info.light,.9)),_(u.Alert,"successStandardBg",be(u.success.light,.9)),_(u.Alert,"warningStandardBg",be(u.warning.light,.9)),_(u.Alert,"errorIconColor",$("palette-error-main")),_(u.Alert,"infoIconColor",$("palette-info-main")),_(u.Alert,"successIconColor",$("palette-success-main")),_(u.Alert,"warningIconColor",$("palette-warning-main")),_(u.AppBar,"defaultBg",$("palette-grey-900")),_(u.AppBar,"darkBg",$("palette-background-paper")),_(u.AppBar,"darkColor",$("palette-text-primary")),_(u.Avatar,"defaultBg",$("palette-grey-600")),_(u.Button,"inheritContainedBg",$("palette-grey-800")),_(u.Button,"inheritContainedHoverBg",$("palette-grey-700")),_(u.Chip,"defaultBorder",$("palette-grey-700")),_(u.Chip,"defaultAvatarColor",$("palette-grey-300")),_(u.Chip,"defaultIconColor",$("palette-grey-300")),_(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),_(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),_(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),_(u.LinearProgress,"primaryBg",be(u.primary.main,.5)),_(u.LinearProgress,"secondaryBg",be(u.secondary.main,.5)),_(u.LinearProgress,"errorBg",be(u.error.main,.5)),_(u.LinearProgress,"infoBg",be(u.info.main,.5)),_(u.LinearProgress,"successBg",be(u.success.main,.5)),_(u.LinearProgress,"warningBg",be(u.warning.main,.5)),_(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),_(u.Slider,"primaryTrack",be(u.primary.main,.5)),_(u.Slider,"secondaryTrack",be(u.secondary.main,.5)),_(u.Slider,"errorTrack",be(u.error.main,.5)),_(u.Slider,"infoTrack",be(u.info.main,.5)),_(u.Slider,"successTrack",be(u.success.main,.5)),_(u.Slider,"warningTrack",be(u.warning.main,.5));const k=vn(u.background.default,.98);_(u.SnackbarContent,"bg",k),_(u.SnackbarContent,"color",ct(()=>u.getContrastText(k))),_(u.SpeedDialAction,"fabHoverBg",vn(u.background.paper,.15)),_(u.StepConnector,"border",$("palette-grey-600")),_(u.StepContent,"border",$("palette-grey-600")),_(u.Switch,"defaultColor",$("palette-grey-300")),_(u.Switch,"defaultDisabledColor",$("palette-grey-600")),_(u.Switch,"primaryDisabledColor",be(u.primary.main,.55)),_(u.Switch,"secondaryDisabledColor",be(u.secondary.main,.55)),_(u.Switch,"errorDisabledColor",be(u.error.main,.55)),_(u.Switch,"infoDisabledColor",be(u.info.main,.55)),_(u.Switch,"successDisabledColor",be(u.success.main,.55)),_(u.Switch,"warningDisabledColor",be(u.warning.main,.55)),_(u.TableCell,"border",be(yn(u.divider,1),.68)),_(u.Tooltip,"bg",yn(u.grey[700],.92))}vt(u.background,"default"),vt(u.background,"paper"),vt(u.common,"background"),vt(u.common,"onBackground"),vt(u,"divider"),Object.keys(u).forEach(k=>{const R=u[k];k!=="tonalOffset"&&R&&typeof R=="object"&&(R.main&&_(u[k],"mainChannel",qr(Br(R.main))),R.light&&_(u[k],"lightChannel",qr(Br(R.light))),R.dark&&_(u[k],"darkChannel",qr(Br(R.dark))),R.contrastText&&_(u[k],"contrastTextChannel",qr(Br(R.contrastText))),k==="text"&&(vt(u[k],"primary"),vt(u[k],"secondary")),k==="action"&&(R.active&&vt(u[k],"active"),R.selected&&vt(u[k],"selected")))})}),A=t.reduce((q,u)=>Qe(q,u),A);const w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:bd(A)},{vars:V,generateThemeVars:Q,generateStyleSheets:X}=Wp(A,w);return A.vars=V,Object.entries(A.colorSchemes[A.defaultColorScheme]).forEach(([q,u])=>{A[q]=u}),A.generateThemeVars=Q,A.generateStyleSheets=X,A.generateSpacing=function(){return No(f.spacing,ia(this))},A.getColorSchemeSelector=Hp(o),A.spacing=A.generateSpacing(),A.shouldSkipGeneratingVar=s,A.unstable_sxConfig={...Zn,...f==null?void 0:f.unstable_sxConfig},A.unstable_sx=function(u){return $r({sx:u,theme:this})},A.toRuntimeSource=Go,A}function xs(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ua({...r===!0?{}:r.palette,mode:t})})}function Od(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],f={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Mi(e,...t);let p=r;"palette"in e||f[o]&&(f[o]!==!0?p=f[o].palette:o==="dark"&&(p={mode:"dark"}));const d=Mi({...e,palette:p},...t);return d.defaultColorScheme=o,d.colorSchemes=f,d.palette.mode==="light"&&(d.colorSchemes.light={...f.light!==!0&&f.light,palette:d.palette},xs(d,"dark",f.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:d.palette},xs(d,"light",f.light)),d}return!r&&!("light"in f)&&o==="light"&&(f.light=!0),kd({...s,colorSchemes:f,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const Td=Od(),Cd="$$material";function _d(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ad=e=>_d(e)&&e!=="classes",Fd=_p({themeId:Cd,defaultTheme:Td,rootShouldForwardProp:Ad}),jd=Lp;process.env.NODE_ENV!=="production"&&(J.node,J.object.isRequired);function $d(e){return Np(e)}function Dd(e){return sa("MuiSvgIcon",e)}Ep("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rd=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${sr(t)}`,`fontSize${sr(r)}`]};return du(i,Dd,n)},Pd=Fd("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${sr(r.color)}`],t[`fontSize${sr(r.fontSize)}`]]}})(jd(({theme:e})=>{var t,r,n,i,a,s,o,l,f,p,d,m,b,h;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:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((p=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:p.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,c])=>c&&c.main).map(([c])=>{var x,v;return{props:{color:c},style:{color:(v=(x=(e.vars??e).palette)==null?void 0:x[c])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(h=(b=(e.vars??e).palette)==null?void 0:b.action)==null?void 0:h.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),In=Ce.forwardRef(function(t,r){const n=$d({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:d,viewBox:m="0 0 24 24",...b}=n,h=Ce.isValidElement(i)&&i.type==="svg",c={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:m,hasSvgAsChild:h},x={};p||(x.viewBox=m);const v=Rd(c);return T.jsxs(Pd,{as:o,className:pu(v.root,a),focusable:"false",color:f,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...x,...b,...h&&i.props,ownerState:c,children:[h?i.props.children:i,d?T.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(In.propTypes={children:J.node,classes:J.object,className:J.string,color:J.oneOfType([J.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),J.string]),component:J.elementType,fontSize:J.oneOfType([J.oneOf(["inherit","large","medium","small"]),J.string]),htmlColor:J.string,inheritViewBox:J.bool,shapeRendering:J.string,sx:J.oneOfType([J.arrayOf(J.oneOfType([J.func,J.object,J.bool])),J.func,J.object]),titleAccess:J.string,viewBox:J.string});In.muiName="SvgIcon";function on(e,t){function r(n,i){return T.jsx(In,{"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=In.muiName,Ce.memo(Ce.forwardRef(r))}const Id=on(T.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"),Md=on(T.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),zd=on(T.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"),Mn=on(T.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"),Jo=on(T.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");function lr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(p){try{f(n.next(p))}catch(d){s(d)}}function l(p){try{f(n.throw(p))}catch(d){s(d)}}function f(p){p.done?a(p.value):i(p.value).then(o,l)}f((n=n.apply(e,t||[])).next())})}const Vd=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 Dr(e,t,r){const n=Nd(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&bs(n,"path",a),bs(n,"relativePath",a),n}function Nd(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Vd.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function bs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Ld=[".DS_Store","Thumbs.db"];function qd(e){return lr(this,void 0,void 0,function*(){return zn(e)&&Bd(e.dataTransfer)?Kd(e.dataTransfer,e.type):Ud(e)?Wd(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Hd(e):[]})}function Bd(e){return zn(e)}function Ud(e){return zn(e)&&zn(e.target)}function zn(e){return typeof e=="object"&&e!==null}function Wd(e){return zi(e.target.files).map(t=>Dr(t))}function Hd(e){return lr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>Dr(r))})}function Kd(e,t){return lr(this,void 0,void 0,function*(){if(e.items){const r=zi(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Qd));return ws(Xo(n))}return ws(zi(e.files).map(r=>Dr(r)))})}function ws(e){return e.filter(t=>Ld.indexOf(t.name)===-1)}function zi(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 Qd(e){if(typeof e.webkitGetAsEntry!="function")return Ss(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?el(t):Ss(e,t)}function Xo(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Xo(r):[r]],[])}function Ss(e,t){return lr(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 s=yield a.getFile();return s.handle=a,Dr(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return Dr(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Gd(e){return lr(this,void 0,void 0,function*(){return e.isDirectory?el(e):Yd(e)})}function el(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>lr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Gd));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Yd(e){return lr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=Dr(n,e.fullPath);t(i)},n=>{r(n)})})})}var xn={},Es;function Zd(){return Es||(Es=1,xn.__esModule=!0,xn.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(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),xn}var Jd=Zd();const hi=ea(Jd);function ks(e){return tf(e)||ef(e)||rl(e)||Xd()}function Xd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
78
78
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ef(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tf(e){if(Array.isArray(e))return Vi(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 Ts(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){tl(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 tl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yr(e,t){return af(e)||nf(e,t)||rl(e,t)||rf()}function rf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rl(e,t){if(e){if(typeof e=="string")return Vi(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 Vi(e,t)}}function Vi(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 nf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function af(e){if(Array.isArray(e))return e}var sf=typeof hi=="function"?hi:hi.default,of="file-invalid-type",lf="file-too-large",cf="file-too-small",uf="too-many-files",pf=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:of,message:"File type must be ".concat(n)}},Cs=function(t){return{code:lf,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_s=function(t){return{code:cf,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},df={code:uf,message:"Too many files"};function nl(e,t){var r=e.type==="application/x-moz-file"||sf(e,t);return[r,r?null:pf(t)]}function il(e,t,r){if(Kt(e.size))if(Kt(t)&&Kt(r)){if(e.size>r)return[!1,Cs(r)];if(e.size<t)return[!1,_s(t)]}else{if(Kt(t)&&e.size<t)return[!1,_s(t)];if(Kt(r)&&e.size>r)return[!1,Cs(r)]}return[!0,null]}function Kt(e){return e!=null}function ff(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,s=e.maxFiles,o=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(l){var
|
|
79
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rl(e,t){if(e){if(typeof e=="string")return Vi(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 Vi(e,t)}}function Vi(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 nf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function af(e){if(Array.isArray(e))return e}var sf=typeof hi=="function"?hi:hi.default,of="file-invalid-type",lf="file-too-large",cf="file-too-small",uf="too-many-files",pf=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:of,message:"File type must be ".concat(n)}},Cs=function(t){return{code:lf,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_s=function(t){return{code:cf,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},df={code:uf,message:"Too many files"};function nl(e,t){var r=e.type==="application/x-moz-file"||sf(e,t);return[r,r?null:pf(t)]}function il(e,t,r){if(Kt(e.size))if(Kt(t)&&Kt(r)){if(e.size>r)return[!1,Cs(r)];if(e.size<t)return[!1,_s(t)]}else{if(Kt(t)&&e.size<t)return[!1,_s(t)];if(Kt(r)&&e.size>r)return[!1,Cs(r)]}return[!0,null]}function Kt(e){return e!=null}function ff(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,s=e.maxFiles,o=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(l){var f=nl(l,r),p=Yr(f,1),d=p[0],m=il(l,n,i),b=Yr(m,1),h=b[0],c=o?o(l):null;return d&&h&&!c})}function Vn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function bn(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 As(e){e.preventDefault()}function mf(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function hf(e){return e.indexOf("Edge/")!==-1}function gf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mf(e)||hf(e)}function ut(){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),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(function(o){return!Vn(n)&&o&&o.apply(void 0,[n].concat(a)),Vn(n)})}}function yf(){return"showOpenFilePicker"in window}function vf(e){if(Kt(e)){var t=Object.entries(e).filter(function(r){var n=Yr(r,2),i=n[0],a=n[1],s=!0;return al(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.')),s=!1),(!Array.isArray(a)||!a.every(sl))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(r,n){var i=Yr(n,2),a=i[0],s=i[1];return Ts(Ts({},r),{},tl({},a,s))},{});return[{description:"Files",accept:t}]}return e}function xf(e){if(Kt(e))return Object.entries(e).reduce(function(t,r){var n=Yr(r,2),i=n[0],a=n[1];return[].concat(ks(t),[i],ks(a))},[]).filter(function(t){return al(t)||sl(t)}).join(",")}function bf(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function wf(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function al(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function sl(e){return/^.*\.[\w]+$/.test(e)}var Sf=["children"],Ef=["open"],kf=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Of=["refKey","onChange","onClick"];function Tf(e){return Af(e)||_f(e)||ol(e)||Cf()}function Cf(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
80
80
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _f(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Af(e){if(Array.isArray(e))return Ni(e)}function gi(e,t){return $f(e)||jf(e,t)||ol(e,t)||Ff()}function Ff(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ol(e,t){if(e){if(typeof e=="string")return Ni(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 Ni(e,t)}}function Ni(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 jf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function $f(e){if(Array.isArray(e))return e}function Fs(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 Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fs(Object(r),!0).forEach(function(n){Li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e,t){if(e==null)return{};var r=Df(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 Df(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 pa=M.forwardRef(function(e,t){var r=e.children,n=Nn(e,Sf),i=cl(n),a=i.open,s=Nn(i,Ef);return M.useImperativeHandle(t,function(){return{open:a}},[a]),M.createElement(M.Fragment,null,r(Ee(Ee({},s),{},{open:a})))});pa.displayName="Dropzone";var ll={disabled:!1,getFilesFromEvent:qd,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};pa.defaultProps=ll;pa.propTypes={children:Z.func,accept:Z.objectOf(Z.arrayOf(Z.string)),multiple:Z.bool,preventDropOnDocument:Z.bool,noClick:Z.bool,noKeyboard:Z.bool,noDrag:Z.bool,noDragEventsBubbling:Z.bool,minSize:Z.number,maxSize:Z.number,maxFiles:Z.number,disabled:Z.bool,getFilesFromEvent:Z.func,onFileDialogCancel:Z.func,onFileDialogOpen:Z.func,useFsAccessApi:Z.bool,autoFocus:Z.bool,onDragEnter:Z.func,onDragLeave:Z.func,onDragOver:Z.func,onDrop:Z.func,onDropAccepted:Z.func,onDropRejected:Z.func,onError:Z.func,validator:Z.func};var qi={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ee(Ee({},ll),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,d=t.onDragEnter,p=t.onDragLeave,f=t.onDragOver,m=t.onDrop,x=t.onDropAccepted,h=t.onDropRejected,c=t.onFileDialogCancel,w=t.onFileDialogOpen,y=t.useFsAccessApi,O=t.autoFocus,$=t.preventDropOnDocument,F=t.noClick,b=t.noKeyboard,V=t.noDrag,K=t.noDragEventsBubbling,Y=t.onError,W=t.validator,u=M.useMemo(function(){return xf(r)},[r]),D=M.useMemo(function(){return vf(r)},[r]),k=M.useMemo(function(){return typeof w=="function"?w:js},[w]),P=M.useMemo(function(){return typeof c=="function"?c:js},[c]),z=M.useRef(null),L=M.useRef(null),U=M.useReducer(Rf,qi),ue=gi(U,2),X=ue[0],ee=ue[1],R=X.isFocused,C=X.isFileDialogActive,re=M.useRef(typeof window<"u"&&window.isSecureContext&&y&&yf()),J=function(){!re.current&&C&&setTimeout(function(){if(L.current){var _=L.current.files;_.length||(ee({type:"closeDialog"}),P())}},300)};M.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[L,C,P,re]);var Q=M.useRef([]),te=function(_){z.current&&z.current.contains(_.target)||(_.preventDefault(),Q.current=[])};M.useEffect(function(){return $&&(document.addEventListener("dragover",As,!1),document.addEventListener("drop",te,!1)),function(){$&&(document.removeEventListener("dragover",As),document.removeEventListener("drop",te))}},[z,$]),M.useEffect(function(){return!n&&O&&z.current&&z.current.focus(),function(){}},[z,O,n]);var ae=M.useCallback(function(E){Y?Y(E):console.error(E)},[Y]),se=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E),Q.current=[].concat(Tf(Q.current),[E.target]),bn(E)&&Promise.resolve(i(E)).then(function(_){if(!(Vn(E)&&!K)){var B=_.length,ne=B>0&&ff({files:_,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:W}),le=B>0&&!ne;ee({isDragAccept:ne,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),d&&d(E)}}).catch(function(_){return ae(_)})},[i,d,ae,K,u,s,a,o,l,W]),ce=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E);var _=bn(E);if(_&&E.dataTransfer)try{E.dataTransfer.dropEffect="copy"}catch{}return _&&f&&f(E),!1},[f,K]),pe=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E);var _=Q.current.filter(function(ne){return z.current&&z.current.contains(ne)}),B=_.indexOf(E.target);B!==-1&&_.splice(B,1),Q.current=_,!(_.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),bn(E)&&p&&p(E))},[z,p,K]),oe=M.useCallback(function(E,_){var B=[],ne=[];E.forEach(function(le){var De=nl(le,u),tt=gi(De,2),Ye=tt[0],Rr=tt[1],Ut=il(le,s,a),Ot=gi(Ut,2),Pr=Ot[0],cr=Ot[1],Ir=W?W(le):null;if(Ye&&Pr&&!Ir)B.push(le);else{var ur=[Rr,cr];Ir&&(ur=ur.concat(Ir)),ne.push({file:le,errors:ur.filter(function(pl){return pl})})}}),(!o&&B.length>1||o&&l>=1&&B.length>l)&&(B.forEach(function(le){ne.push({file:le,errors:[df]})}),B.splice(0)),ee({acceptedFiles:B,fileRejections:ne,isDragReject:ne.length>0,type:"setFiles"}),m&&m(B,ne,_),ne.length>0&&h&&h(ne,_),B.length>0&&x&&x(B,_)},[ee,o,u,s,a,l,m,x,h,W]),_e=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E),Q.current=[],bn(E)&&Promise.resolve(i(E)).then(function(_){Vn(E)&&!K||oe(_,E)}).catch(function(_){return ae(_)}),ee({type:"reset"})},[i,oe,ae,K]),N=M.useCallback(function(){if(re.current){ee({type:"openDialog"}),k();var E={multiple:o,types:D};window.showOpenFilePicker(E).then(function(_){return i(_)}).then(function(_){oe(_,null),ee({type:"closeDialog"})}).catch(function(_){bf(_)?(P(_),ee({type:"closeDialog"})):wf(_)?(re.current=!1,L.current?(L.current.value=null,L.current.click()):ae(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."))):ae(_)});return}L.current&&(ee({type:"openDialog"}),k(),L.current.value=null,L.current.click())},[ee,k,P,y,oe,ae,D,o]),Me=M.useCallback(function(E){!z.current||!z.current.isEqualNode(E.target)||(E.key===" "||E.key==="Enter"||E.keyCode===32||E.keyCode===13)&&(E.preventDefault(),N())},[z,N]),ot=M.useCallback(function(){ee({type:"focus"})},[]),Et=M.useCallback(function(){ee({type:"blur"})},[]),ln=M.useCallback(function(){F||(gf()?setTimeout(N,0):N())},[F,N]),kt=function(_){return n?null:_},cn=function(_){return b?null:kt(_)},Bt=function(_){return V?null:kt(_)},g=function(_){K&&_.stopPropagation()},S=M.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=E.refKey,B=_===void 0?"ref":_,ne=E.role,le=E.onKeyDown,De=E.onFocus,tt=E.onBlur,Ye=E.onClick,Rr=E.onDragEnter,Ut=E.onDragOver,Ot=E.onDragLeave,Pr=E.onDrop,cr=Nn(E,kf);return Ee(Ee(Li({onKeyDown:cn(ut(le,Me)),onFocus:cn(ut(De,ot)),onBlur:cn(ut(tt,Et)),onClick:kt(ut(Ye,ln)),onDragEnter:Bt(ut(Rr,se)),onDragOver:Bt(ut(Ut,ce)),onDragLeave:Bt(ut(Ot,pe)),onDrop:Bt(ut(Pr,_e)),role:typeof ne=="string"&&ne!==""?ne:"presentation"},B,z),!n&&!b?{tabIndex:0}:{}),cr)}},[z,Me,ot,Et,ln,se,ce,pe,_e,b,V,n]),j=M.useCallback(function(E){E.stopPropagation()},[]),H=M.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=E.refKey,B=_===void 0?"ref":_,ne=E.onChange,le=E.onClick,De=Nn(E,Of),tt=Li({accept:u,multiple:o,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:kt(ut(ne,_e)),onClick:kt(ut(le,j)),tabIndex:-1},B,L);return Ee(Ee({},tt),De)}},[L,r,o,_e,n]);return Ee(Ee({},X),{},{isFocused:R&&!n,getRootProps:S,getInputProps:H,rootRef:z,inputRef:L,open:kt(N)})}function Rf(e,t){switch(t.type){case"focus":return Ee(Ee({},e),{},{isFocused:!0});case"blur":return Ee(Ee({},e),{},{isFocused:!1});case"openDialog":return Ee(Ee({},qi),{},{isFileDialogActive:!0});case"closeDialog":return Ee(Ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ee(Ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ee(Ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ee({},qi);default:return e}}function js(){}const ul=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?T.jsx(Jo,{}):e.file.type.includes("pdf")?T.jsx(Mn,{}):T.jsx(Mn,{}),n=()=>{switch(e.status){case"success":return T.jsx(Id,{color:"success"});case"uploading":return T.jsx(I.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return T.jsxs(I.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[T.jsxs(I.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),T.jsxs(I.Box,{sx:{flex:1,minWidth:0},children:[T.jsx(I.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),T.jsxs(I.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),T.jsx(I.Tooltip,{title:"Remove file",children:T.jsx(I.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:T.jsx(zd,{})})})]})},Pf=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s})=>{const[o,l]=M.useState(t),[d,p]=M.useState([]),[f,m]=M.useState(!1),[x,h]=M.useState(!1),[c,w]=M.useState([]),y=M.useRef(null);M.useEffect(()=>{l(t)},[t]);const O=M.useCallback(k=>e.fileTypes.some(z=>{if(z.includes("*")){const L=z.split("/")[0];return k.type.startsWith(L)}return k.type===z})?e.maxSize&&k.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${k.type} is not allowed. Allowed types: ${e.fileTypes.join(", ")}`,[e]),$=M.useCallback(async k=>{console.log("handleFiles called with:",k.length,"files"),m(!0);const P=[],z=[];try{for(const U of k){let ue=null;if(e.multiple&&o.some(ee=>ee.file.name===U.name&&ee.file.size===U.size&&ee.file.lastModified===U.lastModified)){z.push(`${U.name}: File already exists`);continue}if(ue=O(U),!ue&&e.customValidation)try{const X=e.customValidation(U);X instanceof Promise?ue=await X:ue=X}catch(X){ue=`Custom validation failed: ${X instanceof Error?X.message:"Unknown error"}`}if(ue)z.push(`${U.name}: ${ue}`);else{const X={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:U,preview:U.type.startsWith("image/")?URL.createObjectURL(U):void 0,progress:0,status:"pending",uploadedAt:new Date};P.push(X)}}const L=e.multiple?[...o,...P]:P;l(L),r==null||r(L),z.length>0?(w(z),p(z)):(w([]),p([]))}catch(L){const U=`Unexpected error: ${L instanceof Error?L.message:"Unknown error"}`;w([U]),p([U])}},[o,e.multiple,O,e.customValidation,r]),F=M.useCallback(k=>{m(!0);const P=o.filter(z=>z.id!==k);l(P),r==null||r(P),w([]),y.current&&(y.current.value="")},[o,r]),b=M.useCallback(()=>{if(e.required&&o.length===0){p([`${e.title} is required`]);return}w([]),h(!0);const k=o.filter(P=>P.status!=="error");n==null||n(k)},[o,n,e.required,e.title]),{getRootProps:V,getInputProps:K,isDragActive:Y}=cl({onDrop:$,multiple:e.multiple,disabled:i,noClick:!1,noKeyboard:!1}),W=k=>k.startsWith("image/")?T.jsx(Jo,{}):k.includes("pdf")?T.jsx(Mn,{}):T.jsx(Mn,{}),u=e.fileTypes.map(k=>k.replace("*","all")).join(", ");M.useEffect(()=>{if(!f)return;const k=[],P=[...c,...k];P.length>0?p(P):p([])},[o,e.required,e.title,f,x,c]);const D=()=>{var k;switch(((k=e.submitButton)==null?void 0:k.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return T.jsxs(I.Box,{className:a,style:s,children:[T.jsxs(I.Typography,{variant:"h6",gutterBottom:!0,children:[e.title,e.required&&T.jsx("span",{style:{color:"red"},children:" *"})]}),e.description&&T.jsx(I.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e.description}),M.createElement(I.Paper,{...V(),key:`dropzone-${o.length}`,sx:{border:"2px dashed",borderColor:Y?"primary.main":"grey.300",backgroundColor:Y?"action.hover":"background.paper",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"}}},T.jsx("input",{...K(),ref:y}),T.jsx(Md,{sx:{fontSize:48,color:"text.secondary",mb:2}}),T.jsx(I.Typography,{variant:"h6",gutterBottom:!0,children:Y?"Drop files here":"Drag & drop files here"}),T.jsxs(I.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:["or ",T.jsx(I.Button,{variant:"text",disabled:i,onClick:k=>{var P;k.stopPropagation(),(P=y.current)==null||P.click()},children:"browse files"})]}),T.jsxs(I.Box,{sx:{mt:2},children:[T.jsx(I.Chip,{icon:W(e.fileTypes[0]),label:`Accepted: ${u}`,variant:"outlined",size:"small"}),e.maxSize&&T.jsx(I.Chip,{label:`Max size: ${(e.maxSize/(1024*1024)).toFixed(1)}MB`,variant:"outlined",size:"small",sx:{ml:1}})]})),d.length>0&&T.jsx(I.Alert,{severity:"error",sx:{mt:2},children:d.map((k,P)=>T.jsx(I.Typography,{variant:"body2",children:k},P))}),o.length>0&&T.jsxs(I.Box,{sx:{mt:2},children:[T.jsxs(I.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",o.length,")"]}),o.map(k=>T.jsx(ul,{file:k,onRemove:F},k.id))]}),e.helperText&&T.jsx(I.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),e.submitButton&&T.jsx(I.Box,{sx:{mt:3,display:"flex",justifyContent:D()},children:T.jsx(I.Button,{variant:"contained",onClick:b,disabled:i||e.submitButton.disabled||o.length===0,startIcon:e.submitButton.loading?T.jsx(I.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Do;exports.DocumentUpload=Pf;exports.FieldRenderer=ho;exports.FilePreview=ul;exports.FinForm=Xc;exports.ImageComponent=po;exports.StepNavigation=$o;exports.fetchApiData=fo;exports.generateSchema=jo;exports.getApiConfig=Xi;exports.hasApiConfig=Ht;exports.shouldShowField=yc;exports.useApiData=mo;
|
|
81
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ol(e,t){if(e){if(typeof e=="string")return Ni(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 Ni(e,t)}}function Ni(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 jf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function $f(e){if(Array.isArray(e))return e}function Fs(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 Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fs(Object(r),!0).forEach(function(n){Li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e,t){if(e==null)return{};var r=Df(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 Df(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 pa=M.forwardRef(function(e,t){var r=e.children,n=Nn(e,Sf),i=cl(n),a=i.open,s=Nn(i,Ef);return M.useImperativeHandle(t,function(){return{open:a}},[a]),M.createElement(M.Fragment,null,r(Ee(Ee({},s),{},{open:a})))});pa.displayName="Dropzone";var ll={disabled:!1,getFilesFromEvent:qd,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};pa.defaultProps=ll;pa.propTypes={children:J.func,accept:J.objectOf(J.arrayOf(J.string)),multiple:J.bool,preventDropOnDocument:J.bool,noClick:J.bool,noKeyboard:J.bool,noDrag:J.bool,noDragEventsBubbling:J.bool,minSize:J.number,maxSize:J.number,maxFiles:J.number,disabled:J.bool,getFilesFromEvent:J.func,onFileDialogCancel:J.func,onFileDialogOpen:J.func,useFsAccessApi:J.bool,autoFocus:J.bool,onDragEnter:J.func,onDragLeave:J.func,onDragOver:J.func,onDrop:J.func,onDropAccepted:J.func,onDropRejected:J.func,onError:J.func,validator:J.func};var qi={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ee(Ee({},ll),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,f=t.onDragEnter,p=t.onDragLeave,d=t.onDragOver,m=t.onDrop,b=t.onDropAccepted,h=t.onDropRejected,c=t.onFileDialogCancel,x=t.onFileDialogOpen,v=t.useFsAccessApi,O=t.autoFocus,j=t.preventDropOnDocument,A=t.noClick,w=t.noKeyboard,V=t.noDrag,Q=t.noDragEventsBubbling,X=t.onError,q=t.validator,u=M.useMemo(function(){return xf(r)},[r]),$=M.useMemo(function(){return vf(r)},[r]),k=M.useMemo(function(){return typeof x=="function"?x:js},[x]),R=M.useMemo(function(){return typeof c=="function"?c:js},[c]),z=M.useRef(null),B=M.useRef(null),H=M.useReducer(Rf,qi),ue=gi(H,2),re=ue[0],ee=ue[1],D=re.isFocused,N=re.isFileDialogActive,P=M.useRef(typeof window<"u"&&window.isSecureContext&&v&&yf()),ne=function(){!P.current&&N&&setTimeout(function(){if(B.current){var C=B.current.files;C.length||(ee({type:"closeDialog"}),R())}},300)};M.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[B,N,R,P]);var Y=M.useRef([]),te=function(C){z.current&&z.current.contains(C.target)||(C.preventDefault(),Y.current=[])};M.useEffect(function(){return j&&(document.addEventListener("dragover",As,!1),document.addEventListener("drop",te,!1)),function(){j&&(document.removeEventListener("dragover",As),document.removeEventListener("drop",te))}},[z,j]),M.useEffect(function(){return!n&&O&&z.current&&z.current.focus(),function(){}},[z,O,n]);var Z=M.useCallback(function(E){X?X(E):console.error(E)},[X]),se=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E),Y.current=[].concat(Tf(Y.current),[E.target]),bn(E)&&Promise.resolve(i(E)).then(function(C){if(!(Vn(E)&&!Q)){var W=C.length,ie=W>0&&ff({files:C,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:q}),le=W>0&&!ie;ee({isDragAccept:ie,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),f&&f(E)}}).catch(function(C){return Z(C)})},[i,f,Z,Q,u,s,a,o,l,q]),ce=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E);var C=bn(E);if(C&&E.dataTransfer)try{E.dataTransfer.dropEffect="copy"}catch{}return C&&d&&d(E),!1},[d,Q]),pe=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E);var C=Y.current.filter(function(ie){return z.current&&z.current.contains(ie)}),W=C.indexOf(E.target);W!==-1&&C.splice(W,1),Y.current=C,!(C.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),bn(E)&&p&&p(E))},[z,p,Q]),oe=M.useCallback(function(E,C){var W=[],ie=[];E.forEach(function(le){var De=nl(le,u),tt=gi(De,2),Ye=tt[0],Rr=tt[1],Ut=il(le,s,a),Ot=gi(Ut,2),Pr=Ot[0],cr=Ot[1],Ir=q?q(le):null;if(Ye&&Pr&&!Ir)W.push(le);else{var ur=[Rr,cr];Ir&&(ur=ur.concat(Ir)),ie.push({file:le,errors:ur.filter(function(pl){return pl})})}}),(!o&&W.length>1||o&&l>=1&&W.length>l)&&(W.forEach(function(le){ie.push({file:le,errors:[df]})}),W.splice(0)),ee({acceptedFiles:W,fileRejections:ie,isDragReject:ie.length>0,type:"setFiles"}),m&&m(W,ie,C),ie.length>0&&h&&h(ie,C),W.length>0&&b&&b(W,C)},[ee,o,u,s,a,l,m,b,h,q]),_e=M.useCallback(function(E){E.preventDefault(),E.persist(),g(E),Y.current=[],bn(E)&&Promise.resolve(i(E)).then(function(C){Vn(E)&&!Q||oe(C,E)}).catch(function(C){return Z(C)}),ee({type:"reset"})},[i,oe,Z,Q]),L=M.useCallback(function(){if(P.current){ee({type:"openDialog"}),k();var E={multiple:o,types:$};window.showOpenFilePicker(E).then(function(C){return i(C)}).then(function(C){oe(C,null),ee({type:"closeDialog"})}).catch(function(C){bf(C)?(R(C),ee({type:"closeDialog"})):wf(C)?(P.current=!1,B.current?(B.current.value=null,B.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(C)});return}B.current&&(ee({type:"openDialog"}),k(),B.current.value=null,B.current.click())},[ee,k,R,v,oe,Z,$,o]),Me=M.useCallback(function(E){!z.current||!z.current.isEqualNode(E.target)||(E.key===" "||E.key==="Enter"||E.keyCode===32||E.keyCode===13)&&(E.preventDefault(),L())},[z,L]),ot=M.useCallback(function(){ee({type:"focus"})},[]),Et=M.useCallback(function(){ee({type:"blur"})},[]),ln=M.useCallback(function(){A||(gf()?setTimeout(L,0):L())},[A,L]),kt=function(C){return n?null:C},cn=function(C){return w?null:kt(C)},Bt=function(C){return V?null:kt(C)},g=function(C){Q&&C.stopPropagation()},S=M.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=E.refKey,W=C===void 0?"ref":C,ie=E.role,le=E.onKeyDown,De=E.onFocus,tt=E.onBlur,Ye=E.onClick,Rr=E.onDragEnter,Ut=E.onDragOver,Ot=E.onDragLeave,Pr=E.onDrop,cr=Nn(E,kf);return Ee(Ee(Li({onKeyDown:cn(ut(le,Me)),onFocus:cn(ut(De,ot)),onBlur:cn(ut(tt,Et)),onClick:kt(ut(Ye,ln)),onDragEnter:Bt(ut(Rr,se)),onDragOver:Bt(ut(Ut,ce)),onDragLeave:Bt(ut(Ot,pe)),onDrop:Bt(ut(Pr,_e)),role:typeof ie=="string"&&ie!==""?ie:"presentation"},W,z),!n&&!w?{tabIndex:0}:{}),cr)}},[z,Me,ot,Et,ln,se,ce,pe,_e,w,V,n]),F=M.useCallback(function(E){E.stopPropagation()},[]),K=M.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=E.refKey,W=C===void 0?"ref":C,ie=E.onChange,le=E.onClick,De=Nn(E,Of),tt=Li({accept:u,multiple:o,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:kt(ut(ie,_e)),onClick:kt(ut(le,F)),tabIndex:-1},W,B);return Ee(Ee({},tt),De)}},[B,r,o,_e,n]);return Ee(Ee({},re),{},{isFocused:D&&!n,getRootProps:S,getInputProps:K,rootRef:z,inputRef:B,open:kt(L)})}function Rf(e,t){switch(t.type){case"focus":return Ee(Ee({},e),{},{isFocused:!0});case"blur":return Ee(Ee({},e),{},{isFocused:!1});case"openDialog":return Ee(Ee({},qi),{},{isFileDialogActive:!0});case"closeDialog":return Ee(Ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ee(Ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ee(Ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ee({},qi);default:return e}}function js(){}const ul=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?T.jsx(Jo,{}):e.file.type.includes("pdf")?T.jsx(Mn,{}):T.jsx(Mn,{}),n=()=>{switch(e.status){case"success":return T.jsx(Id,{color:"success"});case"uploading":return T.jsx(I.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return T.jsxs(I.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[T.jsxs(I.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),T.jsxs(I.Box,{sx:{flex:1,minWidth:0},children:[T.jsx(I.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),T.jsxs(I.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),T.jsx(I.Tooltip,{title:"Remove file",children:T.jsx(I.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:T.jsx(zd,{})})})]})},Pf=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s})=>{const[o,l]=M.useState(t),[f,p]=M.useState([]),[d,m]=M.useState(!1),[b,h]=M.useState(!1),[c,x]=M.useState([]),v=M.useRef(null);M.useEffect(()=>{l(t)},[t]);const O=M.useCallback(k=>e.fileTypes.some(z=>{if(z.includes("*")){const B=z.split("/")[0];return k.type.startsWith(B)}return k.type===z})?e.maxSize&&k.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${k.type} is not allowed. Allowed types: ${e.fileTypes.join(", ")}`,[e]),j=M.useCallback(async k=>{console.log("handleFiles called with:",k.length,"files"),m(!0);const R=[],z=[];try{for(const H of k){let ue=null;if(e.multiple&&o.some(ee=>ee.file.name===H.name&&ee.file.size===H.size&&ee.file.lastModified===H.lastModified)){z.push(`${H.name}: File already exists`);continue}if(ue=O(H),!ue&&e.customValidation)try{const re=e.customValidation(H);re instanceof Promise?ue=await re:ue=re}catch(re){ue=`Custom validation failed: ${re instanceof Error?re.message:"Unknown error"}`}if(ue)z.push(`${H.name}: ${ue}`);else{const re={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:H,preview:H.type.startsWith("image/")?URL.createObjectURL(H):void 0,progress:0,status:"pending",uploadedAt:new Date};R.push(re)}}const B=e.multiple?[...o,...R]:R;l(B),r==null||r(B),z.length>0?(x(z),p(z)):(x([]),p([]))}catch(B){const H=`Unexpected error: ${B instanceof Error?B.message:"Unknown error"}`;x([H]),p([H])}},[o,e.multiple,O,e.customValidation,r]),A=M.useCallback(k=>{m(!0);const R=o.filter(z=>z.id!==k);l(R),r==null||r(R),x([]),v.current&&(v.current.value="")},[o,r]),w=M.useCallback(()=>{if(e.required&&o.length===0){p([`${e.title} is required`]);return}x([]),h(!0);const k=o.filter(R=>R.status!=="error");n==null||n(k)},[o,n,e.required,e.title]),{getRootProps:V,getInputProps:Q,isDragActive:X}=cl({onDrop:j,multiple:e.multiple,disabled:i,noClick:!1,noKeyboard:!1}),q=k=>k.startsWith("image/")?T.jsx(Jo,{}):k.includes("pdf")?T.jsx(Mn,{}):T.jsx(Mn,{}),u=e.fileTypes.map(k=>k.replace("*","all")).join(", ");M.useEffect(()=>{if(!d)return;const k=[],R=[...c,...k];R.length>0?p(R):p([])},[o,e.required,e.title,d,b,c]);const $=()=>{var k;switch(((k=e.submitButton)==null?void 0:k.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return T.jsxs(I.Box,{className:a,style:s,children:[T.jsxs(I.Typography,{variant:"h6",gutterBottom:!0,children:[e.title,e.required&&T.jsx("span",{style:{color:"red"},children:" *"})]}),e.description&&T.jsx(I.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e.description}),M.createElement(I.Paper,{...V(),key:`dropzone-${o.length}`,sx:{border:"2px dashed",borderColor:X?"primary.main":"grey.300",backgroundColor:X?"action.hover":"background.paper",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"}}},T.jsx("input",{...Q(),ref:v}),T.jsx(Md,{sx:{fontSize:48,color:"text.secondary",mb:2}}),T.jsx(I.Typography,{variant:"h6",gutterBottom:!0,children:X?"Drop files here":"Drag & drop files here"}),T.jsxs(I.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:["or ",T.jsx(I.Button,{variant:"text",disabled:i,onClick:k=>{var R;k.stopPropagation(),(R=v.current)==null||R.click()},children:"browse files"})]}),T.jsxs(I.Box,{sx:{mt:2},children:[T.jsx(I.Chip,{icon:q(e.fileTypes[0]),label:`Accepted: ${u}`,variant:"outlined",size:"small"}),e.maxSize&&T.jsx(I.Chip,{label:`Max size: ${(e.maxSize/(1024*1024)).toFixed(1)}MB`,variant:"outlined",size:"small",sx:{ml:1}})]})),f.length>0&&T.jsx(I.Alert,{severity:"error",sx:{mt:2},children:f.map((k,R)=>T.jsx(I.Typography,{variant:"body2",children:k},R))}),o.length>0&&T.jsxs(I.Box,{sx:{mt:2},children:[T.jsxs(I.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",o.length,")"]}),o.map(k=>T.jsx(ul,{file:k,onRemove:A},k.id))]}),e.helperText&&T.jsx(I.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),e.submitButton&&T.jsx(I.Box,{sx:{mt:3,display:"flex",justifyContent:$()},children:T.jsx(I.Button,{variant:"contained",onClick:w,disabled:i||e.submitButton.disabled||o.length===0,startIcon:e.submitButton.loading?T.jsx(I.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Do;exports.DocumentUpload=Pf;exports.FieldRenderer=ho;exports.FilePreview=ul;exports.FinForm=Xc;exports.ImageComponent=po;exports.StepNavigation=$o;exports.fetchApiData=fo;exports.generateSchema=jo;exports.getApiConfig=Xi;exports.hasApiConfig=Ht;exports.shouldShowField=yc;exports.useApiData=mo;
|
|
82
82
|
//# sourceMappingURL=index.js.map
|