finform-react-builder 1.8.44 → 1.10.0
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.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var Kc=Object.defineProperty;var vs=e=>{throw TypeError(e)};var Yc=(e,t,r)=>t in e?Kc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Yc(e,typeof t!="symbol"?t+"":t,r),Pi=(e,t,r)=>t.has(e)||vs("Cannot "+r);var A=(e,t,r)=>(Pi(e,t,"read from private field"),r?r.call(e):t.get(e)),fe=(e,t,r)=>t.has(e)?vs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r,n)=>(Pi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(Pi(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){re(e,t,i,r)},get _(){return A(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),P=require("react"),x=require("@mui/material"),Gc=require("@emotion/styled"),Pr=require("@emotion/react");function Qc(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 ne=Qc(P);var An=e=>e.type==="checkbox",vr=e=>e instanceof Date,nt=e=>e==null;const ol=e=>typeof e=="object";var Ve=e=>!nt(e)&&!Array.isArray(e)&&ol(e)&&!vr(e),ll=e=>Ve(e)&&e.target?An(e.target)?e.target.checked:e.target.value:e,Zc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cl=(e,t)=>e.has(Zc(t)),Xc=e=>{const t=e.constructor&&e.constructor.prototype;return Ve(t)&&t.hasOwnProperty("isPrototypeOf")},Na=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _e(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(!(Na&&(e instanceof Blob||n))&&(r||Ve(e)))if(t=r?[]:{},!r&&!Xc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=_e(e[i]));else return e;return t}var vi=e=>/^\w*$/.test(e),Fe=e=>e===void 0,bi=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),J=(e,t,r)=>{if(!t||!Ve(e))return r;const n=(vi(t)?[t]:La(t)).reduce((i,a)=>nt(i)?i:i[a],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},dt=e=>typeof e=="boolean",ye=(e,t,r)=>{let n=-1;const i=vi(t)?[t]:La(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let c=r;if(n!==s){const d=e[o];c=Ve(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const Jn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},St={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ul=P.createContext(null);ul.displayName="HookFormContext";const wi=()=>P.useContext(ul);var pl=(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]!==St.all&&(t._proxyFormState[s]=!n||St.all),r&&(r[s]=!0),e[s]}});return i};const Si=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Jc(e){const t=wi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Si(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>pl(s,r,c.current,!1),[s,r])}var zt=e=>typeof e=="string",dl=(e,t,r,n,i)=>zt(e)?(n&&t.watch.add(e),J(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),J(r,a))):(n&&(t.watchAll=!0),r);function fl(e){const t=wi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=P.useRef(i),[c,d]=P.useState(r._getWatch(n,o.current));return Si(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:h=>!a&&d(dl(n,r._names,h.values||r._formValues,!1,o.current))}),[n,r,a,s]),P.useEffect(()=>r._removeUnmounted()),c}function eu(e){const t=wi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=cl(i._names.array,r),o=fl({control:i,name:r,defaultValue:J(i._formValues,r,J(i._defaultValues,r,e.defaultValue)),exact:!0}),c=Jc({control:i,name:r,exact:!0}),d=P.useRef(e),h=P.useRef(i.register(r,{...e.rules,value:o,...dt(e.disabled)?{disabled:e.disabled}:{}})),f=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!J(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!J(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!J(c.validatingFields,r)},error:{enumerable:!0,get:()=>J(c.errors,r)}}),[c,r]),p=P.useCallback(S=>h.current.onChange({target:{value:ll(S),name:r},type:Jn.CHANGE}),[r]),y=P.useCallback(()=>h.current.onBlur({target:{value:J(i._formValues,r),name:r},type:Jn.BLUR}),[r,i._formValues]),E=P.useCallback(S=>{const v=J(i._fields,r);v&&S&&(v._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:j=>S.setCustomValidity(j),reportValidity:()=>S.reportValidity()})},[i._fields,r]),m=P.useMemo(()=>({name:r,value:o,...dt(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:p,onBlur:y,ref:E}),[r,n,c.disabled,p,y,E,o]);return P.useEffect(()=>{const S=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...dt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(j,M)=>{const F=J(i._fields,j);F&&F._f&&(F._f.mount=M)};if(v(r,!0),S){const j=_e(J(i._options.defaultValues,r));ye(i._defaultValues,r,j),Fe(J(i._formValues,r))&&ye(i._formValues,r,j)}return!s&&i.register(r),()=>{(s?S&&!i._state.action:S)?i.unregister(r):v(r,!1)}},[r,i,s,a]),P.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),P.useMemo(()=>({field:m,formState:c,fieldState:f}),[m,c,f])}const Oe=e=>e.render(eu(e));var hl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],bs=()=>{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=[]}}},la=e=>nt(e)||!ol(e);function Jt(e,t){if(la(e)||la(t))return e===t;if(vr(e)&&vr(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(vr(a)&&vr(s)||Ve(a)&&Ve(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var rt=e=>Ve(e)&&!Object.keys(e).length,qa=e=>e.type==="file",Ft=e=>typeof e=="function",ei=e=>{if(!Na)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ml=e=>e.type==="select-multiple",Wa=e=>e.type==="radio",tu=e=>Wa(e)||An(e),Di=e=>ei(e)&&e.isConnected;function ru(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function nu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Le(e,t){const r=Array.isArray(t)?t:vi(t)?[t]:La(t),n=r.length===1?e:ru(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Ve(n)&&rt(n)||Array.isArray(n)&&nu(n))&&Le(e,r.slice(0,-1)),e}var xl=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ti(e,t={}){const r=Array.isArray(e);if(Ve(e)||r)for(const n in e)Array.isArray(e[n])||Ve(e[n])&&!xl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ti(e[n],t[n])):nt(e[n])||(t[n]=!0);return t}function gl(e,t,r){const n=Array.isArray(e);if(Ve(e)||n)for(const i in e)Array.isArray(e[i])||Ve(e[i])&&!xl(e[i])?Fe(t)||la(r[i])?r[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:gl(e[i],nt(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>gl(e,t,ti(t));const ws={value:!1,isValid:!1},Ss={value:!0,isValid:!0};var yl=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&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?Ss:{value:e[0].value,isValid:!0}:Ss:ws}return ws},vl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Cs={isValid:!1,value:null};var bl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Cs):Cs;function Es(e){const t=e.ref;return qa(t)?t.files:Wa(t)?bl(e.refs).value:ml(t)?[...t.selectedOptions].map(({value:r})=>r):An(t)?yl(e.refs).value:vl(Fe(t.value)?e.ref.value:t.value,e)}var iu=(e,t,r,n)=>{const i={};for(const a of e){const s=J(t,a);s&&ye(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ri=e=>e instanceof RegExp,fn=e=>Fe(e)?e:ri(e)?e.source:Ve(e)?ri(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===St.onSubmit,isOnBlur:e===St.onBlur,isOnChange:e===St.onChange,isOnAll:e===St.all,isOnTouch:e===St.onTouched});const ks="AsyncFunction";var au=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===ks||Ve(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ks)),su=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ca=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Kr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=J(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(Kr(o,t))break}else if(Ve(o)&&Kr(o,t))break}}};function Ts(e,t,r){const n=J(e,r);if(n||vi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=J(t,a),o=J(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 ou=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return rt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||St.all))},lu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),cu=(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,uu=(e,t)=>!bi(J(e,t)).length&&Le(e,t),wl=(e,t,r)=>{const n=ct(J(e,r));return ye(n,"root",t[r]),ye(e,r,n),e},Hn=e=>zt(e);function js(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||dt(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>Ve(e)&&!ri(e)?e:{value:e,message:""},ua=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:c,maxLength:d,minLength:h,min:f,max:p,pattern:y,validate:E,name:m,valueAsNumber:S,mount:v}=e._f,j=J(r,m);if(!v||t.has(m))return{};const M=o?o[0]:s,F=L=>{i&&M.reportValidity&&(M.setCustomValidity(dt(L)?"":L||""),M.reportValidity())},C={},R=Wa(s),B=An(s),_=R||B,I=(S||qa(s))&&Fe(s.value)&&Fe(j)||ei(s)&&s.value===""||j===""||Array.isArray(j)&&!j.length,u=hl.bind(null,m,n,C),D=(L,$,V,ee=Bt.maxLength,ie=Bt.minLength)=>{const he=L?$:V;C[m]={type:L?ee:ie,message:he,ref:s,...u(L?ee:ie,he)}};if(a?!Array.isArray(j)||!j.length:c&&(!_&&(I||nt(j))||dt(j)&&!j||B&&!yl(o).isValid||R&&!bl(o).isValid)){const{value:L,message:$}=Hn(c)?{value:!!c,message:c}:zr(c);if(L&&(C[m]={type:Bt.required,message:$,ref:M,...u(Bt.required,$)},!n))return F($),C}if(!I&&(!nt(f)||!nt(p))){let L,$;const V=zr(p),ee=zr(f);if(!nt(j)&&!isNaN(j)){const ie=s.valueAsNumber||j&&+j;nt(V.value)||(L=ie>V.value),nt(ee.value)||($=ie<ee.value)}else{const ie=s.valueAsDate||new Date(j),he=U=>new Date(new Date().toDateString()+" "+U),le=s.type=="time",Y=s.type=="week";zt(V.value)&&j&&(L=le?he(j)>he(V.value):Y?j>V.value:ie>new Date(V.value)),zt(ee.value)&&j&&($=le?he(j)<he(ee.value):Y?j<ee.value:ie<new Date(ee.value))}if((L||$)&&(D(!!L,V.message,ee.message,Bt.max,Bt.min),!n))return F(C[m].message),C}if((d||h)&&!I&&(zt(j)||a&&Array.isArray(j))){const L=zr(d),$=zr(h),V=!nt(L.value)&&j.length>+L.value,ee=!nt($.value)&&j.length<+$.value;if((V||ee)&&(D(V,L.message,$.message),!n))return F(C[m].message),C}if(y&&!I&&zt(j)){const{value:L,message:$}=zr(y);if(ri(L)&&!j.match(L)&&(C[m]={type:Bt.pattern,message:$,ref:s,...u(Bt.pattern,$)},!n))return F($),C}if(E){if(Ft(E)){const L=await E(j,r),$=js(L,M);if($&&(C[m]={...$,...u(Bt.validate,$.message)},!n))return F($.message),C}else if(Ve(E)){let L={};for(const $ in E){if(!rt(L)&&!n)break;const V=js(await E[$](j,r),M,$);V&&(L={...V,...u($,V.message)},F(V.message),n&&(C[m]=L))}if(!rt(L)&&(C[m]={ref:M,...L},!n))return C}}return F(!0),C};const pu={mode:St.onSubmit,reValidateMode:St.onChange,shouldFocusError:!0};function du(e={}){let t={...pu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ft(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=Ve(t.defaultValues)||Ve(t.values)?_e(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:_e(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...h};const p={array:bs(),state:bs()},y=t.criteriaMode===St.all,E=w=>T=>{clearTimeout(d),d=setTimeout(w,T)},m=async w=>{if(!t.disabled&&(h.isValid||f.isValid||w)){const T=t.resolver?rt((await B()).errors):await I(n,!0);T!==r.isValid&&p.state.next({isValid:T})}},S=(w,T)=>{!t.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((w||Array.from(o.mount)).forEach(g=>{g&&(T?ye(r.validatingFields,g,T):Le(r.validatingFields,g))}),p.state.next({validatingFields:r.validatingFields,isValidating:!rt(r.validatingFields)}))},v=(w,T=[],g,z,b=!0,O=!0)=>{if(z&&g&&!t.disabled){if(s.action=!0,O&&Array.isArray(J(n,w))){const q=g(J(n,w),z.argA,z.argB);b&&ye(n,w,q)}if(O&&Array.isArray(J(r.errors,w))){const q=g(J(r.errors,w),z.argA,z.argB);b&&ye(r.errors,w,q),uu(r.errors,w)}if((h.touchedFields||f.touchedFields)&&O&&Array.isArray(J(r.touchedFields,w))){const q=g(J(r.touchedFields,w),z.argA,z.argB);b&&ye(r.touchedFields,w,q)}(h.dirtyFields||f.dirtyFields)&&(r.dirtyFields=dn(i,a)),p.state.next({name:w,isDirty:D(w,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ye(a,w,T)},j=(w,T)=>{ye(r.errors,w,T),p.state.next({errors:r.errors})},M=w=>{r.errors=w,p.state.next({errors:r.errors,isValid:!1})},F=(w,T,g,z)=>{const b=J(n,w);if(b){const O=J(a,w,Fe(g)?J(i,w):g);Fe(O)||z&&z.defaultChecked||T?ye(a,w,T?O:Es(b._f)):V(w,O),s.mount&&m()}},C=(w,T,g,z,b)=>{let O=!1,q=!1;const K={name:w};if(!t.disabled){if(!g||z){(h.isDirty||f.isDirty)&&(q=r.isDirty,r.isDirty=K.isDirty=D(),O=q!==K.isDirty);const W=Jt(J(i,w),T);q=!!J(r.dirtyFields,w),W?Le(r.dirtyFields,w):ye(r.dirtyFields,w,!0),K.dirtyFields=r.dirtyFields,O=O||(h.dirtyFields||f.dirtyFields)&&q!==!W}if(g){const W=J(r.touchedFields,w);W||(ye(r.touchedFields,w,g),K.touchedFields=r.touchedFields,O=O||(h.touchedFields||f.touchedFields)&&W!==g)}O&&b&&p.state.next(K)}return O?K:{}},R=(w,T,g,z)=>{const b=J(r.errors,w),O=(h.isValid||f.isValid)&&dt(T)&&r.isValid!==T;if(t.delayError&&g?(c=E(()=>j(w,g)),c(t.delayError)):(clearTimeout(d),c=null,g?ye(r.errors,w,g):Le(r.errors,w)),(g?!Jt(b,g):b)||!rt(z)||O){const q={...z,...O&&dt(T)?{isValid:T}:{},errors:r.errors,name:w};r={...r,...q},p.state.next(q)}},B=async w=>{S(w,!0);const T=await t.resolver(a,t.context,iu(w||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return S(w),T},_=async w=>{const{errors:T}=await B(w);if(w)for(const g of w){const z=J(T,g);z?ye(r.errors,g,z):Le(r.errors,g)}else r.errors=T;return T},I=async(w,T,g={valid:!0})=>{for(const z in w){const b=w[z];if(b){const{_f:O,...q}=b;if(O){const K=o.array.has(O.name),W=b._f&&au(b._f);W&&h.validatingFields&&S([z],!0);const ue=await ua(b,o.disabled,a,y,t.shouldUseNativeValidation&&!T,K);if(W&&h.validatingFields&&S([z]),ue[O.name]&&(g.valid=!1,T))break;!T&&(J(ue,O.name)?K?wl(r.errors,ue,O.name):ye(r.errors,O.name,ue[O.name]):Le(r.errors,O.name))}!rt(q)&&await I(q,T,g)}}return g.valid},u=()=>{for(const w of o.unMount){const T=J(n,w);T&&(T._f.refs?T._f.refs.every(g=>!Di(g)):!Di(T._f.ref))&&X(w)}o.unMount=new Set},D=(w,T)=>!t.disabled&&(w&&T&&ye(a,w,T),!Jt(U(),i)),L=(w,T,g)=>dl(w,o,{...s.mount?a:Fe(T)?i:zt(w)?{[w]:T}:T},g,T),$=w=>bi(J(s.mount?a:i,w,t.shouldUnregister?J(i,w,[]):[])),V=(w,T,g={})=>{const z=J(n,w);let b=T;if(z){const O=z._f;O&&(!O.disabled&&ye(a,w,vl(T,O)),b=ei(O.ref)&&nt(T)?"":T,ml(O.ref)?[...O.ref.options].forEach(q=>q.selected=b.includes(q.value)):O.refs?An(O.ref)?O.refs.forEach(q=>{(!q.defaultChecked||!q.disabled)&&(Array.isArray(b)?q.checked=!!b.find(K=>K===q.value):q.checked=b===q.value||!!b)}):O.refs.forEach(q=>q.checked=q.value===b):qa(O.ref)?O.ref.value="":(O.ref.value=b,O.ref.type||p.state.next({name:w,values:_e(a)})))}(g.shouldDirty||g.shouldTouch)&&C(w,b,g.shouldTouch,g.shouldDirty,!0),g.shouldValidate&&Y(w)},ee=(w,T,g)=>{for(const z in T){if(!T.hasOwnProperty(z))return;const b=T[z],O=w+"."+z,q=J(n,O);(o.array.has(w)||Ve(b)||q&&!q._f)&&!vr(b)?ee(O,b,g):V(O,b,g)}},ie=(w,T,g={})=>{const z=J(n,w),b=o.array.has(w),O=_e(T);ye(a,w,O),b?(p.array.next({name:w,values:_e(a)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&g.shouldDirty&&p.state.next({name:w,dirtyFields:dn(i,a),isDirty:D(w,O)})):z&&!z._f&&!nt(O)?ee(w,O,g):V(w,O,g),ca(w,o)&&p.state.next({...r}),p.state.next({name:s.mount?w:void 0,values:_e(a)})},he=async w=>{s.mount=!0;const T=w.target;let g=T.name,z=!0;const b=J(n,g),O=W=>{z=Number.isNaN(W)||vr(W)&&isNaN(W.getTime())||Jt(W,J(a,g,W))},q=Ur(t.mode),K=Ur(t.reValidateMode);if(b){let W,ue;const ve=T.type?Es(b._f):ll(w),Ce=w.type===Jn.BLUR||w.type===Jn.FOCUS_OUT,De=!su(b._f)&&!t.resolver&&!J(r.errors,g)&&!b._f.deps||cu(Ce,J(r.touchedFields,g),r.isSubmitted,K,q),Be=ca(g,o,Ce);ye(a,g,ve),Ce?(b._f.onBlur&&b._f.onBlur(w),c&&c(0)):b._f.onChange&&b._f.onChange(w);const Xe=C(g,ve,Ce),Ot=!rt(Xe)||Be;if(!Ce&&p.state.next({name:g,type:w.type,values:_e(a)}),De)return(h.isValid||f.isValid)&&(t.mode==="onBlur"?Ce&&m():Ce||m()),Ot&&p.state.next({name:g,...Be?{}:Xe});if(!Ce&&Be&&p.state.next({...r}),t.resolver){const{errors:Je}=await B([g]);if(O(ve),z){const We=Ts(r.errors,n,g),pt=Ts(Je,n,We.name||g);W=pt.error,g=pt.name,ue=rt(Je)}}else S([g],!0),W=(await ua(b,o.disabled,a,y,t.shouldUseNativeValidation))[g],S([g]),O(ve),z&&(W?ue=!1:(h.isValid||f.isValid)&&(ue=await I(n,!0)));z&&(b._f.deps&&Y(b._f.deps),R(g,ue,W,Xe))}},le=(w,T)=>{if(J(r.errors,T)&&w.focus)return w.focus(),1},Y=async(w,T={})=>{let g,z;const b=ct(w);if(t.resolver){const O=await _(Fe(w)?w:b);g=rt(O),z=w?!b.some(q=>J(O,q)):g}else w?(z=(await Promise.all(b.map(async O=>{const q=J(n,O);return await I(q&&q._f?{[O]:q}:q)}))).every(Boolean),!(!z&&!r.isValid)&&m()):z=g=await I(n);return p.state.next({...!zt(w)||(h.isValid||f.isValid)&&g!==r.isValid?{}:{name:w},...t.resolver||!w?{isValid:g}:{},errors:r.errors}),T.shouldFocus&&!z&&Kr(n,le,w?b:o.mount),z},U=w=>{const T={...s.mount?a:i};return Fe(w)?T:zt(w)?J(T,w):w.map(g=>J(T,g))},Z=(w,T)=>({invalid:!!J((T||r).errors,w),isDirty:!!J((T||r).dirtyFields,w),error:J((T||r).errors,w),isValidating:!!J(r.validatingFields,w),isTouched:!!J((T||r).touchedFields,w)}),ce=w=>{w&&ct(w).forEach(T=>Le(r.errors,T)),p.state.next({errors:w?r.errors:{}})},de=(w,T,g)=>{const z=(J(n,w,{_f:{}})._f||{}).ref,b=J(r.errors,w)||{},{ref:O,message:q,type:K,...W}=b;ye(r.errors,w,{...W,...T,ref:z}),p.state.next({name:w,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&z&&z.focus&&z.focus()},oe=(w,T)=>Ft(w)?p.state.subscribe({next:g=>w(L(void 0,T),g)}):L(w,T,!0),pe=w=>p.state.subscribe({next:T=>{lu(w.name,T.name,w.exact)&&ou(T,w.formState||h,Ue,w.reRenderRoot)&&w.callback({values:{...a},...r,...T})}}).unsubscribe,H=w=>(s.mount=!0,f={...f,...w.formState},pe({...w,formState:f})),X=(w,T={})=>{for(const g of w?ct(w):o.mount)o.mount.delete(g),o.array.delete(g),T.keepValue||(Le(n,g),Le(a,g)),!T.keepError&&Le(r.errors,g),!T.keepDirty&&Le(r.dirtyFields,g),!T.keepTouched&&Le(r.touchedFields,g),!T.keepIsValidating&&Le(r.validatingFields,g),!t.shouldUnregister&&!T.keepDefaultValue&&Le(i,g);p.state.next({values:_e(a)}),p.state.next({...r,...T.keepDirty?{isDirty:D()}:{}}),!T.keepIsValid&&m()},te=({disabled:w,name:T})=>{(dt(w)&&s.mount||w||o.disabled.has(T))&&(w?o.disabled.add(T):o.disabled.delete(T))},ae=(w,T={})=>{let g=J(n,w);const z=dt(T.disabled)||dt(t.disabled);return ye(n,w,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:w}},name:w,mount:!0,...T}}),o.mount.add(w),g?te({disabled:dt(T.disabled)?T.disabled:t.disabled,name:w}):F(w,!0,T.value),{...z?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:fn(T.min),max:fn(T.max),minLength:fn(T.minLength),maxLength:fn(T.maxLength),pattern:fn(T.pattern)}:{},name:w,onChange:he,onBlur:he,ref:b=>{if(b){ae(w,T),g=J(n,w);const O=Fe(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,q=tu(O),K=g._f.refs||[];if(q?K.find(W=>W===O):O===g._f.ref)return;ye(n,w,{_f:{...g._f,...q?{refs:[...K.filter(Di),O,...Array.isArray(J(i,w))?[{}]:[]],ref:{type:O.type,name:w}}:{ref:O}}}),F(w,!1,void 0,O)}else g=J(n,w,{}),g._f&&(g._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(cl(o.array,w)&&s.action)&&o.unMount.add(w)}}},se=()=>t.shouldFocusError&&Kr(n,le,o.mount),ge=w=>{dt(w)&&(p.state.next({disabled:w}),Kr(n,(T,g)=>{const z=J(n,g);z&&(T.disabled=z._f.disabled||w,Array.isArray(z._f.refs)&&z._f.refs.forEach(b=>{b.disabled=z._f.disabled||w}))},0,!1))},Q=(w,T)=>async g=>{let z;g&&(g.preventDefault&&g.preventDefault(),g.persist&&g.persist());let b=_e(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:q}=await B();r.errors=O,b=q}else await I(n);if(o.disabled.size)for(const O of o.disabled)ye(b,O,void 0);if(Le(r.errors,"root"),rt(r.errors)){p.state.next({errors:{}});try{await w(b,g)}catch(O){z=O}}else T&&await T({...r.errors},g),se(),setTimeout(se);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(r.errors)&&!z,submitCount:r.submitCount+1,errors:r.errors}),z)throw z},Pe=(w,T={})=>{J(n,w)&&(Fe(T.defaultValue)?ie(w,_e(J(i,w))):(ie(w,T.defaultValue),ye(i,w,_e(T.defaultValue))),T.keepTouched||Le(r.touchedFields,w),T.keepDirty||(Le(r.dirtyFields,w),r.isDirty=T.defaultValue?D(w,_e(J(i,w))):D()),T.keepError||(Le(r.errors,w),h.isValid&&m()),p.state.next({...r}))},qe=(w,T={})=>{const g=w?_e(w):i,z=_e(g),b=rt(w),O=b?i:z;if(T.keepDefaultValues||(i=g),!T.keepValues){if(T.keepDirtyValues){const q=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const K of Array.from(q))J(r.dirtyFields,K)?ye(O,K,J(a,K)):ie(K,J(O,K))}else{if(Na&&Fe(w))for(const q of o.mount){const K=J(n,q);if(K&&K._f){const W=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(ei(W)){const ue=W.closest("form");if(ue){ue.reset();break}}}}for(const q of o.mount)ie(q,J(O,q))}a=_e(O),p.array.next({values:{...O}}),p.state.next({values:{...O}})}o={mount:T.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!h.isValid||!!T.keepIsValid||!!T.keepDirtyValues,s.watch=!!t.shouldUnregister,p.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:b?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Jt(w,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:b?{}:T.keepDirtyValues?T.keepDefaultValues&&a?dn(i,a):r.dirtyFields:T.keepDefaultValues&&w?dn(i,w):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ge=(w,T)=>qe(Ft(w)?w(a):w,T),kt=(w,T={})=>{const g=J(n,w),z=g&&g._f;if(z){const b=z.refs?z.refs[0]:z.ref;b.focus&&(b.focus(),T.shouldSelect&&Ft(b.select)&&b.select())}},Ue=w=>{r={...r,...w}},He={control:{register:ae,unregister:X,getFieldState:Z,handleSubmit:Q,setError:de,_subscribe:pe,_runSchema:B,_focusError:se,_getWatch:L,_getDirty:D,_setValid:m,_setFieldArray:v,_setDisabledField:te,_setErrors:M,_getFieldArray:$,_reset:qe,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(w=>{Ge(w,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:ge,_subjects:p,_proxyFormState:h,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(w){s=w},get _defaultValues(){return i},get _names(){return o},set _names(w){o=w},get _formState(){return r},get _options(){return t},set _options(w){t={...t,...w}}},subscribe:H,trigger:Y,register:ae,handleSubmit:Q,watch:oe,setValue:ie,getValues:U,reset:Ge,resetField:Pe,clearErrors:ce,unregister:X,setError:de,setFocus:kt,getFieldState:Z};return{...He,formControl:He}}var Gt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ii=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",Mi=(e,t)=>[...e,...ct(t)],zi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Bi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Vi=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ni=(e,t)=>[...ct(t),...ct(e)];function fu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return bi(n).length?n:[]}var Li=(e,t)=>Fe(t)?[]:fu(e,ct(t).sort((r,n)=>r-n)),qi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Fs=(e,t,r)=>(e[t]=r,e);function hu(e){const t=wi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,c]=P.useState(r._getFieldArray(n)),d=P.useRef(r._getFieldArray(n).map(Gt)),h=P.useRef(o),f=P.useRef(n),p=P.useRef(!1);f.current=n,h.current=o,r._names.array.add(n),s&&r.register(n,s),Si(()=>r._subjects.array.subscribe({next:({values:R,name:B})=>{if(B===f.current||!B){const _=J(R,f.current);Array.isArray(_)&&(c(_),d.current=_.map(Gt))}}}).unsubscribe,[r]);const y=P.useCallback(R=>{p.current=!0,r._setFieldArray(n,R)},[r,n]),E=(R,B)=>{const _=ct(_e(R)),I=Mi(r._getFieldArray(n),_);r._names.focus=Ii(n,I.length-1,B),d.current=Mi(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Mi,{argA:zi(R)})},m=(R,B)=>{const _=ct(_e(R)),I=Ni(r._getFieldArray(n),_);r._names.focus=Ii(n,0,B),d.current=Ni(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Ni,{argA:zi(R)})},S=R=>{const B=Li(r._getFieldArray(n),R);d.current=Li(d.current,R),y(B),c(B),!Array.isArray(J(r._fields,n))&&ye(r._fields,n,void 0),r._setFieldArray(n,B,Li,{argA:R})},v=(R,B,_)=>{const I=ct(_e(B)),u=Bi(r._getFieldArray(n),R,I);r._names.focus=Ii(n,R,_),d.current=Bi(d.current,R,I.map(Gt)),y(u),c(u),r._setFieldArray(n,u,Bi,{argA:R,argB:zi(B)})},j=(R,B)=>{const _=r._getFieldArray(n);qi(_,R,B),qi(d.current,R,B),y(_),c(_),r._setFieldArray(n,_,qi,{argA:R,argB:B},!1)},M=(R,B)=>{const _=r._getFieldArray(n);Vi(_,R,B),Vi(d.current,R,B),y(_),c(_),r._setFieldArray(n,_,Vi,{argA:R,argB:B},!1)},F=(R,B)=>{const _=_e(B),I=Fs(r._getFieldArray(n),R,_);d.current=[...I].map((u,D)=>!u||D===R?Gt():d.current[D]),y(I),c([...I]),r._setFieldArray(n,I,Fs,{argA:R,argB:_},!0,!1)},C=R=>{const B=ct(_e(R));d.current=B.map(Gt),y([...B]),c([...B]),r._setFieldArray(n,[...B],_=>_,{},!0,!1)};return P.useEffect(()=>{if(r._state.action=!1,ca(n,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(R=>{const B=J(R.errors,n),_=J(r._formState.errors,n);(_?!B&&_.type||B&&(_.type!==B.type||_.message!==B.message):B&&B.type)&&(B?ye(r._formState.errors,n,B):Le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const R=J(r._fields,n);R&&R._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ua(R,r._names.disabled,r._formValues,r._options.criteriaMode===St.all,r._options.shouldUseNativeValidation,!0).then(B=>!rt(B)&&r._subjects.state.next({errors:wl(r._formState.errors,B,n)}))}r._subjects.state.next({name:n,values:_e(r._formValues)}),r._names.focus&&Kr(r._fields,(R,B)=>{if(r._names.focus&&B.startsWith(r._names.focus)&&R.focus)return R.focus(),1}),r._names.focus="",r._setValid(),p.current=!1},[o,n,r]),P.useEffect(()=>(!J(r._formValues,n)&&r._setFieldArray(n),()=>{const R=(B,_)=>{const I=J(r._fields,B);I&&I._f&&(I._f.mount=_)};r._options.shouldUnregister||a?r.unregister(n):R(n,!1)}),[n,r,i,a]),{swap:P.useCallback(j,[y,n,r]),move:P.useCallback(M,[y,n,r]),prepend:P.useCallback(m,[y,n,r]),append:P.useCallback(E,[y,n,r]),remove:P.useCallback(S,[y,n,r]),insert:P.useCallback(v,[y,n,r]),update:P.useCallback(F,[y,n,r]),replace:P.useCallback(C,[y,n,r]),fields:P.useMemo(()=>o.map((R,B)=>({...R,[i]:d.current[B]||Gt()})),[o,i])}}function mu(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.useState({isDirty:!1,isValidating:!1,isLoading:Ft(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:Ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=du(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Si(()=>{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]),P.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),P.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),P.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),P.useEffect(()=>{e.values&&!Jt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),P.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=pl(n,a),t.current}const As=(e,t,r)=>{if(e&&"reportValidity"in e){const n=J(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Sl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?As(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>As(i,r,e))}},xu=(e,t)=>{t.shouldUseNativeValidation&&Sl(e,t);const r={};for(const n in e){const i=J(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(gu(t.names||Object.keys(e),n)){const s=Object.assign({},J(r,n));ye(s,"root",a),ye(r,n,s)}else ye(r,n,a)}return r},gu=(e,t)=>{const r=Os(t);return e.some(n=>Os(n).match(`^${r}\\.\\d+`))};function Os(e){return e.replace(/\]|\[/g,"")}function yu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var c=(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&&Sl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(!s.inner)throw s;return{values:{},errors:xu((o=s,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,h){if(d[h.path]||(d[h.path]={message:h.message,type:h.type}),c){var f=d[h.path].types,p=f&&f[h.type];d[h.path]=hl(h.path,c,d,h.type,p?[].concat(p,h.message):h.message)}return d},{})),a)};var o,c}))}catch(s){return Promise.reject(s)}}}var On=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(){}},Rr=typeof window>"u"||"Deno"in globalThis;function ot(){}function vu(e,t){return typeof e=="function"?e(t):e}function pa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cr(e,t){return typeof e=="function"?e(t):e}function vt(e,t){return typeof e=="function"?e(t):e}function _s(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ua(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Rs(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(wn(t.options.mutationKey)!==wn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ua(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>ha(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Sn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Sn(e[r],t[r])):!1}function da(e,t){if(e===t)return e;const r=$s(e)&&$s(t);if(r||ha(e)&&ha(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},c=new Set(n);let d=0;for(let h=0;h<s;h++){const f=r?h:a[h];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,d++):(o[f]=da(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function fa(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 $s(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ha(e){if(!Ps(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ps(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ps(e){return Object.prototype.toString.call(e)==="[object Object]"}function bu(e){return new Promise(t=>{setTimeout(t,e)})}function ma(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 da(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 da(e,t)}return t}function wu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Su(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ni=Symbol();function El(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ni&&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===ni?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cu(e,t){return typeof e=="function"?e(...t):!!e}var Sr,er,Gr,Xo,Eu=(Xo=class extends On{constructor(){super();fe(this,Sr);fe(this,er);fe(this,Gr);re(this,Gr,t=>{if(!Rr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,er)||this.setEventListener(A(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,er))==null||t.call(this),re(this,er,void 0))}setEventListener(t){var r;re(this,Gr,t),(r=A(this,er))==null||r.call(this),re(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){A(this,Sr)!==t&&(re(this,Sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof A(this,Sr)=="boolean"?A(this,Sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sr=new WeakMap,er=new WeakMap,Gr=new WeakMap,Xo),Ha=new Eu,Qr,tr,Zr,Jo,ku=(Jo=class extends On{constructor(){super();fe(this,Qr,!0);fe(this,tr);fe(this,Zr);re(this,Zr,t=>{if(!Rr&&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(){A(this,tr)||this.setEventListener(A(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,tr))==null||t.call(this),re(this,tr,void 0))}setEventListener(t){var r;re(this,Zr,t),(r=A(this,tr))==null||r.call(this),re(this,tr,t(this.setOnline.bind(this)))}setOnline(t){A(this,Qr)!==t&&(re(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return A(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,Jo),ii=new ku;function xa(){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 Tu(e){return Math.min(1e3*2**e,3e4)}function kl(e){return(e??"online")==="online"?ii.isOnline():!0}var Tl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Wi(e){return e instanceof Tl}function jl(e){let t=!1,r=0,n=!1,i;const a=xa(),s=m=>{var S;n||(p(new Tl(m)),(S=e.abort)==null||S.call(e))},o=()=>{t=!0},c=()=>{t=!1},d=()=>Ha.isFocused()&&(e.networkMode==="always"||ii.isOnline())&&e.canRun(),h=()=>kl(e.networkMode)&&e.canRun(),f=m=>{var S;n||(n=!0,(S=e.onSuccess)==null||S.call(e,m),i==null||i(),a.resolve(m))},p=m=>{var S;n||(n=!0,(S=e.onError)==null||S.call(e,m),i==null||i(),a.reject(m))},y=()=>new Promise(m=>{var S;i=v=>{(n||d())&&m(v)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),E=()=>{if(n)return;let m;const S=r===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var R;if(n)return;const j=e.retry??(Rr?0:3),M=e.retryDelay??Tu,F=typeof M=="function"?M(r,v):M,C=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,v);if(t||!C){p(v);return}r++,(R=e.onFail)==null||R.call(e,r,v),bu(F).then(()=>d()?void 0:y()).then(()=>{t?p(v):E()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:h,start:()=>(h()?E():y().then(E),a)}}var ju=e=>setTimeout(e,0);function Fu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=ju;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ke=Fu(),Cr,el,Fl=(el=class{constructor(){fe(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pa(this.gcTime)&&re(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rr?1/0:5*60*1e3))}clearGcTimeout(){A(this,Cr)&&(clearTimeout(A(this,Cr)),re(this,Cr,void 0))}},Cr=new WeakMap,el),Xr,Er,gt,kr,Qe,kn,Tr,Tt,Wt,tl,Au=(tl=class extends Fl{constructor(t){super();fe(this,Tt);fe(this,Xr);fe(this,Er);fe(this,gt);fe(this,kr);fe(this,Qe);fe(this,kn);fe(this,Tr);re(this,Tr,!1),re(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,kr,t.client),re(this,gt,A(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,Xr,Ou(this.options)),this.state=t.state??A(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,Qe))==null?void 0:t.promise}setOptions(t){this.options={...A(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,gt).remove(this)}setData(t,r){const n=ma(this.state.data,t,this.options);return me(this,Tt,Wt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){me(this,Tt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=A(this,Qe))==null?void 0:n.promise;return(i=A(this,Qe))==null||i.cancel(t),r?r.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Xr))}isActive(){return this.observers.some(t=>vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ni||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>cr(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:!Cl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(A(this,Qe)&&(A(this,Tr)?A(this,Qe).cancel({revert:!0}):A(this,Qe).cancelRetry()),this.scheduleGc()),A(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,Tt,Wt).call(this,{type:"invalidate"})}fetch(t,r){var d,h,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,Qe))return A(this,Qe).continueRetry(),A(this,Qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.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=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(re(this,Tr,!0),n.signal)})},a=()=>{const p=El(this.options,r),E=(()=>{const m={client:A(this,kr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return re(this,Tr,!1),this.options.persister?this.options.persister(p,E,this):p(E)},o=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,kr),state:this.state,fetchFn:a};return i(p),p})();(d=this.options.behavior)==null||d.onFetch(o,this),re(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&me(this,Tt,Wt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=p=>{var y,E,m,S;Wi(p)&&p.silent||me(this,Tt,Wt).call(this,{type:"error",error:p}),Wi(p)||((E=(y=A(this,gt).config).onError)==null||E.call(y,p,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,this.state.data,p,this)),this.scheduleGc()};return re(this,Qe,jl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var y,E,m,S;if(p===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){c(v);return}(E=(y=A(this,gt).config).onSuccess)==null||E.call(y,p,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,y)=>{me(this,Tt,Wt).call(this,{type:"failed",failureCount:p,error:y})},onPause:()=>{me(this,Tt,Wt).call(this,{type:"pause"})},onContinue:()=>{me(this,Tt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,Qe).start()}},Xr=new WeakMap,Er=new WeakMap,gt=new WeakMap,kr=new WeakMap,Qe=new WeakMap,kn=new WeakMap,Tr=new WeakMap,Tt=new WeakSet,Wt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Al(n.data,this.options),fetchMeta:t.meta??null};case"success":return re(this,Er,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 Wi(i)&&i.revert&&A(this,Er)?{...A(this,Er),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),Ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,gt).notify({query:this,type:"updated",action:t})})},tl);function Al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ou(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 Pt,rl,_u=(rl=class extends On{constructor(t={}){super();fe(this,Pt);this.config=t,re(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ua(i,r);let s=this.get(a);return s||(s=new Au({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){A(this,Pt).has(t.queryHash)||(A(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=A(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&A(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,Pt).get(t)}getAll(){return[...A(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>_s(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>_s(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,rl),Dt,et,jr,It,Zt,nl,Ru=(nl=class extends Fl{constructor(t){super();fe(this,It);fe(this,Dt);fe(this,et);fe(this,jr);this.mutationId=t.mutationId,re(this,et,t.mutationCache),re(this,Dt,[]),this.state=t.state||$u(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,Dt).includes(t)||(A(this,Dt).push(t),this.clearGcTimeout(),A(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,Dt,A(this,Dt).filter(r=>r!==t)),this.scheduleGc(),A(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():A(this,et).remove(this))}continue(){var t;return((t=A(this,jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,c,d,h,f,p,y,E,m,S,v,j,M,F,C,R,B,_;const r=()=>{me(this,It,Zt).call(this,{type:"continue"})};re(this,jr,jl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,u)=>{me(this,It,Zt).call(this,{type:"failed",failureCount:I,error:u})},onPause:()=>{me(this,It,Zt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,et).canRun(this)}));const n=this.state.status==="pending",i=!A(this,jr).canStart();try{if(n)r();else{me(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=A(this,et).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));u!==this.state.context&&me(this,It,Zt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const I=await A(this,jr).start();return await((h=(d=A(this,et).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,I,t,this.state.context)),await((E=(y=A(this,et).config).onSettled)==null?void 0:E.call(y,I,null,this.state.variables,this.state.context,this)),await((S=(m=this.options).onSettled)==null?void 0:S.call(m,I,null,t,this.state.context)),me(this,It,Zt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((j=(v=A(this,et).config).onError)==null?void 0:j.call(v,I,t,this.state.context,this)),await((F=(M=this.options).onError)==null?void 0:F.call(M,I,t,this.state.context)),await((R=(C=A(this,et).config).onSettled)==null?void 0:R.call(C,void 0,I,this.state.variables,this.state.context,this)),await((_=(B=this.options).onSettled)==null?void 0:_.call(B,void 0,I,t,this.state.context)),I}finally{me(this,It,Zt).call(this,{type:"error",error:I})}}finally{A(this,et).runNext(this)}}},Dt=new WeakMap,et=new WeakMap,jr=new WeakMap,It=new WeakSet,Zt=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),Ke.batch(()=>{A(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),A(this,et).notify({mutation:this,type:"updated",action:t})})},nl);function $u(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,jt,Tn,il,Pu=(il=class extends On{constructor(t={}){super();fe(this,Ut);fe(this,jt);fe(this,Tn);this.config=t,re(this,Ut,new Set),re(this,jt,new Map),re(this,Tn,0)}build(t,r,n){const i=new Ru({mutationCache:this,mutationId:++Dn(this,Tn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){A(this,Ut).add(t);const r=In(t);if(typeof r=="string"){const n=A(this,jt).get(r);n?n.push(t):A(this,jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Ut).delete(t)){const r=In(t);if(typeof r=="string"){const n=A(this,jt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&A(this,jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=A(this,jt).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=In(t);if(typeof r=="string"){const i=(n=A(this,jt).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(){Ke.batch(()=>{A(this,Ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Ut).clear(),A(this,jt).clear()})}getAll(){return Array.from(A(this,Ut))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rs(r,n))}findAll(t={}){return this.getAll().filter(r=>Rs(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ke.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}},Ut=new WeakMap,jt=new WeakMap,Tn=new WeakMap,il);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ds(e){return{onFetch:(t,r)=>{var h,f,p,y,E;const n=t.options,i=(p=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const d=async()=>{let m=!1;const S=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=El(t.options,t.fetchOptions),j=async(M,F,C)=>{if(m)return Promise.reject();if(F==null&&M.pages.length)return Promise.resolve(M);const B=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:F,direction:C?"backward":"forward",meta:t.options.meta};return S(D),D})(),_=await v(B),{maxPages:I}=t.options,u=C?Su:wu;return{pages:u(M.pages,_,I),pageParams:u(M.pageParams,F,I)}};if(i&&a.length){const M=i==="backward",F=M?Du:Is,C={pages:a,pageParams:s},R=F(n,C);o=await j(C,R,M)}else{const M=e??a.length;do{const F=c===0?s[0]??n.initialPageParam:Is(n,o);if(c>0&&F==null)break;o=await j(o,F),c++}while(c<M)}return o};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Is(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 Du(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 ze,rr,nr,Jr,en,ir,tn,rn,al,Iu=(al=class{constructor(e={}){fe(this,ze);fe(this,rr);fe(this,nr);fe(this,Jr);fe(this,en);fe(this,ir);fe(this,tn);fe(this,rn);re(this,ze,e.queryCache||new _u),re(this,rr,e.mutationCache||new Pu),re(this,nr,e.defaultOptions||{}),re(this,Jr,new Map),re(this,en,new Map),re(this,ir,0)}mount(){Dn(this,ir)._++,A(this,ir)===1&&(re(this,tn,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onFocus())})),re(this,rn,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,A(this,ir)===0&&((e=A(this,tn))==null||e.call(this),re(this,tn,void 0),(t=A(this,rn))==null||t.call(this),re(this,rn,void 0))}isFetching(e){return A(this,ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,rr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=A(this,ze).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(cr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return A(this,ze).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=A(this,ze).get(n.queryHash),a=i==null?void 0:i.state.data,s=vu(t,a);if(s!==void 0)return A(this,ze).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>A(this,ze).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=A(this,ze);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=A(this,ze);return Ke.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ke.batch(()=>A(this,ze).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(ot).catch(ot)}invalidateQueries(e,t={}){return Ke.batch(()=>(A(this,ze).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=Ke.batch(()=>A(this,ze).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(ot)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=A(this,ze).build(this,t);return r.isStaleByTime(cr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ot).catch(ot)}fetchInfiniteQuery(e){return e.behavior=Ds(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e.behavior=Ds(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ii.isOnline()?A(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,ze)}getMutationCache(){return A(this,rr)}getDefaultOptions(){return A(this,nr)}setDefaultOptions(e){re(this,nr,e)}setQueryDefaults(e,t){A(this,Jr).set(wn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,Jr).values()],r={};return t.forEach(n=>{Sn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){A(this,en).set(wn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,en).values()],r={};return t.forEach(n=>{Sn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ua(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===ni&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,ze).clear(),A(this,rr).clear()}},ze=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,al),st,xe,jn,tt,Fr,nn,ar,sr,Fn,an,sn,Ar,Or,or,on,Se,mn,ga,ya,va,ba,wa,Sa,Ca,Ol,sl,Mu=(sl=class extends On{constructor(t,r){super();fe(this,Se);fe(this,st);fe(this,xe);fe(this,jn);fe(this,tt);fe(this,Fr);fe(this,nn);fe(this,ar);fe(this,sr);fe(this,Fn);fe(this,an);fe(this,sn);fe(this,Ar);fe(this,Or);fe(this,or);fe(this,on,new Set);this.options=r,re(this,st,t),re(this,sr,null),re(this,ar,xa()),this.options.experimental_prefetchInRender||A(this,ar).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&&(A(this,xe).addObserver(this),Ms(A(this,xe),this.options)?me(this,Se,mn).call(this):this.updateResult(),me(this,Se,ba).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ea(A(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ea(A(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Se,wa).call(this),me(this,Se,Sa).call(this),A(this,xe).removeObserver(this)}setOptions(t){const r=this.options,n=A(this,xe);if(this.options=A(this,st).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vt(this.options.enabled,A(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Se,Ca).call(this),A(this,xe).setOptions(this.options),r._defaulted&&!fa(this.options,r)&&A(this,st).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,xe),observer:this});const i=this.hasListeners();i&&zs(A(this,xe),n,this.options,r)&&me(this,Se,mn).call(this),this.updateResult(),i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||cr(this.options.staleTime,A(this,xe))!==cr(r.staleTime,A(this,xe)))&&me(this,Se,ga).call(this);const a=me(this,Se,ya).call(this);i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||a!==A(this,or))&&me(this,Se,va).call(this,a)}getOptimisticResult(t){const r=A(this,st).getQueryCache().build(A(this,st),t),n=this.createResult(r,t);return Bu(this,n)&&(re(this,tt,n),re(this,nn,this.options),re(this,Fr,A(this,xe).state)),n}getCurrentResult(){return A(this,tt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){A(this,on).add(t)}getCurrentQuery(){return A(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=A(this,st).defaultQueryOptions(t),n=A(this,st).getQueryCache().build(A(this,st),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,Se,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,tt)))}createResult(t,r){var I;const n=A(this,xe),i=this.options,a=A(this,tt),s=A(this,Fr),o=A(this,nn),d=t!==n?t.state:A(this,jn),{state:h}=t;let f={...h},p=!1,y;if(r._optimisticResults){const u=this.hasListeners(),D=!u&&Ms(t,r),L=u&&zs(t,n,r,i);(D||L)&&(f={...f,...Al(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:E,errorUpdatedAt:m,status:S}=f;y=f.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&S==="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((I=A(this,sn))==null?void 0:I.state.data,A(this,sn)):r.placeholderData,u!==void 0&&(S="success",y=ma(a==null?void 0:a.data,u,r),p=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===A(this,Fn))y=A(this,an);else try{re(this,Fn,r.select),y=r.select(y),y=ma(a==null?void 0:a.data,y,r),re(this,an,y),re(this,sr,null)}catch(u){re(this,sr,u)}A(this,sr)&&(E=A(this,sr),y=A(this,an),m=Date.now(),S="error");const j=f.fetchStatus==="fetching",M=S==="pending",F=S==="error",C=M&&j,R=y!==void 0,_={status:S,fetchStatus:f.fetchStatus,isPending:M,isSuccess:S==="success",isError:F,isInitialLoading:C,isLoading:C,data:y,dataUpdatedAt:f.dataUpdatedAt,error:E,errorUpdatedAt:m,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:j,isRefetching:j&&!M,isLoadingError:F&&!R,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:F&&R,isStale:Ka(t,r),refetch:this.refetch,promise:A(this,ar),isEnabled:vt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=$=>{_.status==="error"?$.reject(_.error):_.data!==void 0&&$.resolve(_.data)},D=()=>{const $=re(this,ar,_.promise=xa());u($)},L=A(this,ar);switch(L.status){case"pending":t.queryHash===n.queryHash&&u(L);break;case"fulfilled":(_.status==="error"||_.data!==L.value)&&D();break;case"rejected":(_.status!=="error"||_.error!==L.reason)&&D();break}}return _}updateResult(){const t=A(this,tt),r=this.createResult(A(this,xe),this.options);if(re(this,Fr,A(this,xe).state),re(this,nn,this.options),A(this,Fr).data!==void 0&&re(this,sn,A(this,xe)),fa(r,t))return;re(this,tt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!A(this,on).size)return!0;const s=new Set(a??A(this,on));return this.options.throwOnError&&s.add("error"),Object.keys(A(this,tt)).some(o=>{const c=o;return A(this,tt)[c]!==t[c]&&s.has(c)})};me(this,Se,Ol).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Se,ba).call(this)}},st=new WeakMap,xe=new WeakMap,jn=new WeakMap,tt=new WeakMap,Fr=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Ar=new WeakMap,Or=new WeakMap,or=new WeakMap,on=new WeakMap,Se=new WeakSet,mn=function(t){me(this,Se,Ca).call(this);let r=A(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ot)),r},ga=function(){me(this,Se,wa).call(this);const t=cr(this.options.staleTime,A(this,xe));if(Rr||A(this,tt).isStale||!pa(t))return;const n=Cl(A(this,tt).dataUpdatedAt,t)+1;re(this,Ar,setTimeout(()=>{A(this,tt).isStale||this.updateResult()},n))},ya=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,xe)):this.options.refetchInterval)??!1},va=function(t){me(this,Se,Sa).call(this),re(this,or,t),!(Rr||vt(this.options.enabled,A(this,xe))===!1||!pa(A(this,or))||A(this,or)===0)&&re(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||Ha.isFocused())&&me(this,Se,mn).call(this)},A(this,or)))},ba=function(){me(this,Se,ga).call(this),me(this,Se,va).call(this,me(this,Se,ya).call(this))},wa=function(){A(this,Ar)&&(clearTimeout(A(this,Ar)),re(this,Ar,void 0))},Sa=function(){A(this,Or)&&(clearInterval(A(this,Or)),re(this,Or,void 0))},Ca=function(){const t=A(this,st).getQueryCache().build(A(this,st),this.options);if(t===A(this,xe))return;const r=A(this,xe);re(this,xe,t),re(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ol=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(A(this,tt))}),A(this,st).getQueryCache().notify({query:A(this,xe),type:"observerResultsUpdated"})})},sl);function zu(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ms(e,t){return zu(e,t)||e.state.data!==void 0&&Ea(e,t,t.refetchOnMount)}function Ea(e,t,r){if(vt(t.enabled,e)!==!1&&cr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ka(e,t)}return!1}function zs(e,t,r,n){return(e!==t||vt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ka(e,r)}function Ka(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Bu(e,t){return!fa(e.getCurrentResult(),t)}var _l=ne.createContext(void 0),Vu=e=>{const t=ne.useContext(_l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Nu=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(_l.Provider,{value:e,children:t})),Rl=ne.createContext(!1),Lu=()=>ne.useContext(Rl);Rl.Provider;function qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wu=ne.createContext(qu()),Uu=()=>ne.useContext(Wu),Hu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ku=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Yu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Cu(r,[e.error,n])),Gu=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))}},Qu=(e,t)=>e.isLoading&&e.isFetching&&!t,Zu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Xu(e,t,r){var f,p,y,E,m;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=Lu(),i=Uu(),a=Vu(),s=a.defaultQueryOptions(e);(p=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.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",Gu(s),Hu(s,i),Ku(i);const o=!a.getQueryCache().get(s.queryHash),[c]=ne.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),h=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(S=>{const v=h?c.subscribe(Ke.batchCalls(S)):ot;return c.updateResult(),v},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ne.useEffect(()=>{c.setOptions(s)},[s,c]),Zu(s,d))throw Bs(s,c,i);if(Yu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((E=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||E.call(y,s,d),s.experimental_prefetchInRender&&!Rr&&Qu(d,n)){const S=o?Bs(s,c,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;S==null||S.catch(ot).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ju(e,t){return Xu(e,Mu)}function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},be={};/** @license React v16.13.1
|
|
1
|
+
"use strict";var Gc=Object.defineProperty;var bs=e=>{throw TypeError(e)};var Qc=(e,t,r)=>t in e?Gc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Qc(e,typeof t!="symbol"?t+"":t,r),Pi=(e,t,r)=>t.has(e)||bs("Cannot "+r);var A=(e,t,r)=>(Pi(e,t,"read from private field"),r?r.call(e):t.get(e)),he=(e,t,r)=>t.has(e)?bs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),se=(e,t,r,n)=>(Pi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(Pi(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){se(e,t,i,r)},get _(){return A(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),P=require("react"),x=require("@mui/material"),Zc=require("@emotion/styled"),fr=require("@emotion/react");function Xc(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 ne=Xc(P);var An=e=>e.type==="checkbox",br=e=>e instanceof Date,nt=e=>e==null;const ll=e=>typeof e=="object";var Ve=e=>!nt(e)&&!Array.isArray(e)&&ll(e)&&!br(e),cl=e=>Ve(e)&&e.target?An(e.target)?e.target.checked:e.target.value:e,Jc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ul=(e,t)=>e.has(Jc(t)),eu=e=>{const t=e.constructor&&e.constructor.prototype;return Ve(t)&&t.hasOwnProperty("isPrototypeOf")},Na=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _e(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(!(Na&&(e instanceof Blob||n))&&(r||Ve(e)))if(t=r?[]:{},!r&&!eu(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=_e(e[i]));else return e;return t}var vi=e=>/^\w*$/.test(e),Fe=e=>e===void 0,bi=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Ve(e))return r;const n=(vi(t)?[t]:La(t)).reduce((i,a)=>nt(i)?i:i[a],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},dt=e=>typeof e=="boolean",ye=(e,t,r)=>{let n=-1;const i=vi(t)?[t]:La(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let c=r;if(n!==s){const p=e[o];c=Ve(p)||Array.isArray(p)?p:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const Jn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},St={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pl=P.createContext(null);pl.displayName="HookFormContext";const wi=()=>P.useContext(pl);var dl=(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]!==St.all&&(t._proxyFormState[s]=!n||St.all),r&&(r[s]=!0),e[s]}});return i};const Si=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function tu(e){const t=wi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Si(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:p=>{!n&&o({...r._formState,...p})}}),[i,n,a]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>dl(s,r,c.current,!1),[s,r])}var zt=e=>typeof e=="string",fl=(e,t,r,n,i)=>zt(e)?(n&&t.watch.add(e),te(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),te(r,a))):(n&&(t.watchAll=!0),r);function hl(e){const t=wi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=P.useRef(i),[c,p]=P.useState(r._getWatch(n,o.current));return Si(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:f=>!a&&p(fl(n,r._names,f.values||r._formValues,!1,o.current))}),[n,r,a,s]),P.useEffect(()=>r._removeUnmounted()),c}function ru(e){const t=wi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=ul(i._names.array,r),o=hl({control:i,name:r,defaultValue:te(i._formValues,r,te(i._defaultValues,r,e.defaultValue)),exact:!0}),c=tu({control:i,name:r,exact:!0}),p=P.useRef(e),f=P.useRef(i.register(r,{...e.rules,value:o,...dt(e.disabled)?{disabled:e.disabled}:{}})),d=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(c.validatingFields,r)},error:{enumerable:!0,get:()=>te(c.errors,r)}}),[c,r]),u=P.useCallback(S=>f.current.onChange({target:{value:cl(S),name:r},type:Jn.CHANGE}),[r]),y=P.useCallback(()=>f.current.onBlur({target:{value:te(i._formValues,r),name:r},type:Jn.BLUR}),[r,i._formValues]),E=P.useCallback(S=>{const v=te(i._fields,r);v&&S&&(v._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:j=>S.setCustomValidity(j),reportValidity:()=>S.reportValidity()})},[i._fields,r]),m=P.useMemo(()=>({name:r,value:o,...dt(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:u,onBlur:y,ref:E}),[r,n,c.disabled,u,y,E,o]);return P.useEffect(()=>{const S=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...dt(p.current.disabled)?{disabled:p.current.disabled}:{}});const v=(j,D)=>{const F=te(i._fields,j);F&&F._f&&(F._f.mount=D)};if(v(r,!0),S){const j=_e(te(i._options.defaultValues,r));ye(i._defaultValues,r,j),Fe(te(i._formValues,r))&&ye(i._formValues,r,j)}return!s&&i.register(r),()=>{(s?S&&!i._state.action:S)?i.unregister(r):v(r,!1)}},[r,i,s,a]),P.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),P.useMemo(()=>({field:m,formState:c,fieldState:d}),[m,c,d])}const Oe=e=>e.render(ru(e));var ml=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],ws=()=>{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=[]}}},la=e=>nt(e)||!ll(e);function Jt(e,t){if(la(e)||la(t))return e===t;if(br(e)&&br(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(br(a)&&br(s)||Ve(a)&&Ve(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var rt=e=>Ve(e)&&!Object.keys(e).length,qa=e=>e.type==="file",Ft=e=>typeof e=="function",ei=e=>{if(!Na)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xl=e=>e.type==="select-multiple",Wa=e=>e.type==="radio",nu=e=>Wa(e)||An(e),Di=e=>ei(e)&&e.isConnected;function iu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function au(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Le(e,t){const r=Array.isArray(t)?t:vi(t)?[t]:La(t),n=r.length===1?e:iu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Ve(n)&&rt(n)||Array.isArray(n)&&au(n))&&Le(e,r.slice(0,-1)),e}var gl=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ti(e,t={}){const r=Array.isArray(e);if(Ve(e)||r)for(const n in e)Array.isArray(e[n])||Ve(e[n])&&!gl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ti(e[n],t[n])):nt(e[n])||(t[n]=!0);return t}function yl(e,t,r){const n=Array.isArray(e);if(Ve(e)||n)for(const i in e)Array.isArray(e[i])||Ve(e[i])&&!gl(e[i])?Fe(t)||la(r[i])?r[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:yl(e[i],nt(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>yl(e,t,ti(t));const Ss={value:!1,isValid:!1},Cs={value:!0,isValid:!0};var vl=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&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?Cs:{value:e[0].value,isValid:!0}:Cs:Ss}return Ss},bl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Es={isValid:!1,value:null};var wl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Es):Es;function ks(e){const t=e.ref;return qa(t)?t.files:Wa(t)?wl(e.refs).value:xl(t)?[...t.selectedOptions].map(({value:r})=>r):An(t)?vl(e.refs).value:bl(Fe(t.value)?e.ref.value:t.value,e)}var su=(e,t,r,n)=>{const i={};for(const a of e){const s=te(t,a);s&&ye(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ri=e=>e instanceof RegExp,fn=e=>Fe(e)?e:ri(e)?e.source:Ve(e)?ri(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===St.onSubmit,isOnBlur:e===St.onBlur,isOnChange:e===St.onChange,isOnAll:e===St.all,isOnTouch:e===St.onTouched});const Ts="AsyncFunction";var ou=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===Ts||Ve(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ts)),lu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ca=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Kr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=te(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(Kr(o,t))break}else if(Ve(o)&&Kr(o,t))break}}};function js(e,t,r){const n=te(e,r);if(n||vi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=te(t,a),o=te(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 cu=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return rt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||St.all))},uu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),pu=(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,du=(e,t)=>!bi(te(e,t)).length&&Le(e,t),Sl=(e,t,r)=>{const n=ct(te(e,r));return ye(n,"root",t[r]),ye(e,r,n),e},Hn=e=>zt(e);function Fs(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||dt(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>Ve(e)&&!ri(e)?e:{value:e,message:""},ua=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:c,maxLength:p,minLength:f,min:d,max:u,pattern:y,validate:E,name:m,valueAsNumber:S,mount:v}=e._f,j=te(r,m);if(!v||t.has(m))return{};const D=o?o[0]:s,F=N=>{i&&D.reportValidity&&(D.setCustomValidity(dt(N)?"":N||""),D.reportValidity())},C={},_=Wa(s),I=An(s),R=_||I,Y=(S||qa(s))&&Fe(s.value)&&Fe(j)||ei(s)&&s.value===""||j===""||Array.isArray(j)&&!j.length,h=ml.bind(null,m,n,C),M=(N,G,B,q=Bt.maxLength,Q=Bt.minLength)=>{const ie=N?G:B;C[m]={type:N?q:Q,message:ie,ref:s,...h(N?q:Q,ie)}};if(a?!Array.isArray(j)||!j.length:c&&(!R&&(Y||nt(j))||dt(j)&&!j||I&&!vl(o).isValid||_&&!wl(o).isValid)){const{value:N,message:G}=Hn(c)?{value:!!c,message:c}:zr(c);if(N&&(C[m]={type:Bt.required,message:G,ref:D,...h(Bt.required,G)},!n))return F(G),C}if(!Y&&(!nt(d)||!nt(u))){let N,G;const B=zr(u),q=zr(d);if(!nt(j)&&!isNaN(j)){const Q=s.valueAsNumber||j&&+j;nt(B.value)||(N=Q>B.value),nt(q.value)||(G=Q<q.value)}else{const Q=s.valueAsDate||new Date(j),ie=L=>new Date(new Date().toDateString()+" "+L),pe=s.type=="time",$=s.type=="week";zt(B.value)&&j&&(N=pe?ie(j)>ie(B.value):$?j>B.value:Q>new Date(B.value)),zt(q.value)&&j&&(G=pe?ie(j)<ie(q.value):$?j<q.value:Q<new Date(q.value))}if((N||G)&&(M(!!N,B.message,q.message,Bt.max,Bt.min),!n))return F(C[m].message),C}if((p||f)&&!Y&&(zt(j)||a&&Array.isArray(j))){const N=zr(p),G=zr(f),B=!nt(N.value)&&j.length>+N.value,q=!nt(G.value)&&j.length<+G.value;if((B||q)&&(M(B,N.message,G.message),!n))return F(C[m].message),C}if(y&&!Y&&zt(j)){const{value:N,message:G}=zr(y);if(ri(N)&&!j.match(N)&&(C[m]={type:Bt.pattern,message:G,ref:s,...h(Bt.pattern,G)},!n))return F(G),C}if(E){if(Ft(E)){const N=await E(j,r),G=Fs(N,D);if(G&&(C[m]={...G,...h(Bt.validate,G.message)},!n))return F(G.message),C}else if(Ve(E)){let N={};for(const G in E){if(!rt(N)&&!n)break;const B=Fs(await E[G](j,r),D,G);B&&(N={...B,...h(G,B.message)},F(B.message),n&&(C[m]=N))}if(!rt(N)&&(C[m]={ref:D,...N},!n))return C}}return F(!0),C};const fu={mode:St.onSubmit,reValidateMode:St.onChange,shouldFocusError:!0};function hu(e={}){let t={...fu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ft(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=Ve(t.defaultValues)||Ve(t.values)?_e(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:_e(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,p=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...f};const u={array:ws(),state:ws()},y=t.criteriaMode===St.all,E=w=>T=>{clearTimeout(p),p=setTimeout(w,T)},m=async w=>{if(!t.disabled&&(f.isValid||d.isValid||w)){const T=t.resolver?rt((await I()).errors):await Y(n,!0);T!==r.isValid&&u.state.next({isValid:T})}},S=(w,T)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((w||Array.from(o.mount)).forEach(g=>{g&&(T?ye(r.validatingFields,g,T):Le(r.validatingFields,g))}),u.state.next({validatingFields:r.validatingFields,isValidating:!rt(r.validatingFields)}))},v=(w,T=[],g,z,b=!0,O=!0)=>{if(z&&g&&!t.disabled){if(s.action=!0,O&&Array.isArray(te(n,w))){const W=g(te(n,w),z.argA,z.argB);b&&ye(n,w,W)}if(O&&Array.isArray(te(r.errors,w))){const W=g(te(r.errors,w),z.argA,z.argB);b&&ye(r.errors,w,W),du(r.errors,w)}if((f.touchedFields||d.touchedFields)&&O&&Array.isArray(te(r.touchedFields,w))){const W=g(te(r.touchedFields,w),z.argA,z.argB);b&&ye(r.touchedFields,w,W)}(f.dirtyFields||d.dirtyFields)&&(r.dirtyFields=dn(i,a)),u.state.next({name:w,isDirty:M(w,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ye(a,w,T)},j=(w,T)=>{ye(r.errors,w,T),u.state.next({errors:r.errors})},D=w=>{r.errors=w,u.state.next({errors:r.errors,isValid:!1})},F=(w,T,g,z)=>{const b=te(n,w);if(b){const O=te(a,w,Fe(g)?te(i,w):g);Fe(O)||z&&z.defaultChecked||T?ye(a,w,T?O:ks(b._f)):B(w,O),s.mount&&m()}},C=(w,T,g,z,b)=>{let O=!1,W=!1;const K={name:w};if(!t.disabled){if(!g||z){(f.isDirty||d.isDirty)&&(W=r.isDirty,r.isDirty=K.isDirty=M(),O=W!==K.isDirty);const U=Jt(te(i,w),T);W=!!te(r.dirtyFields,w),U?Le(r.dirtyFields,w):ye(r.dirtyFields,w,!0),K.dirtyFields=r.dirtyFields,O=O||(f.dirtyFields||d.dirtyFields)&&W!==!U}if(g){const U=te(r.touchedFields,w);U||(ye(r.touchedFields,w,g),K.touchedFields=r.touchedFields,O=O||(f.touchedFields||d.touchedFields)&&U!==g)}O&&b&&u.state.next(K)}return O?K:{}},_=(w,T,g,z)=>{const b=te(r.errors,w),O=(f.isValid||d.isValid)&&dt(T)&&r.isValid!==T;if(t.delayError&&g?(c=E(()=>j(w,g)),c(t.delayError)):(clearTimeout(p),c=null,g?ye(r.errors,w,g):Le(r.errors,w)),(g?!Jt(b,g):b)||!rt(z)||O){const W={...z,...O&&dt(T)?{isValid:T}:{},errors:r.errors,name:w};r={...r,...W},u.state.next(W)}},I=async w=>{S(w,!0);const T=await t.resolver(a,t.context,su(w||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return S(w),T},R=async w=>{const{errors:T}=await I(w);if(w)for(const g of w){const z=te(T,g);z?ye(r.errors,g,z):Le(r.errors,g)}else r.errors=T;return T},Y=async(w,T,g={valid:!0})=>{for(const z in w){const b=w[z];if(b){const{_f:O,...W}=b;if(O){const K=o.array.has(O.name),U=b._f&&ou(b._f);U&&f.validatingFields&&S([z],!0);const de=await ua(b,o.disabled,a,y,t.shouldUseNativeValidation&&!T,K);if(U&&f.validatingFields&&S([z]),de[O.name]&&(g.valid=!1,T))break;!T&&(te(de,O.name)?K?Sl(r.errors,de,O.name):ye(r.errors,O.name,de[O.name]):Le(r.errors,O.name))}!rt(W)&&await Y(W,T,g)}}return g.valid},h=()=>{for(const w of o.unMount){const T=te(n,w);T&&(T._f.refs?T._f.refs.every(g=>!Di(g)):!Di(T._f.ref))&&ee(w)}o.unMount=new Set},M=(w,T)=>!t.disabled&&(w&&T&&ye(a,w,T),!Jt(L(),i)),N=(w,T,g)=>fl(w,o,{...s.mount?a:Fe(T)?i:zt(w)?{[w]:T}:T},g,T),G=w=>bi(te(s.mount?a:i,w,t.shouldUnregister?te(i,w,[]):[])),B=(w,T,g={})=>{const z=te(n,w);let b=T;if(z){const O=z._f;O&&(!O.disabled&&ye(a,w,bl(T,O)),b=ei(O.ref)&&nt(T)?"":T,xl(O.ref)?[...O.ref.options].forEach(W=>W.selected=b.includes(W.value)):O.refs?An(O.ref)?O.refs.forEach(W=>{(!W.defaultChecked||!W.disabled)&&(Array.isArray(b)?W.checked=!!b.find(K=>K===W.value):W.checked=b===W.value||!!b)}):O.refs.forEach(W=>W.checked=W.value===b):qa(O.ref)?O.ref.value="":(O.ref.value=b,O.ref.type||u.state.next({name:w,values:_e(a)})))}(g.shouldDirty||g.shouldTouch)&&C(w,b,g.shouldTouch,g.shouldDirty,!0),g.shouldValidate&&$(w)},q=(w,T,g)=>{for(const z in T){if(!T.hasOwnProperty(z))return;const b=T[z],O=w+"."+z,W=te(n,O);(o.array.has(w)||Ve(b)||W&&!W._f)&&!br(b)?q(O,b,g):B(O,b,g)}},Q=(w,T,g={})=>{const z=te(n,w),b=o.array.has(w),O=_e(T);ye(a,w,O),b?(u.array.next({name:w,values:_e(a)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&g.shouldDirty&&u.state.next({name:w,dirtyFields:dn(i,a),isDirty:M(w,O)})):z&&!z._f&&!nt(O)?q(w,O,g):B(w,O,g),ca(w,o)&&u.state.next({...r}),u.state.next({name:s.mount?w:void 0,values:_e(a)})},ie=async w=>{s.mount=!0;const T=w.target;let g=T.name,z=!0;const b=te(n,g),O=U=>{z=Number.isNaN(U)||br(U)&&isNaN(U.getTime())||Jt(U,te(a,g,U))},W=Ur(t.mode),K=Ur(t.reValidateMode);if(b){let U,de;const ve=T.type?ks(b._f):cl(w),Ce=w.type===Jn.BLUR||w.type===Jn.FOCUS_OUT,De=!lu(b._f)&&!t.resolver&&!te(r.errors,g)&&!b._f.deps||pu(Ce,te(r.touchedFields,g),r.isSubmitted,K,W),Be=ca(g,o,Ce);ye(a,g,ve),Ce?(b._f.onBlur&&b._f.onBlur(w),c&&c(0)):b._f.onChange&&b._f.onChange(w);const Xe=C(g,ve,Ce),Ot=!rt(Xe)||Be;if(!Ce&&u.state.next({name:g,type:w.type,values:_e(a)}),De)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?Ce&&m():Ce||m()),Ot&&u.state.next({name:g,...Be?{}:Xe});if(!Ce&&Be&&u.state.next({...r}),t.resolver){const{errors:Je}=await I([g]);if(O(ve),z){const We=js(r.errors,n,g),pt=js(Je,n,We.name||g);U=pt.error,g=pt.name,de=rt(Je)}}else S([g],!0),U=(await ua(b,o.disabled,a,y,t.shouldUseNativeValidation))[g],S([g]),O(ve),z&&(U?de=!1:(f.isValid||d.isValid)&&(de=await Y(n,!0)));z&&(b._f.deps&&$(b._f.deps),_(g,de,U,Xe))}},pe=(w,T)=>{if(te(r.errors,T)&&w.focus)return w.focus(),1},$=async(w,T={})=>{let g,z;const b=ct(w);if(t.resolver){const O=await R(Fe(w)?w:b);g=rt(O),z=w?!b.some(W=>te(O,W)):g}else w?(z=(await Promise.all(b.map(async O=>{const W=te(n,O);return await Y(W&&W._f?{[O]:W}:W)}))).every(Boolean),!(!z&&!r.isValid)&&m()):z=g=await Y(n);return u.state.next({...!zt(w)||(f.isValid||d.isValid)&&g!==r.isValid?{}:{name:w},...t.resolver||!w?{isValid:g}:{},errors:r.errors}),T.shouldFocus&&!z&&Kr(n,pe,w?b:o.mount),z},L=w=>{const T={...s.mount?a:i};return Fe(w)?T:zt(w)?te(T,w):w.map(g=>te(T,g))},Z=(w,T)=>({invalid:!!te((T||r).errors,w),isDirty:!!te((T||r).dirtyFields,w),error:te((T||r).errors,w),isValidating:!!te(r.validatingFields,w),isTouched:!!te((T||r).touchedFields,w)}),ce=w=>{w&&ct(w).forEach(T=>Le(r.errors,T)),u.state.next({errors:w?r.errors:{}})},fe=(w,T,g)=>{const z=(te(n,w,{_f:{}})._f||{}).ref,b=te(r.errors,w)||{},{ref:O,message:W,type:K,...U}=b;ye(r.errors,w,{...U,...T,ref:z}),u.state.next({name:w,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&z&&z.focus&&z.focus()},ue=(w,T)=>Ft(w)?u.state.subscribe({next:g=>w(N(void 0,T),g)}):N(w,T,!0),re=w=>u.state.subscribe({next:T=>{uu(w.name,T.name,w.exact)&&cu(T,w.formState||f,Ue,w.reRenderRoot)&&w.callback({values:{...a},...r,...T})}}).unsubscribe,H=w=>(s.mount=!0,d={...d,...w.formState},re({...w,formState:d})),ee=(w,T={})=>{for(const g of w?ct(w):o.mount)o.mount.delete(g),o.array.delete(g),T.keepValue||(Le(n,g),Le(a,g)),!T.keepError&&Le(r.errors,g),!T.keepDirty&&Le(r.dirtyFields,g),!T.keepTouched&&Le(r.touchedFields,g),!T.keepIsValidating&&Le(r.validatingFields,g),!t.shouldUnregister&&!T.keepDefaultValue&&Le(i,g);u.state.next({values:_e(a)}),u.state.next({...r,...T.keepDirty?{isDirty:M()}:{}}),!T.keepIsValid&&m()},ae=({disabled:w,name:T})=>{(dt(w)&&s.mount||w||o.disabled.has(T))&&(w?o.disabled.add(T):o.disabled.delete(T))},oe=(w,T={})=>{let g=te(n,w);const z=dt(T.disabled)||dt(t.disabled);return ye(n,w,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:w}},name:w,mount:!0,...T}}),o.mount.add(w),g?ae({disabled:dt(T.disabled)?T.disabled:t.disabled,name:w}):F(w,!0,T.value),{...z?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:fn(T.min),max:fn(T.max),minLength:fn(T.minLength),maxLength:fn(T.maxLength),pattern:fn(T.pattern)}:{},name:w,onChange:ie,onBlur:ie,ref:b=>{if(b){oe(w,T),g=te(n,w);const O=Fe(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,W=nu(O),K=g._f.refs||[];if(W?K.find(U=>U===O):O===g._f.ref)return;ye(n,w,{_f:{...g._f,...W?{refs:[...K.filter(Di),O,...Array.isArray(te(i,w))?[{}]:[]],ref:{type:O.type,name:w}}:{ref:O}}}),F(w,!1,void 0,O)}else g=te(n,w,{}),g._f&&(g._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(ul(o.array,w)&&s.action)&&o.unMount.add(w)}}},le=()=>t.shouldFocusError&&Kr(n,pe,o.mount),ge=w=>{dt(w)&&(u.state.next({disabled:w}),Kr(n,(T,g)=>{const z=te(n,g);z&&(T.disabled=z._f.disabled||w,Array.isArray(z._f.refs)&&z._f.refs.forEach(b=>{b.disabled=z._f.disabled||w}))},0,!1))},X=(w,T)=>async g=>{let z;g&&(g.preventDefault&&g.preventDefault(),g.persist&&g.persist());let b=_e(a);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:W}=await I();r.errors=O,b=W}else await Y(n);if(o.disabled.size)for(const O of o.disabled)ye(b,O,void 0);if(Le(r.errors,"root"),rt(r.errors)){u.state.next({errors:{}});try{await w(b,g)}catch(O){z=O}}else T&&await T({...r.errors},g),le(),setTimeout(le);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(r.errors)&&!z,submitCount:r.submitCount+1,errors:r.errors}),z)throw z},Pe=(w,T={})=>{te(n,w)&&(Fe(T.defaultValue)?Q(w,_e(te(i,w))):(Q(w,T.defaultValue),ye(i,w,_e(T.defaultValue))),T.keepTouched||Le(r.touchedFields,w),T.keepDirty||(Le(r.dirtyFields,w),r.isDirty=T.defaultValue?M(w,_e(te(i,w))):M()),T.keepError||(Le(r.errors,w),f.isValid&&m()),u.state.next({...r}))},qe=(w,T={})=>{const g=w?_e(w):i,z=_e(g),b=rt(w),O=b?i:z;if(T.keepDefaultValues||(i=g),!T.keepValues){if(T.keepDirtyValues){const W=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const K of Array.from(W))te(r.dirtyFields,K)?ye(O,K,te(a,K)):Q(K,te(O,K))}else{if(Na&&Fe(w))for(const W of o.mount){const K=te(n,W);if(K&&K._f){const U=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(ei(U)){const de=U.closest("form");if(de){de.reset();break}}}}for(const W of o.mount)Q(W,te(O,W))}a=_e(O),u.array.next({values:{...O}}),u.state.next({values:{...O}})}o={mount:T.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!T.keepIsValid||!!T.keepDirtyValues,s.watch=!!t.shouldUnregister,u.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:b?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Jt(w,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:b?{}:T.keepDirtyValues?T.keepDefaultValues&&a?dn(i,a):r.dirtyFields:T.keepDefaultValues&&w?dn(i,w):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ge=(w,T)=>qe(Ft(w)?w(a):w,T),kt=(w,T={})=>{const g=te(n,w),z=g&&g._f;if(z){const b=z.refs?z.refs[0]:z.ref;b.focus&&(b.focus(),T.shouldSelect&&Ft(b.select)&&b.select())}},Ue=w=>{r={...r,...w}},He={control:{register:oe,unregister:ee,getFieldState:Z,handleSubmit:X,setError:fe,_subscribe:re,_runSchema:I,_focusError:le,_getWatch:N,_getDirty:M,_setValid:m,_setFieldArray:v,_setDisabledField:ae,_setErrors:D,_getFieldArray:G,_reset:qe,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(w=>{Ge(w,t.resetOptions),u.state.next({isLoading:!1})}),_removeUnmounted:h,_disableForm:ge,_subjects:u,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(w){s=w},get _defaultValues(){return i},get _names(){return o},set _names(w){o=w},get _formState(){return r},get _options(){return t},set _options(w){t={...t,...w}}},subscribe:H,trigger:$,register:oe,handleSubmit:X,watch:ue,setValue:Q,getValues:L,reset:Ge,resetField:Pe,clearErrors:ce,unregister:ee,setError:fe,setFocus:kt,getFieldState:Z};return{...He,formControl:He}}var Gt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ii=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",Mi=(e,t)=>[...e,...ct(t)],zi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Bi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Vi=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ni=(e,t)=>[...ct(t),...ct(e)];function mu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return bi(n).length?n:[]}var Li=(e,t)=>Fe(t)?[]:mu(e,ct(t).sort((r,n)=>r-n)),qi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},As=(e,t,r)=>(e[t]=r,e);function xu(e){const t=wi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,c]=P.useState(r._getFieldArray(n)),p=P.useRef(r._getFieldArray(n).map(Gt)),f=P.useRef(o),d=P.useRef(n),u=P.useRef(!1);d.current=n,f.current=o,r._names.array.add(n),s&&r.register(n,s),Si(()=>r._subjects.array.subscribe({next:({values:_,name:I})=>{if(I===d.current||!I){const R=te(_,d.current);Array.isArray(R)&&(c(R),p.current=R.map(Gt))}}}).unsubscribe,[r]);const y=P.useCallback(_=>{u.current=!0,r._setFieldArray(n,_)},[r,n]),E=(_,I)=>{const R=ct(_e(_)),Y=Mi(r._getFieldArray(n),R);r._names.focus=Ii(n,Y.length-1,I),p.current=Mi(p.current,R.map(Gt)),y(Y),c(Y),r._setFieldArray(n,Y,Mi,{argA:zi(_)})},m=(_,I)=>{const R=ct(_e(_)),Y=Ni(r._getFieldArray(n),R);r._names.focus=Ii(n,0,I),p.current=Ni(p.current,R.map(Gt)),y(Y),c(Y),r._setFieldArray(n,Y,Ni,{argA:zi(_)})},S=_=>{const I=Li(r._getFieldArray(n),_);p.current=Li(p.current,_),y(I),c(I),!Array.isArray(te(r._fields,n))&&ye(r._fields,n,void 0),r._setFieldArray(n,I,Li,{argA:_})},v=(_,I,R)=>{const Y=ct(_e(I)),h=Bi(r._getFieldArray(n),_,Y);r._names.focus=Ii(n,_,R),p.current=Bi(p.current,_,Y.map(Gt)),y(h),c(h),r._setFieldArray(n,h,Bi,{argA:_,argB:zi(I)})},j=(_,I)=>{const R=r._getFieldArray(n);qi(R,_,I),qi(p.current,_,I),y(R),c(R),r._setFieldArray(n,R,qi,{argA:_,argB:I},!1)},D=(_,I)=>{const R=r._getFieldArray(n);Vi(R,_,I),Vi(p.current,_,I),y(R),c(R),r._setFieldArray(n,R,Vi,{argA:_,argB:I},!1)},F=(_,I)=>{const R=_e(I),Y=As(r._getFieldArray(n),_,R);p.current=[...Y].map((h,M)=>!h||M===_?Gt():p.current[M]),y(Y),c([...Y]),r._setFieldArray(n,Y,As,{argA:_,argB:R},!0,!1)},C=_=>{const I=ct(_e(_));p.current=I.map(Gt),y([...I]),c([...I]),r._setFieldArray(n,[...I],R=>R,{},!0,!1)};return P.useEffect(()=>{if(r._state.action=!1,ca(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const I=te(_.errors,n),R=te(r._formState.errors,n);(R?!I&&R.type||I&&(R.type!==I.type||R.message!==I.message):I&&I.type)&&(I?ye(r._formState.errors,n,I):Le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=te(r._fields,n);_&&_._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ua(_,r._names.disabled,r._formValues,r._options.criteriaMode===St.all,r._options.shouldUseNativeValidation,!0).then(I=>!rt(I)&&r._subjects.state.next({errors:Sl(r._formState.errors,I,n)}))}r._subjects.state.next({name:n,values:_e(r._formValues)}),r._names.focus&&Kr(r._fields,(_,I)=>{if(r._names.focus&&I.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[o,n,r]),P.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(I,R)=>{const Y=te(r._fields,I);Y&&Y._f&&(Y._f.mount=R)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:P.useCallback(j,[y,n,r]),move:P.useCallback(D,[y,n,r]),prepend:P.useCallback(m,[y,n,r]),append:P.useCallback(E,[y,n,r]),remove:P.useCallback(S,[y,n,r]),insert:P.useCallback(v,[y,n,r]),update:P.useCallback(F,[y,n,r]),replace:P.useCallback(C,[y,n,r]),fields:P.useMemo(()=>o.map((_,I)=>({..._,[i]:p.current[I]||Gt()})),[o,i])}}function gu(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.useState({isDirty:!1,isValidating:!1,isLoading:Ft(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:Ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=hu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Si(()=>{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]),P.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),P.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),P.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),P.useEffect(()=>{e.values&&!Jt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),P.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=dl(n,a),t.current}const Os=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Cl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Os(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>Os(i,r,e))}},yu=(e,t)=>{t.shouldUseNativeValidation&&Cl(e,t);const r={};for(const n in e){const i=te(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(vu(t.names||Object.keys(e),n)){const s=Object.assign({},te(r,n));ye(s,"root",a),ye(r,n,s)}else ye(r,n,a)}return r},vu=(e,t)=>{const r=_s(t);return e.some(n=>_s(n).match(`^${r}\\.\\d+`))};function _s(e){return e.replace(/\]|\[/g,"")}function bu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(p){return a.shouldUseNativeValidation&&Cl({},a),{values:r.raw?Object.assign({},n):p,errors:{}}}))}catch(p){return o(p)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(!s.inner)throw s;return{values:{},errors:yu((o=s,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(p,f){if(p[f.path]||(p[f.path]={message:f.message,type:f.type}),c){var d=p[f.path].types,u=d&&d[f.type];p[f.path]=ml(f.path,c,p,f.type,u?[].concat(u,f.message):f.message)}return p},{})),a)};var o,c}))}catch(s){return Promise.reject(s)}}}var On=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(){}},$r=typeof window>"u"||"Deno"in globalThis;function ot(){}function wu(e,t){return typeof e=="function"?e(t):e}function pa(e){return typeof e=="number"&&e>=0&&e!==1/0}function El(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cr(e,t){return typeof e=="function"?e(t):e}function vt(e,t){return typeof e=="function"?e(t):e}function Rs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ua(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function $s(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(wn(t.options.mutationKey)!==wn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ua(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>ha(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Sn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Sn(e[r],t[r])):!1}function da(e,t){if(e===t)return e;const r=Ps(e)&&Ps(t);if(r||ha(e)&&ha(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},c=new Set(n);let p=0;for(let f=0;f<s;f++){const d=r?f:a[f];(!r&&c.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,p++):(o[d]=da(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&p++)}return i===s&&p===i?e:o}return t}function fa(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 Ps(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ha(e){if(!Ds(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ds(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ds(e){return Object.prototype.toString.call(e)==="[object Object]"}function Su(e){return new Promise(t=>{setTimeout(t,e)})}function ma(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 da(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 da(e,t)}return t}function Cu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Eu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ni=Symbol();function kl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ni&&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===ni?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ku(e,t){return typeof e=="function"?e(...t):!!e}var Cr,er,Gr,Jo,Tu=(Jo=class extends On{constructor(){super();he(this,Cr);he(this,er);he(this,Gr);se(this,Gr,t=>{if(!$r&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,er)||this.setEventListener(A(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,er))==null||t.call(this),se(this,er,void 0))}setEventListener(t){var r;se(this,Gr,t),(r=A(this,er))==null||r.call(this),se(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){A(this,Cr)!==t&&(se(this,Cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof A(this,Cr)=="boolean"?A(this,Cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cr=new WeakMap,er=new WeakMap,Gr=new WeakMap,Jo),Ha=new Tu,Qr,tr,Zr,el,ju=(el=class extends On{constructor(){super();he(this,Qr,!0);he(this,tr);he(this,Zr);se(this,Zr,t=>{if(!$r&&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(){A(this,tr)||this.setEventListener(A(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,tr))==null||t.call(this),se(this,tr,void 0))}setEventListener(t){var r;se(this,Zr,t),(r=A(this,tr))==null||r.call(this),se(this,tr,t(this.setOnline.bind(this)))}setOnline(t){A(this,Qr)!==t&&(se(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return A(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,el),ii=new ju;function xa(){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 Fu(e){return Math.min(1e3*2**e,3e4)}function Tl(e){return(e??"online")==="online"?ii.isOnline():!0}var jl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Wi(e){return e instanceof jl}function Fl(e){let t=!1,r=0,n=!1,i;const a=xa(),s=m=>{var S;n||(u(new jl(m)),(S=e.abort)==null||S.call(e))},o=()=>{t=!0},c=()=>{t=!1},p=()=>Ha.isFocused()&&(e.networkMode==="always"||ii.isOnline())&&e.canRun(),f=()=>Tl(e.networkMode)&&e.canRun(),d=m=>{var S;n||(n=!0,(S=e.onSuccess)==null||S.call(e,m),i==null||i(),a.resolve(m))},u=m=>{var S;n||(n=!0,(S=e.onError)==null||S.call(e,m),i==null||i(),a.reject(m))},y=()=>new Promise(m=>{var S;i=v=>{(n||p())&&m(v)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),E=()=>{if(n)return;let m;const S=r===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var _;if(n)return;const j=e.retry??($r?0:3),D=e.retryDelay??Fu,F=typeof D=="function"?D(r,v):D,C=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,v);if(t||!C){u(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),Su(F).then(()=>p()?void 0:y()).then(()=>{t?u(v):E()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?E():y().then(E),a)}}var Au=e=>setTimeout(e,0);function Ou(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=Au;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ke=Ou(),Er,tl,Al=(tl=class{constructor(){he(this,Er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pa(this.gcTime)&&se(this,Er,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($r?1/0:5*60*1e3))}clearGcTimeout(){A(this,Er)&&(clearTimeout(A(this,Er)),se(this,Er,void 0))}},Er=new WeakMap,tl),Xr,kr,gt,Tr,Qe,kn,jr,Tt,Wt,rl,_u=(rl=class extends Al{constructor(t){super();he(this,Tt);he(this,Xr);he(this,kr);he(this,gt);he(this,Tr);he(this,Qe);he(this,kn);he(this,jr);se(this,jr,!1),se(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],se(this,Tr,t.client),se(this,gt,A(this,Tr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,se(this,Xr,Ru(this.options)),this.state=t.state??A(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,Qe))==null?void 0:t.promise}setOptions(t){this.options={...A(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,gt).remove(this)}setData(t,r){const n=ma(this.state.data,t,this.options);return me(this,Tt,Wt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){me(this,Tt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=A(this,Qe))==null?void 0:n.promise;return(i=A(this,Qe))==null||i.cancel(t),r?r.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Xr))}isActive(){return this.observers.some(t=>vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ni||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>cr(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:!El(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(A(this,Qe)&&(A(this,jr)?A(this,Qe).cancel({revert:!0}):A(this,Qe).cancelRetry()),this.scheduleGc()),A(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,Tt,Wt).call(this,{type:"invalidate"})}fetch(t,r){var p,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,Qe))return A(this,Qe).continueRetry(),A(this,Qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(y=>y.options.queryFn);u&&this.setOptions(u.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=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(se(this,jr,!0),n.signal)})},a=()=>{const u=kl(this.options,r),E=(()=>{const m={client:A(this,Tr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return se(this,jr,!1),this.options.persister?this.options.persister(u,E,this):u(E)},o=(()=>{const u={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,Tr),state:this.state,fetchFn:a};return i(u),u})();(p=this.options.behavior)==null||p.onFetch(o,this),se(this,kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&me(this,Tt,Wt).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const c=u=>{var y,E,m,S;Wi(u)&&u.silent||me(this,Tt,Wt).call(this,{type:"error",error:u}),Wi(u)||((E=(y=A(this,gt).config).onError)==null||E.call(y,u,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,this.state.data,u,this)),this.scheduleGc()};return se(this,Qe,Fl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{var y,E,m,S;if(u===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(v){c(v);return}(E=(y=A(this,gt).config).onSuccess)==null||E.call(y,u,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,u,this.state.error,this),this.scheduleGc()},onError:c,onFail:(u,y)=>{me(this,Tt,Wt).call(this,{type:"failed",failureCount:u,error:y})},onPause:()=>{me(this,Tt,Wt).call(this,{type:"pause"})},onContinue:()=>{me(this,Tt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,Qe).start()}},Xr=new WeakMap,kr=new WeakMap,gt=new WeakMap,Tr=new WeakMap,Qe=new WeakMap,kn=new WeakMap,jr=new WeakMap,Tt=new WeakSet,Wt=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,...Ol(n.data,this.options),fetchMeta:t.meta??null};case"success":return se(this,kr,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 Wi(i)&&i.revert&&A(this,kr)?{...A(this,kr),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),Ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,gt).notify({query:this,type:"updated",action:t})})},rl);function Ol(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ru(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 Pt,nl,$u=(nl=class extends On{constructor(t={}){super();he(this,Pt);this.config=t,se(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ua(i,r);let s=this.get(a);return s||(s=new _u({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){A(this,Pt).has(t.queryHash)||(A(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=A(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&A(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,Pt).get(t)}getAll(){return[...A(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rs(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Rs(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,nl),Dt,et,Fr,It,Zt,il,Pu=(il=class extends Al{constructor(t){super();he(this,It);he(this,Dt);he(this,et);he(this,Fr);this.mutationId=t.mutationId,se(this,et,t.mutationCache),se(this,Dt,[]),this.state=t.state||Du(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,Dt).includes(t)||(A(this,Dt).push(t),this.clearGcTimeout(),A(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){se(this,Dt,A(this,Dt).filter(r=>r!==t)),this.scheduleGc(),A(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():A(this,et).remove(this))}continue(){var t;return((t=A(this,Fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,c,p,f,d,u,y,E,m,S,v,j,D,F,C,_,I,R;const r=()=>{me(this,It,Zt).call(this,{type:"continue"})};se(this,Fr,Fl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(Y,h)=>{me(this,It,Zt).call(this,{type:"failed",failureCount:Y,error:h})},onPause:()=>{me(this,It,Zt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,et).canRun(this)}));const n=this.state.status==="pending",i=!A(this,Fr).canStart();try{if(n)r();else{me(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=A(this,et).config).onMutate)==null?void 0:s.call(a,t,this));const h=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));h!==this.state.context&&me(this,It,Zt).call(this,{type:"pending",context:h,variables:t,isPaused:i})}const Y=await A(this,Fr).start();return await((f=(p=A(this,et).config).onSuccess)==null?void 0:f.call(p,Y,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,Y,t,this.state.context)),await((E=(y=A(this,et).config).onSettled)==null?void 0:E.call(y,Y,null,this.state.variables,this.state.context,this)),await((S=(m=this.options).onSettled)==null?void 0:S.call(m,Y,null,t,this.state.context)),me(this,It,Zt).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((j=(v=A(this,et).config).onError)==null?void 0:j.call(v,Y,t,this.state.context,this)),await((F=(D=this.options).onError)==null?void 0:F.call(D,Y,t,this.state.context)),await((_=(C=A(this,et).config).onSettled)==null?void 0:_.call(C,void 0,Y,this.state.variables,this.state.context,this)),await((R=(I=this.options).onSettled)==null?void 0:R.call(I,void 0,Y,t,this.state.context)),Y}finally{me(this,It,Zt).call(this,{type:"error",error:Y})}}finally{A(this,et).runNext(this)}}},Dt=new WeakMap,et=new WeakMap,Fr=new WeakMap,It=new WeakSet,Zt=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),Ke.batch(()=>{A(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),A(this,et).notify({mutation:this,type:"updated",action:t})})},il);function Du(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,jt,Tn,al,Iu=(al=class extends On{constructor(t={}){super();he(this,Ut);he(this,jt);he(this,Tn);this.config=t,se(this,Ut,new Set),se(this,jt,new Map),se(this,Tn,0)}build(t,r,n){const i=new Pu({mutationCache:this,mutationId:++Dn(this,Tn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){A(this,Ut).add(t);const r=In(t);if(typeof r=="string"){const n=A(this,jt).get(r);n?n.push(t):A(this,jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Ut).delete(t)){const r=In(t);if(typeof r=="string"){const n=A(this,jt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&A(this,jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=A(this,jt).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=In(t);if(typeof r=="string"){const i=(n=A(this,jt).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(){Ke.batch(()=>{A(this,Ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Ut).clear(),A(this,jt).clear()})}getAll(){return Array.from(A(this,Ut))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$s(r,n))}findAll(t={}){return this.getAll().filter(r=>$s(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ke.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}},Ut=new WeakMap,jt=new WeakMap,Tn=new WeakMap,al);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Is(e){return{onFetch:(t,r)=>{var f,d,u,y,E;const n=t.options,i=(u=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:u.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const p=async()=>{let m=!1;const S=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=kl(t.options,t.fetchOptions),j=async(D,F,C)=>{if(m)return Promise.reject();if(F==null&&D.pages.length)return Promise.resolve(D);const I=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:F,direction:C?"backward":"forward",meta:t.options.meta};return S(M),M})(),R=await v(I),{maxPages:Y}=t.options,h=C?Eu:Cu;return{pages:h(D.pages,R,Y),pageParams:h(D.pageParams,F,Y)}};if(i&&a.length){const D=i==="backward",F=D?Mu:Ms,C={pages:a,pageParams:s},_=F(n,C);o=await j(C,_,D)}else{const D=e??a.length;do{const F=c===0?s[0]??n.initialPageParam:Ms(n,o);if(c>0&&F==null)break;o=await j(o,F),c++}while(c<D)}return o};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function Ms(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 Mu(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 ze,rr,nr,Jr,en,ir,tn,rn,sl,zu=(sl=class{constructor(e={}){he(this,ze);he(this,rr);he(this,nr);he(this,Jr);he(this,en);he(this,ir);he(this,tn);he(this,rn);se(this,ze,e.queryCache||new $u),se(this,rr,e.mutationCache||new Iu),se(this,nr,e.defaultOptions||{}),se(this,Jr,new Map),se(this,en,new Map),se(this,ir,0)}mount(){Dn(this,ir)._++,A(this,ir)===1&&(se(this,tn,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onFocus())})),se(this,rn,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,A(this,ir)===0&&((e=A(this,tn))==null||e.call(this),se(this,tn,void 0),(t=A(this,rn))==null||t.call(this),se(this,rn,void 0))}isFetching(e){return A(this,ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,rr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=A(this,ze).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(cr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return A(this,ze).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=A(this,ze).get(n.queryHash),a=i==null?void 0:i.state.data,s=wu(t,a);if(s!==void 0)return A(this,ze).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>A(this,ze).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=A(this,ze);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=A(this,ze);return Ke.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ke.batch(()=>A(this,ze).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(ot).catch(ot)}invalidateQueries(e,t={}){return Ke.batch(()=>(A(this,ze).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=Ke.batch(()=>A(this,ze).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(ot)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=A(this,ze).build(this,t);return r.isStaleByTime(cr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ot).catch(ot)}fetchInfiniteQuery(e){return e.behavior=Is(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e.behavior=Is(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ii.isOnline()?A(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,ze)}getMutationCache(){return A(this,rr)}getDefaultOptions(){return A(this,nr)}setDefaultOptions(e){se(this,nr,e)}setQueryDefaults(e,t){A(this,Jr).set(wn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,Jr).values()],r={};return t.forEach(n=>{Sn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){A(this,en).set(wn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,en).values()],r={};return t.forEach(n=>{Sn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ua(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===ni&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,ze).clear(),A(this,rr).clear()}},ze=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,sl),st,xe,jn,tt,Ar,nn,ar,sr,Fn,an,sn,Or,_r,or,on,Se,mn,ga,ya,va,ba,wa,Sa,Ca,_l,ol,Bu=(ol=class extends On{constructor(t,r){super();he(this,Se);he(this,st);he(this,xe);he(this,jn);he(this,tt);he(this,Ar);he(this,nn);he(this,ar);he(this,sr);he(this,Fn);he(this,an);he(this,sn);he(this,Or);he(this,_r);he(this,or);he(this,on,new Set);this.options=r,se(this,st,t),se(this,sr,null),se(this,ar,xa()),this.options.experimental_prefetchInRender||A(this,ar).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&&(A(this,xe).addObserver(this),zs(A(this,xe),this.options)?me(this,Se,mn).call(this):this.updateResult(),me(this,Se,ba).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ea(A(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ea(A(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Se,wa).call(this),me(this,Se,Sa).call(this),A(this,xe).removeObserver(this)}setOptions(t){const r=this.options,n=A(this,xe);if(this.options=A(this,st).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vt(this.options.enabled,A(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Se,Ca).call(this),A(this,xe).setOptions(this.options),r._defaulted&&!fa(this.options,r)&&A(this,st).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,xe),observer:this});const i=this.hasListeners();i&&Bs(A(this,xe),n,this.options,r)&&me(this,Se,mn).call(this),this.updateResult(),i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||cr(this.options.staleTime,A(this,xe))!==cr(r.staleTime,A(this,xe)))&&me(this,Se,ga).call(this);const a=me(this,Se,ya).call(this);i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||a!==A(this,or))&&me(this,Se,va).call(this,a)}getOptimisticResult(t){const r=A(this,st).getQueryCache().build(A(this,st),t),n=this.createResult(r,t);return Nu(this,n)&&(se(this,tt,n),se(this,nn,this.options),se(this,Ar,A(this,xe).state)),n}getCurrentResult(){return A(this,tt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){A(this,on).add(t)}getCurrentQuery(){return A(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=A(this,st).defaultQueryOptions(t),n=A(this,st).getQueryCache().build(A(this,st),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,Se,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,tt)))}createResult(t,r){var Y;const n=A(this,xe),i=this.options,a=A(this,tt),s=A(this,Ar),o=A(this,nn),p=t!==n?t.state:A(this,jn),{state:f}=t;let d={...f},u=!1,y;if(r._optimisticResults){const h=this.hasListeners(),M=!h&&zs(t,r),N=h&&Bs(t,n,r,i);(M||N)&&(d={...d,...Ol(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:m,status:S}=d;y=d.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&S==="pending"){let h;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(h=a.data,v=!0):h=typeof r.placeholderData=="function"?r.placeholderData((Y=A(this,sn))==null?void 0:Y.state.data,A(this,sn)):r.placeholderData,h!==void 0&&(S="success",y=ma(a==null?void 0:a.data,h,r),u=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===A(this,Fn))y=A(this,an);else try{se(this,Fn,r.select),y=r.select(y),y=ma(a==null?void 0:a.data,y,r),se(this,an,y),se(this,sr,null)}catch(h){se(this,sr,h)}A(this,sr)&&(E=A(this,sr),y=A(this,an),m=Date.now(),S="error");const j=d.fetchStatus==="fetching",D=S==="pending",F=S==="error",C=D&&j,_=y!==void 0,R={status:S,fetchStatus:d.fetchStatus,isPending:D,isSuccess:S==="success",isError:F,isInitialLoading:C,isLoading:C,data:y,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!D,isLoadingError:F&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:F&&_,isStale:Ka(t,r),refetch:this.refetch,promise:A(this,ar),isEnabled:vt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const h=G=>{R.status==="error"?G.reject(R.error):R.data!==void 0&&G.resolve(R.data)},M=()=>{const G=se(this,ar,R.promise=xa());h(G)},N=A(this,ar);switch(N.status){case"pending":t.queryHash===n.queryHash&&h(N);break;case"fulfilled":(R.status==="error"||R.data!==N.value)&&M();break;case"rejected":(R.status!=="error"||R.error!==N.reason)&&M();break}}return R}updateResult(){const t=A(this,tt),r=this.createResult(A(this,xe),this.options);if(se(this,Ar,A(this,xe).state),se(this,nn,this.options),A(this,Ar).data!==void 0&&se(this,sn,A(this,xe)),fa(r,t))return;se(this,tt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!A(this,on).size)return!0;const s=new Set(a??A(this,on));return this.options.throwOnError&&s.add("error"),Object.keys(A(this,tt)).some(o=>{const c=o;return A(this,tt)[c]!==t[c]&&s.has(c)})};me(this,Se,_l).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Se,ba).call(this)}},st=new WeakMap,xe=new WeakMap,jn=new WeakMap,tt=new WeakMap,Ar=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Or=new WeakMap,_r=new WeakMap,or=new WeakMap,on=new WeakMap,Se=new WeakSet,mn=function(t){me(this,Se,Ca).call(this);let r=A(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ot)),r},ga=function(){me(this,Se,wa).call(this);const t=cr(this.options.staleTime,A(this,xe));if($r||A(this,tt).isStale||!pa(t))return;const n=El(A(this,tt).dataUpdatedAt,t)+1;se(this,Or,setTimeout(()=>{A(this,tt).isStale||this.updateResult()},n))},ya=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,xe)):this.options.refetchInterval)??!1},va=function(t){me(this,Se,Sa).call(this),se(this,or,t),!($r||vt(this.options.enabled,A(this,xe))===!1||!pa(A(this,or))||A(this,or)===0)&&se(this,_r,setInterval(()=>{(this.options.refetchIntervalInBackground||Ha.isFocused())&&me(this,Se,mn).call(this)},A(this,or)))},ba=function(){me(this,Se,ga).call(this),me(this,Se,va).call(this,me(this,Se,ya).call(this))},wa=function(){A(this,Or)&&(clearTimeout(A(this,Or)),se(this,Or,void 0))},Sa=function(){A(this,_r)&&(clearInterval(A(this,_r)),se(this,_r,void 0))},Ca=function(){const t=A(this,st).getQueryCache().build(A(this,st),this.options);if(t===A(this,xe))return;const r=A(this,xe);se(this,xe,t),se(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},_l=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(A(this,tt))}),A(this,st).getQueryCache().notify({query:A(this,xe),type:"observerResultsUpdated"})})},ol);function Vu(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zs(e,t){return Vu(e,t)||e.state.data!==void 0&&Ea(e,t,t.refetchOnMount)}function Ea(e,t,r){if(vt(t.enabled,e)!==!1&&cr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ka(e,t)}return!1}function Bs(e,t,r,n){return(e!==t||vt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ka(e,r)}function Ka(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Nu(e,t){return!fa(e.getCurrentResult(),t)}var Rl=ne.createContext(void 0),Lu=e=>{const t=ne.useContext(Rl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qu=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(Rl.Provider,{value:e,children:t})),$l=ne.createContext(!1),Wu=()=>ne.useContext($l);$l.Provider;function Uu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Hu=ne.createContext(Uu()),Ku=()=>ne.useContext(Hu),Yu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Gu=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Qu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||ku(r,[e.error,n])),Zu=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))}},Xu=(e,t)=>e.isLoading&&e.isFetching&&!t,Ju=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ep(e,t,r){var d,u,y,E,m;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=Wu(),i=Ku(),a=Lu(),s=a.defaultQueryOptions(e);(u=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.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",Zu(s),Yu(s,i),Gu(i);const o=!a.getQueryCache().get(s.queryHash),[c]=ne.useState(()=>new t(a,s)),p=c.getOptimisticResult(s),f=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(S=>{const v=f?c.subscribe(Ke.batchCalls(S)):ot;return c.updateResult(),v},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ne.useEffect(()=>{c.setOptions(s)},[s,c]),Ju(s,p))throw Vs(s,c,i);if(Qu({result:p,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw p.error;if((E=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||E.call(y,s,p),s.experimental_prefetchInRender&&!$r&&Xu(p,n)){const S=o?Vs(s,c,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;S==null||S.catch(ot).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?p:c.trackResult(p)}function tp(e,t){return ep(e,Bu)}function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},be={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var Ns;function rp(){if(Ns)return be;Ns=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,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function D(C){if(typeof C=="object"&&C!==null){var _=C.$$typeof;switch(_){case t:switch(C=C.type,C){case c:case p:case n:case a:case i:case d:return C;default:switch(C=C&&C.$$typeof,C){case o:case f:case E:case y:case s:return C;default:return _}}case r:return _}}}function F(C){return D(C)===p}return be.AsyncMode=c,be.ConcurrentMode=p,be.ContextConsumer=o,be.ContextProvider=s,be.Element=t,be.ForwardRef=f,be.Fragment=n,be.Lazy=E,be.Memo=y,be.Portal=r,be.Profiler=a,be.StrictMode=i,be.Suspense=d,be.isAsyncMode=function(C){return F(C)||D(C)===c},be.isConcurrentMode=F,be.isContextConsumer=function(C){return D(C)===o},be.isContextProvider=function(C){return D(C)===s},be.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},be.isForwardRef=function(C){return D(C)===f},be.isFragment=function(C){return D(C)===n},be.isLazy=function(C){return D(C)===E},be.isMemo=function(C){return D(C)===y},be.isPortal=function(C){return D(C)===r},be.isProfiler=function(C){return D(C)===a},be.isStrictMode=function(C){return D(C)===i},be.isSuspense=function(C){return D(C)===d},be.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===p||C===a||C===i||C===d||C===u||typeof C=="object"&&C!==null&&(C.$$typeof===E||C.$$typeof===y||C.$$typeof===s||C.$$typeof===o||C.$$typeof===f||C.$$typeof===S||C.$$typeof===v||C.$$typeof===j||C.$$typeof===m)},be.typeOf=D,be}var we={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var Ls;function np(){return Ls||(Ls=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,c=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function D(X){return typeof X=="string"||typeof X=="function"||X===n||X===p||X===a||X===i||X===d||X===u||typeof X=="object"&&X!==null&&(X.$$typeof===E||X.$$typeof===y||X.$$typeof===s||X.$$typeof===o||X.$$typeof===f||X.$$typeof===S||X.$$typeof===v||X.$$typeof===j||X.$$typeof===m)}function F(X){if(typeof X=="object"&&X!==null){var Pe=X.$$typeof;switch(Pe){case t:var qe=X.type;switch(qe){case c:case p:case n:case a:case i:case d:return qe;default:var Ge=qe&&qe.$$typeof;switch(Ge){case o:case f:case E:case y:case s:return Ge;default:return Pe}}case r:return Pe}}}var C=c,_=p,I=o,R=s,Y=t,h=f,M=n,N=E,G=y,B=r,q=a,Q=i,ie=d,pe=!1;function $(X){return pe||(pe=!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.")),L(X)||F(X)===c}function L(X){return F(X)===p}function Z(X){return F(X)===o}function ce(X){return F(X)===s}function fe(X){return typeof X=="object"&&X!==null&&X.$$typeof===t}function ue(X){return F(X)===f}function re(X){return F(X)===n}function H(X){return F(X)===E}function ee(X){return F(X)===y}function ae(X){return F(X)===r}function oe(X){return F(X)===a}function le(X){return F(X)===i}function ge(X){return F(X)===d}we.AsyncMode=C,we.ConcurrentMode=_,we.ContextConsumer=I,we.ContextProvider=R,we.Element=Y,we.ForwardRef=h,we.Fragment=M,we.Lazy=N,we.Memo=G,we.Portal=B,we.Profiler=q,we.StrictMode=Q,we.Suspense=ie,we.isAsyncMode=$,we.isConcurrentMode=L,we.isContextConsumer=Z,we.isContextProvider=ce,we.isElement=fe,we.isForwardRef=ue,we.isFragment=re,we.isLazy=H,we.isMemo=ee,we.isPortal=ae,we.isProfiler=oe,we.isStrictMode=le,we.isSuspense=ge,we.isValidElementType=D,we.typeOf=F}()),we}var qs;function Pl(){return qs||(qs=1,process.env.NODE_ENV==="production"?zn.exports=rp():zn.exports=np()),zn.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var Ui,
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
19
|
+
*/var Ui,Ws;function ip(){if(Ws)return Ui;Ws=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 c=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(c.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(f){p[f]=f}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ui=i()?Object.assign:function(a,s){for(var o,c=n(a),p,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var d in o)t.call(o,d)&&(c[d]=o[d]);if(e){p=e(o);for(var u=0;u<p.length;u++)r.call(o,p[u])&&(c[p[u]]=o[p[u]])}}return c},Ui}var Hi,Us;function Ga(){if(Us)return Hi;Us=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hi=e,Hi}var Ki,Hs;function Dl(){return Hs||(Hs=1,Ki=Function.call.bind(Object.prototype.hasOwnProperty)),Ki}var Yi,Ks;function ap(){if(Ks)return Yi;Ks=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ga(),r={},n=Dl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,c,p){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var d;try{if(typeof a[f]!="function"){var u=Error((c||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=a[f](s,f,c,o,null,t)}catch(E){d=E}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+o+" `"+f+"` 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 y=p?p():"";e("Failed "+o+" type: "+d.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Yi=i,Yi}var Gi,Ys;function sp(){if(Ys)return Gi;Ys=1;var e=Pl(),t=ip(),r=Ga(),n=Dl(),i=ap(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Gi=function(o,c){var p=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(L){var Z=L&&(p&&L[p]||L[f]);if(typeof Z=="function")return Z}var u="<<anonymous>>",y={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:j(),arrayOf:D,element:F(),elementType:C(),instanceOf:_,node:h(),objectOf:R,oneOf:I,oneOfType:Y,shape:N,exact:G};function E(L,Z){return L===Z?L!==0||1/L===1/Z:L!==L&&Z!==Z}function m(L,Z){this.message=L,this.data=Z&&typeof Z=="object"?Z:{},this.stack=""}m.prototype=Error.prototype;function S(L){if(process.env.NODE_ENV!=="production")var Z={},ce=0;function fe(re,H,ee,ae,oe,le,ge){if(ae=ae||u,le=le||ee,ge!==r){if(c){var X=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 X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=ae+":"+ee;!Z[Pe]&&ce<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+ae+"`. 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."),Z[Pe]=!0,ce++)}}return H[ee]==null?re?H[ee]===null?new m("The "+oe+" `"+le+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new m("The "+oe+" `"+le+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:L(H,ee,ae,oe,le)}var ue=fe.bind(null,!1);return ue.isRequired=fe.bind(null,!0),ue}function v(L){function Z(ce,fe,ue,re,H,ee){var ae=ce[fe],oe=Q(ae);if(oe!==L){var le=ie(ae);return new m("Invalid "+re+" `"+H+"` of type "+("`"+le+"` supplied to `"+ue+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return S(Z)}function j(){return S(s)}function D(L){function Z(ce,fe,ue,re,H){if(typeof L!="function")return new m("Property `"+H+"` of component `"+ue+"` has invalid PropType notation inside arrayOf.");var ee=ce[fe];if(!Array.isArray(ee)){var ae=Q(ee);return new m("Invalid "+re+" `"+H+"` of type "+("`"+ae+"` supplied to `"+ue+"`, expected an array."))}for(var oe=0;oe<ee.length;oe++){var le=L(ee,oe,ue,re,H+"["+oe+"]",r);if(le instanceof Error)return le}return null}return S(Z)}function F(){function L(Z,ce,fe,ue,re){var H=Z[ce];if(!o(H)){var ee=Q(H);return new m("Invalid "+ue+" `"+re+"` of type "+("`"+ee+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return S(L)}function C(){function L(Z,ce,fe,ue,re){var H=Z[ce];if(!e.isValidElementType(H)){var ee=Q(H);return new m("Invalid "+ue+" `"+re+"` of type "+("`"+ee+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return S(L)}function _(L){function Z(ce,fe,ue,re,H){if(!(ce[fe]instanceof L)){var ee=L.name||u,ae=$(ce[fe]);return new m("Invalid "+re+" `"+H+"` of type "+("`"+ae+"` supplied to `"+ue+"`, expected ")+("instance of `"+ee+"`."))}return null}return S(Z)}function I(L){if(!Array.isArray(L))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 Z(ce,fe,ue,re,H){for(var ee=ce[fe],ae=0;ae<L.length;ae++)if(E(ee,L[ae]))return null;var oe=JSON.stringify(L,function(ge,X){var Pe=ie(X);return Pe==="symbol"?String(X):X});return new m("Invalid "+re+" `"+H+"` of value `"+String(ee)+"` "+("supplied to `"+ue+"`, expected one of "+oe+"."))}return S(Z)}function R(L){function Z(ce,fe,ue,re,H){if(typeof L!="function")return new m("Property `"+H+"` of component `"+ue+"` has invalid PropType notation inside objectOf.");var ee=ce[fe],ae=Q(ee);if(ae!=="object")return new m("Invalid "+re+" `"+H+"` of type "+("`"+ae+"` supplied to `"+ue+"`, expected an object."));for(var oe in ee)if(n(ee,oe)){var le=L(ee,oe,ue,re,H+"."+oe,r);if(le instanceof Error)return le}return null}return S(Z)}function Y(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Z=0;Z<L.length;Z++){var ce=L[Z];if(typeof ce!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+pe(ce)+" at index "+Z+"."),s}function fe(ue,re,H,ee,ae){for(var oe=[],le=0;le<L.length;le++){var ge=L[le],X=ge(ue,re,H,ee,ae,r);if(X==null)return null;X.data&&n(X.data,"expectedType")&&oe.push(X.data.expectedType)}var Pe=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new m("Invalid "+ee+" `"+ae+"` supplied to "+("`"+H+"`"+Pe+"."))}return S(fe)}function h(){function L(Z,ce,fe,ue,re){return B(Z[ce])?null:new m("Invalid "+ue+" `"+re+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return S(L)}function M(L,Z,ce,fe,ue){return new m((L||"React class")+": "+Z+" type `"+ce+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ue+"`.")}function N(L){function Z(ce,fe,ue,re,H){var ee=ce[fe],ae=Q(ee);if(ae!=="object")return new m("Invalid "+re+" `"+H+"` of type `"+ae+"` "+("supplied to `"+ue+"`, expected `object`."));for(var oe in L){var le=L[oe];if(typeof le!="function")return M(ue,re,H,oe,ie(le));var ge=le(ee,oe,ue,re,H+"."+oe,r);if(ge)return ge}return null}return S(Z)}function G(L){function Z(ce,fe,ue,re,H){var ee=ce[fe],ae=Q(ee);if(ae!=="object")return new m("Invalid "+re+" `"+H+"` of type `"+ae+"` "+("supplied to `"+ue+"`, expected `object`."));var oe=t({},ce[fe],L);for(var le in oe){var ge=L[le];if(n(L,le)&&typeof ge!="function")return M(ue,re,H,le,ie(ge));if(!ge)return new m("Invalid "+re+" `"+H+"` key `"+le+"` supplied to `"+ue+"`.\nBad object: "+JSON.stringify(ce[fe],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var X=ge(ee,le,ue,re,H+"."+le,r);if(X)return X}return null}return S(Z)}function B(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(B);if(L===null||o(L))return!0;var Z=d(L);if(Z){var ce=Z.call(L),fe;if(Z!==L.entries){for(;!(fe=ce.next()).done;)if(!B(fe.value))return!1}else for(;!(fe=ce.next()).done;){var ue=fe.value;if(ue&&!B(ue[1]))return!1}}else return!1;return!0;default:return!1}}function q(L,Z){return L==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function Q(L){var Z=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":q(Z,L)?"symbol":Z}function ie(L){if(typeof L>"u"||L===null)return""+L;var Z=Q(L);if(Z==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return Z}function pe(L){var Z=ie(L);switch(Z){case"array":case"object":return"an "+Z;case"boolean":case"date":case"regexp":return"a "+Z;default:return Z}}function $(L){return!L.constructor||!L.constructor.name?u:L.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Gi}var Qi,Gs;function op(){if(Gs)return Qi;Gs=1;var e=Ga();function t(){}function r(){}return r.resetWarningCache=t,Qi=function(){function n(s,o,c,p,f,d){if(d!==e){var u=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 u.name="Invariant Violation",u}}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},Qi}var Qs;function lp(){if(Qs)return Mn.exports;if(Qs=1,process.env.NODE_ENV!=="production"){var e=Pl(),t=!0;Mn.exports=sp()(e.isElement,t)}else Mn.exports=op()();return Mn.exports}var cp=lp();const k=Ya(cp);function Il(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=Il(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Il(e))&&(n&&(n+=" "),n+=t);return n}function un(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let s="",o=!0;for(let c=0;c<a.length;c+=1){const p=a[c];p&&(s+=(o===!0?"":" ")+t(p),o=!1,r&&r[p]&&(s+=" "+r[p]))}n[i]=s}return n}function pr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function $e(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Bn={exports:{}},Ee={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-is.production.js
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var Q=ge(X,se,oe,pe,H+".
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var
|
|
28
|
+
*/var Zs;function up(){if(Zs)return Ee;Zs=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"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function E(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case e:switch(m=m.type,m){case r:case i:case n:case c:case p:case u:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case d:case f:return m;case a:return m;default:return S}}case t:return S}}}return Ee.ContextConsumer=a,Ee.ContextProvider=s,Ee.Element=e,Ee.ForwardRef=o,Ee.Fragment=r,Ee.Lazy=d,Ee.Memo=f,Ee.Portal=t,Ee.Profiler=i,Ee.StrictMode=n,Ee.Suspense=c,Ee.SuspenseList=p,Ee.isContextConsumer=function(m){return E(m)===a},Ee.isContextProvider=function(m){return E(m)===s},Ee.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ee.isForwardRef=function(m){return E(m)===o},Ee.isFragment=function(m){return E(m)===r},Ee.isLazy=function(m){return E(m)===d},Ee.isMemo=function(m){return E(m)===f},Ee.isPortal=function(m){return E(m)===t},Ee.isProfiler=function(m){return E(m)===i},Ee.isStrictMode=function(m){return E(m)===n},Ee.isSuspense=function(m){return E(m)===c},Ee.isSuspenseList=function(m){return E(m)===p},Ee.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===f||m.$$typeof===s||m.$$typeof===a||m.$$typeof===o||m.$$typeof===y||m.getModuleId!==void 0)},Ee.typeOf=E,Ee}var ke={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
@@ -33,21 +33,21 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var Q=ge(X,se,oe,pe,H+".
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
37
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pr(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function
|
|
36
|
+
*/var Xs;function pp(){return Xs||(Xs=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case t:switch(m=m.type,m){case n:case a:case i:case p:case f:case y:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case u:case d:return m;case s:return m;default:return S}}case r:return S}}}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"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");ke.ContextConsumer=s,ke.ContextProvider=o,ke.Element=t,ke.ForwardRef=c,ke.Fragment=n,ke.Lazy=u,ke.Memo=d,ke.Portal=r,ke.Profiler=a,ke.StrictMode=i,ke.Suspense=p,ke.SuspenseList=f,ke.isContextConsumer=function(m){return e(m)===s},ke.isContextProvider=function(m){return e(m)===o},ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ke.isForwardRef=function(m){return e(m)===c},ke.isFragment=function(m){return e(m)===n},ke.isLazy=function(m){return e(m)===u},ke.isMemo=function(m){return e(m)===d},ke.isPortal=function(m){return e(m)===r},ke.isProfiler=function(m){return e(m)===a},ke.isStrictMode=function(m){return e(m)===i},ke.isSuspense=function(m){return e(m)===p},ke.isSuspenseList=function(m){return e(m)===f},ke.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===a||m===i||m===p||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===u||m.$$typeof===d||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===E||m.getModuleId!==void 0)},ke.typeOf=e}()),ke}var Js;function dp(){return Js||(Js=1,process.env.NODE_ENV==="production"?Bn.exports=up():Bn.exports=pp()),Bn.exports}var ai=dp();function Mt(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 Ml(e){if(ne.isValidElement(e)||ai.isValidElementType(e)||!Mt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Ml(e[r])}),t}function ht(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Mt(e)&&Mt(t)&&Object.keys(t).forEach(i=>{ne.isValidElement(t[i])||ai.isValidElementType(t[i])?n[i]=t[i]:Mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Mt(e[i])?n[i]=ht(e[i],t[i],r):r.clone?n[i]=Mt(t[i])?Ml(t[i]):t[i]:n[i]=t[i]}),n}function bn(e,t){return t?ht(e,t,{clone:!1}):e}const hr=process.env.NODE_ENV!=="production"?k.oneOfType([k.number,k.string,k.object,k.array]):{};function fp(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 hp(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function mp(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
37
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pr(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function xp(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 c=t(e.breakpoints.not(...o),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Ci={xs:0,sm:600,md:900,lg:1200,xl:1536},eo={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ci[e]}px)`},gp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ci[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Kt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||eo;return t.reduce((s,o,c)=>(s[a.up(a.keys[c])]=r(t[c]),s),{})}if(typeof t=="object"){const a=n.breakpoints||eo;return Object.keys(t).reduce((s,o)=>{if(hp(a.keys,o)){const c=mp(n.containerQueries?n:gp,o);c&&(s[c]=r(t[o],o))}else if(Object.keys(a.values||Ci).includes(o)){const c=a.up(o);s[c]=r(t[o],o)}else{const c=o;s[c]=t[c]}return s},{})}return r(t)}function yp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function vp(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Ei(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 si(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ei(e,r)||n,t&&(i=t(i,n,e)),i}function Ne(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],c=s.theme,p=Ei(c,n)||{};return Kt(s,o,d=>{let u=si(p,i,d);return d===u&&typeof d=="string"&&(u=si(p,i,`${t}${d==="default"?"":$e(d)}`,d)),r===!1?u:{[r]:u}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:hr}:{},a.filterProps=[t],a}function bp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const wp={m:"margin",p:"padding"},Sp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},to={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Cp=bp(e=>{if(e.length>2)if(to[e])e=to[e];else return[e];const[t,r]=e.split(""),n=wp[t],i=Sp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),ki=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ep=[...ki,...Ti];function _n(e,t,r,n){const i=Ei(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(`
|
|
38
38
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
39
39
|
`)));const 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(`
|
|
40
|
-
`)),()=>{})}function Qa(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function Cp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Ep(e,t,r,n){if(!t.includes(r))return null;const i=wp(r),a=Cp(i,n),s=e[r];return Kt(e,s,a)}function Ml(e,t){const r=Qa(e.theme);return Object.keys(e).map(n=>Ep(e,t,n,r)).reduce(bn,{})}function Ie(e){return Ml(e,ki)}Ie.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=fr,e),{}):{};Ie.filterProps=ki;function Me(e){return Ml(e,Ti)}Me.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=fr,e),{}):{};Me.filterProps=Ti;process.env.NODE_ENV!=="production"&&Sp.reduce((e,t)=>(e[t]=fr,e),{});function ji(...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]?bn(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 wt(e){return typeof e!="number"?e:`${e}px solid`}function Et(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const kp=Et("border",wt),Tp=Et("borderTop",wt),jp=Et("borderRight",wt),Fp=Et("borderBottom",wt),Ap=Et("borderLeft",wt),Op=Et("borderColor"),_p=Et("borderTopColor"),Rp=Et("borderRightColor"),$p=Et("borderBottomColor"),Pp=Et("borderLeftColor"),Dp=Et("outline",wt),Ip=Et("outlineColor"),Fi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_n(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rn(t,n)});return Kt(e,e.borderRadius,r)}return null};Fi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};Fi.filterProps=["borderRadius"];ji(kp,Tp,jp,Fp,Ap,Op,_p,Rp,$p,Pp,Fi,Dp,Ip);const Ai=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_n(e.theme,"spacing",8,"gap"),r=n=>({gap:Rn(t,n)});return Kt(e,e.gap,r)}return null};Ai.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};Ai.filterProps=["gap"];const Oi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_n(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rn(t,n)});return Kt(e,e.columnGap,r)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:fr}:{};Oi.filterProps=["columnGap"];const _i=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_n(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rn(t,n)});return Kt(e,e.rowGap,r)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};_i.filterProps=["rowGap"];const Mp=Ne({prop:"gridColumn"}),zp=Ne({prop:"gridRow"}),Bp=Ne({prop:"gridAutoFlow"}),Vp=Ne({prop:"gridAutoColumns"}),Np=Ne({prop:"gridAutoRows"}),Lp=Ne({prop:"gridTemplateColumns"}),qp=Ne({prop:"gridTemplateRows"}),Wp=Ne({prop:"gridTemplateAreas"}),Up=Ne({prop:"gridArea"});ji(Ai,Oi,_i,Mp,zp,Bp,Vp,Np,Lp,qp,Wp,Up);function Yr(e,t){return t==="grey"?t:e}const Hp=Ne({prop:"color",themeKey:"palette",transform:Yr}),Kp=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Yp=Ne({prop:"backgroundColor",themeKey:"palette",transform:Yr});ji(Hp,Kp,Yp);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const Gp=Ne({prop:"width",transform:ft}),Za=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,c;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Ci[r];return n?((c=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ft(r)}};return Kt(e,e.maxWidth,t)}return null};Za.filterProps=["maxWidth"];const Qp=Ne({prop:"minWidth",transform:ft}),Zp=Ne({prop:"height",transform:ft}),Xp=Ne({prop:"maxHeight",transform:ft}),Jp=Ne({prop:"minHeight",transform:ft});Ne({prop:"size",cssProperty:"width",transform:ft});Ne({prop:"size",cssProperty:"height",transform:ft});const ed=Ne({prop:"boxSizing"});ji(Gp,Za,Qp,Zp,Xp,Jp,ed);const $n={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Me},pt:{style:Me},pr:{style:Me},pb:{style:Me},pl:{style:Me},px:{style:Me},py:{style:Me},padding:{style:Me},paddingTop:{style:Me},paddingRight:{style:Me},paddingBottom:{style:Me},paddingLeft:{style:Me},paddingX:{style:Me},paddingY:{style:Me},paddingInline:{style:Me},paddingInlineStart:{style:Me},paddingInlineEnd:{style:Me},paddingBlock:{style:Me},paddingBlockStart:{style:Me},paddingBlockEnd:{style:Me},m:{style:Ie},mt:{style:Ie},mr:{style:Ie},mb:{style:Ie},ml:{style:Ie},mx:{style:Ie},my:{style:Ie},margin:{style:Ie},marginTop:{style:Ie},marginRight:{style:Ie},marginBottom:{style:Ie},marginLeft:{style:Ie},marginX:{style:Ie},marginY:{style:Ie},marginInline:{style:Ie},marginInlineStart:{style:Ie},marginInlineEnd:{style:Ie},marginBlock:{style:Ie},marginBlockStart:{style:Ie},marginBlockEnd:{style:Ie},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:Ai},rowGap:{style:_i},columnGap:{style:Oi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ft},maxWidth:{style:Za},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},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 td(...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 rd(e,t){return typeof e=="function"?e(t):e}function nd(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:c=r,themeKey:d,transform:h,style:f}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const p=Ei(i,d)||{};return f?f(s):Kt(s,n,E=>{let m=si(p,h,E);return E===m&&typeof E=="string"&&(m=si(p,h,`${r}${E==="default"?"":$e(E)}`,E)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let c=o;if(typeof o=="function")c=o(i);else if(typeof o!="object")return o;if(!c)return null;const d=xp(i.breakpoints),h=Object.keys(d);let f=d;return Object.keys(c).forEach(p=>{const y=rd(c[p],i);if(y!=null)if(typeof y=="object")if(a[p])f=bn(f,e(p,y,i,a));else{const E=Kt({theme:i},y,m=>({[p]:m}));td(E,y)?f[p]=t({sx:y,theme:i}):f=bn(f,E)}else f=bn(f,e(p,y,i,a))}),pp(i,gp(h,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=nd();ln.filterProps=["sx"];const id=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??$n;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function ad(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=id(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Mt(o)?{...n,...o}:n}:a={...n,...t},{...i,sx:a}}function sd(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 od={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 ld(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var cd=/[A-Z]|^ms/g,ud=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zl=function(t){return t.charCodeAt(1)===45},to=function(t){return t!=null&&typeof t!="boolean"},Zi=ld(function(e){return zl(e)?e:e.replace(cd,"-$&").toLowerCase()}),ro=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ud,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return od[t]!==1&&!zl(t)&&typeof r=="number"&&r!==0?r+"px":r};function oi(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 lr={name:i.name,styles:i.styles,next:lr},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)lr={name:s.name,styles:s.styles,next:lr},s=s.next;var o=a.styles+";";return o}return pd(e,t,r)}}var c=r;return c}function pd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=oi(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;to(o)&&(n+=Zi(a)+":"+ro(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)to(s[c])&&(n+=Zi(a)+":"+ro(a,s[c])+";");else{var d=oi(e,t,s);switch(a){case"animation":case"animationName":{n+=Zi(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var no=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function dd(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="";lr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=oi(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=oi(r,t,e[o]),n){var c=a;i+=c[o]}no.lastIndex=0;for(var d="",h;(h=no.exec(i))!==null;)d+="-"+h[1];var f=sd(i)+d;return{name:f,styles:i,next:lr}}/**
|
|
40
|
+
`)),()=>{})}function Qa(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function kp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Tp(e,t,r,n){if(!t.includes(r))return null;const i=Cp(r),a=kp(i,n),s=e[r];return Kt(e,s,a)}function zl(e,t){const r=Qa(e.theme);return Object.keys(e).map(n=>Tp(e,t,n,r)).reduce(bn,{})}function Ie(e){return zl(e,ki)}Ie.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=hr,e),{}):{};Ie.filterProps=ki;function Me(e){return zl(e,Ti)}Me.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=hr,e),{}):{};Me.filterProps=Ti;process.env.NODE_ENV!=="production"&&Ep.reduce((e,t)=>(e[t]=hr,e),{});function ji(...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]?bn(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 wt(e){return typeof e!="number"?e:`${e}px solid`}function Et(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const jp=Et("border",wt),Fp=Et("borderTop",wt),Ap=Et("borderRight",wt),Op=Et("borderBottom",wt),_p=Et("borderLeft",wt),Rp=Et("borderColor"),$p=Et("borderTopColor"),Pp=Et("borderRightColor"),Dp=Et("borderBottomColor"),Ip=Et("borderLeftColor"),Mp=Et("outline",wt),zp=Et("outlineColor"),Fi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_n(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rn(t,n)});return Kt(e,e.borderRadius,r)}return null};Fi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:hr}:{};Fi.filterProps=["borderRadius"];ji(jp,Fp,Ap,Op,_p,Rp,$p,Pp,Dp,Ip,Fi,Mp,zp);const Ai=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_n(e.theme,"spacing",8,"gap"),r=n=>({gap:Rn(t,n)});return Kt(e,e.gap,r)}return null};Ai.propTypes=process.env.NODE_ENV!=="production"?{gap:hr}:{};Ai.filterProps=["gap"];const Oi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_n(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rn(t,n)});return Kt(e,e.columnGap,r)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:hr}:{};Oi.filterProps=["columnGap"];const _i=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_n(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rn(t,n)});return Kt(e,e.rowGap,r)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{rowGap:hr}:{};_i.filterProps=["rowGap"];const Bp=Ne({prop:"gridColumn"}),Vp=Ne({prop:"gridRow"}),Np=Ne({prop:"gridAutoFlow"}),Lp=Ne({prop:"gridAutoColumns"}),qp=Ne({prop:"gridAutoRows"}),Wp=Ne({prop:"gridTemplateColumns"}),Up=Ne({prop:"gridTemplateRows"}),Hp=Ne({prop:"gridTemplateAreas"}),Kp=Ne({prop:"gridArea"});ji(Ai,Oi,_i,Bp,Vp,Np,Lp,qp,Wp,Up,Hp,Kp);function Yr(e,t){return t==="grey"?t:e}const Yp=Ne({prop:"color",themeKey:"palette",transform:Yr}),Gp=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Qp=Ne({prop:"backgroundColor",themeKey:"palette",transform:Yr});ji(Yp,Gp,Qp);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const Zp=Ne({prop:"width",transform:ft}),Za=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,c;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Ci[r];return n?((c=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ft(r)}};return Kt(e,e.maxWidth,t)}return null};Za.filterProps=["maxWidth"];const Xp=Ne({prop:"minWidth",transform:ft}),Jp=Ne({prop:"height",transform:ft}),ed=Ne({prop:"maxHeight",transform:ft}),td=Ne({prop:"minHeight",transform:ft});Ne({prop:"size",cssProperty:"width",transform:ft});Ne({prop:"size",cssProperty:"height",transform:ft});const rd=Ne({prop:"boxSizing"});ji(Zp,Za,Xp,Jp,ed,td,rd);const $n={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Me},pt:{style:Me},pr:{style:Me},pb:{style:Me},pl:{style:Me},px:{style:Me},py:{style:Me},padding:{style:Me},paddingTop:{style:Me},paddingRight:{style:Me},paddingBottom:{style:Me},paddingLeft:{style:Me},paddingX:{style:Me},paddingY:{style:Me},paddingInline:{style:Me},paddingInlineStart:{style:Me},paddingInlineEnd:{style:Me},paddingBlock:{style:Me},paddingBlockStart:{style:Me},paddingBlockEnd:{style:Me},m:{style:Ie},mt:{style:Ie},mr:{style:Ie},mb:{style:Ie},ml:{style:Ie},mx:{style:Ie},my:{style:Ie},margin:{style:Ie},marginTop:{style:Ie},marginRight:{style:Ie},marginBottom:{style:Ie},marginLeft:{style:Ie},marginX:{style:Ie},marginY:{style:Ie},marginInline:{style:Ie},marginInlineStart:{style:Ie},marginInlineEnd:{style:Ie},marginBlock:{style:Ie},marginBlockStart:{style:Ie},marginBlockEnd:{style:Ie},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:Ai},rowGap:{style:_i},columnGap:{style:Oi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ft},maxWidth:{style:Za},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},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 nd(...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 id(e,t){return typeof e=="function"?e(t):e}function ad(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:c=r,themeKey:p,transform:f,style:d}=o;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const u=Ei(i,p)||{};return d?d(s):Kt(s,n,E=>{let m=si(u,f,E);return E===m&&typeof E=="string"&&(m=si(u,f,`${r}${E==="default"?"":$e(E)}`,E)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let c=o;if(typeof o=="function")c=o(i);else if(typeof o!="object")return o;if(!c)return null;const p=yp(i.breakpoints),f=Object.keys(p);let d=p;return Object.keys(c).forEach(u=>{const y=id(c[u],i);if(y!=null)if(typeof y=="object")if(a[u])d=bn(d,e(u,y,i,a));else{const E=Kt({theme:i},y,m=>({[u]:m}));nd(E,y)?d[u]=t({sx:y,theme:i}):d=bn(d,E)}else d=bn(d,e(u,y,i,a))}),fp(i,vp(f,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=ad();ln.filterProps=["sx"];const sd=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??$n;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function od(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=sd(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Mt(o)?{...n,...o}:n}:a={...n,...t},{...i,sx:a}}function ld(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 cd={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 ud(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var pd=/[A-Z]|^ms/g,dd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bl=function(t){return t.charCodeAt(1)===45},ro=function(t){return t!=null&&typeof t!="boolean"},Zi=ud(function(e){return Bl(e)?e:e.replace(pd,"-$&").toLowerCase()}),no=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(dd,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return cd[t]!==1&&!Bl(t)&&typeof r=="number"&&r!==0?r+"px":r};function oi(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 lr={name:i.name,styles:i.styles,next:lr},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)lr={name:s.name,styles:s.styles,next:lr},s=s.next;var o=a.styles+";";return o}return fd(e,t,r)}}var c=r;return c}function fd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=oi(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;ro(o)&&(n+=Zi(a)+":"+no(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)ro(s[c])&&(n+=Zi(a)+":"+no(a,s[c])+";");else{var p=oi(e,t,s);switch(a){case"animation":case"animationName":{n+=Zi(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var io=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function hd(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="";lr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=oi(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=oi(r,t,e[o]),n){var c=a;i+=c[o]}io.lastIndex=0;for(var p="",f;(f=io.exec(i))!==null;)p+="-"+f[1];var d=ld(i)+p;return{name:d,styles:i,next:lr}}/**
|
|
41
41
|
* @mui/styled-engine v7.1.1
|
|
42
42
|
*
|
|
43
43
|
* @license MIT
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/function
|
|
47
|
-
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function
|
|
46
|
+
*/function md(e,t){const r=Zc(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
47
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function xd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ao=[];function so(e){return ao[0]=e,hd(ao)}const gd=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 yd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=gd(t),s=Object.keys(a);function o(u){return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r})`}function c(u){return`@media (max-width:${(typeof t[u]=="number"?t[u]:u)-n/100}${r})`}function p(u,y){const E=s.indexOf(y);return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r}) and (max-width:${(E!==-1&&typeof t[s[E]]=="number"?t[s[E]]:y)-n/100}${r})`}function f(u){return s.indexOf(u)+1<s.length?p(u,s[s.indexOf(u)+1]):o(u)}function d(u){const y=s.indexOf(u);return y===0?o(s[1]):y===s.length-1?c(s[y]):p(u,s[s.indexOf(u)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:c,between:p,only:f,not:d,unit:r,...i}}const vd={borderRadius:4};function Vl(e=8,t=Qa({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 bd(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 Xa(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=yd(r),c=Vl(i);let p=ht({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...vd,...a}},s);return p=xp(p),p.applyStyles=bd,p=t.reduce((f,d)=>ht(f,d),p),p.unstable_sxConfig={...$n,...s==null?void 0:s.unstable_sxConfig},p.unstable_sx=function(d){return ln({sx:d,theme:this})},p}function wd(e){return Object.keys(e).length===0}function Sd(e=null){const t=ne.useContext(fr.ThemeContext);return!t||wd(t)?e:t}const Cd=Xa();function Ed(e=Cd){return Sd(e)}const oo=e=>e,kd=()=>{let e=oo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oo}}},Td=kd(),jd={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 mr(e,t,r="Mui"){const n=jd[t];return n?`${r}-${n}`:`${Td.generate(e)}-${t}`}function Dr(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=mr(e,i,r)}),n}function Nl(e,t=""){return e.displayName||e.name||t}function lo(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Fd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ai.ForwardRef:return lo(e,e.render,"ForwardRef");case ai.Memo:return lo(e,e.type,"memo");default:return}}}function Ll(e){const{variants:t,...r}=e,n={variants:t,style:so(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=so(i.style))}),n}const Ad=Xa();function Xi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Od(e){return e?(t,r)=>r[e]:null}function _d(e,t,r){e.theme=Dd(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 ql(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function ql(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 Rd(e={}){const{themeId:t,defaultTheme:r=Ad,rootShouldForwardProp:n=Xi,slotShouldForwardProp:i=Xi}=e;function a(o){_d(o,t,r)}return(o,c={})=>{xd(o,C=>C.filter(_=>_!==ln));const{name:p,slot:f,skipVariantsResolver:d,skipSx:u,overridesResolver:y=Od(Wl(f)),...E}=c,m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,S=u||!1;let v=Xi;f==="Root"||f==="root"?v=n:f?v=i:Id(o)&&(v=void 0);const j=md(o,{shouldForwardProp:v,label:Pd(p,f),...E}),D=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(I){return Kn(I,C)};if(Mt(C)){const _=Ll(C);return _.variants?function(R){return Kn(R,_)}:_.style}return C},F=(...C)=>{const _=[],I=C.map(D),R=[];if(_.push(a),p&&y&&R.push(function(N){var Q,ie;const B=(ie=(Q=N.theme.components)==null?void 0:Q[p])==null?void 0:ie.styleOverrides;if(!B)return null;const q={};for(const pe in B)q[pe]=Kn(N,B[pe]);return y(N,q)}),p&&!m&&R.push(function(N){var q,Q;const G=N.theme,B=(Q=(q=G==null?void 0:G.components)==null?void 0:q[p])==null?void 0:Q.variants;return B?ql(N,B):null}),S||R.push(ln),Array.isArray(I[0])){const M=I.shift(),N=new Array(_.length).fill(""),G=new Array(R.length).fill("");let B;B=[...N,...M,...G],B.raw=[...N,...M.raw,...G],_.unshift(B)}const Y=[..._,...I,...R],h=j(...Y);return o.muiName&&(h.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(h.displayName=$d(p,f,o)),h};return j.withConfig&&(F.withConfig=j.withConfig),F}}function $d(e,t,r){return e?`${e}${$e(t||"")}`:`Styled(${Fd(r)})`}function Pd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Wl(t||"Root")}`),r}function Dd(e){for(const t in e)return!1;return!0}function Id(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ka(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 c=o;r[i][c]=ka(a[c],s[c])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const Md=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function zd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Ja(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}].`),zd(e,t,r)}function Bd(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 dr(e){if(e.type)return e;if(e.charAt(0)==="#")return dr(Bd(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
48
48
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:pr(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const
|
|
50
|
-
`))}return S}const
|
|
49
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Vd=e=>{const t=dr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},xn=(e,t)=>{try{return Vd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ri(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 Ul(e){e=dr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(p,f=(p+r/30)%12)=>i-a*Math.max(Math.min(f-3,9-f,1),-1);let o="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",c.push(t[3])),Ri({type:o,values:c})}function Ta(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Ul(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 co(e,t){const r=Ta(e),n=Ta(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ct(e,t){return e=dr(e),t=Ja(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ri(e)}function Vn(e,t,r){try{return Ct(e,t)}catch{return e}}function es(e,t){if(e=dr(e),t=Ja(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 Ri(e)}function Te(e,t,r){try{return es(e,t)}catch{return e}}function ts(e,t){if(e=dr(e),t=Ja(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 Ri(e)}function je(e,t,r){try{return ts(e,t)}catch{return e}}function Nd(e,t=.15){return Ta(e)>.5?es(e,t):ts(e,t)}function Nn(e,t,r){try{return Nd(e,t)}catch{return e}}const Ld=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(k.node,k.object);function qd(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?ka(i.defaultProps,n):!i.styleOverrides&&!i.variants?ka(i,n):n}function Wd({props:e,name:t}){const r=ne.useContext(Ld);return qd({props:e,name:t,theme:{components:r}})}const uo={theme:void 0};function Ud(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(uo.theme=i.theme,a=Ll(e(uo)),t=a,r=i.theme),a}}function Hd(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 po=(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])})},Kd=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,c])=>{(!r||r&&!r([...a,o]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...a,o],Array.isArray(c)?[...s,o]:s):t([...a,o],c,s))})}n(e)},Yd=(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 Ji(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Kd(e,(o,c,p)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(o,c))){const f=`--${r?`${r}-`:""}${o.join("-")}`,d=Yd(o,c);Object.assign(i,{[f]:d}),po(a,o,`var(${f})`,p),po(s,o,`var(${f}, ${d})`,p)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Gd(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...c}=e,{vars:p,css:f,varsWithDefaults:d}=Ji(c,t);let u=d;const y={},{[o]:E,...m}=a;if(Object.entries(m||{}).forEach(([D,F])=>{const{vars:C,css:_,varsWithDefaults:I}=Ji(F,t);u=ht(u,I),y[D]={css:_,vars:C}}),E){const{css:D,vars:F,varsWithDefaults:C}=Ji(E,t);u=ht(u,C),y[o]={css:D,vars:F}}function S(D,F){var _,I;let C=i;if(i==="class"&&(C=".%s"),i==="data"&&(C="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(C=`[${i}="%s"]`),D){if(C==="media")return e.defaultColorScheme===D?":root":{[`@media (prefers-color-scheme: ${((I=(_=a[D])==null?void 0:_.palette)==null?void 0:I.mode)||D})`]:{":root":F}};if(C)return e.defaultColorScheme===D?`:root, ${C.replace("%s",String(D))}`:C.replace("%s",String(D))}return":root"}return{vars:u,generateThemeVars:()=>{let D={...p};return Object.entries(y).forEach(([,{vars:F}])=>{D=ht(D,F)}),D},generateStyleSheets:()=>{var R,Y;const D=[],F=e.defaultColorScheme||"light";function C(h,M){Object.keys(M).length&&D.push(typeof h=="string"?{[h]:{...M}}:h)}C(r(void 0,{...f}),f);const{[F]:_,...I}=y;if(_){const{css:h}=_,M=(Y=(R=a[F])==null?void 0:R.palette)==null?void 0:Y.mode,N=!n&&M?{colorScheme:M,...h}:{...h};C(r(F,{...N}),N)}return Object.entries(I).forEach(([h,{css:M}])=>{var B,q;const N=(q=(B=a[h])==null?void 0:B.palette)==null?void 0:q.mode,G=!n&&N?{colorScheme:N,...M}:{...M};C(r(h,{...G}),G)}),D}}}function Qd(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 Cn={black:"#000",white:"#fff"},Zd={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"},Br={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Vr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Lr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Hl(){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:Cn.white,default:Cn.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 Xd=Hl();function Kl(){return{text:{primary:Cn.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:Cn.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 fo=Kl();function ho(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=ts(e.main,i):t==="dark"&&(e.dark=es(e.main,a)))}function Jd(e="light"){return e==="dark"?{main:Nr[200],light:Nr[50],dark:Nr[400]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function ef(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function tf(e="light"){return e==="dark"?{main:Vr[500],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function rf(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[700],light:Lr[500],dark:Lr[900]}}function nf(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function af(e="light"){return e==="dark"?{main:hn[400],light:hn[300],dark:hn[700]}:{main:"#ed6c02",light:hn[500],dark:hn[900]}}function rs(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Jd(t),s=e.secondary||ef(t),o=e.error||tf(t),c=e.info||rf(t),p=e.success||nf(t),f=e.warning||af(t);function d(m){const S=co(m,fo.text.primary)>=r?fo.text.primary:Xd.text.primary;if(process.env.NODE_ENV!=="production"){const v=co(m,S);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${S} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
50
|
+
`))}return S}const u=({color:m,name:S,mainShade:v=500,lightShade:j=300,darkShade:D=700})=>{if(m={...m},!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
|
|
51
51
|
The color object needs to have a \`main\` property or a \`${v}\` property.`:pr(11,S?` (${S})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
|
|
52
52
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
53
53
|
|
|
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
|
|
|
61
61
|
|
|
62
62
|
const theme2 = createTheme({ palette: {
|
|
63
63
|
primary: { main: green[500] },
|
|
64
|
-
} });`:pr(12,S?` (${S})`:"",JSON.stringify(m.main)));return
|
|
65
|
-
`)),Object.keys(
|
|
64
|
+
} });`:pr(12,S?` (${S})`:"",JSON.stringify(m.main)));return ho(m,"light",j,n),ho(m,"dark",D,n),m.contrastText||(m.contrastText=d(m.main)),m};let y;return t==="light"?y=Hl():t==="dark"&&(y=Kl()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ht({common:{...Cn},mode:t,primary:u({color:a,name:"primary"}),secondary:u({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:u({color:o,name:"error"}),warning:u({color:f,name:"warning"}),info:u({color:c,name:"info"}),success:u({color:p,name:"success"}),grey:Zd,contrastThreshold:r,getContrastText:d,augmentColor:u,tonalOffset:n,...y},i)}function sf(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 of(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function lf(e){return Math.round(e*1e5)/1e5}const mo={textTransform:"uppercase"},xo='"Roboto", "Helvetica", "Arial", sans-serif';function cf(e,t){const{fontFamily:r=xo,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:c=16,allVariants:p,pxToRem:f,...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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const u=n/14,y=f||(S=>`${S/c*u}rem`),E=(S,v,j,D,F)=>({fontFamily:r,fontWeight:S,fontSize:y(v),lineHeight:j,...r===xo?{letterSpacing:`${lf(D/v)}em`}:{},...F,...p}),m={h1:E(i,96,1.167,-1.5),h2:E(i,60,1.2,-.5),h3:E(a,48,1.167,0),h4:E(a,34,1.235,.25),h5:E(a,24,1.334,0),h6:E(s,20,1.6,.15),subtitle1:E(a,16,1.75,.15),subtitle2:E(s,14,1.57,.1),body1:E(a,16,1.5,.15),body2:E(a,14,1.43,.15),button:E(s,14,1.75,.4,mo),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,mo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ht({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...m},d,{clone:!1})}const uf=.2,pf=.14,df=.12;function Ae(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${uf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${pf})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${df})`].join(",")}const ff=["none",Ae(0,2,1,-1,0,1,1,0,0,1,3,0),Ae(0,3,1,-2,0,2,2,0,0,1,5,0),Ae(0,3,3,-2,0,3,4,0,0,1,8,0),Ae(0,2,4,-1,0,4,5,0,0,1,10,0),Ae(0,3,5,-1,0,5,8,0,0,1,14,0),Ae(0,3,5,-1,0,6,10,0,0,1,18,0),Ae(0,4,5,-2,0,7,10,1,0,2,16,1),Ae(0,5,5,-3,0,8,10,1,0,3,14,2),Ae(0,5,6,-3,0,9,12,1,0,3,16,2),Ae(0,6,6,-3,0,10,14,1,0,4,18,3),Ae(0,6,7,-4,0,11,15,1,0,4,20,3),Ae(0,7,8,-4,0,12,17,2,0,5,22,4),Ae(0,7,8,-4,0,13,19,2,0,5,24,4),Ae(0,7,9,-4,0,14,21,2,0,5,26,4),Ae(0,8,9,-5,0,15,22,2,0,6,28,5),Ae(0,8,10,-5,0,16,24,2,0,6,30,5),Ae(0,8,11,-5,0,17,26,2,0,6,32,5),Ae(0,9,11,-5,0,18,28,2,0,7,34,6),Ae(0,9,12,-6,0,19,29,2,0,7,36,6),Ae(0,10,13,-6,0,20,31,3,0,8,38,7),Ae(0,10,13,-6,0,21,33,3,0,8,40,7),Ae(0,10,14,-6,0,22,35,3,0,8,42,7),Ae(0,11,14,-7,0,23,36,3,0,9,44,8),Ae(0,11,15,-7,0,24,38,3,0,9,46,8)],hf={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)"},mf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function go(e){return`${Math.round(e)}ms`}function xf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function gf(e){const t={...hf,...e.easing},r={...mf,...e.duration};return{getAutoHeightDuration:xf,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:c=0,...p}=a;if(process.env.NODE_ENV!=="production"){const f=u=>typeof u=="string",d=u=>!Number.isNaN(parseFloat(u));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!f(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),f(o)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
65
|
+
`)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof s=="string"?s:go(s)} ${o} ${typeof c=="string"?c:go(c)}`).join(",")},...e,easing:t,duration:r}}const yf={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function vf(e){return Mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Yl(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];!vf(o)||s.startsWith("unstable_")?delete n[s]:Mt(o)&&(n[s]={...o},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
66
66
|
|
|
67
67
|
const theme = ${JSON.stringify(t,null,2)};
|
|
68
68
|
|
|
69
69
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
70
70
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
71
71
|
|
|
72
|
-
export default theme;`}function ja(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:c,...
|
|
73
|
-
`))}m[v]={}}}};Object.keys(
|
|
74
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function wf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _t=e=>{try{return e()}catch{}},Sf=(e="mui")=>Vd(e);function ea(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=xf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=ja({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Gl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ql(i)},s}function Cf(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=gf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...d}=e,h=Object.keys(r)[0],f=n||(r.light&&h!=="light"?"light":h),p=Sf(a),{[f]:y,light:E,dark:m,...S}=r,v={...S};let j=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pr(21,f));const M=ea(v,j,d,f);E&&!v.light&&ea(v,E,void 0,"light"),m&&!v.dark&&ea(v,m,void 0,"dark");let F={defaultColorScheme:f,...M,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:c,getCssVar:p,colorSchemes:v,font:{...Jd(M.typography),...M.font},spacing:wf(d.spacing)};Object.keys(F.colorSchemes).forEach(I=>{const u=F.colorSchemes[I].palette,D=L=>{const $=L.split("-"),V=$[1],ee=$[2];return p(L,u[V][ee])};if(u.mode==="light"&&(N(u.common,"background","#fff"),N(u.common,"onBackground","#000")),u.mode==="dark"&&(N(u.common,"background","#000"),N(u.common,"onBackground","#fff")),bf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){N(u.Alert,"errorColor",Te(u.error.light,.6)),N(u.Alert,"infoColor",Te(u.info.light,.6)),N(u.Alert,"successColor",Te(u.success.light,.6)),N(u.Alert,"warningColor",Te(u.warning.light,.6)),N(u.Alert,"errorFilledBg",D("palette-error-main")),N(u.Alert,"infoFilledBg",D("palette-info-main")),N(u.Alert,"successFilledBg",D("palette-success-main")),N(u.Alert,"warningFilledBg",D("palette-warning-main")),N(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.main))),N(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.main))),N(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.main))),N(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.main))),N(u.Alert,"errorStandardBg",je(u.error.light,.9)),N(u.Alert,"infoStandardBg",je(u.info.light,.9)),N(u.Alert,"successStandardBg",je(u.success.light,.9)),N(u.Alert,"warningStandardBg",je(u.warning.light,.9)),N(u.Alert,"errorIconColor",D("palette-error-main")),N(u.Alert,"infoIconColor",D("palette-info-main")),N(u.Alert,"successIconColor",D("palette-success-main")),N(u.Alert,"warningIconColor",D("palette-warning-main")),N(u.AppBar,"defaultBg",D("palette-grey-100")),N(u.Avatar,"defaultBg",D("palette-grey-400")),N(u.Button,"inheritContainedBg",D("palette-grey-300")),N(u.Button,"inheritContainedHoverBg",D("palette-grey-A100")),N(u.Chip,"defaultBorder",D("palette-grey-400")),N(u.Chip,"defaultAvatarColor",D("palette-grey-700")),N(u.Chip,"defaultIconColor",D("palette-grey-700")),N(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),N(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),N(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),N(u.LinearProgress,"primaryBg",je(u.primary.main,.62)),N(u.LinearProgress,"secondaryBg",je(u.secondary.main,.62)),N(u.LinearProgress,"errorBg",je(u.error.main,.62)),N(u.LinearProgress,"infoBg",je(u.info.main,.62)),N(u.LinearProgress,"successBg",je(u.success.main,.62)),N(u.LinearProgress,"warningBg",je(u.warning.main,.62)),N(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),N(u.Slider,"primaryTrack",je(u.primary.main,.62)),N(u.Slider,"secondaryTrack",je(u.secondary.main,.62)),N(u.Slider,"errorTrack",je(u.error.main,.62)),N(u.Slider,"infoTrack",je(u.info.main,.62)),N(u.Slider,"successTrack",je(u.success.main,.62)),N(u.Slider,"warningTrack",je(u.warning.main,.62));const L=Nn(u.background.default,.8);N(u.SnackbarContent,"bg",L),N(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),N(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),N(u.StepConnector,"border",D("palette-grey-400")),N(u.StepContent,"border",D("palette-grey-400")),N(u.Switch,"defaultColor",D("palette-common-white")),N(u.Switch,"defaultDisabledColor",D("palette-grey-100")),N(u.Switch,"primaryDisabledColor",je(u.primary.main,.62)),N(u.Switch,"secondaryDisabledColor",je(u.secondary.main,.62)),N(u.Switch,"errorDisabledColor",je(u.error.main,.62)),N(u.Switch,"infoDisabledColor",je(u.info.main,.62)),N(u.Switch,"successDisabledColor",je(u.success.main,.62)),N(u.Switch,"warningDisabledColor",je(u.warning.main,.62)),N(u.TableCell,"border",je(Vn(u.divider,1),.88)),N(u.Tooltip,"bg",Vn(u.grey[700],.92))}if(u.mode==="dark"){N(u.Alert,"errorColor",je(u.error.light,.6)),N(u.Alert,"infoColor",je(u.info.light,.6)),N(u.Alert,"successColor",je(u.success.light,.6)),N(u.Alert,"warningColor",je(u.warning.light,.6)),N(u.Alert,"errorFilledBg",D("palette-error-dark")),N(u.Alert,"infoFilledBg",D("palette-info-dark")),N(u.Alert,"successFilledBg",D("palette-success-dark")),N(u.Alert,"warningFilledBg",D("palette-warning-dark")),N(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.dark))),N(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.dark))),N(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.dark))),N(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.dark))),N(u.Alert,"errorStandardBg",Te(u.error.light,.9)),N(u.Alert,"infoStandardBg",Te(u.info.light,.9)),N(u.Alert,"successStandardBg",Te(u.success.light,.9)),N(u.Alert,"warningStandardBg",Te(u.warning.light,.9)),N(u.Alert,"errorIconColor",D("palette-error-main")),N(u.Alert,"infoIconColor",D("palette-info-main")),N(u.Alert,"successIconColor",D("palette-success-main")),N(u.Alert,"warningIconColor",D("palette-warning-main")),N(u.AppBar,"defaultBg",D("palette-grey-900")),N(u.AppBar,"darkBg",D("palette-background-paper")),N(u.AppBar,"darkColor",D("palette-text-primary")),N(u.Avatar,"defaultBg",D("palette-grey-600")),N(u.Button,"inheritContainedBg",D("palette-grey-800")),N(u.Button,"inheritContainedHoverBg",D("palette-grey-700")),N(u.Chip,"defaultBorder",D("palette-grey-700")),N(u.Chip,"defaultAvatarColor",D("palette-grey-300")),N(u.Chip,"defaultIconColor",D("palette-grey-300")),N(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),N(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),N(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),N(u.LinearProgress,"primaryBg",Te(u.primary.main,.5)),N(u.LinearProgress,"secondaryBg",Te(u.secondary.main,.5)),N(u.LinearProgress,"errorBg",Te(u.error.main,.5)),N(u.LinearProgress,"infoBg",Te(u.info.main,.5)),N(u.LinearProgress,"successBg",Te(u.success.main,.5)),N(u.LinearProgress,"warningBg",Te(u.warning.main,.5)),N(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),N(u.Slider,"primaryTrack",Te(u.primary.main,.5)),N(u.Slider,"secondaryTrack",Te(u.secondary.main,.5)),N(u.Slider,"errorTrack",Te(u.error.main,.5)),N(u.Slider,"infoTrack",Te(u.info.main,.5)),N(u.Slider,"successTrack",Te(u.success.main,.5)),N(u.Slider,"warningTrack",Te(u.warning.main,.5));const L=Nn(u.background.default,.98);N(u.SnackbarContent,"bg",L),N(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),N(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),N(u.StepConnector,"border",D("palette-grey-600")),N(u.StepContent,"border",D("palette-grey-600")),N(u.Switch,"defaultColor",D("palette-grey-300")),N(u.Switch,"defaultDisabledColor",D("palette-grey-600")),N(u.Switch,"primaryDisabledColor",Te(u.primary.main,.55)),N(u.Switch,"secondaryDisabledColor",Te(u.secondary.main,.55)),N(u.Switch,"errorDisabledColor",Te(u.error.main,.55)),N(u.Switch,"infoDisabledColor",Te(u.info.main,.55)),N(u.Switch,"successDisabledColor",Te(u.success.main,.55)),N(u.Switch,"warningDisabledColor",Te(u.warning.main,.55)),N(u.TableCell,"border",Te(Vn(u.divider,1),.68)),N(u.Tooltip,"bg",Vn(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(L=>{const $=u[L];L!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&N(u[L],"mainChannel",xn(gn($.main))),$.light&&N(u[L],"lightChannel",xn(gn($.light))),$.dark&&N(u[L],"darkChannel",xn(gn($.dark))),$.contrastText&&N(u[L],"contrastTextChannel",xn(gn($.contrastText))),L==="text"&&(Vt(u[L],"primary"),Vt(u[L],"secondary")),L==="action"&&($.active&&Vt(u[L],"active"),$.selected&&Vt(u[L],"selected")))})}),F=t.reduce((I,u)=>ht(I,u),F);const C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:vf(F)},{vars:R,generateThemeVars:B,generateStyleSheets:_}=qd(F,C);return F.vars=R,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([I,u])=>{F[I]=u}),F.generateThemeVars=B,F.generateStyleSheets=_,F.generateSpacing=function(){return Bl(d.spacing,Qa(this))},F.getColorSchemeSelector=Wd(o),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},F.unstable_sx=function(u){return ln({sx:u,theme:this})},F.toRuntimeSource=Yl,F}function go(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ts({...r===!0?{}:r.palette,mode:t})})}function Ef(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",c=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ja(e,...t);let h=r;"palette"in e||d[o]&&(d[o]!==!0?h=d[o].palette:o==="dark"&&(h={mode:"dark"}));const f=ja({...e,palette:h},...t);return f.defaultColorScheme=o,f.colorSchemes=d,f.palette.mode==="light"&&(f.colorSchemes.light={...d.light!==!0&&d.light,palette:f.palette},go(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},go(f,"light",d.light)),f}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),Cf({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const kf=Ef(),Tf="$$material";function jf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ff=e=>jf(e)&&e!=="classes",xt=Td({themeId:Tf,defaultTheme:kf,rootShouldForwardProp:Ff});function Af(){return ad}const $r=Bd;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Ir(e){return zd(e)}function Of(e){return typeof e.main=="string"}function _f(e,t=[]){if(!Of(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function li(e=[]){return([,t])=>t&&_f(t,e)}function Rf(e){return hr("MuiTypography",e)}Dr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const $f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Pf=Af(),Df=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${$e(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Rf,s)},If=xt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${$e(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})($r(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(li()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${$e(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),yo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zl=ne.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!$f[n],s=Pf({...i,...a&&{color:n}}),{align:o="inherit",className:c,component:d,gutterBottom:h=!1,noWrap:f=!1,paragraph:p=!1,variant:y="body1",variantMapping:E=yo,...m}=s,S={...s,align:o,color:n,className:c,component:d,gutterBottom:h,noWrap:f,paragraph:p,variant:y,variantMapping:E},v=d||(p?"p":E[y]||yo[y])||"span",j=Df(S);return l.jsx(If,{as:v,ref:r,className:it(j.root,c),...m,ownerState:S,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Zl.propTypes={align:k.oneOf(["center","inherit","justify","left","right"]),children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),k.string]),component:k.elementType,gutterBottom:k.bool,noWrap:k.bool,paragraph:k.bool,style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOfType([k.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),k.string]),variantMapping:k.object});const rs=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(rs.displayName="FormControlContext");function Mf(){return ne.useContext(rs)}function zf(e){return hr("MuiInputAdornment",e)}const vo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var bo;const Bf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${$e(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Vf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${$e(i)}`,s,n&&"hiddenLabel",a&&`size${$e(a)}`]};return un(o,zf,t)},Nf=xt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Bf})($r(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vo.positionStart}&:not(.${vo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Xl=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:c=!1,position:d,variant:h,...f}=n,p=Mf()||{};let y=h;h&&p.variant&&process.env.NODE_ENV!=="production"&&h===p.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),p&&!y&&(y=p.variant);const E={...n,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:o,position:d,variant:y},m=Vf(E);return l.jsx(rs.Provider,{value:null,children:l.jsx(Nf,{as:s,ownerState:E,className:it(m.root,a),ref:r,...f,children:typeof i=="string"&&!c?l.jsx(Zl,{color:"textSecondary",children:i}):l.jsxs(ne.Fragment,{children:[d==="start"?bo||(bo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Xl.propTypes={children:k.node,classes:k.object,className:k.string,component:k.elementType,disablePointerEvents:k.bool,disableTypography:k.bool,position:k.oneOf(["end","start"]).isRequired,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOf(["filled","outlined","standard"])});function ns(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Lf(e){return hr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const qf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${$e(t)}`,`fontSize${$e(r)}`]};return un(i,Lf,n)},Wf=xt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$e(r.color)}`],t[`fontSize${$e(r.fontSize)}`]]}})($r(({theme:e})=>{var t,r,n,i,a,s,o,c,d,h,f,p,y,E;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:m=>!m.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:((c=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:c.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:h.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var S,v;return{props:{color:m},style:{color:(v=(S=(e.vars??e).palette)==null?void 0:S[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(E=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ci=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:h=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=n,E=ne.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:p,hasSvgAsChild:E},S={};h||(S.viewBox=p);const v=qf(m);return l.jsxs(Wf,{as:o,className:it(v.root,a),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...S,...y,...E&&i.props,ownerState:m,children:[E?i.props.children:i,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ci.propTypes={children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),k.string]),component:k.elementType,fontSize:k.oneOfType([k.oneOf(["inherit","large","medium","small"]),k.string]),htmlColor:k.string,inheritViewBox:k.bool,shapeRendering:k.string,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),titleAccess:k.string,viewBox:k.string});ci.muiName="SvgIcon";function ut(e,t){function r(n,i){return l.jsx(ci,{"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=ci.muiName,ne.memo(ne.forwardRef(r))}let wo=0;function Uf(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(wo+=1,r(`mui-${wo}`))},[t]),n}const Hf={...ne},So=Hf.useId;function Kf(e){if(So!==void 0){const t=So();return e??t}return Uf(e)}function Yn(e){const t=ne.useRef(e);return _d(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function Co(...e){const t=ne.useRef(void 0),r=ne.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ne.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Yf=k.oneOfType([k.func,k.object]);function Gf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Qf(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!Gf(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Zf=ns(k.elementType,Qf);function Eo(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
-
`))}return!1}const
|
|
72
|
+
export default theme;`}function ja(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:c,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":pr(20));const f=rs(a),d=Xa(e);let u=ht(d,{mixins:of(d.breakpoints,n),palette:f,shadows:ff.slice(),typography:cf(f,o),transitions:gf(s),zIndex:{...yf}});if(u=ht(u,p),u=t.reduce((y,E)=>ht(y,E),u),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(m,S)=>{let v;for(v in m){const j=m[v];if(y.includes(v)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const D=mr("",v);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${D}' syntax:`,JSON.stringify({root:{[`&.${D}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
|
+
`))}m[v]={}}}};Object.keys(u.components).forEach(m=>{const S=u.components[m].styleOverrides;S&&m.startsWith("Mui")&&E(S,m)})}return u.unstable_sxConfig={...$n,...p==null?void 0:p.unstable_sxConfig},u.unstable_sx=function(E){return ln({sx:E,theme:this})},u.toRuntimeSource=Yl,u}function bf(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 wf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=bf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Gl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ql(e){return e==="dark"?wf:[]}function Sf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=rs(t);return{palette:a,opacity:{...Gl(a.mode),...r},overlays:n||Ql(a.mode),...i}}function Cf(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 Ef=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],kf=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 Ef(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 Tf(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function V(e,t,r){!e[t]&&r&&(e[t]=r)}function gn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ul(e)}function Vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=xn(gn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
74
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function jf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _t=e=>{try{return e()}catch{}},Ff=(e="mui")=>Hd(e);function ea(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=Sf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=ja({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Gl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ql(i)},s}function Af(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=Cf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...p}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),u=Ff(a),{[d]:y,light:E,dark:m,...S}=r,v={...S};let j=y;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:pr(21,d));const D=ea(v,j,p,d);E&&!v.light&&ea(v,E,void 0,"light"),m&&!v.dark&&ea(v,m,void 0,"dark");let F={defaultColorScheme:d,...D,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:c,getCssVar:u,colorSchemes:v,font:{...sf(D.typography),...D.font},spacing:jf(p.spacing)};Object.keys(F.colorSchemes).forEach(Y=>{const h=F.colorSchemes[Y].palette,M=N=>{const G=N.split("-"),B=G[1],q=G[2];return u(N,h[B][q])};if(h.mode==="light"&&(V(h.common,"background","#fff"),V(h.common,"onBackground","#000")),h.mode==="dark"&&(V(h.common,"background","#000"),V(h.common,"onBackground","#fff")),Tf(h,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),h.mode==="light"){V(h.Alert,"errorColor",Te(h.error.light,.6)),V(h.Alert,"infoColor",Te(h.info.light,.6)),V(h.Alert,"successColor",Te(h.success.light,.6)),V(h.Alert,"warningColor",Te(h.warning.light,.6)),V(h.Alert,"errorFilledBg",M("palette-error-main")),V(h.Alert,"infoFilledBg",M("palette-info-main")),V(h.Alert,"successFilledBg",M("palette-success-main")),V(h.Alert,"warningFilledBg",M("palette-warning-main")),V(h.Alert,"errorFilledColor",_t(()=>h.getContrastText(h.error.main))),V(h.Alert,"infoFilledColor",_t(()=>h.getContrastText(h.info.main))),V(h.Alert,"successFilledColor",_t(()=>h.getContrastText(h.success.main))),V(h.Alert,"warningFilledColor",_t(()=>h.getContrastText(h.warning.main))),V(h.Alert,"errorStandardBg",je(h.error.light,.9)),V(h.Alert,"infoStandardBg",je(h.info.light,.9)),V(h.Alert,"successStandardBg",je(h.success.light,.9)),V(h.Alert,"warningStandardBg",je(h.warning.light,.9)),V(h.Alert,"errorIconColor",M("palette-error-main")),V(h.Alert,"infoIconColor",M("palette-info-main")),V(h.Alert,"successIconColor",M("palette-success-main")),V(h.Alert,"warningIconColor",M("palette-warning-main")),V(h.AppBar,"defaultBg",M("palette-grey-100")),V(h.Avatar,"defaultBg",M("palette-grey-400")),V(h.Button,"inheritContainedBg",M("palette-grey-300")),V(h.Button,"inheritContainedHoverBg",M("palette-grey-A100")),V(h.Chip,"defaultBorder",M("palette-grey-400")),V(h.Chip,"defaultAvatarColor",M("palette-grey-700")),V(h.Chip,"defaultIconColor",M("palette-grey-700")),V(h.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(h.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(h.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(h.LinearProgress,"primaryBg",je(h.primary.main,.62)),V(h.LinearProgress,"secondaryBg",je(h.secondary.main,.62)),V(h.LinearProgress,"errorBg",je(h.error.main,.62)),V(h.LinearProgress,"infoBg",je(h.info.main,.62)),V(h.LinearProgress,"successBg",je(h.success.main,.62)),V(h.LinearProgress,"warningBg",je(h.warning.main,.62)),V(h.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),V(h.Slider,"primaryTrack",je(h.primary.main,.62)),V(h.Slider,"secondaryTrack",je(h.secondary.main,.62)),V(h.Slider,"errorTrack",je(h.error.main,.62)),V(h.Slider,"infoTrack",je(h.info.main,.62)),V(h.Slider,"successTrack",je(h.success.main,.62)),V(h.Slider,"warningTrack",je(h.warning.main,.62));const N=Nn(h.background.default,.8);V(h.SnackbarContent,"bg",N),V(h.SnackbarContent,"color",_t(()=>h.getContrastText(N))),V(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),V(h.StepConnector,"border",M("palette-grey-400")),V(h.StepContent,"border",M("palette-grey-400")),V(h.Switch,"defaultColor",M("palette-common-white")),V(h.Switch,"defaultDisabledColor",M("palette-grey-100")),V(h.Switch,"primaryDisabledColor",je(h.primary.main,.62)),V(h.Switch,"secondaryDisabledColor",je(h.secondary.main,.62)),V(h.Switch,"errorDisabledColor",je(h.error.main,.62)),V(h.Switch,"infoDisabledColor",je(h.info.main,.62)),V(h.Switch,"successDisabledColor",je(h.success.main,.62)),V(h.Switch,"warningDisabledColor",je(h.warning.main,.62)),V(h.TableCell,"border",je(Vn(h.divider,1),.88)),V(h.Tooltip,"bg",Vn(h.grey[700],.92))}if(h.mode==="dark"){V(h.Alert,"errorColor",je(h.error.light,.6)),V(h.Alert,"infoColor",je(h.info.light,.6)),V(h.Alert,"successColor",je(h.success.light,.6)),V(h.Alert,"warningColor",je(h.warning.light,.6)),V(h.Alert,"errorFilledBg",M("palette-error-dark")),V(h.Alert,"infoFilledBg",M("palette-info-dark")),V(h.Alert,"successFilledBg",M("palette-success-dark")),V(h.Alert,"warningFilledBg",M("palette-warning-dark")),V(h.Alert,"errorFilledColor",_t(()=>h.getContrastText(h.error.dark))),V(h.Alert,"infoFilledColor",_t(()=>h.getContrastText(h.info.dark))),V(h.Alert,"successFilledColor",_t(()=>h.getContrastText(h.success.dark))),V(h.Alert,"warningFilledColor",_t(()=>h.getContrastText(h.warning.dark))),V(h.Alert,"errorStandardBg",Te(h.error.light,.9)),V(h.Alert,"infoStandardBg",Te(h.info.light,.9)),V(h.Alert,"successStandardBg",Te(h.success.light,.9)),V(h.Alert,"warningStandardBg",Te(h.warning.light,.9)),V(h.Alert,"errorIconColor",M("palette-error-main")),V(h.Alert,"infoIconColor",M("palette-info-main")),V(h.Alert,"successIconColor",M("palette-success-main")),V(h.Alert,"warningIconColor",M("palette-warning-main")),V(h.AppBar,"defaultBg",M("palette-grey-900")),V(h.AppBar,"darkBg",M("palette-background-paper")),V(h.AppBar,"darkColor",M("palette-text-primary")),V(h.Avatar,"defaultBg",M("palette-grey-600")),V(h.Button,"inheritContainedBg",M("palette-grey-800")),V(h.Button,"inheritContainedHoverBg",M("palette-grey-700")),V(h.Chip,"defaultBorder",M("palette-grey-700")),V(h.Chip,"defaultAvatarColor",M("palette-grey-300")),V(h.Chip,"defaultIconColor",M("palette-grey-300")),V(h.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(h.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(h.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(h.LinearProgress,"primaryBg",Te(h.primary.main,.5)),V(h.LinearProgress,"secondaryBg",Te(h.secondary.main,.5)),V(h.LinearProgress,"errorBg",Te(h.error.main,.5)),V(h.LinearProgress,"infoBg",Te(h.info.main,.5)),V(h.LinearProgress,"successBg",Te(h.success.main,.5)),V(h.LinearProgress,"warningBg",Te(h.warning.main,.5)),V(h.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),V(h.Slider,"primaryTrack",Te(h.primary.main,.5)),V(h.Slider,"secondaryTrack",Te(h.secondary.main,.5)),V(h.Slider,"errorTrack",Te(h.error.main,.5)),V(h.Slider,"infoTrack",Te(h.info.main,.5)),V(h.Slider,"successTrack",Te(h.success.main,.5)),V(h.Slider,"warningTrack",Te(h.warning.main,.5));const N=Nn(h.background.default,.98);V(h.SnackbarContent,"bg",N),V(h.SnackbarContent,"color",_t(()=>h.getContrastText(N))),V(h.SpeedDialAction,"fabHoverBg",Nn(h.background.paper,.15)),V(h.StepConnector,"border",M("palette-grey-600")),V(h.StepContent,"border",M("palette-grey-600")),V(h.Switch,"defaultColor",M("palette-grey-300")),V(h.Switch,"defaultDisabledColor",M("palette-grey-600")),V(h.Switch,"primaryDisabledColor",Te(h.primary.main,.55)),V(h.Switch,"secondaryDisabledColor",Te(h.secondary.main,.55)),V(h.Switch,"errorDisabledColor",Te(h.error.main,.55)),V(h.Switch,"infoDisabledColor",Te(h.info.main,.55)),V(h.Switch,"successDisabledColor",Te(h.success.main,.55)),V(h.Switch,"warningDisabledColor",Te(h.warning.main,.55)),V(h.TableCell,"border",Te(Vn(h.divider,1),.68)),V(h.Tooltip,"bg",Vn(h.grey[700],.92))}Vt(h.background,"default"),Vt(h.background,"paper"),Vt(h.common,"background"),Vt(h.common,"onBackground"),Vt(h,"divider"),Object.keys(h).forEach(N=>{const G=h[N];N!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&V(h[N],"mainChannel",xn(gn(G.main))),G.light&&V(h[N],"lightChannel",xn(gn(G.light))),G.dark&&V(h[N],"darkChannel",xn(gn(G.dark))),G.contrastText&&V(h[N],"contrastTextChannel",xn(gn(G.contrastText))),N==="text"&&(Vt(h[N],"primary"),Vt(h[N],"secondary")),N==="action"&&(G.active&&Vt(h[N],"active"),G.selected&&Vt(h[N],"selected")))})}),F=t.reduce((Y,h)=>ht(Y,h),F);const C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:kf(F)},{vars:_,generateThemeVars:I,generateStyleSheets:R}=Gd(F,C);return F.vars=_,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([Y,h])=>{F[Y]=h}),F.generateThemeVars=I,F.generateStyleSheets=R,F.generateSpacing=function(){return Vl(p.spacing,Qa(this))},F.getColorSchemeSelector=Qd(o),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...$n,...p==null?void 0:p.unstable_sxConfig},F.unstable_sx=function(h){return ln({sx:h,theme:this})},F.toRuntimeSource=Yl,F}function yo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:rs({...r===!0?{}:r.palette,mode:t})})}function Of(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",c=i==null?void 0:i[o],p={...i,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ja(e,...t);let f=r;"palette"in e||p[o]&&(p[o]!==!0?f=p[o].palette:o==="dark"&&(f={mode:"dark"}));const d=ja({...e,palette:f},...t);return d.defaultColorScheme=o,d.colorSchemes=p,d.palette.mode==="light"&&(d.colorSchemes.light={...p.light!==!0&&p.light,palette:d.palette},yo(d,"dark",p.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:d.palette},yo(d,"light",p.light)),d}return!r&&!("light"in p)&&o==="light"&&(p.light=!0),Af({...s,colorSchemes:p,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const Zl=Of(),Xl="$$material";function _f(){const e=Ed(Zl);return process.env.NODE_ENV!=="production"&&ne.useDebugValue(e),e[Xl]||e}function Rf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $f=e=>Rf(e)&&e!=="classes",xt=Rd({themeId:Xl,defaultTheme:Zl,rootShouldForwardProp:$f});function Pf(){return od}const Pr=Ud;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Ir(e){return Wd(e)}function Df(e){return typeof e.main=="string"}function If(e,t=[]){if(!Df(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function li(e=[]){return([,t])=>t&&If(t,e)}function Mf(e){return mr("MuiTypography",e)}Dr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const zf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Bf=Pf(),Vf=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${$e(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Mf,s)},Nf=xt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${$e(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Pr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(li()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${$e(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),vo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Jl=ne.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!zf[n],s=Bf({...i,...a&&{color:n}}),{align:o="inherit",className:c,component:p,gutterBottom:f=!1,noWrap:d=!1,paragraph:u=!1,variant:y="body1",variantMapping:E=vo,...m}=s,S={...s,align:o,color:n,className:c,component:p,gutterBottom:f,noWrap:d,paragraph:u,variant:y,variantMapping:E},v=p||(u?"p":E[y]||vo[y])||"span",j=Vf(S);return l.jsx(Nf,{as:v,ref:r,className:it(j.root,c),...m,ownerState:S,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Jl.propTypes={align:k.oneOf(["center","inherit","justify","left","right"]),children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),k.string]),component:k.elementType,gutterBottom:k.bool,noWrap:k.bool,paragraph:k.bool,style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOfType([k.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),k.string]),variantMapping:k.object});const ns=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(ns.displayName="FormControlContext");function Lf(){return ne.useContext(ns)}function qf(e){return mr("MuiInputAdornment",e)}const bo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var wo;const Wf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${$e(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Uf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${$e(i)}`,s,n&&"hiddenLabel",a&&`size${$e(a)}`]};return un(o,qf,t)},Hf=xt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Wf})(Pr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${bo.positionStart}&:not(.${bo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),ec=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:c=!1,position:p,variant:f,...d}=n,u=Lf()||{};let y=f;f&&u.variant&&process.env.NODE_ENV!=="production"&&f===u.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),u&&!y&&(y=u.variant);const E={...n,hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:o,position:p,variant:y},m=Uf(E);return l.jsx(ns.Provider,{value:null,children:l.jsx(Hf,{as:s,ownerState:E,className:it(m.root,a),ref:r,...d,children:typeof i=="string"&&!c?l.jsx(Jl,{color:"textSecondary",children:i}):l.jsxs(ne.Fragment,{children:[p==="start"?wo||(wo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(ec.propTypes={children:k.node,classes:k.object,className:k.string,component:k.elementType,disablePointerEvents:k.bool,disableTypography:k.bool,position:k.oneOf(["end","start"]).isRequired,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOf(["filled","outlined","standard"])});function is(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Kf(e){return mr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Yf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${$e(t)}`,`fontSize${$e(r)}`]};return un(i,Kf,n)},Gf=xt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$e(r.color)}`],t[`fontSize${$e(r.fontSize)}`]]}})(Pr(({theme:e})=>{var t,r,n,i,a,s,o,c,p,f,d,u,y,E;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:m=>!m.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:((c=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:c.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:f.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var S,v;return{props:{color:m},style:{color:(v=(S=(e.vars??e).palette)==null?void 0:S[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(u=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:u.active}},{props:{color:"disabled"},style:{color:(E=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ci=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:c="medium",htmlColor:p,inheritViewBox:f=!1,titleAccess:d,viewBox:u="0 0 24 24",...y}=n,E=ne.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:u,hasSvgAsChild:E},S={};f||(S.viewBox=u);const v=Yf(m);return l.jsxs(Gf,{as:o,className:it(v.root,a),focusable:"false",color:p,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...S,...y,...E&&i.props,ownerState:m,children:[E?i.props.children:i,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ci.propTypes={children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),k.string]),component:k.elementType,fontSize:k.oneOfType([k.oneOf(["inherit","large","medium","small"]),k.string]),htmlColor:k.string,inheritViewBox:k.bool,shapeRendering:k.string,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),titleAccess:k.string,viewBox:k.string});ci.muiName="SvgIcon";function ut(e,t){function r(n,i){return l.jsx(ci,{"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=ci.muiName,ne.memo(ne.forwardRef(r))}let So=0;function Qf(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(So+=1,r(`mui-${So}`))},[t]),n}const Zf={...ne},Co=Zf.useId;function Xf(e){if(Co!==void 0){const t=Co();return e??t}return Qf(e)}function Yn(e){const t=ne.useRef(e);return Md(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function Eo(...e){const t=ne.useRef(void 0),r=ne.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ne.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Jf=k.oneOfType([k.func,k.object]);function eh(e){const{prototype:t={}}=e;return!!t.isReactComponent}function th(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!eh(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const rh=is(k.elementType,th);function ko(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
+
`))}return!1}const To={};function tc(e,t){const r=ne.useRef(To);return r.current===To&&(r.current=e(t)),r}class ui{constructor(){pn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ui}static use(){const t=tc(ui.create).current,[r,n]=ne.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ne.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=ih(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function nh(){return ui.use()}function ih(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fa.apply(null,arguments)}function ah(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Aa(e,t)}function sh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Aa(e,t)}const jo=P.createContext(null);function oh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function as(e,t){var r=function(a){return t&&P.isValidElement(a)?t(a):a},n=Object.create(null);return e&&P.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function lh(e,t){e=e||{},t=t||{};function r(f){return f in t?t[f]:e[f]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var s,o={};for(var c in t){if(n[c])for(s=0;s<n[c].length;s++){var p=n[c][s];o[n[c][s]]=r(p)}o[c]=r(c)}for(s=0;s<i.length;s++)o[i[s]]=r(i[s]);return o}function wr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function ch(e,t){return as(e.children,function(r){return P.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:wr(r,"appear",e),enter:wr(r,"enter",e),exit:wr(r,"exit",e)})})}function uh(e,t,r){var n=as(e.children),i=lh(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if(P.isValidElement(s)){var o=a in t,c=a in n,p=t[a],f=P.isValidElement(p)&&!p.props.in;c&&(!o||f)?i[a]=P.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:wr(s,"exit",e),enter:wr(s,"enter",e)}):!c&&o&&!f?i[a]=P.cloneElement(s,{in:!1}):c&&o&&P.isValidElement(p)&&(i[a]=P.cloneElement(s,{onExited:r.bind(null,s),in:p.props.in,exit:wr(s,"exit",e),enter:wr(s,"enter",e)}))}}),i}var ph=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},dh={component:"div",childFactory:function(t){return t}},ss=function(e){sh(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(oh(a));return a.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,a){var s=a.children,o=a.handleExited,c=a.firstRender;return{children:c?ch(i,o):uh(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=as(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var c=Fa({},o.children);return delete c[i.key],{children:c}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=ah(i,["component","childFactory"]),c=this.state.contextValue,p=ph(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?P.createElement(jo.Provider,{value:c},p):P.createElement(jo.Provider,{value:c},P.createElement(a,o,p))},t}(P.Component);ss.propTypes=process.env.NODE_ENV!=="production"?{component:k.any,children:k.node,appear:k.bool,enter:k.bool,exit:k.bool,childFactory:k.func}:{};ss.defaultProps=dh;const fh=[];function hh(e){ne.useEffect(e,fh)}class os{constructor(){pn(this,"currentId",null);pn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});pn(this,"disposeEffect",()=>this.clear)}static create(){return new os}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function mh(){const e=tc(os.create).current;return hh(e.disposeEffect),e}function rc(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:c,timeout:p}=e,[f,d]=ne.useState(!1),u=it(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),y={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},E=it(r.child,f&&r.childLeaving,n&&r.childPulsate);return!o&&!f&&d(!0),ne.useEffect(()=>{if(!o&&c!=null){const m=setTimeout(c,p);return()=>{clearTimeout(m)}}},[c,o,p]),l.jsx("span",{className:u,style:y,children:l.jsx("span",{className:E})})}process.env.NODE_ENV!=="production"&&(rc.propTypes={classes:k.object.isRequired,className:k.string,in:k.bool,onExited:k.func,pulsate:k.bool,rippleSize:k.number,rippleX:k.number,rippleY:k.number,timeout:k.number.isRequired});const bt=Dr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Oa=550,xh=80,gh=fr.keyframes`
|
|
76
76
|
0% {
|
|
77
77
|
transform: scale(0);
|
|
78
78
|
opacity: 0.1;
|
|
@@ -82,7 +82,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
82
82
|
transform: scale(1);
|
|
83
83
|
opacity: 0.3;
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`,yh=fr.keyframes`
|
|
86
86
|
0% {
|
|
87
87
|
opacity: 1;
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
90
90
|
100% {
|
|
91
91
|
opacity: 0;
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,vh=fr.keyframes`
|
|
94
94
|
0% {
|
|
95
95
|
transform: scale(1);
|
|
96
96
|
}
|
|
@@ -102,14 +102,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
102
102
|
100% {
|
|
103
103
|
transform: scale(1);
|
|
104
104
|
}
|
|
105
|
-
`,
|
|
105
|
+
`,bh=xt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),wh=xt(rc,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
106
106
|
opacity: 0;
|
|
107
107
|
position: absolute;
|
|
108
108
|
|
|
109
109
|
&.${bt.rippleVisible} {
|
|
110
110
|
opacity: 0.3;
|
|
111
111
|
transform: scale(1);
|
|
112
|
-
animation-name: ${
|
|
112
|
+
animation-name: ${gh};
|
|
113
113
|
animation-duration: ${Oa}ms;
|
|
114
114
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
115
115
|
}
|
|
@@ -129,7 +129,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
129
129
|
|
|
130
130
|
& .${bt.childLeaving} {
|
|
131
131
|
opacity: 0;
|
|
132
|
-
animation-name: ${
|
|
132
|
+
animation-name: ${yh};
|
|
133
133
|
animation-duration: ${Oa}ms;
|
|
134
134
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
135
135
|
}
|
|
@@ -139,13 +139,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
139
139
|
/* @noflip */
|
|
140
140
|
left: 0px;
|
|
141
141
|
top: 0;
|
|
142
|
-
animation-name: ${
|
|
142
|
+
animation-name: ${vh};
|
|
143
143
|
animation-duration: 2500ms;
|
|
144
144
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
145
145
|
animation-iteration-count: infinite;
|
|
146
146
|
animation-delay: 200ms;
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`,nc=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[c,p]=ne.useState([]),f=ne.useRef(0),d=ne.useRef(null);ne.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const u=ne.useRef(!1),y=mh(),E=ne.useRef(null),m=ne.useRef(null),S=ne.useCallback(F=>{const{pulsate:C,rippleX:_,rippleY:I,rippleSize:R,cb:Y}=F;p(h=>[...h,l.jsx(wh,{classes:{ripple:it(a.ripple,bt.ripple),rippleVisible:it(a.rippleVisible,bt.rippleVisible),ripplePulsate:it(a.ripplePulsate,bt.ripplePulsate),child:it(a.child,bt.child),childLeaving:it(a.childLeaving,bt.childLeaving),childPulsate:it(a.childPulsate,bt.childPulsate)},timeout:Oa,pulsate:C,rippleX:_,rippleY:I,rippleSize:R},f.current)]),f.current+=1,d.current=Y},[a]),v=ne.useCallback((F={},C={},_=()=>{})=>{const{pulsate:I=!1,center:R=i||C.pulsate,fakeElement:Y=!1}=C;if((F==null?void 0:F.type)==="mousedown"&&u.current){u.current=!1;return}(F==null?void 0:F.type)==="touchstart"&&(u.current=!0);const h=Y?null:m.current,M=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,G,B;if(R||F===void 0||F.clientX===0&&F.clientY===0||!F.clientX&&!F.touches)N=Math.round(M.width/2),G=Math.round(M.height/2);else{const{clientX:q,clientY:Q}=F.touches&&F.touches.length>0?F.touches[0]:F;N=Math.round(q-M.left),G=Math.round(Q-M.top)}if(R)B=Math.sqrt((2*M.width**2+M.height**2)/3),B%2===0&&(B+=1);else{const q=Math.max(Math.abs((h?h.clientWidth:0)-N),N)*2+2,Q=Math.max(Math.abs((h?h.clientHeight:0)-G),G)*2+2;B=Math.sqrt(q**2+Q**2)}F!=null&&F.touches?E.current===null&&(E.current=()=>{S({pulsate:I,rippleX:N,rippleY:G,rippleSize:B,cb:_})},y.start(xh,()=>{E.current&&(E.current(),E.current=null)})):S({pulsate:I,rippleX:N,rippleY:G,rippleSize:B,cb:_})},[i,S,y]),j=ne.useCallback(()=>{v({},{pulsate:!0})},[v]),D=ne.useCallback((F,C)=>{if(y.clear(),(F==null?void 0:F.type)==="touchend"&&E.current){E.current(),E.current=null,y.start(0,()=>{D(F,C)});return}E.current=null,p(_=>_.length>0?_.slice(1):_),d.current=C},[y]);return ne.useImperativeHandle(r,()=>({pulsate:j,start:v,stop:D}),[j,v,D]),l.jsx(bh,{className:it(bt.root,a.root,s),ref:m,...o,children:l.jsx(ss,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(nc.propTypes={center:k.bool,classes:k.object,className:k.string});function Sh(e){return mr("MuiButtonBase",e)}const Ch=Dr("MuiButtonBase",["root","disabled","focusVisible"]),Eh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=un({root:["root",t&&"disabled",r&&"focusVisible"]},Sh,i);return r&&n&&(s.root+=` ${n}`),s},kh=xt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ch.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ic=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:c="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:d=!1,focusRipple:u=!1,focusVisibleClassName:y,LinkComponent:E="a",onBlur:m,onClick:S,onContextMenu:v,onDragLeave:j,onFocus:D,onFocusVisible:F,onKeyDown:C,onKeyUp:_,onMouseDown:I,onMouseLeave:R,onMouseUp:Y,onTouchEnd:h,onTouchMove:M,onTouchStart:N,tabIndex:G=0,TouchRippleProps:B,touchRippleRef:q,type:Q,...ie}=n,pe=ne.useRef(null),$=nh(),L=Eo($.ref,q),[Z,ce]=ne.useState(!1);p&&Z&&ce(!1),ne.useImperativeHandle(i,()=>({focusVisible:()=>{ce(!0),pe.current.focus()}}),[]);const fe=$.shouldMount&&!f&&!p;ne.useEffect(()=>{Z&&u&&!f&&$.pulsate()},[f,u,Z,$]);const ue=Nt($,"start",I,d),re=Nt($,"stop",v,d),H=Nt($,"stop",j,d),ee=Nt($,"stop",Y,d),ae=Nt($,"stop",g=>{Z&&g.preventDefault(),R&&R(g)},d),oe=Nt($,"start",N,d),le=Nt($,"stop",h,d),ge=Nt($,"stop",M,d),X=Nt($,"stop",g=>{ko(g.target)||ce(!1),m&&m(g)},!1),Pe=Yn(g=>{pe.current||(pe.current=g.currentTarget),ko(g.target)&&(ce(!0),F&&F(g)),D&&D(g)}),qe=()=>{const g=pe.current;return c&&c!=="button"&&!(g.tagName==="A"&&g.href)},Ge=Yn(g=>{u&&!g.repeat&&Z&&g.key===" "&&$.stop(g,()=>{$.start(g)}),g.target===g.currentTarget&&qe()&&g.key===" "&&g.preventDefault(),C&&C(g),g.target===g.currentTarget&&qe()&&g.key==="Enter"&&!p&&(g.preventDefault(),S&&S(g))}),kt=Yn(g=>{u&&g.key===" "&&Z&&!g.defaultPrevented&&$.stop(g,()=>{$.pulsate(g)}),_&&_(g),S&&g.target===g.currentTarget&&qe()&&g.key===" "&&!g.defaultPrevented&&S(g)});let Ue=c;Ue==="button"&&(ie.href||ie.to)&&(Ue=E);const Ze={};Ue==="button"?(Ze.type=Q===void 0?"button":Q,Ze.disabled=p):(!ie.href&&!ie.to&&(Ze.role="button"),p&&(Ze["aria-disabled"]=p));const He=Eo(r,pe),w={...n,centerRipple:a,component:c,disabled:p,disableRipple:f,disableTouchRipple:d,focusRipple:u,tabIndex:G,focusVisible:Z},T=Eh(w);return l.jsxs(kh,{as:Ue,className:it(T.root,o),ownerState:w,onBlur:X,onClick:S,onContextMenu:re,onFocus:Pe,onKeyDown:Ge,onKeyUp:kt,onMouseDown:ue,onMouseLeave:ae,onMouseUp:ee,onDragLeave:H,onTouchEnd:le,onTouchMove:ge,onTouchStart:oe,ref:He,tabIndex:p?-1:G,type:Q,...Ze,...ie,children:[s,fe?l.jsx(nc,{ref:L,center:a,...B}):null]})});function Nt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(ic.propTypes={action:Jf,centerRipple:k.bool,children:k.node,classes:k.object,className:k.string,component:rh,disabled:k.bool,disableRipple:k.bool,disableTouchRipple:k.bool,focusRipple:k.bool,focusVisibleClassName:k.string,href:k.any,LinkComponent:k.elementType,onBlur:k.func,onClick:k.func,onContextMenu:k.func,onDragLeave:k.func,onFocus:k.func,onFocusVisible:k.func,onKeyDown:k.func,onKeyUp:k.func,onMouseDown:k.func,onMouseLeave:k.func,onMouseUp:k.func,onTouchEnd:k.func,onTouchMove:k.func,onTouchStart:k.func,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),tabIndex:k.number,TouchRippleProps:k.object,touchRippleRef:k.oneOfType([k.func,k.shape({current:k.shape({pulsate:k.func.isRequired,start:k.func.isRequired,stop:k.func.isRequired})})]),type:k.oneOfType([k.oneOf(["button","reset","submit"]),k.string])});function Th(e){return mr("MuiCircularProgress",e)}Dr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qt=44,_a=fr.keyframes`
|
|
149
149
|
0% {
|
|
150
150
|
transform: rotate(0deg);
|
|
151
151
|
}
|
|
@@ -153,7 +153,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
153
153
|
100% {
|
|
154
154
|
transform: rotate(360deg);
|
|
155
155
|
}
|
|
156
|
-
`,Ra=
|
|
156
|
+
`,Ra=fr.keyframes`
|
|
157
157
|
0% {
|
|
158
158
|
stroke-dasharray: 1px, 200px;
|
|
159
159
|
stroke-dashoffset: 0;
|
|
@@ -168,16 +168,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
168
168
|
stroke-dasharray: 1px, 200px;
|
|
169
169
|
stroke-dashoffset: -126px;
|
|
170
170
|
}
|
|
171
|
-
`,
|
|
171
|
+
`,jh=typeof _a!="string"?fr.css`
|
|
172
172
|
animation: ${_a} 1.4s linear infinite;
|
|
173
|
-
`:null,
|
|
173
|
+
`:null,Fh=typeof Ra!="string"?fr.css`
|
|
174
174
|
animation: ${Ra} 1.4s ease-in-out infinite;
|
|
175
|
-
`:null,
|
|
176
|
-
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Fo=ut(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Ao=ut(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Rh=ut(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),os=ut(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=ut(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),$h=ut(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),G={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},Oo=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Ph=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Lt=(e,t,r)=>{const n=Oo(e),i=Oo(t);return Ph(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ls=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},Dh=ls(G.primary.main),Ih=ls(G.secondary.main),Ye=ls(G.text.primary),Mh={primary:G.primary.main,secondary:G.secondary.main,textPrimary:G.text.primary,textSecondary:G.text.secondary,divider:G.divider,background:G.background},yt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:d=28,endorsementPaddingX:h="8px",...f})=>{var m,S;const p=!!r,y=a?l.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:d,paddingLeft:h,paddingRight:h,borderRadius:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...f.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(S=f.InputProps)==null?void 0:S.endAdornment};return l.jsxs(x.Box,{children:[p&&l.jsx(x.Typography,{variant:n,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...f,InputProps:E,label:p?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:e?G.error.main:G.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:d,...h})=>{const f=P.useId(),p=c==null||c===""||Array.isArray(c)&&c.length===0,y=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!h.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:s,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:f,shrink:!p||!!o,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}},children:t}),l.jsx(x.Select,{...h,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:E=>{const m=E;if(p)return l.jsx("span",{style:{color:G.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:G.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:G.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:G.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ye[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ye[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:G.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):r.map(E=>l.jsx(x.MenuItem,{value:E.value,sx:{backgroundColor:G.background.paper,color:G.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ye[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ye[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(x.FormHelperText,{children:i})]})},zh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ic=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:d,loading:h,error:f,helperText:p,onOpen:y,noOptionsText:E,sx:m})=>l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(zh,{}),disabled:d,loading:h,onOpen:y,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:G.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>l.jsxs(x.Box,{component:"li",...S,sx:{backgroundColor:G.background.paper,color:G.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ye[50]},"&.Mui-focused":{backgroundColor:Ye[50]},...j?{backgroundColor:Ye[50]}:{}},children:[n&&l.jsx(x.Checkbox,{checked:j}),l.jsx(x.Typography,{variant:"body2",sx:{color:G.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:S=>l.jsx(x.TextField,{...S,label:i,placeholder:s,size:"small",error:f,helperText:p,InputLabelProps:{shrink:!!r||!!s,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[h?l.jsx(x.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ac=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:d,groupPadding:h=1.5,itemGap:f=1,disabled:p=!1})=>{const y=typeof i=="number"&&i>0,E=y?i:12,m=i===!0,S=i===!1&&!y,v=(j,M)=>{const F=Array.isArray(r)?[...r]:[];M?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(x.FormControl,{error:d,disabled:p,sx:j=>{var M;return{display:"flex",flexDirection:"column",px:j.spacing(h),borderRadius:((M=j.shape)==null?void 0:M.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),y&&l.jsx(x.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(f),mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(f),alignItems:"center",mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),wr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:d,groupPadding:h=1.5,itemGap:f=1})=>l.jsxs(x.FormControl,{error:d,sx:p=>{var y;return{display:"flex",flexDirection:"column",px:p.spacing(h),borderRadius:((y=p.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:p.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:p=>({color:p.palette.text.primary,mb:.5,fontSize:p.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:p=>({color:p.palette.text.secondary,mb:.5,mx:1,fontSize:p.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:p.palette.text.primary},"&.Mui-error":{color:p.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:r,onChange:p=>a(p.target.value),sx:p=>({display:"flex",flexDirection:i?"row":"column",gap:p.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(p=>l.jsx(x.FormControlLabel,{value:p.value,control:l.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:p.label}),p.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:p.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(p.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]}),cs=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(x.Box,{children:[e==="top"&&r&&l.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(x.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),sc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(x.Box,{children:[s&&l.jsx(x.Typography,{variant:t,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:r?G.error.main:G.text.secondary},...n}})]})},oc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=ut(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),lc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function cc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:d,chipText:h,helperText:f,emptyStateText:p,emptyStateButtonText:y="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=P.useState(null),[j,M]=P.useState(null),F=u=>D=>{if(!i){v(u),D.dataTransfer.effectAllowed="move";try{D.dataTransfer.setData("text/plain",String(t(e[u])))}catch{}}},C=u=>D=>{i||(D.preventDefault(),M(u),D.dataTransfer.dropEffect="move")},R=u=>D=>{if(i)return;if(D.preventDefault(),S===null||S===u){v(null),M(null);return}const L=[...e],[$]=L.splice(S,1);L.splice(u,0,$),v(null),M(null),r(L)},B=()=>{v(null),M(null)},_=e.length===0,I=_&&(p||E!==void 0);return l.jsxs(x.Box,{role:"list",sx:u=>({display:"flex",flexDirection:"column",gap:u.spacing(1),...a}),children:[n,!_&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),I?l.jsxs(x.Box,{sx:u=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:u.spacing(4),backgroundColor:u.palette.mode==="dark"?"#000000":G.background.paper,border:`2px dashed ${u.palette.mode==="dark"?"#FFFFFF":G.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[p&&l.jsx(x.Typography,{variant:"body1",sx:u=>({color:u.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:p}),E&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:E,disabled:i,sx:u=>({mt:p?0:2,backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}1A`:`${u.palette.primary.main}0D`,borderColor:u.palette.primary.main,color:u.palette.primary.main,"&:hover":{backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}33`:`${u.palette.primary.main}1A`,borderColor:u.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:y})]}):e.map((u,D)=>{const L=S===D,$=j===D&&S!==null&&S!==D;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:F(D),onDragOver:C(D),onDrop:R(D),onDragEnd:B,sx:V=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${$?V.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:V.spacing(1),opacity:L?.6:1,boxShadow:$?`0 0 0 2px ${V.palette.primary.main}33`:"none"}),children:d?d(u,L):l.jsxs(x.Box,{sx:V=>({display:"flex",alignItems:"center",gap:V.spacing(1),minWidth:0}),children:[c&&l.jsx(lc,{}),o&&l.jsxs(x.Typography,{variant:"body2",sx:V=>({fontWeight:600,fontSize:14,color:`${V.palette.text.primary}`,flex:"0 0 auto"}),children:[D+1,"."]}),(()=>{const V=typeof h=="function"?h(u,D):h;return V?l.jsx(x.Chip,{label:V,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:V=>({fontSize:12,fontWeight:500,color:`${V.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(u):""})]})},String(t(u)))}),!_&&f?typeof f=="string"?l.jsx(x.Typography,{variant:"caption",sx:u=>({color:`${u.palette.text.primary}60`}),children:f}):f:null]})}const Bh=xt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:G.primary.main}})),Vh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:c}=a;return o?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):s?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:Ct(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Bh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>l.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[l.jsx(x.StepLabel,{StepIconComponent:i,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?G.primary.main:G.text.primary},children:a.label})}),s!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},s))})},us=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Ct(t||o.palette.text.primary,.5)}`,backgroundColor:Ct(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Nh=xt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:G.primary.main}})),Lh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=P.useState(null),s=o=>{const{active:c,completed:d,icon:h}=o;return d?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:Ct(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:h}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:h})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Nh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:s,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?G.primary.main:G.text.primary},children:o.label}),l.jsx(us,{size:"small",colorHex:c<t?G.success.main:c===t?"#973B00":G.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${G.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},c))})},qh=ut(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Wh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||G.info.main,d=Ct(c,.08),h=Ct(c,.08),f=a??l.jsx(qh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${h}`,...o},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})})},uc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(x.Box,{children:[l.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(x.Tab,{value:c,disabled:s.disabled,label:l.jsx(x.Typography,{variant:"body2",children:s.label}),sx:d=>({px:2,textTransform:"none",color:d.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:d.palette.action.hover},"&.Mui-selected":{color:d.palette.common.white,borderColor:d.palette.primary.main,backgroundColor:d.palette.primary.main,fontWeight:600},...a})},String(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===c?l.jsx(x.Box,{sx:{mt:1},children:d},`panel-${c}`):null})]}),Uh=ut(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),pc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:c="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:h,setValue:f,rowSelectionMode:p,rowSelectionKey:y})=>{const{fields:E,append:m,remove:S}=hu({control:a,name:e}),v=P.useMemo(()=>{if(y)return y;const I=t.find(u=>u.type==="rowSelect");return I==null?void 0:I.key},[t,y]),j=fl({control:a,name:e})||[],M=P.useMemo(()=>{if(!v)return{};const I={};return j.forEach((u,D)=>{I[D]=!!(u!=null&&u[v])}),I},[j,v]),F=P.useCallback(I=>M[I]===!0,[M]),C=P.useCallback((I,u)=>{if(!f||!v)return;const D=`${e}.${I}.${v}`;p==="single"&&u&&j.forEach((L,$)=>{if($!==I){const V=`${e}.${$}.${v}`;f(V,!1,{shouldDirty:!0})}}),f(D,u,{shouldDirty:!0})},[e,v,p,f,j]),R=I=>{const u={...I||r};t.forEach(D=>{D.value!==void 0&&u[D.key]===void 0&&(u[D.key]=typeof D.value=="function"?D.value(u,E.length):D.value)}),m(u)},B=P.useMemo(()=>t.reduce((u,D)=>{if(D.width==="auto"||D.width===void 0)return u+120;const L=typeof D.width=="number"?D.width:typeof D.width=="string"&&parseInt(D.width)||160;return u+L},0)+(i?100:0),[t,i]),_=I=>I.width==="auto"||I.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof I.width=="number"?{width:`${I.width}px`,minWidth:`${I.width}px`,maxWidth:`${I.width}px`}:typeof I.width=="string"?{width:I.width,minWidth:I.width}:{width:"160px",minWidth:"160px"};return l.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"hidden",...s},children:E.length===0?l.jsxs(x.Box,{sx:I=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Ct(I.palette.primary.main,.4),backgroundColor:Ct(I.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...h}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:I=>({color:I.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:c}),l.jsx(x.Typography,{variant:"body2",sx:I=>({color:I.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:d}),Array.isArray(o)&&o.length>0?o.map((I,u)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>R(I.template),children:I.label},`empty-add-${u}`)):n&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(o)&&o.length>0?o.map((I,u)=>l.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(I.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:u===0?"#04502d":void 0}},children:I.label},`add-${u}`)):n&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},children:n})}),l.jsx(x.Box,{sx:{width:"100%",overflow:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${B||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(I=>l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,..._(I)},children:I.header},I.key)),i&&l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(x.TableBody,{children:E.map((I,u)=>{const D=F(u),L=p&&!D;return l.jsxs(x.TableRow,{children:[t.map($=>{var le;const V=`${e}.${u}.${$.key}`,ee=$.type==="rowSelect"||$.key===v,ie=ee?!1:L?!0:typeof $.disabled=="function"?$.disabled(I,u):!!$.disabled;if($.type==="index"){const Y=$.indexFormat?$.indexFormat(u):`#${u+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((le=$.cellSx)==null?void 0:le.textAlign)||"center",..._($),...$.cellSx},children:Y},$.key)}if($.value!==void 0&&$.editable===!1){const Y=typeof $.value=="function"?$.value(I,u):$.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._($),...$.cellSx},children:Y},$.key)}const he=$.endorsementText?typeof $.endorsementText=="function"?$.endorsementText(I,u):$.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._($),...$.cellSx},children:$.type==="rowSelect"||ee&&$.type==="checkbox"?l.jsx(Oe,{name:V,control:a,defaultValue:!1,render:({field:Y})=>l.jsx(Ht,{label:"",checked:!!Y.value,disabled:!1,onChange:U=>{Y.onChange(U),C(u,U)},sx:$.sx})}):$.type==="checkbox"?l.jsx(Oe,{name:V,control:a,render:({field:Y})=>l.jsx(Ht,{label:"",checked:!!Y.value,disabled:ie,onChange:Y.onChange,sx:$.sx})}):$.type==="select"?l.jsx(Oe,{name:V,control:a,render:({field:Y})=>l.jsx($i,{...Y,fullWidth:!0,disabled:ie,options:$.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required})}):$.type==="date"?l.jsx(Oe,{name:V,control:a,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(I,u):$.value:void 0,render:({field:Y})=>(P.useEffect(()=>{if(f&&(Y.value===void 0||Y.value===null||Y.value==="")&&$.value!==void 0){const U=typeof $.value=="function"?$.value(I,u):$.value;f(V,U,{shouldValidate:!1})}},[V,Y.value,$.value,I,u,f]),l.jsx(cs,{...Y,fullWidth:!0,disabled:ie,size:"small",placeholder:$.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required}))}):l.jsx(Oe,{name:V,control:a,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(I,u):$.value:void 0,render:({field:Y})=>(P.useEffect(()=>{if(f&&(Y.value===void 0||Y.value===null||Y.value==="")&&$.value!==void 0){const U=typeof $.value=="function"?$.value(I,u):$.value;f(V,U,{shouldValidate:!1})}},[V,Y.value,$.value,I,u,f]),l.jsx(yt,{...Y,fullWidth:!0,type:$.type==="number"?"number":"text",placeholder:$.placeholder,disabled:ie,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required,endorsementText:he,endorsementBg:$.endorsementBg,endorsementColor:$.endorsementColor,endorsementRadius:$.endorsementRadius,endorsementHeight:$.endorsementHeight,endorsementPaddingX:$.endorsementPaddingX,inputProps:{...$.type==="number"?{min:$.min,max:$.max,step:$.step}:{minLength:$.minLength,maxLength:$.maxLength,pattern:$.pattern}}}))})},$.key)}),i&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>S(u),sx:{width:"20px",height:"20px"},children:l.jsx(Uh,{sx:{fontSize:"20px"}})})})]},I.id)})})]})})})]})})},dc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),d=a.leftAction,h=a.rightAction;return l.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&d&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Oe,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:d.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&h&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Oe,{name:h.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:h.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),fc=ut(l.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"),ta=ut(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Hh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ra=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Kh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,c]=P.useState(e.seasonalMonths||[]),d=p=>{const y=o.includes(p)?o.filter(E=>E!==p):[...o,p];c(y),r(e.id,{seasonalMonths:y})},h=(()=>{const p=e.min||0;return p<0?"Min cannot be negative.":Number.isInteger(p)?null:"Use whole periods."})(),f=(()=>{const p=e.min||0,y=e.max||0;return Number.isInteger(y)?y<p?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:G.divider,position:"relative",...s},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(lc,{})}),l.jsx(us,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:G.error.main,"&:hover":{bgcolor:Ye[50]}},size:"small",children:l.jsx(fc,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:p=>r(e.id,{type:p.target.value}),options:Hh,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:G.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(yt,{type:"number",value:e.priority||5,onChange:p=>{const y=parseInt(p.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,y))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:p=>{const y=parseInt(p.target.value)||0;r(e.id,{min:y,...e.lockLength?{max:y}:{}})},inputProps:{min:0},disabled:a,error:!!h,helperText:h||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:p=>r(e.id,{max:parseInt(p.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!f&&!e.lockLength,helperText:e.lockLength?"Locked to Min":f||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:p=>r(e.id,{lockLength:p,...p?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:p=>r(e.id,{residualFill:p}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(wr,{value:e.balloonType||"percent",onChange:p=>r(e.id,{balloonType:p}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(yt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:p=>r(e.id,{balloonAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(yt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:p=>r(e.id,{balloonPercent:parseFloat(p.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(yt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:p=>r(e.id,{stepPercent:parseFloat(p.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(yt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:p=>r(e.id,{stepEveryN:parseInt(p.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(p=>l.jsx(x.Chip,{label:p,size:"small",onClick:()=>!a&&d(p),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(p)?G.primary.main:"transparent",color:o.includes(p)?G.primary.contrastText:G.text.primary,border:`1px solid ${G.divider}`,"&:hover":{bgcolor:o.includes(p)?Ye[600]:Ye[50]}}},p))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(yt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:p=>r(e.id,{customAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:p=>r(e.id,{holidayInterestTreatment:p}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function hc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:d={},body:h,transform:f,passThroughFields:p}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;y=y.replace(F,(C,R)=>{const B=n[R];return B!=null?encodeURIComponent(String(B)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(d).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(y+=`${y.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(y),C=new URL(y,F?void 0:"http://local.placeholder"),R=Array.from(C.searchParams.entries());for(const[B,_]of R)(_===""||_==="undefined"||_==="null")&&C.searchParams.delete(B);F?y=C.toString():y=C.pathname+(C.search?C.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&h&&(S.body=JSON.stringify(h));const v=await fetch(y,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(f)return f(Array.isArray(j)?j:j.data||j);const M=Array.isArray(j)?j:j.data||j;if(!Array.isArray(M))throw new Error("API response is not an array");return M.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},R=Array.isArray(p)?p:void 0;if(Array.isArray(R))for(const B of R)F[B]!==void 0&&(C[B]=F[B]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function mc(e,t,r,n,i=!1){const a=P.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=P.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Ju({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return hc(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 gr(e){return!!(e.apiConfig||e.api_endpoint)}function ps(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 Yh(e,t){const r=ps(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 ds=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[d,h]=P.useState(!1),f=P.useRef(!1),[p,y]=P.useState(!1),[E,m]=P.useState(!1),[S,v]=P.useState(!1),j=P.useRef(null),M=P.useRef(null),F=()=>{var te;const H=e.required;if(typeof H=="function")try{return!!H(a||{})}catch{return!1}if(H!==void 0)return!!H;const X=(te=e.validation)==null?void 0:te.required;if(typeof X=="function")try{return!!X(a||{})}catch{return!1}return X!==void 0?!!X:!1},C=H=>F()?`${H} *`:H,R=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},B=P.useRef(void 0);P.useEffect(()=>{const H=e.value;if(typeof H!="function"||!s)return;let X;try{X=H(a||{})}catch{return}const te=a?a[e.name]:void 0;if(B.current===void 0&&(B.current=X),te===void 0||te===B.current)try{s(e.name,X,{shouldValidate:!0,shouldDirty:!1}),B.current=X}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((H,X)=>({...H,[X]:a[X]}),{}):a||{}),e.name]);const _=P.useMemo(()=>{const H=ps(e);return H&&Array.isArray(e.passThroughFields)&&(H.passThroughFields=e.passThroughFields),H},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),I=P.useRef(null),u=_!=null&&_.dependsOn?a==null?void 0:a[_.dependsOn]:null,D=P.useMemo(()=>{if(!(_!=null&&_.dependsOn))return!1;const H=u,X=I.current,te=H!==X;return te&&(I.current=H),te},[_==null?void 0:_.dependsOn,u]),L=P.useMemo(()=>{const H=e.showWhen;if(typeof H=="function")try{return!!H(a||{})}catch{return!0}if(H&&typeof H=="object"){const X=H.field,te=H.equals,ae=H.in,se=X?(a||{})[X]:void 0;if(X&&typeof te<"u")return se===te;if(X&&Array.isArray(ae))return ae.includes(se)}return!0},[e.showWhen,a]),$=P.useCallback(()=>{const H=e.dynamicEndorsement;if(typeof H=="function")try{return H(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),V=P.useCallback(()=>{const H=e.endAdornment,X=e.endAdornmentSwitch,te=e.endAdornmentCheckbox;if(X)return l.jsx(Oe,{name:X,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:ae})=>l.jsx(x.Switch,{checked:ae.value||!1,onChange:se=>{ae.onChange(se.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(se.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(te)return l.jsx(Oe,{name:te,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:ae})=>l.jsx(Ht,{label:"",checked:ae.value||!1,onChange:ae.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof H=="function")try{return H(a||{},{control:t,setValue:s})}catch{return}return H},[e,a,t,s]),ee=P.useMemo(()=>d&&gr(e)&&(!(_!=null&&_.dependsOn)||u),[d,e,_==null?void 0:_.dependsOn,u]),ie=P.useMemo(()=>{const H={};if(!a)return H;const X=(_==null?void 0:_.endpoint)||(e==null?void 0:e.api_endpoint);if(X&&typeof X=="string"){const te=X.match(/\{([^}]+)\}/g)||[];for(const ae of te){const se=ae.slice(1,-1),ge=a[se];ge!==void 0&&(H[se]=ge)}}if(_!=null&&_.dependsOn){const te=_.dependsOn,ae=a[te];ae!==void 0&&(H[te]=ae)}return H},[_==null?void 0:_.endpoint,e==null?void 0:e.api_endpoint,_==null?void 0:_.dependsOn,a]),{data:he=[],isLoading:le,error:Y}=mc(_,n,i,ie,ee),U=P.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]),Z=P.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]);P.useEffect(()=>{if(gr(e)&&!f.current){const H=a==null?void 0:a[e.name];H!=null&&H!==""&&(f.current=!0,h(!0))}},[e,a]),P.useEffect(()=>{gr(e)&&(_!=null&&_.dependsOn)&&D&&f.current&&(f.current=!1,h(!1))},[D,_==null?void 0:_.dependsOn]);const ce=P.useCallback(()=>gr(e)?he:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,he]),de=()=>{var H,X,te,ae,se,ge;switch(e.type){case"title":return l.jsx(x.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 l.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const Q=e.actionName,Pe=e.actionComponent,qe=e.actionLabel,Ge=T=>l.jsx(oc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),kt=T=>{if(e.cardWrap){const z={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:z,...e.cardProps,children:T})}return T};return kt(Q&&Pe?l.jsx(Oe,{name:Q,control:t,defaultValue:e.value??!1,render:({field:T})=>Ge(Pe==="switch"?l.jsx(di,{label:qe,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:qe||"",checked:!!T.value,onChange:T.onChange}))}):Ge());case"tabs":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((X=(H=e.items)==null?void 0:H[0])==null?void 0:X.value)=="string"||typeof((ae=(te=e.items)==null?void 0:te[0])==null?void 0:ae.value)=="number"?(ge=(se=e.items)==null?void 0:se[0])==null?void 0:ge.value:0),render:({field:T})=>{const g=e.items||[],z=g.map((K,W)=>({label:K.label,value:typeof K.value=="string"||typeof K.value=="number"?K.value:W,content:K.content,disabled:K.disabled})),b=T.value,O=(()=>{if(typeof b=="string"||typeof b=="number"){const K=g.findIndex((W,ue)=>typeof W.value=="string"||typeof W.value=="number"?W.value===b:ue===b);return K>=0?K:0}return Number(b)||0})(),q=g[O]||{};return l.jsxs(x.Box,{children:[l.jsx(uc,{value:T.value,onChange:T.onChange,items:z,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(q.fields)&&q.fields.length>0&&(()=>{const K=q.fields,W=[];let ue=[];for(const Ce of K)Ce.type==="section"&&ue.length>0?(W.push(ue),ue=[Ce]):ue.push(Ce);ue.length>0&&W.push(ue);const ve={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(x.Box,{sx:{mt:1},children:W.map((Ce,De)=>{const Be=Ce.find(Je=>Je.type==="section"),Xe=(Be==null?void 0:Be.cardWrap)!==!1,Ot=l.jsx(l.Fragment,{children:Ce.map(Je=>{const We=Je.showWhen;if(We)try{if(typeof We=="function"){if(!We(a||{}))return null}else if(typeof We=="object"){const Yt=We.field,xs=We.equals,gs=We.in,ys=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof xs<"u"&&ys!==xs||Yt&&Array.isArray(gs)&&!gs.includes(ys))return null}}catch{}const pt=Math.min(Math.max(Je.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${pt}`},children:l.jsx(ds,{field:Je,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Je.name)})});return Xe?l.jsx(x.Card,{sx:{...ve,...(Be==null?void 0:Be.cardSx)||{}},...(Be==null?void 0:Be.cardProps)||{},children:Ot},`tab-group-${De}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ot},`tab-group-${De}`)})})})()]})}});case"grid":const Ue=e.defaultRows||[];return l.jsx(Oe,{name:e.name,control:t,defaultValue:Ue.length>0?Ue:R()||[],render:()=>l.jsx(pc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})});case"listcards":return l.jsx(dc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const g=e,z=T.value||g.items||[],b=typeof g.getId=="function"?g.getId:typeof g.getId=="string"?K=>K[g.getId]:K=>K.id??K._id??K.key??String(K),O=typeof g.getText=="function"?g.getText:typeof g.getText=="string"?K=>K[g.getText]??String(K):K=>K.text??K.label??K.name??K.title??String(K),q=(()=>{if(typeof g.chipText=="function")return g.chipText;if(typeof g.chipText=="string")return z.length>0&&z[0]&&g.chipText in z[0]?(K,W)=>K[g.chipText]??void 0:g.chipText})();return l.jsx(cc,{items:z,getId:b,onReorder:K=>{T.onChange(K)},header:g.header,disabled:e.disabled,sx:g.sx,chipText:q,helperText:g.helperText||(c?o==null?void 0:o.message:void 0),getText:O,showIndex:g.showIndex!==!1,showLeftIcon:g.showLeftIcon!==!1,renderItem:g.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>e.type==="textarea"?l.jsx(sc,{...T,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:V(),endorsementText:$(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?p?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Xl,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>y(g=>!g),edge:"end",children:p?l.jsx(Ao,{}):l.jsx(Fo,{})})})}:void 0})});case"number":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:V(),endorsementText:$(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const Ze=ce();return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx($i,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:T.value,onChange:T.onChange,options:Ze,disabled:e.disabled||le,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:le,error:c||!!Y,helperText:(o==null?void 0:o.message)||(Y==null?void 0:Y.message)||e.helperText,onOpen:U})});case"checkbox":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R()||[],render:({field:T})=>l.jsx(ac,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const He=ce(),w=!!(e.disabled||le||_!=null&&_.dependsOn&&!u);return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>{const g=T.value,z=e.multiple===!0,b=(_==null?void 0:_.valueField)||e.value_field||"value",O=(_==null?void 0:_.labelField)||e.label_field||"label",q=W=>{if(W!=null){if(typeof W=="string"||typeof W=="number")return W;if(typeof W=="object"){if(W[b]!==void 0)return W[b];if(W.value!==void 0)return W.value;if(W.id!==void 0)return W.id}}},K=(()=>{if(z)return(Array.isArray(g)?g:[]).map(ue=>{const ve=He.find(Ce=>{const De=q(Ce);return De!==void 0&&De===ue});return ve||{[b]:ue,[O]:`Selected: ${ue}`,value:ue,label:`Selected: ${ue}`}});{if(g==null||g==="")return null;const W=He.find(ue=>{const ve=q(ue);return ve!==void 0&&ve===g});return W||{[b]:g,[O]:`Selected: ${g}`,value:g,label:`Selected: ${g}`}}})();return l.jsx(ic,{id:e.id,options:He,value:K,multiple:z,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:le,error:c||!!Y,helperText:(o==null?void 0:o.message)||(Y==null?void 0:Y.message)||e.helperText||"",onOpen:Z,noOptionsText:w&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:le?"Fetching data...":d&&!le&&He.length===0?"No options available":"Click to load options",onChange:W=>{const ue=(_==null?void 0:_.valueField)||e.value_field||"value";if(z){const Ce=(Array.isArray(W)?W:[]).map(De=>typeof De=="object"&&(De[ue]||De.value||De.id)||De);T.onChange(Ce)}else{let ve;W&&typeof W=="object"?ve=W[ue]||W.value||W.id||W:ve=W,T.onChange(ve);const Ce=e.selectedAssignments;if(Ce&&W&&typeof W=="object")for(const[De,Be]of Object.entries(Ce)){const Xe=W[Be];if(Xe!==void 0&&typeof s=="function")try{s(De,Xe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(cs,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>{const g=T.value||e.defaultValue||e.src;if(g){const W=e.imageUploaded||{},ue=W.previewText||"Preview",ve=W.removeText||"Remove",Ce=W.saveText||"Save logo",De=W.showSave!==void 0?W.showSave:!!(e.onSave||W.saveText),Be=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(g)}catch{}},Xe=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ot=()=>{typeof e.onSave=="function"&&e.onSave({url:g,file:M.current||void 0})},Je=We=>{const pt=We.target.files&&We.target.files[0];if(pt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(pt)}catch{}try{const Yt=URL.createObjectURL(pt);T.onChange(Yt)}catch{}M.current=pt,v(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...W.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Je}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...W.thumbnailSx},children:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...W.fileNameSx},children:typeof g=="string"?g.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...W.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...W.previewButtonSx},variant:"outlined",onClick:Be,startIcon:l.jsx(Fo,{}),children:ue}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Xe,sx:{...W.removeButtonSx},startIcon:l.jsx(Ao,{}),children:ve}),De&&l.jsx(x.Button,{variant:"contained",onClick:Ot,sx:{...W.saveButtonSx},children:Ce})]})]}),l.jsxs(x.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:W.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var We;return(We=j.current)==null?void 0:We.click()},children:W.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:W.closeText||"Close"})]})]})]})}const z=e.imagePlaceholder||{},b=z.icon||"upload",O=j,q=()=>{var W;try{(W=O.current)==null||W.click()}catch{}},K=W=>{const ue=W.target.files&&W.target.files[0];if(ue){typeof e.onFileSelected=="function"&&e.onFileSelected(ue);try{const ve=URL.createObjectURL(ue);T.onChange(ve)}catch{}M.current=ue}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...z.sx},children:[l.jsx("input",{type:"file",ref:O,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:K}),l.jsx(Gn,{sx:{borderRadius:"8px",...z.iconSx},children:b==="image"?l.jsx($h,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...z.titleSx},children:z.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...z.subtitleSx},children:z.subtitle||""}),l.jsx(x.Button,{onClick:q,sx:{my:2,...z.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:z.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...z.helperTextSx},children:z.helperText||e.helperText||""})]})}});case"component":return l.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},oe=P.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),pe=P.useCallback(async()=>{try{const H=a?a[e.name]:void 0;let X="";H==null?X="":Array.isArray(H)?X=H.join(", "):typeof H=="object"?X=JSON.stringify(H):X=String(H),await navigator.clipboard.writeText(X),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:L?de():null}),oe&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:pe,size:"small",children:E?l.jsx(os,{fontSize:"small"}):l.jsx(Rh,{fontSize:"small"})})]})};var na,_o;function Gh(){if(_o)return na;_o=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,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),d=new e(s);na={Cache:e,split:f,normalizePath:h,setter:function(v){var j=h(v);return c.get(v)||c.set(v,function(F,C){for(var R=0,B=j.length,_=F;R<B-1;){var I=j[R];if(I==="__proto__"||I==="constructor"||I==="prototype")return F;_=_[j[R++]]}_[j[R]]=C})},getter:function(v,j){var M=h(v);return d.get(v)||d.set(v,function(C){for(var R=0,B=M.length;R<B;)if(C!=null||!j)C=C[M[R++]];else return;return C})},join:function(v){return v.reduce(function(j,M){return j+(y(M)||r.test(M)?"["+M+"]":(j?".":"")+M)},"")},forEach:function(v,j,M){p(Array.isArray(v)?v:f(v),j,M)}};function h(v){return o.get(v)||o.set(v,f(v).map(function(j){return j.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function p(v,j,M){var F=v.length,C,R,B,_;for(R=0;R<F;R++)C=v[R],C&&(S(C)&&(C='"'+C+'"'),_=y(C),B=!_&&/^\d+$/.test(C),j.call(M,C,_,B,R,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!y(v)&&(E(v)||m(v))}return na}var _r=Gh(),ia,Ro;function Qh(){if(Ro)return ia;Ro=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=h=>h.match(e)||[],r=h=>h[0].toUpperCase()+h.slice(1),n=(h,f)=>t(h).join(f).toLowerCase(),i=h=>t(h).reduce((f,p)=>`${f}${f?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return ia={words:t,upperFirst:r,camelCase:i,pascalCase:h=>r(i(h)),snakeCase:h=>n(h,"_"),kebabCase:h=>n(h,"-"),sentenceCase:h=>r(n(h," ")),titleCase:h=>t(h).map(r).join(" ")},ia}var aa=Qh(),Ln={exports:{}},$o;function Zh(){if($o)return Ln.exports;$o=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),c={},d=s,h=r(a),f=n(i);for(a.forEach(function(y){if(!f.has(y[0])||!f.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||p(i[d],d,new Set);return o;function p(y,E,m){if(m.has(y)){var S;try{S=", node was:"+JSON.stringify(y)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!f.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!c[E]){c[E]=!0;var v=h.get(y)||new Set;if(v=Array.from(v),E=v.length){m.add(y);do{var j=v[--E];p(j,f.get(j),m)}while(E);m.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[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 Ln.exports}var Xh=Zh();const Jh=Ya(Xh),em=Object.prototype.toString,tm=Error.prototype.toString,rm=RegExp.prototype.toString,nm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",im=/^Symbol\((.*)\)(.*)$/;function am(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Po(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return am(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return nm.call(e).replace(im,"Symbol($1)");const n=em.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+tm.call(e)+"]":n==="RegExp"?rm.call(e):null}function ur(e,t){let r=Po(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Po(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let gc,yc,vc,sm=/\$\{\s*(\w+)\s*\}/g;gc=Symbol.toStringTag;class Do{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[gc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(lt.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]}}yc=Symbol.hasInstance;vc=Symbol.toStringTag;class lt 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(sm,(i,a)=>ur(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 Do(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[vc]="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,lt)}static[yc](t){return Do[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={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 \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},at={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"},Xt={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},om={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"},lm={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: \`${ur(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: \`${ur(r,!0)}\``}return lt.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:at,number:Xt,date:$a,object:Qn,array:om,boolean:Pa,tuple:lm});const fs=e=>e&&e.__isYupSchema__;class fi{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(c=>c===n);return new fi(t,(o,c)=>{var d;let h=s(...o)?i:a;return(d=h==null?void 0:h(c))!=null?d:c})}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(!fs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(e,t){return new mr(e,t)}class mr{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]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&_r.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}}mr.prototype.__isYupRef=!0;const At=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:d,test:h,params:f,message:p,skipAbsent:y}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(D){return mr.isRef(D)?D.getValue(r,E,m):D}function M(D={}){const L=Object.assign({value:r,originalValue:a,label:s.spec.label,path:D.path||n,spec:s.spec,disableStackTrace:D.disableStackTrace||v},f,D.params);for(const V of Object.keys(L))L[V]=j(L[V]);const $=new lt(lt.formatError(D.message||p,L),r,L.path,D.type||d,L.disableStackTrace);return $.params=L,$}const F=S?o:c;let C={path:n,parent:E,type:d,from:i.from,createError:M,resolve:j,options:i,originalValue:a,schema:s};const R=D=>{lt.isError(D)?F(D):D?c(null):F(M())},B=D=>{lt.isError(D)?F(D):o(D)};if(y&&At(r))return R(!0);let I;try{var u;if(I=h.call(C,r,C),typeof((u=I)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(I).then(R,B)}}catch(D){B(D);return}R(I)}return t.OPTIONS=e,t}function cm(e,t,r,n=r){let i,a,s;return t?(_r.forEach(t,(o,c,d)=>{let h=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",p=d?parseInt(h,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&&p>=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[p],e=f?e.spec.types[p]:e.innerType}if(!d){if(!e.fields||!e.fields[h])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[h],e=e.fields[h]}a=h,s=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi extends Set{describe(){const t=[];for(const r of this.values())t.push(mr.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 mi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(fs(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]=Hr(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,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class mt{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 mi,this._blacklist=new mi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.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=Hr(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&&At(a))return a;let s=ur(t),o=ur(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
175
|
+
`:null,Ah=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${$e(n)}`],svg:["svg"],circle:["circle",`circle${$e(r)}`,i&&"circleDisableShrink"]};return un(a,Th,t)},Oh=xt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${$e(r.color)}`]]}})(Pr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jh||{animation:`${_a} 1.4s linear infinite`}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),_h=xt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Rh=xt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${$e(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Pr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Fh||{animation:`${Ra} 1.4s ease-in-out infinite`}}]}))),ac=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:c,thickness:p=3.6,value:f=0,variant:d="indeterminate",...u}=n,y={...n,color:a,disableShrink:s,size:o,thickness:p,value:f,variant:d},E=Ah(y),m={},S={},v={};if(d==="determinate"){const j=2*Math.PI*((Qt-p)/2);m.strokeDasharray=j.toFixed(3),v["aria-valuenow"]=Math.round(f),m.strokeDashoffset=`${((100-f)/100*j).toFixed(3)}px`,S.transform="rotate(-90deg)"}return l.jsx(Oh,{className:it(E.root,i),style:{width:o,height:o,...S,...c},ownerState:y,ref:r,role:"progressbar",...v,...u,children:l.jsx(_h,{className:E.svg,ownerState:y,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:l.jsx(Rh,{className:E.circle,style:m,ownerState:y,cx:Qt,cy:Qt,r:(Qt-p)/2,fill:"none",strokeWidth:p})})})});process.env.NODE_ENV!=="production"&&(ac.propTypes={classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","primary","secondary","error","info","success","warning"]),k.string]),disableShrink:is(k.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:k.oneOfType([k.number,k.string]),style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),thickness:k.number,value:k.number,variant:k.oneOf(["determinate","indeterminate"])});function $h(e){return mr("MuiIconButton",e)}const Fo=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ph=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:s}=e,o={root:["root",s&&"loading",r&&"disabled",n!=="default"&&`color${$e(n)}`,i&&`edge${$e(i)}`,`size${$e(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,$h,t)},Dh=xt(ic,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${$e(r.color)}`],r.edge&&t[`edge${$e(r.edge)}`],t[`size${$e(r.size)}`]]}})(Pr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Pr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Fo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Fo.loading}`]:{color:"transparent"}}))),Ih=xt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Gn=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:c=!1,disableFocusRipple:p=!1,size:f="medium",id:d,loading:u=null,loadingIndicator:y,...E}=n,m=Xf(d),S=y??l.jsx(ac,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:c,disableFocusRipple:p,loading:u,loadingIndicator:S,size:f},j=Ph(v);return l.jsxs(Dh,{id:u?m:d,className:it(j.root,s),centerRipple:!0,focusRipple:!p,disabled:c||u,ref:r,...E,ownerState:v,children:[typeof u=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(Ih,{className:j.loadingIndicator,ownerState:v,children:u&&S})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:is(k.node,e=>ne.Children.toArray(e.children).some(r=>ne.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
+
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ao=ut(l.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Oo=ut(l.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Mh=ut(l.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ls=ut(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=ut(l.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),zh=ut(l.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),J={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},_o=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Bh=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Lt=(e,t,r)=>{const n=_o(e),i=_o(t);return Bh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},cs=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},Vh=cs(J.primary.main),Nh=cs(J.secondary.main),Ye=cs(J.text.primary),Lh={primary:J.primary.main,secondary:J.secondary.main,textPrimary:J.text.primary,textSecondary:J.text.secondary,divider:J.divider,background:J.background},yt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:p=28,endorsementPaddingX:f="8px",...d})=>{var m,S;const u=!!r,y=a?l.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:f,paddingRight:f,borderRadius:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...d.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(m=d.InputProps)==null?void 0:m.endAdornment]}):(S=d.InputProps)==null?void 0:S.endAdornment};return l.jsxs(x.Box,{children:[u&&l.jsx(x.Typography,{variant:n,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...d,InputProps:E,label:u?void 0:d.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:e?J.error.main:J.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:p,...f})=>{const d=P.useId(),u=c==null||c===""||Array.isArray(c)&&c.length===0,y=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!f.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:s,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:d,shrink:!u||!!o,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}},children:t}),l.jsx(x.Select,{...f,value:c,labelId:t?d:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:E=>{const m=E;if(u)return l.jsx("span",{style:{color:J.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:J.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:J.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:J.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ye[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ye[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:J.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):r.map(E=>l.jsx(x.MenuItem,{value:E.value,sx:{backgroundColor:J.background.paper,color:J.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ye[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ye[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(x.FormHelperText,{children:i})]})},qh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:p,loading:f,error:d,helperText:u,onOpen:y,noOptionsText:E,sx:m})=>l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(qh,{}),disabled:p,loading:f,onOpen:y,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:J.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>l.jsxs(x.Box,{component:"li",...S,sx:{backgroundColor:J.background.paper,color:J.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ye[50]},"&.Mui-focused":{backgroundColor:Ye[50]},...j?{backgroundColor:Ye[50]}:{}},children:[n&&l.jsx(x.Checkbox,{checked:j}),l.jsx(x.Typography,{variant:"body2",sx:{color:J.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:S=>l.jsx(x.TextField,{...S,label:i,placeholder:s,size:"small",error:d,helperText:u,InputLabelProps:{shrink:!!r||!!s,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[f?l.jsx(x.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),oc=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:f=1.5,itemGap:d=1,disabled:u=!1})=>{const y=typeof i=="number"&&i>0,E=y?i:12,m=i===!0,S=i===!1&&!y,v=(j,D)=>{const F=Array.isArray(r)?[...r]:[];D?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(x.FormControl,{error:p,disabled:u,sx:j=>{var D;return{display:"flex",flexDirection:"column",px:j.spacing(f),borderRadius:((D=j.shape)==null?void 0:D.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),y&&l.jsx(x.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(d),mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(d),alignItems:"center",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(d),alignItems:"flex-start",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Sr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:f=1.5,itemGap:d=1})=>l.jsxs(x.FormControl,{error:p,sx:u=>{var y;return{display:"flex",flexDirection:"column",px:u.spacing(f),borderRadius:((y=u.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(d),alignItems:i?"center":"flex-start"}),children:n.map(u=>l.jsx(x.FormControlLabel,{value:u.value,control:l.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]}),us=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(x.Box,{children:[e==="top"&&r&&l.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(x.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),lc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(x.Box,{children:[s&&l.jsx(x.Typography,{variant:t,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:r?J.error.main:J.text.secondary},...n}})]})},cc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=ut(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),uc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function pc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:p,chipText:f,helperText:d,emptyStateText:u,emptyStateButtonText:y="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=P.useState(null),[j,D]=P.useState(null),F=h=>M=>{if(!i){v(h),M.dataTransfer.effectAllowed="move";try{M.dataTransfer.setData("text/plain",String(t(e[h])))}catch{}}},C=h=>M=>{i||(M.preventDefault(),D(h),M.dataTransfer.dropEffect="move")},_=h=>M=>{if(i)return;if(M.preventDefault(),S===null||S===h){v(null),D(null);return}const N=[...e],[G]=N.splice(S,1);N.splice(h,0,G),v(null),D(null),r(N)},I=()=>{v(null),D(null)},R=e.length===0,Y=R&&(u||E!==void 0);return l.jsxs(x.Box,{role:"list",sx:h=>({display:"flex",flexDirection:"column",gap:h.spacing(1),...a}),children:[n,!R&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),Y?l.jsxs(x.Box,{sx:h=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:h.spacing(4),backgroundColor:h.palette.mode==="dark"?"#000000":J.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":J.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[u&&l.jsx(x.Typography,{variant:"body1",sx:h=>({color:h.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:u}),E&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:E,disabled:i,sx:h=>({mt:u?0:2,backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}1A`:`${h.palette.primary.main}0D`,borderColor:h.palette.primary.main,color:h.palette.primary.main,"&:hover":{backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}33`:`${h.palette.primary.main}1A`,borderColor:h.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:y})]}):e.map((h,M)=>{const N=S===M,G=j===M&&S!==null&&S!==M;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:F(M),onDragOver:C(M),onDrop:_(M),onDragEnd:I,sx:B=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${G?B.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:B.spacing(1),opacity:N?.6:1,boxShadow:G?`0 0 0 2px ${B.palette.primary.main}33`:"none"}),children:p?p(h,N):l.jsxs(x.Box,{sx:B=>({display:"flex",alignItems:"center",gap:B.spacing(1),minWidth:0}),children:[c&&l.jsx(uc,{}),o&&l.jsxs(x.Typography,{variant:"body2",sx:B=>({fontWeight:600,fontSize:14,color:`${B.palette.text.primary}`,flex:"0 0 auto"}),children:[M+1,"."]}),(()=>{const B=typeof f=="function"?f(h,M):f;return B?l.jsx(x.Chip,{label:B,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:B=>({fontSize:12,fontWeight:500,color:`${B.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(h):""})]})},String(t(h)))}),!R&&d?typeof d=="string"?l.jsx(x.Typography,{variant:"caption",sx:h=>({color:`${h.palette.text.primary}60`}),children:d}):d:null]})}const Wh=xt(x.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:r}}}),Uh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=_f(),s=a.palette.primary.main,o=a.palette.text.primary,c=a.palette.divider,p=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",f=d=>{const{active:u,completed:y,icon:E}=d;return y?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${s}`,borderRadius:"50%",backgroundColor:s,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${s}`,backgroundColor:Ct(s,.2),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:p,color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Wh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:o,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((d,u)=>{const y=Array.isArray(i)&&i.length>0?i.includes(u):u<t;return l.jsxs(x.Step,{onClick:()=>r==null?void 0:r(u),completed:y,children:[l.jsx(x.StepLabel,{StepIconComponent:f,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:u===t?s:o},children:d.label})}),u!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:c}})]},u)})})},ps=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Ct(t||o.palette.text.primary,.5)}`,backgroundColor:Ct(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Hh=xt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:J.primary.main}})),Kh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=P.useState(null),s=o=>{const{active:c,completed:p,icon:f}=o;return p?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:Ct(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Hh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:s,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?J.primary.main:J.text.primary},children:o.label}),l.jsx(ps,{size:"small",colorHex:c<t?J.success.main:c===t?"#973B00":J.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${J.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},c))})},Yh=ut(l.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Gh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||J.info.main,p=Ct(c,.08),f=Ct(c,.08),d=a??l.jsx(Yh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${f}`,boxShadow:"none",...o},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:d}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${f}`,boxShadow:"none",...o},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${f}`,...o},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:u})},y))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${f}`,boxShadow:"none",...o},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:u})},y))})})},dc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(x.Box,{children:[l.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(x.Tab,{value:c,disabled:s.disabled,label:l.jsx(x.Typography,{variant:"body2",children:s.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,p=s.content??(typeof s.value=="object"?s.value:null);return p&&e===c?l.jsx(x.Box,{sx:{mt:1},children:p},`panel-${c}`):null})]}),Qh=ut(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),fc=({name:e,columns:t,initialRow:r,addLabel:n,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:s=!0,showEmptyState:o=!0,rowDeletable:c=!0,control:p,sx:f,addActions:d,emptyTitle:u="No items configured",emptySubtitle:y="Click 'Add' to get started.",emptyCardSx:E,setValue:m,rowSelectionMode:S,rowSelectionKey:v})=>{const{fields:j,append:D,remove:F}=xu({control:p,name:e}),_=!(typeof i=="number"?j.length>=i:!1),I=P.useMemo(()=>{if(v)return v;const q=t.find(Q=>Q.type==="rowSelect");return q==null?void 0:q.key},[t,v]),R=hl({control:p,name:e})||[],Y=P.useMemo(()=>{if(!I)return{};const q={};return R.forEach((Q,ie)=>{q[ie]=!!(Q!=null&&Q[I])}),q},[R,I]),h=P.useCallback(q=>Y[q]===!0,[Y]),M=P.useCallback((q,Q)=>{if(!m||!I)return;const ie=`${e}.${q}.${I}`;S==="single"&&Q&&R.forEach((pe,$)=>{if($!==q){const L=`${e}.${$}.${I}`;m(L,!1,{shouldDirty:!0})}}),m(ie,Q,{shouldDirty:!0})},[e,I,S,m,R]),N=q=>{const Q={...q||r};t.forEach(ie=>{ie.value!==void 0&&Q[ie.key]===void 0&&(Q[ie.key]=typeof ie.value=="function"?ie.value(Q,j.length):ie.value)}),D(Q)};P.useEffect(()=>{!o&&j.length===0&&_&&N()},[o,j.length,_]);const G=P.useMemo(()=>t.reduce((Q,ie)=>{if(ie.width==="auto"||ie.width===void 0)return Q+120;const pe=typeof ie.width=="number"?ie.width:typeof ie.width=="string"&&parseInt(ie.width)||160;return Q+pe},0)+(c?100:0),[t,c]),B=q=>q.width==="auto"||q.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof q.width=="number"?{width:`${q.width}px`,minWidth:`${q.width}px`,maxWidth:`${q.width}px`}:typeof q.width=="string"?{width:q.width,minWidth:q.width}:{width:"160px",minWidth:"160px"};return l.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...f},children:j.length===0&&o?l.jsxs(x.Box,{sx:q=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Ct(q.palette.primary.main,.4),backgroundColor:Ct(q.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...E}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:q=>({color:q.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:u}),l.jsx(x.Typography,{variant:"body2",sx:q=>({color:q.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:y}),Array.isArray(d)&&d.length>0?d.map((q,Q)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>N(q.template),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:q.label},`empty-add-${Q}`)):n&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>N(),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(d)&&d.length>0?d.map((q,Q)=>l.jsx(x.Button,{variant:Q===0?"contained":"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>N(q.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:Q===0?"#04502d":void 0}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:q.label},`add-${Q}`)):n&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>N(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})}),l.jsx(x.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(x.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${G||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(q=>l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...B(q)},children:q.header},q.key)),c&&l.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(x.TableBody,{children:j.map((q,Q)=>{const ie=h(Q),pe=S&&!ie;return l.jsxs(x.TableRow,{children:[t.map($=>{var ue;const L=`${e}.${Q}.${$.key}`,Z=$.type==="rowSelect"||$.key===I,ce=Z?!1:pe?!0:typeof $.disabled=="function"?$.disabled(q,Q):!!$.disabled;if($.type==="index"){const re=$.indexFormat?$.indexFormat(Q):`#${Q+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ue=$.cellSx)==null?void 0:ue.textAlign)||"center",...B($),...$.cellSx},children:re},$.key)}if($.value!==void 0&&$.editable===!1){const re=typeof $.value=="function"?$.value(q,Q):$.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...B($),...$.cellSx},children:re},$.key)}const fe=$.endorsementText?typeof $.endorsementText=="function"?$.endorsementText(q,Q):$.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...B($),...$.cellSx},children:$.type==="rowSelect"||Z&&$.type==="checkbox"?l.jsx(Oe,{name:L,control:p,defaultValue:!1,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:!1,onChange:H=>{re.onChange(H),M(Q,H)},sx:$.sx})}):$.type==="checkbox"?l.jsx(Oe,{name:L,control:p,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:ce,onChange:re.onChange,sx:$.sx})}):$.type==="select"?l.jsx(Oe,{name:L,control:p,render:({field:re})=>l.jsx($i,{...re,fullWidth:!0,disabled:ce,options:$.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required})}):$.type==="date"?l.jsx(Oe,{name:L,control:p,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(q,Q):$.value:void 0,render:({field:re})=>(P.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&$.value!==void 0){const H=typeof $.value=="function"?$.value(q,Q):$.value;m(L,H,{shouldValidate:!1})}},[L,re.value,$.value,q,Q,m]),l.jsx(us,{...re,fullWidth:!0,disabled:ce,size:"small",placeholder:$.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required}))}):l.jsx(Oe,{name:L,control:p,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(q,Q):$.value:void 0,render:({field:re})=>(P.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&$.value!==void 0){const H=typeof $.value=="function"?$.value(q,Q):$.value;m(L,H,{shouldValidate:!1})}},[L,re.value,$.value,q,Q,m]),l.jsx(yt,{...re,fullWidth:!0,type:$.type==="number"?"number":"text",placeholder:$.placeholder,disabled:ce,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required,endorsementText:fe,endorsementBg:$.endorsementBg,endorsementColor:$.endorsementColor,endorsementRadius:$.endorsementRadius,endorsementHeight:$.endorsementHeight,endorsementPaddingX:$.endorsementPaddingX,inputProps:{...$.type==="number"?{min:$.min,max:$.max,step:$.step}:{minLength:$.minLength,maxLength:$.maxLength,pattern:$.pattern}}}))})},$.key)}),c&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>F(Q),sx:{width:"20px",height:"20px"},children:l.jsx(Qh,{sx:{fontSize:"20px"}})})})]},q.id)})})]})})})]})})},hc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),p=a.leftAction,f=a.rightAction;return l.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&p&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Oe,{name:p.name,control:t,defaultValue:!1,render:({field:d})=>l.jsx(Ht,{label:p.label||"",checked:!!d.value,onChange:d.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&f&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Oe,{name:f.name,control:t,defaultValue:!1,render:({field:d})=>l.jsx(di,{label:f.label,checked:!!d.value,onChange:d.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),mc=ut(l.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"),ta=ut(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Zh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ra=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Xh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,c]=P.useState(e.seasonalMonths||[]),p=u=>{const y=o.includes(u)?o.filter(E=>E!==u):[...o,u];c(y),r(e.id,{seasonalMonths:y})},f=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),d=(()=>{const u=e.min||0,y=e.max||0;return Number.isInteger(y)?y<u?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:J.divider,position:"relative",...s},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(uc,{})}),l.jsx(ps,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:J.error.main,"&:hover":{bgcolor:Ye[50]}},size:"small",children:l.jsx(mc,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:Zh,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:J.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(yt,{type:"number",value:e.priority||5,onChange:u=>{const y=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,y))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const y=parseInt(u.target.value)||0;r(e.id,{min:y,...e.lockLength?{max:y}:{}})},inputProps:{min:0},disabled:a,error:!!f,helperText:f||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!d&&!e.lockLength,helperText:e.lockLength?"Locked to Min":d||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:J.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:J.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(Sr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(yt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(yt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:J.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(yt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(yt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>l.jsx(x.Chip,{label:u,size:"small",onClick:()=>!a&&p(u),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(u)?J.primary.main:"transparent",color:o.includes(u)?J.primary.contrastText:J.text.primary,border:`1px solid ${J.divider}`,"&:hover":{bgcolor:o.includes(u)?Ye[600]:Ye[50]}}},u))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:J.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:J.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(yt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:J.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:J.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function xc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:p={},body:f,transform:d,passThroughFields:u}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;y=y.replace(F,(C,_)=>{const I=n[_];return I!=null?encodeURIComponent(String(I)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(p).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(y+=`${y.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(y),C=new URL(y,F?void 0:"http://local.placeholder"),_=Array.from(C.searchParams.entries());for(const[I,R]of _)(R===""||R==="undefined"||R==="null")&&C.searchParams.delete(I);F?y=C.toString():y=C.pathname+(C.search?C.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&f&&(S.body=JSON.stringify(f));const v=await fetch(y,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(d)return d(Array.isArray(j)?j:j.data||j);const D=Array.isArray(j)?j:j.data||j;if(!Array.isArray(D))throw new Error("API response is not an array");return D.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},_=Array.isArray(u)?u:void 0;if(Array.isArray(_))for(const I of _)F[I]!==void 0&&(C[I]=F[I]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function gc(e,t,r,n,i=!1){const a=P.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=P.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return tp({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return xc(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 yr(e){return!!(e.apiConfig||e.api_endpoint)}function ds(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 Jh(e,t){const r=ds(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 fs=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[p,f]=P.useState(!1),d=P.useRef(!1),[u,y]=P.useState(!1),[E,m]=P.useState(!1),[S,v]=P.useState(!1),j=P.useRef(null),D=P.useRef(null),F=()=>{var ae;const H=e.required;if(typeof H=="function")try{return!!H(a||{})}catch{return!1}if(H!==void 0)return!!H;const ee=(ae=e.validation)==null?void 0:ae.required;if(typeof ee=="function")try{return!!ee(a||{})}catch{return!1}return ee!==void 0?!!ee:!1},C=H=>F()?`${H} *`:H,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},I=P.useRef(void 0);P.useEffect(()=>{const H=e.value;if(typeof H!="function"||!s)return;let ee;try{ee=H(a||{})}catch{return}const ae=a?a[e.name]:void 0;if(I.current===void 0&&(I.current=ee),ae===void 0||ae===I.current)try{s(e.name,ee,{shouldValidate:!0,shouldDirty:!1}),I.current=ee}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((H,ee)=>({...H,[ee]:a[ee]}),{}):a||{}),e.name]);const R=P.useMemo(()=>{const H=ds(e);return H&&Array.isArray(e.passThroughFields)&&(H.passThroughFields=e.passThroughFields),H},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),Y=P.useRef(null),h=R!=null&&R.dependsOn?a==null?void 0:a[R.dependsOn]:null,M=P.useMemo(()=>{if(!(R!=null&&R.dependsOn))return!1;const H=h,ee=Y.current,ae=H!==ee;return ae&&(Y.current=H),ae},[R==null?void 0:R.dependsOn,h]),N=P.useMemo(()=>{const H=e.showWhen;if(typeof H=="function")try{return!!H(a||{})}catch{return!0}if(H&&typeof H=="object"){const ee=H.field,ae=H.equals,oe=H.in,le=ee?(a||{})[ee]:void 0;if(ee&&typeof ae<"u")return le===ae;if(ee&&Array.isArray(oe))return oe.includes(le)}return!0},[e.showWhen,a]),G=P.useCallback(()=>{const H=e.dynamicEndorsement;if(typeof H=="function")try{return H(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),B=P.useCallback(()=>{const H=e.endAdornment,ee=e.endAdornmentSwitch,ae=e.endAdornmentCheckbox;if(ee)return l.jsx(Oe,{name:ee,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>l.jsx(x.Switch,{checked:oe.value||!1,onChange:le=>{oe.onChange(le.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(le.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(ae)return l.jsx(Oe,{name:ae,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>l.jsx(Ht,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof H=="function")try{return H(a||{},{control:t,setValue:s})}catch{return}return H},[e,a,t,s]),q=P.useMemo(()=>p&&yr(e)&&(!(R!=null&&R.dependsOn)||h),[p,e,R==null?void 0:R.dependsOn,h]),Q=P.useMemo(()=>{const H={};if(!a)return H;const ee=(R==null?void 0:R.endpoint)||(e==null?void 0:e.api_endpoint);if(ee&&typeof ee=="string"){const ae=ee.match(/\{([^}]+)\}/g)||[];for(const oe of ae){const le=oe.slice(1,-1),ge=a[le];ge!==void 0&&(H[le]=ge)}}if(R!=null&&R.dependsOn){const ae=R.dependsOn,oe=a[ae];oe!==void 0&&(H[ae]=oe)}return H},[R==null?void 0:R.endpoint,e==null?void 0:e.api_endpoint,R==null?void 0:R.dependsOn,a]),{data:ie=[],isLoading:pe,error:$}=gc(R,n,i,Q,q),L=P.useCallback(()=>{yr(e)&&!d.current&&(d.current=!0,f(!0))},[e]),Z=P.useCallback(()=>{yr(e)&&!d.current&&(d.current=!0,f(!0))},[e]);P.useEffect(()=>{if(yr(e)&&!d.current){const H=a==null?void 0:a[e.name];H!=null&&H!==""&&(d.current=!0,f(!0))}},[e,a]),P.useEffect(()=>{yr(e)&&(R!=null&&R.dependsOn)&&M&&d.current&&(d.current=!1,f(!1))},[M,R==null?void 0:R.dependsOn]);const ce=P.useCallback(()=>yr(e)?ie:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,ie]),fe=()=>{var H,ee,ae,oe,le,ge;switch(e.type){case"title":return l.jsx(x.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 l.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const X=e.actionName,Pe=e.actionComponent,qe=e.actionLabel,Ge=T=>l.jsx(cc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),kt=T=>{if(e.cardWrap){const z={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:z,...e.cardProps,children:T})}return T};return kt(X&&Pe?l.jsx(Oe,{name:X,control:t,defaultValue:e.value??!1,render:({field:T})=>Ge(Pe==="switch"?l.jsx(di,{label:qe,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:qe||"",checked:!!T.value,onChange:T.onChange}))}):Ge());case"tabs":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((ee=(H=e.items)==null?void 0:H[0])==null?void 0:ee.value)=="string"||typeof((oe=(ae=e.items)==null?void 0:ae[0])==null?void 0:oe.value)=="number"?(ge=(le=e.items)==null?void 0:le[0])==null?void 0:ge.value:0),render:({field:T})=>{const g=e.items||[],z=g.map((K,U)=>({label:K.label,value:typeof K.value=="string"||typeof K.value=="number"?K.value:U,content:K.content,disabled:K.disabled})),b=T.value,O=(()=>{if(typeof b=="string"||typeof b=="number"){const K=g.findIndex((U,de)=>typeof U.value=="string"||typeof U.value=="number"?U.value===b:de===b);return K>=0?K:0}return Number(b)||0})(),W=g[O]||{};return l.jsxs(x.Box,{children:[l.jsx(dc,{value:T.value,onChange:T.onChange,items:z,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(W.fields)&&W.fields.length>0&&(()=>{const K=W.fields,U=[];let de=[];for(const Ce of K)Ce.type==="section"&&de.length>0?(U.push(de),de=[Ce]):de.push(Ce);de.length>0&&U.push(de);const ve={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(x.Box,{sx:{mt:1},children:U.map((Ce,De)=>{const Be=Ce.find(Je=>Je.type==="section"),Xe=(Be==null?void 0:Be.cardWrap)!==!1,Ot=l.jsx(l.Fragment,{children:Ce.map(Je=>{const We=Je.showWhen;if(We)try{if(typeof We=="function"){if(!We(a||{}))return null}else if(typeof We=="object"){const Yt=We.field,gs=We.equals,ys=We.in,vs=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof gs<"u"&&vs!==gs||Yt&&Array.isArray(ys)&&!ys.includes(vs))return null}}catch{}const pt=Math.min(Math.max(Je.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${pt}`},children:l.jsx(fs,{field:Je,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Je.name)})});return Xe?l.jsx(x.Card,{sx:{...ve,...(Be==null?void 0:Be.cardSx)||{}},...(Be==null?void 0:Be.cardProps)||{},children:Ot},`tab-group-${De}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ot},`tab-group-${De}`)})})})()]})}});case"grid":const Ue=e.defaultRows||[];return l.jsx(x.Box,{children:l.jsx(Oe,{name:e.name,control:t,defaultValue:Ue.length>0?Ue:_()||[],render:()=>l.jsx(fc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})})});case"listcards":return l.jsx(hc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const g=e,z=T.value||g.items||[],b=typeof g.getId=="function"?g.getId:typeof g.getId=="string"?K=>K[g.getId]:K=>K.id??K._id??K.key??String(K),O=typeof g.getText=="function"?g.getText:typeof g.getText=="string"?K=>K[g.getText]??String(K):K=>K.text??K.label??K.name??K.title??String(K),W=(()=>{if(typeof g.chipText=="function")return g.chipText;if(typeof g.chipText=="string")return z.length>0&&z[0]&&g.chipText in z[0]?(K,U)=>K[g.chipText]??void 0:g.chipText})();return l.jsx(pc,{items:z,getId:b,onReorder:K=>{T.onChange(K)},header:g.header,disabled:e.disabled,sx:g.sx,chipText:W,helperText:g.helperText||(c?o==null?void 0:o.message:void 0),getText:O,showIndex:g.showIndex!==!1,showLeftIcon:g.showLeftIcon!==!1,renderItem:g.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>e.type==="textarea"?l.jsx(lc,{...T,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:B(),endorsementText:G(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(ec,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>y(g=>!g),edge:"end",children:u?l.jsx(Oo,{}):l.jsx(Ao,{})})})}:void 0})});case"number":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:B(),endorsementText:G(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const Ze=ce();return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx($i,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:T.value,onChange:T.onChange,options:Ze,disabled:e.disabled||pe,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:pe,error:c||!!$,helperText:(o==null?void 0:o.message)||($==null?void 0:$.message)||e.helperText,onOpen:L})});case"checkbox":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_()||[],render:({field:T})=>l.jsx(oc,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const He=ce(),w=!!(e.disabled||pe||R!=null&&R.dependsOn&&!h);return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const g=T.value,z=e.multiple===!0,b=(R==null?void 0:R.valueField)||e.value_field||"value",O=(R==null?void 0:R.labelField)||e.label_field||"label",W=U=>{if(U!=null){if(typeof U=="string"||typeof U=="number")return U;if(typeof U=="object"){if(U[b]!==void 0)return U[b];if(U.value!==void 0)return U.value;if(U.id!==void 0)return U.id}}},K=(()=>{if(z)return(Array.isArray(g)?g:[]).map(de=>{const ve=He.find(Ce=>{const De=W(Ce);return De!==void 0&&De===de});return ve||{[b]:de,[O]:`Selected: ${de}`,value:de,label:`Selected: ${de}`}});{if(g==null||g==="")return null;const U=He.find(de=>{const ve=W(de);return ve!==void 0&&ve===g});return U||{[b]:g,[O]:`Selected: ${g}`,value:g,label:`Selected: ${g}`}}})();return l.jsx(sc,{id:e.id,options:He,value:K,multiple:z,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:pe,error:c||!!$,helperText:(o==null?void 0:o.message)||($==null?void 0:$.message)||e.helperText||"",onOpen:Z,noOptionsText:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:pe?"Fetching data...":p&&!pe&&He.length===0?"No options available":"Click to load options",onChange:U=>{const de=(R==null?void 0:R.valueField)||e.value_field||"value";if(z){const Ce=(Array.isArray(U)?U:[]).map(De=>typeof De=="object"&&(De[de]||De.value||De.id)||De);T.onChange(Ce)}else{let ve;U&&typeof U=="object"?ve=U[de]||U.value||U.id||U:ve=U,T.onChange(ve);const Ce=e.selectedAssignments;if(Ce&&U&&typeof U=="object")for(const[De,Be]of Object.entries(Ce)){const Xe=U[Be];if(Xe!==void 0&&typeof s=="function")try{s(De,Xe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(us,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Oe,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const g=T.value||e.defaultValue||e.src;if(g){const U=e.imageUploaded||{},de=U.previewText||"Preview",ve=U.removeText||"Remove",Ce=U.saveText||"Save logo",De=U.showSave!==void 0?U.showSave:!!(e.onSave||U.saveText),Be=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(g)}catch{}},Xe=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ot=()=>{typeof e.onSave=="function"&&e.onSave({url:g,file:D.current||void 0})},Je=We=>{const pt=We.target.files&&We.target.files[0];if(pt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(pt)}catch{}try{const Yt=URL.createObjectURL(pt);T.onChange(Yt)}catch{}D.current=pt,v(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...U.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Je}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...U.thumbnailSx},children:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...U.fileNameSx},children:typeof g=="string"?g.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...U.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...U.previewButtonSx},variant:"outlined",onClick:Be,startIcon:l.jsx(Ao,{}),children:de}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Xe,sx:{...U.removeButtonSx},startIcon:l.jsx(Oo,{}),children:ve}),De&&l.jsx(x.Button,{variant:"contained",onClick:Ot,sx:{...U.saveButtonSx},children:Ce})]})]}),l.jsxs(x.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:U.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var We;return(We=j.current)==null?void 0:We.click()},children:U.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:U.closeText||"Close"})]})]})]})}const z=e.imagePlaceholder||{},b=z.icon||"upload",O=j,W=()=>{var U;try{(U=O.current)==null||U.click()}catch{}},K=U=>{const de=U.target.files&&U.target.files[0];if(de){typeof e.onFileSelected=="function"&&e.onFileSelected(de);try{const ve=URL.createObjectURL(de);T.onChange(ve)}catch{}D.current=de}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...z.sx},children:[l.jsx("input",{type:"file",ref:O,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:K}),l.jsx(Gn,{sx:{borderRadius:"8px",...z.iconSx},children:b==="image"?l.jsx(zh,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...z.titleSx},children:z.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...z.subtitleSx},children:z.subtitle||""}),l.jsx(x.Button,{onClick:W,sx:{my:2,...z.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:z.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...z.helperTextSx},children:z.helperText||e.helperText||""})]})}});case"component":return l.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},ue=P.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),re=P.useCallback(async()=>{try{const H=a?a[e.name]:void 0;let ee="";H==null?ee="":Array.isArray(H)?ee=H.join(", "):typeof H=="object"?ee=JSON.stringify(H):ee=String(H),await navigator.clipboard.writeText(ee),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:N?fe():null}),ue&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:re,size:"small",children:E?l.jsx(ls,{fontSize:"small"}):l.jsx(Mh,{fontSize:"small"})})]})};var na,Ro;function em(){if(Ro)return na;Ro=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,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),p=new e(s);na={Cache:e,split:d,normalizePath:f,setter:function(v){var j=f(v);return c.get(v)||c.set(v,function(F,C){for(var _=0,I=j.length,R=F;_<I-1;){var Y=j[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[j[_++]]}R[j[_]]=C})},getter:function(v,j){var D=f(v);return p.get(v)||p.set(v,function(C){for(var _=0,I=D.length;_<I;)if(C!=null||!j)C=C[D[_++]];else return;return C})},join:function(v){return v.reduce(function(j,D){return j+(y(D)||r.test(D)?"["+D+"]":(j?".":"")+D)},"")},forEach:function(v,j,D){u(Array.isArray(v)?v:d(v),j,D)}};function f(v){return o.get(v)||o.set(v,d(v).map(function(j){return j.replace(a,"$2")}))}function d(v){return v.match(t)||[""]}function u(v,j,D){var F=v.length,C,_,I,R;for(_=0;_<F;_++)C=v[_],C&&(S(C)&&(C='"'+C+'"'),R=y(C),I=!R&&/^\d+$/.test(C),j.call(D,C,R,I,_,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!y(v)&&(E(v)||m(v))}return na}var Rr=em(),ia,$o;function tm(){if($o)return ia;$o=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=f=>f.match(e)||[],r=f=>f[0].toUpperCase()+f.slice(1),n=(f,d)=>t(f).join(d).toLowerCase(),i=f=>t(f).reduce((d,u)=>`${d}${d?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return ia={words:t,upperFirst:r,camelCase:i,pascalCase:f=>r(i(f)),snakeCase:f=>n(f,"_"),kebabCase:f=>n(f,"-"),sentenceCase:f=>r(n(f," ")),titleCase:f=>t(f).map(r).join(" ")},ia}var aa=tm(),Ln={exports:{}},Po;function rm(){if(Po)return Ln.exports;Po=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),c={},p=s,f=r(a),d=n(i);for(a.forEach(function(y){if(!d.has(y[0])||!d.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)c[p]||u(i[p],p,new Set);return o;function u(y,E,m){if(m.has(y)){var S;try{S=", node was:"+JSON.stringify(y)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!d.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!c[E]){c[E]=!0;var v=f.get(y)||new Set;if(v=Array.from(v),E=v.length){m.add(y);do{var j=v[--E];u(j,d.get(j),m)}while(E);m.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[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 Ln.exports}var nm=rm();const im=Ya(nm),am=Object.prototype.toString,sm=Error.prototype.toString,om=RegExp.prototype.toString,lm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",cm=/^Symbol\((.*)\)(.*)$/;function um(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Do(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return um(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lm.call(e).replace(cm,"Symbol($1)");const n=am.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+sm.call(e)+"]":n==="RegExp"?om.call(e):null}function ur(e,t){let r=Do(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Do(this[n],t);return a!==null?a:i},2)}function yc(e){return e==null?[]:[].concat(e)}let vc,bc,wc,pm=/\$\{\s*(\w+)\s*\}/g;vc=Symbol.toStringTag;class Io{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[vc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],yc(t).forEach(a=>{if(lt.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]}}bc=Symbol.hasInstance;wc=Symbol.toStringTag;class lt 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(pm,(i,a)=>ur(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 Io(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[wc]="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,lt)}static[bc](t){return Io[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={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 \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},at={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"},Xt={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},dm={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"},fm={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: \`${ur(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: \`${ur(r,!0)}\``}return lt.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:at,number:Xt,date:$a,object:Qn,array:dm,boolean:Pa,tuple:fm});const hs=e=>e&&e.__isYupSchema__;class fi{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(c=>c===n);return new fi(t,(o,c)=>{var p;let f=s(...o)?i:a;return(p=f==null?void 0:f(c))!=null?p:c})}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(!hs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(e,t){return new xr(e,t)}class xr{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]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Rr.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}}xr.prototype.__isYupRef=!0;const At=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:p,test:f,params:d,message:u,skipAbsent:y}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(M){return xr.isRef(M)?M.getValue(r,E,m):M}function D(M={}){const N=Object.assign({value:r,originalValue:a,label:s.spec.label,path:M.path||n,spec:s.spec,disableStackTrace:M.disableStackTrace||v},d,M.params);for(const B of Object.keys(N))N[B]=j(N[B]);const G=new lt(lt.formatError(M.message||u,N),r,N.path,M.type||p,N.disableStackTrace);return G.params=N,G}const F=S?o:c;let C={path:n,parent:E,type:p,from:i.from,createError:D,resolve:j,options:i,originalValue:a,schema:s};const _=M=>{lt.isError(M)?F(M):M?c(null):F(D())},I=M=>{lt.isError(M)?F(M):o(M)};if(y&&At(r))return _(!0);let Y;try{var h;if(Y=f.call(C,r,C),typeof((h=Y)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(_,I)}}catch(M){I(M);return}_(Y)}return t.OPTIONS=e,t}function hm(e,t,r,n=r){let i,a,s;return t?(Rr.forEach(t,(o,c,p)=>{let f=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",u=p?parseInt(f,10):0;if(e.innerType||d){if(d&&!p)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&&u>=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[u],e=d?e.spec.types[u]:e.innerType}if(!p){if(!e.fields||!e.fields[f])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[f],e=e.fields[f]}a=f,s=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi extends Set{describe(){const t=[];for(const r of this.values())t.push(xr.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 mi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(hs(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]=Hr(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,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class mt{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 mi,this._blacklist=new mi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.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=Hr(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&&At(a))return a;let s=ur(t),o=ur(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
177
177
|
|
|
178
178
|
attempted value: ${s}
|
|
179
|
-
`+(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,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:a,value:c,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return i(h,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:d}=t,h=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},p=a.length,y=[];if(!p)return f([]);let E={value:s,originalValue:o,path:c,options:d,schema:this};for(let m=0;m<a.length;m++){const S=a[m];S(E,h,function(j){j&&(Array.isArray(j)?y.push(...j):y.push(j)),--p<=0&&f(y)})}}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 c=typeof o=="number";let d=n[o];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,p,y)=>this.resolve(h)._validate(d,h,p,y)}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,(c,d)=>{lt.isError(c)&&(c.value=d),o(c)},(c,d)=>{c.length?o(new lt(c,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,c)=>{throw lt.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new lt(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(lt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(lt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Hr(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=Wr({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=Wr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.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=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Wr(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=xc(t).map(a=>new mr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Wr({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=$t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Wr({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=$t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Wr({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(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,h)=>h.findIndex(f=>f.name===c.name)===d)}}}mt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])mt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=cm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])mt.prototype[e]=mt.prototype.oneOf;for(const e of["not","nope"])mt.prototype[e]=mt.prototype.notOneOf;const um=()=>!0;function bc(e){return new wc(e)}class wc extends mt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:um},t))}}bc.prototype=wc.prototype;function Sc(){return new Cc}class Cc extends mt{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=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return At(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return At(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)}}Sc.prototype=Cc.prototype;const pm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function dm(e){const t=Da(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 Da(e){var t,r;const n=pm.exec(e);return n?{year:qt(n[1]),month:qt(n[2],1)-1,day:qt(n[3],1),hour:qt(n[4]),minute:qt(n[5]),second:qt(n[6]),millisecond:n[7]?qt(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:qt(n[10]),minuteOffset:qt(n[11])}:null}function qt(e,t=0){return Number(e)||t}let fm=/^[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])?)*$/,hm=/^((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,mm=/^(?:[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,xm="^\\d{4}-\\d{2}-\\d{2}",gm="\\d{2}:\\d{2}:\\d{2}",ym="(([+-]\\d{2}(:?\\d{2})?)|Z)",vm=new RegExp(`${xm}T${gm}(\\.\\d+)?${ym}$`),bm=e=>At(e)||e===e.trim(),wm={}.toString();function vn(){return new Ec}class Ec extends mt{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===wm?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.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=at.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=at.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=at.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||at.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=at.email){return this.matches(fm,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(hm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(mm,{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(vm,{name:"datetime",message:r||at.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||at.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||at.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=at.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:bm})}lowercase(t=at.lowercase){return this.transform(r=>At(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toLowerCase()})}uppercase(t=at.uppercase){return this.transform(r=>At(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toUpperCase()})}}vn.prototype=Ec.prototype;let Sm=e=>e!=+e;function kc(){return new Tc}class Tc extends mt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Sm(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=Xt.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=Xt.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=Xt.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=Xt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Xt.positive){return this.moreThan(0,t)}negative(t=Xt.negative){return this.lessThan(0,t)}integer(t=Xt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>At(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=>At(i)?i:Math[t](i))}}kc.prototype=Tc.prototype;let jc=new Date(""),Cm=e=>Object.prototype.toString.call(e)==="[object Date]";function hs(){return new Pn}class Pn extends mt{constructor(){super({type:"date",check(t){return Cm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=dm(t),isNaN(t)?Pn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(mr.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=$a.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=$a.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)}})}}Pn.INVALID_DATE=jc;hs.prototype=Pn.prototype;hs.INVALID_DATE=jc;function Em(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=_r.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),mr.isRef(o)&&o.isSibling?a(o.path,s):fs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return Jh.array(Array.from(n),r).reverse()}function Io(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 Fc(e){return(t,r)=>Io(e,t)-Io(e,r)}const km=(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 Zn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Zn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zn)}):"optional"in e?e.optional():e}const Tm=(e,t)=>{const r=[..._r.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=_r.getter(_r.join(r),!0)(e);return!!(i&&n in i)};let Mo=e=>Object.prototype.toString.call(e)==="[object Object]";function zo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const jm=Fc([]);function Ac(e){return new Oc(e)}class Oc extends mt{constructor(t){super({type:"object",check(r){return Mo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=jm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),c={},d=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),h=!1;for(const f of o){let p=a[f],y=f in i;if(p){let E,m=i[f];d.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:m,context:r.context,parent:c});let S=p instanceof mt?p.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){h=h||f in i;continue}E=!r.__validating||!v?p.cast(i[f],d):i[f],E!==void 0&&(c[f]=E)}else y&&!s&&(c[f]=i[f]);(y!==f in c||c[f]!==i[f])&&(h=!0)}return h?c: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,(c,d)=>{if(!o||!Mo(d)){i(c,d);return}s=s||d;let h=[];for(let f of this._nodes){let p=this.fields[f];!p||mr.isRef(p)||h.push(p.asNestedTest({options:r,key:f,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:h,value:d,originalValue:s,options:r},n,f=>{i(f.sort(this._sortErrors).concat(c),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=Em(t,r),n._sortErrors=Fc(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 Zn(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=_r.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return Tm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(km)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=zo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=zo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.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}}Ac.prototype=Oc.prototype;const _c=e=>{const t={};return e.forEach(r=>{var s,o,c;let n;switch(r.type){case"text":case"textarea":case"tel":n=vn(),r.validation?n=xr(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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.message)||`${r.label} must be a valid email address`),r.validation&&(n=xr(n,r,"string"));break;case"password":n=vn(),r.validation?n=xr(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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"number":if(n=kc().transform((d,h)=>h===""||h===null?void 0:d).nullable().typeError(`${r.label} must be a number`),r.validation)n=xr(n,r,"number");else{if(r.min!==void 0){const d=typeof r.min=="object"&&r.min!==null&&"field"in r.min,h=d?hi(r.min.field):r.min,f=d&&r.min.message?r.min.message:`${r.label} must be at least ${d?"the minimum value":r.min}`;n=n.min(h,f)}if(r.max!==void 0){const d=typeof r.max=="object"&&r.max!==null&&"field"in r.max,h=d?hi(r.max.field):r.max,f=d&&r.max.message?r.max.message:`${r.label} must be at most ${d?"the maximum value":r.max}`;n=n.max(h,f)}}break;case"select":n=vn(),r.validation&&(n=xr(n,r,"string"));break;case"checkbox":n=Sc(),r.validation&&(n=xr(n,r,"boolean"));break;case"date":n=hs().typeError(`${r.label} must be a valid date`),r.validation?n=xr(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=bc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const d=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(d)}t[r.name]=n}),Ac().shape(t)},xr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=hi(i.min.field),s=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,s)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=hi(i.max.field),s=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,s)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,s=i.message||`${t.label} format is invalid`;e=e.test("pattern",s,o=>o?a.test(o):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const s=this.parent||{},o=i.custom(a,s);return typeof o=="boolean"?o:!1})),e},Rc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=P.useMemo(()=>Array.from({length:t},(h,f)=>f+1),[t]),o=P.useMemo(()=>Math.round(e/t*100),[e,t]),c=h=>n[h-1]||`Step ${h}`,d=h=>h===e||a.includes(h)||h===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((h,f)=>{const p=h===e,y=h<e||a.includes(h),E=p||y?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>d(h)&&r(h),sx:{display:"flex",alignItems:"center",cursor:d(h)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:p||y?"2px solid":"1px solid",borderColor:p||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>p||y?Ct(m.palette.primary.main,.2):"transparent",mr:.5,color:E,fontWeight:p||y?600:500,fontSize:"12px"},children:h}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:E},children:c(h)})]}),f<s.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:h<e?"primary.main":"#DFE3E8"}})]},h)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:h=>h.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},$c=({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,c)=>{const d=(o.text||"").toLowerCase(),h=o.type==="submit"||d.includes("submit")||d.includes("save")||d.includes("next"),f=o.position==="left"||d.includes("cancel")||d.includes("back")||d.includes("draft"),p=o.type?o.type:h?"submit":"button",y=f?"outlined":"contained",E=o.disabled||t,m=S=>S&&["primary","secondary","error","info","success","warning"].includes(S)?S:"primary";return l.jsxs(x.Button,{type:p,variant:y,color:m(o.color),size:o.size||"large",disabled:E,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},Fm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:d="horizontal",spacing:h=2,sx:f}=e,p=v=>{let j="button",M="contained";return v.type?j=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?j="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(j="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(M="outlined"),{buttonType:j,buttonVariant:M}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",E=v=>{const{buttonType:j}=p(v);v.onClick?v.onClick():j==="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))},m=(v,j)=>{const{buttonType:M,buttonVariant:F}=p(v),C=y(v.color);return l.jsx(x.Button,{type:M,variant:F,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>E(v),sx:v.sx,children:v.text},j)},S=()=>{const v={display:"flex",gap:h,...f};switch(c){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 d==="vertical"?l.jsx(x.Box,{sx:S(),children:o.map((v,j)=>l.jsx(x.Box,{sx:{width:"100%"},children:m(v,j)},j))}):l.jsx(x.Box,{sx:S(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,j)=>m(v,j))})})},Pc=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Pc(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((d,h)=>typeof d.value=="string"||typeof d.value=="number"?d.value===a:h===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Am=new Iu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Om=e=>l.jsx(Nu,{client:Am,children:l.jsx(_m,{...e})}),_m=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:d,buttonGroup:h,stickyButtons:f,stickyButtonsSx:p,fixedButtons:y,fixedButtonsSx:E,formCardWrap:m,formCardSx:S,formCardProps:v,baseUrl:j,apiHeaders:M,stepNavigationProps:F})=>{var w,T;const C=[...new Set(r.map(g=>g.step).filter(g=>g!=null&&g>0))].sort((g,z)=>(g||0)-(z||0)),R=C.length>1,B=C.length||1,[_,I]=P.useState(1),u=R?r.filter(g=>g.step===_):r,D=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...D(O.fields));return z},[]),{control:L,handleSubmit:$,formState:{errors:V},watch:ee,setValue:ie,resetField:he,trigger:le}=mu({resolver:P.useCallback((g,z,b)=>{const q=Xn(R?u:r,g),K=_c(q);return yu(K)(g,z,b)},[R,u,r]),mode:"onChange",defaultValues:o}),Y=ee(),U=P.useRef({});P.useEffect(()=>{const g=[];for(const z of r){const b=z.depends_on;b&&typeof z.name=="string"&&g.push({dependentField:z.name,dependencyName:b})}if(g.length!==0)for(const{dependentField:z,dependencyName:b}of g){const O=U.current[b],q=Y==null?void 0:Y[b];if(O!==q)try{he(z)}catch{}U.current[b]=q}},[r,Y,he]);const Z=P.useRef(i);P.useEffect(()=>{Z.current=i},[i]);const ce=P.useMemo(()=>{try{return JSON.stringify(Y)}catch{return String(Date.now())}},[Y]),de=P.useRef(null);P.useEffect(()=>{Z.current&&de.current!==ce&&(de.current=ce,Z.current(Y))},[ce]);const oe=async()=>{if(!R)return!0;const g=r.filter(b=>b.step===_);for(const b of g)if(typeof b.required=="function"?!!b.required(Y):!!b.required){const q=Y[b.name];let K=!0;if(b.type==="checkbox"?K=q===!0:Array.isArray(q)?K=q.length>0:K=q!=null&&q!=="",!K)return!1}return await le()?!0:Object.keys(V).filter(O=>g.some(q=>q.name===O)).map(O=>{const q=V[O];return typeof(q==null?void 0:q.message)=="string"?q.message:`${O} is invalid`}).length===0},pe=P.useMemo(()=>{if(!R)return!0;const g=r.filter(b=>b.step===_);for(const b of g)if(typeof b.required=="function"?!!b.required(Y):!!b.required){const q=Y[b.name];let K=!0;if(b.type==="checkbox"?K=q===!0:Array.isArray(q)?K=q.length>0:K=q!=null&&q!=="",!K)return!1}return Object.keys(V).filter(b=>g.some(O=>O.name===b)).length===0},[R,_,r,Y,V]),H=P.useCallback((g,z)=>Pc(g,z),[]),X=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...X(O.fields));return z},[]),te=P.useCallback((g,z)=>Xn(g,z),[]),ae=P.useMemo(()=>{if(R)return pe;const g=Xn(r,Y);for(const O of g){if(!H(O,Y))continue;if(typeof O.required=="function"?!!O.required(Y):!!O.required){const K=Y[O.name];let W=!0;if(O.type==="checkbox"?W=K===!0:W=K!=null&&K!==""&&!(Array.isArray(K)&&K.length===0),!W)return!1}}const z=new Set(g.map(O=>O.name));return Object.keys(V).filter(O=>z.has(O)).length===0},[R,pe,r,Y,V,te,H]),se=async g=>{g<1||g>B||g>_&&R&&!await oe()||I(g)},ge=async g=>{if(R&&_<B){console.warn("Form submission attempted on non-final step");return}s&&s(g),n(g)},Q=async g=>{g&&(g.preventDefault(),g.stopPropagation()),R&&_<B&&await oe()&&se(_+1)},Pe=g=>{g&&(g.preventDefault(),g.stopPropagation()),R&&_>1&&se(_-1)},qe=g=>g.col?g.col:(g.xs||g.sm||g.md||g.lg||g.xl)&&(g.xs||g.sm||g.md||g.lg||g.xl)||12,Ge=t?x.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:((w=t.typography)==null?void 0:w.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((T=t.typography)==null?void 0:T.fontSize)=="number"?t.typography.fontSize:14}}):void 0,kt=()=>{const g=y?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...E}:f?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...p}:void 0;if(h&&h.buttons&&h.buttons.length>0){const z={...h,buttons:h.buttons.map(b=>{const O=(b.text||"").toLowerCase(),q=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let W=!1;return R?(q||K)&&(W=!pe):q&&(W=!ae),{...b,disabled:b.disabled||W}})};return l.jsx(x.Box,{sx:{mt:3,...g||{}},children:l.jsx(Fm,{config:z,onSubmit:ge,onStepChange:se,currentStep:_,totalSteps:B,isMultiStep:R,formData:Y})})}if(d&&d.length>0){const z=d.map(b=>{const O=(b.text||"").toLowerCase(),q=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let W=!1;return R?(q||K)&&(W=!pe):q&&(W=!ae),{...b,disabled:b.disabled||W}});return l.jsx(x.Box,{sx:g,children:l.jsx($c,{buttons:z})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...g||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[R&&_>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Pe,children:"Previous"}),R?_<B?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!pe,onClick:Q,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!pe,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ae,children:a})]})}):null},Ue=P.useMemo(()=>{const g=[];let z=[];for(const b of u)b.type==="section"&&z.length>0?(g.push(z),z=[b]):z.push(b);return z.length>0&&g.push(z),g},[u]),Ze=l.jsxs(x.Box,{component:"form",onSubmit:g=>{if(R&&_<B){g.preventDefault(),g.stopPropagation(),pe&&Q();return}$(ge)(g)},id:e,onKeyDown:g=>{g.key==="Enter"&&R&&_<B&&(g.preventDefault(),pe&&Q())},sx:{pb:y?10:void 0},children:[R&&l.jsx(Rc,{currentStep:_,totalSteps:B,onStepChange:se,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ue.map((g,z)=>{const b=g.find(ue=>ue.type==="section");if(b&&!H(b,Y))return null;const O=(b==null?void 0:b.cardWrap)!==!1,q={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},W=l.jsx(l.Fragment,{children:g.map(ue=>{if(!H(ue,Y))return null;const ve=qe(ue);return l.jsx(x.Box,{sx:{gridColumn:`span ${ve}`},children:l.jsx(ds,{field:ue,control:L,errors:V,baseUrl:j,apiHeaders:M,formData:Y,setValue:ie})},ue.name)})});return O?l.jsx(x.Card,{sx:{...q,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:W},`group-${z}`):l.jsx(x.Box,{sx:K,children:W},`group-${z}`)}),kt()]}),He=m?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...S},...v,children:Ze}):Ze;return Ge?l.jsx(x.ThemeProvider,{theme:Ge,children:He}):He},Rm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.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"}})});function Mr(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(h){try{d(n.next(h))}catch(f){s(f)}}function c(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?a(h.value):i(h.value).then(o,c)}d((n=n.apply(e,t||[])).next())})}const $m=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 cn(e,t,r){const n=Pm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Bo(n,"path",a),Bo(n,"relativePath",a),n}function Pm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=$m.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Bo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Dm=[".DS_Store","Thumbs.db"];function Im(e){return Mr(this,void 0,void 0,function*(){return xi(e)&&Mm(e.dataTransfer)?Nm(e.dataTransfer,e.type):zm(e)?Bm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Vm(e):[]})}function Mm(e){return xi(e)}function zm(e){return xi(e)&&xi(e.target)}function xi(e){return typeof e=="object"&&e!==null}function Bm(e){return Ia(e.target.files).map(t=>cn(t))}function Vm(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Nm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Lm));return Vo(Dc(n))}return Vo(Ia(e.files).map(r=>cn(r)))})}function Vo(e){return e.filter(t=>Dm.indexOf(t.name)===-1)}function Ia(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 Lm(e){if(typeof e.webkitGetAsEntry!="function")return No(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Ic(t):No(e,t)}function Dc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Dc(r):[r]],[])}function No(e,t){return Mr(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,cn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return cn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function qm(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?Ic(e):Wm(e)})}function Ic(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Mr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(qm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Wm(e){return Mr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=cn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},Lo;function Um(){return Lo||(Lo=1,Wn.__esModule=!0,Wn.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}),Wn}var Hm=Um();const sa=Ya(Hm);function qo(e){return Gm(e)||Ym(e)||zc(e)||Km()}function Km(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
183
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qc(e,t){if(e){if(typeof e=="string")return za(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 za(e,t)}}function za(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 Ex(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function kx(e){if(Array.isArray(e))return e}function Go(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(r),!0).forEach(function(n){Ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Go(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yi(e,t){if(e==null)return{};var r=Tx(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 Tx(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 ms=P.forwardRef(function(e,t){var r=e.children,n=yi(e,mx),i=Uc(n),a=i.open,s=yi(i,xx);return P.useImperativeHandle(t,function(){return{open:a}},[a]),P.createElement(P.Fragment,null,r(Re(Re({},s),{},{open:a})))});ms.displayName="Dropzone";var Wc={disabled:!1,getFilesFromEvent:Im,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};ms.defaultProps=Wc;ms.propTypes={children:k.func,accept:k.objectOf(k.arrayOf(k.string)),multiple:k.bool,preventDropOnDocument:k.bool,noClick:k.bool,noKeyboard:k.bool,noDrag:k.bool,noDragEventsBubbling:k.bool,minSize:k.number,maxSize:k.number,maxFiles:k.number,disabled:k.bool,getFilesFromEvent:k.func,onFileDialogCancel:k.func,onFileDialogOpen:k.func,useFsAccessApi:k.bool,autoFocus:k.bool,onDragEnter:k.func,onDragLeave:k.func,onDragOver:k.func,onDrop:k.func,onDropAccepted:k.func,onDropRejected:k.func,onError:k.func,validator:k.func};var Va={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Uc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Wc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,c=t.maxFiles,d=t.onDragEnter,h=t.onDragLeave,f=t.onDragOver,p=t.onDrop,y=t.onDropAccepted,E=t.onDropRejected,m=t.onFileDialogCancel,S=t.onFileDialogOpen,v=t.useFsAccessApi,j=t.autoFocus,M=t.preventDropOnDocument,F=t.noClick,C=t.noKeyboard,R=t.noDrag,B=t.noDragEventsBubbling,_=t.onError,I=t.validator,u=P.useMemo(function(){return dx(r)},[r]),D=P.useMemo(function(){return px(r)},[r]),L=P.useMemo(function(){return typeof S=="function"?S:Qo},[S]),$=P.useMemo(function(){return typeof m=="function"?m:Qo},[m]),V=P.useRef(null),ee=P.useRef(null),ie=P.useReducer(jx,Va),he=oa(ie,2),le=he[0],Y=he[1],U=le.isFocused,Z=le.isFileDialogActive,ce=P.useRef(typeof window<"u"&&window.isSecureContext&&v&&ux()),de=function(){!ce.current&&Z&&setTimeout(function(){if(ee.current){var O=ee.current.files;O.length||(Y({type:"closeDialog"}),$())}},300)};P.useEffect(function(){return window.addEventListener("focus",de,!1),function(){window.removeEventListener("focus",de,!1)}},[ee,Z,$,ce]);var oe=P.useRef([]),pe=function(O){V.current&&V.current.contains(O.target)||(O.preventDefault(),oe.current=[])};P.useEffect(function(){return M&&(document.addEventListener("dragover",Yo,!1),document.addEventListener("drop",pe,!1)),function(){M&&(document.removeEventListener("dragover",Yo),document.removeEventListener("drop",pe))}},[V,M]),P.useEffect(function(){return!n&&j&&V.current&&V.current.focus(),function(){}},[V,j,n]);var H=P.useCallback(function(b){_?_(b):console.error(b)},[_]),X=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),oe.current=[].concat(vx(oe.current),[b.target]),Un(b)&&Promise.resolve(i(b)).then(function(O){if(!(gi(b)&&!B)){var q=O.length,K=q>0&&sx({files:O,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:c,validator:I}),W=q>0&&!K;Y({isDragAccept:K,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),d&&d(b)}}).catch(function(O){return H(O)})},[i,d,H,B,u,s,a,o,c,I]),te=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=Un(b);if(O&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return O&&f&&f(b),!1},[f,B]),ae=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=oe.current.filter(function(K){return V.current&&V.current.contains(K)}),q=O.indexOf(b.target);q!==-1&&O.splice(q,1),oe.current=O,!(O.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(b)&&h&&h(b))},[V,h,B]),se=P.useCallback(function(b,O){var q=[],K=[];b.forEach(function(W){var ue=Bc(W,u),ve=oa(ue,2),Ce=ve[0],De=ve[1],Be=Vc(W,s,a),Xe=oa(Be,2),Ot=Xe[0],Je=Xe[1],We=I?I(W):null;if(Ce&&Ot&&!We)q.push(W);else{var pt=[De,Je];We&&(pt=pt.concat(We)),K.push({file:W,errors:pt.filter(function(Yt){return Yt})})}}),(!o&&q.length>1||o&&c>=1&&q.length>c)&&(q.forEach(function(W){K.push({file:W,errors:[ax]})}),q.splice(0)),Y({acceptedFiles:q,fileRejections:K,isDragReject:K.length>0,type:"setFiles"}),p&&p(q,K,O),K.length>0&&E&&E(K,O),q.length>0&&y&&y(q,O)},[Y,o,u,s,a,c,p,y,E,I]),ge=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),oe.current=[],Un(b)&&Promise.resolve(i(b)).then(function(O){gi(b)&&!B||se(O,b)}).catch(function(O){return H(O)}),Y({type:"reset"})},[i,se,H,B]),Q=P.useCallback(function(){if(ce.current){Y({type:"openDialog"}),L();var b={multiple:o,types:D};window.showOpenFilePicker(b).then(function(O){return i(O)}).then(function(O){se(O,null),Y({type:"closeDialog"})}).catch(function(O){fx(O)?($(O),Y({type:"closeDialog"})):hx(O)?(ce.current=!1,ee.current?(ee.current.value=null,ee.current.click()):H(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."))):H(O)});return}ee.current&&(Y({type:"openDialog"}),L(),ee.current.value=null,ee.current.click())},[Y,L,$,v,se,H,D,o]),Pe=P.useCallback(function(b){!V.current||!V.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),Q())},[V,Q]),qe=P.useCallback(function(){Y({type:"focus"})},[]),Ge=P.useCallback(function(){Y({type:"blur"})},[]),kt=P.useCallback(function(){F||(cx()?setTimeout(Q,0):Q())},[F,Q]),Ue=function(O){return n?null:O},Ze=function(O){return C?null:Ue(O)},He=function(O){return R?null:Ue(O)},w=function(O){B&&O.stopPropagation()},T=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,q=O===void 0?"ref":O,K=b.role,W=b.onKeyDown,ue=b.onFocus,ve=b.onBlur,Ce=b.onClick,De=b.onDragEnter,Be=b.onDragOver,Xe=b.onDragLeave,Ot=b.onDrop,Je=yi(b,gx);return Re(Re(Ba({onKeyDown:Ze(Rt(W,Pe)),onFocus:Ze(Rt(ue,qe)),onBlur:Ze(Rt(ve,Ge)),onClick:Ue(Rt(Ce,kt)),onDragEnter:He(Rt(De,X)),onDragOver:He(Rt(Be,te)),onDragLeave:He(Rt(Xe,ae)),onDrop:He(Rt(Ot,ge)),role:typeof K=="string"&&K!==""?K:"presentation"},q,V),!n&&!C?{tabIndex:0}:{}),Je)}},[V,Pe,qe,Ge,kt,X,te,ae,ge,C,R,n]),g=P.useCallback(function(b){b.stopPropagation()},[]),z=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,q=O===void 0?"ref":O,K=b.onChange,W=b.onClick,ue=yi(b,yx),ve=Ba({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:Ue(Rt(K,ge)),onClick:Ue(Rt(W,g)),tabIndex:-1},q,ee);return Re(Re({},ve),ue)}},[ee,r,o,ge,n]);return Re(Re({},le),{},{isFocused:U&&!n,getRootProps:T,getInputProps:z,rootRef:V,inputRef:ee,open:Ue(Q)})}function jx(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},Va),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},Va);default:return e}}function Qo(){}const Fx=ut(l.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"),Zo=ut(l.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"),Ax=ut(l.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"),Hc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Ax,{}):e.file.type.includes("pdf")?l.jsx(Zo,{}):l.jsx(Zo,{}),n=()=>{switch(e.status){case"success":return l.jsx(Fx,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(2))+" "+o[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(fc,{})})})]})},Ox=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:c,buttonText:d,fileSupportedText:h})=>{const[f,p]=P.useState(t),[y,E]=P.useState([]),[m,S]=P.useState(!1),[v,j]=P.useState(!1),[M,F]=P.useState([]),C=P.useRef(null);P.useEffect(()=>{p(t)},[t]);const R=P.useCallback(V=>{var ie,he;return((ie=e==null?void 0:e.fileTypes)==null?void 0:ie.some(le=>{if(le.includes("*")){const Y=le.split("/")[0];return V.type.startsWith(Y)}return V.type===le}))?e!=null&&e.maxSize&&V.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${V.type} is not allowed. Allowed types: ${(he=e==null?void 0:e.fileTypes)==null?void 0:he.join(", ")}`},[e]),B=P.useCallback(async V=>{console.log("handleFiles called with:",V.length,"files"),S(!0);const ee=[],ie=[];try{for(const le of V){let Y=null;if(e!=null&&e.multiple&&f.some(Z=>Z.file.name===le.name&&Z.file.size===le.size&&Z.file.lastModified===le.lastModified)){ie.push(`${le.name}: File already exists`);continue}if(Y=R(le),!Y&&(e!=null&&e.customValidation))try{const U=e.customValidation(le);U instanceof Promise?Y=await U:Y=U}catch(U){Y=`Custom validation failed: ${U instanceof Error?U.message:"Unknown error"}`}if(Y)ie.push(`${le.name}: ${Y}`);else{const U={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:le,preview:le.type.startsWith("image/")?URL.createObjectURL(le):void 0,progress:0,status:"pending",uploadedAt:new Date};ee.push(U)}}const he=e!=null&&e.multiple?[...f,...ee]:ee;p(he),r==null||r(he),ie.length>0?(F(ie),E(ie)):(F([]),E([]))}catch(he){const le=`Unexpected error: ${he instanceof Error?he.message:"Unknown error"}`;F([le]),E([le])}},[f,e==null?void 0:e.multiple,R,e==null?void 0:e.customValidation,r]),_=P.useCallback(V=>{S(!0);const ee=f.filter(ie=>ie.id!==V);p(ee),r==null||r(ee),F([]),C.current&&(C.current.value="")},[f,r]),I=P.useCallback(()=>{if(e!=null&&e.required&&f.length===0){E([`${e.title} is required`]);return}F([]),j(!0);const V=f.filter(ee=>ee.status!=="error");n==null||n(V)},[f,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:D,isDragActive:L}=Uc({onDrop:B,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});P.useEffect(()=>{if(!m)return;const V=[],ee=[...M,...V];ee.length>0?E(ee):E([])},[f,e==null?void 0:e.required,e==null?void 0:e.title,m,v,M]);const $=()=>{var V;switch(((V=e==null?void 0:e.submitButton)==null?void 0:V.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:s,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),P.createElement(x.Card,{...u(),key:`dropzone-${f.length}`,sx:{border:"1px dashed",borderColor:L?"primary.main":"#CCCCCC",backgroundColor:L?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...D(),ref:C}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var V;return(V=C.current)==null?void 0:V.click()},sx:{my:2},startIcon:l.jsx(pi,{}),variant:"contained",children:d}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:h})),y.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((V,ee)=>l.jsx(x.Typography,{variant:"body2",children:V},ee))}),f.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",f.length,")"]}),f.map(V=>l.jsx(Hc,{file:V,onRemove:_},V.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:$()},children:l.jsx(x.Button,{variant:"contained",onClick:I,disabled:i||e.submitButton.disabled||f.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=$c;exports.DocumentUpload=Ox;exports.FieldRenderer=ds;exports.FilePreview=Hc;exports.FinAutocomplete=ic;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=ac;exports.FinChip=us;exports.FinCustomizedVerticalStepper=Lh;exports.FinDateField=cs;exports.FinDragDropList=cc;exports.FinEditableGrid=pc;exports.FinForm=Om;exports.FinInfoCard=Wh;exports.FinListCards=dc;exports.FinPhaseCard=Kh;exports.FinRadioGroup=wr;exports.FinSelect=$i;exports.FinSwitch=di;exports.FinTabs=uc;exports.FinTextField=yt;exports.FinTextarea=sc;exports.FinUiHeader=oc;exports.FinVerticalStepper=Vh;exports.ImageComponent=Rm;exports.StepNavigation=Rc;exports.brand=Mh;exports.fetchApiData=hc;exports.finflowPalette=G;exports.generateSchema=_c;exports.getApiConfig=ps;exports.hasApiConfig=gr;exports.neutral=Ye;exports.primary=Dh;exports.secondary=Ih;exports.shouldShowField=Yh;exports.useApiData=mc;
|
|
179
|
+
`+(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,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let p=[];for(let f of Object.values(this.internalTests))f&&p.push(f);this.runTests({path:a,value:c,originalValue:s,options:r,tests:p},n,f=>{if(f.length)return i(f,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:p}=t,f=m=>{i||(i=!0,r(m,s))},d=m=>{i||(i=!0,n(m,s))},u=a.length,y=[];if(!u)return d([]);let E={value:s,originalValue:o,path:c,options:p,schema:this};for(let m=0;m<a.length;m++){const S=a[m];S(E,f,function(j){j&&(Array.isArray(j)?y.push(...j):y.push(j)),--u<=0&&d(y)})}}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 c=typeof o=="number";let p=n[o];const f=Object.assign({},s,{strict:!0,parent:n,value:p,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(d,u,y)=>this.resolve(f)._validate(p,f,u,y)}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,(c,p)=>{lt.isError(c)&&(c.value=p),o(c)},(c,p)=>{c.length?o(new lt(c,p,void 0,void 0,a)):s(p)}))}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,c)=>{throw lt.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new lt(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(lt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(lt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Hr(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=Wr({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=Wr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.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=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Wr(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=yc(t).map(a=>new xr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Wr({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=$t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Wr({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=$t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Wr({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(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,p,f)=>f.findIndex(d=>d.name===c.name)===p)}}}mt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])mt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=hm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])mt.prototype[e]=mt.prototype.oneOf;for(const e of["not","nope"])mt.prototype[e]=mt.prototype.notOneOf;const mm=()=>!0;function Sc(e){return new Cc(e)}class Cc extends mt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:mm},t))}}Sc.prototype=Cc.prototype;function Ec(){return new kc}class kc extends mt{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=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return At(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return At(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)}}Ec.prototype=kc.prototype;const xm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gm(e){const t=Da(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 Da(e){var t,r;const n=xm.exec(e);return n?{year:qt(n[1]),month:qt(n[2],1)-1,day:qt(n[3],1),hour:qt(n[4]),minute:qt(n[5]),second:qt(n[6]),millisecond:n[7]?qt(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:qt(n[10]),minuteOffset:qt(n[11])}:null}function qt(e,t=0){return Number(e)||t}let ym=/^[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])?)*$/,vm=/^((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,bm=/^(?:[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,wm="^\\d{4}-\\d{2}-\\d{2}",Sm="\\d{2}:\\d{2}:\\d{2}",Cm="(([+-]\\d{2}(:?\\d{2})?)|Z)",Em=new RegExp(`${wm}T${Sm}(\\.\\d+)?${Cm}$`),km=e=>At(e)||e===e.trim(),Tm={}.toString();function vn(){return new Tc}class Tc extends mt{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===Tm?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.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=at.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=at.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=at.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||at.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=at.email){return this.matches(ym,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(vm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(bm,{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(Em,{name:"datetime",message:r||at.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||at.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||at.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=at.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:km})}lowercase(t=at.lowercase){return this.transform(r=>At(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toLowerCase()})}uppercase(t=at.uppercase){return this.transform(r=>At(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toUpperCase()})}}vn.prototype=Tc.prototype;let jm=e=>e!=+e;function jc(){return new Fc}class Fc extends mt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!jm(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=Xt.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=Xt.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=Xt.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=Xt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Xt.positive){return this.moreThan(0,t)}negative(t=Xt.negative){return this.lessThan(0,t)}integer(t=Xt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>At(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=>At(i)?i:Math[t](i))}}jc.prototype=Fc.prototype;let Ac=new Date(""),Fm=e=>Object.prototype.toString.call(e)==="[object Date]";function ms(){return new Pn}class Pn extends mt{constructor(){super({type:"date",check(t){return Fm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=gm(t),isNaN(t)?Pn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(xr.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=$a.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=$a.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)}})}}Pn.INVALID_DATE=Ac;ms.prototype=Pn.prototype;ms.INVALID_DATE=Ac;function Am(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=Rr.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),xr.isRef(o)&&o.isSibling?a(o.path,s):hs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return im.array(Array.from(n),r).reverse()}function Mo(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 Oc(e){return(t,r)=>Mo(e,t)-Mo(e,r)}const Om=(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 Zn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Zn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zn)}):"optional"in e?e.optional():e}const _m=(e,t)=>{const r=[...Rr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Rr.getter(Rr.join(r),!0)(e);return!!(i&&n in i)};let zo=e=>Object.prototype.toString.call(e)==="[object Object]";function Bo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Rm=Oc([]);function _c(e){return new Rc(e)}class Rc extends mt{constructor(t){super({type:"object",check(r){return zo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Rm,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))),c={},p=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),f=!1;for(const d of o){let u=a[d],y=d in i;if(u){let E,m=i[d];p.path=(r.path?`${r.path}.`:"")+d,u=u.resolve({value:m,context:r.context,parent:c});let S=u instanceof mt?u.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||d in i;continue}E=!r.__validating||!v?u.cast(i[d],p):i[d],E!==void 0&&(c[d]=E)}else y&&!s&&(c[d]=i[d]);(y!==d in c||c[d]!==i[d])&&(f=!0)}return f?c: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,(c,p)=>{if(!o||!zo(p)){i(c,p);return}s=s||p;let f=[];for(let d of this._nodes){let u=this.fields[d];!u||xr.isRef(u)||f.push(u.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:s}))}this.runTests({tests:f,value:p,originalValue:s,options:r},n,d=>{i(d.sort(this._sortErrors).concat(c),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const 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=Am(t,r),n._sortErrors=Oc(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 Zn(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=Rr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return _m(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Om)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=Bo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Bo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.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}}_c.prototype=Rc.prototype;const $c=e=>{const t={};return e.forEach(r=>{var s,o,c;let n;switch(r.type){case"text":case"textarea":case"tel":n=vn(),r.validation?n=gr(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`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.message)||`${r.label} must be a valid email address`),r.validation&&(n=gr(n,r,"string"));break;case"password":n=vn(),r.validation?n=gr(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`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"number":if(n=jc().transform((p,f)=>f===""||f===null?void 0:p).nullable().typeError(`${r.label} must be a number`),r.validation)n=gr(n,r,"number");else{if(r.min!==void 0){const p=typeof r.min=="object"&&r.min!==null&&"field"in r.min,f=p?hi(r.min.field):r.min,d=p&&r.min.message?r.min.message:`${r.label} must be at least ${p?"the minimum value":r.min}`;n=n.min(f,d)}if(r.max!==void 0){const p=typeof r.max=="object"&&r.max!==null&&"field"in r.max,f=p?hi(r.max.field):r.max,d=p&&r.max.message?r.max.message:`${r.label} must be at most ${p?"the maximum value":r.max}`;n=n.max(f,d)}}break;case"select":n=vn(),r.validation&&(n=gr(n,r,"string"));break;case"checkbox":n=Ec(),r.validation&&(n=gr(n,r,"boolean"));break;case"date":n=ms().typeError(`${r.label} must be a valid date`),r.validation?n=gr(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=Sc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const p=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(p)}t[r.name]=n}),_c().shape(t)},gr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=hi(i.min.field),s=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,s)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=hi(i.max.field),s=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,s)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,s=i.message||`${t.label} format is invalid`;e=e.test("pattern",s,o=>o?a.test(o):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const s=this.parent||{},o=i.custom(a,s);return typeof o=="boolean"?o:!1})),e},Pc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=P.useMemo(()=>Array.from({length:t},(f,d)=>d+1),[t]),o=P.useMemo(()=>Math.round(e/t*100),[e,t]),c=f=>n[f-1]||`Step ${f}`,p=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((f,d)=>{const u=f===e,y=f<e||a.includes(f),E=u||y?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>p(f)&&r(f),sx:{display:"flex",alignItems:"center",cursor:p(f)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:u||y?"2px solid":"1px solid",borderColor:u||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>u||y?Ct(m.palette.primary.main,.2):"transparent",mr:.5,color:E,fontWeight:u||y?600:500,fontSize:"12px"},children:f}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:E},children:c(f)})]}),d<s.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Dc=({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,c)=>{const p=(o.text||"").toLowerCase(),f=o.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=o.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),u=o.type?o.type:f?"submit":"button",y=d?"outlined":"contained",E=o.disabled||t,m=S=>S&&["primary","secondary","error","info","success","warning"].includes(S)?S:"primary";return l.jsxs(x.Button,{type:u,variant:y,color:m(o.color),size:o.size||"large",disabled:E,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},$m=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:p="horizontal",spacing:f=2,sx:d}=e,u=v=>{let j="button",D="contained";return v.type?j=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?j="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(j="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(D="outlined"),{buttonType:j,buttonVariant:D}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",E=v=>{const{buttonType:j}=u(v);v.onClick?v.onClick():j==="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))},m=(v,j)=>{const{buttonType:D,buttonVariant:F}=u(v),C=y(v.color);return l.jsx(x.Button,{type:D,variant:F,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>E(v),sx:v.sx,children:v.text},j)},S=()=>{const v={display:"flex",gap:f,...d};switch(c){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 p==="vertical"?l.jsx(x.Box,{sx:S(),children:o.map((v,j)=>l.jsx(x.Box,{sx:{width:"100%"},children:m(v,j)},j))}):l.jsx(x.Box,{sx:S(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,j)=>m(v,j))})})},Ic=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Ic(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((p,f)=>typeof p.value=="string"||typeof p.value=="number"?p.value===a:f===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Pm=new zu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Dm=e=>l.jsx(qu,{client:Pm,children:l.jsx(Im,{...e})}),Im=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:p,buttonGroup:f,stickyButtons:d,stickyButtonsSx:u,fixedButtons:y,fixedButtonsSx:E,formCardWrap:m,formCardSx:S,formCardProps:v,baseUrl:j,apiHeaders:D,stepNavigationProps:F})=>{var w,T;const C=[...new Set(r.map(g=>g.step).filter(g=>g!=null&&g>0))].sort((g,z)=>(g||0)-(z||0)),_=C.length>1,I=C.length||1,[R,Y]=P.useState(1),h=_?r.filter(g=>g.step===R):r,M=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...M(O.fields));return z},[]),{control:N,handleSubmit:G,formState:{errors:B},watch:q,setValue:Q,resetField:ie,trigger:pe}=gu({resolver:P.useCallback((g,z,b)=>{const W=Xn(_?h:r,g),K=$c(W);return bu(K)(g,z,b)},[_,h,r]),mode:"onChange",defaultValues:o}),$=q(),L=P.useRef({});P.useEffect(()=>{const g=[];for(const z of r){const b=z.depends_on;b&&typeof z.name=="string"&&g.push({dependentField:z.name,dependencyName:b})}if(g.length!==0)for(const{dependentField:z,dependencyName:b}of g){const O=L.current[b],W=$==null?void 0:$[b];if(O!==W)try{ie(z)}catch{}L.current[b]=W}},[r,$,ie]);const Z=P.useRef(i);P.useEffect(()=>{Z.current=i},[i]);const ce=P.useMemo(()=>{try{return JSON.stringify($)}catch{return String(Date.now())}},[$]),fe=P.useRef(null);P.useEffect(()=>{Z.current&&fe.current!==ce&&(fe.current=ce,Z.current($))},[ce]);const ue=async()=>{if(!_)return!0;const g=r.filter(b=>b.step===R);for(const b of g)if(typeof b.required=="function"?!!b.required($):!!b.required){const W=$[b.name];let K=!0;if(b.type==="checkbox"?K=W===!0:Array.isArray(W)?K=W.length>0:K=W!=null&&W!=="",!K)return!1}return await pe()?!0:Object.keys(B).filter(O=>g.some(W=>W.name===O)).map(O=>{const W=B[O];return typeof(W==null?void 0:W.message)=="string"?W.message:`${O} is invalid`}).length===0},re=P.useMemo(()=>{if(!_)return!0;const g=r.filter(b=>b.step===R);for(const b of g)if(typeof b.required=="function"?!!b.required($):!!b.required){const W=$[b.name];let K=!0;if(b.type==="checkbox"?K=W===!0:Array.isArray(W)?K=W.length>0:K=W!=null&&W!=="",!K)return!1}return Object.keys(B).filter(b=>g.some(O=>O.name===b)).length===0},[_,R,r,$,B]),H=P.useCallback((g,z)=>Ic(g,z),[]),ee=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...ee(O.fields));return z},[]),ae=P.useCallback((g,z)=>Xn(g,z),[]),oe=P.useMemo(()=>{if(_)return re;const g=Xn(r,$);for(const O of g){if(!H(O,$))continue;if(typeof O.required=="function"?!!O.required($):!!O.required){const K=$[O.name];let U=!0;if(O.type==="checkbox"?U=K===!0:U=K!=null&&K!==""&&!(Array.isArray(K)&&K.length===0),!U)return!1}}const z=new Set(g.map(O=>O.name));return Object.keys(B).filter(O=>z.has(O)).length===0},[_,re,r,$,B,ae,H]),le=async g=>{g<1||g>I||g>R&&_&&!await ue()||Y(g)},ge=async g=>{if(_&&R<I){console.warn("Form submission attempted on non-final step");return}s&&s(g),n(g)},X=async g=>{g&&(g.preventDefault(),g.stopPropagation()),_&&R<I&&await ue()&&le(R+1)},Pe=g=>{g&&(g.preventDefault(),g.stopPropagation()),_&&R>1&&le(R-1)},qe=g=>g.col?g.col:(g.xs||g.sm||g.md||g.lg||g.xl)&&(g.xs||g.sm||g.md||g.lg||g.xl)||12,Ge=t?x.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:((w=t.typography)==null?void 0:w.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((T=t.typography)==null?void 0:T.fontSize)=="number"?t.typography.fontSize:14}}):void 0,kt=()=>{const g=y?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...E}:d?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...u}:void 0;if(f&&f.buttons&&f.buttons.length>0){const z={...f,buttons:f.buttons.map(b=>{const O=(b.text||"").toLowerCase(),W=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let U=!1;return _?(W||K)&&(U=!re):W&&(U=!oe),{...b,disabled:b.disabled||U}})};return l.jsx(x.Box,{sx:{mt:3,...g||{}},children:l.jsx($m,{config:z,onSubmit:ge,onStepChange:le,currentStep:R,totalSteps:I,isMultiStep:_,formData:$})})}if(p&&p.length>0){const z=p.map(b=>{const O=(b.text||"").toLowerCase(),W=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let U=!1;return _?(W||K)&&(U=!re):W&&(U=!oe),{...b,disabled:b.disabled||U}});return l.jsx(x.Box,{sx:g,children:l.jsx(Dc,{buttons:z})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...g||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[_&&R>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Pe,children:"Previous"}),_?R<I?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!re,onClick:X,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!re,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!oe,children:a})]})}):null},Ue=P.useMemo(()=>{const g=[];let z=[];for(const b of h)b.type==="section"&&z.length>0?(g.push(z),z=[b]):z.push(b);return z.length>0&&g.push(z),g},[h]),Ze=l.jsxs(x.Box,{component:"form",onSubmit:g=>{if(_&&R<I){g.preventDefault(),g.stopPropagation(),re&&X();return}G(ge)(g)},id:e,onKeyDown:g=>{g.key==="Enter"&&_&&R<I&&(g.preventDefault(),re&&X())},sx:{pb:y?10:void 0},children:[_&&l.jsx(Pc,{currentStep:R,totalSteps:I,onStepChange:le,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ue.map((g,z)=>{const b=g.find(de=>de.type==="section");if(b&&!H(b,$))return null;const O=(b==null?void 0:b.cardWrap)!==!1,W={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},U=l.jsx(l.Fragment,{children:g.map(de=>{if(!H(de,$))return null;const ve=qe(de);return l.jsx(x.Box,{sx:{gridColumn:`span ${ve}`},children:l.jsx(fs,{field:de,control:N,errors:B,baseUrl:j,apiHeaders:D,formData:$,setValue:Q})},de.name)})});return O?l.jsx(x.Card,{sx:{...W,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:U},`group-${z}`):l.jsx(x.Box,{sx:K,children:U},`group-${z}`)}),kt()]}),He=m?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...S},...v,children:Ze}):Ze;return Ge?l.jsx(x.ThemeProvider,{theme:Ge,children:He}):He},Mm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.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"}})});function Mr(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(f){try{p(n.next(f))}catch(d){s(d)}}function c(f){try{p(n.throw(f))}catch(d){s(d)}}function p(f){f.done?a(f.value):i(f.value).then(o,c)}p((n=n.apply(e,t||[])).next())})}const zm=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 cn(e,t,r){const n=Bm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Vo(n,"path",a),Vo(n,"relativePath",a),n}function Bm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=zm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Vo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Vm=[".DS_Store","Thumbs.db"];function Nm(e){return Mr(this,void 0,void 0,function*(){return xi(e)&&Lm(e.dataTransfer)?Hm(e.dataTransfer,e.type):qm(e)?Wm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Um(e):[]})}function Lm(e){return xi(e)}function qm(e){return xi(e)&&xi(e.target)}function xi(e){return typeof e=="object"&&e!==null}function Wm(e){return Ia(e.target.files).map(t=>cn(t))}function Um(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Hm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Km));return No(Mc(n))}return No(Ia(e.files).map(r=>cn(r)))})}function No(e){return e.filter(t=>Vm.indexOf(t.name)===-1)}function Ia(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 Km(e){if(typeof e.webkitGetAsEntry!="function")return Lo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?zc(t):Lo(e,t)}function Mc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Mc(r):[r]],[])}function Lo(e,t){return Mr(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,cn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return cn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Ym(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?zc(e):Gm(e)})}function zc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Mr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Ym));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Gm(e){return Mr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=cn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},qo;function Qm(){return qo||(qo=1,Wn.__esModule=!0,Wn.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}),Wn}var Zm=Qm();const sa=Ya(Zm);function Wo(e){return ex(e)||Jm(e)||Vc(e)||Xm()}function Xm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ex(e){if(Array.isArray(e))return Ma(e)}function Uo(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 Ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uo(Object(r),!0).forEach(function(n){Bc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function En(e,t){return nx(e)||rx(e,t)||Vc(e,t)||tx()}function tx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vc(e,t){if(e){if(typeof e=="string")return Ma(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 Ma(e,t)}}function Ma(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 rx(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function nx(e){if(Array.isArray(e))return e}var ix=typeof sa=="function"?sa:sa.default,ax="file-invalid-type",sx="file-too-large",ox="file-too-small",lx="too-many-files",cx=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:ax,message:"File type must be ".concat(n)}},Ko=function(t){return{code:sx,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Yo=function(t){return{code:ox,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ux={code:lx,message:"Too many files"};function Nc(e,t){var r=e.type==="application/x-moz-file"||ix(e,t);return[r,r?null:cx(t)]}function Lc(e,t,r){if(vr(e.size))if(vr(t)&&vr(r)){if(e.size>r)return[!1,Ko(r)];if(e.size<t)return[!1,Yo(t)]}else{if(vr(t)&&e.size<t)return[!1,Yo(t)];if(vr(r)&&e.size>r)return[!1,Ko(r)]}return[!0,null]}function vr(e){return e!=null}function px(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(c){var p=Nc(c,r),f=En(p,1),d=f[0],u=Lc(c,n,i),y=En(u,1),E=y[0],m=o?o(c):null;return d&&E&&!m})}function gi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Un(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 Go(e){e.preventDefault()}function dx(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fx(e){return e.indexOf("Edge/")!==-1}function hx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return dx(e)||fx(e)}function Rt(){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!gi(n)&&o&&o.apply(void 0,[n].concat(a)),gi(n)})}}function mx(){return"showOpenFilePicker"in window}function xx(e){if(vr(e)){var t=Object.entries(e).filter(function(r){var n=En(r,2),i=n[0],a=n[1],s=!0;return qc(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(Wc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(r,n){var i=En(n,2),a=i[0],s=i[1];return Ho(Ho({},r),{},Bc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function gx(e){if(vr(e))return Object.entries(e).reduce(function(t,r){var n=En(r,2),i=n[0],a=n[1];return[].concat(Wo(t),[i],Wo(a))},[]).filter(function(t){return qc(t)||Wc(t)}).join(",")}function yx(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function vx(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function qc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Wc(e){return/^.*\.[\w]+$/.test(e)}var bx=["children"],wx=["open"],Sx=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Cx=["refKey","onChange","onClick"];function Ex(e){return jx(e)||Tx(e)||Uc(e)||kx()}function kx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jx(e){if(Array.isArray(e))return za(e)}function oa(e,t){return Ox(e)||Ax(e,t)||Uc(e,t)||Fx()}function Fx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
183
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uc(e,t){if(e){if(typeof e=="string")return za(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 za(e,t)}}function za(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 Ax(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Ox(e){if(Array.isArray(e))return e}function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qo(Object(r),!0).forEach(function(n){Ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yi(e,t){if(e==null)return{};var r=_x(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 _x(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 xs=P.forwardRef(function(e,t){var r=e.children,n=yi(e,bx),i=Kc(n),a=i.open,s=yi(i,wx);return P.useImperativeHandle(t,function(){return{open:a}},[a]),P.createElement(P.Fragment,null,r(Re(Re({},s),{},{open:a})))});xs.displayName="Dropzone";var Hc={disabled:!1,getFilesFromEvent:Nm,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};xs.defaultProps=Hc;xs.propTypes={children:k.func,accept:k.objectOf(k.arrayOf(k.string)),multiple:k.bool,preventDropOnDocument:k.bool,noClick:k.bool,noKeyboard:k.bool,noDrag:k.bool,noDragEventsBubbling:k.bool,minSize:k.number,maxSize:k.number,maxFiles:k.number,disabled:k.bool,getFilesFromEvent:k.func,onFileDialogCancel:k.func,onFileDialogOpen:k.func,useFsAccessApi:k.bool,autoFocus:k.bool,onDragEnter:k.func,onDragLeave:k.func,onDragOver:k.func,onDrop:k.func,onDropAccepted:k.func,onDropRejected:k.func,onError:k.func,validator:k.func};var Va={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Hc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,c=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,d=t.onDragOver,u=t.onDrop,y=t.onDropAccepted,E=t.onDropRejected,m=t.onFileDialogCancel,S=t.onFileDialogOpen,v=t.useFsAccessApi,j=t.autoFocus,D=t.preventDropOnDocument,F=t.noClick,C=t.noKeyboard,_=t.noDrag,I=t.noDragEventsBubbling,R=t.onError,Y=t.validator,h=P.useMemo(function(){return gx(r)},[r]),M=P.useMemo(function(){return xx(r)},[r]),N=P.useMemo(function(){return typeof S=="function"?S:Zo},[S]),G=P.useMemo(function(){return typeof m=="function"?m:Zo},[m]),B=P.useRef(null),q=P.useRef(null),Q=P.useReducer(Rx,Va),ie=oa(Q,2),pe=ie[0],$=ie[1],L=pe.isFocused,Z=pe.isFileDialogActive,ce=P.useRef(typeof window<"u"&&window.isSecureContext&&v&&mx()),fe=function(){!ce.current&&Z&&setTimeout(function(){if(q.current){var O=q.current.files;O.length||($({type:"closeDialog"}),G())}},300)};P.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[q,Z,G,ce]);var ue=P.useRef([]),re=function(O){B.current&&B.current.contains(O.target)||(O.preventDefault(),ue.current=[])};P.useEffect(function(){return D&&(document.addEventListener("dragover",Go,!1),document.addEventListener("drop",re,!1)),function(){D&&(document.removeEventListener("dragover",Go),document.removeEventListener("drop",re))}},[B,D]),P.useEffect(function(){return!n&&j&&B.current&&B.current.focus(),function(){}},[B,j,n]);var H=P.useCallback(function(b){R?R(b):console.error(b)},[R]),ee=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),ue.current=[].concat(Ex(ue.current),[b.target]),Un(b)&&Promise.resolve(i(b)).then(function(O){if(!(gi(b)&&!I)){var W=O.length,K=W>0&&px({files:O,accept:h,minSize:s,maxSize:a,multiple:o,maxFiles:c,validator:Y}),U=W>0&&!K;$({isDragAccept:K,isDragReject:U,isDragActive:!0,type:"setDraggedFiles"}),p&&p(b)}}).catch(function(O){return H(O)})},[i,p,H,I,h,s,a,o,c,Y]),ae=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=Un(b);if(O&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return O&&d&&d(b),!1},[d,I]),oe=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=ue.current.filter(function(K){return B.current&&B.current.contains(K)}),W=O.indexOf(b.target);W!==-1&&O.splice(W,1),ue.current=O,!(O.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(b)&&f&&f(b))},[B,f,I]),le=P.useCallback(function(b,O){var W=[],K=[];b.forEach(function(U){var de=Nc(U,h),ve=oa(de,2),Ce=ve[0],De=ve[1],Be=Lc(U,s,a),Xe=oa(Be,2),Ot=Xe[0],Je=Xe[1],We=Y?Y(U):null;if(Ce&&Ot&&!We)W.push(U);else{var pt=[De,Je];We&&(pt=pt.concat(We)),K.push({file:U,errors:pt.filter(function(Yt){return Yt})})}}),(!o&&W.length>1||o&&c>=1&&W.length>c)&&(W.forEach(function(U){K.push({file:U,errors:[ux]})}),W.splice(0)),$({acceptedFiles:W,fileRejections:K,isDragReject:K.length>0,type:"setFiles"}),u&&u(W,K,O),K.length>0&&E&&E(K,O),W.length>0&&y&&y(W,O)},[$,o,h,s,a,c,u,y,E,Y]),ge=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),ue.current=[],Un(b)&&Promise.resolve(i(b)).then(function(O){gi(b)&&!I||le(O,b)}).catch(function(O){return H(O)}),$({type:"reset"})},[i,le,H,I]),X=P.useCallback(function(){if(ce.current){$({type:"openDialog"}),N();var b={multiple:o,types:M};window.showOpenFilePicker(b).then(function(O){return i(O)}).then(function(O){le(O,null),$({type:"closeDialog"})}).catch(function(O){yx(O)?(G(O),$({type:"closeDialog"})):vx(O)?(ce.current=!1,q.current?(q.current.value=null,q.current.click()):H(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."))):H(O)});return}q.current&&($({type:"openDialog"}),N(),q.current.value=null,q.current.click())},[$,N,G,v,le,H,M,o]),Pe=P.useCallback(function(b){!B.current||!B.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),X())},[B,X]),qe=P.useCallback(function(){$({type:"focus"})},[]),Ge=P.useCallback(function(){$({type:"blur"})},[]),kt=P.useCallback(function(){F||(hx()?setTimeout(X,0):X())},[F,X]),Ue=function(O){return n?null:O},Ze=function(O){return C?null:Ue(O)},He=function(O){return _?null:Ue(O)},w=function(O){I&&O.stopPropagation()},T=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,W=O===void 0?"ref":O,K=b.role,U=b.onKeyDown,de=b.onFocus,ve=b.onBlur,Ce=b.onClick,De=b.onDragEnter,Be=b.onDragOver,Xe=b.onDragLeave,Ot=b.onDrop,Je=yi(b,Sx);return Re(Re(Ba({onKeyDown:Ze(Rt(U,Pe)),onFocus:Ze(Rt(de,qe)),onBlur:Ze(Rt(ve,Ge)),onClick:Ue(Rt(Ce,kt)),onDragEnter:He(Rt(De,ee)),onDragOver:He(Rt(Be,ae)),onDragLeave:He(Rt(Xe,oe)),onDrop:He(Rt(Ot,ge)),role:typeof K=="string"&&K!==""?K:"presentation"},W,B),!n&&!C?{tabIndex:0}:{}),Je)}},[B,Pe,qe,Ge,kt,ee,ae,oe,ge,C,_,n]),g=P.useCallback(function(b){b.stopPropagation()},[]),z=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,W=O===void 0?"ref":O,K=b.onChange,U=b.onClick,de=yi(b,Cx),ve=Ba({accept:h,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:Ue(Rt(K,ge)),onClick:Ue(Rt(U,g)),tabIndex:-1},W,q);return Re(Re({},ve),de)}},[q,r,o,ge,n]);return Re(Re({},pe),{},{isFocused:L&&!n,getRootProps:T,getInputProps:z,rootRef:B,inputRef:q,open:Ue(X)})}function Rx(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},Va),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},Va);default:return e}}function Zo(){}const $x=ut(l.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"),Xo=ut(l.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"),Px=ut(l.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"),Yc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Px,{}):e.file.type.includes("pdf")?l.jsx(Xo,{}):l.jsx(Xo,{}),n=()=>{switch(e.status){case"success":return l.jsx($x,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(2))+" "+o[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(mc,{})})})]})},Dx=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:c,buttonText:p,fileSupportedText:f})=>{const[d,u]=P.useState(t),[y,E]=P.useState([]),[m,S]=P.useState(!1),[v,j]=P.useState(!1),[D,F]=P.useState([]),C=P.useRef(null);P.useEffect(()=>{u(t)},[t]);const _=P.useCallback(B=>{var Q,ie;return((Q=e==null?void 0:e.fileTypes)==null?void 0:Q.some(pe=>{if(pe.includes("*")){const $=pe.split("/")[0];return B.type.startsWith($)}return B.type===pe}))?e!=null&&e.maxSize&&B.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${B.type} is not allowed. Allowed types: ${(ie=e==null?void 0:e.fileTypes)==null?void 0:ie.join(", ")}`},[e]),I=P.useCallback(async B=>{console.log("handleFiles called with:",B.length,"files"),S(!0);const q=[],Q=[];try{for(const pe of B){let $=null;if(e!=null&&e.multiple&&d.some(Z=>Z.file.name===pe.name&&Z.file.size===pe.size&&Z.file.lastModified===pe.lastModified)){Q.push(`${pe.name}: File already exists`);continue}if($=_(pe),!$&&(e!=null&&e.customValidation))try{const L=e.customValidation(pe);L instanceof Promise?$=await L:$=L}catch(L){$=`Custom validation failed: ${L instanceof Error?L.message:"Unknown error"}`}if($)Q.push(`${pe.name}: ${$}`);else{const L={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:pe,preview:pe.type.startsWith("image/")?URL.createObjectURL(pe):void 0,progress:0,status:"pending",uploadedAt:new Date};q.push(L)}}const ie=e!=null&&e.multiple?[...d,...q]:q;u(ie),r==null||r(ie),Q.length>0?(F(Q),E(Q)):(F([]),E([]))}catch(ie){const pe=`Unexpected error: ${ie instanceof Error?ie.message:"Unknown error"}`;F([pe]),E([pe])}},[d,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),R=P.useCallback(B=>{S(!0);const q=d.filter(Q=>Q.id!==B);u(q),r==null||r(q),F([]),C.current&&(C.current.value="")},[d,r]),Y=P.useCallback(()=>{if(e!=null&&e.required&&d.length===0){E([`${e.title} is required`]);return}F([]),j(!0);const B=d.filter(q=>q.status!=="error");n==null||n(B)},[d,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:h,getInputProps:M,isDragActive:N}=Kc({onDrop:I,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});P.useEffect(()=>{if(!m)return;const B=[],q=[...D,...B];q.length>0?E(q):E([])},[d,e==null?void 0:e.required,e==null?void 0:e.title,m,v,D]);const G=()=>{var B;switch(((B=e==null?void 0:e.submitButton)==null?void 0:B.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:s,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),P.createElement(x.Card,{...h(),key:`dropzone-${d.length}`,sx:{border:"1px dashed",borderColor:N?"primary.main":"#CCCCCC",backgroundColor:N?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},l.jsx("input",{...M(),ref:C}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var B;return(B=C.current)==null?void 0:B.click()},sx:{my:2},startIcon:l.jsx(pi,{}),variant:"contained",children:p}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),y.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((B,q)=>l.jsx(x.Typography,{variant:"body2",children:B},q))}),d.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",d.length,")"]}),d.map(B=>l.jsx(Yc,{file:B,onRemove:R},B.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:G()},children:l.jsx(x.Button,{variant:"contained",onClick:Y,disabled:i||e.submitButton.disabled||d.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Dc;exports.DocumentUpload=Dx;exports.FieldRenderer=fs;exports.FilePreview=Yc;exports.FinAutocomplete=sc;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=oc;exports.FinChip=ps;exports.FinCustomizedVerticalStepper=Kh;exports.FinDateField=us;exports.FinDragDropList=pc;exports.FinEditableGrid=fc;exports.FinForm=Dm;exports.FinInfoCard=Gh;exports.FinListCards=hc;exports.FinPhaseCard=Xh;exports.FinRadioGroup=Sr;exports.FinSelect=$i;exports.FinSwitch=di;exports.FinTabs=dc;exports.FinTextField=yt;exports.FinTextarea=lc;exports.FinUiHeader=cc;exports.FinVerticalStepper=Uh;exports.ImageComponent=Mm;exports.StepNavigation=Pc;exports.brand=Lh;exports.fetchApiData=xc;exports.finflowPalette=J;exports.generateSchema=$c;exports.getApiConfig=ds;exports.hasApiConfig=yr;exports.neutral=Ye;exports.primary=Vh;exports.secondary=Nh;exports.shouldShowField=Jh;exports.useApiData=gc;
|